Network Router User Manual

GINA V4.0 System Administrator Guide – September 2000 165
Configuration language
Druck vom 24. 01.2001 17:00.58 torbkontux
7.2.2 Lexical structure
This section describes how the configuration generator combines the contents of the con-
figuration file into symbols (like the keywords) for syntax analysis. The description is in the
notation used by the UNIX command lex.
%{
%}
letter [a-zA-Z_]
DGS [0-9]+
letter_or_digit [a-zA-Z_0-9]
%%
[ \t\n\v\r\f]+ ;
\/\/.*\n ;
\{ {return(BBOPEN);}
\} {return(BBCLOSE);}
\( {return(SBOPEN);}
\) {return(SBCLOSE);}
\, {return(COMMA);}
\= {return(EQUAL);}
\- {return(MINUS);}
{DGS} {yylval.number=atol(yytext);
return(NUMBER);}
{DGS}\.{DGS}\.{DGS}\.{DGS} {strcpy(yylval.string,yytext);
return(INADDRESS);};
\"[^"\n]* {yytext[yyleng++] = yyinput();
yytext[yyleng] = '\0';
lettercpy(yylval.string,yytext);
return(LETTER);};
{letter}{letter_or_digit}* {return(rwlookup());};
. {return(CONFIG_ERROR);};
%%