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


Public Member Functions | |
| void | initializeASTFactory (antlr::ASTFactory &factory) |
| CMtuAdaptiveConfigParser (antlr::TokenBuffer &tokenBuf) | |
| CMtuAdaptiveConfigParser (antlr::TokenStream &lexer) | |
| CMtuAdaptiveConfigParser (const antlr::ParserSharedInputState &state) | |
| int | getNumTokens () const |
| const char * | getTokenName (int type) const |
| const char *const * | getTokenNames () const |
| void | configentry () |
| double | numvalue () |
| void | configfile () |
| bool | boolvalue () |
| std::string | stringvalue () |
| antlr::RefAST | getAST () |
Public Attributes | |
| double | mu |
| double | delta |
| double | lambda |
| int | filterlength |
| int | shift |
| double | secfactor |
| double | alpha |
| int | hiddenlayers |
Protected Member Functions | |
| CMtuAdaptiveConfigParser (antlr::TokenBuffer &tokenBuf, int k) | |
| CMtuAdaptiveConfigParser (antlr::TokenStream &lexer, int k) | |
Protected Attributes | |
| antlr::RefAST | returnAST |
Definition at line 18 of file CMtuAdaptiveConfigParser.hpp.
| CMtuAdaptiveConfigParser::CMtuAdaptiveConfigParser | ( | antlr::TokenBuffer & | tokenBuf, | |
| int | k | |||
| ) | [protected] |
| CMtuAdaptiveConfigParser::CMtuAdaptiveConfigParser | ( | antlr::TokenBuffer & | tokenBuf | ) |
| CMtuAdaptiveConfigParser::CMtuAdaptiveConfigParser | ( | antlr::TokenStream & | lexer, | |
| int | k | |||
| ) | [protected] |
| CMtuAdaptiveConfigParser::CMtuAdaptiveConfigParser | ( | antlr::TokenStream & | lexer | ) |
| CMtuAdaptiveConfigParser::CMtuAdaptiveConfigParser | ( | const antlr::ParserSharedInputState & | state | ) |
| void CMtuAdaptiveConfigParser::initializeASTFactory | ( | antlr::ASTFactory & | factory | ) |
| int CMtuAdaptiveConfigParser::getNumTokens | ( | ) | const [inline] |
| const char* CMtuAdaptiveConfigParser::getTokenName | ( | int | type | ) | const [inline] |
Definition at line 49 of file CMtuAdaptiveConfigParser.hpp.
00050 { 00051 if( type > getNumTokens() ) return 0; 00052 return CMtuAdaptiveConfigParser::tokenNames[type]; 00053 }
| const char* const* CMtuAdaptiveConfigParser::getTokenNames | ( | ) | const [inline] |
| void CMtuAdaptiveConfigParser::configentry | ( | ) |
Definition at line 33 of file CMtuAdaptiveConfigParser.cpp.
References alpha, ALPHAT, delta, DELTAT, EQUAL, filterlength, FILTERLENGTHT, hiddenlayers, HIDDENLAYERST, lambda, LAMBDAT, mu, MUT, numvalue(), secfactor, SECFACTORT, shift, and SHIFTT.
Referenced by configfile().
00033 { 00034 00035 try { // for error handling 00036 { 00037 switch ( LA(1)) { 00038 case MUT: 00039 { 00040 match(MUT); 00041 match(EQUAL); 00042 mu=numvalue(); 00043 break; 00044 } 00045 case DELTAT: 00046 { 00047 match(DELTAT); 00048 match(EQUAL); 00049 delta=numvalue(); 00050 break; 00051 } 00052 case LAMBDAT: 00053 { 00054 match(LAMBDAT); 00055 match(EQUAL); 00056 lambda=numvalue(); 00057 break; 00058 } 00059 case FILTERLENGTHT: 00060 { 00061 match(FILTERLENGTHT); 00062 match(EQUAL); 00063 filterlength=numvalue(); 00064 break; 00065 } 00066 case SHIFTT: 00067 { 00068 match(SHIFTT); 00069 match(EQUAL); 00070 shift=numvalue(); 00071 break; 00072 } 00073 case SECFACTORT: 00074 { 00075 match(SECFACTORT); 00076 match(EQUAL); 00077 secfactor=numvalue(); 00078 break; 00079 } 00080 case ALPHAT: 00081 { 00082 match(ALPHAT); 00083 match(EQUAL); 00084 alpha=numvalue(); 00085 break; 00086 } 00087 case HIDDENLAYERST: 00088 { 00089 match(HIDDENLAYERST); 00090 match(EQUAL); 00091 hiddenlayers=numvalue(); 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:

| double CMtuAdaptiveConfigParser::numvalue | ( | ) |
Definition at line 111 of file CMtuAdaptiveConfigParser.cpp.
References NUMBER.
Referenced by configentry().
00111 { 00112 #line 50 "CMtuAdaptiveConfig.g" 00113 double r; 00114 #line 115 "CMtuAdaptiveConfigParser.cpp" 00115 antlr::RefToken currvalue = antlr::nullToken; 00116 00117 try { // for error handling 00118 currvalue = LT(1); 00119 match(NUMBER); 00120 if ( inputState->guessing==0 ) { 00121 #line 51 "CMtuAdaptiveConfig.g" 00122 r = atof(currvalue->getText().c_str()); 00123 #line 124 "CMtuAdaptiveConfigParser.cpp" 00124 } 00125 } 00126 catch (antlr::RecognitionException& ex) { 00127 if( inputState->guessing == 0 ) { 00128 reportError(ex); 00129 recover(ex,_tokenSet_0); 00130 } else { 00131 throw; 00132 } 00133 } 00134 return r; 00135 }
| void CMtuAdaptiveConfigParser::configfile | ( | ) |
Definition at line 137 of file CMtuAdaptiveConfigParser.cpp.
References COMMENT, configentry(), EQUAL, mu, and NUMBER.
Referenced by CMtuAdaptiveConfig::GetData().
00137 { 00138 #line 44 "CMtuAdaptiveConfig.g" 00139 00140 mu = 1; 00141 00142 #line 143 "CMtuAdaptiveConfigParser.cpp" 00143 00144 try { // for error handling 00145 { // ( ... )+ 00146 int _cnt38=0; 00147 for (;;) { 00148 if ((_tokenSet_1.member(LA(1)))) { 00149 configentry(); 00150 { 00151 if ((LA(1) == COMMENT) && (_tokenSet_0.member(LA(2))) && (LA(3) == antlr::Token::EOF_TYPE || LA(3) == EQUAL || LA(3) == COMMENT) && (LA(4) == antlr::Token::EOF_TYPE || LA(4) == NUMBER || LA(4) == COMMENT) && (_tokenSet_0.member(LA(5))) && (_tokenSet_2.member(LA(6))) && (_tokenSet_3.member(LA(7))) && (_tokenSet_4.member(LA(8))) && (_tokenSet_2.member(LA(9))) && (_tokenSet_5.member(LA(10)))) { 00152 match(COMMENT); 00153 } 00154 else if ((_tokenSet_0.member(LA(1))) && (LA(2) == antlr::Token::EOF_TYPE || LA(2) == EQUAL || LA(2) == COMMENT) && (LA(3) == antlr::Token::EOF_TYPE || LA(3) == NUMBER || LA(3) == COMMENT) && (_tokenSet_0.member(LA(4))) && (_tokenSet_2.member(LA(5))) && (_tokenSet_3.member(LA(6))) && (_tokenSet_4.member(LA(7))) && (_tokenSet_2.member(LA(8))) && (_tokenSet_5.member(LA(9))) && (_tokenSet_5.member(LA(10)))) { 00155 } 00156 else { 00157 throw antlr::NoViableAltException(LT(1), getFilename()); 00158 } 00159 00160 } 00161 } 00162 else { 00163 if ( _cnt38>=1 ) { goto _loop38; } else {throw antlr::NoViableAltException(LT(1), getFilename());} 00164 } 00165 00166 _cnt38++; 00167 } 00168 _loop38:; 00169 } // ( ... )+ 00170 { // ( ... )* 00171 for (;;) { 00172 if ((LA(1) == COMMENT)) { 00173 match(COMMENT); 00174 } 00175 else { 00176 goto _loop40; 00177 } 00178 00179 } 00180 _loop40:; 00181 } // ( ... )* 00182 match(antlr::Token::EOF_TYPE); 00183 } 00184 catch (antlr::RecognitionException& ex) { 00185 if( inputState->guessing == 0 ) { 00186 reportError(ex); 00187 recover(ex,_tokenSet_6); 00188 } else { 00189 throw; 00190 } 00191 } 00192 }
Here is the call graph for this function:

| bool CMtuAdaptiveConfigParser::boolvalue | ( | ) |
Definition at line 194 of file CMtuAdaptiveConfigParser.cpp.
00194 { 00195 #line 54 "CMtuAdaptiveConfig.g" 00196 bool r; 00197 #line 198 "CMtuAdaptiveConfigParser.cpp" 00198 00199 try { // for error handling 00200 { 00201 switch ( LA(1)) { 00202 case TRUE: 00203 { 00204 match(TRUE); 00205 if ( inputState->guessing==0 ) { 00206 #line 55 "CMtuAdaptiveConfig.g" 00207 r = true; 00208 #line 209 "CMtuAdaptiveConfigParser.cpp" 00209 } 00210 break; 00211 } 00212 case FALSE: 00213 { 00214 match(FALSE); 00215 if ( inputState->guessing==0 ) { 00216 #line 55 "CMtuAdaptiveConfig.g" 00217 r = false; 00218 #line 219 "CMtuAdaptiveConfigParser.cpp" 00219 } 00220 break; 00221 } 00222 default: 00223 { 00224 throw antlr::NoViableAltException(LT(1), getFilename()); 00225 } 00226 } 00227 } 00228 } 00229 catch (antlr::RecognitionException& ex) { 00230 if( inputState->guessing == 0 ) { 00231 reportError(ex); 00232 recover(ex,_tokenSet_6); 00233 } else { 00234 throw; 00235 } 00236 } 00237 return r; 00238 }
| std::string CMtuAdaptiveConfigParser::stringvalue | ( | ) |
Definition at line 240 of file CMtuAdaptiveConfigParser.cpp.
References STRING.
00240 { 00241 #line 58 "CMtuAdaptiveConfig.g" 00242 std::string r; 00243 #line 244 "CMtuAdaptiveConfigParser.cpp" 00244 antlr::RefToken currvalue = antlr::nullToken; 00245 00246 try { // for error handling 00247 currvalue = LT(1); 00248 match(STRING); 00249 if ( inputState->guessing==0 ) { 00250 #line 59 "CMtuAdaptiveConfig.g" 00251 r = currvalue->getText(); 00252 #line 253 "CMtuAdaptiveConfigParser.cpp" 00253 } 00254 } 00255 catch (antlr::RecognitionException& ex) { 00256 if( inputState->guessing == 0 ) { 00257 reportError(ex); 00258 recover(ex,_tokenSet_6); 00259 } else { 00260 throw; 00261 } 00262 } 00263 return r; 00264 }
| antlr::RefAST CMtuAdaptiveConfigParser::getAST | ( | ) | [inline] |
| double CMtuAdaptiveConfigParser::mu |
Definition at line 25 of file CMtuAdaptiveConfigParser.hpp.
Referenced by configentry(), configfile(), and CMtuAdaptiveConfig::GetData().
Definition at line 26 of file CMtuAdaptiveConfigParser.hpp.
Referenced by configentry(), and CMtuAdaptiveConfig::GetData().
Definition at line 27 of file CMtuAdaptiveConfigParser.hpp.
Referenced by configentry(), and CMtuAdaptiveConfig::GetData().
Definition at line 28 of file CMtuAdaptiveConfigParser.hpp.
Referenced by configentry(), and CMtuAdaptiveConfig::GetData().
Definition at line 29 of file CMtuAdaptiveConfigParser.hpp.
Referenced by configentry(), and CMtuAdaptiveConfig::GetData().
Definition at line 30 of file CMtuAdaptiveConfigParser.hpp.
Referenced by configentry(), and CMtuAdaptiveConfig::GetData().
Definition at line 31 of file CMtuAdaptiveConfigParser.hpp.
Referenced by configentry(), and CMtuAdaptiveConfig::GetData().
Definition at line 32 of file CMtuAdaptiveConfigParser.hpp.
Referenced by configentry(), and CMtuAdaptiveConfig::GetData().
antlr::RefAST CMtuAdaptiveConfigParser::returnAST [protected] |
Definition at line 70 of file CMtuAdaptiveConfigParser.hpp.
1.5.1