OILS / _devbuild / gen / id_kind_asdl.py View on Github | oils.pub

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