On Fri, Aug 04, 2006 at 01:50:19AM -0700, ambs @ cpan. org wrote: > # New Ticket Created by [EMAIL PROTECTED] > # Please include the string: [perl #40069] > # in the subject line of all future correspondence about this issue. > # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40069 > > > If we define a rule or token named 'value', things do not work. The PGE > compiler works, but then the grammar does not run. > > Probably this happens with other names as well. This should not happen.
I know what's happening, but I'm not sure how to work around it. Perhaps MMD would resolve the problem. The problem: Match objects have methods defined on them such as .from(), .to(), and .value(). As a result, defining a subrule named 'value' in a grammar is probably overriding the method of the same name defined for Match objects. The quick conclusion is that at the moment it's difficult to have rules named 'value', 'from', 'to', or any of the other predefined methods on Match objects. However, I wonder if MMD can resolve this, because then the compiler would presumably dispatch to the correct method based on the argument types. At any rate, this is definitely something we should address; it's likely to wait for some other refactors to take place. Thanks! Pm