From 144d709c0232904802d31c8af5ca9f4047ccdb29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Dybiec?= Date: Thu, 8 Nov 2018 19:07:17 +0100 Subject: Add bool expressions, fixed ambiguity with EOF --- source/mod_student/parser.mly | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/mod_student/parser.mly b/source/mod_student/parser.mly index 7f9174a..ab095ef 100644 --- a/source/mod_student/parser.mly +++ b/source/mod_student/parser.mly @@ -61,8 +61,6 @@ let mkTag = file: | declarations= list(func) EOF { ModuleDefinition {global_declarations=declarations } } - | EOF - { ModuleDefinition {global_declarations=[] } } func: | id=identifier LPAREN parameters=separated_list(COMMA,var_decl) RPAREN return=return_type body=option(statement_block) @@ -159,6 +157,7 @@ expression_base: | node=expression_integer { node } | node=expression_char { node } | node=expression_string { node } + | node=expression_bool { node } | node=expression_struct { node } | LPAREN node=expression RPAREN { node } expression_identifier: -- cgit v1.2.3