From 53314c2c0ce2d5fba997d59f5d667e52debab725 Mon Sep 17 00:00:00 2001 From: Christian Rinderknecht Date: Mon, 10 Jun 2019 15:19:42 +0200 Subject: [PATCH] Removed "assert" as reserved. Enabled terminating ";" in lists. --- .gitignore | 1 + src/parser/ligodity/Lexer.mll | 2 +- src/parser/ligodity/Parser.mly | 12 +++++++----- src/parser/ligodity/Version.ml | 1 - 4 files changed, 9 insertions(+), 7 deletions(-) delete mode 100644 src/parser/ligodity/Version.ml diff --git a/.gitignore b/.gitignore index 7483d1710..065477ab1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /dune-project *~ cache/* +Version.ml diff --git a/src/parser/ligodity/Lexer.mll b/src/parser/ligodity/Lexer.mll index 85ae4db48..9c2274f36 100644 --- a/src/parser/ligodity/Lexer.mll +++ b/src/parser/ligodity/Lexer.mll @@ -104,7 +104,7 @@ let keywords = Token.[ "and", None; "as", None; "asr", None; - "assert", None; + (* "assert", None;*) "class", None; "constraint", None; "do", None; diff --git a/src/parser/ligodity/Parser.mly b/src/parser/ligodity/Parser.mly index 76267b6d3..b21f4f1ec 100644 --- a/src/parser/ligodity/Parser.mly +++ b/src/parser/ligodity/Parser.mly @@ -179,11 +179,13 @@ tuple(item): (* Possibly empty semicolon-separated values between brackets *) list_of(item): - lbracket sepseq(item,semi) rbracket { - {opening = LBracket $1; - elements = $2; - terminator = None; - closing = RBracket $3} } + lbracket sep_or_term_list(item,semi) rbracket { + let elements, terminator = $2 in { + opening = LBracket $1; + elements = Some elements; + terminator; + closing = RBracket $3} + } (* Main *) diff --git a/src/parser/ligodity/Version.ml b/src/parser/ligodity/Version.ml deleted file mode 100644 index d89964cb1..000000000 --- a/src/parser/ligodity/Version.ml +++ /dev/null @@ -1 +0,0 @@ -let version = "UNKNOWN"