[antlr-interest] Why won't this match...
Terence Parr
parrt at cs.usfca.edu
Sun Feb 24 16:36:47 PST 2008
oh, right.
try just
ID : ... {if ( getText() in hashtable of keywords ) _type = keyword
type; } ;
Ter
On Feb 24, 2008, at 4:34 PM, Mark Volkmann wrote:
> On Sun, Feb 24, 2008 at 6:02 PM, Terence Parr <parrt at cs.usfca.edu>
> wrote:
>>
>> On Feb 24, 2008, at 3:27 PM, Mark Volkmann wrote:
>>
>> try
>>
>>>>>> LITTLE_TOKEN : {input.LA(3)!='b'}?=> 'wi';
>
> I don't think that can be right because we want to use LITTLE_TOKEN
> even when the third character is 'b'. The criteria for choosing
> BIG_TOKEN instead of LITTLE_TOKEN is that the eigth character of
> 'wibbled' is 'd'. If it doesn't match BIG_TOKEN then we want it to
> match LITTLE_TOKEN followed by SEMI_TOKEN.
>
>>> I didn't see your post until after I sent my last post.
>>> Does that mean it isn't possible to do what Alan wants with the
>>> current lexer implementation or could the grammar be modified to do
>>> what he wants?
>
> --
> R. Mark Volkmann
> Object Computing, Inc.
More information about the antlr-interest
mailing list