Parse::RecDescent grammar not working as expected
问题 All I managed to get working is STRING, PARAMS, VARIABLE and FUNCNAME There seems to be a problem with FUNCTION, but I just can't see it. use strict; use Parse::RecDescent; $::RD_ERRORS = 1; # Make sure the parser dies when it encounters an error $::RD_WARN = 1; # Enable warnings. This will warn on unused rules &c. $::RD_HINT = 1; # Give out hints to help fix problems. my $grammar = <<'_GRAMMAR_'; SCRIPT : INSTRUCTION(s /;/) INSTRUCTION: FUNCTION | VARIABLE "=" FUNCTION FUNCTION : FUNCNAME "[