diff --git a/parser/calc/lexer.l b/parser/calc/lexer.l --- a/parser/calc/lexer.l +++ b/parser/calc/lexer.l @@ -4,20 +4,20 @@ */ %{ - #include - #include "parser.h" + #include + #include "parser.h" %} %% -[0-9]+ { yylval = atoi(yytext); return DIGIT; } -[a-zA-Z] { yylval = yytext[0]; return LETTER; } -"+" { return PLUS; } -"-" { return MINUS; } -"*" { return MUL; } -"/" { return DIV; } -"("|")"|"=" { return yytext[0]; } -[ \t]+ {} -\n { return yytext[0]; } -. { printf("FEHLER: %s\n", yytext); } +[0-9]+ { yylval = atoi(yytext); return DIGIT; } +[a-zA-Z] { yylval = yytext[0]; return LETTER; } +"+" { return PLUS; } +"-" { return MINUS; } +"*" { return MUL; } +"/" { return DIV; } +"("|")"|"=" { return yytext[0]; } +[ \t]+ {} +\n { return yytext[0]; } +. { printf("FEHLER: %s\n", yytext); } %%