24 lines
509 B
Plaintext
24 lines
509 B
Plaintext
%%
|
|
%public
|
|
%class browserlexer
|
|
%jayscanner browserscanner
|
|
%jayparser browserparser
|
|
%eofval{
|
|
System.out.println("EOF reached");
|
|
return new EOF();
|
|
%eofval}
|
|
|
|
ws = [ \t\b\r\n\015]+
|
|
num = [1-9][0-9]*
|
|
|
|
%%
|
|
|
|
{ws} { return new WS(yytext()); }
|
|
{num} { return new NUM(yytext()); }
|
|
"(" { return new AUFKLAMMER(yytext()); }
|
|
")" { return new ZUKLAMMER(yytext()); }
|
|
"+" { return new ADDITION(yytext()); }
|
|
"-" { return new SUBTRA(yytext()); }
|
|
"*" { return new MULTI(yytext()); }
|
|
"/" { return new DIV(yytext()); }
|