我试图使用Parse::RecDescent做一个解析器,它可以解析括号表达式和一元运算符?。 我至今是当我创建解析器,因为该规则expression是左递归失败: use strict;
use warnings;
use Parse::RecDescent;
my $test = <<END;
((foo)? bar)
END
my $grammar = q(
pars
我正在使用Perl中的Parse::RecDescent解析器,而且我似乎从中获取信息的时间最为可怕。网上很容易获得的信息似乎没有不平凡的例子。 下面是代码: event_function: object_list ':' event_list ';'
<defer:
{ #item is a special character with Parse::Recdescen
我设法使用的所有功能是STRING,PARAMS,VARIABLE和FUNCNAME FUNCTION似乎存在问题,但我无法看到它。 use strict;
use Parse::RecDescent;
$::RD_ERRORS = 1; # Make sure the parser dies when it encounters an error
$::RD_WARN = 1; # En