I'm using PHP port of Jison to build PHP parser and It works well... but there is a little error in generated Parser class in "parse" method (I think same thing appens in JS parser but I'm not sure). The first occurence of :
$errStr = "Parse error on line " . ($yylineno + 1) . ":\n" . $this->showPosition() . "\nExpecting " . implode(", ", $expected) . ", got '" . $this->terminals_[$symbol] . "'";
references variable $yylineno but it is not defined before.
I think It misses something like :
$yyval = (object)array();
$yyloc = $this->yyloc;
// prevent PHP Error on $yylineno
$yylineno = $this->yylineno;
But I don't find how to add it in generator....
If all PHP errors are set ini php.ini, the parsing failed because $yylineno is not defined.
Thank for your help