On Wed, Jul 12, 2006 at 08:04:01PM -0700, Chris Dolan wrote:
> As simple token containing ":i" causes PGE to crash with an attempted
> method call on Undef.
> 
> Steps to reproduce:
>    1) Create a grammar file called "foo.pg" that has one line:
>       token foo { :i a }

As I read S05, a modifier has to occur at the *very* beginning
of a regex (or group) in order to work.  In other words, no whitespace
before modifiers in a regex (because whitespace may have some
other meta-syntactic meaning with :sigspace).  Thus

    token foo {:i a }

works, while

    token foo { :i a }

is an error, since the ':' acts as a cut operator that doesn't
have anything to cut.

But I admit that since we've gone to regex/token/rule, then perhaps
leading whitespace prior to a modifier should be ignored.  That
probably needs a ruling from p6l or @Larry.

Pm

Reply via email to