00001 #ifndef INC_KIFParser_hpp_ 00002 #define INC_KIFParser_hpp_ 00003 00004 #include "antlr/config.hpp" 00005 /* $ANTLR 2.7.1: "KIF.g" -> "KIFParser.hpp"$ */ 00006 #include "antlr/TokenStream.hpp" 00007 #include "antlr/TokenBuffer.hpp" 00008 #include "KIFLexerTokenTypes.hpp" 00009 #include "antlr/LLkParser.hpp" 00010 00011 #line 20 "KIF.g" 00012 00013 // head of lexer file 00014 #include <iostream> 00015 #include "Formula.hpp" 00016 00017 #line 18 "KIFParser.hpp" 00018 class KIFParser : public ANTLR_USE_NAMESPACE(antlr)LLkParser, public KIFLexerTokenTypes 00019 { 00020 #line 162 "KIF.g" 00021 00022 #line 22 "KIFParser.hpp" 00023 protected: 00024 KIFParser(ANTLR_USE_NAMESPACE(antlr)TokenBuffer& tokenBuf, int k); 00025 public: 00026 KIFParser(ANTLR_USE_NAMESPACE(antlr)TokenBuffer& tokenBuf); 00027 protected: 00028 KIFParser(ANTLR_USE_NAMESPACE(antlr)TokenStream& lexer, int k); 00029 public: 00030 KIFParser(ANTLR_USE_NAMESPACE(antlr)TokenStream& lexer); 00031 KIFParser(const ANTLR_USE_NAMESPACE(antlr)ParserSharedInputState& state); 00032 public: void start( 00033 FormulaList& formulas 00034 ); 00035 public: void sentence( 00036 Formula& f 00037 ); 00038 public: void term( 00039 Term& t 00040 ); 00041 public: Var variable(); 00042 public: void funterm( 00043 Term& t 00044 ); 00045 public: void quoted_term( 00046 Term& t 00047 ); 00048 public: void kw_and(); 00049 public: void kw_or(); 00050 public: void kw_not(); 00051 public: void kw_forall(); 00052 public: void kw_exists(); 00053 public: void kw_equal(); 00054 public: void term_plus( 00055 TermList& ts 00056 ); 00057 public: Formula::Connective binary_connective(); 00058 public: Signature::Fun* binary_connective_fun(); 00059 public: Formula::Connective junction(); 00060 public: Formula::Connective quantifier(); 00061 public: Signature::Fun* quantifier_fun(); 00062 public: void term_sentence( 00063 Term& t 00064 ); 00065 public: void equation( 00066 Atom& a 00067 ); 00068 public: void inequality( 00069 Atom& a 00070 ); 00071 public: void relsent( 00072 Atom& a 00073 ); 00074 public: void sentence_plus( 00075 FormulaList& fs 00076 ); 00077 public: void variable_plus( 00078 VarList& ws 00079 ); 00080 public: void term_equation( 00081 Term& t 00082 ); 00083 public: void term_inequality( 00084 Term& t 00085 ); 00086 public: void term_sentence_plus( 00087 TermList& ts 00088 ); 00089 public: Signature::Pred* binary_comparison(); 00090 public: Signature::Fun* binary_comparison_fun(); 00091 private: 00092 static const char* _tokenNames[]; 00093 00094 static const unsigned long _tokenSet_0_data_[]; 00095 static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_0; 00096 static const unsigned long _tokenSet_1_data_[]; 00097 static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_1; 00098 }; 00099 00100 #endif /*INC_KIFParser_hpp_*/