#include <CCalcRecConfParser.hpp>
Inheritance diagram for CCalcRecConfParser:


Public Member Functions | |
| void | initializeASTFactory (antlr::ASTFactory &factory) |
| CCalcRecConfParser (antlr::TokenBuffer &tokenBuf) | |
| CCalcRecConfParser (antlr::TokenStream &lexer) | |
| CCalcRecConfParser (const antlr::ParserSharedInputState &state) | |
| int | getNumTokens () const |
| const char * | getTokenName (int type) const |
| const char *const * | getTokenNames () const |
| void | configentry () |
| bool | boolvalue () |
| double | numvalue () |
| std::string | stringvalue () |
| void | configfile () |
| antlr::RefAST | getAST () |
Public Attributes | |
| bool | readmodel |
| double | cc |
| double | omega |
| double | sigma |
| int | shift |
| double | beforep |
| double | befores |
| std::string | recmethod |
Protected Member Functions | |
| CCalcRecConfParser (antlr::TokenBuffer &tokenBuf, int k) | |
| CCalcRecConfParser (antlr::TokenStream &lexer, int k) | |
Protected Attributes | |
| antlr::RefAST | returnAST |
Definition at line 18 of file CCalcRecConfParser.hpp.
| CCalcRecConfParser::CCalcRecConfParser | ( | antlr::TokenBuffer & | tokenBuf, | |
| int | k | |||
| ) | [protected] |
| CCalcRecConfParser::CCalcRecConfParser | ( | antlr::TokenBuffer & | tokenBuf | ) |
| CCalcRecConfParser::CCalcRecConfParser | ( | antlr::TokenStream & | lexer, | |
| int | k | |||
| ) | [protected] |
| CCalcRecConfParser::CCalcRecConfParser | ( | antlr::TokenStream & | lexer | ) |
| CCalcRecConfParser::CCalcRecConfParser | ( | const antlr::ParserSharedInputState & | state | ) |
| void CCalcRecConfParser::initializeASTFactory | ( | antlr::ASTFactory & | factory | ) |
| int CCalcRecConfParser::getNumTokens | ( | ) | const [inline] |
| const char* CCalcRecConfParser::getTokenName | ( | int | type | ) | const [inline] |
Definition at line 49 of file CCalcRecConfParser.hpp.
00050 { 00051 if( type > getNumTokens() ) return 0; 00052 return CCalcRecConfParser::tokenNames[type]; 00053 }
| const char* const* CCalcRecConfParser::getTokenNames | ( | ) | const [inline] |
| void CCalcRecConfParser::configentry | ( | ) |
Definition at line 33 of file CCalcRecConfParser.cpp.
References beforep, BEFOREPT, befores, BEFOREST, boolvalue(), cc, CCT, EQUAL, numvalue(), omega, OMEGAT, readmodel, READMODELT, recmethod, RECMETHODT, shift, SHIFTT, sigma, SIGMAT, and stringvalue().
Referenced by configfile().
00033 { 00034 00035 try { // for error handling 00036 { 00037 switch ( LA(1)) { 00038 case READMODELT: 00039 { 00040 match(READMODELT); 00041 match(EQUAL); 00042 readmodel=boolvalue(); 00043 break; 00044 } 00045 case CCT: 00046 { 00047 match(CCT); 00048 match(EQUAL); 00049 cc=numvalue(); 00050 break; 00051 } 00052 case OMEGAT: 00053 { 00054 match(OMEGAT); 00055 match(EQUAL); 00056 omega=numvalue(); 00057 break; 00058 } 00059 case SIGMAT: 00060 { 00061 match(SIGMAT); 00062 match(EQUAL); 00063 sigma=numvalue(); 00064 break; 00065 } 00066 case SHIFTT: 00067 { 00068 match(SHIFTT); 00069 match(EQUAL); 00070 shift=numvalue(); 00071 break; 00072 } 00073 case BEFOREPT: 00074 { 00075 match(BEFOREPT); 00076 match(EQUAL); 00077 beforep=numvalue(); 00078 break; 00079 } 00080 case BEFOREST: 00081 { 00082 match(BEFOREST); 00083 match(EQUAL); 00084 befores=numvalue(); 00085 break; 00086 } 00087 case RECMETHODT: 00088 { 00089 match(RECMETHODT); 00090 match(EQUAL); 00091 recmethod=stringvalue(); 00092 break; 00093 } 00094 default: 00095 { 00096 throw antlr::NoViableAltException(LT(1), getFilename()); 00097 } 00098 } 00099 } 00100 } 00101 catch (antlr::RecognitionException& ex) { 00102 if( inputState->guessing == 0 ) { 00103 reportError(ex); 00104 recover(ex,_tokenSet_0); 00105 } else { 00106 throw; 00107 } 00108 } 00109 }
Here is the call graph for this function:

| bool CCalcRecConfParser::boolvalue | ( | ) |
Definition at line 111 of file CCalcRecConfParser.cpp.
Referenced by configentry().
00111 { 00112 #line 53 "CCalcRecConf.g" 00113 bool r; 00114 #line 115 "CCalcRecConfParser.cpp" 00115 00116 try { // for error handling 00117 { 00118 switch ( LA(1)) { 00119 case TRUE: 00120 { 00121 match(TRUE); 00122 if ( inputState->guessing==0 ) { 00123 #line 54 "CCalcRecConf.g" 00124 r = true; 00125 #line 126 "CCalcRecConfParser.cpp" 00126 } 00127 break; 00128 } 00129 case FALSE: 00130 { 00131 match(FALSE); 00132 if ( inputState->guessing==0 ) { 00133 #line 54 "CCalcRecConf.g" 00134 r = false; 00135 #line 136 "CCalcRecConfParser.cpp" 00136 } 00137 break; 00138 } 00139 default: 00140 { 00141 throw antlr::NoViableAltException(LT(1), getFilename()); 00142 } 00143 } 00144 } 00145 } 00146 catch (antlr::RecognitionException& ex) { 00147 if( inputState->guessing == 0 ) { 00148 reportError(ex); 00149 recover(ex,_tokenSet_0); 00150 } else { 00151 throw; 00152 } 00153 } 00154 return r; 00155 }
| double CCalcRecConfParser::numvalue | ( | ) |
Definition at line 157 of file CCalcRecConfParser.cpp.
References NUMBER.
Referenced by configentry().
00157 { 00158 #line 49 "CCalcRecConf.g" 00159 double r; 00160 #line 161 "CCalcRecConfParser.cpp" 00161 antlr::RefToken currvalue = antlr::nullToken; 00162 00163 try { // for error handling 00164 currvalue = LT(1); 00165 match(NUMBER); 00166 if ( inputState->guessing==0 ) { 00167 #line 50 "CCalcRecConf.g" 00168 r = atof(currvalue->getText().c_str()); 00169 #line 170 "CCalcRecConfParser.cpp" 00170 } 00171 } 00172 catch (antlr::RecognitionException& ex) { 00173 if( inputState->guessing == 0 ) { 00174 reportError(ex); 00175 recover(ex,_tokenSet_0); 00176 } else { 00177 throw; 00178 } 00179 } 00180 return r; 00181 }
| std::string CCalcRecConfParser::stringvalue | ( | ) |
Definition at line 183 of file CCalcRecConfParser.cpp.
References STRING.
Referenced by configentry().
00183 { 00184 #line 57 "CCalcRecConf.g" 00185 std::string r; 00186 #line 187 "CCalcRecConfParser.cpp" 00187 antlr::RefToken currvalue = antlr::nullToken; 00188 00189 try { // for error handling 00190 currvalue = LT(1); 00191 match(STRING); 00192 if ( inputState->guessing==0 ) { 00193 #line 58 "CCalcRecConf.g" 00194 r = currvalue->getText(); 00195 #line 196 "CCalcRecConfParser.cpp" 00196 } 00197 } 00198 catch (antlr::RecognitionException& ex) { 00199 if( inputState->guessing == 0 ) { 00200 reportError(ex); 00201 recover(ex,_tokenSet_0); 00202 } else { 00203 throw; 00204 } 00205 } 00206 return r; 00207 }
| void CCalcRecConfParser::configfile | ( | ) |
Definition at line 209 of file CCalcRecConfParser.cpp.
References COMMENT, configentry(), and EQUAL.
Referenced by CCalcRecConf::GetData().
00209 { 00210 #line 44 "CCalcRecConf.g" 00211 00212 00213 #line 214 "CCalcRecConfParser.cpp" 00214 00215 try { // for error handling 00216 { // ( ... )+ 00217 int _cnt36=0; 00218 for (;;) { 00219 if ((_tokenSet_1.member(LA(1)))) { 00220 configentry(); 00221 { 00222 if ((LA(1) == COMMENT) && (_tokenSet_0.member(LA(2))) && (LA(3) == antlr::Token::EOF_TYPE || LA(3) == EQUAL || LA(3) == COMMENT) && (_tokenSet_2.member(LA(4))) && (_tokenSet_0.member(LA(5))) && (_tokenSet_3.member(LA(6))) && (_tokenSet_4.member(LA(7))) && (_tokenSet_5.member(LA(8))) && (_tokenSet_3.member(LA(9))) && (_tokenSet_6.member(LA(10)))) { 00223 match(COMMENT); 00224 } 00225 else if ((_tokenSet_0.member(LA(1))) && (LA(2) == antlr::Token::EOF_TYPE || LA(2) == EQUAL || LA(2) == COMMENT) && (_tokenSet_2.member(LA(3))) && (_tokenSet_0.member(LA(4))) && (_tokenSet_3.member(LA(5))) && (_tokenSet_4.member(LA(6))) && (_tokenSet_5.member(LA(7))) && (_tokenSet_3.member(LA(8))) && (_tokenSet_6.member(LA(9))) && (_tokenSet_6.member(LA(10)))) { 00226 } 00227 else { 00228 throw antlr::NoViableAltException(LT(1), getFilename()); 00229 } 00230 00231 } 00232 } 00233 else { 00234 if ( _cnt36>=1 ) { goto _loop36; } else {throw antlr::NoViableAltException(LT(1), getFilename());} 00235 } 00236 00237 _cnt36++; 00238 } 00239 _loop36:; 00240 } // ( ... )+ 00241 { // ( ... )* 00242 for (;;) { 00243 if ((LA(1) == COMMENT)) { 00244 match(COMMENT); 00245 } 00246 else { 00247 goto _loop38; 00248 } 00249 00250 } 00251 _loop38:; 00252 } // ( ... )* 00253 match(antlr::Token::EOF_TYPE); 00254 } 00255 catch (antlr::RecognitionException& ex) { 00256 if( inputState->guessing == 0 ) { 00257 reportError(ex); 00258 recover(ex,_tokenSet_7); 00259 } else { 00260 throw; 00261 } 00262 } 00263 }
Here is the call graph for this function:

| antlr::RefAST CCalcRecConfParser::getAST | ( | ) | [inline] |
Definition at line 25 of file CCalcRecConfParser.hpp.
Referenced by configentry(), and CCalcRecConf::GetData().
| double CCalcRecConfParser::cc |
Definition at line 26 of file CCalcRecConfParser.hpp.
Referenced by configentry(), and CCalcRecConf::GetData().
| double CCalcRecConfParser::omega |
Definition at line 27 of file CCalcRecConfParser.hpp.
Referenced by configentry(), and CCalcRecConf::GetData().
| double CCalcRecConfParser::sigma |
Definition at line 28 of file CCalcRecConfParser.hpp.
Referenced by configentry(), and CCalcRecConf::GetData().
Definition at line 29 of file CCalcRecConfParser.hpp.
Referenced by configentry(), and CCalcRecConf::GetData().
| double CCalcRecConfParser::beforep |
Definition at line 30 of file CCalcRecConfParser.hpp.
Referenced by configentry(), and CCalcRecConf::GetData().
| double CCalcRecConfParser::befores |
Definition at line 31 of file CCalcRecConfParser.hpp.
Referenced by configentry(), and CCalcRecConf::GetData().
| std::string CCalcRecConfParser::recmethod |
Definition at line 32 of file CCalcRecConfParser.hpp.
Referenced by configentry(), and CCalcRecConf::GetData().
antlr::RefAST CCalcRecConfParser::returnAST [protected] |
Definition at line 70 of file CCalcRecConfParser.hpp.
1.5.1