diff options
author | Jakob Kaivo <jkk@ung.org> | 2022-04-17 15:21:23 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2022-04-17 15:21:23 -0400 |
commit | 785f598db1da0406416cd6f184d929112bdd0e80 (patch) | |
tree | 8f3130ea7b0de58ad499b3e35a0b168171b3d4cb /expr.l | |
parent | 1139f76e87b33301ac3eb597bef408e3b2bf6025 (diff) |
now multiplicationish things
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; } |