Subject: | <error: msg> does not appear |
Date: | Fri, 1 Jul 2011 11:27:11 +0100 (BST) |
To: | "bug-Regexp-Grammars [...] rt.cpan.org" <bug-Regexp-Grammars [...] rt.cpan.org> |
From: | Leigh Hebblethwaite <lhebblethwaite [...] btinternet.com> |
Hi,
Please excuse me if this is a daft question.
I have a simple grammar as an example. The grammar includes a <error:> directive. The grammar seems to be correct in that it succeeds when it should and fails when it should. However, the error message is never output.
I don't know whether this is a user error or a problem with the module.
Here is the grammar:
my $parser = qr{
<dml_proc>
<rule: dml_proc> dml <name> <dml_attr> end-dml
<rule: dml_attr> current_of_cursor
| has_returning
| uses_current_user
| <error: Invalid attribute>
<token: name> [A-Za-z0-9_]+
}xms;
Tested with the string "dml aname has_returning end-dml" the parse succeeds as it should.
Tested with the string "dml aname xxxx end-dml" the parse fails as it should. I would expect to see an error message produced by the <error: > directive as 'xxxx' does not match any of the possible attributes. I don't see this error message.
I am using Regexp::Grammars 1.012 on ActivePerl on Windows XP. Here is the 1st line output by 'perl -v': This is perl 5, version 12, subversion 3 (v5.12.3) built for MSWin32-x86-multi-thread
I attach a short script which demonstrates the problem.
Thank you for your attention. Any help is very much appreciated.
Regards,
Leigh.
Message body is not shown because sender requested not to inline it.