summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2011-04-23 05:36:09 +0000
committerMorgan Deters <mdeters@gmail.com>2011-04-23 05:36:09 +0000
commite39882bd8a308711135a1ff644293fd9c46e6433 (patch)
treef94afcbe39f500ffe455c8e41c529753c80cc9ed /src
parent57b8c4c8581d2d3ffcf3d3a1bb228271cb4d074a (diff)
fix for parser/tests for ANTLR 3.2 (it was working fine on 3.3)
Diffstat (limited to 'src')
-rw-r--r--src/parser/cvc/Cvc.g15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/parser/cvc/Cvc.g b/src/parser/cvc/Cvc.g
index bd0524f61..d9291c903 100644
--- a/src/parser/cvc/Cvc.g
+++ b/src/parser/cvc/Cvc.g
@@ -131,7 +131,7 @@ tokens {
PARENHASH = '(#';
HASHPAREN = '#)';
- DOT = '.';
+ //DOT = '.';
DOTDOT = '..';
// Operators
@@ -215,7 +215,7 @@ bool isRightToLeft(int type) {
int getOperatorPrecedence(int type) {
switch(type) {
case BITVECTOR_TOK: return 1;
- case DOT:
+ //case DOT:
case LPAREN:
case LBRACE: return 2;
case LBRACKET: return 3;
@@ -1418,7 +1418,7 @@ postfixTerm[CVC4::Expr& f]
}
/* record / tuple select */
- | DOT
+ /*| DOT
( identifier[id,CHECK_NONE,SYM_VARIABLE]
{ UNSUPPORTED("record select not implemented yet");
f = Expr(); }
@@ -1428,7 +1428,7 @@ postfixTerm[CVC4::Expr& f]
// that's ok for now, once a TUPLE_SELECT operator exists,
// that will do any necessary type checking
f = EXPR_MANAGER->mkVar(TupleType(f.getType()).getTypes()[k]); }
- )
+ )*/
)*
typeAscription[f]?
;
@@ -1596,7 +1596,7 @@ simpleTerm[CVC4::Expr& f]
/* syntactic predicate: never match INTEGER.DIGIT as an integer and a dot!
* This is a rational constant! Otherwise the parser interprets it as a tuple
* selector! */
- | (INTEGER_LITERAL DOT DIGIT)=> r=decimal_literal { f = MK_CONST(r); }
+ | DECIMAL_LITERAL { f = MK_CONST(AntlrInput::tokenToRational($DECIMAL_LITERAL)); }
| INTEGER_LITERAL { f = MK_CONST(AntlrInput::tokenToInteger($INTEGER_LITERAL)); }
/* bitvector literals */
| HEX_LITERAL
@@ -1769,9 +1769,8 @@ INTEGER_LITERAL
/**
* Matches a decimal literal.
*/
-decimal_literal returns [CVC4::Rational r]
- : k=(INTEGER_LITERAL '.' DIGIT+)
- { $r = AntlrInput::tokenToRational($k); }
+DECIMAL_LITERAL
+ : INTEGER_LITERAL '.' DIGIT+
;
/**
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback