PARENHASH = '(#';
HASHPAREN = '#)';
- DOT = '.';
+ //DOT = '.';
DOTDOT = '..';
// Operators
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;
}
/* record / tuple select */
- | DOT
+ /*| DOT
( identifier[id,CHECK_NONE,SYM_VARIABLE]
{ UNSUPPORTED("record select not implemented yet");
f = Expr(); }
// 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]?
;
/* 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
/**
* Matches a decimal literal.
*/
-decimal_literal returns [CVC4::Rational r]
- : k=(INTEGER_LITERAL '.' DIGIT+)
- { $r = AntlrInput::tokenToRational($k); }
+DECIMAL_LITERAL
+ : INTEGER_LITERAL '.' DIGIT+
;
/**
tryGoodInput("a : INT = 5; a: INT;"); // decl after define, compatible
tryGoodInput("a : TYPE; a : INT;"); // ok, sort and variable symbol spaces distinct
tryGoodInput("a : TYPE; a : INT; b : a;"); // ok except a is both INT and sort `a'
- tryGoodInput("a : [0..0]; b : [-5..5]; c : [-1..1]; d : [ _ .._];"); // subranges
+ //tryGoodInput("a : [0..0]; b : [-5..5]; c : [-1..1]; d : [ _ .._];"); // subranges
tryGoodInput("a : [ _..1]; b : [_.. 0]; c :[_..-1];");
tryGoodInput("DATATYPE list = nil | cons(car:INT,cdr:list) END; DATATYPE cons = null END;");
tryGoodInput("DATATYPE tree = node(data:list), list = cons(car:tree,cdr:list) END;");