Eval: Removed unused ::compileExpression override

This commit is contained in:
Paul Beckingham 2015-10-28 20:54:03 -04:00
parent 64bf571c13
commit b7bbd96b62
2 changed files with 0 additions and 28 deletions

View file

@ -165,33 +165,6 @@ void Eval::evaluatePostfixExpression (const std::string& e, Variant& v) const
evaluatePostfixStack (tokens, v); evaluatePostfixStack (tokens, v);
} }
////////////////////////////////////////////////////////////////////////////////
void Eval::compileExpression (const std::string& e)
{
// Reduce e to a vector of tokens.
Lexer l (e);
std::string token;
Lexer::Type type;
while (l.token (token, type))
{
if (_debug)
context.debug ("Lexer '" + token + "' " + Lexer::typeToString (type));
_compiled.push_back (std::pair <std::string, Lexer::Type> (token, type));
}
// Parse for syntax checking and operator replacement.
if (_debug)
context.debug ("FILTER Infix " + dump (_compiled));
infixParse (_compiled);
if (_debug)
context.debug ("FILTER Infix parsed " + dump (_compiled));
// Convert infix --> postfix.
infixToPostfix (_compiled);
if (_debug)
context.debug ("FILTER Postfix " + dump (_compiled));
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void Eval::compileExpression ( void Eval::compileExpression (
const std::vector <std::pair <std::string, Lexer::Type>>& precompiled) const std::vector <std::pair <std::string, Lexer::Type>>& precompiled)

View file

@ -44,7 +44,6 @@ public:
void addSource (bool (*fn)(const std::string&, Variant&)); void addSource (bool (*fn)(const std::string&, Variant&));
void evaluateInfixExpression (const std::string&, Variant&) const; void evaluateInfixExpression (const std::string&, Variant&) const;
void evaluatePostfixExpression (const std::string&, Variant&) const; void evaluatePostfixExpression (const std::string&, Variant&) const;
void compileExpression (const std::string&);
void compileExpression (const std::vector <std::pair <std::string, Lexer::Type>>&); void compileExpression (const std::vector <std::pair <std::string, Lexer::Type>>&);
void evaluateCompiledExpression (Variant&); void evaluateCompiledExpression (Variant&);
void debug (bool); void debug (bool);