Home > Backend Development > PHP Tutorial > php 语法分析格式的有关问题-关于bison action的有关问题

php 语法分析格式的有关问题-关于bison action的有关问题

WBOY
Release: 2016-06-13 12:47:23
Original
1016 people have browsed it

php 语法分析格式的问题--关于bison action的问题
查看php的语法文件文件(zend_language_parser.y),发现有如下的写法:

<br />
|	T_FOR<br />
		'('<br />
			for_expr<br />
		';' { zend_do_free(&$3 TSRMLS_CC); $4.u.op.opline_num = get_next_op_number(CG(active_op_array)); }<br />
			for_expr<br />
		';' { zend_do_extended_info(TSRMLS_C); zend_do_for_cond(&$6, &$7 TSRMLS_CC); }<br />
			for_expr<br />
		')' { zend_do_free(&$9 TSRMLS_CC); zend_do_for_before_statement(&$4, &$7 TSRMLS_CC); }<br />
<br />
Copy after login


为什么可以在分号后面单独加 action呢? 如:
<br />
';' { zend_do_free(&$3 TSRMLS_CC); $4.u.op.opline_num = get_next_op_number(CG(active_op_array)); }<br />
Copy after login


bison的 action 不都是放在一个production后面么,为什么可以在production中间加 action?我自己写的一个语法分析文件采用这种方式就会报错,why...?

parser?bison?action
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template