Ticket #46260: _NscLib__NscContext.cpp.patch
File _NscLib__NscContext.cpp.patch, 5.9 KB (added by jmroot (Joshua Root), 10 years ago) |
---|
-
_NscLib/NscContext.cpp
old new read_another_line:; 230 230 if (pSymbol != NULL) 231 231 { 232 232 assert (pSymbol ->nSymType == NscSymType_Token); 233 if (pSymbol ->nToken == ENGINE_TYPE)233 if (pSymbol ->nToken == yy::parser::token::ENGINE_TYPE) 234 234 { 235 235 CNscPStackEntry *pEntry = GetPStackEntry (__FILE__, __LINE__); 236 236 pEntry ->SetType ((NscType) ( … … read_another_line:; 246 246 CNscPStackEntry *pEntry = GetPStackEntry (__FILE__, __LINE__); 247 247 pEntry ->SetIdentifier (pszStart, nCount); 248 248 *yylval = pEntry; 249 return IDENTIFIER;249 return yy::parser::token::IDENTIFIER; 250 250 } 251 251 } 252 252 … … read_another_line:; 305 305 pEntry ->SetType (NscType_Integer); 306 306 pEntry ->PushConstantInteger (nValue); 307 307 *yylval = pEntry; 308 return INTEGER_CONST;308 return yy::parser::token::INTEGER_CONST; 309 309 } 310 310 311 311 // … … read_another_line:; 359 359 { 360 360 pEntry ->SetType (NscType_Float); 361 361 pEntry ->PushConstantFloat ((float) atof (psz)); 362 return FLOAT_CONST;362 return yy::parser::token::FLOAT_CONST; 363 363 } 364 364 else 365 365 { 366 366 pEntry ->SetType (NscType_Integer); 367 367 pEntry ->PushConstantInteger (atol (psz)); 368 return INTEGER_CONST;368 return yy::parser::token::INTEGER_CONST; 369 369 } 370 370 } 371 371 } … … read_another_line:; 414 414 else if (c == '=') 415 415 { 416 416 m_pStreamTop ->pszNextTokenPos++; 417 return DIVEQ;417 return yy::parser::token::DIVEQ; 418 418 } 419 419 else 420 420 { … … read_another_line:; 441 441 if (c == '=') 442 442 { 443 443 m_pStreamTop ->pszNextTokenPos++; 444 return ADDEQ;444 return yy::parser::token::ADDEQ; 445 445 } 446 446 else if (c == '+') 447 447 { 448 448 m_pStreamTop ->pszNextTokenPos++; 449 return PLUSPLUS;449 return yy::parser::token::PLUSPLUS; 450 450 } 451 451 else 452 452 return '+'; … … read_another_line:; 457 457 if (c == '=') 458 458 { 459 459 m_pStreamTop ->pszNextTokenPos++; 460 return SUBEQ;460 return yy::parser::token::SUBEQ; 461 461 } 462 462 else if (c == '-') 463 463 { 464 464 m_pStreamTop ->pszNextTokenPos++; 465 return MINUSMINUS;465 return yy::parser::token::MINUSMINUS; 466 466 } 467 467 else 468 468 return '-'; … … read_another_line:; 473 473 if (c == '=') 474 474 { 475 475 m_pStreamTop ->pszNextTokenPos++; 476 return MULEQ;476 return yy::parser::token::MULEQ; 477 477 } 478 478 else 479 479 return '*'; … … read_another_line:; 484 484 if (c == '=') 485 485 { 486 486 m_pStreamTop ->pszNextTokenPos++; 487 return MODEQ;487 return yy::parser::token::MODEQ; 488 488 } 489 489 else 490 490 return '%'; … … read_another_line:; 495 495 if (c == '=') 496 496 { 497 497 m_pStreamTop ->pszNextTokenPos++; 498 return XOREQ;498 return yy::parser::token::XOREQ; 499 499 } 500 500 else 501 501 return '^'; … … read_another_line:; 506 506 if (c == '=') 507 507 { 508 508 m_pStreamTop ->pszNextTokenPos++; 509 return ANDEQ;509 return yy::parser::token::ANDEQ; 510 510 } 511 511 else if (c == '&') 512 512 { 513 513 m_pStreamTop ->pszNextTokenPos++; 514 return ANDAND;514 return yy::parser::token::ANDAND; 515 515 } 516 516 else 517 517 return '&'; … … read_another_line:; 522 522 if (c == '=') 523 523 { 524 524 m_pStreamTop ->pszNextTokenPos++; 525 return OREQ;525 return yy::parser::token::OREQ; 526 526 } 527 527 else if (c == '|') 528 528 { 529 529 m_pStreamTop ->pszNextTokenPos++; 530 return OROR;530 return yy::parser::token::OROR; 531 531 } 532 532 else 533 533 return '|'; … … read_another_line:; 538 538 if (c == '=') 539 539 { 540 540 m_pStreamTop ->pszNextTokenPos++; 541 return NOTEQ;541 return yy::parser::token::NOTEQ; 542 542 } 543 543 else 544 544 return '!'; … … read_another_line:; 549 549 if (c == '=') 550 550 { 551 551 m_pStreamTop ->pszNextTokenPos++; 552 return EQ;552 return yy::parser::token::EQ; 553 553 } 554 554 else 555 555 return '='; … … read_another_line:; 560 560 if (c == '=') 561 561 { 562 562 m_pStreamTop ->pszNextTokenPos++; 563 return LTEQ;563 return yy::parser::token::LTEQ; 564 564 } 565 565 else if (c == '<') 566 566 { … … read_another_line:; 569 569 if (c == '=') 570 570 { 571 571 m_pStreamTop ->pszNextTokenPos++; 572 return SLEQ;572 return yy::parser::token::SLEQ; 573 573 } 574 574 else 575 return SL;575 return yy::parser::token::SL; 576 576 } 577 577 else 578 578 return '<'; … … read_another_line:; 583 583 if (c == '=') 584 584 { 585 585 m_pStreamTop ->pszNextTokenPos++; 586 return GTEQ;586 return yy::parser::token::GTEQ; 587 587 } 588 588 else if (c == '>') 589 589 { … … read_another_line:; 592 592 if (c == '=') 593 593 { 594 594 m_pStreamTop ->pszNextTokenPos++; 595 return SREQ;595 return yy::parser::token::SREQ; 596 596 } 597 597 else if (c == '>') 598 598 { … … read_another_line:; 601 601 if (c == '=') 602 602 { 603 603 m_pStreamTop ->pszNextTokenPos++; 604 return USREQ;604 return yy::parser::token::USREQ; 605 605 } 606 606 else 607 return USR;607 return yy::parser::token::USR; 608 608 } 609 609 else 610 return SR;610 return yy::parser::token::SR; 611 611 } 612 612 else 613 613 return '>'; … … read_another_line:; 626 626 pEntry ->SetType (NscType_String); 627 627 pEntry ->PushConstantString (pszStart, (int) (pszOut - pszStart)); 628 628 *yylval = pEntry; 629 return STRING_CONST;629 return yy::parser::token::STRING_CONST; 630 630 } 631 631 else if (c == '\\') 632 632 { … … read_another_line:; 646 646 pEntry ->PushConstantString (pszStart, (int) (pszOut - pszStart)); 647 647 *yylval = pEntry; 648 648 GenerateError ("Unterminated string"); 649 return STRING_CONST;649 return yy::parser::token::STRING_CONST; 650 650 } 651 651 else 652 652 *pszOut++ = c; … … try_again:; 898 898 { 899 899 NscSymbol *pSymbol = g_sNscReservedWords .Add ( 900 900 pszVTmp, NscSymType_Token); 901 pSymbol ->nToken = ENGINE_TYPE;901 pSymbol ->nToken = yy::parser::token::ENGINE_TYPE; 902 902 pSymbol ->nEngineObject = nIndex; 903 903 } 904 904 }