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

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