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

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