diff options
author | Jakob Kaivo <jkk@ung.org> | 2022-04-17 16:05:44 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2022-04-17 16:05:44 -0400 |
commit | f5ae2c192f81b4a4ac84cf709b04faaf4d3be283 (patch) | |
tree | 047a229d881aa7c0580d802527b4b1a5d490f84d | |
parent | fa9b85bde197117bea8731f0e49779e92ae86872 (diff) |
print single input expressions
-rw-r--r-- | expr.y | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -19,8 +19,6 @@ static char **expr_args; #define YYSTYPE expr_yystype -//#include "y.tab.h" - static int yylex(void); static int yyerror(const char *s); static void expr_only_integers(YYSTYPE *y1, YYSTYPE *y2); @@ -43,9 +41,11 @@ static int expr_compare(YYSTYPE *y1, YYSTYPE *y2); %% expr : STRING { + printf("%s\n", $1.u.s); } | INTEGER { + printf("%d\n", $1.u.i); } | '(' expr ')' { |