3
我正在做一个学术工作,我需要使用解析器和词法分析器生成器的PHP。 我在互联网上搜索,我发现this解析器和词法分析器生成器php
问题是创建语法和plex文件。 例如:
<?php
class blah {
/*!lex2php
%input $this->data
%counter $this->N
%token $this->token
%value $this->value
%line $this->line
variable = @/?:([a-zA-Z0-9_]+)/[email protected]
*/
/*!lex2php
variable {$a = 1;}
*/
}
?>
有人可以解释我的代码吗?