[antlr-interest] reference tokens{} in other files
John Ridgway
john.ridgway at trincoll.edu
Fri Nov 2 10:08:17 PDT 2007
but
case fooParser.DUMMY:
works? and fooParser is in the unnamed package (doesn't have a
package statement)?
Peace
- John
On Nov 2, 2007, at 5:49 AM, Michael LeBlanc wrote:
> On Nov 1, 2007, at 5:51 PM, John Ridgway wrote:
>
>> I haven't tried it, but shouldn't
>> import static fooParser.*;
>> work?
>
> $ javac -Xlint:unchecked -cp .:/Applications/.../antlrworks.jar
> Test.java
> Test.java:6: package fooParser does not exist
> import fooParser.*;
> ^
> Test.java:22: cannot find symbol
> symbol : variable DUMMY
> location: class Test
> case DUMMY:
> ^
>
> $ ls -l fooParser*
> -rw-r--r-- 1 mike staff 2804 Nov 1 16:42 fooParser$DFA14.class
> ...
> -rw-r--r-- 1 mike staff 56905 Nov 1 16:42 fooParser.class
> -rw-r--r-- 1 mike staff 163463 Nov 1 16:42 fooParser.java
>
> With "import static fooParser.*;", the first error changes to
>
> Test.java:6: cannot find symbol
> symbol: class fooParser
> import static fooParser.*;
> ^
>
More information about the antlr-interest
mailing list