On Sun, Oct 07, 2007 at 08:52:26AM -0700, Klaas-Jan Stol wrote:
> hi,
>
> while converting lang/PIR into the new Perl6Grammar syntax, I came across
> the following.
>
> token relational_operator {
> || '=='
> || '!='
> || '<='
> || '<'
> || '>'
> || '>='
> }
>
> At first, I used single bars, like '|'. However, tests failed. When
> switching the last 2 entries ">" and ">=" it worked, probably because I put
> the longest token first.
>
> Then I figured I should make explicit I want the longest token. The operator
> I should use is "||" instead of "|". However, using "||" didn't solve the
> problem when I listed ">" before ">=".
> I wonder if this is a bug, or that something else is going on.
PGE doesn't implement longest-token matching semantics yet -- it's
still up to the grammar to correctly order the tokens so that
longest tokens appear first.
Pm