[antlr-interest] Tokens and context

John Lam jlam at iunknown.com
Mon Jul 15 12:15:35 PDT 2002

I've been scratching my head over this one. Here's the general problem:
I want to be able to use "*" as a wildcarding character. The problem is
that it can be treated as either a token or as part of an identifier.

public void System.Foo();

I would also like to find this method using the following expressions:

[1] * void System.Foo();
[2] public void *();
[3] public void System.*();
[4] public void S*.*();

The problem is that * is treated as a token in [1] and as part of the
identifier in cases 2-4. 

Is there a general solution to this problem? Currently I'm using a
really crufty hack that involves creating a new token ("any") to
represent * in the accessibility modifiers.




Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

More information about the antlr-interest mailing list