zenilib
0.5.3.0
|
#include <Token.h>
Public Types | |
enum | Flags { AT_START_OF_LINE = 1 << 0, HAS_LEADING_SPACE = 1 << 1, EXPANSION_DISABLED = 1 << 2 } |
enum | Type { LAST = 0, IDENTIFIER = 258, CONST_INT, CONST_FLOAT, OP_INC, OP_DEC, OP_LEFT, OP_RIGHT, OP_LE, OP_GE, OP_EQ, OP_NE, OP_AND, OP_XOR, OP_OR, OP_ADD_ASSIGN, OP_SUB_ASSIGN, OP_MUL_ASSIGN, OP_DIV_ASSIGN, OP_MOD_ASSIGN, OP_LEFT_ASSIGN, OP_RIGHT_ASSIGN, OP_AND_ASSIGN, OP_XOR_ASSIGN, OP_OR_ASSIGN, PP_HASH, PP_NUMBER, PP_OTHER } |
Public Member Functions | |
Token () | |
bool | atStartOfLine () const |
bool | equals (const Token &other) const |
bool | expansionDisabled () const |
bool | fValue (float *value) const |
bool | hasLeadingSpace () const |
bool | iValue (int *value) const |
void | reset () |
void | setAtStartOfLine (bool start) |
void | setExpansionDisabled (bool disable) |
void | setHasLeadingSpace (bool space) |
bool | uValue (unsigned int *value) const |
Public Attributes | |
unsigned int | flags |
SourceLocation | location |
std::string | text |
int | type |
enum pp::Token::Flags |
enum pp::Token::Type |
|
inline |
Definition at line 72 of file Token.h.
References AT_START_OF_LINE.
Definition at line 24 of file Token.cpp.
References flags, location, text, and type.
Referenced by pp::operator!=(), and pp::operator==().
|
inline |
Definition at line 78 of file Token.h.
References EXPANSION_DISABLED.
Referenced by pp::MacroExpander::lex().
bool pp::Token::fValue | ( | float * | value | ) | const |
Definition at line 68 of file Token.cpp.
References assert, CONST_FLOAT, pp::numeric_lex_float(), and text.
Referenced by pp::Preprocessor::lex().
|
inline |
Definition at line 75 of file Token.h.
References HAS_LEADING_SPACE.
Referenced by pp::operator<<().
bool pp::Token::iValue | ( | int * | value | ) | const |
Definition at line 56 of file Token.cpp.
References assert, CONST_INT, pp::numeric_lex_int(), and text.
Referenced by pp::Preprocessor::lex().
void pp::Token::reset | ( | ) |
Definition at line 16 of file Token.cpp.
References text.
Referenced by content.ContentProcessor::__init__(), and sources.SourceProcessor::parse_file().
void pp::Token::setAtStartOfLine | ( | bool | start | ) |
Definition at line 32 of file Token.cpp.
References AT_START_OF_LINE.
Referenced by pp::Tokenizer::lex().
void pp::Token::setExpansionDisabled | ( | bool | disable | ) |
Definition at line 48 of file Token.cpp.
References EXPANSION_DISABLED.
Referenced by pp::MacroExpander::lex().
void pp::Token::setHasLeadingSpace | ( | bool | space | ) |
Definition at line 40 of file Token.cpp.
References HAS_LEADING_SPACE.
Referenced by pp::Tokenizer::lex().
bool pp::Token::uValue | ( | unsigned int * | value | ) | const |
unsigned int pp::Token::flags |
Definition at line 88 of file Token.h.
Referenced by equals(), and pp::Tokenizer::lex().
SourceLocation pp::Token::location |
Definition at line 89 of file Token.h.
Referenced by equals(), pp::Preprocessor::lex(), pp::Tokenizer::lex(), pp::ExpressionParser::parse(), string_input(), and yylex().
std::string pp::Token::text |
Definition at line 90 of file Token.h.
Referenced by equals(), fValue(), getDirective(), iValue(), pp::MacroExpander::lex(), pp::Preprocessor::lex(), pp::Tokenizer::lex(), pp::operator<<(), pp::Preprocessor::predefineMacro(), reset(), string_input(), uValue(), and yylex().
int pp::Token::type |
Definition at line 87 of file Token.h.
Referenced by equals(), getDirective(), isEOD(), pp::MacroExpander::lex(), pp::DirectiveParser::lex(), pp::Preprocessor::lex(), pp::Tokenizer::lex(), pp::Preprocessor::predefineMacro(), string_input(), and yylex().