Edit report at http://pear.php.net/bugs/bug.php?id=17382&edit=1
ID: 17382
Updated by: jespinog@gmail.com
Reported By: thuejk at gmail dot com
Summary: Empty action causes undefined function
Status: Open
Type: Bug
Package: PHP_ParserGenerator
Operating System: Ubuntu 8.04
Package Version: 0.1.6
PHP Version: 5.2.4
Roadmap Versions:
New Comment:
The patch added is for add space between { and } when it apear as {}
That fix the bug
Previous Comments:
------------------------------------------------------------------------
[2010-08-03 21:48:19] jespino
Added #patch bug:17382;patch:patch;revision:1280872099;.
------------------------------------------------------------------------
[2010-05-07 22:52:48] thue
Description:
------------
if you have an empty statement such as
a::= b. {}
Then the parser will try to call a non-existent function.
Test script:
---------------
%name TEST_
%token_prefix TEST_
%declare_class {class test}
%include {
$a = new test();
$a->lala();
}
%include_class {
public function lala() {
$this->doParse(0, 0);
}
}
start ::= . {}
Expected result:
----------------
works
Actual result:
--------------
Fatal error: Call to undefined method test::yy_r0() in test.php on line
748
------------------------------------------------------------------------