| 1 | 
tim | 
770 | 
#ifndef INC_MDTreeParser_hpp_ | 
| 2 | 
  | 
  | 
#define INC_MDTreeParser_hpp_ | 
| 3 | 
  | 
  | 
 | 
| 4 | 
  | 
  | 
#include <antlr/config.hpp> | 
| 5 | 
  | 
  | 
#include "MDTreeParserTokenTypes.hpp" | 
| 6 | 
gezelter | 
2040 | 
/* $ANTLR 2.7.7 (20141024): "MDTreeParser.g" -> "MDTreeParser.hpp"$ */ | 
| 7 | 
tim | 
770 | 
#include <antlr/TreeParser.hpp> | 
| 8 | 
  | 
  | 
 | 
| 9 | 
  | 
  | 
#line 2 "MDTreeParser.g" | 
| 10 | 
  | 
  | 
 | 
| 11 | 
  | 
  | 
#include <stack>
 | 
| 12 | 
  | 
  | 
#include "io/Globals.hpp"
 | 
| 13 | 
  | 
  | 
#include "utils/StringUtils.hpp"
 | 
| 14 | 
  | 
  | 
using namespace std;
 | 
| 15 | 
gezelter | 
1390 | 
using namespace OpenMD;
 | 
| 16 | 
tim | 
770 | 
 | 
| 17 | 
  | 
  | 
#line 18 "MDTreeParser.hpp" | 
| 18 | 
  | 
  | 
