diff options
Diffstat (limited to 'src/parser/smt2/Smt2.g')
-rw-r--r-- | src/parser/smt2/Smt2.g | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parser/smt2/Smt2.g b/src/parser/smt2/Smt2.g index 740e35ba4..d73a60ed1 100644 --- a/src/parser/smt2/Smt2.g +++ b/src/parser/smt2/Smt2.g @@ -2538,6 +2538,10 @@ indexedFunctionName[CVC4::Expr& op, CVC4::Kind& kind] | FP_TO_SBV_TOK m=INTEGER_LITERAL { op = MK_CONST(FloatingPointToSBV(AntlrInput::tokenToUnsigned($m))); } | TESTER_TOK term[expr, expr2] { + if( expr.getKind()==kind::APPLY_CONSTRUCTOR ){ + //for nullary constructors, must get the operator + expr = expr.getOperator(); + } if( !expr.getType().isConstructor() ){ PARSER_STATE->parseError("Bad syntax for test (_ is X), X must be a constructor."); } |