1 #ifndef COMPILER_EXPRPARSER_H_INCLUDED
2 #define COMPILER_EXPRPARSER_H_INCLUDED
24 std::vector<Interpreter::Type_Code>
mCode;
62 Literals& literals,
bool argument =
false);
94 char append (std::vector<Interpreter::Type_Code>&
code);
99 std::vector<Interpreter::Type_Code>&
code,
int ignoreKeyword = -1);
int getPriority(char op) const
Definition: exprparser.cpp:23
virtual bool parseInt(int value, const TokenLoc &loc, Scanner &scanner)
Definition: exprparser.cpp:229
std::string mExplicit
Definition: exprparser.hpp:27
void popOperator()
Definition: exprparser.cpp:77
char getOperator() const
Definition: exprparser.cpp:66
std::vector< char > mOperators
Definition: exprparser.hpp:21
void popOperand()
Definition: exprparser.cpp:83
ExprParser(ErrorHandler &errorHandler, const Context &context, Locals &locals, Literals &literals, bool argument=false)
Definition: exprparser.cpp:223
void pushIntegerLiteral(int value)
Definition: exprparser.cpp:165
char getOperandType(int Index=0) const
Definition: exprparser.cpp:58
Definition: context.hpp:10
Location of a token in a source file.
Definition: tokenloc.hpp:10
Definition: exprparser.hpp:16
bool mNextOperand
Definition: exprparser.hpp:22
bool mMemberOp
Definition: exprparser.hpp:29
virtual bool parseKeyword(int keyword, const TokenLoc &loc, Scanner &scanner)
Definition: exprparser.cpp:346
std::vector< Interpreter::Type_Code > mCode
Definition: exprparser.hpp:24
Error handling.
Definition: errorhandler.hpp:14
std::vector< char > mOperands
Definition: exprparser.hpp:20
virtual bool parseSpecial(int code, const TokenLoc &loc, Scanner &scanner)
Definition: exprparser.cpp:594
virtual bool parseName(const std::string &name, const TokenLoc &loc, Scanner &scanner)
Definition: exprparser.cpp:275
void replaceBinaryOperands()
Definition: exprparser.cpp:89
bool isOpen() const
Definition: exprparser.cpp:72
void reset()
Reset parser to clean state.
Definition: exprparser.cpp:729
int parseArguments(const std::string &arguments, Scanner &scanner)
Definition: exprparser.cpp:196
void pushFloatLiteral(float value)
Definition: exprparser.cpp:172
Locals & mLocals
Definition: exprparser.hpp:18
void pop()
Definition: exprparser.cpp:105
char append(std::vector< Interpreter::Type_Code > &code)
Definition: exprparser.cpp:742
const TokenLoc & getTokenLoc() const
Definition: exprparser.cpp:883
bool mFirst
Definition: exprparser.hpp:25
virtual bool parseFloat(float value, const TokenLoc &loc, Scanner &scanner)
Definition: exprparser.cpp:252
Literals & mLiterals
Definition: exprparser.hpp:19
void close()
Definition: exprparser.cpp:188
void pushBinaryOperator(char c)
Definition: exprparser.cpp:179
bool mRefOp
Definition: exprparser.hpp:28
int code
Definition: crashcatcher.cpp:70
Literal values.
Definition: literals.hpp:13
bool handleMemberAccess(const std::string &name)
Definition: exprparser.cpp:201
Parser base class.
Definition: parser.hpp:17
bool mArgument
Definition: exprparser.hpp:26
char getType() const
Return type of parsed expression ('l' integer, 'f' float)
Local variable declarations.
Definition: locals.hpp:12
TokenLoc mTokenLoc
Definition: exprparser.hpp:23
Scanner.
Definition: scanner.hpp:21
const char * name
Definition: crashcatcher.cpp:59