From: Siraaj Khandkar Date: Sun, 16 Sep 2018 23:36:51 +0000 (-0400) Subject: Fix grammar - allow empty set of record fields X-Git-Url: https://git.xandkar.net/?p=tiger.ml.git;a=commitdiff_plain;h=5064180424a02cd59491bc87a43175fbf04d147c Fix grammar - allow empty set of record fields --- diff --git a/compiler/src/lib/tiger/tiger_parser.mly b/compiler/src/lib/tiger/tiger_parser.mly index b40892a..42470a4 100644 --- a/compiler/src/lib/tiger/tiger_parser.mly +++ b/compiler/src/lib/tiger/tiger_parser.mly @@ -312,6 +312,7 @@ exps: ; rec_fields_bind: + | { [] } | ID EQ exp { (Sym.of_string $1, $3, pos ()) :: [] } | ID EQ exp COMMA rec_fields_bind { (Sym.of_string $1, $3, pos ()) :: $5 } ;