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