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 this
The problem is create the grammar and plex file. For example:
<?php
class blah {
/*!lex2php
%input $this->data
%counter $this->N
%token $this->token
%value $this->value
%line $this->line
variable = @/?:([a-zA-Z0-9_]+)/?@
*/
/*!lex2php
variable {$a = 1;}
*/
}
?>
Someone can explain me that code please?