upper [A-Z] lower [a-z] decimal [0-9] %% ;; Lexer rules ({lower}|{upper})({lower}|{upper}|_|{decimal})* (tok yyline ID (ident-create yytext)) {decimal}+ (tok yyline NUM (string->number yytext)) -?(({decimal}+\.({decimal}+)?)|(\.{decimal}+))([eE]([-+])?{decimal}+)? (tok yyline NUM (string->number yytext)) "(" (tok yyline LPAREN) ")" (tok yyline RPAREN) "=" (tok yyline =) "," (tok yyline COMMA) "*" (tok yyline *) "+" (tok yyline +) "-" (tok yyline -) "/" (tok yyline /) \n (tok yyline NEWLINE) \r\n (tok yyline NEWLINE) \9+ (yycontinue) \13+ (yycontinue) \32+ (yycontinue) <> '*eoi* <> (lexer-error (sprintf "~A: illegal character" yyline) (yygetc))