Ruby 1.9.3p327(2012-11-10revision37606)
|
00001 /* DO NOT EDIT THIS FILE DIRECTLY */ 00002 /********************************************************************** 00003 00004 id.h - 00005 00006 $Author: akr $ 00007 created at: Sun Oct 19 21:12:51 2008 00008 00009 Copyright (C) 2007 Koichi Sasada 00010 00011 **********************************************************************/ 00012 00013 #ifndef RUBY_ID_H 00014 #define RUBY_ID_H 00015 00016 #define ID_SCOPE_SHIFT 3 00017 #define ID_SCOPE_MASK 0x07 00018 #define ID_LOCAL 0x00 00019 #define ID_INSTANCE 0x01 00020 #define ID_GLOBAL 0x03 00021 #define ID_ATTRSET 0x04 00022 #define ID_CONST 0x05 00023 #define ID_CLASS 0x06 00024 #define ID_JUNK 0x07 00025 #define ID_INTERNAL ID_JUNK 00026 00027 #ifdef USE_PARSE_H 00028 #include "parse.h" 00029 #endif 00030 00031 #include "vm_opts.h" /* for SUPPORT_JOKE */ 00032 00033 #define symIFUNC ID2SYM(idIFUNC) 00034 #define symCFUNC ID2SYM(idCFUNC) 00035 00036 #if !defined tLAST_TOKEN && defined YYTOKENTYPE 00037 #define tLAST_TOKEN tLAST_TOKEN 00038 #endif 00039 00040 enum ruby_method_ids { 00041 #ifndef tLAST_TOKEN 00042 tUPLUS = 321, 00043 tUMINUS = 322, 00044 tPOW = 323, 00045 tCMP = 324, 00046 tEQ = 325, 00047 tEQQ = 326, 00048 tNEQ = 327, 00049 tGEQ = 328, 00050 tLEQ = 329, 00051 tANDOP = 330, 00052 tOROP = 331, 00053 tMATCH = 332, 00054 tNMATCH = 333, 00055 tDOT2 = 334, 00056 tDOT3 = 335, 00057 tAREF = 336, 00058 tASET = 337, 00059 tLSHFT = 338, 00060 tRSHFT = 339, 00061 tLAMBDA = 352, 00062 idNULL = 365, 00063 idRespond_to = 366, 00064 idIFUNC = 367, 00065 idCFUNC = 368, 00066 id_core_set_method_alias = 369, 00067 id_core_set_variable_alias = 370, 00068 id_core_undef_method = 371, 00069 id_core_define_method = 372, 00070 id_core_define_singleton_method = 373, 00071 id_core_set_postexe = 374, 00072 tLAST_TOKEN = 375, 00073 #endif 00074 idDot2 = tDOT2, 00075 idDot3 = tDOT3, 00076 idUPlus = tUPLUS, 00077 idUMinus = tUMINUS, 00078 idPow = tPOW, 00079 idCmp = tCMP, 00080 idPLUS = '+', 00081 idMINUS = '-', 00082 idMULT = '*', 00083 idDIV = '/', 00084 idMOD = '%', 00085 idLT = '<', 00086 idLTLT = tLSHFT, 00087 idLE = tLEQ, 00088 idGT = '>', 00089 idGE = tGEQ, 00090 idEq = tEQ, 00091 idEqq = tEQQ, 00092 idNeq = tNEQ, 00093 idNot = '!', 00094 idBackquote = '`', 00095 idEqTilde = tMATCH, 00096 idNeqTilde = tNMATCH, 00097 idAREF = tAREF, 00098 idASET = tASET, 00099 idLAST_TOKEN = tLAST_TOKEN >> ID_SCOPE_SHIFT, 00100 tIntern, 00101 tMethodMissing, 00102 tLength, 00103 tSize, 00104 tGets, 00105 tSucc, 00106 tEach, 00107 tLambda, 00108 tSend, 00109 t__send__, 00110 tInitialize, 00111 tUScore, 00112 #if SUPPORT_JOKE 00113 tBitblt, 00114 tAnswer, 00115 #endif 00116 tLAST_ID, 00117 #define TOKEN2ID(n) id##n = ((t##n<<ID_SCOPE_SHIFT)|ID_LOCAL) 00118 #if SUPPORT_JOKE 00119 TOKEN2ID(Bitblt), 00120 TOKEN2ID(Answer), 00121 #endif 00122 TOKEN2ID(Intern), 00123 TOKEN2ID(MethodMissing), 00124 TOKEN2ID(Length), 00125 TOKEN2ID(Size), 00126 TOKEN2ID(Gets), 00127 TOKEN2ID(Succ), 00128 TOKEN2ID(Each), 00129 TOKEN2ID(Lambda), 00130 TOKEN2ID(Send), 00131 TOKEN2ID(__send__), 00132 TOKEN2ID(Initialize), 00133 TOKEN2ID(UScore), 00134 TOKEN2ID(LAST_ID) 00135 }; 00136 00137 #ifdef tLAST_TOKEN 00138 struct ruby_method_ids_check { 00139 #define ruby_method_id_check_for(name, value) \ 00140 int checking_for_##name[name == (value) ? 1 : -1] 00141 ruby_method_id_check_for(tUPLUS, 321); 00142 ruby_method_id_check_for(tUMINUS, 322); 00143 ruby_method_id_check_for(tPOW, 323); 00144 ruby_method_id_check_for(tCMP, 324); 00145 ruby_method_id_check_for(tEQ, 325); 00146 ruby_method_id_check_for(tEQQ, 326); 00147 ruby_method_id_check_for(tNEQ, 327); 00148 ruby_method_id_check_for(tGEQ, 328); 00149 ruby_method_id_check_for(tLEQ, 329); 00150 ruby_method_id_check_for(tANDOP, 330); 00151 ruby_method_id_check_for(tOROP, 331); 00152 ruby_method_id_check_for(tMATCH, 332); 00153 ruby_method_id_check_for(tNMATCH, 333); 00154 ruby_method_id_check_for(tDOT2, 334); 00155 ruby_method_id_check_for(tDOT3, 335); 00156 ruby_method_id_check_for(tAREF, 336); 00157 ruby_method_id_check_for(tASET, 337); 00158 ruby_method_id_check_for(tLSHFT, 338); 00159 ruby_method_id_check_for(tRSHFT, 339); 00160 ruby_method_id_check_for(tLAMBDA, 352); 00161 ruby_method_id_check_for(idNULL, 365); 00162 ruby_method_id_check_for(idRespond_to, 366); 00163 ruby_method_id_check_for(idIFUNC, 367); 00164 ruby_method_id_check_for(idCFUNC, 368); 00165 ruby_method_id_check_for(id_core_set_method_alias, 369); 00166 ruby_method_id_check_for(id_core_set_variable_alias, 370); 00167 ruby_method_id_check_for(id_core_undef_method, 371); 00168 ruby_method_id_check_for(id_core_define_method, 372); 00169 ruby_method_id_check_for(id_core_define_singleton_method, 373); 00170 ruby_method_id_check_for(id_core_set_postexe, 374); 00171 ruby_method_id_check_for(tLAST_TOKEN, 375); 00172 }; 00173 #endif 00174 00175 #endif /* RUBY_ID_H */ 00176