Clean up semantic rules.

This commit is contained in:
Stefano Sanfilippo 2014-11-23 19:20:10 +01:00
parent 573a94def6
commit c7fec8c9e0

View File

@ -36,7 +36,6 @@ extern void emit(const char *, ...);
%start program
%type<strval> expression;
%type<intval> NUMBER;
%type<floatval> FLOAT;
%type<strval> ID;
@ -121,14 +120,10 @@ fun_call:
FUNCALL ID args | FUNCALL ID
;
abort_stmt:
ABORT {
emit("exit(1);\n");
}
ABORT
;
assert_stmt:
ASSERT_BEGIN expression ASSERT_END {
emit("assert(", $2, ");\n");
}
ASSERT_BEGIN expression ASSERT_END
;
expression:
numeric |