/* Lexical Analyzer for Associated Automaton Generator */ /* Definitions and C Pass-Throughs */ %{ #include #include %} letter [a-zA-Z~] digit [0-9] ws [ \t\n]+ int {digit}+ nil [\^] sign [+-] real {digit}+"."{digit}+ %% {ws} ; /* Ignore whitespace */ Framerate { return (FRAMERATE); } Time { return (TIME); } Position { return (POSITION); } VPN { return (VPN); } DOF { return (DOF); } At { return (AT); } VUP { return (VUP); } {sign}?{int} { yylval=(long)yytext; return (NUM); } {sign}?{real} { yylval=(long)yytext; return (NUM); } . return (yytext[0]); %%