diff options
author | Paweł Dybiec <pdybiec@stud.cs.uni.wroc.pl> | 2018-11-08 19:07:17 +0100 |
---|---|---|
committer | Paweł Dybiec <pdybiec@stud.cs.uni.wroc.pl> | 2018-11-08 19:07:17 +0100 |
commit | 144d709c0232904802d31c8af5ca9f4047ccdb29 (patch) | |
tree | c9630a77877fca49d5732c9a9a7ae25930bd4d09 | |
parent | Fix string lexing (diff) |
Add bool expressions, fixed ambiguity with EOF
-rw-r--r-- | source/mod_student/parser.mly | 3 |
1 files changed, 1 insertions, 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: |