Removing an unused member from Tptp. Initializing members of Tptp. (#1326)
authorTim King <taking@cs.nyu.edu>
Tue, 7 Nov 2017 18:35:42 +0000 (10:35 -0800)
committerAndrew Reynolds <andrew.j.reynolds@gmail.com>
Tue, 7 Nov 2017 18:35:42 +0000 (12:35 -0600)
* Removing an unused member from Tptp. Initializing members of Tptp.

* Removing delcaration for myPopCharStream.

src/parser/tptp/tptp.cpp
src/parser/tptp/tptp.h

index e49315609a24aa5109fd32509a182b17734b8f5f..af675dec13abff7191a67df54381c19a8355737c 100644 (file)
 namespace CVC4 {
 namespace parser {
 
-Tptp::Tptp(ExprManager* exprManager, Input* input, bool strictMode, bool parseOnly) :
-  Parser(exprManager,input,strictMode,parseOnly) {
+Tptp::Tptp(ExprManager* exprManager, Input* input, bool strictMode,
+           bool parseOnly)
+    : Parser(exprManager, input, strictMode, parseOnly),
+      d_cnf(false),
+      d_fof(false) {
   addTheory(Tptp::THEORY_CORE);
 
   /* Try to find TPTP dir */
@@ -135,14 +138,6 @@ bool newInputStream(std::string fileName, pANTLR3_LEXER lexer, std::vector< pANT
   return true;
 }
 
-/* overridden popCharStream for the lexer - necessary if we had symbol
- * filtering in file inclusion.
-void Tptp::myPopCharStream(pANTLR3_LEXER lexer) {
-  ((Tptp*)lexer->super)->d_oldPopCharStream(lexer);
-  ((Tptp*)lexer->super)->popScope();
-}
-*/
-
 void Tptp::includeFile(std::string fileName) {
   // security for online version
   if(!canIncludeFile()) {
@@ -153,15 +148,6 @@ void Tptp::includeFile(std::string fileName) {
   AntlrInput * ai = static_cast<AntlrInput *>(getInput());
   pANTLR3_LEXER lexer = ai->getAntlr3Lexer();
 
-  // set up popCharStream - would be necessary for handling symbol
-  // filtering in inclusions
-  /*
-  if(d_oldPopCharStream == NULL) {
-    d_oldPopCharStream = lexer->popCharStream;
-    lexer->popCharStream = myPopCharStream;
-  }
-  */
-
   // push the inclusion scope; will be popped by our special popCharStream
   // would be necessary for handling symbol filtering in inclusions
   //pushScope();
index 1cc9c2d7f4097fbae1fa70ba708776ebf9f02072..c955d152e190f26186ef02984daec05ccf12b29a 100644 (file)
@@ -146,9 +146,6 @@ class Tptp : public Parser {
 
   bool d_cnf; // in a cnf formula
   bool d_fof; // in an fof formula
-
-  static void myPopCharStream(pANTLR3_LEXER lexer);
-  void (*d_oldPopCharStream)(pANTLR3_LEXER);
 };/* class Tptp */