ian eyberg wrote:
> On Wed, Apr 15, 2009 at 10:26:58AM -0700, William H. Schultz wrote:
>
> also I do have the current list of usernames allowed for these
> actions before I start trying to figure out what action is what;
> unfortunately since everything gets tokenized BEFORE that logic
> happens it doesn't really help me out
Why does it have to be tokenized before that? Can't you add member
methods to the lexer to allow the caller to provide a list of
usernames, and have rule code like
fragment USERNAME : ;
WORD : ALPHANUM+ {if (isUsername($text)) $type = USERNAME;} ;
I haven't checked that, and there's probably some mistakes. If usernames
can have whitespace in, it might be harder... but I'm sure there's a way
around it using lookaheads.
Sam (BC)
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---