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


Public Member Functions | |
| void | initializeASTFactory (antlr::ASTFactory &factory) |
| CLmsConfigParser (antlr::TokenBuffer &tokenBuf) | |
| CLmsConfigParser (antlr::TokenStream &lexer) | |
| CLmsConfigParser (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 |
| int | filterlength |
| int | shift |
| double | secfactor |
Protected Member Functions | |
| CLmsConfigParser (antlr::TokenBuffer &tokenBuf, int k) | |
| CLmsConfigParser (antlr::TokenStream &lexer, int k) | |
Protected Attributes | |
| antlr::RefAST | returnAST |
Definition at line 18 of file CLmsConfigParser.hpp.
| CLmsConfigParser::CLmsConfigParser | ( | antlr::TokenBuffer & | tokenBuf, | |
| int | k | |||
| ) | [protected] |
| CLmsConfigParser::CLmsConfigParser | ( | antlr::TokenBuffer & | tokenBuf | ) |
| CLmsConfigParser::CLmsConfigParser | ( | antlr::TokenStream & | lexer, | |
| int | k | |||
| ) | [protected] |
| CLmsConfigParser::CLmsConfigParser | ( | antlr::TokenStream & | lexer | ) |
| CLmsConfigParser::CLmsConfigParser | ( | const antlr::ParserSharedInputState & | state | ) |
| void CLmsConfigParser::initializeASTFactory | ( | antlr::ASTFactory & | factory | ) |
| int CLmsConfigParser::getNumTokens | ( | ) | const [inline] |
| const char* CLmsConfigParser::getTokenName | ( | int | type | ) | const [inline] |
Definition at line 45 of file CLmsConfigParser.hpp.
00046 { 00047 if( type > getNumTokens() ) return 0; 00048 return CLmsConfigParser::tokenNames[type]; 00049 }
| const char* const* CLmsConfigParser::getTokenNames | ( | ) | const [inline] |
| void CLmsConfigParser::configentry | ( | ) |
Definition at line 33 of file CLmsConfigParser.cpp.
References EQUAL, filterlength, FILTERLENGTHT, 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 FILTERLENGTHT: 00046 { 00047 match(FILTERLENGTHT); 00048 match(EQUAL); 00049 filterlength=numvalue(); 00050 break; 00051 } 00052 case SHIFTT: 00053 { 00054 match(SHIFTT); 00055 match(EQUAL); 00056 shift=numvalue(); 00057 break; 00058 } 00059 case SECFACTORT: 00060 { 00061 match(SECFACTORT); 00062 match(EQUAL); 00063 secfactor=numvalue(); 00064 break; 00065 } 00066 default: 00067 { 00068 throw antlr::NoViableAltException(LT(1), getFilename()); 00069 } 00070 } 00071 } 00072 } 00073 catch (antlr::RecognitionException& ex) { 00074 if( inputState->guessing == 0 ) { 00075 reportError(ex); 00076 recover(ex,_tokenSet_0); 00077 } else { 00078 throw; 00079 } 00080 } 00081 }
Here is the call graph for this function:

