1 /* -*- fundamental -*- */
11 %option prefix="record_yy"
12 %option header-file="record-l.h"
15 #define STRT record_yylval.name= record_tempzone_strdup(yytext); return
22 adjunct { STRT ADJUNCT; }
26 inverted { STRT INVERTED; }
31 /* new keywords must be added to %token<name> and ident: in record-y.y */
33 [A-Za-z][-A-Za-z0-9]+ { STRT IDENT; }
35 [0-9]{0,8} { record_yylval.num= strtoul(yytext,0,10); return NUM; }
36 [0-9]{9} { record_yyerror("number too long"); }
37 [0-9][0-9]*\.[0-9]* { record_yylval.dbl= strtod(yytext,0); return DBL; }
39 [-+:=~/] { record_yylval.name= 0; return yytext[0]; }
41 \#.*\n|\n { record_yylval.name= 0; return NL; }
45 . { record_yyerror("lexically invalid input"); }