我試圖使用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