| double CLmsConfigParser::numvalue | ( | ) |
Definition at line 83 of file CLmsConfigParser.cpp.
References NUMBER.
Referenced by configentry().
00083 { 00084 #line 42 "CLmsConfig.g" 00085 double r; 00086 #line 87 "CLmsConfigParser.cpp" 00087 antlr::RefToken currvalue = antlr::nullToken; 00088 00089 try { // for error handling 00090 currvalue = LT(1); 00091 match(NUMBER); 00092 if ( inputState->guessing==0 ) { 00093 #line 43 "CLmsConfig.g" 00094 r = atof(currvalue->getText().c_str()); 00095 #line 96 "CLmsConfigParser.cpp" 00096 } 00097 } 00098 catch (antlr::RecognitionException& ex) { 00099 if( inputState->guessing == 0 ) { 00100 reportError(ex); 00101 recover(ex,_tokenSet_0); 00102 } else { 00103 throw; 00104 } 00105 } 00106 return r; 00107 }
| void CLmsConfigParser::configfile | ( | ) |
Definition at line 109 of file CLmsConfigParser.cpp.
References COMMENT, configentry(), EQUAL, mu, and NUMBER.
Referenced by CLmsConfig::GetData().
00109 { 00110 #line 36 "CLmsConfig.g" 00111 00112 mu = -1; 00113 00114 #line 115 "CLmsConfigParser.cpp" 00115 00116 try { // for error handling 00117 { // ( ... )+ 00118 int _cnt22=0; 00119 for (;;) { 00120 if ((_tokenSet_1.member(LA(1)))) { 00121 configentry(); 00122 { 00123 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)))) { 00124 match(COMMENT); 00125 } 00126 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)))) { 00127 } 00128 else { 00129 throw antlr::NoViableAltException(LT(1), getFilename()); 00130 } 00131 00132 } 00133 } 00134 else { 00135 if ( _cnt22>=1 ) { goto _loop22; } else {throw antlr::NoViableAltException(LT(1), getFilename());} 00136 } 00137 00138 _cnt22++; 00139 } 00140 _loop22:; 00141 } // ( ... )+ 00142 { // ( ... )* 00143 for (;;) { 00144 if ((LA(1) == COMMENT)) { 00145 match(COMMENT); 00146 } 00147 else { 00148 goto _loop24; 00149 } 00150 00151 } 00152 _loop24:; 00153 } // ( ... )* 00154 match(antlr::Token::EOF_TYPE); 00155 } 00156 catch (antlr::RecognitionException& ex) { 00157 if( inputState->guessing == 0 ) { 00158 reportError(ex); 00159 recover(ex,_tokenSet_6); 00160 } else { 00161 throw; 00162 } 00163 } 00164 }
Here is the call graph for this function:

| bool CLmsConfigParser::boolvalue | ( | ) |
Definition at line 166 of file CLmsConfigParser.cpp.
00166 { 00167 #line 46 "CLmsConfig.g" 00168 bool r; 00169 #line 170 "CLmsConfigParser.cpp" 00170 00171 try { // for error handling 00172 { 00173 switch ( LA(1)) { 00174 case TRUE: 00175 { 00176 match(TRUE); 00177 if ( inputState->guessing==0 ) { 00178 #line 47 "CLmsConfig.g" 00179 r = true; 00180 #line 181 "CLmsConfigParser.cpp" 00181 } 00182 break; 00183 } 00184 case FALSE: 00185 { 00186 match(FALSE); 00187 if ( inputState->guessing==0 ) { 00188 #line 47 "CLmsConfig.g" 00189 r = false; 00190 #line 191 "CLmsConfigParser.cpp" 00191 } 00192 break; 00193 } 00194 default: 00195 { 00196 throw antlr::NoViableAltException(LT(1), getFilename()); 00197 } 00198 } 00199 } 00200 } 00201 catch (antlr::RecognitionException& ex) { 00202 if( inputState->guessing == 0 ) { 00203 reportError(ex); 00204 recover(ex,_tokenSet_6); 00205 } else { 00206 throw; 00207 } 00208 } 00209 return r; 00210 }
| std::string CLmsConfigParser::stringvalue | ( | ) |
Definition at line 212 of file CLmsConfigParser.cpp.
References STRING.
00212 { 00213 #line 50 "CLmsConfig.g" 00214 std::string r; 00215 #line 216 "CLmsConfigParser.cpp" 00216 antlr::RefToken currvalue = antlr::nullToken; 00217 00218 try { // for error handling 00219 currvalue = LT(1); 00220 match(STRING); 00221 if ( inputState->guessing==0 ) { 00222 #line 51 "CLmsConfig.g" 00223 r = currvalue->getText(); 00224 #line 225 "CLmsConfigParser.cpp" 00225 } 00226 } 00227 catch (antlr::RecognitionException& ex) { 00228 if( inputState->guessing == 0 ) { 00229 reportError(ex); 00230 recover(ex,_tokenSet_6); 00231 } else { 00232 throw; 00233 } 00234 } 00235 return r; 00236 }
| antlr::RefAST CLmsConfigParser::getAST | ( | ) | [inline] |
| double CLmsConfigParser::mu |
Definition at line 25 of file CLmsConfigParser.hpp.
Referenced by configentry(), configfile(), and CLmsConfig::GetData().
Definition at line 26 of file CLmsConfigParser.hpp.
Referenced by configentry(), and CLmsConfig::GetData().
Definition at line 27 of file CLmsConfigParser.hpp.
Referenced by configentry(), and CLmsConfig::GetData().
| double CLmsConfigParser::secfactor |
Definition at line 28 of file CLmsConfigParser.hpp.
Referenced by configentry(), and CLmsConfig::GetData().
antlr::RefAST CLmsConfigParser::returnAST [protected] |
Definition at line 66 of file CLmsConfigParser.hpp.
1.5.1