From 80798a4925e04d2da1b5bb6f80d66ec6bcd19ea7 Mon Sep 17 00:00:00 2001 From: vijay_ganesh Date: Fri, 2 Oct 2009 22:27:30 +0000 Subject: [PATCH] removed symbol table from AST git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@275 e59a4935-1847-0410-ae03-e826735625c1 --- src/AST/AST.h | 3 --- src/parser/CVC.lex | 2 +- src/parser/CVC.y | 41 +++++++++++++++++++++-------------------- src/parser/parser.h | 19 +++++++++++++++++++ src/parser/smtlib.lex | 2 +- src/parser/smtlib.y | 3 ++- 6 files changed, 44 insertions(+), 26 deletions(-) create mode 100644 src/parser/parser.h diff --git a/src/AST/AST.h b/src/AST/AST.h index c73525d..d305ff1 100644 --- a/src/AST/AST.h +++ b/src/AST/AST.h @@ -59,9 +59,6 @@ namespace BEEV ASTNode::ASTNodeHasher, ASTNode::ASTNodeEqual> ASTNodeMultiSet; - //external parser table for declared symbols. - //FIXME: move to a more appropriate place - extern ASTNodeSet _parser_symbol_table; /*************************************************************************** * Class BeevMgr. This holds all "global" variables for the system, such as diff --git a/src/parser/CVC.lex b/src/parser/CVC.lex index 30954d7..594a19a 100644 --- a/src/parser/CVC.lex +++ b/src/parser/CVC.lex @@ -8,7 +8,7 @@ ********************************************************************/ #include -#include "../AST/AST.h" +#include "parser.h" #include "parseCVC_defs.h" using namespace std; diff --git a/src/parser/CVC.y b/src/parser/CVC.y index 96ab730..90cdae1 100644 --- a/src/parser/CVC.y +++ b/src/parser/CVC.y @@ -1,21 +1,22 @@ %{ -/******************************************************************** - * AUTHORS: Vijay Ganesh - * - * BEGIN DATE: November, 2005 - * - * LICENSE: Please view LICENSE file in the home dir of this Program - ********************************************************************/ -// -*- c++ -*- - -#include "../AST/AST.h" + // -*- c++ -*- + /******************************************************************** + * AUTHORS: Vijay Ganesh + * + * BEGIN DATE: November, 2005 + * + * LICENSE: Please view LICENSE file in the home dir of this Program + ********************************************************************/ + +#include "parser.h" + using namespace std; using namespace BEEV; // Suppress the bogus warning suppression in bison (it generates // compile error) #undef __GNUC_MINOR__ - + #define YYLTYPE_IS_TRIVIAL 1 #define YYMAXDEPTH 10485760 #define YYERROR_VERBOSE 1 @@ -23,15 +24,15 @@ #define YYPARSE_PARAM AssertsQuery - extern int cvclex(void); - extern char* yytext; - extern int cvclineno; - int yyerror(const char *s) { - cout << "syntax error: line " << cvclineno << "\n" << s << endl; - FatalError(""); - return YY_EXIT_FAILURE; - }; -%} + extern int cvclex(void); + extern char* yytext; + extern int cvclineno; + int yyerror(const char *s) { + cout << "syntax error: line " << cvclineno << "\n" << s << endl; + FatalError(""); + return YY_EXIT_FAILURE; + }; + %} %union { diff --git a/src/parser/parser.h b/src/parser/parser.h new file mode 100644 index 0000000..1f4cdf8 --- /dev/null +++ b/src/parser/parser.h @@ -0,0 +1,19 @@ +// -*- c++ -*- +/******************************************************************** + * AUTHORS: Vijay Ganesh + * + * BEGIN DATE: November, 2005 + * + * LICENSE: Please view LICENSE file in the home dir of this Program + ********************************************************************/ + +#ifndef PARSER_H +#define PARSER_H +#include "../AST/AST.h" +namespace BEEV +{ + //external parser table for declared symbols. + extern ASTNodeSet _parser_symbol_table; + +}; //end of namespace +#endif diff --git a/src/parser/smtlib.lex b/src/parser/smtlib.lex index 4544673..171cf24 100644 --- a/src/parser/smtlib.lex +++ b/src/parser/smtlib.lex @@ -34,7 +34,7 @@ ********************************************************************/ // -*- c++ -*- #include -#include "../AST/AST.h" +#include "parser.h" #include "parseSMT_defs.h" using namespace std; diff --git a/src/parser/smtlib.y b/src/parser/smtlib.y index 964ef6f..e532eba 100644 --- a/src/parser/smtlib.y +++ b/src/parser/smtlib.y @@ -35,7 +35,8 @@ ********************************************************************/ // -*- c++ -*- -#include "../AST/AST.h" +#include "parser.h" + using namespace std; using namespace BEEV; -- 2.47.3