/* $Id: conf_tbl.l,v 1.1 2004/03/26 02:19:03 jmuelmen Exp $ */ %{ #include #include "y.tab.h" #include "conf_int.h" static void conf_comment (); %} %% "/*" { conf_comment(); } [A-Za-z_/.][0-9A-Za-z_/\-.]* { return STRING; } = { return EQ; } \n { return(NEWLINE); } \#.*\n ; [ \t\v\f] ; . { conf_yyerror("Unrecognized symbol"); } %% #ifndef conf_yywrap int conf_yywrap () { return 1; } #endif #ifndef yytext_ptr #define yytext_ptr conf_yytext #endif void conf_comment() { char c, c1; loop: while ((c = input()) != '*' && c != 0) putchar(c); if ((c1 = input()) != '/' && c != 0) { unput(c1); goto loop; } if (c != 0) putchar(c1); } void conf_set_input (FILE *f) { conf_yyin = f; }