#include <Token.hpp>
Static Public Member Functions | |
static const char * | codeText (int code) |
static const char * | keywordText (int code) |
Static Public Member Functions inherited from RexxInternalObject | |
static size_t | getObjectHeaderSize () |
Public Attributes | |
SourceLocation | tokenLocation |
RexxString * | value |
int | classId |
int | subclass |
int | numeric |
int | precedence |
Public Attributes inherited from RexxInternalObject | |
ObjectHeader | header |
RexxBehaviour * | behaviour |
Additional Inherited Members | |
Protected Member Functions inherited from RexxVirtualBase | |
virtual | ~RexxVirtualBase () |
virtual void | baseVirtual () |
RexxToken::RexxToken | ( | int | _classId, |
int | _subclass, | ||
RexxString * | _value, | ||
SourceLocation & | _location | ||
) |
Definition at line 51 of file Token.cpp.
References classId, numeric, OrefSet, precedence, subclass, tokenLocation, and value.
|
inline |
void RexxToken::checkAssignment | ( | RexxSource * | source, |
RexxString * | newValue | ||
) |
Check and update this token for the special assignment forms (+=, -=, etc.).
source | The source for the original operator token. |
Definition at line 103 of file Token.cpp.
References classId, RexxSource::nextSpecial(), TOKEN_ASSIGNMENT, tokenLocation, and value.
|
static |
Definition at line 128 of file Token.cpp.
References CLAUSEEND_EOF, CLAUSEEND_EOL, CLAUSEEND_NULL, CLAUSEEND_SEMICOLON, CODE_TEXT, INTEGER_CONSTANT, IS_BUILTIN, IS_CONDITION, IS_DIRECTIVE, IS_KEYWORD, IS_SUBDIRECTIVE, IS_SUBKEY, LITERAL_BIN, LITERAL_HEX, OPERATOR_ABUTTAL, OPERATOR_AND, OPERATOR_BACKSLASH, OPERATOR_BACKSLASH_EQUAL, OPERATOR_BACKSLASH_GREATERTHAN, OPERATOR_BACKSLASH_LESSTHAN, OPERATOR_BLANK, OPERATOR_CONCATENATE, OPERATOR_DIVIDE, OPERATOR_EQUAL, OPERATOR_GREATERTHAN, OPERATOR_GREATERTHAN_EQUAL, OPERATOR_GREATERTHAN_LESSTHAN, OPERATOR_INTDIV, OPERATOR_LESSTHAN, OPERATOR_LESSTHAN_EQUAL, OPERATOR_LESSTHAN_GREATERTHAN, OPERATOR_MULTIPLY, OPERATOR_OR, OPERATOR_PLUS, OPERATOR_POWER, OPERATOR_REMAINDER, OPERATOR_STRICT_BACKSLASH_EQUAL, OPERATOR_STRICT_BACKSLASH_GREATERTHAN, OPERATOR_STRICT_BACKSLASH_LESSTHAN, OPERATOR_STRICT_EQUAL, OPERATOR_STRICT_GREATERTHAN, OPERATOR_STRICT_GREATERTHAN_EQUAL, OPERATOR_STRICT_LESSTHAN, OPERATOR_STRICT_LESSTHAN_EQUAL, OPERATOR_SUBTRACT, OPERATOR_XOR, Utilities::snprintf(), SYMBOL_COMPOUND, SYMBOL_CONSTANT, SYMBOL_DOTSYMBOL, SYMBOL_DUMMY, SYMBOL_NAME, SYMBOL_STEM, SYMBOL_VARIABLE, TOKEN_ASSIGNMENT, TOKEN_BLANK, TOKEN_COLON, TOKEN_COMMA, TOKEN_CONTINUE, TOKEN_DCOLON, TOKEN_DTILDE, TOKEN_EOC, TOKEN_LEFT, TOKEN_LITERAL, TOKEN_NULL, TOKEN_OPERATOR, TOKEN_POINT, TOKEN_PREFIX, TOKEN_RIGHT, TOKEN_SOURCE_LITERAL, TOKEN_SQLEFT, TOKEN_SQRIGHT, TOKEN_SYMBOL, and TOKEN_TILDE.
Referenced by dumpTokensImpl().
|
virtual |
Reimplemented from RexxVirtualBase.
Definition at line 84 of file Token.cpp.
References cleanUpFlatten, flatten_reference, and setUpFlatten.
|
inline |
Definition at line 443 of file Token.hpp.
References tokenLocation.
Referenced by RexxSource::errorToken(), RexxSource::labelNew(), RexxSource::nextClause(), RexxInstructionElse::RexxInstructionElse(), RexxInstructionIf::RexxInstructionIf(), RexxInstructionOtherwise::RexxInstructionOtherwise(), RexxInstructionThen::RexxInstructionThen(), RexxSource::subExpression(), and RexxSource::syntaxErrorAt().
|
inline |
Definition at line 438 of file Token.hpp.
References classId, subclass, SYMBOL_COMPOUND, SYMBOL_STEM, SYMBOL_VARIABLE, and TOKEN_SYMBOL.
Referenced by RexxSource::constantExpression(), and RexxSource::constantLogicalExpression().
|
inline |
Definition at line 441 of file Token.hpp.
References classId, and TOKEN_EOC.
Referenced by RexxSource::addressNew(), RexxSource::argList(), RexxSource::attributeDirective(), RexxSource::callNew(), RexxSource::classDirective(), RexxSource::constantDirective(), RexxSource::constantExpression(), RexxSource::constantLogicalExpression(), RexxSource::createDoLoop(), RexxSource::endNew(), RexxSource::extensionDirective(), RexxSource::guardNew(), RexxSource::instruction(), RexxSource::leaveNew(), RexxSource::libraryDirective(), RexxSource::methodDirective(), RexxSource::nextClause(), RexxSource::nopNew(), RexxSource::numericNew(), RexxSource::optionsDirective(), RexxSource::parseConditional(), RexxSource::parseNew(), RexxSource::procedureNew(), RexxSource::processVariableList(), RexxSource::raiseNew(), RexxSource::requiresDirective(), RexxSource::RexxInstructionForwardCreate(), RexxSource::routineDirective(), RexxSource::selectNew(), RexxSource::signalNew(), RexxSource::traceNew(), RexxSource::translateBlock(), and RexxSource::useNew().
|
inline |
Definition at line 435 of file Token.hpp.
References classId, and TOKEN_LITERAL.
Referenced by RexxSource::attributeDirective(), RexxSource::callNew(), RexxSource::constantExpression(), RexxSource::constantLogicalExpression(), RexxSource::function(), RexxSource::methodDirective(), RexxSource::parseNew(), RexxSource::routineDirective(), and RexxSource::traceNew().
|
inline |
Definition at line 440 of file Token.hpp.
References classId, and TOKEN_OPERATOR.
Referenced by RexxSource::constantDirective().
|
inline |
Definition at line 436 of file Token.hpp.
References classId, and TOKEN_SOURCE_LITERAL.
Referenced by RexxSource::argList(), RexxSource::constantExpression(), RexxSource::constantLogicalExpression(), RexxSource::message(), and RexxSource::subTerm().
|
inline |
Definition at line 439 of file Token.hpp.
References classId, and TOKEN_SYMBOL.
Referenced by RexxSource::attributeDirective(), RexxSource::callNew(), RexxSource::classDirective(), RexxSource::condition(), RexxSource::constantDirective(), RexxSource::createDoLoop(), RexxSource::directive(), RexxSource::endNew(), RexxSource::extensionDirective(), RexxSource::guardNew(), RexxSource::instruction(), RexxSource::keyDirective(), RexxSource::keyword(), RexxSource::leaveNew(), RexxSource::libraryDirective(), RexxSource::methodDirective(), RexxSource::numericNew(), RexxSource::optionsDirective(), RexxSource::parseConditional(), RexxSource::parseNew(), RexxSource::parseOption(), RexxSource::procedureNew(), RexxSource::processVariableList(), RexxSource::raiseNew(), RexxSource::RexxInstructionForwardCreate(), RexxSource::routineDirective(), RexxSource::selectNew(), RexxSource::signalNew(), RexxSource::subDirective(), RexxSource::subKeyword(), RexxSource::traceNew(), RexxSource::translateBlock(), RexxSource::useNew(), and RexxSource::variableOrMessageTerm().
|
inline |
Definition at line 437 of file Token.hpp.
References classId, TOKEN_LITERAL, and TOKEN_SYMBOL.
Referenced by RexxSource::addressNew(), RexxSource::attributeDirective(), RexxSource::builtin(), RexxSource::classDirective(), RexxSource::constantDirective(), RexxSource::extensionDirective(), RexxSource::message(), RexxSource::methodDirective(), RexxSource::optionsDirective(), RexxSource::requiresDirective(), RexxSource::routineDirective(), and RexxSource::signalNew().
|
inline |
Definition at line 430 of file Token.hpp.
References classId.
Referenced by RexxSource::fullSubExpression().
|
inline |
|
inline |
|
inline |
Definition at line 434 of file Token.hpp.
References subclass, SYMBOL_COMPOUND, SYMBOL_STEM, and SYMBOL_VARIABLE.
Referenced by RexxSource::message(), RexxSource::needVariable(), and RexxSource::needVariableOrDotSymbol().
|
static |
Definition at line 236 of file Token.cpp.
References CODE_TEXT, KEYWORD_ADDRESS, KEYWORD_ARG, KEYWORD_ASSIGNMENT, KEYWORD_BLOCK, KEYWORD_CALL, KEYWORD_CLASS, KEYWORD_COMMAND, KEYWORD_DO, KEYWORD_DROP, KEYWORD_ELSE, KEYWORD_END, KEYWORD_ENDELSE, KEYWORD_ENDIF, KEYWORD_ENDTHEN, KEYWORD_ENDWHEN, KEYWORD_EXIT, KEYWORD_EXPOSE, KEYWORD_FIRST, KEYWORD_FORWARD, KEYWORD_GUARD, KEYWORD_IF, KEYWORD_IFTHEN, KEYWORD_INITPROC, KEYWORD_INSTRUCTION, KEYWORD_INTERPRET, KEYWORD_ITERATE, KEYWORD_LABEL, KEYWORD_LAST, KEYWORD_LEAVE, KEYWORD_LIBRARY, KEYWORD_LOOP, KEYWORD_MESSAGE, KEYWORD_METHOD, KEYWORD_NOP, KEYWORD_NUMERIC, KEYWORD_OPTIONS, KEYWORD_OTHERWISE, KEYWORD_PARSE, KEYWORD_PROCEDURE, KEYWORD_PULL, KEYWORD_PUSH, KEYWORD_QUEUE, KEYWORD_RAISE, KEYWORD_REPLY, KEYWORD_REQUIRES, KEYWORD_RETURN, KEYWORD_SAY, KEYWORD_SELECT, KEYWORD_SIGNAL, KEYWORD_THEN, KEYWORD_TRACE, KEYWORD_UPPER, KEYWORD_USE, KEYWORD_VAR, KEYWORD_WHEN, KEYWORD_WHENTHEN, and Utilities::snprintf().
Referenced by RexxSource::addClause().
|
virtual |
Reimplemented from RexxVirtualBase.
Definition at line 68 of file Token.cpp.
References memory_mark, and value.
|
virtual |
Reimplemented from RexxVirtualBase.
Definition at line 76 of file Token.cpp.
References memory_mark_general, and value.
|
inline |
|
inline |
void * RexxToken::operator new | ( | size_t | size | ) |
Definition at line 116 of file Token.cpp.
References new_object(), and T_Token.
|
inline |
Definition at line 428 of file Token.hpp.
References SourceLocation::setEnd(), and tokenLocation.
|
inline |
Definition at line 444 of file Token.hpp.
References tokenLocation.
|
inline |
Definition at line 442 of file Token.hpp.
References numeric.
Referenced by RexxSource::sourceNextToken().
|
inline |
Definition at line 427 of file Token.hpp.
References SourceLocation::setStart(), and tokenLocation.
int RexxToken::classId |
Definition at line 449 of file Token.hpp.
Referenced by RexxSource::addText(), RexxSource::argList(), RexxSource::callNew(), checkAssignment(), RexxSource::checkDirective(), RexxSource::constantExpression(), RexxSource::constantLogicalExpression(), RexxSource::directive(), dumpTokensImpl(), RexxSource::errorToken(), RexxSource::hasBody(), RexxSource::instruction(), isConstant(), isEndOfClause(), isLiteral(), isOperator(), isSourceLiteral(), isSymbol(), isSymbolOrLiteral(), isType(), RexxSource::locateToken(), RexxSource::message(), RexxSource::messageSubterm(), RexxSource::messageTerm(), RexxClause::nextRealToken(), RexxSource::parenExpression(), RexxSource::parseNew(), RexxSource::processVariableList(), RexxSource::raiseNew(), RexxSource::RexxInstructionForwardCreate(), RexxToken(), RexxSource::subExpression(), RexxSource::subTerm(), RexxSource::terminator(), and RexxSource::useNew().
int RexxToken::numeric |
Definition at line 451 of file Token.hpp.
Referenced by RexxSource::addText(), dumpTokensImpl(), RexxToken(), and setNumeric().
int RexxToken::precedence |
Definition at line 452 of file Token.hpp.
Referenced by RexxSource::precedence(), RexxToken(), and RexxSource::sourceNextToken().
int RexxToken::subclass |
Definition at line 450 of file Token.hpp.
Referenced by RexxSource::addText(), RexxSource::assignmentOpNew(), RexxSource::constantDirective(), RexxSource::createDoLoop(), dumpTokensImpl(), RexxSource::instruction(), isConstant(), isVariable(), RexxSource::message(), RexxSource::messageAssignmentOpNew(), RexxSource::messageSubterm(), RexxSource::needVariableOrDotSymbol(), RexxSource::parseNew(), RexxSource::precedence(), RexxSource::processVariableList(), RexxToken(), RexxSource::subExpression(), RexxSource::subTerm(), RexxSource::traceNew(), and RexxSource::useNew().
SourceLocation RexxToken::tokenLocation |
Definition at line 447 of file Token.hpp.
Referenced by RexxSource::addText(), checkAssignment(), dumpTokensImpl(), getLocation(), RexxToken(), setEnd(), setLocation(), and setStart().
RexxString* RexxToken::value |
Definition at line 448 of file Token.hpp.
Referenced by RexxSource::addressNew(), RexxSource::addText(), RexxSource::argList(), RexxSource::attributeDirective(), RexxSource::builtin(), RexxSource::callNew(), checkAssignment(), RexxSource::classDirective(), RexxSource::condition(), RexxSource::constantDirective(), RexxSource::createDoLoop(), dumpTokensImpl(), RexxSource::endNew(), RexxSource::errorToken(), RexxSource::extensionDirective(), RexxSource::function(), RexxSource::keyDirective(), RexxSource::keyword(), RexxSource::labelNew(), RexxSource::leaveNew(), live(), liveGeneral(), RexxSource::message(), RexxSource::methodDirective(), RexxSource::needVariable(), RexxSource::optionsDirective(), RexxSource::parseOption(), RexxSource::processVariableList(), RexxSource::raiseNew(), RexxSource::requiresDirective(), RexxToken(), RexxSource::routineDirective(), RexxSource::selectNew(), RexxSource::signalNew(), RexxSource::subDirective(), RexxSource::subKeyword(), RexxSource::traceNew(), and RexxSource::useNew().