Karl Gaissmaier wrote:
hmmm, I've overseen that the global skip pattern
is qr/s*/, therefore ANDY is matched as a reserved
word too, since the token prefix can be just nothing.
To change the token prefix in the RESERVED rule
to s+ (-- see the + instead of *) should help:
Thank you very
Hi Andras
Karl Gaissmaier wrote:
hmmm, I've overseen that the global skip pattern
is qr/s*/, therefore ANDY is matched as a reserved
word too, since the token prefix can be just nothing.
To change the token prefix in the RESERVED rule
to s+ (-- see the + instead of *) should help:
Thank you
reserved_word: 'AND' | 'OR'
WORD: ...!reserved_word /[a-z0-9]+/i
Using the above grammar, rule WORD fails to match any token that start
with a reserved word (e.g. Andy). That is not what I expected since in
'demo_Cgrammar.pl', we have:
IDENTIFIER: ...!reserved_word /[a-z]\w*/i
I
code.
Best Regards
Charly
Andras
-Original Message-
From: Karl Gaissmaier [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 4:24 AM
To: PerlDiscuss - Perl Newsgroups and mailing lists
Subject: Re: Negative Look-ahead problem
PerlDiscuss - Perl Newsgroups and mailing lists