Line | Count | Source (jump to first uncovered line) |
1 | | /* DO NOT EDIT THIS FILE DIRECTLY */ |
2 | | /********************************************************************** |
3 | | |
4 | | id.c - |
5 | | |
6 | | $Author$ |
7 | | created at: Wed Dec 5 02:36:10 2012 |
8 | | |
9 | | Copyright (C) 2004-2007 Koichi Sasada |
10 | | |
11 | | **********************************************************************/ |
12 | | |
13 | | #define tDOT2 RUBY_TOKEN(DOT2) |
14 | | #define tDOT3 RUBY_TOKEN(DOT3) |
15 | | #define tUPLUS RUBY_TOKEN(UPLUS) |
16 | | #define tUMINUS RUBY_TOKEN(UMINUS) |
17 | | #define tPOW RUBY_TOKEN(POW) |
18 | | #define tCMP RUBY_TOKEN(CMP) |
19 | | #define tLSHFT RUBY_TOKEN(LSHFT) |
20 | | #define tRSHFT RUBY_TOKEN(RSHFT) |
21 | | #define tLEQ RUBY_TOKEN(LEQ) |
22 | | #define tGEQ RUBY_TOKEN(GEQ) |
23 | | #define tEQ RUBY_TOKEN(EQ) |
24 | | #define tEQQ RUBY_TOKEN(EQQ) |
25 | | #define tNEQ RUBY_TOKEN(NEQ) |
26 | | #define tMATCH RUBY_TOKEN(MATCH) |
27 | | #define tNMATCH RUBY_TOKEN(NMATCH) |
28 | 0 | #define tAREF RUBY_TOKEN(AREF) |
29 | 0 | #define tASET RUBY_TOKEN(ASET) |
30 | | #define tCOLON2 RUBY_TOKEN(COLON2) |
31 | | #define tANDOP RUBY_TOKEN(ANDOP) |
32 | | #define tOROP RUBY_TOKEN(OROP) |
33 | | #define tANDDOT RUBY_TOKEN(ANDDOT) |
34 | | |
35 | | static const struct { |
36 | | unsigned short token; |
37 | | const char name[3], term; |
38 | | } op_tbl[] = { |
39 | | {tDOT2, ".."}, |
40 | | {tDOT3, "..."}, |
41 | | {tUPLUS, "+@"}, |
42 | | {tUMINUS, "-@"}, |
43 | | {tPOW, "**"}, |
44 | | {tCMP, "<=>"}, |
45 | | {tLSHFT, "<<"}, |
46 | | {tRSHFT, ">>"}, |
47 | | {tLEQ, "<="}, |
48 | | {tGEQ, ">="}, |
49 | | {tEQ, "=="}, |
50 | | {tEQQ, "==="}, |
51 | | {tNEQ, "!="}, |
52 | | {tMATCH, "=~"}, |
53 | | {tNMATCH, "!~"}, |
54 | | {tAREF, "[]"}, |
55 | | {tASET, "[]="}, |
56 | | {tCOLON2, "::"}, |
57 | | {tANDOP, "&&"}, |
58 | | {tOROP, "||"}, |
59 | | {tANDDOT, "&."}, |
60 | | }; |
61 | | |
62 | | static void |
63 | | Init_id(void) |
64 | 0 | { |
65 | 0 | rb_encoding *enc = rb_usascii_encoding(); |
66 | |
|
67 | 0 | REGISTER_SYMID(idMax, "max"); |
68 | 0 | REGISTER_SYMID(idMin, "min"); |
69 | 0 | REGISTER_SYMID(idHash, "hash"); |
70 | 0 | REGISTER_SYMID(idFreeze, "freeze"); |
71 | 0 | REGISTER_SYMID(idNilP, "nil?"); |
72 | 0 | REGISTER_SYMID(idInspect, "inspect"); |
73 | 0 | REGISTER_SYMID(idIntern, "intern"); |
74 | 0 | REGISTER_SYMID(idObject_id, "object_id"); |
75 | 0 | REGISTER_SYMID(idConst_added, "const_added"); |
76 | 0 | REGISTER_SYMID(idConst_missing, "const_missing"); |
77 | 0 | REGISTER_SYMID(idMethodMissing, "method_missing"); |
78 | 0 | REGISTER_SYMID(idMethod_added, "method_added"); |
79 | 0 | REGISTER_SYMID(idSingleton_method_added, "singleton_method_added"); |
80 | 0 | REGISTER_SYMID(idMethod_removed, "method_removed"); |
81 | 0 | REGISTER_SYMID(idSingleton_method_removed, "singleton_method_removed"); |
82 | 0 | REGISTER_SYMID(idMethod_undefined, "method_undefined"); |
83 | 0 | REGISTER_SYMID(idSingleton_method_undefined, "singleton_method_undefined"); |
84 | 0 | REGISTER_SYMID(idLength, "length"); |
85 | 0 | REGISTER_SYMID(idSize, "size"); |
86 | 0 | REGISTER_SYMID(idGets, "gets"); |
87 | 0 | REGISTER_SYMID(idSucc, "succ"); |
88 | 0 | REGISTER_SYMID(idEach, "each"); |
89 | 0 | REGISTER_SYMID(idProc, "proc"); |
90 | 0 | REGISTER_SYMID(idLambda, "lambda"); |
91 | 0 | REGISTER_SYMID(idSend, "send"); |
92 | 0 | REGISTER_SYMID(id__send__, "__send__"); |
93 | 0 | REGISTER_SYMID(id__recursive_key__, "__recursive_key__"); |
94 | 0 | REGISTER_SYMID(idInitialize, "initialize"); |
95 | 0 | REGISTER_SYMID(idInitialize_copy, "initialize_copy"); |
96 | 0 | REGISTER_SYMID(idInitialize_clone, "initialize_clone"); |
97 | 0 | REGISTER_SYMID(idInitialize_dup, "initialize_dup"); |
98 | 0 | REGISTER_SYMID(idTo_int, "to_int"); |
99 | 0 | REGISTER_SYMID(idTo_ary, "to_ary"); |
100 | 0 | REGISTER_SYMID(idTo_str, "to_str"); |
101 | 0 | REGISTER_SYMID(idTo_sym, "to_sym"); |
102 | 0 | REGISTER_SYMID(idTo_hash, "to_hash"); |
103 | 0 | REGISTER_SYMID(idTo_proc, "to_proc"); |
104 | 0 | REGISTER_SYMID(idTo_io, "to_io"); |
105 | 0 | REGISTER_SYMID(idTo_a, "to_a"); |
106 | 0 | REGISTER_SYMID(idTo_s, "to_s"); |
107 | 0 | REGISTER_SYMID(idTo_i, "to_i"); |
108 | 0 | REGISTER_SYMID(idTo_f, "to_f"); |
109 | 0 | REGISTER_SYMID(idTo_r, "to_r"); |
110 | 0 | REGISTER_SYMID(idBt, "bt"); |
111 | 0 | REGISTER_SYMID(idBt_locations, "bt_locations"); |
112 | 0 | REGISTER_SYMID(idCall, "call"); |
113 | 0 | REGISTER_SYMID(idMesg, "mesg"); |
114 | 0 | REGISTER_SYMID(idException, "exception"); |
115 | 0 | REGISTER_SYMID(idLocals, "locals"); |
116 | 0 | REGISTER_SYMID(idNOT, "not"); |
117 | 0 | REGISTER_SYMID(idAND, "and"); |
118 | 0 | REGISTER_SYMID(idOR, "or"); |
119 | 0 | REGISTER_SYMID(idDiv, "div"); |
120 | 0 | REGISTER_SYMID(idDivmod, "divmod"); |
121 | 0 | REGISTER_SYMID(idFdiv, "fdiv"); |
122 | 0 | REGISTER_SYMID(idQuo, "quo"); |
123 | 0 | REGISTER_SYMID(idName, "name"); |
124 | 0 | REGISTER_SYMID(idNil, "nil"); |
125 | 0 | REGISTER_SYMID(idPath, "path"); |
126 | 0 | REGISTER_SYMID(idUScore, "_"); |
127 | 0 | REGISTER_SYMID(idNUMPARAM_1, "_1"); |
128 | 0 | REGISTER_SYMID(idNUMPARAM_2, "_2"); |
129 | 0 | REGISTER_SYMID(idNUMPARAM_3, "_3"); |
130 | 0 | REGISTER_SYMID(idNUMPARAM_4, "_4"); |
131 | 0 | REGISTER_SYMID(idNUMPARAM_5, "_5"); |
132 | 0 | REGISTER_SYMID(idNUMPARAM_6, "_6"); |
133 | 0 | REGISTER_SYMID(idNUMPARAM_7, "_7"); |
134 | 0 | REGISTER_SYMID(idNUMPARAM_8, "_8"); |
135 | 0 | REGISTER_SYMID(idNUMPARAM_9, "_9"); |
136 | 0 | REGISTER_SYMID(idNULL, ""/*NULL*/""); |
137 | 0 | REGISTER_SYMID(idEmptyP, "empty?"); |
138 | 0 | REGISTER_SYMID(idEqlP, "eql?"); |
139 | 0 | REGISTER_SYMID(idDefault, "default"); |
140 | 0 | REGISTER_SYMID(idRespond_to, "respond_to?"); |
141 | 0 | REGISTER_SYMID(idRespond_to_missing, "respond_to_missing?"); |
142 | 0 | REGISTER_SYMID(idIFUNC, "<IFUNC>"); |
143 | 0 | REGISTER_SYMID(idCFUNC, "<CFUNC>"); |
144 | 0 | REGISTER_SYMID(id_core_set_method_alias, "core#set_method_alias"); |
145 | 0 | REGISTER_SYMID(id_core_set_variable_alias, "core#set_variable_alias"); |
146 | 0 | REGISTER_SYMID(id_core_undef_method, "core#undef_method"); |
147 | 0 | REGISTER_SYMID(id_core_define_method, "core#define_method"); |
148 | 0 | REGISTER_SYMID(id_core_define_singleton_method, "core#define_singleton_method"); |
149 | 0 | REGISTER_SYMID(id_core_set_postexe, "core#set_postexe"); |
150 | 0 | REGISTER_SYMID(id_core_hash_merge_ptr, "core#hash_merge_ptr"); |
151 | 0 | REGISTER_SYMID(id_core_hash_merge_kwd, "core#hash_merge_kwd"); |
152 | 0 | REGISTER_SYMID(id_core_raise, "core#raise"); |
153 | 0 | REGISTER_SYMID(id_core_sprintf, "core#sprintf"); |
154 | 0 | REGISTER_SYMID(idLASTLINE, "$_"); |
155 | 0 | REGISTER_SYMID(idBACKREF, "$~"); |
156 | 0 | REGISTER_SYMID(idERROR_INFO, "$!"); |
157 | 0 | } |