00001 #ifndef INC_EDIParser_hpp_
00002 #define INC_EDIParser_hpp_
00003
00004 #include <antlr/config.hpp>
00005
00006 #include <antlr/TokenStream.hpp>
00007 #include <antlr/TokenBuffer.hpp>
00008 #include "EDIParserTokenTypes.hpp"
00009 #include <antlr/LLkParser.hpp>
00010
00011 #line 1 "EdiParser2.g"
00012
00013 #include <iostream>
00014 #include "types.h"
00015 #include "CMTDataComp.h"
00016 #include "convert.h"
00017 #include <complex>
00018
00019 #line 20 "EDIParser.hpp"
00020 class CUSTOM_API EDIParser : public antlr::LLkParser, public EDIParserTokenTypes
00021 {
00022 #line 21 "EdiParser2.g"
00023
00024 private:
00025 bool zsection;
00026 bool rsection;
00027 bool isstring;
00028 int nfreq;
00029 double convfactor;
00030 double globalconv;
00031 public:
00032 trealdata frequency;
00033 trealdata rotangles;
00034 CMTDataComp DataXX;
00035 CMTDataComp DataXY;
00036 CMTDataComp DataYX;
00037 CMTDataComp DataYY;
00038 CMTDataComp DataZX;
00039 CMTDataComp DataZY;
00040 double latitude;
00041 double longitude;
00042 double elevation;
00043 double azimuth;
00044 std::string name;
00045 bool tassigned;
00046 bool zassigned;
00047 bool rassigned;
00048 #line 24 "EDIParser.hpp"
00049 public:
00050 void initializeASTFactory( antlr::ASTFactory& factory );
00051 protected:
00052 EDIParser(antlr::TokenBuffer& tokenBuf, int k);
00053 public:
00054 EDIParser(antlr::TokenBuffer& tokenBuf);
00055 protected:
00056 EDIParser(antlr::TokenStream& lexer, int k);
00057 public:
00058 EDIParser(antlr::TokenStream& lexer);
00059 EDIParser(const antlr::ParserSharedInputState& state);
00060 int getNumTokens() const
00061 {
00062 return EDIParser::NUM_TOKENS;
00063 }
00064 const char* getTokenName( int type ) const
00065 {
00066 if( type > getNumTokens() ) return 0;
00067 return EDIParser::tokenNames[type];
00068 }
00069 const char* const* getTokenNames() const
00070 {
00071 return EDIParser::tokenNames;
00072 }
00073 public: void option();
00074 public: double lat_long();
00075 public: double datavalue();
00076 public: void option_list();
00077 public: void head_block();
00078 public: void info_block();
00079 public: void info_text();
00080 public: void emeas_block();
00081 public: void hmeas_block();
00082 public: void def_meas_section();
00083 public: void spectrasect_block();
00084 public: void spectra_block();
00085 public: void spectra_section();
00086 public: void mtsect_block();
00087 public: void mt_complex_data_block();
00088 public: void mt_real_data_block();
00089 public: void mt_section();
00090 public: void end_block();
00091 public: void edi_file();
00092 public:
00093 antlr::RefAST getAST()
00094 {
00095 return returnAST;
00096 }
00097
00098 protected:
00099 antlr::RefAST returnAST;
00100 private:
00101 static const char* tokenNames[];
00102 #ifndef NO_STATIC_CONSTS
00103 static const int NUM_TOKENS = 68;
00104 #else
00105 enum {
00106 NUM_TOKENS = 68
00107 };
00108 #endif
00109
00110 static const unsigned long _tokenSet_0_data_[];
00111 static const antlr::BitSet _tokenSet_0;
00112 static const unsigned long _tokenSet_1_data_[];
00113 static const antlr::BitSet _tokenSet_1;
00114 static const unsigned long _tokenSet_2_data_[];
00115 static const antlr::BitSet _tokenSet_2;
00116 static const unsigned long _tokenSet_3_data_[];
00117 static const antlr::BitSet _tokenSet_3;
00118 static const unsigned long _tokenSet_4_data_[];
00119 static const antlr::BitSet _tokenSet_4;
00120 static const unsigned long _tokenSet_5_data_[];
00121 static const antlr::BitSet _tokenSet_5;
00122 static const unsigned long _tokenSet_6_data_[];
00123 static const antlr::BitSet _tokenSet_6;
00124 static const unsigned long _tokenSet_7_data_[];
00125 static const antlr::BitSet _tokenSet_7;
00126 static const unsigned long _tokenSet_8_data_[];
00127 static const antlr::BitSet _tokenSet_8;
00128 static const unsigned long _tokenSet_9_data_[];
00129 static const antlr::BitSet _tokenSet_9;
00130 static const unsigned long _tokenSet_10_data_[];
00131 static const antlr::BitSet _tokenSet_10;
00132 static const unsigned long _tokenSet_11_data_[];
00133 static const antlr::BitSet _tokenSet_11;
00134 static const unsigned long _tokenSet_12_data_[];
00135 static const antlr::BitSet _tokenSet_12;
00136 static const unsigned long _tokenSet_13_data_[];
00137 static const antlr::BitSet _tokenSet_13;
00138 static const unsigned long _tokenSet_14_data_[];
00139 static const antlr::BitSet _tokenSet_14;
00140 static const unsigned long _tokenSet_15_data_[];
00141 static const antlr::BitSet _tokenSet_15;
00142 static const unsigned long _tokenSet_16_data_[];
00143 static const antlr::BitSet _tokenSet_16;
00144 };
00145
00146 #endif