|
Pol
Rev 533
|
#include <token.h>
Collaboration diagram for Token:Public Member Functions | |
| Token () | |
| Token (const Token &tok) | |
| Token (ModuleID module, BTokenId id, BTokenType type) | |
| Token (BTokenId id, BTokenType type) | |
| Token (ModuleID module, BTokenId id, BTokenType type, UserFunction *userfunc) | |
| ~Token () | |
| void | copyStr (const char *s) |
| void | copyStr (const char *s, int len) |
| void | nulStr () |
| Token & | operator= (const Token &tok) |
| void | printOn (std::ostream &outputStream) const |
| void | setStr (const char *s) |
| const char * | tokval () const |
Static Public Member Functions | |
| static unsigned int | instances () |
| static void | show_instances () |
Public Attributes | |
| union { | |
| int precedence | |
| int sourceFile | |
| }; | |
| union { | |
| const unsigned char * dataptr | |
| int lval | |
| }; | |
| int | dbg_filenum |
| int | dbg_linenum |
| bool | deprecated |
| double | dval |
| BTokenId | id |
| unsigned char | module |
| int | ownsStr |
| BTokenType | type |
| UserFunction * | userfunc |
Protected Member Functions | |
| void | register_instance () |
| void | unregister_instance () |
Protected Attributes | |
| const char * | token |
Static Protected Attributes | |
| static unsigned int | _instances = 0 |
| Token::Token | ( | ) |
Definition at line 67 of file token.cpp.
References register_instance().
Here is the call graph for this function:| Token::Token | ( | const Token & | tok | ) |
| Token::Token | ( | ModuleID | module, |
| BTokenId | id, | ||
| BTokenType | type | ||
| ) |
Definition at line 136 of file token.cpp.
References register_instance().
Here is the call graph for this function:| Token::Token | ( | BTokenId | id, |
| BTokenType | type | ||
| ) |
Definition at line 155 of file token.cpp.
References register_instance().
Here is the call graph for this function:| Token::Token | ( | ModuleID | module, |
| BTokenId | id, | ||
| BTokenType | type, | ||
| UserFunction * | userfunc | ||
| ) |
Definition at line 173 of file token.cpp.
References register_instance().
Here is the call graph for this function:| Token::~Token | ( | ) |
Definition at line 245 of file token.cpp.
References nulStr(), and unregister_instance().
Here is the call graph for this function:| void Token::copyStr | ( | const char * | s | ) |
Definition at line 210 of file token.cpp.
References nulStr(), ownsStr, and token.
Referenced by SmartParser::IIP(), operator=(), optimize_string_operation(), Expression::optimize_token(), and Token().
Here is the call graph for this function:
Here is the caller graph for this function:| void Token::copyStr | ( | const char * | s, |
| int | len | ||
| ) |
| unsigned int Token::instances | ( | ) | [static] |
Definition at line 30 of file token.cpp.
References _instances.
| void Token::nulStr | ( | ) |
Definition at line 193 of file token.cpp.
References ownsStr, and token.
Referenced by EScriptProgram::_readToken(), copyStr(), operator=(), setStr(), and ~Token().
Here is the caller graph for this function:Definition at line 108 of file token.cpp.
References copyStr(), dbg_filenum, dbg_linenum, deprecated, dval, id, lval, module, nulStr(), ownsStr, precedence, setStr(), token, type, and userfunc.
Here is the call graph for this function:| void Token::printOn | ( | std::ostream & | outputStream | ) | const |
Definition at line 21 of file tkn_strm.cpp.
References ObjMethod::code, ObjMember::code, CTRL_JSR_USERFUNC, CTRL_LABEL, CTRL_LEAVE_BLOCK, CTRL_MAKELOCAL, CTRL_PROGEND, CTRL_STATEMENTBEGIN, dval, getObjMember(), getObjMethod(), INS_ADDMEMBER2, INS_ADDMEMBER_ASSIGN, INS_ASSIGN_CONSUME, INS_ASSIGN_GLOBALVAR, INS_ASSIGN_LOCALVAR, INS_CALL_METHOD, INS_CALL_METHOD_ID, INS_CASEJMP, INS_DECLARE_ARRAY, INS_DICTIONARY_ADDMEMBER, INS_GET_ARG, INS_GET_MEMBER, INS_GET_MEMBER_ID, INS_INITFOR, INS_INITFOREACH, INS_MULTISUBSCRIPT, INS_MULTISUBSCRIPT_ASSIGN, INS_NEXTFOR, INS_POP_PARAM, INS_POP_PARAM_BYREF, INS_SET_MEMBER, INS_SET_MEMBER_CONSUME, INS_SET_MEMBER_ID, INS_SET_MEMBER_ID_CONSUME, INS_SET_MEMBER_ID_CONSUME_DIVIDEEQUAL, INS_SET_MEMBER_ID_CONSUME_MINUSEQUAL, INS_SET_MEMBER_ID_CONSUME_MODULUSEQUAL, INS_SET_MEMBER_ID_CONSUME_PLUSEQUAL, INS_SET_MEMBER_ID_CONSUME_TIMESEQUAL, INS_STEPFOREACH, INS_SUBSCRIPT_ASSIGN, INS_SUBSCRIPT_ASSIGN_CONSUME, INS_UNINIT, lval, module, RSV_COLON, RSV_CONST, RSV_DECLARE, RSV_DO, RSV_DOWHILE, RSV_ENDENUM, RSV_ENDFOR, RSV_ENDFOREACH, RSV_ENDFUNCTION, RSV_ENDPROGRAM, RSV_ENDWHILE, RSV_ENUM, RSV_EXIT, RSV_FOR, RSV_FOREACH, RSV_FUNCTION, RSV_GLOBAL, RSV_GOSUB, RSV_GOTO, RSV_INCLUDE_FILE, RSV_JMPIFFALSE, RSV_JMPIFTRUE, RSV_LOCAL, RSV_PROGRAM, RSV_REPEAT, RSV_RETURN, RSV_ST_IF, RSV_UNTIL, RSV_USE_MODULE, RSV_VAR, RSV_WHILE, TOK_ADD, TOK_ADDMEMBER, TOK_AND, TOK_ARRAY, TOK_ARRAY_SUBSCRIPT, TOK_ASSIGN, TOK_BITAND, TOK_BITOR, TOK_BITWISE_NOT, TOK_BITXOR, TOK_BSLEFT, TOK_BSRIGHT, TOK_CHKMEMBER, TOK_COMMA, TOK_CONSUMER, TOK_DELMEMBER, TOK_DICTIONARY, TOK_DIV, TOK_DIVIDEEQUAL, TOK_DOUBLE, TOK_EQUAL, TOK_EQUAL1, TOK_ERROR, TOK_FUNC, TOK_GLOBALVAR, TOK_GREQ, TOK_GRTHAN, TOK_IDENT, TOK_IN, TOK_INSERTINTO, TOK_LBRACE, TOK_LBRACKET, TOK_LESSEQ, TOK_LESSTHAN, TOK_LOCALVAR, TOK_LOG_NOT, TOK_LONG, TOK_LPAREN, TOK_MEMBER, TOK_MINUSEQUAL, TOK_MODULUS, TOK_MODULUSEQUAL, TOK_MULT, TOK_NEQ, TOK_OR, TOK_PLUSEQUAL, TOK_RBRACE, TOK_RBRACKET, TOK_REFTO, TOK_RPAREN, TOK_SEMICOLON, TOK_STRING, TOK_STRUCT, TOK_SUBTRACT, TOK_TERM, TOK_TIMESEQUAL, TOK_UNMINUS, TOK_UNPLUS, TOK_USERFUNC, token, and type.
Referenced by operator<<(), and unregister_instance().
Here is the call graph for this function:
Here is the caller graph for this function:| void Token::register_instance | ( | ) | [protected] |
Definition at line 45 of file token.cpp.
References _instances.
Referenced by Token().
Here is the caller graph for this function:| void Token::setStr | ( | const char * | s | ) |
Definition at line 203 of file token.cpp.
References nulStr(), ownsStr, and token.
Referenced by EScriptProgram::_readToken(), operator=(), and Token().
Here is the call graph for this function:
Here is the caller graph for this function:| void Token::show_instances | ( | ) | [static] |
| const char* Token::tokval | ( | ) | const [inline] |
Definition at line 67 of file token.h.
References token.
Referenced by Compiler::_getStatement(), EScriptProgram::addToken(), Compiler::convert_variables(), Compiler::getUserArgs(), Compiler::handleBracketedFor_basic(), Compiler::handleBracketedFunction2(), Compiler::handleBreak(), Compiler::handleConstDeclare(), Compiler::handleContinue(), Compiler::handleEnumDeclare(), Compiler::handleForEach(), Compiler::handleInclude(), Compiler::handleProgram2(), Compiler::handleSwitch(), Compiler::handleUse(), Compiler::handleVarDeclare(), SmartParser::IIP(), Compiler::inner_read_function_declarations(), Executor::innerExec(), Executor::ins_addmember2(), Executor::ins_addmember_assign(), Executor::ins_call_method(), Executor::ins_get_member(), Executor::ins_set_member(), Executor::ins_set_member_consume(), Executor::ins_statementbegin(), Executor::ins_string(), Compiler::isFunc(), Compiler::isUserFunc(), Executor::makeObj(), optimize_string_operation(), Expression::optimize_token(), Compiler::readFunctionDeclaration(), Compiler::substitute_constant(), and Compiler::validate().
Here is the caller graph for this function:| void Token::unregister_instance | ( | ) | [protected] |
Definition at line 53 of file token.cpp.
References _instances, exit_signalled, printOn(), and token.
Referenced by ~Token().
Here is the call graph for this function:
Here is the caller graph for this function:| union { ... } |
| union { ... } |
unsigned int Token::_instances = 0 [static, protected] |
Definition at line 62 of file token.h.
Referenced by instances(), register_instance(), and unregister_instance().
| const unsigned char* Token::dataptr |
Definition at line 48 of file token.h.
Referenced by EScriptProgram::_readToken(), EScriptProgram::dump_casejmp(), DumpCaseJmp(), Executor::ins_casejmp_finddefault(), Executor::ins_casejmp_findlong(), and Executor::ins_casejmp_findstring().
Definition at line 44 of file token.h.
Referenced by Compiler::getUserArgs(), SmartParser::IIP(), operator=(), SmartParser::parseToken(), Compiler::substitute_constant(), and EScriptProgram::update_dbg_pos().
Definition at line 45 of file token.h.
Referenced by Compiler::getUserArgs(), SmartParser::IIP(), operator=(), SmartParser::parseToken(), Compiler::substitute_constant(), and EScriptProgram::update_dbg_pos().
| bool Token::deprecated |
Definition at line 51 of file token.h.
Referenced by Compiler::_getStatement(), operator=(), and Compiler::validate().
| double Token::dval |
Definition at line 38 of file token.h.
Referenced by EScriptProgram::_readToken(), EScriptProgram::addToken(), SmartParser::IIP(), Executor::innerExec(), Executor::ins_double(), Executor::makeObj(), operator=(), optimize_double_operation(), and printOn().
Definition at line 36 of file token.h.
Referenced by Compiler::_getStatement(), EScriptProgram::_readToken(), EScriptProgram::addToken(), SmartParser::callingMethod(), Compiler::convert_variables(), EScriptProgram::dump(), DumpScript(), Compiler::eatToken(), Compiler::forward_read_function(), Expression::get_num_tokens(), SmartParser::getArgs(), Compiler::getArrayElements(), Compiler::getDictionaryMembers(), Compiler::getExprInParens(), Executor::GetInstrFunc(), Compiler::getMethodArguments(), Compiler::getNewArrayElements(), Compiler::getSimpleExpr(), Compiler::getStructMembers(), SmartParser::getToken(), Compiler::getUserArgs(), Compiler::handleBlock(), Compiler::handleBracketedFor_basic(), Compiler::handleBracketedFor_c(), Compiler::handleBracketedFunction2(), Compiler::handleBracketedIf(), Compiler::handleBreak(), Compiler::handleConstDeclare(), Compiler::handleContinue(), Compiler::handleDeclare(), Compiler::handleEnumDeclare(), Compiler::handleExit(), Compiler::handleFor(), Compiler::handleFor_c(), Compiler::handleForEach(), Compiler::handleFunction(), Compiler::handleIf(), Compiler::handleInclude(), Compiler::handleProgram(), Compiler::handleProgram2(), Compiler::handleReturn(), Compiler::handleSwitch(), Compiler::handleUse(), Compiler::handleVarDeclare(), SmartParser::IIP(), Compiler::inner_read_function_declarations(), Executor::innerExec(), Compiler::isFunc(), Compiler::isLegal(), SmartParser::isOkay(), Compiler::isUserFunc(), Executor::makeObj(), mismatched_end(), operator=(), Expression::optimize_binary_operations(), optimize_double_operation(), optimize_long_operation(), optimize_string_operation(), Expression::optimize_token(), Expression::optimize_unary_operations(), SmartParser::parseToken(), Compiler::readblock(), Compiler::readFunctionDeclaration(), Compiler::substitute_constants(), SmartParser::tryLiteral(), Compiler::useModule(), and Compiler::validate().
| int Token::lval |
Definition at line 47 of file token.h.
Referenced by Compiler::_getStatement(), EScriptProgram::_readToken(), EScriptProgram::addToken(), Compiler::convert_variables(), Executor::execFunc(), Expression::get_num_tokens(), Compiler::handleEnumDeclare(), Compiler::handleSwitch(), SmartParser::IIP(), Executor::innerExec(), Executor::ins_assign_globalvar(), Executor::ins_assign_localvar(), Executor::ins_call_method(), Executor::ins_call_method_id(), Executor::ins_func(), Executor::ins_get_member_id(), Executor::ins_globalvar(), Executor::ins_gosub(), Executor::ins_goto(), Executor::ins_initfor(), Executor::ins_initforeach(), Executor::ins_initforeach2(), Executor::ins_jmpiffalse(), Executor::ins_jmpiftrue(), Executor::ins_jsr_userfunc(), Executor::ins_leave_block(), Executor::ins_localvar(), Executor::ins_long(), Executor::ins_multisubscript(), Executor::ins_multisubscript_assign(), Executor::ins_nextfor(), Executor::ins_set_member_id(), Executor::ins_set_member_id_consume(), Executor::ins_set_member_id_consume_divideequal(), Executor::ins_set_member_id_consume_minusequal(), Executor::ins_set_member_id_consume_modulusequal(), Executor::ins_set_member_id_consume_plusequal(), Executor::ins_set_member_id_consume_timesequal(), Executor::ins_stepforeach(), Executor::ins_stepforeach2(), Compiler::isFunc(), Executor::makeObj(), operator=(), optimize_long_operation(), Expression::optimize_token(), SmartParser::parseToken(), and printOn().
| unsigned char Token::module |
Definition at line 52 of file token.h.
Referenced by EScriptProgram::_readToken(), EScriptProgram::addToken(), Executor::execFunc(), Executor::innerExec(), Executor::ins_func(), Compiler::isFunc(), Compiler::isUserFunc(), operator=(), and printOn().
| int Token::ownsStr |
Definition at line 40 of file token.h.
Referenced by operator=().
Definition at line 41 of file token.h.
Referenced by EScriptProgram::_readToken().
const char* Token::token [protected] |
Definition at line 57 of file token.h.
Referenced by copyStr(), nulStr(), operator=(), printOn(), setStr(), Token(), tokval(), and unregister_instance().
Definition at line 37 of file token.h.
Referenced by Compiler::_getStatement(), EScriptProgram::_readToken(), EScriptProgram::addToken(), Expression::get_num_tokens(), SmartParser::IIP(), Executor::innerExec(), Executor::ins_call_method_id(), Compiler::isFunc(), SmartParser::isOkay(), Compiler::isUserFunc(), operator=(), Expression::optimize_binary_operations(), Expression::optimize_token(), Expression::optimize_unary_operations(), SmartParser::parseToken(), printOn(), Compiler::readFunctionDeclaration(), SmartParser::tryLiteral(), and Compiler::validate().
Definition at line 50 of file token.h.
Referenced by EScriptProgram::addToken(), Expression::get_num_tokens(), Compiler::isFunc(), Compiler::isUserFunc(), and operator=().