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


Public Member Functions | |
| void | initializeASTFactory (antlr::ASTFactory &factory) |
| CRLSConfigParser (antlr::TokenBuffer &tokenBuf) | |
| CRLSConfigParser (antlr::TokenStream &lexer) | |
| CRLSConfigParser (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 | delta |
| int | filterlength |
| int | shift |
| double | lambda |
Protected Member Functions | |
| CRLSConfigParser (antlr::TokenBuffer &tokenBuf, int k) | |
| CRLSConfigParser (antlr::TokenStream &lexer, int k) | |
Protected Attributes | |
| antlr::RefAST | returnAST |
Definition at line 18 of file CRLSConfigParser.hpp.
| CRLSConfigParser::CRLSConfigParser | ( | antlr::TokenBuffer & | tokenBuf, | |
| int | k | |||
| ) | [protected] |
| CRLSConfigParser::CRLSConfigParser | ( | antlr::TokenBuffer & | tokenBuf | ) |
| CRLSConfigParser::CRLSConfigParser | ( | antlr::TokenStream & | lexer, | |
| int | k | |||
| ) | [protected] |
| CRLSConfigParser::CRLSConfigParser | ( | antlr::TokenStream & | lexer | ) |
| CRLSConfigParser::CRLSConfigParser | ( | const antlr::ParserSharedInputState & | state | ) |
| void CRLSConfigParser::initializeASTFactory | ( | antlr::ASTFactory & | factory | ) |
| int CRLSConfigParser::getNumTokens | ( | ) | const [inline] |
| const char* CRLSConfigParser::getTokenName | ( | int | type | ) | const [inline] |
Definition at line 45 of file CRLSConfigParser.hpp.
00046 { 00047 if( type > getNumTokens() ) return 0; 00048 return CRLSConfigParser::tokenNames[type]; 00049 }
| const char* const* CRLSConfigParser::getTokenNames | ( | ) | const [inline] |
| void CRLSConfigParser::configentry | ( | ) |
Definition at line 33 of file CRLSConfigParser.cpp.
References delta, DELTAT, EQUAL, filterlength, FILTERLENGTHT, lambda, LAMBDAT, numvalue(), shift, and SHIFTT.
Referenced by configfile().
00033 { 00034 00035 try { // for error handling 00036 { 00037 switch ( LA(1)) { 00038 case DELTAT: 00039 { 00040 match(DELTAT); 00041 match(EQUAL); 00042 delta=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 LAMBDAT: 00060 { 00061 match(LAMBDAT); 00062 match(EQUAL); 00063 lambda=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 CRLSConfigParser::numvalue | ( | ) |
Definition at line 83 of file CRLSConfigParser.cpp.
References NUMBER.
Referenced by configentry().
00083 { 00084 #line 41 "CRLSConfig.g" 00085 double r; 00086 #line 87 "CRLSConfigParser.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 42 "CRLSConfig.g" 00094 r = atof(currvalue->getText().c_str()); 00095 #line 96 "CRLSConfigParser.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 CRLSConfigParser::configfile | ( | ) |
Definition at line 109 of file CRLSConfigParser.cpp.
References COMMENT, configentry(), EQUAL, and NUMBER.
Referenced by CRLSConfig::GetData().
00109 { 00110 #line 36 "CRLSConfig.g" 00111 00112 00113 #line 114 "CRLSConfigParser.cpp" 00114 00115 try { // for error handling 00116 { // ( ... )+ 00117 int _cnt22=0; 00118 for (;;) { 00119 if ((_tokenSet_1.member(LA(1)))) { 00120 configentry(); 00121 { 00122 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)))) { 00123 match(COMMENT); 00124 } 00125 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)))) { 00126 } 00127 else { 00128 throw antlr::NoViableAltException(LT(1), getFilename()); 00129 } 00130 00131 } 00132 } 00133 else { 00134 if ( _cnt22>=1 ) { goto _loop22; } else {throw antlr::NoViableAltException(LT(1), getFilename());} 00135 } 00136 00137 _cnt22++; 00138 } 00139 _loop22:; 00140 } // ( ... )+ 00141 { // ( ... )* 00142 for (;;) { 00143 if ((LA(1) == COMMENT)) { 00144 match(COMMENT); 00145 } 00146 else { 00147 goto _loop24; 00148 } 00149 00150 } 00151 _loop24:; 00152 } // ( ... )* 00153 match(antlr::Token::EOF_TYPE); 00154 } 00155 catch (antlr::RecognitionException& ex) { 00156 if( inputState->guessing == 0 ) { 00157 reportError(ex); 00158 recover(ex,_tokenSet_6); 00159 } else { 00160 throw; 00161 } 00162 } 00163 }
Here is the call graph for this function:

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