1/* DO NOT EDIT THIS FILE DIRECTLY */ 2/********************************************************************** 3 4 id.h - 5 6 $Author: nobu $ 7 created at: Sun Oct 19 21:12:51 2008 8 9 Copyright (C) 2007 Koichi Sasada 10 11**********************************************************************/ 12 13#ifndef RUBY_ID_H 14#define RUBY_ID_H 15 16#define ID_SCOPE_SHIFT 3 17#define ID_SCOPE_MASK 0x07 18#define ID_LOCAL 0x00 19#define ID_INSTANCE 0x01 20#define ID_GLOBAL 0x03 21#define ID_ATTRSET 0x04 22#define ID_CONST 0x05 23#define ID_CLASS 0x06 24#define ID_JUNK 0x07 25#define ID_INTERNAL ID_JUNK 26 27#define ID2ATTRSET(id) (((id)&~ID_SCOPE_MASK)|ID_ATTRSET) 28 29#define symIFUNC ID2SYM(idIFUNC) 30#define symCFUNC ID2SYM(idCFUNC) 31 32#define RUBY_TOKEN_DOT2 128 33#define RUBY_TOKEN_DOT3 129 34#define RUBY_TOKEN_UPLUS 130 35#define RUBY_TOKEN_UMINUS 131 36#define RUBY_TOKEN_POW 132 37#define RUBY_TOKEN_DSTAR 133 38#define RUBY_TOKEN_CMP 134 39#define RUBY_TOKEN_LSHFT 135 40#define RUBY_TOKEN_RSHFT 136 41#define RUBY_TOKEN_LEQ 137 42#define RUBY_TOKEN_GEQ 138 43#define RUBY_TOKEN_EQ 139 44#define RUBY_TOKEN_EQQ 140 45#define RUBY_TOKEN_NEQ 141 46#define RUBY_TOKEN_MATCH 142 47#define RUBY_TOKEN_NMATCH 143 48#define RUBY_TOKEN_AREF 144 49#define RUBY_TOKEN_ASET 145 50#define RUBY_TOKEN_COLON2 146 51#define RUBY_TOKEN_COLON3 147 52#define RUBY_TOKEN(t) RUBY_TOKEN_##t 53 54enum ruby_method_ids { 55 idDot2 = RUBY_TOKEN(DOT2), 56 idDot3 = RUBY_TOKEN(DOT3), 57 idUPlus = RUBY_TOKEN(UPLUS), 58 idUMinus = RUBY_TOKEN(UMINUS), 59 idPow = RUBY_TOKEN(POW), 60 idCmp = RUBY_TOKEN(CMP), 61 idPLUS = '+', 62 idMINUS = '-', 63 idMULT = '*', 64 idDIV = '/', 65 idMOD = '%', 66 idLT = '<', 67 idLTLT = RUBY_TOKEN(LSHFT), 68 idLE = RUBY_TOKEN(LEQ), 69 idGT = '>', 70 idGE = RUBY_TOKEN(GEQ), 71 idEq = RUBY_TOKEN(EQ), 72 idEqq = RUBY_TOKEN(EQQ), 73 idNeq = RUBY_TOKEN(NEQ), 74 idNot = '!', 75 idBackquote = '`', 76 idEqTilde = RUBY_TOKEN(MATCH), 77 idNeqTilde = RUBY_TOKEN(NMATCH), 78 idAREF = RUBY_TOKEN(AREF), 79 idASET = RUBY_TOKEN(ASET), 80 tPRESERVED_ID_BEGIN = 147, 81 idNULL, 82 idEmptyP, 83 idRespond_to, 84 idRespond_to_missing, 85 idIFUNC, 86 idCFUNC, 87 id_core_set_method_alias, 88 id_core_set_variable_alias, 89 id_core_undef_method, 90 id_core_define_method, 91 id_core_define_singleton_method, 92 id_core_set_postexe, 93 id_core_hash_from_ary, 94 id_core_hash_merge_ary, 95 id_core_hash_merge_ptr, 96 id_core_hash_merge_kwd, 97 tPRESERVED_ID_END, 98 tIntern, 99 tMethodMissing, 100 tLength, 101 tSize, 102 tGets, 103 tSucc, 104 tEach, 105 tProc, 106 tLambda, 107 tSend, 108 t__send__, 109 tInitialize, 110 tInitialize_copy, 111 tInitialize_clone, 112 tInitialize_dup, 113 tUScore, 114#define TOKEN2LOCALID(n) id##n = ((t##n<<ID_SCOPE_SHIFT)|ID_LOCAL) 115 TOKEN2LOCALID(Intern), 116 TOKEN2LOCALID(MethodMissing), 117 TOKEN2LOCALID(Length), 118 TOKEN2LOCALID(Size), 119 TOKEN2LOCALID(Gets), 120 TOKEN2LOCALID(Succ), 121 TOKEN2LOCALID(Each), 122 TOKEN2LOCALID(Proc), 123 TOKEN2LOCALID(Lambda), 124 TOKEN2LOCALID(Send), 125 TOKEN2LOCALID(__send__), 126 TOKEN2LOCALID(Initialize), 127 TOKEN2LOCALID(Initialize_copy), 128 TOKEN2LOCALID(Initialize_clone), 129 TOKEN2LOCALID(Initialize_dup), 130 TOKEN2LOCALID(UScore), 131 tLAST_OP_ID = tPRESERVED_ID_END-1, 132 idLAST_OP_ID = tLAST_OP_ID >> ID_SCOPE_SHIFT 133}; 134 135#endif /* RUBY_ID_H */ 136