- Renamed Lexer2 to Lexer, it looks good enough to assume control.
This commit is contained in:
Paul Beckingham 2015-02-22 17:46:22 -05:00
parent e1c0d5b130
commit 745aad0d27
15 changed files with 553 additions and 553 deletions

View file

@ -29,7 +29,7 @@
#include <vector>
#include <string>
#include <Lexer2.h>
#include <Lexer.h>
#include <Variant.h>
class Eval
@ -53,28 +53,28 @@ public:
static void getBinaryOperators (std::vector <std::string>&);
private:
void evaluatePostfixStack (const std::vector <std::pair <std::string, Lexer2::Type> >&, Variant&) const;
void infixToPostfix (std::vector <std::pair <std::string, Lexer2::Type> >&) const;
void infixParse (std::vector <std::pair <std::string, Lexer2::Type> >&) const;
bool parseLogical (std::vector <std::pair <std::string, Lexer2::Type> >&, int &) const;
bool parseRegex (std::vector <std::pair <std::string, Lexer2::Type> >&, int &) const;
bool parseEquality (std::vector <std::pair <std::string, Lexer2::Type> >&, int &) const;
bool parseComparative (std::vector <std::pair <std::string, Lexer2::Type> >&, int &) const;
bool parseArithmetic (std::vector <std::pair <std::string, Lexer2::Type> >&, int &) const;
bool parseGeometric (std::vector <std::pair <std::string, Lexer2::Type> >&, int &) const;
bool parseTag (std::vector <std::pair <std::string, Lexer2::Type> >&, int &) const;
bool parseUnary (std::vector <std::pair <std::string, Lexer2::Type> >&, int &) const;
bool parseExponent (std::vector <std::pair <std::string, Lexer2::Type> >&, int &) const;
bool parsePrimitive (std::vector <std::pair <std::string, Lexer2::Type> >&, int &) const;
void evaluatePostfixStack (const std::vector <std::pair <std::string, Lexer::Type> >&, Variant&) const;
void infixToPostfix (std::vector <std::pair <std::string, Lexer::Type> >&) const;
void infixParse (std::vector <std::pair <std::string, Lexer::Type> >&) const;
bool parseLogical (std::vector <std::pair <std::string, Lexer::Type> >&, int &) const;
bool parseRegex (std::vector <std::pair <std::string, Lexer::Type> >&, int &) const;
bool parseEquality (std::vector <std::pair <std::string, Lexer::Type> >&, int &) const;
bool parseComparative (std::vector <std::pair <std::string, Lexer::Type> >&, int &) const;
bool parseArithmetic (std::vector <std::pair <std::string, Lexer::Type> >&, int &) const;
bool parseGeometric (std::vector <std::pair <std::string, Lexer::Type> >&, int &) const;
bool parseTag (std::vector <std::pair <std::string, Lexer::Type> >&, int &) const;
bool parseUnary (std::vector <std::pair <std::string, Lexer::Type> >&, int &) const;
bool parseExponent (std::vector <std::pair <std::string, Lexer::Type> >&, int &) const;
bool parsePrimitive (std::vector <std::pair <std::string, Lexer::Type> >&, int &) const;
bool identifyOperator (const std::string&, char&, int&, char&) const;
std::string dump (std::vector <std::pair <std::string, Lexer2::Type> >&) const;
std::string dump (std::vector <std::pair <std::string, Lexer::Type> >&) const;
private:
std::vector <bool (*)(const std::string&, Variant&)> _sources;
bool _ambiguity;
bool _debug;
std::vector <std::pair <std::string, Lexer2::Type> > _compiled;
std::vector <std::pair <std::string, Lexer::Type> > _compiled;
};