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


Public Member Functions | |
| void | initializeASTFactory (antlr::ASTFactory &factory) |
| EDIParser (antlr::TokenBuffer &tokenBuf) | |
| EDIParser (antlr::TokenStream &lexer) | |
| EDIParser (const antlr::ParserSharedInputState &state) | |
| int | getNumTokens () const |
| const char * | getTokenName (int type) const |
| const char *const * | getTokenNames () const |
| void | option () |
| double | lat_long () |
| double | datavalue () |
| void | option_list () |
| void | head_block () |
| void | info_block () |
| void | info_text () |
| void | emeas_block () |
| void | hmeas_block () |
| void | def_meas_section () |
| void | spectrasect_block () |
| void | spectra_block () |
| void | spectra_section () |
| void | mtsect_block () |
| void | mt_complex_data_block () |
| void | mt_real_data_block () |
| void | mt_section () |
| void | end_block () |
| void | edi_file () |
| antlr::RefAST | getAST () |
Public Attributes | |
| trealdata | frequency |
| trealdata | rotangles |
| CMTDataComp | DataXX |
| CMTDataComp | DataXY |
| CMTDataComp | DataYX |
| CMTDataComp | DataYY |
| CMTDataComp | DataZX |
| CMTDataComp | DataZY |
| double | latitude |
| double | longitude |
| double | elevation |
| double | azimuth |
| std::string | name |
| bool | tassigned |
| bool | zassigned |
| bool | rassigned |
Protected Member Functions | |
| EDIParser (antlr::TokenBuffer &tokenBuf, int k) | |
| EDIParser (antlr::TokenStream &lexer, int k) | |
Protected Attributes | |
| antlr::RefAST | returnAST |
Definition at line 20 of file EDIParser.hpp.
| EDIParser::EDIParser | ( | antlr::TokenBuffer & | tokenBuf, | |
| int | k | |||
| ) | [protected] |
| EDIParser::EDIParser | ( | antlr::TokenBuffer & | tokenBuf | ) |
| EDIParser::EDIParser | ( | antlr::TokenStream & | lexer, | |
| int | k | |||
| ) | [protected] |
| EDIParser::EDIParser | ( | antlr::TokenStream & | lexer | ) |
| EDIParser::EDIParser | ( | const antlr::ParserSharedInputState & | state | ) |
| void EDIParser::initializeASTFactory | ( | antlr::ASTFactory & | factory | ) |
| int EDIParser::getNumTokens | ( | ) | const [inline] |
| const char* EDIParser::getTokenName | ( | int | type | ) | const [inline] |
Definition at line 64 of file EDIParser.hpp.
00065 { 00066 if( type > getNumTokens() ) return 0; 00067 return EDIParser::tokenNames[type]; 00068 }
| const char* const* EDIParser::getTokenNames | ( | ) | const [inline] |
| void EDIParser::option | ( | ) |
Definition at line 33 of file EDIParser.cpp.
References azimuth, COLON, datavalue(), DATE, elevation, EQUAL, lat_long(), latitude, LITERAL_AZIMUTH, LITERAL_ELEVATION, LITERAL_LATITUDE, LITERAL_LONGITUDE, LITERAL_NFREQ, LITERAL_REFLAT, LITERAL_REFLONG, longitude, NUMBER, REAL, and STRING.
Referenced by option_list().
00033 { 00034 antlr::RefToken a = antlr::nullToken; 00035 #line 50 "EdiParser2.g" 00036 double currvalue; bool isint = false; double *currdouble; 00037 #line 38 "EDIParser.cpp" 00038 00039 try { // for error handling 00040 { 00041 switch ( LA(1)) { 00042 case LITERAL_NFREQ: 00043 { 00044 match(LITERAL_NFREQ); 00045 if ( inputState->guessing==0 ) { 00046 #line 52 "EdiParser2.g" 00047 isint = true; currdouble = NULL; 00048 #line 49 "EDIParser.cpp" 00049 } 00050 break; 00051 } 00052 case LITERAL_LATITUDE: 00053 { 00054 match(LITERAL_LATITUDE); 00055 if ( inputState->guessing==0 ) { 00056 #line 53 "EdiParser2.g" 00057 isint = false; currdouble = &latitude; 00058 #line 59 "EDIParser.cpp" 00059 } 00060 break; 00061 } 00062 case LITERAL_LONGITUDE: 00063 { 00064 match(LITERAL_LONGITUDE); 00065 if ( inputState->guessing==0 ) { 00066 #line 54 "EdiParser2.g" 00067 isint = false; currdouble = &longitude; 00068 #line 69 "EDIParser.cpp" 00069 } 00070 break; 00071 } 00072 case LITERAL_AZIMUTH: 00073 { 00074 match(LITERAL_AZIMUTH); 00075 if ( inputState->guessing==0 ) { 00076 #line 55 "EdiParser2.g" 00077 isint = false; currdouble = &azimuth; 00078 #line 79 "EDIParser.cpp" 00079 } 00080 break; 00081 } 00082 case LITERAL_ELEVATION: 00083 { 00084 match(LITERAL_ELEVATION); 00085 if ( inputState->guessing==0 ) { 00086 #line 56 "EdiParser2.g" 00087 isint = false; currdouble = &elevation; 00088 #line 89 "EDIParser.cpp" 00089 } 00090 break; 00091 } 00092 case LITERAL_REFLONG: 00093 { 00094 match(LITERAL_REFLONG); 00095 if ( inputState->guessing==0 ) { 00096 #line 57 "EdiParser2.g" 00097 isint = false; currdouble = &longitude; 00098 #line 99 "EDIParser.cpp" 00099 } 00100 break; 00101 } 00102 case LITERAL_REFLAT: 00103 { 00104 match(LITERAL_REFLAT); 00105 if ( inputState->guessing==0 ) { 00106 #line 58 "EdiParser2.g" 00107 isint = false; currdouble = &latitude; 00108 #line 109 "EDIParser.cpp" 00109 } 00110 break; 00111 } 00112 case STRING: 00113 { 00114 a = LT(1); 00115 match(STRING); 00116 if ( inputState->guessing==0 ) { 00117 #line 59 "EdiParser2.g" 00118 currdouble = NULL; isint = false; 00119 #line 120 "EDIParser.cpp" 00120 } 00121 break; 00122 } 00123 default: 00124 { 00125 throw antlr::NoViableAltException(LT(1), getFilename()); 00126 } 00127 } 00128 } 00129 match(EQUAL); 00130 { 00131 switch ( LA(1)) { 00132 case DATE: 00133 { 00134 match(DATE); 00135 break; 00136 } 00137 case STRING: 00138 { 00139 match(STRING); 00140 break; 00141 } 00142 default: 00143 bool synPredMatched7 = false; 00144 if (((LA(1) == NUMBER) && (LA(2) == COLON) && (LA(3) == NUMBER) && (LA(4) == COLON) && (LA(5) == NUMBER) && ((LA(6) >= LITERAL_NFREQ && LA(6) <= REAL)) && (_tokenSet_0.member(LA(7))) && (_tokenSet_0.member(LA(8))) && (_tokenSet_0.member(LA(9))) && (_tokenSet_0.member(LA(10))))) { 00145 int _m7 = mark(); 00146 synPredMatched7 = true; 00147 inputState->guessing++; 00148 try { 00149 { 00150 lat_long(); 00151 } 00152 } 00153 catch (antlr::RecognitionException& pe) { 00154 synPredMatched7 = false; 00155 } 00156 rewind(_m7); 00157 inputState->guessing--; 00158 } 00159 if ( synPredMatched7 ) { 00160 currvalue=lat_long(); 00161 } 00162 else { 00163 bool synPredMatched9 = false; 00164 if (((LA(1) == NUMBER) && ((LA(2) >= LITERAL_NFREQ && LA(2) <= REAL)) && (_tokenSet_0.member(LA(3))) && (_tokenSet_0.member(LA(4))) && (_tokenSet_0.member(LA(5))) && (_tokenSet_0.member(LA(6))) && (_tokenSet_0.member(LA(7))) && (_tokenSet_0.member(LA(8))) && (_tokenSet_0.member(LA(9))) && (_tokenSet_0.member(LA(10))))) { 00165 int _m9 = mark(); 00166 synPredMatched9 = true; 00167 inputState->guessing++; 00168 try { 00169 { 00170 match(NUMBER); 00171 } 00172 } 00173 catch (antlr::RecognitionException& pe) { 00174 synPredMatched9 = false; 00175 } 00176 rewind(_m9); 00177 inputState->guessing--; 00178 } 00179 if ( synPredMatched9 ) { 00180 currvalue=datavalue(); 00181 } 00182 else { 00183 throw antlr::NoViableAltException(LT(1), getFilename()); 00184 } 00185 }} 00186 } 00187 if ( inputState->guessing==0 ) { 00188 #line 65 "EdiParser2.g" 00189 if (isint) 00190 { nfreq = int(currvalue);} 00191 else 00192 if (currdouble != NULL) *currdouble = currvalue; 00193 #line 194 "EDIParser.cpp" 00194 } 00195 } 00196 catch (antlr::RecognitionException& ex) { 00197 if( inputState->guessing == 0 ) { 00198 reportError(ex); 00199 recover(ex,_tokenSet_1); 00200 } else { 00201 throw; 00202 } 00203 } 00204 }
Here is the call graph for this function:

| double EDIParser::lat_long | ( | ) |
Definition at line 206 of file EDIParser.cpp.
References COLON, and datavalue().
Referenced by option().
00206 { 00207 #line 209 "EdiParser2.g" 00208 double r; 00209 #line 210 "EDIParser.cpp" 00210 #line 209 "EdiParser2.g" 00211 double v1=0; double v2=0; double v3=0; 00212 #line 213 "EDIParser.cpp" 00213 00214 try { // for error handling 00215 v1=datavalue(); 00216 match(COLON); 00217 v2=datavalue(); 00218 match(COLON); 00219 v3=datavalue(); 00220 if ( inputState->guessing==0 ) { 00221 #line 212 "EdiParser2.g" 00222 00223 if (v1 > 0) 00224 r = v1 + v2/60. + v3/3600.; 00225 else 00226 r = v1 - v2/60. - v3/3600.; 00227 00228 #line 229 "EDIParser.cpp" 00229 } 00230 } 00231 catch (antlr::RecognitionException& ex) { 00232 if( inputState->guessing == 0 ) { 00233 reportError(ex); 00234 recover(ex,_tokenSet_1); 00235 } else { 00236 throw; 00237 } 00238 } 00239 return r; 00240 }
Here is the call graph for this function:

| double EDIParser::datavalue | ( | ) |
Definition at line 242 of file EDIParser.cpp.
References NUMBER.
Referenced by lat_long(), mt_complex_data_block(), mt_real_data_block(), option(), and spectra_block().
00242 { 00243 #line 221 "EdiParser2.g" 00244 double r; 00245 #line 246 "EDIParser.cpp" 00246 antlr::RefToken currvalue = antlr::nullToken; 00247 00248 try { // for error handling 00249 currvalue = LT(1); 00250 match(NUMBER); 00251 if ( inputState->guessing==0 ) { 00252 #line 223 "EdiParser2.g" 00253 convert(currvalue->getText(),r); 00254 #line 255 "EDIParser.cpp" 00255 } 00256 } 00257 catch (antlr::RecognitionException& ex) { 00258 if( inputState->guessing == 0 ) { 00259 reportError(ex); 00260 recover(ex,_tokenSet_1); 00261 } else { 00262 throw; 00263 } 00264 } 00265 return r; 00266 }
| void EDIParser::option_list | ( | ) |
Definition at line 268 of file EDIParser.cpp.
References DATE, EQUAL, LITERAL_NFREQ, NUMBER, option(), REAL, and STRING.
Referenced by def_meas_section(), emeas_block(), head_block(), hmeas_block(), info_block(), mt_complex_data_block(), mt_real_data_block(), mtsect_block(), spectra_block(), and spectrasect_block().
00268 { 00269 00270 try { // for error handling 00271 { // ( ... )* 00272 for (;;) { 00273 if (((LA(1) >= LITERAL_NFREQ && LA(1) <= STRING)) && (LA(2) == EQUAL) && (LA(3) == STRING || LA(3) == DATE || LA(3) == NUMBER) && ((LA(4) >= LITERAL_NFREQ && LA(4) <= REAL)) && (_tokenSet_0.member(LA(5))) && (_tokenSet_0.member(LA(6))) && (_tokenSet_0.member(LA(7))) && (_tokenSet_0.member(LA(8))) && (_tokenSet_0.member(LA(9))) && (_tokenSet_0.member(LA(10)))) { 00274 option(); 00275 } 00276 else { 00277 goto _loop12; 00278 } 00279 00280 } 00281 _loop12:; 00282 } // ( ... )* 00283 } 00284 catch (antlr::RecognitionException& ex) { 00285 if( inputState->guessing == 0 ) { 00286 reportError(ex); 00287 recover(ex,_tokenSet_1); 00288 } else { 00289 throw; 00290 } 00291 } 00292 }
Here is the call graph for this function:

| void EDIParser::head_block | ( | ) |
Definition at line 294 of file EDIParser.cpp.
References HEAD, and option_list().
Referenced by edi_file().
00294 { 00295 00296 try { // for error handling 00297 match(HEAD); 00298 option_list(); 00299 } 00300 catch (antlr::RecognitionException& ex) { 00301 if( inputState->guessing == 0 ) { 00302 reportError(ex); 00303 recover(ex,_tokenSet_1); 00304 } else { 00305 throw; 00306 } 00307 } 00308 }
Here is the call graph for this function:

| void EDIParser::info_block | ( | ) |
Definition at line 310 of file EDIParser.cpp.
References option_list().
Referenced by edi_file().
00310 { 00311 00312 try { // for error handling 00313 match(16); 00314 option_list(); 00315 } 00316 catch (antlr::RecognitionException& ex) { 00317 if( inputState->guessing == 0 ) { 00318 reportError(ex); 00319 recover(ex,_tokenSet_1); 00320 } else { 00321 throw; 00322 } 00323 } 00324 }
Here is the call graph for this function:

| void EDIParser::info_text | ( | ) |
Definition at line 326 of file EDIParser.cpp.
References SPECIAL.
Referenced by edi_file().
00326 { 00327 00328 try { // for error handling 00329 { // ( ... )* 00330 for (;;) { 00331 if ((_tokenSet_2.member(LA(1)))) { 00332 matchNot(SPECIAL); 00333 } 00334 else { 00335 goto _loop17; 00336 } 00337 00338 } 00339 _loop17:; 00340 } // ( ... )* 00341 match(SPECIAL); 00342 } 00343 catch (antlr::RecognitionException& ex) { 00344 if( inputState->guessing == 0 ) { 00345 reportError(ex); 00346 recover(ex,_tokenSet_3); 00347 } else { 00348 throw; 00349 } 00350 } 00351 }
| void EDIParser::emeas_block | ( | ) |
Definition at line 353 of file EDIParser.cpp.
References option_list().
Referenced by def_meas_section().
00353 { 00354 00355 try { // for error handling 00356 match(18); 00357 option_list(); 00358 } 00359 catch (antlr::RecognitionException& ex) { 00360 if( inputState->guessing == 0 ) { 00361 reportError(ex); 00362 recover(ex,_tokenSet_4); 00363 } else { 00364 throw; 00365 } 00366 } 00367 }
Here is the call graph for this function:

| void EDIParser::hmeas_block | ( | ) |
Definition at line 369 of file EDIParser.cpp.
References option_list().
Referenced by def_meas_section().
00369 { 00370 00371 try { // for error handling 00372 match(19); 00373 option_list(); 00374 } 00375 catch (antlr::RecognitionException& ex) { 00376 if( inputState->guessing == 0 ) { 00377 reportError(ex); 00378 recover(ex,_tokenSet_4); 00379 } else { 00380 throw; 00381 } 00382 } 00383 }
Here is the call graph for this function:

| void EDIParser::def_meas_section | ( | ) |
Definition at line 385 of file EDIParser.cpp.
References emeas_block(), EQUAL, hmeas_block(), LITERAL_DEFINEMEAS, and option_list().
Referenced by edi_file().
00385 { 00386 00387 try { // for error handling 00388 match(EQUAL); 00389 match(LITERAL_DEFINEMEAS); 00390 option_list(); 00391 { // ( ... )+ 00392 int _cnt22=0; 00393 for (;;) { 00394 switch ( LA(1)) { 00395 case 18: 00396 { 00397 emeas_block(); 00398 break; 00399 } 00400 case 19: 00401 { 00402 hmeas_block(); 00403 break; 00404 } 00405 default: 00406 { 00407 if ( _cnt22>=1 ) { goto _loop22; } else {throw antlr::NoViableAltException(LT(1), getFilename());} 00408 } 00409 } 00410 _cnt22++; 00411 } 00412 _loop22:; 00413 } // ( ... )+ 00414 } 00415 catch (antlr::RecognitionException& ex) { 00416 if( inputState->guessing == 0 ) { 00417 reportError(ex); 00418 recover(ex,_tokenSet_5); 00419 } else { 00420 throw; 00421 } 00422 } 00423 }
Here is the call graph for this function:

| void EDIParser::spectrasect_block | ( | ) |
Definition at line 425 of file EDIParser.cpp.
References EQUAL, INT, LITERAL_SPECTRASET, NUMBER, option_list(), and SPECIAL.
Referenced by spectra_section().
00425 { 00426 00427 try { // for error handling 00428 match(SPECIAL); 00429 match(EQUAL); 00430 match(LITERAL_SPECTRASET); 00431 option_list(); 00432 { 00433 switch ( LA(1)) { 00434 case 22: 00435 { 00436 match(22); 00437 match(INT); 00438 break; 00439 } 00440 case NUMBER: 00441 { 00442 break; 00443 } 00444 default: 00445 { 00446 throw antlr::NoViableAltException(LT(1), getFilename()); 00447 } 00448 } 00449 } 00450 { // ( ... )+ 00451 int _cnt26=0; 00452 for (;;) { 00453 if ((LA(1) == NUMBER)) { 00454 match(NUMBER); 00455 } 00456 else { 00457 if ( _cnt26>=1 ) { goto _loop26; } else {throw antlr::NoViableAltException(LT(1), getFilename());} 00458 } 00459 00460 _cnt26++; 00461 } 00462 _loop26:; 00463 } // ( ... )+ 00464 } 00465 catch (antlr::RecognitionException& ex) { 00466 if( inputState->guessing == 0 ) { 00467 reportError(ex); 00468 recover(ex,_tokenSet_5); 00469 } else { 00470 throw; 00471 } 00472 } 00473 }
Here is the call graph for this function:

| void EDIParser::spectra_block | ( | ) |
Definition at line 475 of file EDIParser.cpp.
References datavalue(), LITERAL_SPECTRA, NUMBER, option_list(), and SPECIAL.
Referenced by spectra_section().
00475 { 00476 00477 try { // for error handling 00478 match(SPECIAL); 00479 match(LITERAL_SPECTRA); 00480 option_list(); 00481 match(25); 00482 { // ( ... )+ 00483 int _cnt29=0; 00484 for (;;) { 00485 if ((LA(1) == NUMBER)) { 00486 datavalue(); 00487 } 00488 else { 00489 if ( _cnt29>=1 ) { goto _loop29; } else {throw antlr::NoViableAltException(LT(1), getFilename());} 00490 } 00491 00492 _cnt29++; 00493 } 00494 _loop29:; 00495 } // ( ... )+ 00496 } 00497 catch (antlr::RecognitionException& ex) { 00498 if( inputState->guessing == 0 ) { 00499 reportError(ex); 00500 recover(ex,_tokenSet_5); 00501 } else { 00502 throw; 00503 } 00504 } 00505 }
Here is the call graph for this function:

| void EDIParser::spectra_section | ( | ) |
Definition at line 507 of file EDIParser.cpp.
References LITERAL_SPECTRA, SPECIAL, spectra_block(), and spectrasect_block().
Referenced by edi_file().
00507 { 00508 00509 try { // for error handling 00510 spectrasect_block(); 00511 { // ( ... )* 00512 for (;;) { 00513 if ((LA(1) == SPECIAL) && (LA(2) == LITERAL_SPECTRA)) { 00514 spectra_block(); 00515 } 00516 else { 00517 goto _loop32; 00518 } 00519 00520 } 00521 _loop32:; 00522 } // ( ... )* 00523 } 00524 catch (antlr::RecognitionException& ex) { 00525 if( inputState->guessing == 0 ) { 00526 reportError(ex); 00527 recover(ex,_tokenSet_5); 00528 } else { 00529 throw; 00530 } 00531 } 00532 }
Here is the call graph for this function:

| void EDIParser::mtsect_block | ( | ) |
Definition at line 534 of file EDIParser.cpp.
References EQUAL, LITERAL_MTSECT, option_list(), and SPECIAL.
Referenced by mt_section().
00534 { 00535 00536 try { // for error handling 00537 match(SPECIAL); 00538 match(EQUAL); 00539 match(LITERAL_MTSECT); 00540 option_list(); 00541 } 00542 catch (antlr::RecognitionException& ex) { 00543 if( inputState->guessing == 0 ) { 00544 reportError(ex); 00545 recover(ex,_tokenSet_6); 00546 } else { 00547 throw; 00548 } 00549 } 00550 }
Here is the call graph for this function:

| void EDIParser::mt_complex_data_block | ( | ) |
Definition at line 552 of file EDIParser.cpp.
References datavalue(), DataXX, DataXY, DataYX, DataYY, DataZX, DataZY, NUMBER, option_list(), SLASH, and CMTDataComp::Z.
Referenced by mt_section().
00552 { 00553 #line 113 "EdiParser2.g" 00554 double ldnfreq; int lnfreq; double currvalue; int currindex = 0; pcompdata currvect; 00555 std::complex<double> localconv; 00556 #line 557 "EDIParser.cpp" 00557 00558 try { // for error handling 00559 { 00560 switch ( LA(1)) { 00561 case 27: 00562 { 00563 match(27); 00564 if ( inputState->guessing==0 ) { 00565 #line 117 "EdiParser2.g" 00566 currvect = &DataXX.Z; localconv = convfactor; 00567 #line 568 "EDIParser.cpp" 00568 } 00569 break; 00570 } 00571 case 28: 00572 { 00573 match(28); 00574 if ( inputState->guessing==0 ) { 00575 #line 118 "EdiParser2.g" 00576 currvect = &DataXX.Z; localconv = I * convfactor; 00577 #line 578 "EDIParser.cpp" 00578 } 00579 break; 00580 } 00581 case 29: 00582 { 00583 match(29); 00584 if ( inputState->guessing==0 ) { 00585 #line 119 "EdiParser2.g" 00586 currvect = &DataXY.Z; localconv = convfactor; 00587 #line 588 "EDIParser.cpp" 00588 } 00589 break; 00590 } 00591 case 30: 00592 { 00593 match(30); 00594 if ( inputState->guessing==0 ) { 00595 #line 120 "EdiParser2.g" 00596 currvect = &DataXY.Z; localconv = I * convfactor; 00597 #line 598 "EDIParser.cpp" 00598 } 00599 break; 00600 } 00601 case 31: 00602 { 00603 match(31); 00604 if ( inputState->guessing==0 ) { 00605 #line 121 "EdiParser2.g" 00606 currvect = &DataYX.Z; localconv = convfactor; 00607 #line 608 "EDIParser.cpp" 00608 } 00609 break; 00610 } 00611 case 32: 00612 { 00613 match(32); 00614 if ( inputState->guessing==0 ) { 00615 #line 122 "EdiParser2.g" 00616 currvect = &DataYX.Z; localconv = I * convfactor; 00617 #line 618 "EDIParser.cpp" 00618 } 00619 break; 00620 } 00621 case 33: 00622 { 00623 match(33); 00624 if ( inputState->guessing==0 ) { 00625 #line 123 "EdiParser2.g" 00626 currvect = &DataYY.Z; localconv = convfactor; 00627 #line 628 "EDIParser.cpp" 00628 } 00629 break; 00630 } 00631 case 34: 00632 { 00633 match(34); 00634 if ( inputState->guessing==0 ) { 00635 #line 124 "EdiParser2.g" 00636 currvect = &DataYY.Z; localconv = I * convfactor; 00637 #line 638 "EDIParser.cpp" 00638 } 00639 break; 00640 } 00641 case 35: 00642 { 00643 match(35); 00644 if ( inputState->guessing==0 ) { 00645 #line 125 "EdiParser2.g" 00646 currvect = &DataZX.Z; localconv = convfactor; 00647 #line 648 "EDIParser.cpp" 00648 } 00649 break; 00650 } 00651 case 36: 00652 { 00653 match(36); 00654 if ( inputState->guessing==0 ) { 00655 #line 126 "EdiParser2.g" 00656 currvect = &DataZX.Z; localconv = I * convfactor; 00657 #line 658 "EDIParser.cpp" 00658 } 00659 break; 00660 } 00661 case 37: 00662 { 00663 match(37); 00664 if ( inputState->guessing==0 ) { 00665 #line 127 "EdiParser2.g" 00666 currvect = &DataZY.Z; localconv = convfactor; 00667 #line 668 "EDIParser.cpp" 00668 } 00669 break; 00670 } 00671 case 38: 00672 { 00673 match(38); 00674 if ( inputState->guessing==0 ) { 00675 #line 128 "EdiParser2.g" 00676 currvect = &DataZY.Z; localconv = I * convfactor; 00677 #line 678 "EDIParser.cpp" 00678 } 00679 break; 00680 } 00681 default: 00682 { 00683 throw antlr::NoViableAltException(LT(1), getFilename()); 00684 } 00685 } 00686 } 00687 if ( inputState->guessing==0 ) { 00688 #line 129 "EdiParser2.g" 00689 if (currvect->empty()) currvect->assign(nfreq,0); 00690 #line 691 "EDIParser.cpp" 00691 } 00692 option_list(); 00693 match(SLASH); 00694 match(SLASH); 00695 ldnfreq=datavalue(); 00696 if ( inputState->guessing==0 ) { 00697 #line 130 "EdiParser2.g" 00698 lnfreq = int(ldnfreq); 00699 #line 700 "EDIParser.cpp" 00700 } 00701 if (!(lnfreq == nfreq)) 00702 throw antlr::SemanticException("lnfreq == nfreq"); 00703 { // ( ... )+ 00704 int _cnt37=0; 00705 for (;;) { 00706 if ((LA(1) == NUMBER)) { 00707 currvalue=datavalue(); 00708 if ( inputState->guessing==0 ) { 00709 #line 133 "EdiParser2.g" 00710 currvect->at(currindex) += localconv * currvalue; currindex++; 00711 #line 712 "EDIParser.cpp" 00712 } 00713 } 00714 else { 00715 if ( _cnt37>=1 ) { goto _loop37; } else {throw antlr::NoViableAltException(LT(1), getFilename());} 00716 } 00717 00718 _cnt37++; 00719 } 00720 _loop37:; 00721 } // ( ... )+ 00722 if ( inputState->guessing==0 ) { 00723 #line 134 "EdiParser2.g" 00724 #line 725 "EDIParser.cpp" 00725 } 00726 } 00727 catch (antlr::RecognitionException& ex) { 00728 if( inputState->guessing == 0 ) { 00729 reportError(ex); 00730 recover(ex,_tokenSet_7); 00731 } else { 00732 throw; 00733 } 00734 } 00735 }
Here is the call graph for this function:

| void EDIParser::mt_real_data_block | ( | ) |
Definition at line 737 of file EDIParser.cpp.
References datavalue(), DataXX, DataXY, DataYX, DataYY, DataZX, DataZY, CMTDataComp::dZ, frequency, KEYWORD, NUMBER, option_list(), rotangles, and SLASH.
Referenced by mt_section().
00737 { 00738 antlr::RefToken k = antlr::nullToken; 00739 #line 136 "EdiParser2.g" 00740 double ldnfreq; int lnfreq; double currvalue; int currindex = 0; prealdata currvect; 00741 #line 742 "EDIParser.cpp" 00742 00743 try { // for error handling 00744 { 00745 switch ( LA(1)) { 00746 case 40: 00747 { 00748 match(40); 00749 if ( inputState->guessing==0 ) { 00750 #line 139 "EdiParser2.g" 00751 currvect = &frequency; 00752 #line 753 "EDIParser.cpp" 00753 } 00754 break; 00755 } 00756 case 41: 00757 { 00758 match(41); 00759 if ( inputState->guessing==0 ) { 00760 #line 140 "EdiParser2.g" 00761 currvect = &DataXX.dZ; 00762 #line 763 "EDIParser.cpp" 00763 } 00764 break; 00765 } 00766 case 42: 00767 { 00768 match(42); 00769 if ( inputState->guessing==0 ) { 00770 #line 141 "EdiParser2.g" 00771 currvect = &DataXX.dZ; 00772 #line 773 "EDIParser.cpp" 00773 } 00774 break; 00775 } 00776 case 43: 00777 { 00778 match(43); 00779 if ( inputState->guessing==0 ) { 00780 #line 142 "EdiParser2.g" 00781 currvect = &DataXX.dZ; 00782 #line 783 "EDIParser.cpp" 00783 } 00784 break; 00785 } 00786 case 44: 00787 { 00788 match(44); 00789 if ( inputState->guessing==0 ) { 00790 #line 143 "EdiParser2.g" 00791 currvect = &DataXY.dZ;