Ejemplo n.º 1
0
    bool Parser::parseFloat (float value, const TokenLoc& loc, Scanner& scanner)
    {
        if (!(mOptional && mEmpty))
            reportSeriousError ("Unexpected floating point value", loc);
        else
            scanner.putbackFloat (value, loc);

        return false;
    }
Ejemplo n.º 2
0
    bool LineParser::parseFloat (float value, const TokenLoc& loc, Scanner& scanner)
    {
        if (mAllowExpression && mState==BeginState)
        {
            scanner.putbackFloat (value, loc);
            parseExpression (scanner, loc);
            return true;
        }

        return Parser::parseFloat (value, loc, scanner);
    }
Ejemplo n.º 3
0
    bool ExprParser::parseFloat (float value, const TokenLoc& loc, Scanner& scanner)
    {
        if (!mExplicit.empty())
            return Parser::parseFloat (value, loc, scanner);

        mFirst = false;
        
        if (mNextOperand)
        {    
            pushFloatLiteral (value);
            mTokenLoc = loc;
            return true;
        }            
        else
        {
            // no comma was used between arguments
            scanner.putbackFloat (value, loc);
            return false;
        }
    }