summaryrefslogtreecommitdiff
path: root/src/parser/cvc
diff options
context:
space:
mode:
authorDejan Jovanović <dejan.jovanovic@gmail.com>2009-12-18 19:57:34 +0000
committerDejan Jovanović <dejan.jovanovic@gmail.com>2009-12-18 19:57:34 +0000
commitdeaeed0271fcaa39c071ced30fb21946ca2e6d0f (patch)
tree493c7bb277b40cdee3260ab8bfacd3069b78c078 /src/parser/cvc
parente112de2be02760f66505a09e76269cca272dc988 (diff)
More fixes
Diffstat (limited to 'src/parser/cvc')
-rw-r--r--src/parser/cvc/cvc_lexer.g7
-rw-r--r--src/parser/cvc/cvc_parser.g9
2 files changed, 12 insertions, 4 deletions
diff --git a/src/parser/cvc/cvc_lexer.g b/src/parser/cvc/cvc_lexer.g
index 47cebbbb0..863b15a95 100644
--- a/src/parser/cvc/cvc_lexer.g
+++ b/src/parser/cvc/cvc_lexer.g
@@ -71,6 +71,13 @@ COLON options{ paraphrase = "a colon"; }
;
/**
+ * Matches the 'l'
+ */
+SEMICOLON options{ paraphrase = "a semicolon"; }
+ : ';'
+ ;
+
+/**
* Matches the ','
*/
COMMA options{ paraphrase = "a comma"; }
diff --git a/src/parser/cvc/cvc_parser.g b/src/parser/cvc/cvc_parser.g
index c7f932a0c..a22ce64e7 100644
--- a/src/parser/cvc/cvc_parser.g
+++ b/src/parser/cvc/cvc_parser.g
@@ -54,15 +54,16 @@ command returns [CVC4::Command* cmd = 0]
Expr f;
vector<string> ids;
}
- : ASSERT f = formula { cmd = new AssertCommand(f); }
- | QUERY f = formula { cmd = new QueryCommand(f); }
- | CHECKSAT f = formula { cmd = new CheckSatCommand(f); }
- | CHECKSAT { cmd = new CheckSatCommand(); }
+ : ASSERT f = formula SEMICOLON { cmd = new AssertCommand(f); }
+ | QUERY f = formula SEMICOLON { cmd = new QueryCommand(f); }
+ | CHECKSAT f = formula SEMICOLON { cmd = new CheckSatCommand(f); }
+ | CHECKSAT SEMICOLON { cmd = new CheckSatCommand(); }
| identifierList[ids, CHECK_UNDECLARED] COLON type {
// [chris 12/15/2009] FIXME: decls may not be BOOLEAN
newPredicates(ids);
cmd = new DeclarationCommand(ids);
}
+ SEMICOLON
| EOF
;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback