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


Public Member Functions | |
| bool | getCaseSensitiveLiterals () const |
| CPTensorConfLexer (std::istream &in) | |
| CPTensorConfLexer (antlr::InputBuffer &ib) | |
| CPTensorConfLexer (const antlr::LexerSharedInputState &state) | |
| antlr::RefToken | nextToken () |
| void | mEQUAL (bool _createToken) |
| void | mTRUE (bool _createToken) |
| void | mFALSE (bool _createToken) |
| void | mWS (bool _createToken) |
| void | mSTRING (bool _createToken) |
| void | mNUMBER (bool _createToken) |
| void | mCOMMENT (bool _createToken) |
| void | mSCALEFACTORT (bool _createToken) |
| void | mNORMALIZET (bool _createToken) |
| void | mWRITETENSORT (bool _createToken) |
| void | mWRITESERIALPARALLELT (bool _createToken) |
| void | mCALCERRT (bool _createToken) |
Protected Member Functions | |
| void | mNEWLINE (bool _createToken) |
| void | mCHAR (bool _createToken) |
| void | mDIGIT (bool _createToken) |
| void | mOTHER (bool _createToken) |
| void | mREAL (bool _createToken) |
| void | mINT (bool _createToken) |
Definition at line 18 of file CPTensorConfLexer.hpp.
| CPTensorConfLexer::CPTensorConfLexer | ( | std::istream & | in | ) |
| CPTensorConfLexer::CPTensorConfLexer | ( | antlr::InputBuffer & | ib | ) |
| CPTensorConfLexer::CPTensorConfLexer | ( | const antlr::LexerSharedInputState & | state | ) |
| bool CPTensorConfLexer::getCaseSensitiveLiterals | ( | ) | const [inline] |
| antlr::RefToken CPTensorConfLexer::nextToken | ( | ) |
Definition at line 35 of file CPTensorConfLexer.cpp.
References mCALCERRT(), mCOMMENT(), mEQUAL(), mFALSE(), mNORMALIZET(), mNUMBER(), mSCALEFACTORT(), mSTRING(), mTRUE(), mWRITESERIALPARALLELT(), mWRITETENSORT(), and mWS().
00036 { 00037 antlr::RefToken theRetToken; 00038 for (;;) { 00039 antlr::RefToken theRetToken; 00040 int _ttype = antlr::Token::INVALID_TYPE; 00041 resetText(); 00042 try { // for lexical and char stream error handling 00043 switch ( LA(1)) { 00044 case 0x3d /* '=' */ : 00045 { 00046 mEQUAL(true); 00047 theRetToken=_returnToken; 00048 break; 00049 } 00050 case 0x9 /* '\t' */ : 00051 case 0xa /* '\n' */ : 00052 case 0xd /* '\r' */ : 00053 case 0x20 /* ' ' */ : 00054 { 00055 mWS(true); 00056 theRetToken=_returnToken; 00057 break; 00058 } 00059 case 0x2b /* '+' */ : 00060 case 0x2d /* '-' */ : 00061 case 0x2e /* '.' */ : 00062 case 0x30 /* '0' */ : 00063 case 0x31 /* '1' */ : 00064 case 0x32 /* '2' */ : 00065 case 0x33 /* '3' */ : 00066 case 0x34 /* '4' */ : 00067 case 0x35 /* '5' */ : 00068 case 0x36 /* '6' */ : 00069 case 0x37 /* '7' */ : 00070 case 0x38 /* '8' */ : 00071 case 0x39 /* '9' */ : 00072 { 00073 mNUMBER(true); 00074 theRetToken=_returnToken; 00075 break; 00076 } 00077 case 0x2f /* '/' */ : 00078 { 00079 mCOMMENT(true); 00080 theRetToken=_returnToken; 00081 break; 00082 } 00083 default: 00084 if ((LA(1) == 0x73 /* 's' */ ) && (LA(2) == 0x63 /* 'c' */ ) && (LA(3) == 0x61 /* 'a' */ ) && (LA(4) == 0x6c /* 'l' */ ) && (LA(5) == 0x65 /* 'e' */ ) && (LA(6) == 0x66 /* 'f' */ ) && (LA(7) == 0x61 /* 'a' */ ) && (LA(8) == 0x63 /* 'c' */ ) && (LA(9) == 0x74 /* 't' */ ) && (LA(10) == 0x6f /* 'o' */ )) { 00085 mSCALEFACTORT(true); 00086 theRetToken=_returnToken; 00087 } 00088 else if ((LA(1) == 0x77 /* 'w' */ ) && (LA(2) == 0x72 /* 'r' */ ) && (LA(3) == 0x69 /* 'i' */ ) && (LA(4) == 0x74 /* 't' */ ) && (LA(5) == 0x65 /* 'e' */ ) && (LA(6) == 0x74 /* 't' */ ) && (LA(7) == 0x65 /* 'e' */ ) && (LA(8) == 0x6e /* 'n' */ ) && (LA(9) == 0x73 /* 's' */ ) && (LA(10) == 0x6f /* 'o' */ )) { 00089 mWRITETENSORT(true); 00090 theRetToken=_returnToken; 00091 } 00092 else if ((LA(1) == 0x77 /* 'w' */ ) && (LA(2) == 0x72 /* 'r' */ ) && (LA(3) == 0x69 /* 'i' */ ) && (LA(4) == 0x74 /* 't' */ ) && (LA(5) == 0x65 /* 'e' */ ) && (LA(6) == 0x73 /* 's' */ ) && (LA(7) == 0x65 /* 'e' */ ) && (LA(8) == 0x72 /* 'r' */ ) && (LA(9) == 0x69 /* 'i' */ ) && (LA(10) == 0x61 /* 'a' */ )) { 00093 mWRITESERIALPARALLELT(true); 00094 theRetToken=_returnToken; 00095 } 00096 else if ((LA(1) == 0x6e /* 'n' */ ) && (LA(2) == 0x6f /* 'o' */ ) && (LA(3) == 0x72 /* 'r' */ ) && (LA(4) == 0x6d /* 'm' */ ) && (LA(5) == 0x61 /* 'a' */ ) && (LA(6) == 0x6c /* 'l' */ ) && (LA(7) == 0x69 /* 'i' */ ) && (LA(8) == 0x7a /* 'z' */ ) && (LA(9) == 0x65 /* 'e' */ ) && (true)) { 00097 mNORMALIZET(true); 00098 theRetToken=_returnToken; 00099 } 00100 else if ((LA(1) == 0x63 /* 'c' */ ) && (LA(2) == 0x61 /* 'a' */ ) && (LA(3) == 0x6c /* 'l' */ ) && (LA(4) == 0x63 /* 'c' */ ) && (LA(5) == 0x65 /* 'e' */ ) && (LA(6) == 0x72 /* 'r' */ ) && (LA(7) == 0x72 /* 'r' */ ) && (true) && (true) && (true)) { 00101 mCALCERRT(true); 00102 theRetToken=_returnToken; 00103 } 00104 else if ((LA(1) == 0x66 /* 'f' */ ) && (LA(2) == 0x61 /* 'a' */ ) && (LA(3) == 0x6c /* 'l' */ ) && (LA(4) == 0x73 /* 's' */ ) && (LA(5) == 0x65 /* 'e' */ ) && (true) && (true) && (true) && (true) && (true)) { 00105 mFALSE(true); 00106 theRetToken=_returnToken; 00107 } 00108 else if ((LA(1) == 0x74 /* 't' */ ) && (LA(2) == 0x72 /* 'r' */ ) && (LA(3) == 0x75 /* 'u' */ ) && (LA(4) == 0x65 /* 'e' */ ) && (true) && (true) && (true) && (true) && (true) && (true)) { 00109 mTRUE(true); 00110 theRetToken=_returnToken; 00111 } 00112 else if (((LA(1) >= 0x61 /* 'a' */ && LA(1) <= 0x7a /* 'z' */ )) && (true) && (true) && (true) && (true) && (true) && (true) && (true) && (true) && (true)) { 00113 mSTRING(true); 00114 theRetToken=_returnToken; 00115 } 00116 else { 00117 if (LA(1)==EOF_CHAR) 00118 { 00119 uponEOF(); 00120 _returnToken = makeToken(antlr::Token::EOF_TYPE); 00121 } 00122 else {throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} 00123 } 00124 } 00125 if ( !_returnToken ) 00126 goto tryAgain; // found SKIP token 00127 00128 _ttype = _returnToken->getType(); 00129 _ttype = testLiteralsTable(_ttype); 00130 _returnToken->setType(_ttype); 00131 return _returnToken; 00132 } 00133 catch (antlr::RecognitionException& e) { 00134 throw antlr::TokenStreamRecognitionException(e); 00135 } 00136 catch (antlr::CharStreamIOException& csie) { 00137 throw antlr::TokenStreamIOException(csie.io); 00138 } 00139 catch (antlr::CharStreamException& cse) { 00140 throw antlr::TokenStreamException(cse.getMessage()); 00141 } 00142 tryAgain:; 00143 } 00144 }
Here is the call graph for this function:

| void CPTensorConfLexer::mEQUAL | ( | bool | _createToken | ) |
Definition at line 146 of file CPTensorConfLexer.cpp.
References EQUAL.
Referenced by nextToken().
00146 { 00147 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length(); 00148 _ttype = EQUAL; 00149 std::string::size_type _saveIndex; 00150 00151 match('=' /* charlit */ ); 00152 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) { 00153 _token = makeToken(_ttype); 00154 _token->setText(text.substr(_begin, text.length()-_begin)); 00155 } 00156 _returnToken = _token; 00157 _saveIndex=0; 00158 }
| void CPTensorConfLexer::mTRUE | ( | bool | _createToken | ) |
Definition at line 160 of file CPTensorConfLexer.cpp.
References TRUE.
Referenced by nextToken().
00160 { 00161 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length(); 00162 _ttype = TRUE; 00163 std::string::size_type _saveIndex; 00164 00165 match("true"); 00166 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) { 00167 _token = makeToken(_ttype); 00168 _token->setText(text.substr(_begin, text.length()-_begin)); 00169 } 00170 _returnToken = _token; 00171 _saveIndex=0; 00172 }
| void CPTensorConfLexer::mFALSE | ( | bool | _createToken | ) |
Definition at line 174 of file CPTensorConfLexer.cpp.
References FALSE.
Referenced by nextToken().
00174 { 00175 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length(); 00176 _ttype = FALSE; 00177 std::string::size_type _saveIndex; 00178 00179 match("false"); 00180 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) { 00181 _token = makeToken(_ttype); 00182 _token->setText(text.substr(_begin, text.length()-_begin)); 00183 } 00184 _returnToken = _token; 00185 _saveIndex=0; 00186 }
| void CPTensorConfLexer::mWS | ( | bool | _createToken | ) |
Definition at line 188 of file CPTensorConfLexer.cpp.
References mNEWLINE(), and WS.
Referenced by nextToken().
00188 { 00189 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length(); 00190 _ttype = WS; 00191 std::string::size_type _saveIndex; 00192 00193 { // ( ... )+ 00194 int _cnt30=0; 00195 for (;;) { 00196 switch ( LA(1)) { 00197 case 0x20 /* ' ' */ : 00198 { 00199 match(' ' /* charlit */ ); 00200 break; 00201 } 00202 case 0xa /* '\n' */ : 00203 case 0xd /* '\r' */ : 00204 { 00205 mNEWLINE(false); 00206 break; 00207 } 00208 case 0x9 /* '\t' */ : 00209 { 00210 match('\t' /* charlit */ ); 00211 break; 00212 } 00213 default: 00214 { 00215 if ( _cnt30>=1 ) { goto _loop30; } else {throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} 00216 } 00217 } 00218 _cnt30++; 00219 } 00220 _loop30:; 00221 } // ( ... )+ 00222 if ( inputState->guessing==0 ) { 00223 #line 77 "CPTensorConf.g" 00224 _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP; 00225 #line 226 "CPTensorConfLexer.cpp" 00226 } 00227 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) { 00228 _token = makeToken(_ttype); 00229 _token->setText(text.substr(_begin, text.length()-_begin)); 00230 } 00231 _returnToken = _token; 00232 _saveIndex=0; 00233 }
Here is the call graph for this function:

| void CPTensorConfLexer::mNEWLINE | ( | bool | _createToken | ) | [protected] |
Definition at line 235 of file CPTensorConfLexer.cpp.
References NEWLINE.
Referenced by mCOMMENT(), and mWS().
00235 { 00236 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length(); 00237 _ttype = NEWLINE; 00238 std::string::size_type _saveIndex; 00239 00240 { 00241 switch ( LA(1)) { 00242 case 0xa /* '\n' */ : 00243 { 00244 match('\n' /* charlit */ ); 00245 break; 00246 } 00247 case 0xd /* '\r' */ : 00248 { 00249 match('\r' /* charlit */ ); 00250 match('\n' /* charlit */ ); 00251 break; 00252 } 00253 default: 00254 { 00255 throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn()); 00256 } 00257 } 00258 } 00259 if ( inputState->guessing==0 ) { 00260 #line 103 "CPTensorConf.g" 00261 newline(); 00262 #line 263 "CPTensorConfLexer.cpp" 00263 } 00264 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) { 00265 _token = makeToken(_ttype); 00266 _token->setText(text.substr(_begin, text.length()-_begin)); 00267 } 00268 _returnToken = _token; 00269 _saveIndex=0; 00270 }
| void CPTensorConfLexer::mSTRING | ( | bool | _createToken | ) |
Definition at line 272 of file CPTensorConfLexer.cpp.
References mCHAR(), mDIGIT(), mOTHER(), and STRING.
Referenced by nextToken().
00272 { 00273 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length(); 00274 _ttype = STRING; 00275 std::string::size_type _saveIndex; 00276 00277 mCHAR(false); 00278 { // ( ... )* 00279 for (;;) { 00280 switch ( LA(1)) { 00281 case 0x61 /* 'a' */ : 00282 case 0x62 /* 'b' */ : 00283 case 0x63 /* 'c' */ : 00284 case 0x64 /* 'd' */ : 00285 case 0x65 /* 'e' */ : 00286 case 0x66 /* 'f' */ : 00287 case 0x67 /* 'g' */ : 00288 case 0x68 /* 'h' */ : 00289 case 0x69 /* 'i' */ : 00290 case 0x6a /* 'j' */ : 00291 case 0x6b /* 'k' */ : 00292 case 0x6c /* 'l' */ : 00293 case 0x6d /* 'm' */ : 00294 case 0x6e /* 'n' */ : 00295 case 0x6f /* 'o' */ : 00296 case 0x70 /* 'p' */ : 00297 case 0x71 /* 'q' */ : 00298 case 0x72 /* 'r' */ : 00299 case 0x73 /* 's' */ : 00300 case 0x74 /* 't' */ : 00301 case 0x75 /* 'u' */ : 00302 case 0x76 /* 'v' */ : 00303 case 0x77 /* 'w' */ : 00304 case 0x78 /* 'x' */ : 00305 case 0x79 /* 'y' */ : 00306 case 0x7a /* 'z' */ : 00307 { 00308 mCHAR(false); 00309 break; 00310 } 00311 case 0x30 /* '0' */ : 00312 case 0x31 /* '1' */ : 00313 case 0x32 /* '2' */ : 00314 case 0x33 /* '3' */ : 00315 case 0x34 /* '4' */ : 00316 case 0x35 /* '5' */ : 00317 case 0x36 /* '6' */ : 00318 case 0x37 /* '7' */ : 00319 case 0x38 /* '8' */ : 00320 case 0x39 /* '9' */ : 00321 { 00322 mDIGIT(false); 00323 break; 00324 } 00325 case 0x23 /* '#' */ : 00326 case 0x24 /* '$' */ : 00327 case 0x25 /* '%' */ : 00328 case 0x26 /* '&' */ : 00329 case 0x27 /* '\'' */ : 00330 case 0x28 /* '(' */ : 00331 case 0x29 /* ')' */ : 00332 case 0x2a /* '*' */ : 00333 case 0x2b /* '+' */ : 00334 case 0x2c /* ',' */ : 00335 case 0x2d /* '-' */ : 00336 case 0x2e /* '.' */ : 00337 case 0x2f /* '/' */ : 00338 case 0x3a /* ':' */ : 00339 case 0x3b /* ';' */ : 00340 case 0x3c /* '<' */ : 00341 case 0x3f /* '?' */ : 00342 case 0x40 /* '@' */ : 00343 case 0x5b /* '[' */ : 00344 case 0x5d /* ']' */ : 00345 case 0x5e /* '^' */ : 00346 case 0x5f /* '_' */ : 00347 case 0x7b /* '{' */ : 00348 case 0x7c /* '|' */ : 00349 case 0x7d /* '}' */ : 00350 case 0x7e /* '~' */ : 00351 { 00352 mOTHER(false); 00353 break; 00354 } 00355 default: 00356 { 00357 goto _loop33; 00358 } 00359 } 00360 } 00361 _loop33:; 00362 } // ( ... )* 00363 _ttype = testLiteralsTable(_ttype); 00364 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) { 00365 _token = makeToken(_ttype); 00366 _token->setText(text.substr(_begin, text.length()-_begin)); 00367 } 00368 _returnToken = _token; 00369 _saveIndex=0; 00370 }
Here is the call graph for this function:

| void CPTensorConfLexer::mCHAR | ( | bool | _createToken | ) | [protected] |
Definition at line 372 of file CPTensorConfLexer.cpp.
References CHAR.
Referenced by mSTRING().
00372 { 00373 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length(); 00374 _ttype = CHAR; 00375 std::string::size_type _saveIndex; 00376 00377 { 00378 matchRange('a','z'); 00379 } 00380 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) { 00381 _token = makeToken(_ttype); 00382 _token->setText(text.substr(_begin, text.length()-_begin)); 00383 } 00384 _returnToken = _token; 00385 _saveIndex=0; 00386 }
| void CPTensorConfLexer::mDIGIT | ( | bool | _createToken | ) | [protected] |
Definition at line 388 of file CPTensorConfLexer.cpp.
References DIGIT.
Referenced by mINT(), and mSTRING().
00388 { 00389 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length(); 00390 _ttype = DIGIT; 00391 std::string::size_type _saveIndex; 00392 00393 matchRange('0','9'); 00394 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) { 00395 _token = makeToken(_ttype); 00396 _token->setText(text.substr(_begin, text.length()-_begin)); 00397 } 00398 _returnToken = _token; 00399 _saveIndex=0; 00400 }
| void CPTensorConfLexer::mOTHER | ( | bool | _createToken | ) | [protected] |
Definition at line 402 of file CPTensorConfLexer.cpp.
References OTHER.
Referenced by mSTRING().
00402 { 00403 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length(); 00404 _ttype = OTHER; 00405 std::string::size_type _saveIndex; 00406 00407 switch ( LA(1)) { 00408 case 0x27 /* '\'' */ : 00409 { 00410 match('\'' /* charlit */ ); 00411 break; 00412 } 00413 case 0x23 /* '#' */ : 00414 { 00415 match('#' /* charlit */ ); 00416 break; 00417 } 00418 case 0x24 /* '$' */ : 00419 { 00420 match('$' /* charlit */ ); 00421 break; 00422 } 00423 case 0x25 /* '%' */ : 00424 { 00425 match('%' /* charlit */ ); 00426 break; 00427 } 00428 case 0x26 /* '&' */ : 00429 { 00430 match('&' /* charlit */ ); 00431 break; 00432 } 00433 case 0x28 /* '(' */ : 00434 { 00435 match('(' /* charlit */ ); 00436 break; 00437 } 00438 case 0x29 /* ')' */ : 00439 { 00440 match(')' /* charlit */ ); 00441 break; 00442 } 00443 case 0x2a /* '*' */ : 00444 { 00445 match('*' /* charlit */ ); 00446 break; 00447 } 00448 case 0x2b /* '+' */ : 00449 { 00450 match('+' /* charlit */ ); 00451 break; 00452 } 00453 case 0x2c /* ',' */ : 00454 { 00455 match(',' /* charlit */ ); 00456 break; 00457 } 00458 case 0x2d /* '-' */ : 00459 { 00460 match('-' /* charlit */ ); 00461 break; 00462 } 00463 case 0x2e /* '.' */ : 00464 { 00465 match('.' /* charlit */ ); 00466 break; 00467 } 00468 case 0x2f /* '/' */ : 00469 { 00470 match('/' /* charlit */ ); 00471 break; 00472 } 00473 case 0x3a /* ':' */ : 00474 { 00475 match(':' /* charlit */ ); 00476 break; 00477 } 00478 case 0x3b /* ';' */ : 00479 { 00480 match(';' /* charlit */ ); 00481 break; 00482 } 00483 case 0x3c /* '<' */ : 00484 { 00485 match('<' /* charlit */ ); 00486 break; 00487 } 00488 case 0x3f /* '?' */ : 00489 { 00490 match('?' /* charlit */ ); 00491 break; 00492 } 00493 case 0x40 /* '@' */ : 00494 { 00495 match('@' /* charlit */ ); 00496 break; 00497 } 00498 case 0x5b /* '[' */ : 00499 { 00500 match('[' /* charlit */ ); 00501 break; 00502 } 00503 case 0x5d /* ']' */ : 00504 { 00505 match(']' /* charlit */ ); 00506 break; 00507 } 00508 case 0x5e /* '^' */ : 00509 { 00510 match('^' /* charlit */ ); 00511 break; 00512 } 00513 case 0x5f /* '_' */ : 00514 { 00515 match('_' /* charlit */ ); 00516 break; 00517 } 00518 case 0x7b /* '{' */ : 00519 { 00520 match('{' /* charlit */ ); 00521 break; 00522 } 00523 case 0x7c /* '|' */ : 00524 { 00525 match('|' /* charlit */ ); 00526 break; 00527 } 00528 case 0x7d /* '}' */ : 00529 { 00530 match('}' /* charlit */ ); 00531 break; 00532 } 00533 case 0x7e /* '~' */ : 00534 { 00535 match('~' /* charlit */ ); 00536 break; 00537 } 00538 default: 00539 { 00540 throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn()); 00541 } 00542 } 00543 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) { 00544 _token = makeToken(_ttype); 00545 _token->setText(text.substr(_begin, text.length()-_begin)); 00546 } 00547 _returnToken = _token; 00548 _saveIndex=0; 00549 }
| void CPTensorConfLexer::mNUMBER | ( | bool | _createToken | ) |
Definition at line 551 of file CPTensorConfLexer.cpp.
References mINT(), mREAL(), and NUMBER.
Referenced by nextToken().
00551 { 00552 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length(); 00553 _ttype = NUMBER; 00554 std::string::size_type _saveIndex; 00555 00556 { 00557 switch ( LA(1)) { 00558 case 0x2b /* '+' */ : 00559 { 00560 match('+' /* charlit */ ); 00561 break; 00562 } 00563 case 0x2d /* '-' */ : 00564 { 00565 match('-' /* charlit */ ); 00566 break; 00567 } 00568 case 0x2e /* '.' */ : 00569 case 0x30 /* '0' */ : 00570 case 0x31 /* '1' */ : 00571 case 0x32 /* '2' */ : 00572 case 0x33 /* '3' */ : 00573 case 0x34 /* '4' */ : 00574 case 0x35 /* '5' */ : 00575 case 0x36 /* '6' */ : 00576 case 0x37 /* '7' */ : 00577 case 0x38 /* '8' */ : 00578 case 0x39 /* '9' */ : 00579 { 00580 break; 00581 } 00582 default: 00583 { 00584 throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn()); 00585 } 00586 } 00587 } 00588 { 00589 bool synPredMatched38 = false; 00590 if (((_tokenSet_0.member(LA(1))) && (_tokenSet_0.member(LA(2))) && (true) && (true) && (true) && (true) && (true) && (true) && (true) && (true))) { 00591 int _m38 = mark(); 00592 synPredMatched38 = true; 00593 inputState->guessing++; 00594 try { 00595 { 00596 mREAL(false); 00597 } 00598 } 00599 catch (antlr::RecognitionException& pe) { 00600 synPredMatched38 = false; 00601 } 00602 rewind(_m38); 00603 inputState->guessing--; 00604 } 00605 if ( synPredMatched38 ) { 00606 mREAL(false); 00607 } 00608 else if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ )) && (true) && (true) && (true) && (true) && (true) && (true) && (true) && (true) && (true)) { 00609 mINT(false); 00610 } 00611 else { 00612 throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn()); 00613 } 00614 00615 } 00616 { 00617 if ((LA(1) == 0x65 /* 'e' */ )) { 00618 { 00619 match('e' /* charlit */ ); 00620 } 00621 { 00622 switch ( LA(1)) { 00623 case 0x2b /* '+' */ : 00624 { 00625 match('+' /* charlit */ ); 00626 break; 00627 } 00628 case 0x2d /* '-' */ : 00629 { 00630 match('-' /* charlit */ ); 00631 break; 00632 } 00633 case 0x30 /* '0' */ : 00634 case 0x31 /* '1' */ : 00635 case 0x32 /* '2' */ : 00636 case 0x33 /* '3' */ : 00637 case 0x34 /* '4' */ : 00638 case 0x35 /* '5' */ : 00639 case 0x36 /* '6' */ : 00640 case 0x37 /* '7' */ : 00641 case 0x38 /* '8' */ : 00642 case 0x39 /* '9' */ : 00643 { 00644 break; 00645 } 00646 default: 00647 { 00648 throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn()); 00649 } 00650 } 00651 } 00652 mINT(false); 00653 } 00654 else { 00655 } 00656 00657 } 00658 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) { 00659 _token = makeToken(_ttype); 00660 _token->setText(text.substr(_begin, text.length()-_begin)); 00661 } 00662 _returnToken = _token; 00663 _saveIndex=0; 00664 }
Here is the call graph for this function:

| void CPTensorConfLexer::mREAL | ( | bool | _createToken | ) | [protected] |
Definition at line 666 of file CPTensorConfLexer.cpp.
Referenced by mNUMBER().
00666 { 00667 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length(); 00668 _ttype = REAL; 00669 std::string::size_type _saveIndex; 00670 00671 { 00672 switch ( LA(1)) { 00673 case 0x2e /* '.' */ : 00674 { 00675 match('.' /* charlit */ ); 00676 mINT(false); 00677 break; 00678 } 00679 case 0x30 /* '0' */ : 00680 case 0x31 /* '1' */ : 00681 case 0x32 /* '2' */ : 00682 case 0x33 /* '3' */ : 00683 case 0x34 /* '4' */ : 00684 case 0x35 /* '5' */ : 00685 case 0x36 /* '6' */ : 00686 case 0x37 /* '7' */ : 00687 case 0x38 /* '8' */ : 00688 case 0x39 /* '9' */ : 00689 { 00690 mINT(false); 00691 match('.' /* charlit */ ); 00692 { 00693 if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) { 00694 mINT(false); 00695 } 00696 else { 00697 } 00698 00699 } 00700 break; 00701 } 00702 default: 00703 { 00704 throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn()); 00705 } 00706 } 00707 } 00708 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) { 00709 _token = makeToken(_ttype); 00710 _token->setText(text.substr(_begin, text.length()-_begin)); 00711 } 00712 _returnToken = _token; 00713 _saveIndex=0; 00714 }
Here is the call graph for this function:

| void CPTensorConfLexer::mINT | ( | bool | _createToken | ) | [protected] |
Definition at line 716 of file CPTensorConfLexer.cpp.
Referenced by mNUMBER(), and mREAL().
00716 { 00717 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length(); 00718 _ttype = INT; 00719 std::string::size_type _saveIndex; 00720 00721 { // ( ... )+ 00722 int _cnt53=0; 00723 for (;;) { 00724 if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) { 00725 mDIGIT(false); 00726 } 00727 else { 00728 if ( _cnt53>=1 ) { goto _loop53; } else {throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} 00729 } 00730 00731 _cnt53++; 00732 } 00733 _loop53:; 00734 } // ( ... )+ 00735 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) { 00736 _token = makeToken(_ttype); 00737 _token->setText(text.substr(_begin, text.length()-_begin)); 00738 } 00739 _returnToken = _token; 00740 _saveIndex=0; 00741 }
Here is the call graph for this function:

| void CPTensorConfLexer::mCOMMENT | ( | bool | _createToken | ) |
Definition at line 743 of file CPTensorConfLexer.cpp.
References COMMENT, and mNEWLINE().
Referenced by nextToken().
00743 { 00744 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length(); 00745 _ttype = COMMENT; 00746 std::string::size_type _saveIndex; 00747 00748 match('/' /* charlit */ ); 00749 match('/' /* charlit */ ); 00750 { // ( ... )* 00751 for (;;) { 00752 if ((_tokenSet_1.member(LA(1)))) { 00753 { 00754 match(_tokenSet_1); 00755 } 00756 } 00757 else { 00758 goto _loop45; 00759 } 00760 00761 } 00762 _loop45:; 00763 } // ( ... )* 00764 mNEWLINE(false); 00765 if ( inputState->guessing==0 ) { 00766 #line 94 "CPTensorConf.g" 00767 00768 _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP; 00769 00770 #line 771 "CPTensorConfLexer.cpp" 00771 } 00772 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) { 00773 _token = makeToken(_ttype); 00774 _token->setText(text.substr(_begin, text.length()-_begin)); 00775 } 00776 _returnToken = _token; 00777 _saveIndex=0; 00778 }
Here is the call graph for this function:

| void CPTensorConfLexer::mSCALEFACTORT | ( | bool | _createToken | ) |
Definition at line 780 of file CPTensorConfLexer.cpp.
References SCALEFACTORT.
Referenced by nextToken().
00780 { 00781 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length(); 00782 _ttype = SCALEFACTORT; 00783 std::string::size_type _saveIndex; 00784 00785 match("scalefactor"); 00786 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) { 00787 _token = makeToken(_ttype); 00788 _token->setText(text.substr(_begin, text.length()-_begin)); 00789 } 00790 _returnToken = _token; 00791 _saveIndex=0; 00792 }
| void CPTensorConfLexer::mNORMALIZET | ( | bool | _createToken | ) |
Definition at line 794 of file CPTensorConfLexer.cpp.
References NORMALIZET.
Referenced by nextToken().
00794 { 00795 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length(); 00796 _ttype = NORMALIZET; 00797 std::string::size_type _saveIndex; 00798 00799 match("normalize"); 00800 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) { 00801 _token = makeToken(_ttype); 00802 _token->setText(text.substr(_begin, text.length()-_begin)); 00803 } 00804 _returnToken = _token; 00805 _saveIndex=0; 00806 }
| void CPTensorConfLexer::mWRITETENSORT | ( | bool | _createToken | ) |
Definition at line 808 of file CPTensorConfLexer.cpp.
References WRITETENSORT.
Referenced by nextToken().
00808 { 00809 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length(); 00810 _ttype = WRITETENSORT; 00811 std::string::size_type _saveIndex; 00812 00813 match("writetensor"); 00814 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) { 00815 _token = makeToken(_ttype); 00816 _token->setText(text.substr(_begin, text.length()-_begin)); 00817 } 00818 _returnToken = _token; 00819 _saveIndex=0; 00820 }
| void CPTensorConfLexer::mWRITESERIALPARALLELT | ( | bool | _createToken | ) |
Definition at line 822 of file CPTensorConfLexer.cpp.
References WRITESERIALPARALLELT.
Referenced by nextToken().
00822 { 00823 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length(); 00824 _ttype = WRITESERIALPARALLELT; 00825 std::string::size_type _saveIndex; 00826 00827 match("writeserialparallel"); 00828 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) { 00829 _token = makeToken(_ttype); 00830 _token->setText(text.substr(_begin, text.length()-_begin)); 00831 } 00832 _returnToken = _token; 00833 _saveIndex=0; 00834 }
| void CPTensorConfLexer::mCALCERRT | ( | bool | _createToken | ) |
Definition at line 836 of file CPTensorConfLexer.cpp.
References CALCERRT.
Referenced by nextToken().
00836 { 00837 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length(); 00838 _ttype = CALCERRT; 00839 std::string::size_type _saveIndex; 00840 00841 match("calcerr"); 00842 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) { 00843 _token = makeToken(_ttype); 00844 _token->setText(text.substr(_begin, text.length()-_begin)); 00845 } 00846 _returnToken = _token; 00847 _saveIndex=0; 00848 }
1.5.1