summaryrefslogtreecommitdiff
path: root/src/parser/cvc/Cvc.g
diff options
context:
space:
mode:
authorajreynol <andrew.j.reynolds@gmail.com>2016-11-01 13:33:38 -0500
committerajreynol <andrew.j.reynolds@gmail.com>2016-11-01 13:33:38 -0500
commitf4c783f97201753bf63c70c5c16b7861a236d57c (patch)
tree8e4a9e85d7485200bdfb52b5afc5032993938488 /src/parser/cvc/Cvc.g
parent8e0fce94790249ff7aff84ff4500bb96e2ebb9e9 (diff)
Revert change to datatypes API for passing pointers, instead make deep copy during call to mkMutualDatatypes.
Diffstat (limited to 'src/parser/cvc/Cvc.g')
-rw-r--r--src/parser/cvc/Cvc.g10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/parser/cvc/Cvc.g b/src/parser/cvc/Cvc.g
index 7ca6beb60..8c5d97254 100644
--- a/src/parser/cvc/Cvc.g
+++ b/src/parser/cvc/Cvc.g
@@ -708,7 +708,7 @@ mainCommand[CVC4::Command*& cmd]
SExpr sexpr;
std::string id;
Type t;
- std::vector<CVC4::Datatype*> dts;
+ std::vector<CVC4::Datatype> dts;
Debug("parser-extra") << "command: " << AntlrInput::tokenText(LT(1)) << std::endl;
std::string s;
}
@@ -2175,7 +2175,7 @@ iteElseTerm[CVC4::Expr& f]
/**
* Parses a datatype definition
*/
-datatypeDef[std::vector<CVC4::Datatype*>& datatypes]
+datatypeDef[std::vector<CVC4::Datatype>& datatypes]
@init {
std::string id, id2;
Type t;
@@ -2195,7 +2195,7 @@ datatypeDef[std::vector<CVC4::Datatype*>& datatypes]
params.push_back( t ); }
)* RBRACKET
)?
- { datatypes.push_back(new Datatype(id, params, false));
+ { datatypes.push_back(Datatype(id, params, false));
if(!PARSER_STATE->isUnresolvedType(id)) {
// if not unresolved, must be undeclared
PARSER_STATE->checkDeclaration(id, CHECK_UNDECLARED, SYM_SORT);
@@ -2209,7 +2209,7 @@ datatypeDef[std::vector<CVC4::Datatype*>& datatypes]
/**
* Parses a constructor defintion for type
*/
-constructorDef[CVC4::Datatype*& type]
+constructorDef[CVC4::Datatype& type]
@init {
std::string id;
CVC4::DatatypeConstructor* ctor = NULL;
@@ -2227,7 +2227,7 @@ constructorDef[CVC4::Datatype*& type]
RPAREN
)?
{ // make the constructor
- type->addConstructor(*ctor);
+ type.addConstructor(*ctor);
Debug("parser-idt") << "constructor: " << id.c_str() << std::endl;
delete ctor;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback