PHP  
 PHP: Test and Code Coverage Analysis
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

LCOV - code coverage report
Current view: top level - Zend - zend_language_parser.y (source / functions) Hit Total Coverage
Test: PHP Code Coverage Lines: 634 664 95.5 %
Date: 2014-04-16 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : %{
       2             : /*
       3             :    +----------------------------------------------------------------------+
       4             :    | Zend Engine                                                          |
       5             :    +----------------------------------------------------------------------+
       6             :    | Copyright (c) 1998-2014 Zend Technologies Ltd. (http://www.zend.com) |
       7             :    +----------------------------------------------------------------------+
       8             :    | This source file is subject to version 2.00 of the Zend license,     |
       9             :    | that is bundled with this package in the file LICENSE, and is        |
      10             :    | available through the world-wide-web at the following url:           |
      11             :    | http://www.zend.com/license/2_00.txt.                                |
      12             :    | If you did not receive a copy of the Zend license and are unable to  |
      13             :    | obtain it through the world-wide-web, please send a note to          |
      14             :    | license@zend.com so we can mail you a copy immediately.              |
      15             :    +----------------------------------------------------------------------+
      16             :    | Authors: Andi Gutmans <andi@zend.com>                                |
      17             :    |          Zeev Suraski <zeev@zend.com>                                |
      18             :    +----------------------------------------------------------------------+
      19             : */
      20             : 
      21             : /* $Id$ */
      22             : 
      23             : /*
      24             :  * LALR shift/reduce conflicts and how they are resolved:
      25             :  *
      26             :  * - 2 shift/reduce conflicts due to the dangling elseif/else ambiguity. Solved by shift.
      27             :  *
      28             :  */
      29             : 
      30             : 
      31             : #include "zend_compile.h"
      32             : #include "zend.h"
      33             : #include "zend_list.h"
      34             : #include "zend_globals.h"
      35             : #include "zend_API.h"
      36             : #include "zend_constants.h"
      37             : 
      38             : #define YYSIZE_T size_t
      39             : #define yytnamerr zend_yytnamerr
      40             : static YYSIZE_T zend_yytnamerr(char*, const char*);
      41             : 
      42             : #define YYERROR_VERBOSE
      43             : #define YYSTYPE znode
      44             : 
      45             : %}
      46             : 
      47             : %pure_parser
      48             : %expect 3
      49             : 
      50             : %code requires {
      51             : #ifdef ZTS
      52             : # define YYPARSE_PARAM tsrm_ls
      53             : # define YYLEX_PARAM tsrm_ls
      54             : #endif
      55             : }
      56             : 
      57             : %token END 0 "end of file"
      58             : %left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
      59             : %token T_INCLUDE      "include (T_INCLUDE)"
      60             : %token T_INCLUDE_ONCE "include_once (T_INCLUDE_ONCE)"
      61             : %token T_EVAL         "eval (T_EVAL)"
      62             : %token T_REQUIRE      "require (T_REQUIRE)"
      63             : %token T_REQUIRE_ONCE "require_once (T_REQUIRE_ONCE)"
      64             : %left ','
      65             : %left T_LOGICAL_OR
      66             : %token T_LOGICAL_OR   "or (T_LOGICAL_OR)"
      67             : %left T_LOGICAL_XOR
      68             : %token T_LOGICAL_XOR  "xor (T_LOGICAL_XOR)"
      69             : %left T_LOGICAL_AND
      70             : %token T_LOGICAL_AND  "and (T_LOGICAL_AND)"
      71             : %right T_PRINT
      72             : %token T_PRINT        "print (T_PRINT)"
      73             : %right T_YIELD
      74             : %token T_YIELD        "yield (T_YIELD)"
      75             : %left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL T_POW_EQUAL
      76             : %token T_PLUS_EQUAL   "+= (T_PLUS_EQUAL)"
      77             : %token T_MINUS_EQUAL  "-= (T_MINUS_EQUAL)"
      78             : %token T_MUL_EQUAL    "*= (T_MUL_EQUAL)"
      79             : %token T_DIV_EQUAL    "/= (T_DIV_EQUAL)"
      80             : %token T_CONCAT_EQUAL ".= (T_CONCAT_EQUAL)"
      81             : %token T_MOD_EQUAL    "%= (T_MOD_EQUAL)"
      82             : %token T_AND_EQUAL    "&= (T_AND_EQUAL)"
      83             : %token T_OR_EQUAL     "|= (T_OR_EQUAL)"
      84             : %token T_XOR_EQUAL    "^= (T_XOR_EQUAL)"
      85             : %token T_SL_EQUAL     "<<= (T_SL_EQUAL)"
      86             : %token T_SR_EQUAL     ">>= (T_SR_EQUAL)"
      87             : %left '?' ':'
      88             : %left T_BOOLEAN_OR
      89             : %token T_BOOLEAN_OR   "|| (T_BOOLEAN_OR)"
      90             : %left T_BOOLEAN_AND 
      91             : %token T_BOOLEAN_AND  "&& (T_BOOLEAN_AND)"
      92             : %left '|'
      93             : %left '^'
      94             : %left '&'
      95             : %nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL
      96             : %token T_IS_EQUAL     "== (T_IS_EQUAL)"
      97             : %token T_IS_NOT_EQUAL "!= (T_IS_NOT_EQUAL)"
      98             : %token T_IS_IDENTICAL "=== (T_IS_IDENTICAL)"
      99             : %token T_IS_NOT_IDENTICAL "!== (T_IS_NOT_IDENTICAL)"
     100             : %nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL
     101             : %token T_IS_SMALLER_OR_EQUAL "<= (T_IS_SMALLER_OR_EQUAL)"
     102             : %token T_IS_GREATER_OR_EQUAL ">= (T_IS_GREATER_OR_EQUAL)"
     103             : %left T_SL T_SR
     104             : %token T_SL "<< (T_SL)"
     105             : %token T_SR ">> (T_SR)"
     106             : %left '+' '-' '.'
     107             : %left '*' '/' '%'
     108             : %right '!'
     109             : %nonassoc T_INSTANCEOF
     110             : %token T_INSTANCEOF  "instanceof (T_INSTANCEOF)"
     111             : %right '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@'
     112             : %right T_POW
     113             : %token T_INC "++ (T_INC)"
     114             : %token T_DEC "-- (T_DEC)"
     115             : %token T_INT_CAST    "(int) (T_INT_CAST)"
     116             : %token T_DOUBLE_CAST "(double) (T_DOUBLE_CAST)"
     117             : %token T_STRING_CAST "(string) (T_STRING_CAST)"
     118             : %token T_ARRAY_CAST  "(array) (T_ARRAY_CAST)"
     119             : %token T_OBJECT_CAST "(object) (T_OBJECT_CAST)"
     120             : %token T_BOOL_CAST   "(bool) (T_BOOL_CAST)"
     121             : %token T_UNSET_CAST  "(unset) (T_UNSET_CAST)"
     122             : %right '['
     123             : %nonassoc T_NEW T_CLONE
     124             : %token T_NEW       "new (T_NEW)"
     125             : %token T_CLONE     "clone (T_CLONE)"
     126             : %token T_EXIT      "exit (T_EXIT)"
     127             : %token T_IF        "if (T_IF)"
     128             : %left T_ELSEIF
     129             : %token T_ELSEIF    "elseif (T_ELSEIF)"
     130             : %left T_ELSE 
     131             : %token T_ELSE      "else (T_ELSE)"
     132             : %left T_ENDIF 
     133             : %token T_ENDIF     "endif (T_ENDIF)"
     134             : %token T_LNUMBER   "integer number (T_LNUMBER)"
     135             : %token T_DNUMBER   "floating-point number (T_DNUMBER)"
     136             : %token T_STRING    "identifier (T_STRING)"
     137             : %token T_STRING_VARNAME "variable name (T_STRING_VARNAME)"
     138             : %token T_VARIABLE  "variable (T_VARIABLE)"
     139             : %token T_NUM_STRING "number (T_NUM_STRING)"
     140             : %token T_INLINE_HTML
     141             : %token T_CHARACTER
     142             : %token T_BAD_CHARACTER
     143             : %token T_ENCAPSED_AND_WHITESPACE  "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
     144             : %token T_CONSTANT_ENCAPSED_STRING "quoted-string (T_CONSTANT_ENCAPSED_STRING)"
     145             : %token T_ECHO       "echo (T_ECHO)"
     146             : %token T_DO         "do (T_DO)"
     147             : %token T_WHILE      "while (T_WHILE)"
     148             : %token T_ENDWHILE   "endwhile (T_ENDWHILE)"
     149             : %token T_FOR        "for (T_FOR)"
     150             : %token T_ENDFOR     "endfor (T_ENDFOR)"
     151             : %token T_FOREACH    "foreach (T_FOREACH)"
     152             : %token T_ENDFOREACH "endforeach (T_ENDFOREACH)"
     153             : %token T_DECLARE    "declare (T_DECLARE)"
     154             : %token T_ENDDECLARE "enddeclare (T_ENDDECLARE)"
     155             : %token T_AS         "as (T_AS)"
     156             : %token T_SWITCH     "switch (T_SWITCH)"
     157             : %token T_ENDSWITCH  "endswitch (T_ENDSWITCH)"
     158             : %token T_CASE       "case (T_CASE)"
     159             : %token T_DEFAULT    "default (T_DEFAULT)"
     160             : %token T_BREAK      "break (T_BREAK)"
     161             : %token T_CONTINUE   "continue (T_CONTINUE)"
     162             : %token T_GOTO       "goto (T_GOTO)"
     163             : %token T_FUNCTION   "function (T_FUNCTION)"
     164             : %token T_CONST      "const (T_CONST)"
     165             : %token T_RETURN     "return (T_RETURN)"
     166             : %token T_TRY        "try (T_TRY)"
     167             : %token T_CATCH      "catch (T_CATCH)"
     168             : %token T_FINALLY    "finally (T_FINALLY)"
     169             : %token T_THROW      "throw (T_THROW)"
     170             : %token T_USE        "use (T_USE)"
     171             : %token T_INSTEADOF  "insteadof (T_INSTEADOF)"
     172             : %token T_GLOBAL     "global (T_GLOBAL)"
     173             : %right T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC
     174             : %token T_STATIC     "static (T_STATIC)"
     175             : %token T_ABSTRACT   "abstract (T_ABSTRACT)"
     176             : %token T_FINAL      "final (T_FINAL)"
     177             : %token T_PRIVATE    "private (T_PRIVATE)"
     178             : %token T_PROTECTED  "protected (T_PROTECTED)"
     179             : %token T_PUBLIC     "public (T_PUBLIC)"
     180             : %token T_VAR        "var (T_VAR)"
     181             : %token T_UNSET      "unset (T_UNSET)"
     182             : %token T_ISSET      "isset (T_ISSET)"
     183             : %token T_EMPTY      "empty (T_EMPTY)"
     184             : %token T_HALT_COMPILER "__halt_compiler (T_HALT_COMPILER)"
     185             : %token T_CLASS      "class (T_CLASS)"
     186             : %token T_TRAIT      "trait (T_TRAIT)"
     187             : %token T_INTERFACE  "interface (T_INTERFACE)"
     188             : %token T_EXTENDS    "extends (T_EXTENDS)"
     189             : %token T_IMPLEMENTS "implements (T_IMPLEMENTS)"
     190             : %token T_OBJECT_OPERATOR "-> (T_OBJECT_OPERATOR)"
     191             : %token T_DOUBLE_ARROW    "=> (T_DOUBLE_ARROW)"
     192             : %token T_LIST            "list (T_LIST)"
     193             : %token T_ARRAY           "array (T_ARRAY)"
     194             : %token T_CALLABLE        "callable (T_CALLABLE)"
     195             : %token T_CLASS_C         "__CLASS__ (T_CLASS_C)"
     196             : %token T_TRAIT_C         "__TRAIT__ (T_TRAIT_C)"
     197             : %token T_METHOD_C        "__METHOD__ (T_METHOD_C)"
     198             : %token T_FUNC_C          "__FUNCTION__ (T_FUNC_C)"
     199             : %token T_LINE            "__LINE__ (T_LINE)"
     200             : %token T_FILE            "__FILE__ (T_FILE)"
     201             : %token T_COMMENT         "comment (T_COMMENT)"
     202             : %token T_DOC_COMMENT     "doc comment (T_DOC_COMMENT)"
     203             : %token T_OPEN_TAG        "open tag (T_OPEN_TAG)"
     204             : %token T_OPEN_TAG_WITH_ECHO "open tag with echo (T_OPEN_TAG_WITH_ECHO)"
     205             : %token T_CLOSE_TAG       "close tag (T_CLOSE_TAG)"
     206             : %token T_WHITESPACE      "whitespace (T_WHITESPACE)"
     207             : %token T_START_HEREDOC   "heredoc start (T_START_HEREDOC)"
     208             : %token T_END_HEREDOC     "heredoc end (T_END_HEREDOC)"
     209             : %token T_DOLLAR_OPEN_CURLY_BRACES "${ (T_DOLLAR_OPEN_CURLY_BRACES)"
     210             : %token T_CURLY_OPEN      "{$ (T_CURLY_OPEN)"
     211             : %token T_PAAMAYIM_NEKUDOTAYIM ":: (T_PAAMAYIM_NEKUDOTAYIM)"
     212             : %token T_NAMESPACE       "namespace (T_NAMESPACE)"
     213             : %token T_NS_C            "__NAMESPACE__ (T_NS_C)"
     214             : %token T_DIR             "__DIR__ (T_DIR)"
     215             : %token T_NS_SEPARATOR    "\\ (T_NS_SEPARATOR)"
     216             : %token T_ELLIPSIS        "... (T_ELLIPSIS)"
     217             : %token T_POW             "** (T_POW)"
     218             : %token T_POW_EQUAL       "**= (T_POW_EQUAL)"
     219             : 
     220             : %% /* Rules */
     221             : 
     222             : start:
     223       31473 :         top_statement_list      { zend_do_end_compilation(TSRMLS_C); }
     224       31473 : ;
     225             : 
     226             : top_statement_list:
     227      463110 :                 top_statement_list  { zend_do_extended_info(TSRMLS_C); } top_statement { HANDLE_INTERACTIVE(); }
     228      463110 :         |       /* empty */
     229             : ;
     230             : 
     231             : namespace_name:
     232      409246 :                 T_STRING { $$ = $1; }
     233      409246 :         |       namespace_name T_NS_SEPARATOR T_STRING { zend_do_build_namespace_name(&$$, &$1, &$3 TSRMLS_CC); }
     234         346 : ;
     235             : 
     236             : top_statement:
     237      210578 :                 statement                                               { zend_verify_namespace(TSRMLS_C); }
     238      210577 :         |       function_declaration_statement  { zend_verify_namespace(TSRMLS_C); zend_do_early_binding(TSRMLS_C); }
     239       13948 :         |       class_declaration_statement             { zend_verify_namespace(TSRMLS_C); zend_do_early_binding(TSRMLS_C); }
     240        6392 :         |       T_HALT_COMPILER '(' ')' ';'             { zend_do_halt_compiler_register(TSRMLS_C); YYACCEPT; }
     241         129 :         |       T_NAMESPACE namespace_name ';'  { zend_do_begin_namespace(&$2, 0 TSRMLS_CC); }
     242         127 :         |       T_NAMESPACE namespace_name '{'  { zend_do_begin_namespace(&$2, 1 TSRMLS_CC); }
     243          40 :                 top_statement_list '}'              { zend_do_end_namespace(TSRMLS_C); }
     244          32 :         |       T_NAMESPACE '{'                                 { zend_do_begin_namespace(NULL, 1 TSRMLS_CC); }
     245          30 :                 top_statement_list '}'                  { zend_do_end_namespace(TSRMLS_C); }
     246          23 :         |       T_USE use_declarations ';'      { zend_verify_namespace(TSRMLS_C); }
     247          48 :         |       T_USE T_FUNCTION use_function_declarations ';' { zend_verify_namespace(TSRMLS_C); }
     248          14 :         |       T_USE T_CONST use_const_declarations ';'       { zend_verify_namespace(TSRMLS_C); }
     249          12 :         |       constant_declaration ';'                { zend_verify_namespace(TSRMLS_C); }
     250         129 : ;
     251             : 
     252             : use_declarations:
     253             :                 use_declarations ',' use_declaration
     254             :         |       use_declaration
     255             : ;
     256             : 
     257             : use_declaration:
     258          10 :                 namespace_name                  { zend_do_use(&$1, NULL, 0 TSRMLS_CC); }
     259           9 :         |       namespace_name T_AS T_STRING    { zend_do_use(&$1, &$3, 0 TSRMLS_CC); }
     260          27 :         |       T_NS_SEPARATOR namespace_name { zend_do_use(&$2, NULL, 1 TSRMLS_CC); }
     261          10 :         |       T_NS_SEPARATOR namespace_name T_AS T_STRING { zend_do_use(&$2, &$4, 1 TSRMLS_CC); }
     262           4 : ;
     263             : 
     264             : use_function_declarations:
     265             :                 use_function_declarations ',' use_function_declaration
     266             :         |       use_function_declaration
     267             : ;
     268             : 
     269             : use_function_declaration:
     270          14 :                 namespace_name                  { zend_do_use_function(&$1, NULL, 0 TSRMLS_CC); }
     271          11 :         |       namespace_name T_AS T_STRING    { zend_do_use_function(&$1, &$3, 0 TSRMLS_CC); }
     272           6 :         |       T_NS_SEPARATOR namespace_name { zend_do_use_function(&$2, NULL, 1 TSRMLS_CC); }
     273           0 :         |       T_NS_SEPARATOR namespace_name T_AS T_STRING { zend_do_use_function(&$2, &$4, 1 TSRMLS_CC); }
     274           0 : ;
     275             : 
     276             : use_const_declarations:
     277             :                 use_const_declarations ',' use_const_declaration
     278             :         |       use_const_declaration
     279             : ;
     280             : 
     281             : use_const_declaration:
     282          11 :                 namespace_name                  { zend_do_use_const(&$1, NULL, 0 TSRMLS_CC); }
     283           9 :         |       namespace_name T_AS T_STRING    { zend_do_use_const(&$1, &$3, 0 TSRMLS_CC); }
     284           6 :         |       T_NS_SEPARATOR namespace_name { zend_do_use_const(&$2, NULL, 1 TSRMLS_CC); }
     285           0 :         |       T_NS_SEPARATOR namespace_name T_AS T_STRING { zend_do_use_const(&$2, &$4, 1 TSRMLS_CC); }
     286           0 : ;
     287             : 
     288             : constant_declaration:
     289           1 :                 constant_declaration ',' T_STRING '=' static_scalar     { zend_do_declare_constant(&$3, &$5 TSRMLS_CC); }
     290           1 :         |       T_CONST T_STRING '=' static_scalar { zend_do_declare_constant(&$2, &$4 TSRMLS_CC); }
     291         129 : ;
     292             : 
     293             : inner_statement_list:
     294      519951 :                 inner_statement_list  { zend_do_extended_info(TSRMLS_C); } inner_statement { HANDLE_INTERACTIVE(); }
     295      519951 :         |       /* empty */
     296             : ;
     297             : 
     298             : 
     299             : inner_statement:
     300             :                 statement
     301             :         |       function_declaration_statement
     302             :         |       class_declaration_statement
     303           1 :         |       T_HALT_COMPILER '(' ')' ';'   { zend_error_noreturn(E_COMPILE_ERROR, "__HALT_COMPILER() can only be used from the outermost scope"); }
     304             : ;
     305             : 
     306             : 
     307             : statement:
     308      579420 :                 unticked_statement { DO_TICKS(); }
     309      579420 :         |       T_STRING ':' { zend_do_label(&$1 TSRMLS_CC); }
     310          35 : ;
     311             : 
     312             : unticked_statement:
     313             :                 '{' inner_statement_list '}'
     314      230207 :         |       T_IF parenthesis_expr { zend_do_if_cond(&$2, &$1 TSRMLS_CC); } statement { zend_do_if_after_statement(&$1, 1 TSRMLS_CC); } elseif_list else_single { zend_do_if_end(TSRMLS_C); }
     315      230215 :         |       T_IF parenthesis_expr ':' { zend_do_if_cond(&$2, &$1 TSRMLS_CC); } inner_statement_list { zend_do_if_after_statement(&$1, 1 TSRMLS_CC); } new_elseif_list new_else_single T_ENDIF ';' { zend_do_if_end(TSRMLS_C); }
     316        4180 :         |       T_WHILE { $1.u.op.opline_num = get_next_op_number(CG(active_op_array)); } parenthesis_expr { zend_do_while_cond(&$3, &$$ TSRMLS_CC); } while_statement { zend_do_while_end(&$1, &$4 TSRMLS_CC); }
     317        6832 :         |       T_DO { $1.u.op.opline_num = get_next_op_number(CG(active_op_array));  zend_do_do_while_begin(TSRMLS_C); } statement T_WHILE { $4.u.op.opline_num = get_next_op_number(CG(active_op_array)); } parenthesis_expr ';' { zend_do_do_while_end(&$1, &$4, &$6 TSRMLS_CC); }
     318         870 :         |       T_FOR
     319             :                         '('
     320             :                                 for_expr
     321        2093 :                         ';' { zend_do_free(&$3 TSRMLS_CC); $4.u.op.opline_num = get_next_op_number(CG(active_op_array)); }
     322        2093 :                                 for_expr
     323        2093 :                         ';' { zend_do_extended_info(TSRMLS_C); zend_do_for_cond(&$6, &$7 TSRMLS_CC); }
     324        2093 :                                 for_expr
     325        2093 :                         ')' { zend_do_free(&$9 TSRMLS_CC); zend_do_for_before_statement(&$4, &$7 TSRMLS_CC); }
     326        2093 :                         for_statement { zend_do_for_end(&$7 TSRMLS_CC); }
     327        2555 :         |       T_SWITCH parenthesis_expr       { zend_do_switch_cond(&$2 TSRMLS_CC); } switch_case_list { zend_do_switch_end(&$4 TSRMLS_CC); }
     328         924 :         |       T_BREAK ';'                             { zend_do_brk_cont(ZEND_BRK, NULL TSRMLS_CC); }
     329        1855 :         |       T_BREAK expr ';'                { zend_do_brk_cont(ZEND_BRK, &$2 TSRMLS_CC); }
     330          14 :         |       T_CONTINUE ';'                  { zend_do_brk_cont(ZEND_CONT, NULL TSRMLS_CC); }
     331         274 :         |       T_CONTINUE expr ';'             { zend_do_brk_cont(ZEND_CONT, &$2 TSRMLS_CC); }
     332           1 :         |       T_RETURN ';'                                            { zend_do_return(NULL, 0 TSRMLS_CC); }
     333         211 :         |       T_RETURN expr_without_variable ';'      { zend_do_return(&$2, 0 TSRMLS_CC); }
     334       24284 :         |       T_RETURN variable ';'                           { zend_do_return(&$2, 1 TSRMLS_CC); }
     335       20113 :         |       yield_expr ';' { zend_do_free(&$1 TSRMLS_CC); }
     336          68 :         |       T_GLOBAL global_var_list ';'
     337             :         |       T_STATIC static_var_list ';'
     338             :         |       T_ECHO echo_expr_list ';'
     339        3731 :         |       T_INLINE_HTML                   { zend_do_echo(&$1 TSRMLS_CC); }
     340        3731 :         |       expr ';'                                { zend_do_free(&$1 TSRMLS_CC); }
     341      282545 :         |       T_UNSET '(' unset_variables ')' ';'
     342             :         |       T_FOREACH '(' variable T_AS
     343       10821 :                 { zend_do_foreach_begin(&$1, &$2, &$3, &$4, 1 TSRMLS_CC); }
     344       10821 :                 foreach_variable foreach_optional_arg ')' { zend_do_foreach_cont(&$1, &$2, &$4, &$6, &$7 TSRMLS_CC); }
     345       10814 :                 foreach_statement { zend_do_foreach_end(&$1, &$4 TSRMLS_CC); }
     346       10814 :         |       T_FOREACH '(' expr_without_variable T_AS
     347         309 :                 { zend_do_foreach_begin(&$1, &$2, &$3, &$4, 0 TSRMLS_CC); }
     348         309 :                 foreach_variable foreach_optional_arg ')' { zend_do_foreach_cont(&$1, &$2, &$4, &$6, &$7 TSRMLS_CC); }
     349         309 :                 foreach_statement { zend_do_foreach_end(&$1, &$4 TSRMLS_CC); }
     350         332 :         |       T_DECLARE { $1.u.op.opline_num = get_next_op_number(CG(active_op_array)); zend_do_declare_begin(TSRMLS_C); } '(' declare_list ')' declare_statement { zend_do_declare_end(&$1 TSRMLS_CC); }
     351          49 :         |       ';'             /* empty statement */
     352        2139 :         |       T_TRY { zend_do_try(&$1 TSRMLS_CC); } '{' inner_statement_list '}'
     353        2139 :                 catch_statement { zend_do_bind_catch(&$1, &$6 TSRMLS_CC); }
     354        2139 :                 finally_statement { zend_do_end_finally(&$1, &$6, &$8 TSRMLS_CC); }
     355        2138 :         |       T_THROW expr ';' { zend_do_throw(&$2 TSRMLS_CC); }
     356         317 :         |       T_GOTO T_STRING ';' { zend_do_goto(&$2 TSRMLS_CC); }
     357          33 : ;
     358             : 
     359             : catch_statement:
     360          37 :                                 /* empty */ { $$.op_type = IS_UNUSED; }
     361          37 :         |       T_CATCH '(' { zend_initialize_try_catch_element(&$1 TSRMLS_CC); } 
     362        2102 :                 fully_qualified_class_name { zend_do_first_catch(&$2 TSRMLS_CC); }
     363        2102 :                 T_VARIABLE ')' { zend_do_begin_catch(&$1, &$4, &$6, &$2 TSRMLS_CC); }
     364        2102 :                 '{' inner_statement_list '}' { zend_do_end_catch(&$1 TSRMLS_CC); }
     365        2102 :                 additional_catches { zend_do_mark_last_catch(&$2, &$13 TSRMLS_CC); $$ = $1;}
     366        2102 : 
     367             : finally_statement:
     368        2079 :                                         /* empty */ { $$.op_type = IS_UNUSED; }
     369        2139 :         |       T_FINALLY { zend_do_finally(&$1 TSRMLS_CC); } '{' inner_statement_list '}' { $$ = $1; }
     370         120 : ;
     371             : 
     372             : additional_catches:
     373          11 :                 non_empty_additional_catches { $$ = $1; }
     374          11 :         |       /* empty */ { $$.u.op.opline_num = -1; }
     375        2091 : ;
     376             : 
     377             : non_empty_additional_catches:
     378          11 :                 additional_catch { $$ = $1; }
     379          11 :         |       non_empty_additional_catches additional_catch { $$ = $2; }
     380           0 : ;
     381             : 
     382             : additional_catch:
     383          33 :         T_CATCH '(' fully_qualified_class_name { $$.u.op.opline_num = get_next_op_number(CG(active_op_array)); } T_VARIABLE ')' { zend_do_begin_catch(&$1, &$3, &$5, NULL TSRMLS_CC); } '{' inner_statement_list '}' { zend_do_end_catch(&$1 TSRMLS_CC); }
     384          33 : ;
     385             : 
     386             : unset_variables:
     387             :                 unset_variable
     388             :         |       unset_variables ',' unset_variable
     389             : ;
     390             : 
     391             : unset_variable:
     392        1606 :                 variable        { zend_do_end_variable_parse(&$1, BP_VAR_UNSET, 0 TSRMLS_CC); zend_do_unset(&$1 TSRMLS_CC); }
     393        1605 : ;
     394             : 
     395             : function_declaration_statement:
     396       18847 :                 unticked_function_declaration_statement { DO_TICKS(); }
     397       18847 : ;
     398             : 
     399             : class_declaration_statement:
     400        7358 :                 unticked_class_declaration_statement    { DO_TICKS(); }
     401        7358 : ;
     402             : 
     403             : is_reference:
     404      121790 :                 /* empty */     { $$.op_type = 0; }
     405      121790 :         |       '&'                 { $$.op_type = 1; }
     406        1078 : ;
     407             : 
     408             : is_variadic:
     409       85916 :                 /* empty */ { $$.op_type = 0; }
     410       85916 :         |       T_ELLIPSIS  { $$.op_type = 1; }
     411          36 : ;
     412             : 
     413             : unticked_function_declaration_statement:
     414       18865 :                 function is_reference T_STRING { zend_do_begin_function_declaration(&$1, &$3, 0, $2.op_type, NULL TSRMLS_CC); }
     415       18864 :                 '(' parameter_list ')'
     416       18857 :                 '{' inner_statement_list '}' { zend_do_end_function_declaration(&$1 TSRMLS_CC); }
     417       18847 : ;
     418             : 
     419             : unticked_class_declaration_statement:
     420             :                 class_entry_type T_STRING extends_from
     421        7255 :                         { zend_do_begin_class_declaration(&$1, &$2, &$3 TSRMLS_CC); }
     422        7248 :                         implements_list
     423             :                         '{'
     424             :                                 class_statement_list
     425        7186 :                         '}' { zend_do_end_class_declaration(&$1, &$3 TSRMLS_CC); }
     426        7177 :         |       interface_entry T_STRING
     427         185 :                         { zend_do_begin_class_declaration(&$1, &$2, NULL TSRMLS_CC); }
     428         185 :                         interface_extends_list
     429             :                         '{'
     430             :                                 class_statement_list
     431         181 :                         '}' { zend_do_end_class_declaration(&$1, NULL TSRMLS_CC); }
     432         181 : ;
     433             : 
     434             : 
     435             : class_entry_type:
     436        6942 :                 T_CLASS                 { $$.u.op.opline_num = CG(zend_lineno); $$.EA = 0; }
     437        6942 :         |       T_ABSTRACT T_CLASS { $$.u.op.opline_num = CG(zend_lineno); $$.EA = ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; }
     438          92 :         |       T_TRAIT { $$.u.op.opline_num = CG(zend_lineno); $$.EA = ZEND_ACC_TRAIT; }
     439         208 :         |       T_FINAL T_CLASS { $$.u.op.opline_num = CG(zend_lineno); $$.EA = ZEND_ACC_FINAL_CLASS; }
     440          15 : ;
     441             : 
     442             : extends_from:
     443        4935 :                 /* empty */                                     { $$.op_type = IS_UNUSED; }
     444        4935 :         |       T_EXTENDS fully_qualified_class_name    { zend_do_fetch_class(&$$, &$2 TSRMLS_CC); }
     445        2320 : ;
     446             : 
     447             : interface_entry:
     448         186 :         T_INTERFACE             { $$.u.op.opline_num = CG(zend_lineno); $$.EA = ZEND_ACC_INTERFACE; }
     449         186 : ;
     450             : 
     451             : interface_extends_list:
     452             :                 /* empty */
     453             :         |       T_EXTENDS interface_list
     454             : ;
     455             : 
     456             : implements_list:
     457             :                 /* empty */
     458             :         |       T_IMPLEMENTS interface_list
     459             : ;
     460             : 
     461             : interface_list:
     462         330 :                 fully_qualified_class_name                      { zend_do_implements_interface(&$1 TSRMLS_CC); }
     463         327 :         |       interface_list ',' fully_qualified_class_name { zend_do_implements_interface(&$3 TSRMLS_CC); }
     464          40 : ;
     465             : 
     466             : foreach_optional_arg:
     467        6187 :                 /* empty */                                             { $$.op_type = IS_UNUSED; }
     468        6187 :         |       T_DOUBLE_ARROW foreach_variable { $$ = $2; }
     469        4943 : ;
     470             : 
     471             : foreach_variable:
     472       15987 :                 variable                        { zend_check_writable_variable(&$1); $$ = $1; }
     473       15987 :         |       '&' variable                { zend_check_writable_variable(&$2); $$ = $2;  $$.EA |= ZEND_PARSED_REFERENCE_VARIABLE; }
     474          86 :         |       T_LIST '(' { zend_do_list_init(TSRMLS_C); } assignment_list ')' { $$ = $1; $$.EA = ZEND_PARSED_LIST_EXPR; }
     475          18 : ;
     476             : 
     477             : for_statement:
     478             :                 statement
     479             :         |       ':' inner_statement_list T_ENDFOR ';'
     480             : ;
     481             : 
     482             : 
     483             : foreach_statement:
     484             :                 statement
     485             :         |       ':' inner_statement_list T_ENDFOREACH ';'
     486             : ;
     487             : 
     488             : 
     489             : declare_statement:
     490             :                 statement
     491             :         |       ':' inner_statement_list T_ENDDECLARE ';'
     492             : ;
     493             : 
     494             : 
     495             : declare_list:
     496          26 :                 T_STRING '=' static_scalar                                      { zend_do_declare_stmt(&$1, &$3 TSRMLS_CC); }
     497          23 :         |       declare_list ',' T_STRING '=' static_scalar     { zend_do_declare_stmt(&$3, &$5 TSRMLS_CC); }
     498           0 : ;
     499             : 
     500             : 
     501             : switch_case_list:
     502         461 :                 '{' case_list '}'                                       { $$ = $2; }
     503         461 :         |       '{' ';' case_list '}'                           { $$ = $3; }
     504           0 :         |       ':' case_list T_ENDSWITCH ';'           { $$ = $2; }
     505           1 :         |       ':' ';' case_list T_ENDSWITCH ';'       { $$ = $3; }
     506           0 : ;
     507             : 
     508             : 
     509             : case_list:
     510         462 :                 /* empty */     { $$.op_type = IS_UNUSED; }
     511        2077 :         |       case_list T_CASE expr case_separator { zend_do_extended_info(TSRMLS_C);  zend_do_case_before_statement(&$1, &$2, &$3 TSRMLS_CC); } inner_statement_list { zend_do_case_after_statement(&$$, &$2 TSRMLS_CC); $$.op_type = IS_CONST; }
     512        3504 :         |       case_list T_DEFAULT case_separator { zend_do_extended_info(TSRMLS_C);  zend_do_default_before_statement(&$1, &$2 TSRMLS_CC); } inner_statement_list { zend_do_case_after_statement(&$$, &$2 TSRMLS_CC); $$.op_type = IS_CONST; }
     513         548 : ;
     514             : 
     515             : 
     516             : case_separator:
     517             :                 ':'
     518             :         |       ';'
     519             : ;
     520             : 
     521             : 
     522             : while_statement:
     523             :                 statement
     524             :         |       ':' inner_statement_list T_ENDWHILE ';'
     525             : ;
     526             : 
     527             : 
     528             : 
     529             : elseif_list:
     530             :                 /* empty */
     531        3748 :         |       elseif_list T_ELSEIF parenthesis_expr { zend_do_if_cond(&$3, &$2 TSRMLS_CC); } statement { zend_do_if_after_statement(&$2, 0 TSRMLS_CC); }
     532        3748 : ;
     533             : 
     534             : 
     535             : new_elseif_list:
     536             :                 /* empty */
     537           2 :         |       new_elseif_list T_ELSEIF parenthesis_expr ':' { zend_do_if_cond(&$3, &$2 TSRMLS_CC); } inner_statement_list { zend_do_if_after_statement(&$2, 0 TSRMLS_CC); }
     538           2 : ;
     539             : 
     540             : 
     541             : else_single:
     542             :                 /* empty */
     543             :         |       T_ELSE statement
     544             : ;
     545             : 
     546             : 
     547             : new_else_single:
     548             :                 /* empty */
     549             :         |       T_ELSE ':' inner_statement_list
     550             : ;
     551             : 
     552             : 
     553             : parameter_list:
     554             :                 non_empty_parameter_list
     555             :         |       /* empty */
     556             : ;
     557             : 
     558             : 
     559             : non_empty_parameter_list:
     560             :                 parameter
     561             :         |       non_empty_parameter_list ',' parameter
     562             : ;
     563             : 
     564             : parameter:
     565             :                 optional_class_type is_reference is_variadic T_VARIABLE
     566       71016 :                         { zend_do_receive_param(ZEND_RECV, &$4, NULL, &$1, $2.op_type, $3.op_type TSRMLS_CC); }
     567       71013 :         |       optional_class_type is_reference is_variadic T_VARIABLE '=' static_scalar
     568       14934 :                         { zend_do_receive_param(ZEND_RECV_INIT, &$4, &$6, &$1, $2.op_type, $3.op_type TSRMLS_CC); }
     569       14931 : ;
     570             : 
     571             : 
     572             : optional_class_type:
     573       85548 :                 /* empty */                                     { $$.op_type = IS_UNUSED; }
     574       85548 :         |       T_ARRAY                                         { $$.op_type = IS_CONST; Z_TYPE($$.u.constant)=IS_ARRAY; }
     575         218 :         |       T_CALLABLE                                      { $$.op_type = IS_CONST; Z_TYPE($$.u.constant)=IS_CALLABLE; }
     576           8 :         |       fully_qualified_class_name                      { $$ = $1; }
     577         178 : ;
     578             : 
     579             : 
     580             : function_call_parameter_list:
     581       39880 :                 '(' ')' { Z_LVAL($$.u.constant) = 0; }
     582       39880 :         |       '(' non_empty_function_call_parameter_list ')'  { $$ = $2; }
     583      302299 :         |       '(' yield_expr ')'      { zend_do_pass_param(&$2, ZEND_SEND_VAL TSRMLS_CC); }
     584           5 : ;
     585             : 
     586             : 
     587             : non_empty_function_call_parameter_list:
     588             :                 function_call_parameter
     589             :         |       non_empty_function_call_parameter_list ',' function_call_parameter
     590             : ;
     591             : 
     592             : function_call_parameter:
     593      251100 :                 expr_without_variable   { zend_do_pass_param(&$1, ZEND_SEND_VAL TSRMLS_CC); }
     594      251092 :         |       variable                                { zend_do_pass_param(&$1, ZEND_SEND_VAR TSRMLS_CC); }
     595      335451 :         |       '&' w_variable                      { zend_do_pass_param(&$2, ZEND_SEND_REF TSRMLS_CC); }
     596           0 :         |       T_ELLIPSIS expr                 { zend_do_unpack_params(&$2 TSRMLS_CC); }
     597          64 : ;
     598             : 
     599             : global_var_list:
     600        1019 :                 global_var_list ',' global_var  { zend_do_fetch_global_variable(&$3, NULL, ZEND_FETCH_GLOBAL_LOCK TSRMLS_CC); }
     601        1019 :         |       global_var                                              { zend_do_fetch_global_variable(&$1, NULL, ZEND_FETCH_GLOBAL_LOCK TSRMLS_CC); }
     602        4424 : ;
     603             : 
     604             : 
     605             : global_var:
     606        5441 :                 T_VARIABLE                      { $$ = $1; }
     607        5441 :         |       '$' r_variable          { $$ = $2; }
     608           1 :         |       '$' '{' expr '}'        { $$ = $3; }
     609           1 : ;
     610             : 
     611             : 
     612             : static_var_list:
     613           2 :                 static_var_list ',' T_VARIABLE { zend_do_fetch_static_variable(&$3, NULL, ZEND_FETCH_STATIC TSRMLS_CC); }
     614           2 :         |       static_var_list ',' T_VARIABLE '=' static_scalar { zend_do_fetch_static_variable(&$3, &$5, ZEND_FETCH_STATIC TSRMLS_CC); }
     615           6 :         |       T_VARIABLE  { zend_do_fetch_static_variable(&$1, NULL, ZEND_FETCH_STATIC TSRMLS_CC); }
     616          18 :         |       T_VARIABLE '=' static_scalar { zend_do_fetch_static_variable(&$1, &$3, ZEND_FETCH_STATIC TSRMLS_CC); }
     617        1993 : 
     618             : ;
     619             : 
     620             : 
     621             : class_statement_list:
     622             :                 class_statement_list class_statement
     623             :         |       /* empty */
     624             : ;
     625             : 
     626             : 
     627             : class_statement:
     628        2319 :                 variable_modifiers { CG(access_type) = Z_LVAL($1.u.constant); } class_variable_declaration ';'
     629        2319 :         |       class_constant_declaration ';'
     630             :         |       trait_use_statement
     631       17782 :         |       method_modifiers function is_reference T_STRING { zend_do_begin_function_declaration(&$2, &$4, 1, $3.op_type, &$1 TSRMLS_CC); }
     632       17780 :                 '(' parameter_list ')'
     633       17769 :                 method_body { zend_do_abstract_method(&$4, &$1, &$9 TSRMLS_CC); zend_do_end_function_declaration(&$2 TSRMLS_CC); }
     634       17750 : ;
     635             : 
     636             : trait_use_statement:
     637             :                 T_USE trait_list trait_adaptations
     638             : ;
     639             : 
     640             : trait_list:
     641         198 :                 fully_qualified_class_name                                              { zend_do_use_trait(&$1 TSRMLS_CC); }
     642         197 :         |       trait_list ',' fully_qualified_class_name               { zend_do_use_trait(&$3 TSRMLS_CC); }
     643          40 : ;
     644             : 
     645             : trait_adaptations:
     646             :                 ';'
     647             :         |       '{' trait_adaptation_list '}'
     648             : ;
     649             : 
     650             : trait_adaptation_list:
     651             :                 /* empty */
     652             :         |       non_empty_trait_adaptation_list
     653             : ;
     654             : 
     655             : non_empty_trait_adaptation_list:
     656             :                 trait_adaptation_statement
     657             :         |       non_empty_trait_adaptation_list trait_adaptation_statement
     658             : ;
     659             : 
     660             : trait_adaptation_statement:
     661             :                 trait_precedence ';'
     662             :         |       trait_alias ';'
     663             : ;
     664             : 
     665             : trait_precedence:
     666          17 :         trait_method_reference_fully_qualified T_INSTEADOF trait_reference_list { zend_add_trait_precedence(&$1, &$3 TSRMLS_CC); }
     667          17 : ;
     668             : 
     669             : trait_reference_list:
     670          17 :                 fully_qualified_class_name                                                                      { zend_resolve_class_name(&$1 TSRMLS_CC); zend_init_list(&$$.u.op.ptr, Z_STRVAL($1.u.constant) TSRMLS_CC); }
     671          17 :         |       trait_reference_list ',' fully_qualified_class_name                     { zend_resolve_class_name(&$3 TSRMLS_CC); zend_add_to_list(&$1.u.op.ptr, Z_STRVAL($3.u.constant) TSRMLS_CC); $$ = $1; }
     672           1 : ;
     673             : 
     674             : trait_method_reference:
     675          36 :                 T_STRING                                                                                                        { zend_prepare_reference(&$$, NULL, &$1 TSRMLS_CC); }
     676          36 :         |       trait_method_reference_fully_qualified                                          { $$ = $1; }
     677          23 : ;
     678             : 
     679             : trait_method_reference_fully_qualified:
     680          40 :         fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING              { zend_prepare_reference(&$$, &$1, &$3 TSRMLS_CC); }
     681          40 : ;
     682             : 
     683             : trait_alias:
     684          48 :                 trait_method_reference T_AS trait_modifiers T_STRING            { zend_add_trait_alias(&$1, &$3, &$4 TSRMLS_CC); }
     685          48 :         |       trait_method_reference T_AS member_modifier                                     { zend_add_trait_alias(&$1, &$3, NULL TSRMLS_CC); }
     686           8 : ;
     687             : 
     688             : trait_modifiers:
     689          44 :                 /* empty */                                     { Z_LVAL($$.u.constant) = 0x0; } /* No change of methods visibility */
     690          44 :         |       member_modifier { $$ = $1; } /* REM: Keep in mind, there are not only visibility modifiers */
     691           4 : ;
     692             : 
     693             : method_body:
     694         165 :                 ';' /* abstract method */               { Z_LVAL($$.u.constant) = ZEND_ACC_ABSTRACT; }
     695         165 :         |       '{' inner_statement_list '}'    { Z_LVAL($$.u.constant) = 0;    }
     696       17604 : ;
     697             : 
     698             : variable_modifiers:
     699        2207 :                 non_empty_member_modifiers              { $$ = $1; }
     700        2207 :         |       T_VAR                                                   { Z_LVAL($$.u.constant) = ZEND_ACC_PUBLIC; }
     701         112 : ;
     702             : 
     703             : method_modifiers:
     704        6934 :                 /* empty */                                                     { Z_LVAL($$.u.constant) = ZEND_ACC_PUBLIC; }
     705        6934 :         |       non_empty_member_modifiers                      { $$ = $1;  if (!(Z_LVAL($$.u.constant) & ZEND_ACC_PPP_MASK)) { Z_LVAL($$.u.constant) |= ZEND_ACC_PUBLIC; } }
     706       10851 : ;
     707             : 
     708             : non_empty_member_modifiers:
     709       13069 :                 member_modifier                                         { $$ = $1; }
     710       13069 :         |       non_empty_member_modifiers member_modifier      { Z_LVAL($$.u.constant) = zend_do_verify_access_types(&$1, &$2); }
     711         688 : ;
     712             : 
     713             : member_modifier:
     714        4498 :                 T_PUBLIC                                { Z_LVAL($$.u.constant) = ZEND_ACC_PUBLIC; }
     715        4498 :         |       T_PROTECTED                             { Z_LVAL($$.u.constant) = ZEND_ACC_PROTECTED; }
     716         584 :         |       T_PRIVATE                               { Z_LVAL($$.u.constant) = ZEND_ACC_PRIVATE; }
     717        1096 :         |       T_STATIC                                { Z_LVAL($$.u.constant) = ZEND_ACC_STATIC; }
     718        7504 :         |       T_ABSTRACT                              { Z_LVAL($$.u.constant) = ZEND_ACC_ABSTRACT; }
     719          75 :         |       T_FINAL                                 { Z_LVAL($$.u.constant) = ZEND_ACC_FINAL; }
     720          26 : ;
     721             : 
     722             : class_variable_declaration:
     723          41 :                 class_variable_declaration ',' T_VARIABLE                                       { zend_do_declare_property(&$3, NULL, CG(access_type) TSRMLS_CC); }
     724          41 :         |       class_variable_declaration ',' T_VARIABLE '=' static_scalar     { zend_do_declare_property(&$3, &$5, CG(access_type) TSRMLS_CC); }
     725           3 :         |       T_VARIABLE                                              { zend_do_declare_property(&$1, NULL, CG(access_type) TSRMLS_CC); }
     726        1097 :         |       T_VARIABLE '=' static_scalar    { zend_do_declare_property(&$1, &$3, CG(access_type) TSRMLS_CC); }
     727        1218 : ;
     728             : 
     729             : class_constant_declaration:
     730           3 :                 class_constant_declaration ',' T_STRING '=' static_scalar       { zend_do_declare_class_constant(&$3, &$5 TSRMLS_CC); }
     731           3 :         |       T_CONST T_STRING '=' static_scalar      { zend_do_declare_class_constant(&$2, &$4 TSRMLS_CC); }
     732         228 : ;
     733             : 
     734             : echo_expr_list:
     735        1408 :                 echo_expr_list ',' expr { zend_do_echo(&$3 TSRMLS_CC); }
     736        1408 :         |       expr                                    { zend_do_echo(&$1 TSRMLS_CC); }
     737       32581 : ;
     738             : 
     739             : 
     740             : for_expr:
     741           7 :                 /* empty */                     { $$.op_type = IS_CONST;  Z_TYPE($$.u.constant) = IS_BOOL;  Z_LVAL($$.u.constant) = 1; }
     742           7 :         |       non_empty_for_expr      { $$ = $1; }
     743        6272 : ;
     744             : 
     745             : non_empty_for_expr:
     746          10 :                 non_empty_for_expr ','  { zend_do_free(&$1 TSRMLS_CC); } expr { $$ = $4; }
     747          10 :         |       expr                                    { $$ = $1; }
     748        6272 : ;
     749             : 
     750             : chaining_method_or_property:
     751           4 :                 chaining_method_or_property variable_property   { $$.EA = $2.EA; }
     752           4 :         |       variable_property                                                               { $$.EA = $1.EA; }
     753          23 : ;
     754             : 
     755             : chaining_dereference:
     756           1 :                 chaining_dereference '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 TSRMLS_CC); }
     757           1 :         |       '[' dim_offset ']'              { zend_do_pop_object(&$1 TSRMLS_CC); fetch_array_dim(&$$, &$1, &$2 TSRMLS_CC); }
     758           1 : ;
     759             : 
     760             : chaining_instance_call:
     761           0 :                 chaining_dereference            { zend_do_push_object(&$1 TSRMLS_CC); } chaining_method_or_property { $$ = $3; }
     762           0 :         |       chaining_dereference            { zend_do_push_object(&$1 TSRMLS_CC); $$ = $1; }
     763           1 :         |       chaining_method_or_property { $$ = $1; }
     764          23 : ;
     765             : 
     766             : instance_call:
     767           0 :                 /* empty */             { $$ = $0; }
     768           0 :         |       { zend_do_push_object(&$0 TSRMLS_CC); zend_do_begin_variable_parse(TSRMLS_C); }
     769          24 :                 chaining_instance_call  { zend_do_pop_object(&$$ TSRMLS_CC); zend_do_end_variable_parse(&$2, BP_VAR_R, 0 TSRMLS_CC); }
     770          24 : ;
     771             : 
     772             : new_expr:
     773       28640 :                 T_NEW class_name_reference { zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$1, &$2 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$$, &$1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
     774       28640 : ;
     775             : 
     776             : expr_without_variable:
     777         282 :                 T_LIST '(' { zend_do_list_init(TSRMLS_C); } assignment_list ')' '=' expr { zend_do_list_end(&$$, &$7 TSRMLS_CC); }
     778         282 :         |       variable '=' expr               { zend_check_writable_variable(&$1); zend_do_assign(&$$, &$1, &$3 TSRMLS_CC); }
     779      150636 :         |       variable '=' '&' variable { zend_check_writable_variable(&$1); zend_do_end_variable_parse(&$4, BP_VAR_W, 1 TSRMLS_CC); zend_do_end_variable_parse(&$1, BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$4 TSRMLS_CC); }
     780         399 :         |       variable '=' '&' T_NEW class_name_reference { zend_error(E_DEPRECATED, "Assigning the return value of new by reference is deprecated");  zend_check_writable_variable(&$1); zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$4, &$5 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$3, &$4 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); zend_do_end_variable_parse(&$1, BP_VAR_W, 0 TSRMLS_CC); $3.EA = ZEND_PARSED_NEW; zend_do_assign_ref(&$$, &$1, &$3 TSRMLS_CC); }
     781          20 :         |       T_CLONE expr { zend_do_clone(&$$, &$2 TSRMLS_CC); }
     782         112 :         |       variable T_PLUS_EQUAL expr      { zend_check_writable_variable(&$1); zend_do_end_variable_parse(&$1, BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_ADD, &$$, &$1, &$3 TSRMLS_CC); }
     783         675 :         |       variable T_MINUS_EQUAL expr     { zend_check_writable_variable(&$1); zend_do_end_variable_parse(&$1, BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SUB, &$$, &$1, &$3 TSRMLS_CC); }
     784         140 :         |       variable T_MUL_EQUAL expr               { zend_check_writable_variable(&$1); zend_do_end_variable_parse(&$1, BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_MUL, &$$, &$1, &$3 TSRMLS_CC); }
     785          16 :         |       variable T_POW_EQUAL expr               { zend_check_writable_variable(&$1); zend_do_end_variable_parse(&$1, BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_POW, &$$, &$1, &$3 TSRMLS_CC); }
     786           1 :         |       variable T_DIV_EQUAL expr               { zend_check_writable_variable(&$1); zend_do_end_variable_parse(&$1, BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_DIV, &$$, &$1, &$3 TSRMLS_CC); }
     787           5 :         |       variable T_CONCAT_EQUAL expr    { zend_check_writable_variable(&$1); zend_do_end_variable_parse(&$1, BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_CONCAT, &$$, &$1, &$3 TSRMLS_CC); }
     788        2929 :         |       variable T_MOD_EQUAL expr               { zend_check_writable_variable(&$1); zend_do_end_variable_parse(&$1, BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_MOD, &$$, &$1, &$3 TSRMLS_CC); }
     789           0 :         |       variable T_AND_EQUAL expr               { zend_check_writable_variable(&$1); zend_do_end_variable_parse(&$1, BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_AND, &$$, &$1, &$3 TSRMLS_CC); }
     790           2 :         |       variable T_OR_EQUAL expr                { zend_check_writable_variable(&$1); zend_do_end_variable_parse(&$1, BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_OR, &$$, &$1, &$3 TSRMLS_CC); }
     791          94 :         |       variable T_XOR_EQUAL expr               { zend_check_writable_variable(&$1); zend_do_end_variable_parse(&$1, BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_XOR, &$$, &$1, &$3 TSRMLS_CC); }
     792           1 :         |       variable T_SL_EQUAL expr        { zend_check_writable_variable(&$1); zend_do_end_variable_parse(&$1, BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SL, &$$, &$1, &$3 TSRMLS_CC); }
     793           3 :         |       variable T_SR_EQUAL expr        { zend_check_writable_variable(&$1); zend_do_end_variable_parse(&$1, BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SR, &$$, &$1, &$3 TSRMLS_CC); }
     794           3 :         |       rw_variable T_INC { zend_do_post_incdec(&$$, &$1, ZEND_POST_INC TSRMLS_CC); }
     795        5549 :         |       T_INC rw_variable { zend_do_pre_incdec(&$$, &$2, ZEND_PRE_INC TSRMLS_CC); }
     796         515 :         |       rw_variable T_DEC { zend_do_post_incdec(&$$, &$1, ZEND_POST_DEC TSRMLS_CC); }
     797         142 :         |       T_DEC rw_variable { zend_do_pre_incdec(&$$, &$2, ZEND_PRE_DEC TSRMLS_CC); }
     798        4542 :         |       expr T_BOOLEAN_OR { zend_do_boolean_or_begin(&$1, &$2 TSRMLS_CC); } expr { zend_do_boolean_or_end(&$$, &$1, &$4, &$2 TSRMLS_CC); }
     799       16518 :         |       expr T_BOOLEAN_AND { zend_do_boolean_and_begin(&$1, &$2 TSRMLS_CC); } expr { zend_do_boolean_and_end(&$$, &$1, &$4, &$2 TSRMLS_CC); }
     800       15794 :         |       expr T_LOGICAL_OR { zend_do_boolean_or_begin(&$1, &$2 TSRMLS_CC); } expr { zend_do_boolean_or_end(&$$, &$1, &$4, &$2 TSRMLS_CC); }
     801        1761 :         |       expr T_LOGICAL_AND { zend_do_boolean_and_begin(&$1, &$2 TSRMLS_CC); } expr { zend_do_boolean_and_end(&$$, &$1, &$4, &$2 TSRMLS_CC); }
     802          26 :         |       expr T_LOGICAL_XOR expr { zend_do_binary_op(ZEND_BOOL_XOR, &$$, &$1, &$3 TSRMLS_CC); }
     803           0 :         |       expr '|' expr   { zend_do_binary_op(ZEND_BW_OR, &$$, &$1, &$3 TSRMLS_CC); }
     804         698 :         |       expr '&' expr       { zend_do_binary_op(ZEND_BW_AND, &$$, &$1, &$3 TSRMLS_CC); }
     805        1206 :         |       expr '^' expr   { zend_do_binary_op(ZEND_BW_XOR, &$$, &$1, &$3 TSRMLS_CC); }
     806          24 :         |       expr '.' expr   { zend_do_binary_op(ZEND_CONCAT, &$$, &$1, &$3 TSRMLS_CC); }
     807       43753 :         |       expr '+' expr   { zend_do_binary_op(ZEND_ADD, &$$, &$1, &$3 TSRMLS_CC); }
     808        4019 :         |       expr '-' expr   { zend_do_binary_op(ZEND_SUB, &$$, &$1, &$3 TSRMLS_CC); }
     809        1268 :         |       expr '*' expr   { zend_do_binary_op(ZEND_MUL, &$$, &$1, &$3 TSRMLS_CC); }
     810        2855 :         |       expr T_POW expr { zend_do_binary_op(ZEND_POW, &$$, &$1, &$3 TSRMLS_CC); }
     811           7 :         |       expr '/' expr   { zend_do_binary_op(ZEND_DIV, &$$, &$1, &$3 TSRMLS_CC); }
     812         528 :         |       expr '%' expr   { zend_do_binary_op(ZEND_MOD, &$$, &$1, &$3 TSRMLS_CC); }
     813         790 :         |       expr T_SL expr  { zend_do_binary_op(ZEND_SL, &$$, &$1, &$3 TSRMLS_CC); }
     814         131 :         |       expr T_SR expr  { zend_do_binary_op(ZEND_SR, &$$, &$1, &$3 TSRMLS_CC); }
     815          68 :         |       '+' expr %prec T_INC { ZVAL_LONG(&$1.u.constant, 0); if ($2.op_type == IS_CONST) { add_function(&$2.u.constant, &$1.u.constant, &$2.u.constant TSRMLS_CC); $$ = $2; } else { $1.op_type = IS_CONST; INIT_PZVAL(&$1.u.constant); zend_do_binary_op(ZEND_ADD, &$$, &$1, &$2 TSRMLS_CC); } }
     816         248 :         |       '-' expr %prec T_INC { ZVAL_LONG(&$1.u.constant, 0); if ($2.op_type == IS_CONST) { sub_function(&$2.u.constant, &$1.u.constant, &$2.u.constant TSRMLS_CC); $$ = $2; } else { $1.op_type = IS_CONST; INIT_PZVAL(&$1.u.constant); zend_do_binary_op(ZEND_SUB, &$$, &$1, &$2 TSRMLS_CC); } }
     817        6623 :         |       '!' expr { zend_do_unary_op(ZEND_BOOL_NOT, &$$, &$2 TSRMLS_CC); }
     818       33344 :         |       '~' expr { zend_do_unary_op(ZEND_BW_NOT, &$$, &$2 TSRMLS_CC); }
     819          96 :         |       expr T_IS_IDENTICAL expr                { zend_do_binary_op(ZEND_IS_IDENTICAL, &$$, &$1, &$3 TSRMLS_CC); }
     820        6270 :         |       expr T_IS_NOT_IDENTICAL expr    { zend_do_binary_op(ZEND_IS_NOT_IDENTICAL, &$$, &$1, &$3 TSRMLS_CC); }
     821        8392 :         |       expr T_IS_EQUAL expr                    { zend_do_binary_op(ZEND_IS_EQUAL, &$$, &$1, &$3 TSRMLS_CC); }
     822       17003 :         |       expr T_IS_NOT_EQUAL expr                { zend_do_binary_op(ZEND_IS_NOT_EQUAL, &$$, &$1, &$3 TSRMLS_CC); }
     823        2756 :         |       expr '<' expr                                        { zend_do_binary_op(ZEND_IS_SMALLER, &$$, &$1, &$3 TSRMLS_CC); }
     824        1871 :         |       expr T_IS_SMALLER_OR_EQUAL expr { zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$1, &$3 TSRMLS_CC); }
     825        1764 :         |       expr '>' expr                                        { zend_do_binary_op(ZEND_IS_SMALLER, &$$, &$3, &$1 TSRMLS_CC); }
     826         877 :         |       expr T_IS_GREATER_OR_EQUAL expr { zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$3, &$1 TSRMLS_CC); }
     827         552 :         |       expr T_INSTANCEOF class_name_reference { zend_do_instanceof(&$$, &$1, &$3, 0 TSRMLS_CC); }
     828          63 :         |       parenthesis_expr        { $$ = $1; }
     829       28817 :         |       new_expr                { $$ = $1; }
     830       14320 :         |       '(' new_expr ')' { $$ = $2; } instance_call { $$ = $5; }
     831          48 :         |       expr '?' { zend_do_begin_qm_op(&$1, &$2 TSRMLS_CC); }
     832       27085 :                 expr ':' { zend_do_qm_true(&$4, &$2, &$5 TSRMLS_CC); }
     833       27085 :                 expr     { zend_do_qm_false(&$$, &$7, &$2, &$5 TSRMLS_CC); }
     834       27085 :         |       expr '?' ':' { zend_do_jmp_set(&$1, &$2, &$3 TSRMLS_CC); }
     835          34 :                 expr     { zend_do_jmp_set_else(&$$, &$5, &$2, &$3 TSRMLS_CC); }
     836          34 :         |       internal_functions_in_yacc { $$ = $1; }
     837       27002 :         |       T_INT_CAST expr         { zend_do_cast(&$$, &$2, IS_LONG TSRMLS_CC); }
     838        4928 :         |       T_DOUBLE_CAST expr      { zend_do_cast(&$$, &$2, IS_DOUBLE TSRMLS_CC); }
     839          70 :         |       T_STRING_CAST expr      { zend_do_cast(&$$, &$2, IS_STRING TSRMLS_CC); }
     840        1307 :         |       T_ARRAY_CAST expr       { zend_do_cast(&$$, &$2, IS_ARRAY TSRMLS_CC); }
     841          16 :         |       T_OBJECT_CAST expr      { zend_do_cast(&$$, &$2, IS_OBJECT TSRMLS_CC); }
     842         154 :         |       T_BOOL_CAST expr        { zend_do_cast(&$$, &$2, IS_BOOL TSRMLS_CC); }
     843          65 :         |       T_UNSET_CAST expr       { zend_do_cast(&$$, &$2, IS_NULL TSRMLS_CC); }
     844           0 :         |       T_EXIT exit_expr        { zend_do_exit(&$$, &$2 TSRMLS_CC); }
     845       23119 :         |       '@' { zend_do_begin_silence(&$1 TSRMLS_CC); } expr { zend_do_end_silence(&$1 TSRMLS_CC); $$ = $3; }
     846       14446 :         |       scalar                          { $$ = $1; }
     847      661191 :         |       combined_scalar_offset { zend_do_end_variable_parse(&$1, BP_VAR_R, 0 TSRMLS_CC); }
     848          11 :         |       combined_scalar { $$ = $1; }
     849       25691 :         |       '`' backticks_expr '`' { zend_do_shell_exec(&$$, &$2 TSRMLS_CC); }
     850         113 :         |       T_PRINT expr  { zend_do_print(&$$, &$2 TSRMLS_CC); }
     851        3409 :         |       T_YIELD { zend_do_yield(&$$, NULL, NULL, 0 TSRMLS_CC); }
     852          36 :         |       function is_reference { zend_do_begin_lambda_function_declaration(&$$, &$1, $2.op_type, 0 TSRMLS_CC); }
     853         261 :                 '(' parameter_list ')' lexical_vars
     854         261 :                 '{' inner_statement_list '}' { zend_do_end_function_declaration(&$1 TSRMLS_CC); $$ = $3; }
     855         261 :         |       T_STATIC function is_reference { zend_do_begin_lambda_function_declaration(&$$, &$2, $3.op_type, 1 TSRMLS_CC); }
     856           6 :                 '(' parameter_list ')' lexical_vars
     857           6 :                 '{' inner_statement_list '}' { zend_do_end_function_declaration(&$2 TSRMLS_CC); $$ = $4; }
     858           6 : ;
     859             : 
     860             : yield_expr:
     861          35 :                 T_YIELD expr_without_variable { zend_do_yield(&$$, &$2, NULL, 0 TSRMLS_CC); }
     862          34 :         |       T_YIELD variable { zend_do_yield(&$$, &$2, NULL, 1 TSRMLS_CC); }
     863          32 :         |       T_YIELD expr T_DOUBLE_ARROW expr_without_variable { zend_do_yield(&$$, &$4, &$2, 0 TSRMLS_CC); }
     864          14 :         |       T_YIELD expr T_DOUBLE_ARROW variable { zend_do_yield(&$$, &$4, &$2, 1 TSRMLS_CC); }
     865           3 : ;
     866             : 
     867             : combined_scalar_offset:
     868           8 :           combined_scalar '[' dim_offset ']' { zend_do_begin_variable_parse(TSRMLS_C); fetch_array_dim(&$$, &$1, &$3 TSRMLS_CC); }
     869           8 :         | combined_scalar_offset '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 TSRMLS_CC); }
     870           4 :     | T_CONSTANT_ENCAPSED_STRING '[' dim_offset ']' { $1.EA = 0; zend_do_begin_variable_parse(TSRMLS_C); fetch_array_dim(&$$, &$1, &$3 TSRMLS_CC); }
     871           3 : 
     872             : combined_scalar:
     873       25242 :       T_ARRAY '(' array_pair_list ')' { $$ = $3; }
     874       25242 :     | '[' array_pair_list ']' { $$ = $2; }
     875         457 : 
     876             : function:
     877       36916 :         T_FUNCTION { $$.u.op.opline_num = CG(zend_lineno); }
     878       36916 : ;
     879             : 
     880             : lexical_vars:
     881             :                 /* empty */
     882             :         |       T_USE '(' lexical_var_list ')'
     883             : ;
     884             : 
     885             : lexical_var_list:
     886           4 :                 lexical_var_list ',' T_VARIABLE                 { zend_do_fetch_lexical_variable(&$3, 0 TSRMLS_CC); }
     887           4 :         |       lexical_var_list ',' '&' T_VARIABLE         { zend_do_fetch_lexical_variable(&$4, 1 TSRMLS_CC); }
     888           3 :         |       T_VARIABLE                                                              { zend_do_fetch_lexical_variable(&$1, 0 TSRMLS_CC); }
     889          64 :         |       '&' T_VARIABLE                                                      { zend_do_fetch_lexical_variable(&$2, 1 TSRMLS_CC); }
     890          23 : ;
     891             : 
     892             : function_call:
     893      281386 :                 namespace_name { $$.u.op.opline_num = zend_do_begin_function_call(&$1, 1 TSRMLS_CC); }
     894      281386 :                 function_call_parameter_list { zend_do_end_function_call(&$1, &$$, 0, $2.u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
     895      281371 :         |       T_NAMESPACE T_NS_SEPARATOR namespace_name { $1.op_type = IS_CONST; ZVAL_EMPTY_STRING(&$1.u.constant);  zend_do_build_namespace_name(&$1, &$1, &$3 TSRMLS_CC); $$.u.op.opline_num = zend_do_begin_function_call(&$1, 0 TSRMLS_CC); }
     896           8 :                 function_call_parameter_list { zend_do_end_function_call(&$1, &$$, 0, $4.u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
     897           8 :         |       T_NS_SEPARATOR namespace_name { $$.u.op.opline_num = zend_do_begin_function_call(&$2, 0 TSRMLS_CC); }
     898          14 :                 function_call_parameter_list { zend_do_end_function_call(&$2, &$$, 0, $3.u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
     899          14 :         |       class_name T_PAAMAYIM_NEKUDOTAYIM variable_name { $$.u.op.opline_num = zend_do_begin_class_member_function_call(&$1, &$3 TSRMLS_CC); }
     900       10805 :                 function_call_parameter_list { zend_do_end_function_call($4.u.op.opline_num?NULL:&$3, &$$, $4.u.op.opline_num, $4.u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
     901       10804 :         |       class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects { zend_do_end_variable_parse(&$3, BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_class_member_function_call(&$1, &$3 TSRMLS_CC); }
     902          10 :                 function_call_parameter_list { zend_do_end_function_call(NULL, &$$, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
     903          10 :         |       variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_name { zend_do_begin_class_member_function_call(&$1, &$3 TSRMLS_CC); }
     904          15 :                 function_call_parameter_list { zend_do_end_function_call(NULL, &$$, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
     905          15 :         |       variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects { zend_do_end_variable_parse(&$3, BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_class_member_function_call(&$1, &$3 TSRMLS_CC); }
     906          23 :                 function_call_parameter_list { zend_do_end_function_call(NULL, &$$, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
     907          23 :         |       variable_without_objects { zend_do_end_variable_parse(&$1, BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_dynamic_function_call(&$1, 0 TSRMLS_CC); }
     908        2006 :                 function_call_parameter_list { zend_do_end_function_call(&$1, &$$, 0, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
     909        2006 : ;
     910             : 
     911             : class_name:
     912          49 :                 T_STATIC { $$.op_type = IS_CONST; ZVAL_STRINGL(&$$.u.constant, "static", sizeof("static")-1, 1);}
     913          49 :         |       namespace_name { $$ = $1; }
     914       34373 :         |       T_NAMESPACE T_NS_SEPARATOR namespace_name { $$.op_type = IS_CONST; ZVAL_EMPTY_STRING(&$$.u.constant);  zend_do_build_namespace_name(&$$, &$$, &$3 TSRMLS_CC); }
     915          14 :         |       T_NS_SEPARATOR namespace_name { char *tmp = estrndup(Z_STRVAL($2.u.constant), Z_STRLEN($2.u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL($2.u.constant), Z_STRLEN($2.u.constant)+1); tmp[0] = '\\'; efree(Z_STRVAL($2.u.constant)); Z_STRVAL($2.u.constant) = tmp; ++Z_STRLEN($2.u.constant); $$ = $2; }
     916         130 : ;
     917             : 
     918             : fully_qualified_class_name:
     919        5250 :                 namespace_name { $$ = $1; }
     920        5250 :         |       T_NAMESPACE T_NS_SEPARATOR namespace_name { $$.op_type = IS_CONST; ZVAL_EMPTY_STRING(&$$.u.constant);  zend_do_build_namespace_name(&$$, &$$, &$3 TSRMLS_CC); }
     921           4 :         |       T_NS_SEPARATOR namespace_name { char *tmp = estrndup(Z_STRVAL($2.u.constant), Z_STRLEN($2.u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL($2.u.constant), Z_STRLEN($2.u.constant)+1); tmp[0] = '\\'; efree(Z_STRVAL($2.u.constant)); Z_STRVAL($2.u.constant) = tmp; ++Z_STRLEN($2.u.constant); $$ = $2; }
     922          23 : ;
     923             : 
     924             : 
     925             : 
     926             : class_name_reference:
     927       13122 :                 class_name                                              { zend_do_fetch_class(&$$, &$1 TSRMLS_CC); }
     928       13122 :         |       dynamic_class_name_reference    { zend_do_end_variable_parse(&$1, BP_VAR_R, 0 TSRMLS_CC); zend_do_fetch_class(&$$, &$1 TSRMLS_CC); }
     929        1272 : ;
     930             : 
     931             : 
     932             : dynamic_class_name_reference:
     933           2 :                 base_variable T_OBJECT_OPERATOR { zend_do_push_object(&$1 TSRMLS_CC); }
     934           2 :                         object_property { zend_do_push_object(&$4 TSRMLS_CC); } dynamic_class_name_variable_properties
     935           2 :                         { zend_do_pop_object(&$$ TSRMLS_CC); $$.EA = ZEND_PARSED_MEMBER; }
     936           2 :         |       base_variable { $$ = $1; }
     937        1270 : ;
     938             : 
     939             : 
     940             : dynamic_class_name_variable_properties:
     941             :                 dynamic_class_name_variable_properties dynamic_class_name_variable_property
     942             :         |       /* empty */
     943             : ;
     944             : 
     945             : 
     946             : dynamic_class_name_variable_property:
     947           0 :                 T_OBJECT_OPERATOR object_property { zend_do_push_object(&$2 TSRMLS_CC); }
     948           0 : ;
     949             : 
     950             : exit_expr:
     951         427 :                 /* empty */     { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
     952         427 :         |       '(' ')'         { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
     953         116 :         |       parenthesis_expr        { $$ = $1; }
     954       15353 : ;
     955             : 
     956             : backticks_expr:
     957           0 :                 /* empty */     { ZVAL_EMPTY_STRING(&$$.u.constant); INIT_PZVAL(&$$.u.constant); $$.op_type = IS_CONST; }
     958           0 :         |       T_ENCAPSED_AND_WHITESPACE       { $$ = $1; }
     959           7 :         |       encaps_list     { $$ = $1; }
     960         106 : ;
     961             : 
     962             : 
     963             : ctor_arguments:
     964        2585 :                 /* empty */     { Z_LVAL($$.u.constant) = 0; }
     965        2585 :         |       function_call_parameter_list    { $$ = $1; }
     966       11745 : ;
     967             : 
     968             : 
     969             : common_scalar:
     970      169573 :                 T_LNUMBER                                       { $$ = $1; }
     971      169573 :         |       T_DNUMBER                                       { $$ = $1; }
     972        6913 :         |       T_CONSTANT_ENCAPSED_STRING      { $$ = $1; }
     973      379254 :         |       T_LINE                                          { $$ = $1; }
     974          15 :         |       T_FILE                                          { $$ = $1; }
     975        9337 :         |       T_DIR                                           { $$ = $1; }
     976         388 :         |       T_TRAIT_C                                       { $$ = $1; }
     977           4 :         |       T_METHOD_C                                      { $$ = $1; }
     978         782 :         |       T_FUNC_C                                        { $$ = $1; }
     979         103 :         |       T_NS_C                                          { $$ = $1; }
     980          33 :         |       T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC { $$ = $2; }
     981        1332 :         |       T_START_HEREDOC T_END_HEREDOC { ZVAL_EMPTY_STRING(&$$.u.constant); INIT_PZVAL(&$$.u.constant); $$.op_type = IS_CONST; }
     982          59 : ;
     983             : 
     984             : static_class_constant:
     985         350 :                 class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING { zend_do_fetch_constant(&$$, &$1, &$3, ZEND_CT, 0 TSRMLS_CC); }
     986         350 : ;
     987             : 
     988             : static_scalar: /* compile-time evaluated scalars */
     989       18548 :         static_scalar_value { zend_do_constant_expression(&$$, $1.u.ast TSRMLS_CC); }
     990       18548 : ;
     991             : 
     992             : static_scalar_value:
     993       12390 :                 common_scalar   { $$.u.ast = zend_ast_create_constant(&$1.u.constant); }
     994       12390 :         |       static_class_name_scalar        { $$.u.ast = zend_ast_create_constant(&$1.u.constant); }
     995           4 :         |       namespace_name          { zend_do_fetch_constant(&$$, NULL, &$1, ZEND_CT, 1 TSRMLS_CC); $$.u.ast = zend_ast_create_constant(&$$.u.constant); }
     996        7096 :         |       T_NAMESPACE T_NS_SEPARATOR namespace_name { $$.op_type = IS_CONST; ZVAL_EMPTY_STRING(&$$.u.constant);  zend_do_build_namespace_name(&$$, &$$, &$3 TSRMLS_CC); $3 = $$; zend_do_fetch_constant(&$$, NULL, &$3, ZEND_CT, 0 TSRMLS_CC); $$.u.ast = zend_ast_create_constant(&$$.u.constant); }
     997          14 :         |       T_NS_SEPARATOR namespace_name { char *tmp = estrndup(Z_STRVAL($2.u.constant), Z_STRLEN($2.u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL($2.u.constant), Z_STRLEN($2.u.constant)+1); tmp[0] = '\\'; efree(Z_STRVAL($2.u.constant)); Z_STRVAL($2.u.constant) = tmp; ++Z_STRLEN($2.u.constant); zend_do_fetch_constant(&$$, NULL, &$2, ZEND_CT, 0 TSRMLS_CC); $$.u.ast = zend_ast_create_constant(&$$.u.constant); }
     998          13 :         |       T_ARRAY '(' static_array_pair_list ')' { $$ = $3; }
     999        2159 :         |       '[' static_array_pair_list ']' { $$ = $2; }
    1000           4 :         |       static_class_constant { $$.u.ast = zend_ast_create_constant(&$1.u.constant); }
    1001         350 :         |       T_CLASS_C                       { $$.u.ast = zend_ast_create_constant(&$1.u.constant); }
    1002           3 :         |       static_operation { $$ = $1; }
    1003         110 : ;
    1004             : 
    1005             : static_operation:
    1006           0 :                 static_scalar_value '[' static_scalar_value ']' { $$.u.ast = zend_ast_create_binary(ZEND_FETCH_DIM_R, $1.u.ast, $3.u.ast); }
    1007           0 :         |       static_scalar_value '+' static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_ADD, $1.u.ast, $3.u.ast); }
    1008          11 :         |       static_scalar_value '-' static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_SUB, $1.u.ast, $3.u.ast); }
    1009           0 :         |       static_scalar_value '*' static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_MUL, $1.u.ast, $3.u.ast); }
    1010           4 :         |       static_scalar_value T_POW static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_POW, $1.u.ast, $3.u.ast); }
    1011           1 :         |       static_scalar_value '/' static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_DIV, $1.u.ast, $3.u.ast); }
    1012           1 :         |       static_scalar_value '%' static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_MOD, $1.u.ast, $3.u.ast); }
    1013           0 :         |       '!' static_scalar_value { $$.u.ast = zend_ast_create_unary(ZEND_BOOL_NOT, $2.u.ast); }
    1014           0 :         |       '~' static_scalar_value { $$.u.ast = zend_ast_create_unary(ZEND_BW_NOT, $2.u.ast); }
    1015           1 :         |       static_scalar_value '|' static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_BW_OR, $1.u.ast, $3.u.ast); }
    1016           2 :         |       static_scalar_value '&' static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_BW_AND, $1.u.ast, $3.u.ast); }
    1017           0 :         |       static_scalar_value '^' static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_BW_XOR, $1.u.ast, $3.u.ast); }
    1018           0 :         |       static_scalar_value T_SL static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_SL, $1.u.ast, $3.u.ast); }
    1019           6 :         |       static_scalar_value T_SR static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_SR, $1.u.ast, $3.u.ast); }
    1020           0 :         |       static_scalar_value '.' static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_CONCAT, $1.u.ast, $3.u.ast); }
    1021          12 :         |       static_scalar_value T_LOGICAL_XOR static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_BOOL_XOR, $1.u.ast, $3.u.ast); }
    1022           2 :         |       static_scalar_value T_LOGICAL_AND static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_BOOL_AND, $1.u.ast, $3.u.ast); }
    1023           1 :         |       static_scalar_value T_LOGICAL_OR static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_BOOL_OR, $1.u.ast, $3.u.ast); }
    1024           1 :         |       static_scalar_value T_BOOLEAN_AND static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_BOOL_AND, $1.u.ast, $3.u.ast); }
    1025           1 :         |       static_scalar_value T_BOOLEAN_OR static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_BOOL_OR, $1.u.ast, $3.u.ast); }
    1026           1 :         |       static_scalar_value T_IS_IDENTICAL static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_IS_IDENTICAL, $1.u.ast, $3.u.ast); }
    1027           1 :         |       static_scalar_value T_IS_NOT_IDENTICAL static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_IS_NOT_IDENTICAL, $1.u.ast, $3.u.ast); }
    1028           1 :         |       static_scalar_value T_IS_EQUAL static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_IS_EQUAL, $1.u.ast, $3.u.ast); }
    1029           1 :         |       static_scalar_value T_IS_NOT_EQUAL static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_IS_NOT_EQUAL, $1.u.ast, $3.u.ast); }
    1030           1 :         |       static_scalar_value '<' static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_IS_SMALLER, $1.u.ast, $3.u.ast); }
    1031           1 :         |       static_scalar_value '>' static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_IS_SMALLER, $3.u.ast, $1.u.ast); }
    1032           1 :         |       static_scalar_value T_IS_SMALLER_OR_EQUAL static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_IS_SMALLER_OR_EQUAL, $1.u.ast, $3.u.ast); }
    1033           1 :         |       static_scalar_value T_IS_GREATER_OR_EQUAL static_scalar_value { $$.u.ast = zend_ast_create_binary(ZEND_IS_SMALLER_OR_EQUAL, $3.u.ast, $1.u.ast); }
    1034           1 :         |       static_scalar_value '?' ':' static_scalar_value { $$.u.ast = zend_ast_create_ternary(ZEND_SELECT, $1.u.ast, NULL, $4.u.ast); }
    1035           1 :         |       static_scalar_value '?' static_scalar_value ':' static_scalar_value { $$.u.ast = zend_ast_create_ternary(ZEND_SELECT, $1.u.ast, $3.u.ast, $5.u.ast); }
    1036           1 :         |       '+' static_scalar_value { $$.u.ast = zend_ast_create_unary(ZEND_UNARY_PLUS, $2.u.ast); }
    1037           2 :         |       '-' static_scalar_value { $$.u.ast = zend_ast_create_unary(ZEND_UNARY_MINUS, $2.u.ast); }
    1038          51 :         |       '(' static_scalar_value ')' { $$ = $2; }
    1039           3 : ;
    1040             : 
    1041             : 
    1042             : scalar:
    1043         312 :                 T_STRING_VARNAME                { $$ = $1; }
    1044         312 :         |       class_name_scalar       { $$ = $1; }
    1045          10 :         |       class_constant          { $$ = $1; }
    1046        9654 :         |       namespace_name  { zend_do_fetch_constant(&$$, NULL, &$1, ZEND_RT, 1 TSRMLS_CC); }
    1047       80637 :         |       T_NAMESPACE T_NS_SEPARATOR namespace_name { $$.op_type = IS_CONST; ZVAL_EMPTY_STRING(&$$.u.constant);  zend_do_build_namespace_name(&$$, &$$, &$3 TSRMLS_CC); $3 = $$; zend_do_fetch_constant(&$$, NULL, &$3, ZEND_RT, 0 TSRMLS_CC); }
    1048           9 :         |       T_NS_SEPARATOR namespace_name { char *tmp = estrndup(Z_STRVAL($2.u.constant), Z_STRLEN($2.u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL($2.u.constant), Z_STRLEN($2.u.constant)+1); tmp[0] = '\\'; efree(Z_STRVAL($2.u.constant)); Z_STRVAL($2.u.constant) = tmp; ++Z_STRLEN($2.u.constant); zend_do_fetch_constant(&$$, NULL, &$2, ZEND_RT, 0 TSRMLS_CC); }
    1049          14 :         |       common_scalar                   { $$ = $1; }
    1050      555403 :         |       '"' encaps_list '"'   { $$ = $2; }
    1051       14934 :         |       T_START_HEREDOC encaps_list T_END_HEREDOC { $$ = $2; }
    1052         139 :         |       T_CLASS_C                               { if (Z_TYPE($1.u.constant) == IS_CONSTANT) {zend_do_fetch_constant(&$$, NULL, &$1, ZEND_RT, 1 TSRMLS_CC);} else {$$ = $1;} }
    1053          79 : ;
    1054             : 
    1055             : 
    1056             : static_array_pair_list:
    1057         999 :                 /* empty */ { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); $$.u.ast = zend_ast_create_constant(&$$.u.constant); }
    1058         999 :         |       non_empty_static_array_pair_list possible_comma { zend_ast_dynamic_shrink(&$1.u.ast); $$ = $1; }
    1059        1164 : ;
    1060             : 
    1061             : possible_comma:
    1062             :                 /* empty */
    1063             :         |       ','
    1064             : ;
    1065             : 
    1066             : non_empty_static_array_pair_list:
    1067          40 :                 non_empty_static_array_pair_list ',' static_scalar_value T_DOUBLE_ARROW static_scalar_value { zend_ast_dynamic_add(&$$.u.ast, $3.u.ast); zend_ast_dynamic_add(&$$.u.ast, $5.u.ast); }
    1068          40 :         |       non_empty_static_array_pair_list ',' static_scalar_value { zend_ast_dynamic_add(&$$.u.ast, NULL); zend_ast_dynamic_add(&$$.u.ast, $3.u.ast); }
    1069        2082 :         |       static_scalar_value T_DOUBLE_ARROW static_scalar_value { $$.u.ast = zend_ast_create_dynamic(ZEND_INIT_ARRAY); zend_ast_dynamic_add(&$$.u.ast, $1.u.ast); zend_ast_dynamic_add(&$$.u.ast, $3.u.ast); }
    1070         105 :         |       static_scalar_value { $$.u.ast = zend_ast_create_dynamic(ZEND_INIT_ARRAY); zend_ast_dynamic_add(&$$.u.ast, NULL); zend_ast_dynamic_add(&$$.u.ast, $1.u.ast); }
    1071        1059 : ;
    1072             : 
    1073             : expr:
    1074      376608 :                 r_variable                                      { $$ = $1; }
    1075      376608 :         |       expr_without_variable           { $$ = $1; }
    1076      851342 : ;
    1077             : 
    1078             : parenthesis_expr:
    1079      125612 :                 '(' expr ')'            { $$ = $2; }
    1080      125612 :         |       '(' yield_expr ')'      { $$ = $2; }
    1081          10 : ;
    1082             : 
    1083             : 
    1084             : r_variable:
    1085      376611 :         variable { zend_do_end_variable_parse(&$1, BP_VAR_R, 0 TSRMLS_CC); $$ = $1; }
    1086      376609 : ;
    1087             : 
    1088             : 
    1089             : w_variable:
    1090         142 :         variable        { zend_do_end_variable_parse(&$1, BP_VAR_W, 0 TSRMLS_CC); $$ = $1;
    1091         142 :                                   zend_check_writable_variable(&$1); }
    1092         142 : ;
    1093             : 
    1094             : rw_variable:
    1095        6219 :         variable        { zend_do_end_variable_parse(&$1, BP_VAR_RW, 0 TSRMLS_CC); $$ = $1;
    1096        6219 :                                   zend_check_writable_variable(&$1); }
    1097        6219 : ;
    1098             : 
    1099             : variable:
    1100       44942 :                 base_variable_with_function_calls T_OBJECT_OPERATOR { zend_do_push_object(&$1 TSRMLS_CC); }
    1101       44942 :                         object_property { zend_do_push_object(&$4 TSRMLS_CC); } method_or_not variable_properties
    1102       44942 :                         { zend_do_pop_object(&$$ TSRMLS_CC); $$.EA = $1.EA | ($7.EA ? $7.EA : $6.EA); }
    1103       44939 :         |       base_variable_with_function_calls { $$ = $1; }
    1104      892546 : ;
    1105             : 
    1106             : variable_properties:
    1107        1441 :                 variable_properties variable_property { $$.EA = $2.EA; }
    1108        1441 :         |       /* empty */ { $$.EA = 0; }
    1109       44939 : ;
    1110             : 
    1111             : 
    1112             : variable_property:
    1113        2936 :                 T_OBJECT_OPERATOR object_property { zend_do_push_object(&$2 TSRMLS_CC); } method_or_not { $$.EA = $4.EA; }
    1114        2936 : ;
    1115             : 
    1116             : array_method_dereference:
    1117           5 :                 array_method_dereference '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 TSRMLS_CC); }
    1118           5 :         |       method '[' dim_offset ']' { $1.EA = ZEND_PARSED_METHOD_CALL; fetch_array_dim(&$$, &$1, &$3 TSRMLS_CC); }
    1119          50 : ;
    1120             : 
    1121             : method:
    1122       36191 :                 { zend_do_pop_object(&$$ TSRMLS_CC); zend_do_begin_method_call(&$$ TSRMLS_CC); }
    1123       36188 :                 function_call_parameter_list { zend_do_end_function_call(&$1, &$$, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
    1124       36188 : ;
    1125             : 
    1126             : method_or_not:
    1127       36138 :                 method                                          { $$ = $1; $$.EA = ZEND_PARSED_METHOD_CALL; zend_do_push_object(&$$ TSRMLS_CC); }
    1128       36138 :         |       array_method_dereference        { $$ = $1; zend_do_push_object(&$$ TSRMLS_CC); }
    1129          50 :         |       /* empty */ { $$.EA = ZEND_PARSED_MEMBER; }
    1130       10219 : ;
    1131             : 
    1132             : variable_without_objects:
    1133        2815 :                 reference_variable { $$ = $1; }
    1134        2815 :         |       simple_indirect_reference reference_variable { zend_do_indirect_references(&$$, &$1, &$2 TSRMLS_CC); }
    1135           7 : ;
    1136             : 
    1137             : static_member:
    1138         609 :                 class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects { $$ = $3; zend_do_fetch_static_member(&$$, &$1 TSRMLS_CC); }
    1139         609 :         |       variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects { $$ = $3; zend_do_fetch_static_member(&$$, &$1 TSRMLS_CC); }
    1140           5 : 
    1141             : ;
    1142             : 
    1143             : variable_class_name:
    1144          47 :                 reference_variable { zend_do_end_variable_parse(&$1, BP_VAR_R, 0 TSRMLS_CC); $$=$1;; }
    1145          47 : ;
    1146             : 
    1147             : array_function_dereference:
    1148          21 :                 array_function_dereference '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 TSRMLS_CC); }
    1149          21 :         |       function_call { zend_do_begin_variable_parse(TSRMLS_C); $1.EA = ZEND_PARSED_FUNCTION_CALL; }
    1150          45 :                 '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$4 TSRMLS_CC); }
    1151          45 : ;
    1152             : 
    1153             : base_variable_with_function_calls:
    1154      643237 :                 base_variable                           { $$ = $1; }
    1155      643237 :         |       array_function_dereference      { $$ = $1; }
    1156          45 :         |       function_call { zend_do_begin_variable_parse(TSRMLS_C); $$ = $1; $$.EA = ZEND_PARSED_FUNCTION_CALL; }
    1157      294206 : ;
    1158             : 
    1159             : 
    1160             : base_variable:
    1161      643763 :                 reference_variable { $$ = $1; $$.EA = ZEND_PARSED_VARIABLE; }
    1162      643763 :         |       simple_indirect_reference reference_variable { zend_do_indirect_references(&$$, &$1, &$2 TSRMLS_CC); $$.EA = ZEND_PARSED_VARIABLE; }
    1163         132 :         |       static_member { $$ = $1; $$.EA = ZEND_PARSED_STATIC_MEMBER; }
    1164         614 : ;
    1165             : 
    1166             : reference_variable:
    1167      126569 :                 reference_variable '[' dim_offset ']'   { fetch_array_dim(&$$, &$1, &$3 TSRMLS_CC); }
    1168      126569 :         |       reference_variable '{' expr '}'         { fetch_string_offset(&$$, &$1, &$3 TSRMLS_CC); }
    1169          21 :         |       compound_variable                       { zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&$$, &$1, 1 TSRMLS_CC); }
    1170      646764 : ;
    1171             : 
    1172             : 
    1173             : compound_variable:
    1174      646735 :                 T_VARIABLE                      { $$ = $1; }
    1175      646735 :         |       '$' '{' expr '}'        { $$ = $3; }
    1176          29 : ;
    1177             : 
    1178             : dim_offset:
    1179         457 :                 /* empty */             { $$.op_type = IS_UNUSED; }
    1180         457 :         |       expr                    { $$ = $1; }
    1181      126798 : ;
    1182             : 
    1183             : 
    1184             : object_property:
    1185       46243 :                 object_dim_list { $$ = $1; }
    1186       46412 :         |       variable_without_objects { zend_do_end_variable_parse(&$1, BP_VAR_R, 0 TSRMLS_CC); } { znode tmp_znode;  zend_do_pop_object(&tmp_znode TSRMLS_CC);  zend_do_fetch_property(&$$, &tmp_znode, &$1 TSRMLS_CC);}
    1187         338 : ;
    1188             : 
    1189             : object_dim_list:
    1190         548 :                 object_dim_list '[' dim_offset ']'      { fetch_array_dim(&$$, &$1, &$3 TSRMLS_CC); }
    1191         548 :         |       object_dim_list '{' expr '}'            { fetch_string_offset(&$$, &$1, &$3 TSRMLS_CC); }
    1192           0 :         |       variable_name { znode tmp_znode;  zend_do_pop_object(&tmp_znode TSRMLS_CC);  zend_do_fetch_property(&$$, &tmp_znode, &$1 TSRMLS_CC);}
    1193       46243 : ;
    1194             : 
    1195             : variable_name:
    1196       57013 :                 T_STRING                { $$ = $1; }
    1197       57013 :         |       '{' expr '}'    { $$ = $2; }
    1198          50 : ;
    1199             : 
    1200             : simple_indirect_reference:
    1201         140 :                 '$' { Z_LVAL($$.u.constant) = 1; }
    1202         140 :         |       simple_indirect_reference '$' { Z_LVAL($$.u.constant)++; }
    1203          10 : ;
    1204             : 
    1205             : assignment_list:
    1206             :                 assignment_list ',' assignment_list_element
    1207             :         |       assignment_list_element
    1208             : ;
    1209             : 
    1210             : 
    1211             : assignment_list_element:
    1212         340 :                 variable                                                                { zend_do_add_list_element(&$1 TSRMLS_CC); }
    1213         358 :         |       T_LIST '(' { zend_do_new_list_begin(TSRMLS_C); } assignment_list ')'    { zend_do_new_list_end(TSRMLS_C); }
    1214          36 :         |       /* empty */                                                     { zend_do_add_list_element(NULL TSRMLS_CC); }
    1215          21 : ;
    1216             : 
    1217             : 
    1218             : array_pair_list:
    1219        2400 :                 /* empty */ { zend_do_init_array(&$$, NULL, NULL, 0 TSRMLS_CC); }
    1220        2400 :         |       non_empty_array_pair_list possible_comma        { $$ = $1; }
    1221       23299 : ;
    1222             : 
    1223             : non_empty_array_pair_list:
    1224       19855 :                 non_empty_array_pair_list ',' expr T_DOUBLE_ARROW expr  { zend_do_add_array_element(&$$, &$5, &$3, 0 TSRMLS_CC); }
    1225       19855 :         |       non_empty_array_pair_list ',' expr                      { zend_do_add_array_element(&$$, &$3, NULL, 0 TSRMLS_CC); }
    1226       57796 :         |       expr T_DOUBLE_ARROW expr        { zend_do_init_array(&$$, &$3, &$1, 0 TSRMLS_CC); }
    1227        7223 :         |       expr                            { zend_do_init_array(&$$, &$1, NULL, 0 TSRMLS_CC); }
    1228       16018 :         |       non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' w_variable { zend_do_add_array_element(&$$, &$6, &$3, 1 TSRMLS_CC); }
    1229          46 :         |       non_empty_array_pair_list ',' '&' w_variable { zend_do_add_array_element(&$$, &$4, NULL, 1 TSRMLS_CC); }
    1230          38 :         |       expr T_DOUBLE_ARROW '&' w_variable  { zend_do_init_array(&$$, &$4, &$1, 1 TSRMLS_CC); }
    1231          14 :         |       '&' w_variable                      { zend_do_init_array(&$$, &$2, NULL, 1 TSRMLS_CC); }
    1232          44 : ;
    1233             : 
    1234             : encaps_list:
    1235        7241 :                 encaps_list encaps_var { zend_do_end_variable_parse(&$2, BP_VAR_R, 0 TSRMLS_CC);  zend_do_add_variable(&$$, &$1, &$2 TSRMLS_CC); }
    1236        7241 :         |       encaps_list T_ENCAPSED_AND_WHITESPACE   { zend_do_add_string(&$$, &$1, &$2 TSRMLS_CC); }
    1237       17307 :         |       encaps_var { zend_do_end_variable_parse(&$1, BP_VAR_R, 0 TSRMLS_CC); zend_do_add_variable(&$$, NULL, &$1 TSRMLS_CC); }
    1238        4552 :         |       T_ENCAPSED_AND_WHITESPACE encaps_var    { zend_do_add_string(&$$, NULL, &$1 TSRMLS_CC); zend_do_end_variable_parse(&$2, BP_VAR_R, 0 TSRMLS_CC); zend_do_add_variable(&$$, &$$, &$2 TSRMLS_CC); }
    1239       10628 : ;
    1240             : 
    1241             : 
    1242             : 
    1243             : encaps_var:
    1244       20091 :                 T_VARIABLE { zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&$$, &$1, 1 TSRMLS_CC); }
    1245       21067 :         |       T_VARIABLE '[' { zend_do_begin_variable_parse(TSRMLS_C); } encaps_var_offset ']'        { fetch_array_begin(&$$, &$1, &$4 TSRMLS_CC); }
    1246        1954 :         |       T_VARIABLE T_OBJECT_OPERATOR T_STRING { zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&$2, &$1, 1 TSRMLS_CC); zend_do_fetch_property(&$$, &$2, &$3 TSRMLS_CC); }
    1247         104 :         |       T_DOLLAR_OPEN_CURLY_BRACES expr '}' { zend_do_begin_variable_parse(TSRMLS_C);  fetch_simple_variable(&$$, &$2, 1 TSRMLS_CC); }
    1248         313 :         |       T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}' { zend_do_begin_variable_parse(TSRMLS_C);  fetch_array_begin(&$$, &$2, &$4 TSRMLS_CC); }
    1249           0 :         |       T_CURLY_OPEN variable '}' { $$ = $2; }
    1250         937 : ;
    1251             : 
    1252             : 
    1253             : encaps_var_offset:
    1254           4 :                 T_STRING                { $$ = $1; }
    1255           4 :         |       T_NUM_STRING    { $$ = $1; }
    1256         384 :         |       T_VARIABLE              { fetch_simple_variable(&$$, &$1, 1 TSRMLS_CC); }
    1257         588 : ;
    1258             : 
    1259             : 
    1260             : internal_functions_in_yacc:
    1261        5561 :                 T_ISSET '(' isset_variables ')' { $$ = $3; }
    1262        5561 :         |       T_EMPTY '(' variable ')'        { zend_do_isset_or_isempty(ZEND_ISEMPTY, &$$, &$3 TSRMLS_CC); }
    1263        8234 :         |       T_EMPTY '(' expr_without_variable ')' { zend_do_unary_op(ZEND_BOOL_NOT, &$$, &$3 TSRMLS_CC); }
    1264           8 :         |       T_INCLUDE expr                  { zend_do_include_or_eval(ZEND_INCLUDE, &$$, &$2 TSRMLS_CC); }
    1265        2338 :         |       T_INCLUDE_ONCE expr     { zend_do_include_or_eval(ZEND_INCLUDE_ONCE, &$$, &$2 TSRMLS_CC); }
    1266         525 :         |       T_EVAL '(' expr ')'     { zend_do_include_or_eval(ZEND_EVAL, &$$, &$3 TSRMLS_CC); }
    1267        2192 :         |       T_REQUIRE expr                  { zend_do_include_or_eval(ZEND_REQUIRE, &$$, &$2 TSRMLS_CC); }
    1268        2312 :         |       T_REQUIRE_ONCE expr             { zend_do_include_or_eval(ZEND_REQUIRE_ONCE, &$$, &$2 TSRMLS_CC); }
    1269        5832 : ;
    1270             : 
    1271             : isset_variables:
    1272        5561 :                 isset_variable                  { $$ = $1; }
    1273        5605 :         |       isset_variables ',' { zend_do_boolean_and_begin(&$1, &$2 TSRMLS_CC); } isset_variable { zend_do_boolean_and_end(&$$, &$1, &$4, &$2 TSRMLS_CC); }
    1274          88 : ;
    1275             : 
    1276             : isset_variable:
    1277        5607 :                 variable                                { zend_do_isset_or_isempty(ZEND_ISSET, &$$, &$1 TSRMLS_CC); }
    1278        5605 :         |       expr_without_variable   { zend_error_noreturn(E_COMPILE_ERROR, "Cannot use isset() on the result of an expression (you can use \"null !== expression\" instead)"); }
    1279             : ;
    1280             : 
    1281             : class_constant:
    1282        9650 :                 class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING { zend_do_fetch_constant(&$$, &$1, &$3, ZEND_RT, 0 TSRMLS_CC); }
    1283        9650 :         |       variable_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING { zend_do_fetch_constant(&$$, &$1, &$3, ZEND_RT, 0 TSRMLS_CC); }
    1284           4 : ;
    1285             : 
    1286             : static_class_name_scalar:
    1287           8 :         class_name T_PAAMAYIM_NEKUDOTAYIM T_CLASS { zend_do_resolve_class_name(&$$, &$1, 1 TSRMLS_CC); }
    1288           4 : ;
    1289             : 
    1290             : class_name_scalar:
    1291          12 :         class_name T_PAAMAYIM_NEKUDOTAYIM T_CLASS { zend_do_resolve_class_name(&$$, &$1, 0 TSRMLS_CC); }
    1292             : ;
    1293             : 
    1294             : %%
    1295             : 
    1296             : /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
    1297             :    quotes and backslashes, so that it's suitable for yyerror.  The
    1298             :    heuristic is that double-quoting is unnecessary unless the string
    1299             :    contains an apostrophe, a comma, or backslash (other than
    1300             :    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
    1301             :    null, do not copy; instead, return the length of what the result
    1302             :    would have been.  */
    1303         328 : static YYSIZE_T zend_yytnamerr(char *yyres, const char *yystr)
    1304             : {
    1305         328 :         if (!yyres) {
    1306         264 :                 return yystrlen(yystr);
    1307             :         }
    1308             :         {
    1309             :                 TSRMLS_FETCH();
    1310          64 :                 if (CG(parse_error) == 0) {
    1311             :                         char buffer[120];
    1312          35 :                         const unsigned char *end, *str, *tok1 = NULL, *tok2 = NULL;
    1313          35 :                         unsigned int len = 0, toklen = 0, yystr_len;
    1314             :                         
    1315          35 :                         CG(parse_error) = 1;
    1316             : 
    1317          41 :                         if (LANG_SCNG(yy_text)[0] == 0 &&
    1318           3 :                                 LANG_SCNG(yy_leng) == 1 &&
    1319           3 :                                 memcmp(yystr, "\"end of file\"", sizeof("\"end of file\"") - 1) == 0) {
    1320           3 :                                 yystpcpy(yyres, "end of file");
    1321           3 :                                 return sizeof("end of file")-1;
    1322             :                         }
    1323             :                         
    1324          32 :                         str = LANG_SCNG(yy_text);
    1325          32 :                         end = memchr(str, '\n', LANG_SCNG(yy_leng));
    1326          32 :                         yystr_len = yystrlen(yystr);
    1327             :                         
    1328          76 :                         if ((tok1 = memchr(yystr, '(', yystr_len)) != NULL
    1329          22 :                                 && (tok2 = zend_memrchr(yystr, ')', yystr_len)) != NULL) {
    1330          22 :                                 toklen = (tok2 - tok1) + 1;
    1331             :                         } else {
    1332          10 :                                 tok1 = tok2 = NULL;
    1333          10 :                                 toklen = 0;
    1334             :                         }
    1335             :                         
    1336          32 :                         if (end == NULL) {
    1337          31 :                                 len = LANG_SCNG(yy_leng) > 30 ? 30 : LANG_SCNG(yy_leng);
    1338             :                         } else {
    1339           1 :                                 len = (end - str) > 30 ? 30 : (end - str);
    1340             :                         }
    1341          32 :                         if (toklen) {
    1342          22 :                                 snprintf(buffer, sizeof(buffer), "'%.*s' %.*s", len, str, toklen, tok1);
    1343             :                         } else {
    1344          10 :                                 snprintf(buffer, sizeof(buffer), "'%.*s'", len, str);
    1345             :                         }
    1346          32 :                         yystpcpy(yyres, buffer);
    1347          32 :                         return len + (toklen ? toklen + 1 : 0) + 2;
    1348             :                 }               
    1349             :         }       
    1350          29 :         if (*yystr == '"') {
    1351          23 :                 YYSIZE_T yyn = 0;
    1352          23 :                 const char *yyp = yystr;
    1353             : 
    1354         504 :                 for (; *++yyp != '"'; ++yyn) {
    1355         481 :                         yyres[yyn] = *yyp;
    1356             :                 }
    1357          23 :                 yyres[yyn] = '\0';
    1358          23 :                 return yyn;
    1359             :         }
    1360           6 :         yystpcpy(yyres, yystr);
    1361           6 :         return strlen(yystr);
    1362             : }
    1363             : 
    1364             : /*
    1365             :  * Local variables:
    1366             :  * tab-width: 4
    1367             :  * c-basic-offset: 4
    1368             :  * indent-tabs-mode: t
    1369             :  * End:
    1370             :  */

Generated by: LCOV version 1.10

Generated at Wed, 16 Apr 2014 12:47:45 +0000 (23 hours ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.