OILS / _devbuild / gen / id_kind_asdl.py View on Github | oilshell.org

924 lines, 913 significant
1from asdl import pybase
2
3Id_t = int # type alias for integer
4
5class Id(object):
6 Word_Compound = 1
7 Arith_Semi = 2
8 Arith_Comma = 3
9 Arith_Plus = 4
10 Arith_Minus = 5
11 Arith_Star = 6
12 Arith_Slash = 7
13 Arith_Percent = 8
14 Arith_DPlus = 9
15 Arith_DMinus = 10
16 Arith_DStar = 11
17 Arith_LParen = 12
18 Arith_RParen = 13
19 Arith_LBracket = 14
20 Arith_RBracket = 15
21 Arith_RBrace = 16
22 Arith_QMark = 17
23 Arith_Colon = 18
24 Arith_LessEqual = 19
25 Arith_Less = 20
26 Arith_GreatEqual = 21
27 Arith_Great = 22
28 Arith_DEqual = 23
29 Arith_NEqual = 24
30 Arith_DAmp = 25
31 Arith_DPipe = 26
32 Arith_Bang = 27
33 Arith_DGreat = 28
34 Arith_DLess = 29
35 Arith_Amp = 30
36 Arith_Pipe = 31
37 Arith_Caret = 32
38 Arith_Tilde = 33
39 Arith_Equal = 34
40 Arith_PlusEqual = 35
41 Arith_MinusEqual = 36
42 Arith_StarEqual = 37
43 Arith_SlashEqual = 38
44 Arith_PercentEqual = 39
45 Arith_DGreatEqual = 40
46 Arith_DLessEqual = 41
47 Arith_AmpEqual = 42
48 Arith_CaretEqual = 43
49 Arith_PipeEqual = 44
50 Eof_Real = 45
51 Eof_RParen = 46
52 Eof_Backtick = 47
53 Undefined_Tok = 48
54 Unknown_Tok = 49
55 Unknown_Backslash = 50
56 Unknown_DEqual = 51
57 Unknown_DAmp = 52
58 Unknown_DPipe = 53
59 Eol_Tok = 54
60 Ignored_LineCont = 55
61 Ignored_Space = 56
62 Ignored_Comment = 57
63 Ignored_Newline = 58
64 WS_Space = 59
65 Lit_Chars = 60
66 Lit_CharsWithoutPrefix = 61
67 Lit_VarLike = 62
68 Lit_ArrayLhsOpen = 63
69 Lit_ArrayLhsClose = 64
70 Lit_Splice = 65
71 Lit_AtLBracket = 66
72 Lit_AtLBraceDot = 67
73 Lit_Other = 68
74 Lit_EscapedChar = 69
75 Lit_LBracket = 70
76 Lit_RBracket = 71
77 Lit_Star = 72
78 Lit_QMark = 73
79 Lit_LBrace = 74
80 Lit_RBrace = 75
81 Lit_Comma = 76
82 Lit_Equals = 77
83 Lit_Dollar = 78
84 Lit_DRightBracket = 79
85 Lit_Tilde = 80
86 Lit_Pound = 81
87 Lit_TPound = 82
88 Lit_TDot = 83
89 Lit_Slash = 84
90 Lit_Percent = 85
91 Lit_Colon = 86
92 Lit_Digits = 87
93 Lit_At = 88
94 Lit_ArithVarLike = 89
95 Lit_BadBackslash = 90
96 Lit_CompDummy = 91
97 Backtick_Right = 92
98 Backtick_Quoted = 93
99 Backtick_DoubleQuote = 94
100 Backtick_Other = 95
101 History_Op = 96
102 History_Num = 97
103 History_Search = 98
104 History_Other = 99
105 Op_Newline = 100
106 Op_Amp = 101
107 Op_Pipe = 102
108 Op_PipeAmp = 103
109 Op_DAmp = 104
110 Op_DPipe = 105
111 Op_Semi = 106
112 Op_DSemi = 107
113 Op_SemiAmp = 108
114 Op_DSemiAmp = 109
115 Op_LParen = 110
116 Op_RParen = 111
117 Op_DLeftParen = 112
118 Op_DRightParen = 113
119 Op_Less = 114
120 Op_Great = 115
121 Op_Bang = 116
122 Op_LBracket = 117
123 Op_RBracket = 118
124 Op_LBrace = 119
125 Op_RBrace = 120
126 Expr_Reserved = 121
127 Expr_Symbol = 122
128 Expr_Name = 123
129 Expr_DecInt = 124
130 Expr_BinInt = 125
131 Expr_OctInt = 126
132 Expr_HexInt = 127
133 Expr_Float = 128
134 Expr_Bang = 129
135 Expr_Dot = 130
136 Expr_DDot = 131
137 Expr_Colon = 132
138 Expr_RArrow = 133
139 Expr_RDArrow = 134
140 Expr_DSlash = 135
141 Expr_TEqual = 136
142 Expr_NotDEqual = 137
143 Expr_TildeDEqual = 138
144 Expr_At = 139
145 Expr_DoubleAt = 140
146 Expr_Ellipsis = 141
147 Expr_Dollar = 142
148 Expr_NotTilde = 143
149 Expr_DTilde = 144
150 Expr_NotDTilde = 145
151 Expr_DStarEqual = 146
152 Expr_DSlashEqual = 147
153 Expr_CastedDummy = 148
154 Expr_Null = 149
155 Expr_True = 150
156 Expr_False = 151
157 Expr_And = 152
158 Expr_Or = 153
159 Expr_Not = 154
160 Expr_For = 155
161 Expr_Is = 156
162 Expr_In = 157
163 Expr_If = 158
164 Expr_Else = 159
165 Expr_Func = 160
166 Expr_Capture = 161
167 Expr_As = 162
168 Char_OneChar = 163
169 Char_Stop = 164
170 Char_Hex = 165
171 Char_YHex = 166
172 Char_Octal3 = 167
173 Char_Octal4 = 168
174 Char_Unicode4 = 169
175 Char_SurrogatePair = 170
176 Char_Unicode8 = 171
177 Char_UBraced = 172
178 Char_Pound = 173
179 Char_AsciiControl = 174
180 BashRegex_LParen = 175
181 BashRegex_AllowedInParens = 176
182 Eggex_Start = 177
183 Eggex_End = 178
184 Eggex_Dot = 179
185 Redir_Less = 180
186 Redir_Great = 181
187 Redir_DLess = 182
188 Redir_TLess = 183
189 Redir_DGreat = 184
190 Redir_GreatAnd = 185
191 Redir_LessAnd = 186
192 Redir_DLessDash = 187
193 Redir_LessGreat = 188
194 Redir_Clobber = 189
195 Redir_AndGreat = 190
196 Redir_AndDGreat = 191
197 Left_DoubleQuote = 192
198 Left_JDoubleQuote = 193
199 Left_SingleQuote = 194
200 Left_DollarSingleQuote = 195
201 Left_RSingleQuote = 196
202 Left_USingleQuote = 197
203 Left_BSingleQuote = 198
204 Left_TDoubleQuote = 199
205 Left_DollarTDoubleQuote = 200
206 Left_TSingleQuote = 201
207 Left_RTSingleQuote = 202
208 Left_UTSingleQuote = 203
209 Left_BTSingleQuote = 204
210 Left_Backtick = 205
211 Left_DollarParen = 206
212 Left_DollarBrace = 207
213 Left_DollarBraceZsh = 208
214 Left_DollarDParen = 209
215 Left_DollarBracket = 210
216 Left_DollarDoubleQuote = 211
217 Left_ProcSubIn = 212
218 Left_ProcSubOut = 213
219 Left_AtParen = 214
220 Left_CaretParen = 215
221 Left_CaretBracket = 216
222 Left_CaretBrace = 217
223 Left_CaretDoubleQuote = 218
224 Left_ColonPipe = 219
225 Left_PercentParen = 220
226 Right_DoubleQuote = 221
227 Right_SingleQuote = 222
228 Right_Backtick = 223
229 Right_DollarBrace = 224
230 Right_DollarDParen = 225
231 Right_DollarDoubleQuote = 226
232 Right_DollarSingleQuote = 227
233 Right_Subshell = 228
234 Right_ShFunction = 229
235 Right_CasePat = 230
236 Right_ShArrayLiteral = 231
237 Right_ExtGlob = 232
238 Right_BashRegexGroup = 233
239 Right_BlockLiteral = 234
240 ExtGlob_Comma = 235
241 ExtGlob_At = 236
242 ExtGlob_Star = 237
243 ExtGlob_Plus = 238
244 ExtGlob_QMark = 239
245 ExtGlob_Bang = 240
246 VSub_DollarName = 241
247 VSub_Name = 242
248 VSub_Number = 243
249 VSub_Bang = 244
250 VSub_At = 245
251 VSub_Pound = 246
252 VSub_Dollar = 247
253 VSub_Star = 248
254 VSub_Hyphen = 249
255 VSub_QMark = 250
256 VSub_Dot = 251
257 VTest_ColonHyphen = 252
258 VTest_Hyphen = 253
259 VTest_ColonEquals = 254
260 VTest_Equals = 255
261 VTest_ColonQMark = 256
262 VTest_QMark = 257
263 VTest_ColonPlus = 258
264 VTest_Plus = 259
265 VOp0_Q = 260
266 VOp0_E = 261
267 VOp0_P = 262
268 VOp0_A = 263
269 VOp0_a = 264
270 VOp1_Percent = 265
271 VOp1_DPercent = 266
272 VOp1_Pound = 267
273 VOp1_DPound = 268
274 VOp1_Caret = 269
275 VOp1_DCaret = 270
276 VOp1_Comma = 271
277 VOp1_DComma = 272
278 VOpYsh_Pipe = 273
279 VOpYsh_Space = 274
280 VOp2_Slash = 275
281 VOp2_Colon = 276
282 VOp2_LBracket = 277
283 VOp2_RBracket = 278
284 VOp3_At = 279
285 VOp3_Star = 280
286 Node_PostDPlus = 281
287 Node_PostDMinus = 282
288 Node_UnaryPlus = 283
289 Node_UnaryMinus = 284
290 Node_NotIn = 285
291 Node_IsNot = 286
292 KW_DLeftBracket = 287
293 KW_Bang = 288
294 KW_For = 289
295 KW_While = 290
296 KW_Until = 291
297 KW_Do = 292
298 KW_Done = 293
299 KW_In = 294
300 KW_Case = 295
301 KW_Esac = 296
302 KW_If = 297
303 KW_Fi = 298
304 KW_Then = 299
305 KW_Else = 300
306 KW_Elif = 301
307 KW_Function = 302
308 KW_Time = 303
309 KW_Const = 304
310 KW_Var = 305
311 KW_SetVar = 306
312 KW_SetGlobal = 307
313 KW_Call = 308
314 KW_Proc = 309
315 KW_Typed = 310
316 KW_Func = 311
317 ControlFlow_Break = 312
318 ControlFlow_Continue = 313
319 ControlFlow_Return = 314
320 ControlFlow_Exit = 315
321 LookAhead_FuncParens = 316
322 Glob_LBracket = 317
323 Glob_RBracket = 318
324 Glob_Star = 319
325 Glob_QMark = 320
326 Glob_Bang = 321
327 Glob_Caret = 322
328 Glob_EscapedChar = 323
329 Glob_BadBackslash = 324
330 Glob_CleanLiterals = 325
331 Glob_OtherLiteral = 326
332 Format_EscapedPercent = 327
333 Format_Percent = 328
334 Format_Flag = 329
335 Format_Num = 330
336 Format_Dot = 331
337 Format_Type = 332
338 Format_Star = 333
339 Format_Time = 334
340 Format_Zero = 335
341 PS_Subst = 336
342 PS_Octal3 = 337
343 PS_LBrace = 338
344 PS_RBrace = 339
345 PS_Literals = 340
346 PS_BadBackslash = 341
347 Range_Int = 342
348 Range_Char = 343
349 Range_Dots = 344
350 Range_Other = 345
351 J8_LBracket = 346
352 J8_RBracket = 347
353 J8_LBrace = 348
354 J8_RBrace = 349
355 J8_Comma = 350
356 J8_Colon = 351
357 J8_Null = 352
358 J8_Bool = 353
359 J8_Int = 354
360 J8_Float = 355
361 J8_String = 356
362 J8_Identifier = 357
363 J8_Newline = 358
364 J8_Tab = 359
365 J8_LParen = 360
366 J8_RParen = 361
367 J8_Operator = 362
368 ShNumber_Dec = 363
369 ShNumber_Hex = 364
370 ShNumber_Oct = 365
371 ShNumber_BaseN = 366
372 BoolUnary_z = 367
373 BoolUnary_n = 368
374 BoolUnary_o = 369
375 BoolUnary_t = 370
376 BoolUnary_v = 371
377 BoolUnary_R = 372
378 BoolUnary_a = 373
379 BoolUnary_b = 374
380 BoolUnary_c = 375
381 BoolUnary_d = 376
382 BoolUnary_e = 377
383 BoolUnary_f = 378
384 BoolUnary_g = 379
385 BoolUnary_h = 380
386 BoolUnary_k = 381
387 BoolUnary_L = 382
388 BoolUnary_p = 383
389 BoolUnary_r = 384
390 BoolUnary_s = 385
391 BoolUnary_S = 386
392 BoolUnary_u = 387
393 BoolUnary_w = 388
394 BoolUnary_x = 389
395 BoolUnary_O = 390
396 BoolUnary_G = 391
397 BoolUnary_N = 392
398 BoolUnary_true = 393
399 BoolUnary_false = 394
400 BoolBinary_GlobEqual = 395
401 BoolBinary_GlobDEqual = 396
402 BoolBinary_GlobNEqual = 397
403 BoolBinary_EqualTilde = 398
404 BoolBinary_ef = 399
405 BoolBinary_nt = 400
406 BoolBinary_ot = 401
407 BoolBinary_eq = 402
408 BoolBinary_ne = 403
409 BoolBinary_gt = 404
410 BoolBinary_ge = 405
411 BoolBinary_lt = 406
412 BoolBinary_le = 407
413 BoolBinary_Equal = 408
414 BoolBinary_DEqual = 409
415 BoolBinary_NEqual = 410
416 ARRAY_SIZE = 411
417
418_Id_str = {
419 1: 'Id.Word_Compound',
420 2: 'Id.Arith_Semi',
421 3: 'Id.Arith_Comma',
422 4: 'Id.Arith_Plus',
423 5: 'Id.Arith_Minus',
424 6: 'Id.Arith_Star',
425 7: 'Id.Arith_Slash',
426 8: 'Id.Arith_Percent',
427 9: 'Id.Arith_DPlus',
428 10: 'Id.Arith_DMinus',
429 11: 'Id.Arith_DStar',
430 12: 'Id.Arith_LParen',
431 13: 'Id.Arith_RParen',
432 14: 'Id.Arith_LBracket',
433 15: 'Id.Arith_RBracket',
434 16: 'Id.Arith_RBrace',
435 17: 'Id.Arith_QMark',
436 18: 'Id.Arith_Colon',
437 19: 'Id.Arith_LessEqual',
438 20: 'Id.Arith_Less',
439 21: 'Id.Arith_GreatEqual',
440 22: 'Id.Arith_Great',
441 23: 'Id.Arith_DEqual',
442 24: 'Id.Arith_NEqual',
443 25: 'Id.Arith_DAmp',
444 26: 'Id.Arith_DPipe',
445 27: 'Id.Arith_Bang',
446 28: 'Id.Arith_DGreat',
447 29: 'Id.Arith_DLess',
448 30: 'Id.Arith_Amp',
449 31: 'Id.Arith_Pipe',
450 32: 'Id.Arith_Caret',
451 33: 'Id.Arith_Tilde',
452 34: 'Id.Arith_Equal',
453 35: 'Id.Arith_PlusEqual',
454 36: 'Id.Arith_MinusEqual',
455 37: 'Id.Arith_StarEqual',
456 38: 'Id.Arith_SlashEqual',
457 39: 'Id.Arith_PercentEqual',
458 40: 'Id.Arith_DGreatEqual',
459 41: 'Id.Arith_DLessEqual',
460 42: 'Id.Arith_AmpEqual',
461 43: 'Id.Arith_CaretEqual',
462 44: 'Id.Arith_PipeEqual',
463 45: 'Id.Eof_Real',
464 46: 'Id.Eof_RParen',
465 47: 'Id.Eof_Backtick',
466 48: 'Id.Undefined_Tok',
467 49: 'Id.Unknown_Tok',
468 50: 'Id.Unknown_Backslash',
469 51: 'Id.Unknown_DEqual',
470 52: 'Id.Unknown_DAmp',
471 53: 'Id.Unknown_DPipe',
472 54: 'Id.Eol_Tok',
473 55: 'Id.Ignored_LineCont',
474 56: 'Id.Ignored_Space',
475 57: 'Id.Ignored_Comment',
476 58: 'Id.Ignored_Newline',
477 59: 'Id.WS_Space',
478 60: 'Id.Lit_Chars',
479 61: 'Id.Lit_CharsWithoutPrefix',
480 62: 'Id.Lit_VarLike',
481 63: 'Id.Lit_ArrayLhsOpen',
482 64: 'Id.Lit_ArrayLhsClose',
483 65: 'Id.Lit_Splice',
484 66: 'Id.Lit_AtLBracket',
485 67: 'Id.Lit_AtLBraceDot',
486 68: 'Id.Lit_Other',
487 69: 'Id.Lit_EscapedChar',
488 70: 'Id.Lit_LBracket',
489 71: 'Id.Lit_RBracket',
490 72: 'Id.Lit_Star',
491 73: 'Id.Lit_QMark',
492 74: 'Id.Lit_LBrace',
493 75: 'Id.Lit_RBrace',
494 76: 'Id.Lit_Comma',
495 77: 'Id.Lit_Equals',
496 78: 'Id.Lit_Dollar',
497 79: 'Id.Lit_DRightBracket',
498 80: 'Id.Lit_Tilde',
499 81: 'Id.Lit_Pound',
500 82: 'Id.Lit_TPound',
501 83: 'Id.Lit_TDot',
502 84: 'Id.Lit_Slash',
503 85: 'Id.Lit_Percent',
504 86: 'Id.Lit_Colon',
505 87: 'Id.Lit_Digits',
506 88: 'Id.Lit_At',
507 89: 'Id.Lit_ArithVarLike',
508 90: 'Id.Lit_BadBackslash',
509 91: 'Id.Lit_CompDummy',
510 92: 'Id.Backtick_Right',
511 93: 'Id.Backtick_Quoted',
512 94: 'Id.Backtick_DoubleQuote',
513 95: 'Id.Backtick_Other',
514 96: 'Id.History_Op',
515 97: 'Id.History_Num',
516 98: 'Id.History_Search',
517 99: 'Id.History_Other',
518 100: 'Id.Op_Newline',
519 101: 'Id.Op_Amp',
520 102: 'Id.Op_Pipe',
521 103: 'Id.Op_PipeAmp',
522 104: 'Id.Op_DAmp',
523 105: 'Id.Op_DPipe',
524 106: 'Id.Op_Semi',
525 107: 'Id.Op_DSemi',
526 108: 'Id.Op_SemiAmp',
527 109: 'Id.Op_DSemiAmp',
528 110: 'Id.Op_LParen',
529 111: 'Id.Op_RParen',
530 112: 'Id.Op_DLeftParen',
531 113: 'Id.Op_DRightParen',
532 114: 'Id.Op_Less',
533 115: 'Id.Op_Great',
534 116: 'Id.Op_Bang',
535 117: 'Id.Op_LBracket',
536 118: 'Id.Op_RBracket',
537 119: 'Id.Op_LBrace',
538 120: 'Id.Op_RBrace',
539 121: 'Id.Expr_Reserved',
540 122: 'Id.Expr_Symbol',
541 123: 'Id.Expr_Name',
542 124: 'Id.Expr_DecInt',
543 125: 'Id.Expr_BinInt',
544 126: 'Id.Expr_OctInt',
545 127: 'Id.Expr_HexInt',
546 128: 'Id.Expr_Float',
547 129: 'Id.Expr_Bang',
548 130: 'Id.Expr_Dot',
549 131: 'Id.Expr_DDot',
550 132: 'Id.Expr_Colon',
551 133: 'Id.Expr_RArrow',
552 134: 'Id.Expr_RDArrow',
553 135: 'Id.Expr_DSlash',
554 136: 'Id.Expr_TEqual',
555 137: 'Id.Expr_NotDEqual',
556 138: 'Id.Expr_TildeDEqual',
557 139: 'Id.Expr_At',
558 140: 'Id.Expr_DoubleAt',
559 141: 'Id.Expr_Ellipsis',
560 142: 'Id.Expr_Dollar',
561 143: 'Id.Expr_NotTilde',
562 144: 'Id.Expr_DTilde',
563 145: 'Id.Expr_NotDTilde',
564 146: 'Id.Expr_DStarEqual',
565 147: 'Id.Expr_DSlashEqual',
566 148: 'Id.Expr_CastedDummy',
567 149: 'Id.Expr_Null',
568 150: 'Id.Expr_True',
569 151: 'Id.Expr_False',
570 152: 'Id.Expr_And',
571 153: 'Id.Expr_Or',
572 154: 'Id.Expr_Not',
573 155: 'Id.Expr_For',
574 156: 'Id.Expr_Is',
575 157: 'Id.Expr_In',
576 158: 'Id.Expr_If',
577 159: 'Id.Expr_Else',
578 160: 'Id.Expr_Func',
579 161: 'Id.Expr_Capture',
580 162: 'Id.Expr_As',
581 163: 'Id.Char_OneChar',
582 164: 'Id.Char_Stop',
583 165: 'Id.Char_Hex',
584 166: 'Id.Char_YHex',
585 167: 'Id.Char_Octal3',
586 168: 'Id.Char_Octal4',
587 169: 'Id.Char_Unicode4',
588 170: 'Id.Char_SurrogatePair',
589 171: 'Id.Char_Unicode8',
590 172: 'Id.Char_UBraced',
591 173: 'Id.Char_Pound',
592 174: 'Id.Char_AsciiControl',
593 175: 'Id.BashRegex_LParen',
594 176: 'Id.BashRegex_AllowedInParens',
595 177: 'Id.Eggex_Start',
596 178: 'Id.Eggex_End',
597 179: 'Id.Eggex_Dot',
598 180: 'Id.Redir_Less',
599 181: 'Id.Redir_Great',
600 182: 'Id.Redir_DLess',
601 183: 'Id.Redir_TLess',
602 184: 'Id.Redir_DGreat',
603 185: 'Id.Redir_GreatAnd',
604 186: 'Id.Redir_LessAnd',
605 187: 'Id.Redir_DLessDash',
606 188: 'Id.Redir_LessGreat',
607 189: 'Id.Redir_Clobber',
608 190: 'Id.Redir_AndGreat',
609 191: 'Id.Redir_AndDGreat',
610 192: 'Id.Left_DoubleQuote',
611 193: 'Id.Left_JDoubleQuote',
612 194: 'Id.Left_SingleQuote',
613 195: 'Id.Left_DollarSingleQuote',
614 196: 'Id.Left_RSingleQuote',
615 197: 'Id.Left_USingleQuote',
616 198: 'Id.Left_BSingleQuote',
617 199: 'Id.Left_TDoubleQuote',
618 200: 'Id.Left_DollarTDoubleQuote',
619 201: 'Id.Left_TSingleQuote',
620 202: 'Id.Left_RTSingleQuote',
621 203: 'Id.Left_UTSingleQuote',
622 204: 'Id.Left_BTSingleQuote',
623 205: 'Id.Left_Backtick',
624 206: 'Id.Left_DollarParen',
625 207: 'Id.Left_DollarBrace',
626 208: 'Id.Left_DollarBraceZsh',
627 209: 'Id.Left_DollarDParen',
628 210: 'Id.Left_DollarBracket',
629 211: 'Id.Left_DollarDoubleQuote',
630 212: 'Id.Left_ProcSubIn',
631 213: 'Id.Left_ProcSubOut',
632 214: 'Id.Left_AtParen',
633 215: 'Id.Left_CaretParen',
634 216: 'Id.Left_CaretBracket',
635 217: 'Id.Left_CaretBrace',
636 218: 'Id.Left_CaretDoubleQuote',
637 219: 'Id.Left_ColonPipe',
638 220: 'Id.Left_PercentParen',
639 221: 'Id.Right_DoubleQuote',
640 222: 'Id.Right_SingleQuote',
641 223: 'Id.Right_Backtick',
642 224: 'Id.Right_DollarBrace',
643 225: 'Id.Right_DollarDParen',
644 226: 'Id.Right_DollarDoubleQuote',
645 227: 'Id.Right_DollarSingleQuote',
646 228: 'Id.Right_Subshell',
647 229: 'Id.Right_ShFunction',
648 230: 'Id.Right_CasePat',
649 231: 'Id.Right_ShArrayLiteral',
650 232: 'Id.Right_ExtGlob',
651 233: 'Id.Right_BashRegexGroup',
652 234: 'Id.Right_BlockLiteral',
653 235: 'Id.ExtGlob_Comma',
654 236: 'Id.ExtGlob_At',
655 237: 'Id.ExtGlob_Star',
656 238: 'Id.ExtGlob_Plus',
657 239: 'Id.ExtGlob_QMark',
658 240: 'Id.ExtGlob_Bang',
659 241: 'Id.VSub_DollarName',
660 242: 'Id.VSub_Name',
661 243: 'Id.VSub_Number',
662 244: 'Id.VSub_Bang',
663 245: 'Id.VSub_At',
664 246: 'Id.VSub_Pound',
665 247: 'Id.VSub_Dollar',
666 248: 'Id.VSub_Star',
667 249: 'Id.VSub_Hyphen',
668 250: 'Id.VSub_QMark',
669 251: 'Id.VSub_Dot',
670 252: 'Id.VTest_ColonHyphen',
671 253: 'Id.VTest_Hyphen',
672 254: 'Id.VTest_ColonEquals',
673 255: 'Id.VTest_Equals',
674 256: 'Id.VTest_ColonQMark',
675 257: 'Id.VTest_QMark',
676 258: 'Id.VTest_ColonPlus',
677 259: 'Id.VTest_Plus',
678 260: 'Id.VOp0_Q',
679 261: 'Id.VOp0_E',
680 262: 'Id.VOp0_P',
681 263: 'Id.VOp0_A',
682 264: 'Id.VOp0_a',
683 265: 'Id.VOp1_Percent',
684 266: 'Id.VOp1_DPercent',
685 267: 'Id.VOp1_Pound',
686 268: 'Id.VOp1_DPound',
687 269: 'Id.VOp1_Caret',
688 270: 'Id.VOp1_DCaret',
689 271: 'Id.VOp1_Comma',
690 272: 'Id.VOp1_DComma',
691 273: 'Id.VOpYsh_Pipe',
692 274: 'Id.VOpYsh_Space',
693 275: 'Id.VOp2_Slash',
694 276: 'Id.VOp2_Colon',
695 277: 'Id.VOp2_LBracket',
696 278: 'Id.VOp2_RBracket',
697 279: 'Id.VOp3_At',
698 280: 'Id.VOp3_Star',
699 281: 'Id.Node_PostDPlus',
700 282: 'Id.Node_PostDMinus',
701 283: 'Id.Node_UnaryPlus',
702 284: 'Id.Node_UnaryMinus',
703 285: 'Id.Node_NotIn',
704 286: 'Id.Node_IsNot',
705 287: 'Id.KW_DLeftBracket',
706 288: 'Id.KW_Bang',
707 289: 'Id.KW_For',
708 290: 'Id.KW_While',
709 291: 'Id.KW_Until',
710 292: 'Id.KW_Do',
711 293: 'Id.KW_Done',
712 294: 'Id.KW_In',
713 295: 'Id.KW_Case',
714 296: 'Id.KW_Esac',
715 297: 'Id.KW_If',
716 298: 'Id.KW_Fi',
717 299: 'Id.KW_Then',
718 300: 'Id.KW_Else',
719 301: 'Id.KW_Elif',
720 302: 'Id.KW_Function',
721 303: 'Id.KW_Time',
722 304: 'Id.KW_Const',
723 305: 'Id.KW_Var',
724 306: 'Id.KW_SetVar',
725 307: 'Id.KW_SetGlobal',
726 308: 'Id.KW_Call',
727 309: 'Id.KW_Proc',
728 310: 'Id.KW_Typed',
729 311: 'Id.KW_Func',
730 312: 'Id.ControlFlow_Break',
731 313: 'Id.ControlFlow_Continue',
732 314: 'Id.ControlFlow_Return',
733 315: 'Id.ControlFlow_Exit',
734 316: 'Id.LookAhead_FuncParens',
735 317: 'Id.Glob_LBracket',
736 318: 'Id.Glob_RBracket',
737 319: 'Id.Glob_Star',
738 320: 'Id.Glob_QMark',
739 321: 'Id.Glob_Bang',
740 322: 'Id.Glob_Caret',
741 323: 'Id.Glob_EscapedChar',
742 324: 'Id.Glob_BadBackslash',
743 325: 'Id.Glob_CleanLiterals',
744 326: 'Id.Glob_OtherLiteral',
745 327: 'Id.Format_EscapedPercent',
746 328: 'Id.Format_Percent',
747 329: 'Id.Format_Flag',
748 330: 'Id.Format_Num',
749 331: 'Id.Format_Dot',
750 332: 'Id.Format_Type',
751 333: 'Id.Format_Star',
752 334: 'Id.Format_Time',
753 335: 'Id.Format_Zero',
754 336: 'Id.PS_Subst',
755 337: 'Id.PS_Octal3',
756 338: 'Id.PS_LBrace',
757 339: 'Id.PS_RBrace',
758 340: 'Id.PS_Literals',
759 341: 'Id.PS_BadBackslash',
760 342: 'Id.Range_Int',
761 343: 'Id.Range_Char',
762 344: 'Id.Range_Dots',
763 345: 'Id.Range_Other',
764 346: 'Id.J8_LBracket',
765 347: 'Id.J8_RBracket',
766 348: 'Id.J8_LBrace',
767 349: 'Id.J8_RBrace',
768 350: 'Id.J8_Comma',
769 351: 'Id.J8_Colon',
770 352: 'Id.J8_Null',
771 353: 'Id.J8_Bool',
772 354: 'Id.J8_Int',
773 355: 'Id.J8_Float',
774 356: 'Id.J8_String',
775 357: 'Id.J8_Identifier',
776 358: 'Id.J8_Newline',
777 359: 'Id.J8_Tab',
778 360: 'Id.J8_LParen',
779 361: 'Id.J8_RParen',
780 362: 'Id.J8_Operator',
781 363: 'Id.ShNumber_Dec',
782 364: 'Id.ShNumber_Hex',
783 365: 'Id.ShNumber_Oct',
784 366: 'Id.ShNumber_BaseN',
785 367: 'Id.BoolUnary_z',
786 368: 'Id.BoolUnary_n',
787 369: 'Id.BoolUnary_o',
788 370: 'Id.BoolUnary_t',
789 371: 'Id.BoolUnary_v',
790 372: 'Id.BoolUnary_R',
791 373: 'Id.BoolUnary_a',
792 374: 'Id.BoolUnary_b',
793 375: 'Id.BoolUnary_c',
794 376: 'Id.BoolUnary_d',
795 377: 'Id.BoolUnary_e',
796 378: 'Id.BoolUnary_f',
797 379: 'Id.BoolUnary_g',
798 380: 'Id.BoolUnary_h',
799 381: 'Id.BoolUnary_k',
800 382: 'Id.BoolUnary_L',
801 383: 'Id.BoolUnary_p',
802 384: 'Id.BoolUnary_r',
803 385: 'Id.BoolUnary_s',
804 386: 'Id.BoolUnary_S',
805 387: 'Id.BoolUnary_u',
806 388: 'Id.BoolUnary_w',
807 389: 'Id.BoolUnary_x',
808 390: 'Id.BoolUnary_O',
809 391: 'Id.BoolUnary_G',
810 392: 'Id.BoolUnary_N',
811 393: 'Id.BoolUnary_true',
812 394: 'Id.BoolUnary_false',
813 395: 'Id.BoolBinary_GlobEqual',
814 396: 'Id.BoolBinary_GlobDEqual',
815 397: 'Id.BoolBinary_GlobNEqual',
816 398: 'Id.BoolBinary_EqualTilde',
817 399: 'Id.BoolBinary_ef',
818 400: 'Id.BoolBinary_nt',
819 401: 'Id.BoolBinary_ot',
820 402: 'Id.BoolBinary_eq',
821 403: 'Id.BoolBinary_ne',
822 404: 'Id.BoolBinary_gt',
823 405: 'Id.BoolBinary_ge',
824 406: 'Id.BoolBinary_lt',
825 407: 'Id.BoolBinary_le',
826 408: 'Id.BoolBinary_Equal',
827 409: 'Id.BoolBinary_DEqual',
828 410: 'Id.BoolBinary_NEqual',
829}
830
831def Id_str(val):
832 # type: (Id_t) -> str
833 return _Id_str[val]
834
835class Kind_t(pybase.SimpleObj):
836 pass
837
838class Kind(object):
839 Word = Kind_t(1)
840 Arith = Kind_t(2)
841 Eof = Kind_t(3)
842 Undefined = Kind_t(4)
843 Unknown = Kind_t(5)
844 Eol = Kind_t(6)
845 Ignored = Kind_t(7)
846 WS = Kind_t(8)
847 Lit = Kind_t(9)
848 Backtick = Kind_t(10)
849 History = Kind_t(11)
850 Op = Kind_t(12)
851 Expr = Kind_t(13)
852 Char = Kind_t(14)
853 BashRegex = Kind_t(15)
854 Eggex = Kind_t(16)
855 Redir = Kind_t(17)
856 Left = Kind_t(18)
857 Right = Kind_t(19)
858 ExtGlob = Kind_t(20)
859 VSub = Kind_t(21)
860 VTest = Kind_t(22)
861 VOp0 = Kind_t(23)
862 VOp1 = Kind_t(24)
863 VOpYsh = Kind_t(25)
864 VOp2 = Kind_t(26)
865 VOp3 = Kind_t(27)
866 Node = Kind_t(28)
867 KW = Kind_t(29)
868 ControlFlow = Kind_t(30)
869 LookAhead = Kind_t(31)
870 Glob = Kind_t(32)
871 Format = Kind_t(33)
872 PS = Kind_t(34)
873 Range = Kind_t(35)
874 J8 = Kind_t(36)
875 ShNumber = Kind_t(37)
876 BoolUnary = Kind_t(38)
877 BoolBinary = Kind_t(39)
878
879_Kind_str = {
880 1: 'Kind.Word',
881 2: 'Kind.Arith',
882 3: 'Kind.Eof',
883 4: 'Kind.Undefined',
884 5: 'Kind.Unknown',
885 6: 'Kind.Eol',
886 7: 'Kind.Ignored',
887 8: 'Kind.WS',
888 9: 'Kind.Lit',
889 10: 'Kind.Backtick',
890 11: 'Kind.History',
891 12: 'Kind.Op',
892 13: 'Kind.Expr',
893 14: 'Kind.Char',
894 15: 'Kind.BashRegex',
895 16: 'Kind.Eggex',
896 17: 'Kind.Redir',
897 18: 'Kind.Left',
898 19: 'Kind.Right',
899 20: 'Kind.ExtGlob',
900 21: 'Kind.VSub',
901 22: 'Kind.VTest',
902 23: 'Kind.VOp0',
903 24: 'Kind.VOp1',
904 25: 'Kind.VOpYsh',
905 26: 'Kind.VOp2',
906 27: 'Kind.VOp3',
907 28: 'Kind.Node',
908 29: 'Kind.KW',
909 30: 'Kind.ControlFlow',
910 31: 'Kind.LookAhead',
911 32: 'Kind.Glob',
912 33: 'Kind.Format',
913 34: 'Kind.PS',
914 35: 'Kind.Range',
915 36: 'Kind.J8',
916 37: 'Kind.ShNumber',
917 38: 'Kind.BoolUnary',
918 39: 'Kind.BoolBinary',
919}
920
921def Kind_str(val):
922 # type: (Kind_t) -> str
923 return _Kind_str[val]
924