Skip to main content

big_code_analysis_ast/languages/
language_php.rs

1// See `src/languages/mod.rs` for the rationale behind the per-file
2// pedantic carve-outs below.
3#![allow(clippy::match_same_arms, clippy::too_many_lines)]
4// One variant per grammar kind id, named after the rule; the name is
5// the documentation and there is nothing per-variant to add.
6#![allow(missing_docs)]
7
8// Code generated; DO NOT EDIT.
9
10use num_derive::FromPrimitive;
11
12#[derive(Clone, Debug, PartialEq, Eq, FromPrimitive)]
13pub enum Php {
14    End = 0,
15    Name = 1,
16    PhpTag = 2,
17    PhpEndTag = 3,
18    TextToken1 = 4,
19    TextToken2 = 5,
20    SEMI = 6,
21    AMP = 7,
22    Static = 8,
23    COMMA = 9,
24    EQ = 10,
25    Global = 11,
26    Namespace = 12,
27    Use = 13,
28    As = 14,
29    Function = 15,
30    Const = 16,
31    BSLASH = 17,
32    LBRACE = 18,
33    RBRACE = 19,
34    Trait = 20,
35    Interface = 21,
36    Extends = 22,
37    Enum = 23,
38    COLON = 24,
39    String2 = 25,
40    Int = 26,
41    Case = 27,
42    Class = 28,
43    Final = 29,
44    Abstract = 30,
45    Readonly = 31,
46    Implements = 32,
47    EQGT = 33,
48    VarModifier = 34,
49    Insteadof = 35,
50    Public = 36,
51    Protected = 37,
52    Private = 38,
53    LPAREN = 39,
54    RPAREN = 40,
55    LPAREN2 = 41,
56    RPAREN2 = 42,
57    Fn = 43,
58    DOTDOTDOT = 44,
59    QMARK = 45,
60    BottomType = 46,
61    PIPE = 47,
62    Array = 48,
63    Bool = 49,
64    PrimitiveTypeToken1 = 50,
65    PrimitiveTypeToken2 = 51,
66    Float2 = 52,
67    PrimitiveTypeToken3 = 53,
68    PrimitiveTypeToken4 = 54,
69    Null2 = 55,
70    Object = 56,
71    PrimitiveTypeToken5 = 57,
72    PrimitiveTypeToken6 = 58,
73    CastTypeToken1 = 59,
74    CastTypeToken2 = 60,
75    CastTypeToken3 = 61,
76    CastTypeToken4 = 62,
77    CastTypeToken5 = 63,
78    CastTypeToken6 = 64,
79    CastTypeToken7 = 65,
80    CastTypeToken8 = 66,
81    CastTypeToken9 = 67,
82    CastTypeToken10 = 68,
83    CastTypeToken11 = 69,
84    CastTypeToken12 = 70,
85    Echo = 71,
86    Exit = 72,
87    Unset = 73,
88    Declare = 74,
89    Enddeclare = 75,
90    Ticks = 76,
91    Encoding = 77,
92    StrictTypes = 78,
93    Float = 79,
94    Try = 80,
95    Catch = 81,
96    Finally = 82,
97    Goto = 83,
98    Continue = 84,
99    Break = 85,
100    Integer = 86,
101    Return = 87,
102    Throw = 88,
103    While = 89,
104    Endwhile = 90,
105    Do = 91,
106    For = 92,
107    Endfor = 93,
108    Foreach = 94,
109    Endforeach = 95,
110    If = 96,
111    Endif = 97,
112    Elseif = 98,
113    Else = 99,
114    Match = 100,
115    Default = 101,
116    Switch = 102,
117    Endswitch = 103,
118    PLUS = 104,
119    DASH = 105,
120    TILDE = 106,
121    BANG = 107,
122    AT = 108,
123    Clone = 109,
124    COLONCOLON = 110,
125    Print = 111,
126    New = 112,
127    DASHDASH = 113,
128    PLUSPLUS = 114,
129    STARSTAREQ = 115,
130    STAREQ = 116,
131    SLASHEQ = 117,
132    PERCENTEQ = 118,
133    PLUSEQ = 119,
134    DASHEQ = 120,
135    DOTEQ = 121,
136    LTLTEQ = 122,
137    GTGTEQ = 123,
138    AMPEQ = 124,
139    CARETEQ = 125,
140    PIPEEQ = 126,
141    QMARKQMARKEQ = 127,
142    DASHGT = 128,
143    QMARKDASHGT = 129,
144    List = 130,
145    LBRACK = 131,
146    RBRACK = 132,
147    Zelf = 133,
148    Parent = 134,
149    ArgumentNameToken1 = 135,
150    ArgumentNameToken2 = 136,
151    HASHLBRACK = 137,
152    EscapeSequence = 138,
153    StringContent = 139,
154    EncapsedStringToken1 = 140,
155    DQUOTE = 141,
156    StringToken1 = 142,
157    SQUOTE = 143,
158    EscapeSequence2 = 144,
159    StringContentToken1 = 145,
160    LTLTLT = 146,
161    DQUOTE2 = 147,
162    NewLine = 148,
163    SQUOTE2 = 149,
164    BQUOTE = 150,
165    DOLLAR = 151,
166    Yield = 152,
167    Yieldfrom = 153,
168    Instanceof = 154,
169    QMARKQMARK = 155,
170    STARSTAR = 156,
171    And = 157,
172    Or = 158,
173    Xor = 159,
174    PIPEPIPE = 160,
175    AMPAMP = 161,
176    CARET = 162,
177    EQEQ = 163,
178    BANGEQ = 164,
179    LTGT = 165,
180    EQEQEQ = 166,
181    BANGEQEQ = 167,
182    LT = 168,
183    GT = 169,
184    LTEQ = 170,
185    GTEQ = 171,
186    LTEQGT = 172,
187    PIPEGT = 173,
188    DOT = 174,
189    LTLT = 175,
190    GTGT = 176,
191    STAR = 177,
192    SLASH = 178,
193    PERCENT = 179,
194    Include = 180,
195    IncludeOnce = 181,
196    Require = 182,
197    RequireOnce = 183,
198    Comment = 184,
199    AutomaticSemicolon = 185,
200    StringContent2 = 186,
201    StringContent3 = 187,
202    StringContent4 = 188,
203    StringContent5 = 189,
204    StringContent6 = 190,
205    StringContent7 = 191,
206    Eof = 192,
207    HeredocStart = 193,
208    HeredocEnd = 194,
209    NowdocString = 195,
210    SentinelError = 196,
211    Program = 197,
212    TextInterpolation = 198,
213    Text = 199,
214    Statement = 200,
215    EmptyStatement = 201,
216    ReferenceModifier = 202,
217    FunctionStaticDeclaration = 203,
218    StaticVariableDeclaration = 204,
219    GlobalDeclaration = 205,
220    NamespaceDefinition = 206,
221    NamespaceUseDeclaration = 207,
222    NamespaceUseClause = 208,
223    QualifiedName = 209,
224    RelativeName = 210,
225    Name2 = 211,
226    NamespaceName = 212,
227    NamespaceUseGroup2 = 213,
228    NamespaceUseGroup = 214,
229    TraitDeclaration = 215,
230    InterfaceDeclaration = 216,
231    BaseClause = 217,
232    EnumDeclaration = 218,
233    EnumDeclarationList = 219,
234    EnumMemberDeclaration = 220,
235    EnumCase = 221,
236    ClassDeclaration = 222,
237    DeclarationList = 223,
238    FinalModifier = 224,
239    AbstractModifier = 225,
240    ReadonlyModifier = 226,
241    ClassInterfaceClause = 227,
242    MemberDeclaration = 228,
243    ConstDeclaration = 229,
244    ConstDeclaration2 = 230,
245    PropertyDeclaration = 231,
246    Modifier = 232,
247    PropertyElement = 233,
248    PropertyHookList = 234,
249    PropertyHook = 235,
250    PropertyHookBody = 236,
251    MethodDeclaration = 237,
252    StaticModifier = 238,
253    UseDeclaration = 239,
254    UseList = 240,
255    UseInsteadOfClause = 241,
256    UseAsClause = 242,
257    VisibilityModifier = 243,
258    FunctionDefinition = 244,
259    AnonymousFunction = 245,
260    AnonymousFunctionUseClause = 246,
261    AnonymousFunctionHeader = 247,
262    ArrowFunctionHeader = 248,
263    ArrowFunction = 249,
264    FormalParameters = 250,
265    PropertyPromotionParameter = 251,
266    SimpleParameter = 252,
267    VariadicParameter = 253,
268    Type = 254,
269    Types = 255,
270    NamedType = 256,
271    OptionalType = 257,
272    UnionType = 258,
273    IntersectionType = 259,
274    DisjunctiveNormalFormType = 260,
275    PrimitiveType = 261,
276    CastType = 262,
277    ReturnType = 263,
278    ConstElement = 264,
279    ConstElement2 = 265,
280    EchoStatement = 266,
281    ExitStatement = 267,
282    UnsetStatement = 268,
283    DeclareStatement = 269,
284    DeclareDirective = 270,
285    Literal = 271,
286    TryStatement = 272,
287    CatchClause = 273,
288    TypeList = 274,
289    FinallyClause = 275,
290    GotoStatement = 276,
291    ContinueStatement = 277,
292    BreakStatement = 278,
293    ReturnStatement = 279,
294    ThrowExpression = 280,
295    WhileStatement = 281,
296    DoStatement = 282,
297    ForStatement = 283,
298    Expressions = 284,
299    SequenceExpression = 285,
300    ForeachStatement = 286,
301    Pair = 287,
302    ForeachValue = 288,
303    IfStatement = 289,
304    ColonBlock = 290,
305    ElseIfClause = 291,
306    ElseClause = 292,
307    ElseIfClause2 = 293,
308    ElseClause2 = 294,
309    MatchExpression = 295,
310    MatchBlock = 296,
311    MatchConditionList = 297,
312    MatchConditionalExpression = 298,
313    MatchDefaultExpression = 299,
314    SwitchStatement = 300,
315    SwitchBlock = 301,
316    CaseStatement = 302,
317    DefaultStatement = 303,
318    CompoundStatement = 304,
319    NamedLabelStatement = 305,
320    ExpressionStatement = 306,
321    Expression = 307,
322    UnaryExpression = 308,
323    UnaryOpExpression = 309,
324    ErrorSuppressionExpression = 310,
325    CloneExpression = 311,
326    PrimaryExpression = 312,
327    ParenthesizedExpression = 313,
328    ClassConstantAccessExpression = 314,
329    PrintIntrinsic = 315,
330    ObjectCreationExpression = 316,
331    NewNonDereferencableExpression = 317,
332    NewDereferencableExpression = 318,
333    ClassNameReference = 319,
334    AnonymousClass = 320,
335    UpdateExpression = 321,
336    CastExpression = 322,
337    CastExpression2 = 323,
338    AssignmentExpression = 324,
339    ReferenceAssignmentExpression = 325,
340    ConditionalExpression = 326,
341    AugmentedAssignmentExpression = 327,
342    MemberAccessExpression = 328,
343    MemberAccessExpression2 = 329,
344    NullsafeMemberAccessExpression = 330,
345    NullsafeMemberAccessExpression2 = 331,
346    ScopedPropertyAccessExpression = 332,
347    ScopedPropertyAccessExpression2 = 333,
348    ListLiteral = 334,
349    ListDestructing = 335,
350    ArrayDestructing = 336,
351    ArrayDestructingElement = 337,
352    FunctionCallExpression = 338,
353    CallableExpression = 339,
354    ScopedCallExpression = 340,
355    ScopeResolutionQualifier = 341,
356    RelativeScope = 342,
357    VariadicPlaceholder = 343,
358    ArgumentPlaceholder = 344,
359    Arguments = 345,
360    Argument = 346,
361    ArgumentName = 347,
362    MemberCallExpression = 348,
363    NullsafeMemberCallExpression = 349,
364    VariadicUnpacking = 350,
365    MemberName = 351,
366    SubscriptExpression = 352,
367    SubscriptExpression2 = 353,
368    DereferencableExpression = 354,
369    DereferencableScalar = 355,
370    ArrayCreationExpression = 356,
371    AttributeGroup = 357,
372    AttributeList = 358,
373    Attribute = 359,
374    ComplexStringPart = 360,
375    MemberAccessExpression3 = 361,
376    UnaryOpExpression2 = 362,
377    SimpleStringArrayAccessArgument = 363,
378    SubscriptExpression3 = 364,
379    SimpleStringPart = 365,
380    InterpolatedStringBody = 366,
381    InterpolatedStringBodyHeredoc = 367,
382    EncapsedString = 368,
383    String = 369,
384    StringContent8 = 370,
385    HeredocBody = 371,
386    Heredoc = 372,
387    NowdocBody = 373,
388    Nowdoc = 374,
389    InterpolatedExecutionOperatorBody = 375,
390    ShellCommandExpression = 376,
391    Boolean = 377,
392    Null = 378,
393    String3 = 379,
394    DynamicVariableName = 380,
395    SimpleVariable = 381,
396    NewVariable = 382,
397    CallableVariable = 383,
398    VariableName = 384,
399    ByRef = 385,
400    YieldExpression = 386,
401    ArrayElementInitializer = 387,
402    BinaryExpression = 388,
403    IncludeExpression = 389,
404    IncludeOnceExpression = 390,
405    RequireExpression = 391,
406    RequireOnceExpression = 392,
407    Semicolon = 393,
408    ProgramRepeat1 = 394,
409    TextRepeat1 = 395,
410    FunctionStaticDeclarationRepeat1 = 396,
411    GlobalDeclarationRepeat1 = 397,
412    NamespaceUseDeclarationRepeat1 = 398,
413    NamespaceNameRepeat1 = 399,
414    BaseClauseRepeat1 = 400,
415    EnumDeclarationListRepeat1 = 401,
416    ClassDeclarationRepeat1 = 402,
417    DeclarationListRepeat1 = 403,
418    ConstDeclarationRepeat1 = 404,
419    ClassConstDeclarationRepeat1 = 405,
420    PropertyDeclarationRepeat1 = 406,
421    PropertyHookListRepeat1 = 407,
422    UseListRepeat1 = 408,
423    AnonymousFunctionUseClauseRepeat1 = 409,
424    FormalParametersRepeat1 = 410,
425    PropertyPromotionParameterRepeat1 = 411,
426    UnionTypeRepeat1 = 412,
427    IntersectionTypeRepeat1 = 413,
428    DisjunctiveNormalFormTypeRepeat1 = 414,
429    UnsetStatementRepeat1 = 415,
430    TryStatementRepeat1 = 416,
431    TypeListRepeat1 = 417,
432    IfStatementRepeat1 = 418,
433    IfStatementRepeat2 = 419,
434    MatchBlockRepeat1 = 420,
435    MatchConditionListRepeat1 = 421,
436    SwitchBlockRepeat1 = 422,
437    ListDestructingRepeat1 = 423,
438    ArrayDestructingRepeat1 = 424,
439    ArgumentsRepeat1 = 425,
440    ArrayCreationExpressionRepeat1 = 426,
441    AttributeGroupRepeat1 = 427,
442    AttributeListRepeat1 = 428,
443    StringRepeat1 = 429,
444    StringContentRepeat1 = 430,
445    HeredocBodyRepeat1 = 431,
446    NowdocBodyRepeat1 = 432,
447    Operation = 433,
448    Error = 434,
449}
450
451/// Each runtime kind id of `Php` with tree-sitter's `named` and
452/// `visible` flags, in id order. A label for the id the enum identifies,
453/// read by the role-coverage gate; the generator's ERROR sentinel has no
454/// entry.
455pub const PHP_KIND_FLAGS: &[(u16, bool, bool)] = &[
456    (0, false, false),
457    (1, true, true),
458    (2, true, true),
459    (3, true, true),
460    (4, false, false),
461    (5, false, false),
462    (6, false, true),
463    (7, false, true),
464    (8, false, true),
465    (9, false, true),
466    (10, false, true),
467    (11, false, true),
468    (12, false, true),
469    (13, false, true),
470    (14, false, true),
471    (15, false, true),
472    (16, false, true),
473    (17, false, true),
474    (18, false, true),
475    (19, false, true),
476    (20, false, true),
477    (21, false, true),
478    (22, false, true),
479    (23, false, true),
480    (24, false, true),
481    (25, false, true),
482    (26, false, true),
483    (27, false, true),
484    (28, false, true),
485    (29, false, true),
486    (30, false, true),
487    (31, false, true),
488    (32, false, true),
489    (33, false, true),
490    (34, true, true),
491    (35, false, true),
492    (36, false, true),
493    (37, false, true),
494    (38, false, true),
495    (39, false, true),
496    (40, false, true),
497    (41, false, true),
498    (42, false, true),
499    (43, false, true),
500    (44, false, true),
501    (45, false, true),
502    (46, true, true),
503    (47, false, true),
504    (48, false, true),
505    (49, false, true),
506    (50, false, false),
507    (51, false, false),
508    (52, false, true),
509    (53, false, false),
510    (54, false, false),
511    (55, false, true),
512    (56, false, true),
513    (57, false, false),
514    (58, false, false),
515    (59, false, false),
516    (60, false, false),
517    (61, false, false),
518    (62, false, false),
519    (63, false, false),
520    (64, false, false),
521    (65, false, false),
522    (66, false, false),
523    (67, false, false),
524    (68, false, false),
525    (69, false, false),
526    (70, false, false),
527    (71, false, true),
528    (72, false, true),
529    (73, false, true),
530    (74, false, true),
531    (75, false, true),
532    (76, false, true),
533    (77, false, true),
534    (78, false, true),
535    (79, true, true),
536    (80, false, true),
537    (81, false, true),
538    (82, false, true),
539    (83, false, true),
540    (84, false, true),
541    (85, false, true),
542    (86, true, true),
543    (87, false, true),
544    (88, false, true),
545    (89, false, true),
546    (90, false, true),
547    (91, false, true),
548    (92, false, true),
549    (93, false, true),
550    (94, false, true),
551    (95, false, true),
552    (96, false, true),
553    (97, false, true),
554    (98, false, true),
555    (99, false, true),
556    (100, false, true),
557    (101, false, true),
558    (102, false, true),
559    (103, false, true),
560    (104, false, true),
561    (105, false, true),
562    (106, false, true),
563    (107, false, true),
564    (108, false, true),
565    (109, false, true),
566    (110, false, true),
567    (111, false, true),
568    (112, false, true),
569    (113, false, true),
570    (114, false, true),
571    (115, false, true),
572    (116, false, true),
573    (117, false, true),
574    (118, false, true),
575    (119, false, true),
576    (120, false, true),
577    (121, false, true),
578    (122, false, true),
579    (123, false, true),
580    (124, false, true),
581    (125, false, true),
582    (126, false, true),
583    (127, false, true),
584    (128, false, true),
585    (129, false, true),
586    (130, false, true),
587    (131, false, true),
588    (132, false, true),
589    (133, false, true),
590    (134, false, true),
591    (135, false, false),
592    (136, false, false),
593    (137, false, true),
594    (138, true, true),
595    (139, true, true),
596    (140, false, false),
597    (141, false, true),
598    (142, false, false),
599    (143, false, true),
600    (144, true, true),
601    (145, false, false),
602    (146, false, true),
603    (147, false, true),
604    (148, false, false),
605    (149, false, true),
606    (150, false, true),
607    (151, false, true),
608    (152, false, true),
609    (153, false, true),
610    (154, false, true),
611    (155, false, true),
612    (156, false, true),
613    (157, false, true),
614    (158, false, true),
615    (159, false, true),
616    (160, false, true),
617    (161, false, true),
618    (162, false, true),
619    (163, false, true),
620    (164, false, true),
621    (165, false, true),
622    (166, false, true),
623    (167, false, true),
624    (168, false, true),
625    (169, false, true),
626    (170, false, true),
627    (171, false, true),
628    (172, false, true),
629    (173, false, true),
630    (174, false, true),
631    (175, false, true),
632    (176, false, true),
633    (177, false, true),
634    (178, false, true),
635    (179, false, true),
636    (180, false, true),
637    (181, false, true),
638    (182, false, true),
639    (183, false, true),
640    (184, true, true),
641    (185, false, false),
642    (186, true, true),
643    (187, true, true),
644    (188, true, true),
645    (189, true, true),
646    (190, true, true),
647    (191, true, true),
648    (192, false, false),
649    (193, true, true),
650    (194, true, true),
651    (195, true, true),
652    (196, true, true),
653    (197, true, true),
654    (198, true, true),
655    (199, true, true),
656    (200, false, false),
657    (201, true, true),
658    (202, true, true),
659    (203, true, true),
660    (204, true, true),
661    (205, true, true),
662    (206, true, true),
663    (207, true, true),
664    (208, true, true),
665    (209, true, true),
666    (210, true, true),
667    (211, false, false),
668    (212, true, true),
669    (213, false, false),
670    (214, true, true),
671    (215, true, true),
672    (216, true, true),
673    (217, true, true),
674    (218, true, true),
675    (219, true, true),
676    (220, false, false),
677    (221, true, true),
678    (222, true, true),
679    (223, true, true),
680    (224, true, true),
681    (225, true, true),
682    (226, true, true),
683    (227, true, true),
684    (228, false, false),
685    (229, true, true),
686    (230, true, true),
687    (231, true, true),
688    (232, false, false),
689    (233, true, true),
690    (234, true, true),
691    (235, true, true),
692    (236, false, false),
693    (237, true, true),
694    (238, true, true),
695    (239, true, true),
696    (240, true, true),
697    (241, true, true),
698    (242, true, true),
699    (243, true, true),
700    (244, true, true),
701    (245, true, true),
702    (246, true, true),
703    (247, false, false),
704    (248, false, false),
705    (249, true, true),
706    (250, true, true),
707    (251, true, true),
708    (252, true, true),
709    (253, true, true),
710    (254, false, false),
711    (255, false, false),
712    (256, true, true),
713    (257, true, true),
714    (258, true, true),
715    (259, true, true),
716    (260, true, true),
717    (261, true, true),
718    (262, true, true),
719    (263, false, false),
720    (264, true, true),
721    (265, true, true),
722    (266, true, true),
723    (267, true, true),
724    (268, true, true),
725    (269, true, true),
726    (270, true, true),
727    (271, false, false),
728    (272, true, true),
729    (273, true, true),
730    (274, true, true),
731    (275, true, true),
732    (276, true, true),
733    (277, true, true),
734    (278, true, true),
735    (279, true, true),
736    (280, true, true),
737    (281, true, true),
738    (282, true, true),
739    (283, true, true),
740    (284, false, false),
741    (285, true, true),
742    (286, true, true),
743    (287, true, true),
744    (288, false, false),
745    (289, true, true),
746    (290, true, true),
747    (291, true, true),
748    (292, true, true),
749    (293, true, true),
750    (294, true, true),
751    (295, true, true),
752    (296, true, true),
753    (297, true, true),
754    (298, true, true),
755    (299, true, true),
756    (300, true, true),
757    (301, true, true),
758    (302, true, true),
759    (303, true, true),
760    (304, true, true),
761    (305, true, true),
762    (306, true, true),
763    (307, false, false),
764    (308, false, false),
765    (309, true, true),
766    (310, true, true),
767    (311, true, true),
768    (312, false, false),
769    (313, true, true),
770    (314, true, true),
771    (315, true, true),
772    (316, true, true),
773    (317, false, false),
774    (318, false, false),
775    (319, false, false),
776    (320, true, true),
777    (321, true, true),
778    (322, true, true),
779    (323, true, true),
780    (324, true, true),
781    (325, true, true),
782    (326, true, true),
783    (327, true, true),
784    (328, true, true),
785    (329, true, true),
786    (330, true, true),
787    (331, true, true),
788    (332, true, true),
789    (333, true, true),
790    (334, true, true),
791    (335, false, false),
792    (336, false, false),
793    (337, false, false),
794    (338, true, true),
795    (339, false, false),
796    (340, true, true),
797    (341, false, false),
798    (342, true, true),
799    (343, true, true),
800    (344, true, true),
801    (345, true, true),
802    (346, true, true),
803    (347, false, false),
804    (348, true, true),
805    (349, true, true),
806    (350, true, true),
807    (351, false, false),
808    (352, true, true),
809    (353, true, true),
810    (354, false, false),
811    (355, false, false),
812    (356, true, true),
813    (357, true, true),
814    (358, true, true),
815    (359, true, true),
816    (360, false, false),
817    (361, true, true),
818    (362, true, true),
819    (363, false, false),
820    (364, true, true),
821    (365, false, false),
822    (366, false, false),
823    (367, false, false),
824    (368, true, true),
825    (369, true, true),
826    (370, true, true),
827    (371, true, true),
828    (372, true, true),
829    (373, true, true),
830    (374, true, true),
831    (375, false, false),
832    (376, true, true),
833    (377, true, true),
834    (378, true, true),
835    (379, false, false),
836    (380, true, true),
837    (381, false, false),
838    (382, false, false),
839    (383, false, false),
840    (384, true, true),
841    (385, true, true),
842    (386, true, true),
843    (387, true, true),
844    (388, true, true),
845    (389, true, true),
846    (390, true, true),
847    (391, true, true),
848    (392, true, true),
849    (393, false, false),
850    (394, false, false),
851    (395, false, false),
852    (396, false, false),
853    (397, false, false),
854    (398, false, false),
855    (399, false, false),
856    (400, false, false),
857    (401, false, false),
858    (402, false, false),
859    (403, false, false),
860    (404, false, false),
861    (405, false, false),
862    (406, false, false),
863    (407, false, false),
864    (408, false, false),
865    (409, false, false),
866    (410, false, false),
867    (411, false, false),
868    (412, false, false),
869    (413, false, false),
870    (414, false, false),
871    (415, false, false),
872    (416, false, false),
873    (417, false, false),
874    (418, false, false),
875    (419, false, false),
876    (420, false, false),
877    (421, false, false),
878    (422, false, false),
879    (423, false, false),
880    (424, false, false),
881    (425, false, false),
882    (426, false, false),
883    (427, false, false),
884    (428, false, false),
885    (429, false, false),
886    (430, false, false),
887    (431, false, false),
888    (432, false, false),
889    (433, true, true),
890];
891
892impl From<Php> for &'static str {
893    #[inline]
894    fn from(tok: Php) -> Self {
895        match tok {
896            Php::End => "end",
897            Php::Name => "name",
898            Php::PhpTag => "php_tag",
899            Php::PhpEndTag => "php_end_tag",
900            Php::TextToken1 => "text_token1",
901            Php::TextToken2 => "text_token2",
902            Php::SEMI => ";",
903            Php::AMP => "&",
904            Php::Static => "static",
905            Php::COMMA => ",",
906            Php::EQ => "=",
907            Php::Global => "global",
908            Php::Namespace => "namespace",
909            Php::Use => "use",
910            Php::As => "as",
911            Php::Function => "function",
912            Php::Const => "const",
913            Php::BSLASH => "\\",
914            Php::LBRACE => "{",
915            Php::RBRACE => "}",
916            Php::Trait => "trait",
917            Php::Interface => "interface",
918            Php::Extends => "extends",
919            Php::Enum => "enum",
920            Php::COLON => ":",
921            Php::String2 => "string",
922            Php::Int => "int",
923            Php::Case => "case",
924            Php::Class => "class",
925            Php::Final => "final",
926            Php::Abstract => "abstract",
927            Php::Readonly => "readonly",
928            Php::Implements => "implements",
929            Php::EQGT => "=>",
930            Php::VarModifier => "var_modifier",
931            Php::Insteadof => "insteadof",
932            Php::Public => "public",
933            Php::Protected => "protected",
934            Php::Private => "private",
935            Php::LPAREN => "(",
936            Php::RPAREN => ")",
937            Php::LPAREN2 => "(",
938            Php::RPAREN2 => ")",
939            Php::Fn => "fn",
940            Php::DOTDOTDOT => "...",
941            Php::QMARK => "?",
942            Php::BottomType => "bottom_type",
943            Php::PIPE => "|",
944            Php::Array => "array",
945            Php::Bool => "bool",
946            Php::PrimitiveTypeToken1 => "primitive_type_token1",
947            Php::PrimitiveTypeToken2 => "primitive_type_token2",
948            Php::Float2 => "float",
949            Php::PrimitiveTypeToken3 => "primitive_type_token3",
950            Php::PrimitiveTypeToken4 => "primitive_type_token4",
951            Php::Null2 => "null",
952            Php::Object => "object",
953            Php::PrimitiveTypeToken5 => "primitive_type_token5",
954            Php::PrimitiveTypeToken6 => "primitive_type_token6",
955            Php::CastTypeToken1 => "cast_type_token1",
956            Php::CastTypeToken2 => "cast_type_token2",
957            Php::CastTypeToken3 => "cast_type_token3",
958            Php::CastTypeToken4 => "cast_type_token4",
959            Php::CastTypeToken5 => "cast_type_token5",
960            Php::CastTypeToken6 => "cast_type_token6",
961            Php::CastTypeToken7 => "cast_type_token7",
962            Php::CastTypeToken8 => "cast_type_token8",
963            Php::CastTypeToken9 => "cast_type_token9",
964            Php::CastTypeToken10 => "cast_type_token10",
965            Php::CastTypeToken11 => "cast_type_token11",
966            Php::CastTypeToken12 => "cast_type_token12",
967            Php::Echo => "echo",
968            Php::Exit => "exit",
969            Php::Unset => "unset",
970            Php::Declare => "declare",
971            Php::Enddeclare => "enddeclare",
972            Php::Ticks => "ticks",
973            Php::Encoding => "encoding",
974            Php::StrictTypes => "strict_types",
975            Php::Float => "float",
976            Php::Try => "try",
977            Php::Catch => "catch",
978            Php::Finally => "finally",
979            Php::Goto => "goto",
980            Php::Continue => "continue",
981            Php::Break => "break",
982            Php::Integer => "integer",
983            Php::Return => "return",
984            Php::Throw => "throw",
985            Php::While => "while",
986            Php::Endwhile => "endwhile",
987            Php::Do => "do",
988            Php::For => "for",
989            Php::Endfor => "endfor",
990            Php::Foreach => "foreach",
991            Php::Endforeach => "endforeach",
992            Php::If => "if",
993            Php::Endif => "endif",
994            Php::Elseif => "elseif",
995            Php::Else => "else",
996            Php::Match => "match",
997            Php::Default => "default",
998            Php::Switch => "switch",
999            Php::Endswitch => "endswitch",
1000            Php::PLUS => "+",
1001            Php::DASH => "-",
1002            Php::TILDE => "~",
1003            Php::BANG => "!",
1004            Php::AT => "@",
1005            Php::Clone => "clone",
1006            Php::COLONCOLON => "::",
1007            Php::Print => "print",
1008            Php::New => "new",
1009            Php::DASHDASH => "--",
1010            Php::PLUSPLUS => "++",
1011            Php::STARSTAREQ => "**=",
1012            Php::STAREQ => "*=",
1013            Php::SLASHEQ => "/=",
1014            Php::PERCENTEQ => "%=",
1015            Php::PLUSEQ => "+=",
1016            Php::DASHEQ => "-=",
1017            Php::DOTEQ => ".=",
1018            Php::LTLTEQ => "<<=",
1019            Php::GTGTEQ => ">>=",
1020            Php::AMPEQ => "&=",
1021            Php::CARETEQ => "^=",
1022            Php::PIPEEQ => "|=",
1023            Php::QMARKQMARKEQ => "??=",
1024            Php::DASHGT => "->",
1025            Php::QMARKDASHGT => "?->",
1026            Php::List => "list",
1027            Php::LBRACK => "[",
1028            Php::RBRACK => "]",
1029            Php::Zelf => "self",
1030            Php::Parent => "parent",
1031            Php::ArgumentNameToken1 => "_argument_name_token1",
1032            Php::ArgumentNameToken2 => "_argument_name_token2",
1033            Php::HASHLBRACK => "#[",
1034            Php::EscapeSequence => "escape_sequence",
1035            Php::StringContent => "string_content",
1036            Php::EncapsedStringToken1 => "encapsed_string_token1",
1037            Php::DQUOTE => "\"",
1038            Php::StringToken1 => "string_token1",
1039            Php::SQUOTE => "'",
1040            Php::EscapeSequence2 => "escape_sequence",
1041            Php::StringContentToken1 => "string_content_token1",
1042            Php::LTLTLT => "<<<",
1043            Php::DQUOTE2 => "\"",
1044            Php::NewLine => "_new_line",
1045            Php::SQUOTE2 => "'",
1046            Php::BQUOTE => "`",
1047            Php::DOLLAR => "$",
1048            Php::Yield => "yield",
1049            Php::Yieldfrom => "yield from",
1050            Php::Instanceof => "instanceof",
1051            Php::QMARKQMARK => "??",
1052            Php::STARSTAR => "**",
1053            Php::And => "and",
1054            Php::Or => "or",
1055            Php::Xor => "xor",
1056            Php::PIPEPIPE => "||",
1057            Php::AMPAMP => "&&",
1058            Php::CARET => "^",
1059            Php::EQEQ => "==",
1060            Php::BANGEQ => "!=",
1061            Php::LTGT => "<>",
1062            Php::EQEQEQ => "===",
1063            Php::BANGEQEQ => "!==",
1064            Php::LT => "<",
1065            Php::GT => ">",
1066            Php::LTEQ => "<=",
1067            Php::GTEQ => ">=",
1068            Php::LTEQGT => "<=>",
1069            Php::PIPEGT => "|>",
1070            Php::DOT => ".",
1071            Php::LTLT => "<<",
1072            Php::GTGT => ">>",
1073            Php::STAR => "*",
1074            Php::SLASH => "/",
1075            Php::PERCENT => "%",
1076            Php::Include => "include",
1077            Php::IncludeOnce => "include_once",
1078            Php::Require => "require",
1079            Php::RequireOnce => "require_once",
1080            Php::Comment => "comment",
1081            Php::AutomaticSemicolon => "_automatic_semicolon",
1082            Php::StringContent2 => "string_content",
1083            Php::StringContent3 => "string_content",
1084            Php::StringContent4 => "string_content",
1085            Php::StringContent5 => "string_content",
1086            Php::StringContent6 => "string_content",
1087            Php::StringContent7 => "string_content",
1088            Php::Eof => "_eof",
1089            Php::HeredocStart => "heredoc_start",
1090            Php::HeredocEnd => "heredoc_end",
1091            Php::NowdocString => "nowdoc_string",
1092            Php::SentinelError => "sentinel_error",
1093            Php::Program => "program",
1094            Php::TextInterpolation => "text_interpolation",
1095            Php::Text => "text",
1096            Php::Statement => "statement",
1097            Php::EmptyStatement => "empty_statement",
1098            Php::ReferenceModifier => "reference_modifier",
1099            Php::FunctionStaticDeclaration => "function_static_declaration",
1100            Php::StaticVariableDeclaration => "static_variable_declaration",
1101            Php::GlobalDeclaration => "global_declaration",
1102            Php::NamespaceDefinition => "namespace_definition",
1103            Php::NamespaceUseDeclaration => "namespace_use_declaration",
1104            Php::NamespaceUseClause => "namespace_use_clause",
1105            Php::QualifiedName => "qualified_name",
1106            Php::RelativeName => "relative_name",
1107            Php::Name2 => "_name",
1108            Php::NamespaceName => "namespace_name",
1109            Php::NamespaceUseGroup2 => "_namespace_use_group",
1110            Php::NamespaceUseGroup => "namespace_use_group",
1111            Php::TraitDeclaration => "trait_declaration",
1112            Php::InterfaceDeclaration => "interface_declaration",
1113            Php::BaseClause => "base_clause",
1114            Php::EnumDeclaration => "enum_declaration",
1115            Php::EnumDeclarationList => "enum_declaration_list",
1116            Php::EnumMemberDeclaration => "_enum_member_declaration",
1117            Php::EnumCase => "enum_case",
1118            Php::ClassDeclaration => "class_declaration",
1119            Php::DeclarationList => "declaration_list",
1120            Php::FinalModifier => "final_modifier",
1121            Php::AbstractModifier => "abstract_modifier",
1122            Php::ReadonlyModifier => "readonly_modifier",
1123            Php::ClassInterfaceClause => "class_interface_clause",
1124            Php::MemberDeclaration => "_member_declaration",
1125            Php::ConstDeclaration => "const_declaration",
1126            Php::ConstDeclaration2 => "const_declaration",
1127            Php::PropertyDeclaration => "property_declaration",
1128            Php::Modifier => "_modifier",
1129            Php::PropertyElement => "property_element",
1130            Php::PropertyHookList => "property_hook_list",
1131            Php::PropertyHook => "property_hook",
1132            Php::PropertyHookBody => "_property_hook_body",
1133            Php::MethodDeclaration => "method_declaration",
1134            Php::StaticModifier => "static_modifier",
1135            Php::UseDeclaration => "use_declaration",
1136            Php::UseList => "use_list",
1137            Php::UseInsteadOfClause => "use_instead_of_clause",
1138            Php::UseAsClause => "use_as_clause",
1139            Php::VisibilityModifier => "visibility_modifier",
1140            Php::FunctionDefinition => "function_definition",
1141            Php::AnonymousFunction => "anonymous_function",
1142            Php::AnonymousFunctionUseClause => "anonymous_function_use_clause",
1143            Php::AnonymousFunctionHeader => "_anonymous_function_header",
1144            Php::ArrowFunctionHeader => "_arrow_function_header",
1145            Php::ArrowFunction => "arrow_function",
1146            Php::FormalParameters => "formal_parameters",
1147            Php::PropertyPromotionParameter => "property_promotion_parameter",
1148            Php::SimpleParameter => "simple_parameter",
1149            Php::VariadicParameter => "variadic_parameter",
1150            Php::Type => "type",
1151            Php::Types => "_types",
1152            Php::NamedType => "named_type",
1153            Php::OptionalType => "optional_type",
1154            Php::UnionType => "union_type",
1155            Php::IntersectionType => "intersection_type",
1156            Php::DisjunctiveNormalFormType => "disjunctive_normal_form_type",
1157            Php::PrimitiveType => "primitive_type",
1158            Php::CastType => "cast_type",
1159            Php::ReturnType => "_return_type",
1160            Php::ConstElement => "const_element",
1161            Php::ConstElement2 => "const_element",
1162            Php::EchoStatement => "echo_statement",
1163            Php::ExitStatement => "exit_statement",
1164            Php::UnsetStatement => "unset_statement",
1165            Php::DeclareStatement => "declare_statement",
1166            Php::DeclareDirective => "declare_directive",
1167            Php::Literal => "literal",
1168            Php::TryStatement => "try_statement",
1169            Php::CatchClause => "catch_clause",
1170            Php::TypeList => "type_list",
1171            Php::FinallyClause => "finally_clause",
1172            Php::GotoStatement => "goto_statement",
1173            Php::ContinueStatement => "continue_statement",
1174            Php::BreakStatement => "break_statement",
1175            Php::ReturnStatement => "return_statement",
1176            Php::ThrowExpression => "throw_expression",
1177            Php::WhileStatement => "while_statement",
1178            Php::DoStatement => "do_statement",
1179            Php::ForStatement => "for_statement",
1180            Php::Expressions => "_expressions",
1181            Php::SequenceExpression => "sequence_expression",
1182            Php::ForeachStatement => "foreach_statement",
1183            Php::Pair => "pair",
1184            Php::ForeachValue => "_foreach_value",
1185            Php::IfStatement => "if_statement",
1186            Php::ColonBlock => "colon_block",
1187            Php::ElseIfClause => "else_if_clause",
1188            Php::ElseClause => "else_clause",
1189            Php::ElseIfClause2 => "else_if_clause",
1190            Php::ElseClause2 => "else_clause",
1191            Php::MatchExpression => "match_expression",
1192            Php::MatchBlock => "match_block",
1193            Php::MatchConditionList => "match_condition_list",
1194            Php::MatchConditionalExpression => "match_conditional_expression",
1195            Php::MatchDefaultExpression => "match_default_expression",
1196            Php::SwitchStatement => "switch_statement",
1197            Php::SwitchBlock => "switch_block",
1198            Php::CaseStatement => "case_statement",
1199            Php::DefaultStatement => "default_statement",
1200            Php::CompoundStatement => "compound_statement",
1201            Php::NamedLabelStatement => "named_label_statement",
1202            Php::ExpressionStatement => "expression_statement",
1203            Php::Expression => "expression",
1204            Php::UnaryExpression => "_unary_expression",
1205            Php::UnaryOpExpression => "unary_op_expression",
1206            Php::ErrorSuppressionExpression => "error_suppression_expression",
1207            Php::CloneExpression => "clone_expression",
1208            Php::PrimaryExpression => "primary_expression",
1209            Php::ParenthesizedExpression => "parenthesized_expression",
1210            Php::ClassConstantAccessExpression => "class_constant_access_expression",
1211            Php::PrintIntrinsic => "print_intrinsic",
1212            Php::ObjectCreationExpression => "object_creation_expression",
1213            Php::NewNonDereferencableExpression => "_new_non_dereferencable_expression",
1214            Php::NewDereferencableExpression => "_new_dereferencable_expression",
1215            Php::ClassNameReference => "_class_name_reference",
1216            Php::AnonymousClass => "anonymous_class",
1217            Php::UpdateExpression => "update_expression",
1218            Php::CastExpression => "cast_expression",
1219            Php::CastExpression2 => "cast_expression",
1220            Php::AssignmentExpression => "assignment_expression",
1221            Php::ReferenceAssignmentExpression => "reference_assignment_expression",
1222            Php::ConditionalExpression => "conditional_expression",
1223            Php::AugmentedAssignmentExpression => "augmented_assignment_expression",
1224            Php::MemberAccessExpression => "member_access_expression",
1225            Php::MemberAccessExpression2 => "member_access_expression",
1226            Php::NullsafeMemberAccessExpression => "nullsafe_member_access_expression",
1227            Php::NullsafeMemberAccessExpression2 => "nullsafe_member_access_expression",
1228            Php::ScopedPropertyAccessExpression => "scoped_property_access_expression",
1229            Php::ScopedPropertyAccessExpression2 => "scoped_property_access_expression",
1230            Php::ListLiteral => "list_literal",
1231            Php::ListDestructing => "_list_destructing",
1232            Php::ArrayDestructing => "_array_destructing",
1233            Php::ArrayDestructingElement => "_array_destructing_element",
1234            Php::FunctionCallExpression => "function_call_expression",
1235            Php::CallableExpression => "_callable_expression",
1236            Php::ScopedCallExpression => "scoped_call_expression",
1237            Php::ScopeResolutionQualifier => "_scope_resolution_qualifier",
1238            Php::RelativeScope => "relative_scope",
1239            Php::VariadicPlaceholder => "variadic_placeholder",
1240            Php::ArgumentPlaceholder => "argument_placeholder",
1241            Php::Arguments => "arguments",
1242            Php::Argument => "argument",
1243            Php::ArgumentName => "_argument_name",
1244            Php::MemberCallExpression => "member_call_expression",
1245            Php::NullsafeMemberCallExpression => "nullsafe_member_call_expression",
1246            Php::VariadicUnpacking => "variadic_unpacking",
1247            Php::MemberName => "_member_name",
1248            Php::SubscriptExpression => "subscript_expression",
1249            Php::SubscriptExpression2 => "subscript_expression",
1250            Php::DereferencableExpression => "_dereferencable_expression",
1251            Php::DereferencableScalar => "_dereferencable_scalar",
1252            Php::ArrayCreationExpression => "array_creation_expression",
1253            Php::AttributeGroup => "attribute_group",
1254            Php::AttributeList => "attribute_list",
1255            Php::Attribute => "attribute",
1256            Php::ComplexStringPart => "_complex_string_part",
1257            Php::MemberAccessExpression3 => "member_access_expression",
1258            Php::UnaryOpExpression2 => "unary_op_expression",
1259            Php::SimpleStringArrayAccessArgument => "_simple_string_array_access_argument",
1260            Php::SubscriptExpression3 => "subscript_expression",
1261            Php::SimpleStringPart => "_simple_string_part",
1262            Php::InterpolatedStringBody => "_interpolated_string_body",
1263            Php::InterpolatedStringBodyHeredoc => "_interpolated_string_body_heredoc",
1264            Php::EncapsedString => "encapsed_string",
1265            Php::String => "string",
1266            Php::StringContent8 => "string_content",
1267            Php::HeredocBody => "heredoc_body",
1268            Php::Heredoc => "heredoc",
1269            Php::NowdocBody => "nowdoc_body",
1270            Php::Nowdoc => "nowdoc",
1271            Php::InterpolatedExecutionOperatorBody => "_interpolated_execution_operator_body",
1272            Php::ShellCommandExpression => "shell_command_expression",
1273            Php::Boolean => "boolean",
1274            Php::Null => "null",
1275            Php::String3 => "_string",
1276            Php::DynamicVariableName => "dynamic_variable_name",
1277            Php::SimpleVariable => "_simple_variable",
1278            Php::NewVariable => "_new_variable",
1279            Php::CallableVariable => "_callable_variable",
1280            Php::VariableName => "variable_name",
1281            Php::ByRef => "by_ref",
1282            Php::YieldExpression => "yield_expression",
1283            Php::ArrayElementInitializer => "array_element_initializer",
1284            Php::BinaryExpression => "binary_expression",
1285            Php::IncludeExpression => "include_expression",
1286            Php::IncludeOnceExpression => "include_once_expression",
1287            Php::RequireExpression => "require_expression",
1288            Php::RequireOnceExpression => "require_once_expression",
1289            Php::Semicolon => "_semicolon",
1290            Php::ProgramRepeat1 => "program_repeat1",
1291            Php::TextRepeat1 => "text_repeat1",
1292            Php::FunctionStaticDeclarationRepeat1 => "function_static_declaration_repeat1",
1293            Php::GlobalDeclarationRepeat1 => "global_declaration_repeat1",
1294            Php::NamespaceUseDeclarationRepeat1 => "namespace_use_declaration_repeat1",
1295            Php::NamespaceNameRepeat1 => "namespace_name_repeat1",
1296            Php::BaseClauseRepeat1 => "base_clause_repeat1",
1297            Php::EnumDeclarationListRepeat1 => "enum_declaration_list_repeat1",
1298            Php::ClassDeclarationRepeat1 => "class_declaration_repeat1",
1299            Php::DeclarationListRepeat1 => "declaration_list_repeat1",
1300            Php::ConstDeclarationRepeat1 => "const_declaration_repeat1",
1301            Php::ClassConstDeclarationRepeat1 => "_class_const_declaration_repeat1",
1302            Php::PropertyDeclarationRepeat1 => "property_declaration_repeat1",
1303            Php::PropertyHookListRepeat1 => "property_hook_list_repeat1",
1304            Php::UseListRepeat1 => "use_list_repeat1",
1305            Php::AnonymousFunctionUseClauseRepeat1 => "anonymous_function_use_clause_repeat1",
1306            Php::FormalParametersRepeat1 => "formal_parameters_repeat1",
1307            Php::PropertyPromotionParameterRepeat1 => "property_promotion_parameter_repeat1",
1308            Php::UnionTypeRepeat1 => "union_type_repeat1",
1309            Php::IntersectionTypeRepeat1 => "intersection_type_repeat1",
1310            Php::DisjunctiveNormalFormTypeRepeat1 => "disjunctive_normal_form_type_repeat1",
1311            Php::UnsetStatementRepeat1 => "unset_statement_repeat1",
1312            Php::TryStatementRepeat1 => "try_statement_repeat1",
1313            Php::TypeListRepeat1 => "type_list_repeat1",
1314            Php::IfStatementRepeat1 => "if_statement_repeat1",
1315            Php::IfStatementRepeat2 => "if_statement_repeat2",
1316            Php::MatchBlockRepeat1 => "match_block_repeat1",
1317            Php::MatchConditionListRepeat1 => "match_condition_list_repeat1",
1318            Php::SwitchBlockRepeat1 => "switch_block_repeat1",
1319            Php::ListDestructingRepeat1 => "_list_destructing_repeat1",
1320            Php::ArrayDestructingRepeat1 => "_array_destructing_repeat1",
1321            Php::ArgumentsRepeat1 => "arguments_repeat1",
1322            Php::ArrayCreationExpressionRepeat1 => "array_creation_expression_repeat1",
1323            Php::AttributeGroupRepeat1 => "attribute_group_repeat1",
1324            Php::AttributeListRepeat1 => "attribute_list_repeat1",
1325            Php::StringRepeat1 => "string_repeat1",
1326            Php::StringContentRepeat1 => "string_content_repeat1",
1327            Php::HeredocBodyRepeat1 => "heredoc_body_repeat1",
1328            Php::NowdocBodyRepeat1 => "nowdoc_body_repeat1",
1329            Php::Operation => "operation",
1330            Php::Error => "ERROR",
1331        }
1332    }
1333}
1334
1335impl From<u16> for Php {
1336    #[inline]
1337    fn from(x: u16) -> Self {
1338        num_traits::FromPrimitive::from_u16(x).unwrap_or(Self::Error)
1339    }
1340}
1341
1342// Php == u16
1343impl PartialEq<u16> for Php {
1344    #[inline]
1345    fn eq(&self, x: &u16) -> bool {
1346        *self == Into::<Self>::into(*x)
1347    }
1348}
1349
1350// u16 == Php
1351impl PartialEq<Php> for u16 {
1352    #[inline]
1353    fn eq(&self, x: &Php) -> bool {
1354        *x == *self
1355    }
1356}