23 lines
412 B
Plaintext
23 lines
412 B
Plaintext
|
%%
|
||
|
%jayscanner browserscanner
|
||
|
%jayparser browserparser
|
||
|
%class browserlexer
|
||
|
%eofval{
|
||
|
return new EOF();
|
||
|
%eofval}
|
||
|
|
||
|
|
||
|
ws = [ \t\r\n\b \015]+
|
||
|
|
||
|
|
||
|
%%
|
||
|
[0-9]+ { return new NUM(yytext()) ; }
|
||
|
"+" { return new PLS(); }
|
||
|
"-" { return new MIN(); }
|
||
|
"*" { return new MUL(); }
|
||
|
"/" { return new DIV(); }
|
||
|
"(" { return new BROP(); }
|
||
|
")" { return new BRCL(); }
|
||
|
{ws} { System.out.println(yytext()); }
|
||
|
. { System.out.println("Falsch"); }
|