Ticket #46260: _NscLib__NscContext.cpp.patch

File _NscLib__NscContext.cpp.patch, 5.9 KB (added by jmroot (Joshua Root), 9 years ago)
  • _NscLib/NscContext.cpp

    old new read_another_line:; 
    230230                if (pSymbol != NULL)
    231231                {
    232232                        assert (pSymbol ->nSymType == NscSymType_Token);
    233                         if (pSymbol ->nToken == ENGINE_TYPE)
     233                        if (pSymbol ->nToken == yy::parser::token::ENGINE_TYPE)
    234234                        {
    235235                                CNscPStackEntry *pEntry = GetPStackEntry (__FILE__, __LINE__);
    236236                                pEntry ->SetType ((NscType) (
    read_another_line:; 
    246246                        CNscPStackEntry *pEntry = GetPStackEntry (__FILE__, __LINE__);
    247247                        pEntry ->SetIdentifier (pszStart, nCount);
    248248                        *yylval = pEntry;
    249                         return IDENTIFIER;
     249                        return yy::parser::token::IDENTIFIER;
    250250                }
    251251        }
    252252
    read_another_line:; 
    305305                        pEntry ->SetType (NscType_Integer);
    306306                        pEntry ->PushConstantInteger (nValue);
    307307                        *yylval = pEntry;
    308                         return INTEGER_CONST;
     308                        return yy::parser::token::INTEGER_CONST;
    309309                }
    310310
    311311                //
    read_another_line:; 
    359359                        {
    360360                                pEntry ->SetType (NscType_Float);
    361361                                pEntry ->PushConstantFloat ((float) atof (psz));
    362                                 return FLOAT_CONST;
     362                                return yy::parser::token::FLOAT_CONST;
    363363                        }
    364364                        else
    365365                        {
    366366                                pEntry ->SetType (NscType_Integer);
    367367                                pEntry ->PushConstantInteger (atol (psz));
    368                                 return INTEGER_CONST;
     368                                return yy::parser::token::INTEGER_CONST;
    369369                        }
    370370                }
    371371        }
    read_another_line:; 
    414414                                else if (c == '=')
    415415                                {
    416416                                        m_pStreamTop ->pszNextTokenPos++;
    417                                         return DIVEQ;
     417                                        return yy::parser::token::DIVEQ;
    418418                                }
    419419                                else
    420420                                {
    read_another_line:; 
    441441                                if (c == '=')
    442442                                {
    443443                                        m_pStreamTop ->pszNextTokenPos++;
    444                                         return ADDEQ;
     444                                        return yy::parser::token::ADDEQ;
    445445                                }
    446446                                else if (c == '+')
    447447                                {
    448448                                        m_pStreamTop ->pszNextTokenPos++;
    449                                         return PLUSPLUS;
     449                                        return yy::parser::token::PLUSPLUS;
    450450                                }
    451451                                else
    452452                                        return '+';
    read_another_line:; 
    457457                                if (c == '=')
    458458                                {
    459459                                        m_pStreamTop ->pszNextTokenPos++;
    460                                         return SUBEQ;
     460                                        return yy::parser::token::SUBEQ;
    461461                                }
    462462                                else if (c == '-')
    463463                                {
    464464                                        m_pStreamTop ->pszNextTokenPos++;
    465                                         return MINUSMINUS;
     465                                        return yy::parser::token::MINUSMINUS;
    466466                                }
    467467                                else
    468468                                        return '-';
    read_another_line:; 
    473473                                if (c == '=')
    474474                                {
    475475                                        m_pStreamTop ->pszNextTokenPos++;
    476                                         return MULEQ;
     476                                        return yy::parser::token::MULEQ;
    477477                                }
    478478                                else
    479479                                        return '*';
    read_another_line:; 
    484484                                if (c == '=')
    485485                                {
    486486                                        m_pStreamTop ->pszNextTokenPos++;
    487                                         return MODEQ;
     487                                        return yy::parser::token::MODEQ;
    488488                                }
    489489                                else
    490490                                        return '%';
    read_another_line:; 
    495495                                if (c == '=')
    496496                                {
    497497                                        m_pStreamTop ->pszNextTokenPos++;
    498                                         return XOREQ;
     498                                        return yy::parser::token::XOREQ;
    499499                                }
    500500                                else
    501501                                        return '^';
    read_another_line:; 
    506506                                if (c == '=')
    507507                                {
    508508                                        m_pStreamTop ->pszNextTokenPos++;
    509                                         return ANDEQ;
     509                                        return yy::parser::token::ANDEQ;
    510510                                }
    511511                                else if (c == '&')
    512512                                {
    513513                                        m_pStreamTop ->pszNextTokenPos++;
    514                                         return ANDAND;
     514                                        return yy::parser::token::ANDAND;
    515515                                }
    516516                                else
    517517                                        return '&';
    read_another_line:; 
    522522                                if (c == '=')
    523523                                {
    524524                                        m_pStreamTop ->pszNextTokenPos++;
    525                                         return OREQ;
     525                                        return yy::parser::token::OREQ;
    526526                                }
    527527                                else if (c == '|')
    528528                                {
    529529                                        m_pStreamTop ->pszNextTokenPos++;
    530                                         return OROR;
     530                                        return yy::parser::token::OROR;
    531531                                }
    532532                                else
    533533                                        return '|';
    read_another_line:; 
    538538                                if (c == '=')
    539539                                {
    540540                                        m_pStreamTop ->pszNextTokenPos++;
    541                                         return NOTEQ;
     541                                        return yy::parser::token::NOTEQ;
    542542                                }
    543543                                else
    544544                                        return '!';
    read_another_line:; 
    549549                                if (c == '=')
    550550                                {
    551551                                        m_pStreamTop ->pszNextTokenPos++;
    552                                         return EQ;
     552                                        return yy::parser::token::EQ;
    553553                                }
    554554                                else
    555555                                        return '=';
    read_another_line:; 
    560560                                if (c == '=')
    561561                                {
    562562                                        m_pStreamTop ->pszNextTokenPos++;
    563                                         return LTEQ;
     563                                        return yy::parser::token::LTEQ;
    564564                                }
    565565                                else if (c == '<')
    566566                                {
    read_another_line:; 
    569569                                        if (c == '=')
    570570                                        {
    571571                                                m_pStreamTop ->pszNextTokenPos++;
    572                                                 return SLEQ;
     572                                                return yy::parser::token::SLEQ;
    573573                                        }
    574574                                        else
    575                                                 return SL;
     575                                                return yy::parser::token::SL;
    576576                                }
    577577                                else
    578578                                        return '<';
    read_another_line:; 
    583583                                if (c == '=')
    584584                                {
    585585                                        m_pStreamTop ->pszNextTokenPos++;
    586                                         return GTEQ;
     586                                        return yy::parser::token::GTEQ;
    587587                                }
    588588                                else if (c == '>')
    589589                                {
    read_another_line:; 
    592592                                        if (c == '=')
    593593                                        {
    594594                                                m_pStreamTop ->pszNextTokenPos++;
    595                                                 return SREQ;
     595                                                return yy::parser::token::SREQ;
    596596                                        }
    597597                                        else if (c == '>')
    598598                                        {
    read_another_line:; 
    601601                                                if (c == '=')
    602602                                                {
    603603                                                        m_pStreamTop ->pszNextTokenPos++;
    604                                                         return USREQ;
     604                                                        return yy::parser::token::USREQ;
    605605                                                }
    606606                                                else
    607                                                         return USR;
     607                                                        return yy::parser::token::USR;
    608608                                        }
    609609                                        else
    610                                                 return SR;
     610                                                return yy::parser::token::SR;
    611611                                }
    612612                                else
    613613                                        return '>';
    read_another_line:; 
    626626                                                        pEntry ->SetType (NscType_String);
    627627                                                        pEntry ->PushConstantString (pszStart, (int) (pszOut - pszStart));
    628628                                                        *yylval = pEntry;
    629                                                         return STRING_CONST;
     629                                                        return yy::parser::token::STRING_CONST;
    630630                                                }
    631631                                                else if (c == '\\')
    632632                                                {
    read_another_line:; 
    646646                                                        pEntry ->PushConstantString (pszStart, (int) (pszOut - pszStart));
    647647                                                        *yylval = pEntry;
    648648                                                        GenerateError ("Unterminated string");
    649                                                         return STRING_CONST;
     649                                                        return yy::parser::token::STRING_CONST;
    650650                                                }
    651651                                                else
    652652                                                        *pszOut++ = c;
    try_again:; 
    898898                                        {
    899899                                                NscSymbol *pSymbol = g_sNscReservedWords .Add (
    900900                                                        pszVTmp, NscSymType_Token);
    901                                                 pSymbol ->nToken = ENGINE_TYPE;
     901                                                pSymbol ->nToken = yy::parser::token::ENGINE_TYPE;
    902902                                                pSymbol ->nEngineObject = nIndex;
    903903                                        }
    904904                                }