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

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