Php syntax analysis format-view the php syntax file (zend_language_parser.y) about bisonaction, and find the following statement: | T_FOR '('for _ expr '; '& nbsp; {& nbsp; zend_do_free (& a php syntax analysis format question -- about bison action
View the php syntax file (zend_language_parser.y) and find the following syntax:
|T_FOR
'('
for_expr
';' { zend_do_free(&$3 TSRMLS_CC); $4.u.op.opline_num = get_next_op_number(CG(active_op_array)); }
for_expr
';' { zend_do_extended_info(TSRMLS_C); zend_do_for_cond(&$6, &$7 TSRMLS_CC); }
for_expr
')' { zend_do_free(&$9 TSRMLS_CC); zend_do_for_before_statement(&$4, &$7 TSRMLS_CC); }
Why can I add an action after a semicolon? For example:
';' { zend_do_free(&$3 TSRMLS_CC); $4.u.op.opline_num = get_next_op_number(CG(active_op_array)); }
Isn't the bison action placed behind a production function? why can I add an action in the production function? When I write a syntax analysis File, an error is reported. why ...? Parser? Bison? Share the action:
------ Solution --------------------
This is the YACC statement.