1 ////////////////////////////////////////////////////////////////////////////
2 // This file demonstrates the use of the syntax declaration.
3 ////////////////////////////////////////////////////////////////////////////
7 lexemetype Token = IDENT "[a-zA-Z_][a-zA-Z0-9_]*"
19 case IDENT: return IDENT;
20 case INTEGER: return INTEGER;
22 case THEN: return THEN;
23 case ELSE: return ELSE;
24 case WHILE: return WHILE;
26 case "[(),{}+\-*/]": return ?token[0];
27 case "(\t| |\n)": break;
33 syntax class Simple {};