예제 #1
0
    bool Parser::parseInt (int value, const TokenLoc& loc, Scanner& scanner)
    {
        if (!(mOptional && mEmpty))
            reportSeriousError ("Unexpected numeric value", loc);
        else
            scanner.putbackInt (value, loc);

        return false;
    }
예제 #2
0
파일: lineparser.cpp 프로젝트: rafis/openmw
    bool LineParser::parseInt (int value, const TokenLoc& loc, Scanner& scanner)
    {
        if (mAllowExpression && mState==BeginState)
        {
            scanner.putbackInt (value, loc);
            parseExpression (scanner, loc);
            return true;
        }

        return Parser::parseInt (value, loc, scanner);
    }
예제 #3
0
 bool ExprParser::parseInt (int value, const TokenLoc& loc, Scanner& scanner)
 {
     if (!mExplicit.empty())
         return Parser::parseInt (value, loc, scanner);
 
     mFirst = false;
     
     if (mNextOperand)
     {       
         pushIntegerLiteral (value);
         mTokenLoc = loc;
         return true;
     }
     else
     {
         // no comma was used between arguments
         scanner.putbackInt (value, loc);
         return false;
     }
 }