Php syntax analysis format-questions about bisonaction

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.