Ruby
1.9.3p448(2013-06-27revision41675)
Main Page
Modules
Data Structures
Files
File List
Globals
id.h
Go to the documentation of this file.
1
/* DO NOT EDIT THIS FILE DIRECTLY */
2
/**********************************************************************
3
4
id.h -
5
6
$Author: usa $
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
#ifdef USE_PARSE_H
28
#include "
parse.h
"
29
#endif
30
31
#include "
vm_opts.h
"
/* for SUPPORT_JOKE */
32
33
#define symIFUNC ID2SYM(idIFUNC)
34
#define symCFUNC ID2SYM(idCFUNC)
35
36
#if !defined tLAST_TOKEN && defined YYTOKENTYPE
37
#define tLAST_TOKEN tLAST_TOKEN
38
#endif
39
40
enum
ruby_method_ids
{
41
#ifndef tLAST_TOKEN
42
tUPLUS
= 321,
43
tUMINUS
= 322,
44
tPOW
= 323,
45
tCMP
= 324,
46
tEQ
= 325,
47
tEQQ
= 326,
48
tNEQ
= 327,
49
tGEQ
= 328,
50
tLEQ
= 329,
51
tANDOP
= 330,
52
tOROP
= 331,
53
tMATCH
= 332,
54
tNMATCH
= 333,
55
tDOT2
= 334,
56
tDOT3
= 335,
57
tAREF
= 336,
58
tASET
= 337,
59
tLSHFT
= 338,
60
tRSHFT
= 339,
61
tLAMBDA
= 352,
62
idNULL
= 365,
63
idRespond_to
= 366,
64
idIFUNC
= 367,
65
idCFUNC
= 368,
66
id_core_set_method_alias
= 369,
67
id_core_set_variable_alias
= 370,
68
id_core_undef_method
= 371,
69
id_core_define_method
= 372,
70
id_core_define_singleton_method
= 373,
71
id_core_set_postexe
= 374,
72
tLAST_TOKEN
= 375,
73
#endif
74
idDot2
=
tDOT2
,
75
idDot3
=
tDOT3
,
76
idUPlus
=
tUPLUS
,
77
idUMinus
=
tUMINUS
,
78
idPow
=
tPOW
,
79
idCmp
=
tCMP
,
80
idPLUS
=
'+'
,
81
idMINUS
=
'-'
,
82
idMULT
=
'*'
,
83
idDIV
=
'/'
,
84
idMOD
=
'%'
,
85
idLT
=
'<'
,
86
idLTLT
=
tLSHFT
,
87
idLE
=
tLEQ
,
88
idGT
=
'>'
,
89
idGE
=
tGEQ
,
90
idEq
=
tEQ
,
91
idEqq
=
tEQQ
,
92
idNeq
=
tNEQ
,
93
idNot
=
'!'
,
94
idBackquote
=
'`'
,
95
idEqTilde
=
tMATCH
,
96
idNeqTilde
=
tNMATCH
,
97
idAREF
=
tAREF
,
98
idASET
=
tASET
,
99
idLAST_TOKEN
=
tLAST_TOKEN
>>
ID_SCOPE_SHIFT
,
100
tIntern
,
101
tMethodMissing
,
102
tLength
,
103
tSize
,
104
tGets
,
105
tSucc
,
106
tEach
,
107
tProc
,
108
tLambda
,
109
tSend
,
110
t__send__
,
111
tInitialize
,
112
tUScore
,
113
#if SUPPORT_JOKE
114
tBitblt,
115
tAnswer,
116
#endif
117
tLAST_ID
,
118
#define TOKEN2ID(n) id##n = ((t##n<<ID_SCOPE_SHIFT)|ID_LOCAL)
119
#if SUPPORT_JOKE
120
TOKEN2ID
(Bitblt),
121
TOKEN2ID
(Answer),
122
#endif
123
TOKEN2ID
(Intern),
124
TOKEN2ID
(MethodMissing),
125
TOKEN2ID
(Length),
126
TOKEN2ID
(Size),
127
TOKEN2ID
(Gets),
128
TOKEN2ID
(Succ),
129
TOKEN2ID
(Each),
130
TOKEN2ID
(Proc),
131
TOKEN2ID
(Lambda),
132
TOKEN2ID
(Send),
133
TOKEN2ID
(__send__),
134
TOKEN2ID
(Initialize),
135
TOKEN2ID
(UScore),
136
TOKEN2ID
(LAST_ID)
137
};
138
139
#ifdef tLAST_TOKEN
140
struct
ruby_method_ids_check
{
141
#define ruby_method_id_check_for(name, value) \
142
int checking_for_##name[name == (value) ? 1 : -1]
143
ruby_method_id_check_for
(
tUPLUS
, 321);
144
ruby_method_id_check_for
(
tUMINUS
, 322);
145
ruby_method_id_check_for
(
tPOW
, 323);
146
ruby_method_id_check_for
(
tCMP
, 324);
147
ruby_method_id_check_for
(
tEQ
, 325);
148
ruby_method_id_check_for
(
tEQQ
, 326);
149
ruby_method_id_check_for
(
tNEQ
, 327);
150
ruby_method_id_check_for
(
tGEQ
, 328);
151
ruby_method_id_check_for
(
tLEQ
, 329);
152
ruby_method_id_check_for
(
tANDOP
, 330);
153
ruby_method_id_check_for
(
tOROP
, 331);
154
ruby_method_id_check_for
(
tMATCH
, 332);
155
ruby_method_id_check_for
(
tNMATCH
, 333);
156
ruby_method_id_check_for
(
tDOT2
, 334);
157
ruby_method_id_check_for
(
tDOT3
, 335);
158
ruby_method_id_check_for
(
tAREF
, 336);
159
ruby_method_id_check_for
(
tASET
, 337);
160
ruby_method_id_check_for
(
tLSHFT
, 338);
161
ruby_method_id_check_for
(
tRSHFT
, 339);
162
ruby_method_id_check_for
(
tLAMBDA
, 352);
163
ruby_method_id_check_for
(
idNULL
, 365);
164
ruby_method_id_check_for
(
idRespond_to
, 366);
165
ruby_method_id_check_for
(
idIFUNC
, 367);
166
ruby_method_id_check_for
(
idCFUNC
, 368);
167
ruby_method_id_check_for
(
id_core_set_method_alias
, 369);
168
ruby_method_id_check_for
(
id_core_set_variable_alias
, 370);
169
ruby_method_id_check_for
(
id_core_undef_method
, 371);
170
ruby_method_id_check_for
(
id_core_define_method
, 372);
171
ruby_method_id_check_for
(
id_core_define_singleton_method
, 373);
172
ruby_method_id_check_for
(
id_core_set_postexe
, 374);
173
ruby_method_id_check_for
(
tLAST_TOKEN
, 375);
174
};
175
#endif
176
177
#endif
/* RUBY_ID_H */
178
Generated on Fri Jun 28 2013 02:34:39 for Ruby by
1.8.3