1 #ifndef COMPILER_STRINGPARSER_H_INCLUDED
2 #define COMPILER_STRINGPARSER_H_INCLUDED
24 std::vector<Interpreter::Type_Code>
mCode;
46 void append (std::vector<Interpreter::Type_Code>&
code);
virtual bool parseKeyword(int keyword, const TokenLoc &loc, Scanner &scanner)
Definition: stringparser.cpp:43
void smashCase()
Transform all scanned strings to lower case.
Definition: stringparser.cpp:88
const TokenLoc & getTokenLoc() const
Definition: stringparser.cpp:93
Definition: stringparser.hpp:15
Definition: stringparser.hpp:19
State
Definition: stringparser.hpp:17
virtual bool parseName(const std::string &name, const TokenLoc &loc, Scanner &scanner)
Definition: stringparser.cpp:21
Definition: context.hpp:10
Location of a token in a source file.
Definition: tokenloc.hpp:10
Error handling.
Definition: errorhandler.hpp:14
void discard()
Definition: stringparser.cpp:98
bool mDiscard
Definition: stringparser.hpp:27
Definition: stringparser.hpp:19
bool mSmashCase
Definition: stringparser.hpp:25
void append(std::vector< Interpreter::Type_Code > &code)
Append code for parsed string.
Definition: stringparser.cpp:73
int code
Definition: crashcatcher.cpp:70
Literal values.
Definition: literals.hpp:13
virtual bool parseSpecial(int code, const TokenLoc &loc, Scanner &scanner)
Definition: stringparser.cpp:62
Parser base class.
Definition: parser.hpp:17
StringParser(ErrorHandler &errorHandler, const Context &context, Literals &literals)
Definition: stringparser.cpp:15
std::vector< Interpreter::Type_Code > mCode
Definition: stringparser.hpp:24
TokenLoc mTokenLoc
Definition: stringparser.hpp:26
State mState
Definition: stringparser.hpp:23
Scanner.
Definition: scanner.hpp:21
void reset()
Reset parser to clean state (this includes the smashCase function).
Definition: stringparser.cpp:78
const char * name
Definition: crashcatcher.cpp:59
Literals & mLiterals
Definition: stringparser.hpp:22