1 /* A Bison parser, made by GNU Bison 3.8.2. */ 2 3 /* Bison interface for Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, 6 Inc. 7 8 This program is free software: you can redistribute it and/or modify 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation, either version 3 of the License, or 11 (at your option) any later version. 12 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with this program. If not, see <https://www.gnu.org/licenses/>. */ 20 21 /* As a special exception, you may create a larger work that contains 22 part or all of the Bison parser skeleton and distribute that work 23 under terms of your choice, so long as that work isn't itself a 24 parser generator using the skeleton or a modified version thereof 25 as a parser skeleton. Alternatively, if you modify or redistribute 26 the parser skeleton itself, you may (at your option) remove this 27 special exception, which will cause the skeleton and the resulting 28 Bison output files to be licensed under the GNU General Public 29 License without this special exception. 30 31 This special exception was added by the Free Software Foundation in 32 version 2.2 of Bison. */ 33 34 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, 35 especially those whose name start with YY_ or yy_. They are 36 private implementation details that can be changed or removed. */ 37 38 #ifndef YY_ZEND_ZEND_ZEND_LANGUAGE_PARSER_H_INCLUDED 39 # define YY_ZEND_ZEND_ZEND_LANGUAGE_PARSER_H_INCLUDED 40 /* Debug traces. */ 41 #ifndef ZENDDEBUG 42 # if defined YYDEBUG 43 #if YYDEBUG 44 # define ZENDDEBUG 1 45 # else 46 # define ZENDDEBUG 0 47 # endif 48 # else /* ! defined YYDEBUG */ 49 # define ZENDDEBUG 0 50 # endif /* ! defined YYDEBUG */ 51 #endif /* ! defined ZENDDEBUG */ 52 #if ZENDDEBUG 53 extern int zenddebug; 54 #endif 55 /* "%code requires" blocks. */ 56 57 #include "zend_compile.h" 58 59 60 /* Token kinds. */ 61 #ifndef ZENDTOKENTYPE 62 # define ZENDTOKENTYPE 63 enum zendtokentype 64 { 65 ZENDEMPTY = -2, 66 END = 0, /* "end of file" */ 67 ZENDerror = 256, /* error */ 68 ZENDUNDEF = 257, /* "invalid token" */ 69 PREC_ARROW_FUNCTION = 258, /* PREC_ARROW_FUNCTION */ 70 T_NOELSE = 259, /* T_NOELSE */ 71 T_LNUMBER = 260, /* "integer" */ 72 T_DNUMBER = 261, /* "floating-point number" */ 73 T_STRING = 262, /* "identifier" */ 74 T_NAME_FULLY_QUALIFIED = 263, /* "fully qualified name" */ 75 T_NAME_RELATIVE = 264, /* "namespace-relative name" */ 76 T_NAME_QUALIFIED = 265, /* "namespaced name" */ 77 T_VARIABLE = 266, /* "variable" */ 78 T_INLINE_HTML = 267, /* T_INLINE_HTML */ 79 T_ENCAPSED_AND_WHITESPACE = 268, /* "string content" */ 80 T_CONSTANT_ENCAPSED_STRING = 269, /* "quoted string" */ 81 T_STRING_VARNAME = 270, /* "variable name" */ 82 T_NUM_STRING = 271, /* "number" */ 83 T_INCLUDE = 272, /* "'include'" */ 84 T_INCLUDE_ONCE = 273, /* "'include_once'" */ 85 T_EVAL = 274, /* "'eval'" */ 86 T_REQUIRE = 275, /* "'require'" */ 87 T_REQUIRE_ONCE = 276, /* "'require_once'" */ 88 T_LOGICAL_OR = 277, /* "'or'" */ 89 T_LOGICAL_XOR = 278, /* "'xor'" */ 90 T_LOGICAL_AND = 279, /* "'and'" */ 91 T_PRINT = 280, /* "'print'" */ 92 T_YIELD = 281, /* "'yield'" */ 93 T_YIELD_FROM = 282, /* "'yield from'" */ 94 T_INSTANCEOF = 283, /* "'instanceof'" */ 95 T_NEW = 284, /* "'new'" */ 96 T_CLONE = 285, /* "'clone'" */ 97 T_EXIT = 286, /* "'exit'" */ 98 T_IF = 287, /* "'if'" */ 99 T_ELSEIF = 288, /* "'elseif'" */ 100 T_ELSE = 289, /* "'else'" */ 101 T_ENDIF = 290, /* "'endif'" */ 102 T_ECHO = 291, /* "'echo'" */ 103 T_DO = 292, /* "'do'" */ 104 T_WHILE = 293, /* "'while'" */ 105 T_ENDWHILE = 294, /* "'endwhile'" */ 106 T_FOR = 295, /* "'for'" */ 107 T_ENDFOR = 296, /* "'endfor'" */ 108 T_FOREACH = 297, /* "'foreach'" */ 109 T_ENDFOREACH = 298, /* "'endforeach'" */ 110 T_DECLARE = 299, /* "'declare'" */ 111 T_ENDDECLARE = 300, /* "'enddeclare'" */ 112 T_AS = 301, /* "'as'" */ 113 T_SWITCH = 302, /* "'switch'" */ 114 T_ENDSWITCH = 303, /* "'endswitch'" */ 115 T_CASE = 304, /* "'case'" */ 116 T_DEFAULT = 305, /* "'default'" */ 117 T_MATCH = 306, /* "'match'" */ 118 T_BREAK = 307, /* "'break'" */ 119 T_CONTINUE = 308, /* "'continue'" */ 120 T_GOTO = 309, /* "'goto'" */ 121 T_FUNCTION = 310, /* "'function'" */ 122 T_FN = 311, /* "'fn'" */ 123 T_CONST = 312, /* "'const'" */ 124 T_RETURN = 313, /* "'return'" */ 125 T_TRY = 314, /* "'try'" */ 126 T_CATCH = 315, /* "'catch'" */ 127 T_FINALLY = 316, /* "'finally'" */ 128 T_THROW = 317, /* "'throw'" */ 129 T_USE = 318, /* "'use'" */ 130 T_INSTEADOF = 319, /* "'insteadof'" */ 131 T_GLOBAL = 320, /* "'global'" */ 132 T_STATIC = 321, /* "'static'" */ 133 T_ABSTRACT = 322, /* "'abstract'" */ 134 T_FINAL = 323, /* "'final'" */ 135 T_PRIVATE = 324, /* "'private'" */ 136 T_PROTECTED = 325, /* "'protected'" */ 137 T_PUBLIC = 326, /* "'public'" */ 138 T_READONLY = 327, /* "'readonly'" */ 139 T_VAR = 328, /* "'var'" */ 140 T_UNSET = 329, /* "'unset'" */ 141 T_ISSET = 330, /* "'isset'" */ 142 T_EMPTY = 331, /* "'empty'" */ 143 T_HALT_COMPILER = 332, /* "'__halt_compiler'" */ 144 T_CLASS = 333, /* "'class'" */ 145 T_TRAIT = 334, /* "'trait'" */ 146 T_INTERFACE = 335, /* "'interface'" */ 147 T_ENUM = 336, /* "'enum'" */ 148 T_EXTENDS = 337, /* "'extends'" */ 149 T_IMPLEMENTS = 338, /* "'implements'" */ 150 T_NAMESPACE = 339, /* "'namespace'" */ 151 T_LIST = 340, /* "'list'" */ 152 T_ARRAY = 341, /* "'array'" */ 153 T_CALLABLE = 342, /* "'callable'" */ 154 T_LINE = 343, /* "'__LINE__'" */ 155 T_FILE = 344, /* "'__FILE__'" */ 156 T_DIR = 345, /* "'__DIR__'" */ 157 T_CLASS_C = 346, /* "'__CLASS__'" */ 158 T_TRAIT_C = 347, /* "'__TRAIT__'" */ 159 T_METHOD_C = 348, /* "'__METHOD__'" */ 160 T_FUNC_C = 349, /* "'__FUNCTION__'" */ 161 T_NS_C = 350, /* "'__NAMESPACE__'" */ 162 T_ATTRIBUTE = 351, /* "'#['" */ 163 T_PLUS_EQUAL = 352, /* "'+='" */ 164 T_MINUS_EQUAL = 353, /* "'-='" */ 165 T_MUL_EQUAL = 354, /* "'*='" */ 166 T_DIV_EQUAL = 355, /* "'/='" */ 167 T_CONCAT_EQUAL = 356, /* "'.='" */ 168 T_MOD_EQUAL = 357, /* "'%='" */ 169 T_AND_EQUAL = 358, /* "'&='" */ 170 T_OR_EQUAL = 359, /* "'|='" */ 171 T_XOR_EQUAL = 360, /* "'^='" */ 172 T_SL_EQUAL = 361, /* "'<<='" */ 173 T_SR_EQUAL = 362, /* "'>>='" */ 174 T_COALESCE_EQUAL = 363, /* "'??='" */ 175 T_BOOLEAN_OR = 364, /* "'||'" */ 176 T_BOOLEAN_AND = 365, /* "'&&'" */ 177 T_IS_EQUAL = 366, /* "'=='" */ 178 T_IS_NOT_EQUAL = 367, /* "'!='" */ 179 T_IS_IDENTICAL = 368, /* "'==='" */ 180 T_IS_NOT_IDENTICAL = 369, /* "'!=='" */ 181 T_IS_SMALLER_OR_EQUAL = 370, /* "'<='" */ 182 T_IS_GREATER_OR_EQUAL = 371, /* "'>='" */ 183 T_SPACESHIP = 372, /* "'<=>'" */ 184 T_SL = 373, /* "'<<'" */ 185 T_SR = 374, /* "'>>'" */ 186 T_INC = 375, /* "'++'" */ 187 T_DEC = 376, /* "'--'" */ 188 T_INT_CAST = 377, /* "'(int)'" */ 189 T_DOUBLE_CAST = 378, /* "'(double)'" */ 190 T_STRING_CAST = 379, /* "'(string)'" */ 191 T_ARRAY_CAST = 380, /* "'(array)'" */ 192 T_OBJECT_CAST = 381, /* "'(object)'" */ 193 T_BOOL_CAST = 382, /* "'(bool)'" */ 194 T_UNSET_CAST = 383, /* "'(unset)'" */ 195 T_OBJECT_OPERATOR = 384, /* "'->'" */ 196 T_NULLSAFE_OBJECT_OPERATOR = 385, /* "'?->'" */ 197 T_DOUBLE_ARROW = 386, /* "'=>'" */ 198 T_COMMENT = 387, /* "comment" */ 199 T_DOC_COMMENT = 388, /* "doc comment" */ 200 T_OPEN_TAG = 389, /* "open tag" */ 201 T_OPEN_TAG_WITH_ECHO = 390, /* "'<?='" */ 202 T_CLOSE_TAG = 391, /* "'?>'" */ 203 T_WHITESPACE = 392, /* "whitespace" */ 204 T_START_HEREDOC = 393, /* "heredoc start" */ 205 T_END_HEREDOC = 394, /* "heredoc end" */ 206 T_DOLLAR_OPEN_CURLY_BRACES = 395, /* "'${'" */ 207 T_CURLY_OPEN = 396, /* "'{$'" */ 208 T_PAAMAYIM_NEKUDOTAYIM = 397, /* "'::'" */ 209 T_NS_SEPARATOR = 398, /* "'\\'" */ 210 T_ELLIPSIS = 399, /* "'...'" */ 211 T_COALESCE = 400, /* "'??'" */ 212 T_POW = 401, /* "'**'" */ 213 T_POW_EQUAL = 402, /* "'**='" */ 214 T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG = 403, /* "'&'" */ 215 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG = 404, /* "amp" */ 216 T_BAD_CHARACTER = 405, /* "invalid character" */ 217 T_ERROR = 406 /* T_ERROR */ 218 }; 219 typedef enum zendtokentype zendtoken_kind_t; 220 #endif 221 222 /* Value type. */ 223 #if ! defined ZENDSTYPE && ! defined ZENDSTYPE_IS_DECLARED 224 typedef zend_parser_stack_elem ZENDSTYPE; 225 # define ZENDSTYPE_IS_TRIVIAL 1 226 # define ZENDSTYPE_IS_DECLARED 1 227 #endif 228 229 230 231 232 ZEND_API int zendparse (void); 233 234 235 #endif /* !YY_ZEND_ZEND_ZEND_LANGUAGE_PARSER_H_INCLUDED */ 236