12345678910111213141516171819202122232425 |
- %{
- // HEADERS
- #include <stdlib.h>
- #include "parser.h"
- // variables maintained by the lexical analyser
- int yyline = 1;
- %}
- %option noyywrap
- %%
- [ \t]+ { }
- #.*\n { yyline++; }
- \n { yyline++; }
- \-?[0-9]+ {
- yylval.intValue = atoi(yytext);
- return INT;
- }
- "+" { return PLUS; }
- . { yyerror("unexpected character"); }
- %%
|