1 %{ 2 extern int yylineno; 3 int yylineno = 1; 4 %} 5 6 PC [^\"\n] 7 AN [A-Z_a-z0-9] 8 %% 9 10 error_table return ERROR_TABLE; 11 et return ERROR_TABLE; 12 error_code return ERROR_CODE_ENTRY; 13 ec return ERROR_CODE_ENTRY; 14 end return END; 15 16 [\t ]+ ; 17 \n ++yylineno; 18 19 \"{PC}*\" { register char *p; yylval.dynstr = ds(yytext+1); 20 if (p=rindex(yylval.dynstr, '"')) *p='\0'; 21 return QUOTED_STRING; 22 } 23 24 {AN}* { yylval.dynstr = ds(yytext); return STRING; } 25 26 #.*\n ++yylineno; 27 28 . { return (*yytext); } 29 %% 30