xref: /openbsd/gnu/usr.bin/perl/perly.h (revision 3d61058a)
1 /* -*- mode: C; buffer-read-only: t -*-
2    !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
3    This file is built by regen_perly.pl from perly.y.
4    Any changes made here will be lost!
5  */
6 
7 #define PERL_BISON_VERSION  30007
8 
9 #ifdef PERL_CORE
10 /* A Bison parser, made by GNU Bison 3.7.  */
11 
12 /* Bison interface for Yacc-like parsers in C
13 
14    Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
15    Inc.
16 
17    This program is free software: you can redistribute it and/or modify
18    it under the terms of the GNU General Public License as published by
19    the Free Software Foundation, either version 3 of the License, or
20    (at your option) any later version.
21 
22    This program is distributed in the hope that it will be useful,
23    but WITHOUT ANY WARRANTY; without even the implied warranty of
24    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25    GNU General Public License for more details.
26 
27    You should have received a copy of the GNU General Public License
28    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
29 
30 /* As a special exception, you may create a larger work that contains
31    part or all of the Bison parser skeleton and distribute that work
32    under terms of your choice, so long as that work isn't itself a
33    parser generator using the skeleton or a modified version thereof
34    as a parser skeleton.  Alternatively, if you modify or redistribute
35    the parser skeleton itself, you may (at your option) remove this
36    special exception, which will cause the skeleton and the resulting
37    Bison output files to be licensed under the GNU General Public
38    License without this special exception.
39 
40    This special exception was added by the Free Software Foundation in
41    version 2.2 of Bison.  */
42 
43 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
44    especially those whose name start with YY_ or yy_.  They are
45    private implementation details that can be changed or removed.  */
46 
47 /* Debug traces.  */
48 #ifndef YYDEBUG
49 # define YYDEBUG 0
50 #endif
51 #if YYDEBUG
52 extern int yydebug;
53 #endif
54 
55 /* Token kinds.  */
56 #ifndef YYTOKENTYPE
57 # define YYTOKENTYPE
58   enum yytokentype
59   {
60     YYEMPTY = -2,
61     YYEOF = 0,                     /* "end of file"  */
62     YYerror = 256,                 /* error  */
63     YYUNDEF = 257,                 /* "invalid token"  */
64     GRAMPROG = 258,                /* GRAMPROG  */
65     GRAMEXPR = 259,                /* GRAMEXPR  */
66     GRAMBLOCK = 260,               /* GRAMBLOCK  */
67     GRAMBARESTMT = 261,            /* GRAMBARESTMT  */
68     GRAMFULLSTMT = 262,            /* GRAMFULLSTMT  */
69     GRAMSTMTSEQ = 263,             /* GRAMSTMTSEQ  */
70     GRAMSUBSIGNATURE = 264,        /* GRAMSUBSIGNATURE  */
71     PERLY_AMPERSAND = 265,         /* PERLY_AMPERSAND  */
72     PERLY_BRACE_OPEN = 266,        /* PERLY_BRACE_OPEN  */
73     PERLY_BRACE_CLOSE = 267,       /* PERLY_BRACE_CLOSE  */
74     PERLY_BRACKET_OPEN = 268,      /* PERLY_BRACKET_OPEN  */
75     PERLY_BRACKET_CLOSE = 269,     /* PERLY_BRACKET_CLOSE  */
76     PERLY_COMMA = 270,             /* PERLY_COMMA  */
77     PERLY_DOLLAR = 271,            /* PERLY_DOLLAR  */
78     PERLY_DOT = 272,               /* PERLY_DOT  */
79     PERLY_EQUAL_SIGN = 273,        /* PERLY_EQUAL_SIGN  */
80     PERLY_MINUS = 274,             /* PERLY_MINUS  */
81     PERLY_PERCENT_SIGN = 275,      /* PERLY_PERCENT_SIGN  */
82     PERLY_PLUS = 276,              /* PERLY_PLUS  */
83     PERLY_SEMICOLON = 277,         /* PERLY_SEMICOLON  */
84     PERLY_SLASH = 278,             /* PERLY_SLASH  */
85     PERLY_SNAIL = 279,             /* PERLY_SNAIL  */
86     PERLY_STAR = 280,              /* PERLY_STAR  */
87     KW_FORMAT = 281,               /* KW_FORMAT  */
88     KW_PACKAGE = 282,              /* KW_PACKAGE  */
89     KW_CLASS = 283,                /* KW_CLASS  */
90     KW_LOCAL = 284,                /* KW_LOCAL  */
91     KW_MY = 285,                   /* KW_MY  */
92     KW_FIELD = 286,                /* KW_FIELD  */
93     KW_IF = 287,                   /* KW_IF  */
94     KW_ELSE = 288,                 /* KW_ELSE  */
95     KW_ELSIF = 289,                /* KW_ELSIF  */
96     KW_UNLESS = 290,               /* KW_UNLESS  */
97     KW_FOR = 291,                  /* KW_FOR  */
98     KW_UNTIL = 292,                /* KW_UNTIL  */
99     KW_WHILE = 293,                /* KW_WHILE  */
100     KW_CONTINUE = 294,             /* KW_CONTINUE  */
101     KW_GIVEN = 295,                /* KW_GIVEN  */
102     KW_WHEN = 296,                 /* KW_WHEN  */
103     KW_DEFAULT = 297,              /* KW_DEFAULT  */
104     KW_TRY = 298,                  /* KW_TRY  */
105     KW_CATCH = 299,                /* KW_CATCH  */
106     KW_FINALLY = 300,              /* KW_FINALLY  */
107     KW_DEFER = 301,                /* KW_DEFER  */
108     KW_REQUIRE = 302,              /* KW_REQUIRE  */
109     KW_DO = 303,                   /* KW_DO  */
110     KW_USE_or_NO = 304,            /* KW_USE_or_NO  */
111     KW_SUB_named = 305,            /* KW_SUB_named  */
112     KW_SUB_named_sig = 306,        /* KW_SUB_named_sig  */
113     KW_SUB_anon = 307,             /* KW_SUB_anon  */
114     KW_SUB_anon_sig = 308,         /* KW_SUB_anon_sig  */
115     KW_METHOD_named = 309,         /* KW_METHOD_named  */
116     KW_METHOD_anon = 310,          /* KW_METHOD_anon  */
117     BAREWORD = 311,                /* BAREWORD  */
118     METHCALL0 = 312,               /* METHCALL0  */
119     METHCALL = 313,                /* METHCALL  */
120     THING = 314,                   /* THING  */
121     PMFUNC = 315,                  /* PMFUNC  */
122     PRIVATEREF = 316,              /* PRIVATEREF  */
123     QWLIST = 317,                  /* QWLIST  */
124     FUNC0OP = 318,                 /* FUNC0OP  */
125     FUNC0SUB = 319,                /* FUNC0SUB  */
126     UNIOPSUB = 320,                /* UNIOPSUB  */
127     LSTOPSUB = 321,                /* LSTOPSUB  */
128     PLUGEXPR = 322,                /* PLUGEXPR  */
129     PLUGSTMT = 323,                /* PLUGSTMT  */
130     LABEL = 324,                   /* LABEL  */
131     LOOPEX = 325,                  /* LOOPEX  */
132     DOTDOT = 326,                  /* DOTDOT  */
133     YADAYADA = 327,                /* YADAYADA  */
134     FUNC0 = 328,                   /* FUNC0  */
135     FUNC1 = 329,                   /* FUNC1  */
136     FUNC = 330,                    /* FUNC  */
137     UNIOP = 331,                   /* UNIOP  */
138     LSTOP = 332,                   /* LSTOP  */
139     POWOP = 333,                   /* POWOP  */
140     MULOP = 334,                   /* MULOP  */
141     ADDOP = 335,                   /* ADDOP  */
142     DOLSHARP = 336,                /* DOLSHARP  */
143     HASHBRACK = 337,               /* HASHBRACK  */
144     NOAMP = 338,                   /* NOAMP  */
145     COLONATTR = 339,               /* COLONATTR  */
146     FORMLBRACK = 340,              /* FORMLBRACK  */
147     FORMRBRACK = 341,              /* FORMRBRACK  */
148     SUBLEXSTART = 342,             /* SUBLEXSTART  */
149     SUBLEXEND = 343,               /* SUBLEXEND  */
150     PHASER = 344,                  /* PHASER  */
151     PREC_LOW = 345,                /* PREC_LOW  */
152     PLUGIN_LOW_OP = 346,           /* PLUGIN_LOW_OP  */
153     OROP = 347,                    /* OROP  */
154     PLUGIN_LOGICAL_OR_LOW_OP = 348, /* PLUGIN_LOGICAL_OR_LOW_OP  */
155     ANDOP = 349,                   /* ANDOP  */
156     PLUGIN_LOGICAL_AND_LOW_OP = 350, /* PLUGIN_LOGICAL_AND_LOW_OP  */
157     NOTOP = 351,                   /* NOTOP  */
158     ASSIGNOP = 352,                /* ASSIGNOP  */
159     PLUGIN_ASSIGN_OP = 353,        /* PLUGIN_ASSIGN_OP  */
160     PERLY_QUESTION_MARK = 354,     /* PERLY_QUESTION_MARK  */
161     PERLY_COLON = 355,             /* PERLY_COLON  */
162     OROR = 356,                    /* OROR  */
163     DORDOR = 357,                  /* DORDOR  */
164     PLUGIN_LOGICAL_OR_OP = 358,    /* PLUGIN_LOGICAL_OR_OP  */
165     ANDAND = 359,                  /* ANDAND  */
166     PLUGIN_LOGICAL_AND_OP = 360,   /* PLUGIN_LOGICAL_AND_OP  */
167     BITOROP = 361,                 /* BITOROP  */
168     BITANDOP = 362,                /* BITANDOP  */
169     CHEQOP = 363,                  /* CHEQOP  */
170     NCEQOP = 364,                  /* NCEQOP  */
171     CHRELOP = 365,                 /* CHRELOP  */
172     NCRELOP = 366,                 /* NCRELOP  */
173     PLUGIN_REL_OP = 367,           /* PLUGIN_REL_OP  */
174     SHIFTOP = 368,                 /* SHIFTOP  */
175     PLUGIN_ADD_OP = 369,           /* PLUGIN_ADD_OP  */
176     PLUGIN_MUL_OP = 370,           /* PLUGIN_MUL_OP  */
177     MATCHOP = 371,                 /* MATCHOP  */
178     PERLY_EXCLAMATION_MARK = 372,  /* PERLY_EXCLAMATION_MARK  */
179     PERLY_TILDE = 373,             /* PERLY_TILDE  */
180     UMINUS = 374,                  /* UMINUS  */
181     REFGEN = 375,                  /* REFGEN  */
182     PLUGIN_POW_OP = 376,           /* PLUGIN_POW_OP  */
183     PREINC = 377,                  /* PREINC  */
184     PREDEC = 378,                  /* PREDEC  */
185     POSTINC = 379,                 /* POSTINC  */
186     POSTDEC = 380,                 /* POSTDEC  */
187     POSTJOIN = 381,                /* POSTJOIN  */
188     PLUGIN_HIGH_OP = 382,          /* PLUGIN_HIGH_OP  */
189     ARROW = 383,                   /* ARROW  */
190     PERLY_PAREN_CLOSE = 384,       /* PERLY_PAREN_CLOSE  */
191     PERLY_PAREN_OPEN = 385         /* PERLY_PAREN_OPEN  */
192   };
193   typedef enum yytokentype yytoken_kind_t;
194 #endif
195 
196 /* Value type.  */
197 #ifdef PERL_IN_TOKE_C
198 static bool
S_is_opval_token(int type)199 S_is_opval_token(int type) {
200     switch (type) {
201     case BAREWORD:
202     case FUNC0OP:
203     case FUNC0SUB:
204     case LABEL:
205     case LSTOPSUB:
206     case METHCALL:
207     case METHCALL0:
208     case PLUGEXPR:
209     case PLUGSTMT:
210     case PMFUNC:
211     case PRIVATEREF:
212     case QWLIST:
213     case THING:
214     case UNIOPSUB:
215 	return 1;
216     }
217     return 0;
218 }
219 #endif /* PERL_IN_TOKE_C */
220 #endif /* PERL_CORE */
221 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
222 union YYSTYPE
223 {
224 
225     I32	ival; /* __DEFAULT__ (marker for regen_perly.pl;
226 				must always be 1st union member) */
227     void *pval;
228     OP *opval;
229     GV *gvval;
230 
231 
232 };
233 typedef union YYSTYPE YYSTYPE;
234 # define YYSTYPE_IS_TRIVIAL 1
235 # define YYSTYPE_IS_DECLARED 1
236 #endif
237 
238 
239 
240 int yyparse (void);
241 
242 
243 /* Generated from:
244  * 823630846fc59cc2a19502726ec723b568eabded55fdc5e9722c600e1098779e perly.y
245  * acf1cbfd2545faeaaa58b1cf0cf9d7f98b5be0752eb7a54528ef904a9e2e1ca7 regen_perly.pl
246  * ex: set ro ft=c: */
247