Ruby  1.9.3p429(2013-05-15revision40747)
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 
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,
72  tLAST_TOKEN = 375,
73 #endif
80  idPLUS = '+',
81  idMINUS = '-',
82  idMULT = '*',
83  idDIV = '/',
84  idMOD = '%',
85  idLT = '<',
88  idGT = '>',
90  idEq = tEQ,
93  idNot = '!',
94  idBackquote = '`',
112 #if SUPPORT_JOKE
113  tBitblt,
114  tAnswer,
115 #endif
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]
172 };
173 #endif
174 
175 #endif /* RUBY_ID_H */
176