parser and lexer generator php
<p>I am doing a academic work that I need to use parser and lexer generator for php.
I searched on the internet and I found <a href="http://pear.php.net/package/PHP_ParserGenerator/docs/latest/" rel="nofollow">this</a></p>

<p>The problem is create the grammar and plex file. 
For example:</p>

<pre><code>&lt;?php
class blah {
/*!lex2php
%input $this-&gt;data
%counter $this-&gt;N
%token $this-&gt;token
%value $this-&gt;value
%line $this-&gt;line
variable = @/?:([a-zA-Z0-9_]+)/?@
*/
/*!lex2php
variable {$a = 1;}
*/
}
?&gt;
</code></pre>

<p>Someone can explain me that code please?</p>
