From c7fec8c9e06ee501f6c9eb96e1bd0301f8b4b22c Mon Sep 17 00:00:00 2001 From: Stefano Sanfilippo Date: Sun, 23 Nov 2014 19:20:10 +0100 Subject: [PATCH] Clean up semantic rules. --- Monicelli.y | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Monicelli.y b/Monicelli.y index 3f74a1a..7a22ff3 100644 --- a/Monicelli.y +++ b/Monicelli.y @@ -36,7 +36,6 @@ extern void emit(const char *, ...); %start program -%type expression; %type NUMBER; %type FLOAT; %type 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 |