/* * @(#) $Id: pwlex.l,v 1.1.1.1 2001-11-25 00:41:16 lkarsten Exp $ * * lex source for the configuration file * */ %{ #include #include #include "pwyacc.h" extern int config_line; extern int yylval; %} %% #.*\n config_line++; set { yylval = SET; return(SET); } host { yylval = HOST; return(HOST); }; user { yylval = USER; return(USER); }; password { yylval = PASSWORD; return(PASSWORD); } \"[^"]*\" { if (yytext[yyleng - 1] == '\\') yymore(); else yytext[yyleng - 1] = '\0'; yylval = (int)strdup(yytext + 1); return(STRING); }; ; return(';'); [^ \t\n\;]* { yylval = (int)strdup(yytext); return(STRING); } [ \t] ; \n config_line++; %%