Ruby
1.9.3p429(2013-05-15revision40747)
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: akr $
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
tLambda
,
108
tSend
,
109
t__send__
,
110
tInitialize
,
111
tUScore
,
112
#if SUPPORT_JOKE
113
tBitblt,
114
tAnswer,
115
#endif
116
tLAST_ID
,
117
#define TOKEN2ID(n) id##n = ((t##n<<ID_SCOPE_SHIFT)|ID_LOCAL)
118
#if SUPPORT_JOKE
119
TOKEN2ID
(Bitblt),
120
TOKEN2ID
(Answer),
121
#endif
122
TOKEN2ID
(Intern),
123
TOKEN2ID
(MethodMissing),
124
TOKEN2ID
(Length),
125
TOKEN2ID
(Size),
126
TOKEN2ID
(Gets),
127
TOKEN2ID
(Succ),
128
TOKEN2ID
(Each),
129
TOKEN2ID
(Lambda),
130
TOKEN2ID
(Send),
131
TOKEN2ID
(__send__),
132
TOKEN2ID
(Initialize),
133
TOKEN2ID
(UScore),
134
TOKEN2ID
(LAST_ID)
135
};
136
137
#ifdef tLAST_TOKEN
138
struct
ruby_method_ids_check
{
139
#define ruby_method_id_check_for(name, value) \
140
int checking_for_##name[name == (value) ? 1 : -1]
141
ruby_method_id_check_for
(
tUPLUS
, 321);
142
ruby_method_id_check_for
(
tUMINUS
, 322);
143
ruby_method_id_check_for
(
tPOW
, 323);
144
ruby_method_id_check_for
(
tCMP
, 324);
145
ruby_method_id_check_for
(
tEQ
, 325);
146
ruby_method_id_check_for
(
tEQQ
, 326);
147
ruby_method_id_check_for
(
tNEQ
, 327);
148
ruby_method_id_check_for
(
tGEQ
, 328);
149
ruby_method_id_check_for
(
tLEQ
, 329);
150
ruby_method_id_check_for
(
tANDOP
, 330);
151
ruby_method_id_check_for
(
tOROP
, 331);
152
ruby_method_id_check_for
(
tMATCH
, 332);
153
ruby_method_id_check_for
(
tNMATCH
, 333);
154
ruby_method_id_check_for
(
tDOT2
, 334);
155
ruby_method_id_check_for
(
tDOT3
, 335);
156
ruby_method_id_check_for
(
tAREF
, 336);
157
ruby_method_id_check_for
(
tASET
, 337);
158
ruby_method_id_check_for
(
tLSHFT
, 338);
159
ruby_method_id_check_for
(
tRSHFT
, 339);
160
ruby_method_id_check_for
(
tLAMBDA
, 352);
161
ruby_method_id_check_for
(
idNULL
, 365);
162
ruby_method_id_check_for
(
idRespond_to
, 366);
163
ruby_method_id_check_for
(
idIFUNC
, 367);
164
ruby_method_id_check_for
(
idCFUNC
, 368);
165
ruby_method_id_check_for
(
id_core_set_method_alias
, 369);
166
ruby_method_id_check_for
(
id_core_set_variable_alias
, 370);
167
ruby_method_id_check_for
(
id_core_undef_method
, 371);
168
ruby_method_id_check_for
(
id_core_define_method
, 372);
169
ruby_method_id_check_for
(
id_core_define_singleton_method
, 373);
170
ruby_method_id_check_for
(
id_core_set_postexe
, 374);
171
ruby_method_id_check_for
(
tLAST_TOKEN
, 375);
172
};
173
#endif
174
175
#endif
/* RUBY_ID_H */
176
Generated on Thu May 23 2013 20:33:08 for Ruby by
1.8.3