OILS / _gen / frontend / id_kind.asdl.h View on Github | oilshell.org

461 lines, 450 significant
1#ifndef ID_KIND_ASDL_H
2#define ID_KIND_ASDL_H
3
4class BigStr;
5
6namespace id_kind_asdl {
7
8#define ASDL_NAMES struct
9ASDL_NAMES Id {
10 enum no_name {
11 Word_Compound = 1,
12 Arith_Semi = 2,
13 Arith_Comma = 3,
14 Arith_Plus = 4,
15 Arith_Minus = 5,
16 Arith_Star = 6,
17 Arith_Slash = 7,
18 Arith_Percent = 8,
19 Arith_DPlus = 9,
20 Arith_DMinus = 10,
21 Arith_DStar = 11,
22 Arith_LParen = 12,
23 Arith_RParen = 13,
24 Arith_LBracket = 14,
25 Arith_RBracket = 15,
26 Arith_RBrace = 16,
27 Arith_QMark = 17,
28 Arith_Colon = 18,
29 Arith_LessEqual = 19,
30 Arith_Less = 20,
31 Arith_GreatEqual = 21,
32 Arith_Great = 22,
33 Arith_DEqual = 23,
34 Arith_NEqual = 24,
35 Arith_DAmp = 25,
36 Arith_DPipe = 26,
37 Arith_Bang = 27,
38 Arith_DGreat = 28,
39 Arith_DLess = 29,
40 Arith_Amp = 30,
41 Arith_Pipe = 31,
42 Arith_Caret = 32,
43 Arith_Tilde = 33,
44 Arith_Equal = 34,
45 Arith_PlusEqual = 35,
46 Arith_MinusEqual = 36,
47 Arith_StarEqual = 37,
48 Arith_SlashEqual = 38,
49 Arith_PercentEqual = 39,
50 Arith_DGreatEqual = 40,
51 Arith_DLessEqual = 41,
52 Arith_AmpEqual = 42,
53 Arith_CaretEqual = 43,
54 Arith_PipeEqual = 44,
55 Eof_Real = 45,
56 Eof_RParen = 46,
57 Eof_Backtick = 47,
58 Undefined_Tok = 48,
59 Unknown_Tok = 49,
60 Unknown_Backslash = 50,
61 Unknown_DEqual = 51,
62 Eol_Tok = 52,
63 Ignored_LineCont = 53,
64 Ignored_Space = 54,
65 Ignored_Comment = 55,
66 Ignored_HereTabs = 56,
67 WS_Space = 57,
68 Lit_Chars = 58,
69 Lit_VarLike = 59,
70 Lit_ArrayLhsOpen = 60,
71 Lit_ArrayLhsClose = 61,
72 Lit_Splice = 62,
73 Lit_AtLBracket = 63,
74 Lit_AtLBraceDot = 64,
75 Lit_Other = 65,
76 Lit_EscapedChar = 66,
77 Lit_RegexMeta = 67,
78 Lit_LBracket = 68,
79 Lit_RBracket = 69,
80 Lit_Star = 70,
81 Lit_QMark = 71,
82 Lit_LBrace = 72,
83 Lit_RBrace = 73,
84 Lit_Comma = 74,
85 Lit_Equals = 75,
86 Lit_Dollar = 76,
87 Lit_DRightBracket = 77,
88 Lit_Tilde = 78,
89 Lit_Pound = 79,
90 Lit_TPound = 80,
91 Lit_TDot = 81,
92 Lit_Slash = 82,
93 Lit_Percent = 83,
94 Lit_Colon = 84,
95 Lit_Digits = 85,
96 Lit_At = 86,
97 Lit_ArithVarLike = 87,
98 Lit_BadBackslash = 88,
99 Lit_CompDummy = 89,
100 Backtick_Right = 90,
101 Backtick_Quoted = 91,
102 Backtick_DoubleQuote = 92,
103 Backtick_Other = 93,
104 History_Op = 94,
105 History_Num = 95,
106 History_Search = 96,
107 History_Other = 97,
108 Op_Newline = 98,
109 Op_Amp = 99,
110 Op_Pipe = 100,
111 Op_PipeAmp = 101,
112 Op_DAmp = 102,
113 Op_DPipe = 103,
114 Op_Semi = 104,
115 Op_DSemi = 105,
116 Op_LParen = 106,
117 Op_RParen = 107,
118 Op_DLeftParen = 108,
119 Op_DRightParen = 109,
120 Op_Less = 110,
121 Op_Great = 111,
122 Op_Bang = 112,
123 Op_LBracket = 113,
124 Op_RBracket = 114,
125 Op_LBrace = 115,
126 Op_RBrace = 116,
127 Expr_Reserved = 117,
128 Expr_Symbol = 118,
129 Expr_Name = 119,
130 Expr_DecInt = 120,
131 Expr_BinInt = 121,
132 Expr_OctInt = 122,
133 Expr_HexInt = 123,
134 Expr_Float = 124,
135 Expr_Bang = 125,
136 Expr_Dot = 126,
137 Expr_DDot = 127,
138 Expr_Colon = 128,
139 Expr_RArrow = 129,
140 Expr_RDArrow = 130,
141 Expr_DSlash = 131,
142 Expr_TEqual = 132,
143 Expr_NotDEqual = 133,
144 Expr_TildeDEqual = 134,
145 Expr_At = 135,
146 Expr_DoubleAt = 136,
147 Expr_Ellipsis = 137,
148 Expr_Dollar = 138,
149 Expr_NotTilde = 139,
150 Expr_DTilde = 140,
151 Expr_NotDTilde = 141,
152 Expr_DStarEqual = 142,
153 Expr_DSlashEqual = 143,
154 Expr_CastedDummy = 144,
155 Expr_Null = 145,
156 Expr_True = 146,
157 Expr_False = 147,
158 Expr_And = 148,
159 Expr_Or = 149,
160 Expr_Not = 150,
161 Expr_For = 151,
162 Expr_Is = 152,
163 Expr_In = 153,
164 Expr_If = 154,
165 Expr_Else = 155,
166 Expr_Func = 156,
167 Expr_Capture = 157,
168 Expr_As = 158,
169 Expr_While = 159,
170 Expr_Break = 160,
171 Expr_Continue = 161,
172 Expr_Return = 162,
173 Char_OneChar = 163,
174 Char_Stop = 164,
175 Char_Hex = 165,
176 Char_YHex = 166,
177 Char_Octal3 = 167,
178 Char_Octal4 = 168,
179 Char_Unicode4 = 169,
180 Char_SurrogatePair = 170,
181 Char_Unicode8 = 171,
182 Char_UBraced = 172,
183 Char_Pound = 173,
184 Char_Literals = 174,
185 Char_AsciiControl = 175,
186 Re_Start = 176,
187 Re_End = 177,
188 Re_Dot = 178,
189 Redir_Less = 179,
190 Redir_Great = 180,
191 Redir_DLess = 181,
192 Redir_TLess = 182,
193 Redir_DGreat = 183,
194 Redir_GreatAnd = 184,
195 Redir_LessAnd = 185,
196 Redir_DLessDash = 186,
197 Redir_LessGreat = 187,
198 Redir_Clobber = 188,
199 Redir_AndGreat = 189,
200 Redir_AndDGreat = 190,
201 Left_DoubleQuote = 191,
202 Left_SingleQuote = 192,
203 Left_DollarSingleQuote = 193,
204 Left_RSingleQuote = 194,
205 Left_USingleQuote = 195,
206 Left_BSingleQuote = 196,
207 Left_TDoubleQuote = 197,
208 Left_TSingleQuote = 198,
209 Left_RTSingleQuote = 199,
210 Left_UTSingleQuote = 200,
211 Left_BTSingleQuote = 201,
212 Left_Backtick = 202,
213 Left_DollarParen = 203,
214 Left_DollarBrace = 204,
215 Left_DollarDParen = 205,
216 Left_DollarBracket = 206,
217 Left_DollarDoubleQuote = 207,
218 Left_ProcSubIn = 208,
219 Left_ProcSubOut = 209,
220 Left_AtParen = 210,
221 Left_CaretParen = 211,
222 Left_CaretBracket = 212,
223 Left_CaretBrace = 213,
224 Left_CaretDoubleQuote = 214,
225 Left_ColonPipe = 215,
226 Left_PercentParen = 216,
227 Right_DoubleQuote = 217,
228 Right_SingleQuote = 218,
229 Right_Backtick = 219,
230 Right_DollarBrace = 220,
231 Right_DollarDParen = 221,
232 Right_DollarDoubleQuote = 222,
233 Right_DollarSingleQuote = 223,
234 Right_Subshell = 224,
235 Right_ShFunction = 225,
236 Right_CasePat = 226,
237 Right_ShArrayLiteral = 227,
238 Right_ExtGlob = 228,
239 Right_BlockLiteral = 229,
240 ExtGlob_Comma = 230,
241 ExtGlob_At = 231,
242 ExtGlob_Star = 232,
243 ExtGlob_Plus = 233,
244 ExtGlob_QMark = 234,
245 ExtGlob_Bang = 235,
246 VSub_DollarName = 236,
247 VSub_Name = 237,
248 VSub_Number = 238,
249 VSub_Bang = 239,
250 VSub_At = 240,
251 VSub_Pound = 241,
252 VSub_Dollar = 242,
253 VSub_Star = 243,
254 VSub_Hyphen = 244,
255 VSub_QMark = 245,
256 VSub_Dot = 246,
257 VTest_ColonHyphen = 247,
258 VTest_Hyphen = 248,
259 VTest_ColonEquals = 249,
260 VTest_Equals = 250,
261 VTest_ColonQMark = 251,
262 VTest_QMark = 252,
263 VTest_ColonPlus = 253,
264 VTest_Plus = 254,
265 VOp0_Q = 255,
266 VOp0_E = 256,
267 VOp0_P = 257,
268 VOp0_A = 258,
269 VOp0_a = 259,
270 VOp1_Percent = 260,
271 VOp1_DPercent = 261,
272 VOp1_Pound = 262,
273 VOp1_DPound = 263,
274 VOp1_Caret = 264,
275 VOp1_DCaret = 265,
276 VOp1_Comma = 266,
277 VOp1_DComma = 267,
278 VOpOil_Pipe = 268,
279 VOpOil_Space = 269,
280 VOp2_Slash = 270,
281 VOp2_Colon = 271,
282 VOp2_LBracket = 272,
283 VOp2_RBracket = 273,
284 VOp3_At = 274,
285 VOp3_Star = 275,
286 Node_PostDPlus = 276,
287 Node_PostDMinus = 277,
288 Node_UnaryPlus = 278,
289 Node_UnaryMinus = 279,
290 Node_NotIn = 280,
291 Node_IsNot = 281,
292 KW_DLeftBracket = 282,
293 KW_Bang = 283,
294 KW_For = 284,
295 KW_While = 285,
296 KW_Until = 286,
297 KW_Do = 287,
298 KW_Done = 288,
299 KW_In = 289,
300 KW_Case = 290,
301 KW_Esac = 291,
302 KW_If = 292,
303 KW_Fi = 293,
304 KW_Then = 294,
305 KW_Else = 295,
306 KW_Elif = 296,
307 KW_Function = 297,
308 KW_Time = 298,
309 KW_Const = 299,
310 KW_Var = 300,
311 KW_SetVar = 301,
312 KW_SetGlobal = 302,
313 KW_Call = 303,
314 KW_Proc = 304,
315 KW_Func = 305,
316 ControlFlow_Break = 306,
317 ControlFlow_Continue = 307,
318 ControlFlow_Return = 308,
319 ControlFlow_Exit = 309,
320 LookAhead_FuncParens = 310,
321 Glob_LBracket = 311,
322 Glob_RBracket = 312,
323 Glob_Star = 313,
324 Glob_QMark = 314,
325 Glob_Bang = 315,
326 Glob_Caret = 316,
327 Glob_EscapedChar = 317,
328 Glob_BadBackslash = 318,
329 Glob_CleanLiterals = 319,
330 Glob_OtherLiteral = 320,
331 Format_EscapedPercent = 321,
332 Format_Percent = 322,
333 Format_Flag = 323,
334 Format_Num = 324,
335 Format_Dot = 325,
336 Format_Type = 326,
337 Format_Star = 327,
338 Format_Time = 328,
339 Format_Zero = 329,
340 PS_Subst = 330,
341 PS_Octal3 = 331,
342 PS_LBrace = 332,
343 PS_RBrace = 333,
344 PS_Literals = 334,
345 PS_BadBackslash = 335,
346 Range_Int = 336,
347 Range_Char = 337,
348 Range_Dots = 338,
349 Range_Other = 339,
350 J8_LBracket = 340,
351 J8_RBracket = 341,
352 J8_LBrace = 342,
353 J8_RBrace = 343,
354 J8_Comma = 344,
355 J8_Colon = 345,
356 J8_Null = 346,
357 J8_Bool = 347,
358 J8_Int = 348,
359 J8_Float = 349,
360 J8_String = 350,
361 J8_Identifier = 351,
362 J8_LParen = 352,
363 J8_RParen = 353,
364 J8_Operator = 354,
365 BoolUnary_z = 355,
366 BoolUnary_n = 356,
367 BoolUnary_o = 357,
368 BoolUnary_t = 358,
369 BoolUnary_v = 359,
370 BoolUnary_R = 360,
371 BoolUnary_a = 361,
372 BoolUnary_b = 362,
373 BoolUnary_c = 363,
374 BoolUnary_d = 364,
375 BoolUnary_e = 365,
376 BoolUnary_f = 366,
377 BoolUnary_g = 367,
378 BoolUnary_h = 368,
379 BoolUnary_k = 369,
380 BoolUnary_L = 370,
381 BoolUnary_p = 371,
382 BoolUnary_r = 372,
383 BoolUnary_s = 373,
384 BoolUnary_S = 374,
385 BoolUnary_u = 375,
386 BoolUnary_w = 376,
387 BoolUnary_x = 377,
388 BoolUnary_O = 378,
389 BoolUnary_G = 379,
390 BoolUnary_N = 380,
391 BoolBinary_GlobEqual = 381,
392 BoolBinary_GlobDEqual = 382,
393 BoolBinary_GlobNEqual = 383,
394 BoolBinary_EqualTilde = 384,
395 BoolBinary_ef = 385,
396 BoolBinary_nt = 386,
397 BoolBinary_ot = 387,
398 BoolBinary_eq = 388,
399 BoolBinary_ne = 389,
400 BoolBinary_gt = 390,
401 BoolBinary_ge = 391,
402 BoolBinary_lt = 392,
403 BoolBinary_le = 393,
404 BoolBinary_Equal = 394,
405 BoolBinary_DEqual = 395,
406 BoolBinary_NEqual = 396,
407 ARRAY_SIZE = 397,
408 };
409};
410
411BigStr* Id_str(int tag, bool dot = true);
412
413typedef int Id_t;
414
415enum class Kind {
416 Word = 1,
417 Arith = 2,
418 Eof = 3,
419 Undefined = 4,
420 Unknown = 5,
421 Eol = 6,
422 Ignored = 7,
423 WS = 8,
424 Lit = 9,
425 Backtick = 10,
426 History = 11,
427 Op = 12,
428 Expr = 13,
429 Char = 14,
430 Re = 15,
431 Redir = 16,
432 Left = 17,
433 Right = 18,
434 ExtGlob = 19,
435 VSub = 20,
436 VTest = 21,
437 VOp0 = 22,
438 VOp1 = 23,
439 VOpOil = 24,
440 VOp2 = 25,
441 VOp3 = 26,
442 Node = 27,
443 KW = 28,
444 ControlFlow = 29,
445 LookAhead = 30,
446 Glob = 31,
447 Format = 32,
448 PS = 33,
449 Range = 34,
450 J8 = 35,
451 BoolUnary = 36,
452 BoolBinary = 37,
453};
454typedef Kind Kind_t;
455
456BigStr* Kind_str(Kind tag, bool dot = true);
457
458
459} // namespace id_kind_asdl
460
461#endif // ID_KIND_ASDL_H