class CUSTOM_API MDTreeParser : public ANTLR_USE_NAMESPACE(antlr)TreeParser, public MDTreeParserTokenTypes | 
| 19 | 
  | 
  | 
{ | 
| 20 | 
  | 
  | 
#line 21 "MDTreeParser.g" | 
| 21 | 
  | 
  | 
 | 
| 22 | 
  | 
  | 
  public:
 | 
| 23 | 
  | 
  | 
    Globals* walkTree(ANTLR_USE_NAMESPACE(antlr)RefAST tree)
 | 
| 24 | 
  | 
  | 
    {
 | 
| 25 | 
  | 
  | 
      currConf = new Globals;
 | 
| 26 | 
  | 
  | 
      blockStack.push(currConf);
 | 
| 27 | 
  | 
  | 
      mdfile(tree);
 | 
| 28 | 
  | 
  | 
      return currConf;
 | 
| 29 | 
  | 
  | 
    }
 | 
| 30 | 
  | 
  | 
  private:
 | 
| 31 | 
  | 
  | 
    Globals* currConf;
 | 
| 32 | 
  | 
  | 
    stack<DataHolder*> blockStack;    
 | 
| 33 | 
  | 
  | 
#line 22 "MDTreeParser.hpp" | 
| 34 | 
  | 
  | 
public: | 
| 35 | 
  | 
  | 
        MDTreeParser(); | 
| 36 | 
  | 
  | 
        static void initializeASTFactory( ANTLR_USE_NAMESPACE(antlr)ASTFactory& factory ); | 
| 37 | 
  | 
  | 
        int getNumTokens() const | 
| 38 | 
  | 
  | 
        { | 
| 39 | 
  | 
  | 
                return MDTreeParser::NUM_TOKENS; | 
| 40 | 
  | 
  | 
        } | 
| 41 | 
  | 
  | 
        const char* getTokenName( int type ) const | 
| 42 | 
  | 
  | 
        { | 
| 43 | 
  | 
  | 
                if( type > getNumTokens() ) return 0; | 
| 44 | 
  | 
  | 
                return MDTreeParser::tokenNames[type]; | 
| 45 | 
  | 
  | 
        } | 
| 46 | 
  | 
  | 
        const char* const* getTokenNames() const | 
| 47 | 
  | 
  | 
        { | 
| 48 | 
  | 
  | 
                return MDTreeParser::tokenNames; | 
| 49 | 
  | 
  | 
        } | 
| 50 | 
  | 
  | 
        public: void mdfile(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 51 | 
  | 
  | 
        public: void statement(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 52 | 
  | 
  | 
        public: void assignment(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 53 | 
  | 
  | 
        public: void componentblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 54 | 
  | 
  | 
        public: void moleculeblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 55 | 
  | 
  | 
        public: void zconstraintblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 56 | 
cli2 | 
1360 | 
        public: void restraintblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 57 | 
gezelter | 
1782 | 
        public: void flucqblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 58 | 
  | 
  | 
        public: void rnemdblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 59 | 
  | 
  | 
        public: void minimizerblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 60 | 
tim | 
770 | 
        public: void constant(ANTLR_USE_NAMESPACE(antlr)RefAST _t, | 
| 61 | 
  | 
  | 
                ANTLR_USE_NAMESPACE(antlr)RefAST id | 
| 62 | 
  | 
  | 
        ); | 
| 63 | 
  | 
  | 
        protected: int  intConst(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 64 | 
tim | 
963 | 
        protected: RealType  floatConst(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 65 | 
gezelter | 
2026 | 
        public: vector<RealType>  doubleNumberTuple(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 66 | 
tim | 
770 | 
        public: void moleculestatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 67 | 
  | 
  | 
        public: void atomblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 68 | 
  | 
  | 
        public: void bondblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 69 | 
  | 
  | 
        public: void bendblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 70 | 
  | 
  | 
        public: void torsionblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 71 | 
cli2 | 
1275 | 
        public: void inversionblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 72 | 
tim | 
770 | 
        public: void rigidbodyblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 73 | 
  | 
  | 
        public: void cutoffgroupblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 74 | 
  | 
  | 
        public: void fragmentblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 75 | 
gezelter | 
1979 | 
        public: void constraintblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 76 | 
tim | 
770 | 
        public: void atomstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 77 | 
  | 
  | 
        public: void bondstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 78 | 
  | 
  | 
        public: vector<int>  inttuple(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 79 | 
  | 
  | 
        public: void bendstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 80 | 
  | 
  | 
        public: void torsionstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 81 | 
cli2 | 
1275 | 
        public: void inversionstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 82 | 
tim | 
770 | 
        public: void rigidbodystatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 83 | 
  | 
  | 
        public: void cutoffgroupstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 84 | 
  | 
  | 
        public: void fragmentstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 85 | 
gezelter | 
1979 | 
        public: void constraintstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 86 | 
gezelter | 
2026 | 
        protected: RealType  doubleNumber(ANTLR_USE_NAMESPACE(antlr)RefAST _t); | 
| 87 | 
tim | 
770 | 
public: | 
| 88 | 
  | 
  | 
        ANTLR_USE_NAMESPACE(antlr)RefAST getAST() | 
| 89 | 
  | 
  | 
        { | 
| 90 | 
  | 
  | 
                return returnAST; | 
| 91 | 
  | 
  | 
        } | 
| 92 | 
  | 
  | 
         | 
| 93 | 
  | 
  | 
protected: | 
| 94 | 
  | 
  | 
        ANTLR_USE_NAMESPACE(antlr)RefAST returnAST; | 
| 95 | 
  | 
  | 
        ANTLR_USE_NAMESPACE(antlr)RefAST _retTree; | 
| 96 | 
  | 
  | 
private: | 
| 97 | 
  | 
  | 
        static const char* tokenNames[]; | 
| 98 | 
  | 
  | 
#ifndef NO_STATIC_CONSTS | 
| 99 | 
gezelter | 
1979 | 
        static const int NUM_TOKENS = 60; | 
| 100 | 
tim | 
770 | 
#else | 
| 101 | 
  | 
  | 
        enum { | 
| 102 | 
gezelter | 
1979 | 
                NUM_TOKENS = 60 | 
| 103 | 
tim | 
770 | 
        }; | 
| 104 | 
  | 
  | 
#endif | 
| 105 | 
  | 
  | 
         | 
| 106 | 
  | 
  | 
        static const unsigned long _tokenSet_0_data_[]; | 
| 107 | 
  | 
  | 
        static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_0; | 
| 108 | 
  | 
  | 
        static const unsigned long _tokenSet_1_data_[]; | 
| 109 | 
  | 
  | 
        static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_1; | 
| 110 | 
  | 
  | 
}; | 
| 111 | 
  | 
  | 
 | 
| 112 | 
  | 
  | 
#endif /*INC_MDTreeParser_hpp_*/ |