diff options
Diffstat (limited to 'expr.l')
-rw-r--r-- | expr.l | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -17,22 +17,22 @@ DIGIT [0-9] %% -"|" return OR; -"&" return AND; -"=" return COMPARISON; -">" return COMPARISON; -">=" return COMPARISON; -"<" return COMPARISON; -"<=" return COMPARISON; -"!=" return COMPARISON; +"|" return '|'; +"&" return '&'; +"=" return '='; +">" return '>'; +">=" return GE; +"<" return '<'; +"<=" return LE; +"!=" return NE; "+" return '+'; -"-" return '-';; -"*" return MULTIPLICATION; -"/" return MULTIPLICATION; -"%" return MULTIPLICATION; +"-" return '-'; +"*" return '*'; +"/" return '/'; +"%" return '%'; "(" return '('; ")" return ')'; -":" return MATCH; +":" return ':'; {DIGIT}+ { yylval.u.i = atoi(yytext); return yylval.type = INTEGER; } -{DIGIT}+ { yylval.u.i = atoi(yytext); return yylval.type = INTEGER; } .+ { yylval.u.s = strdup(yytext); return yylval.type = STRING; } |