[antlr-interest] java.g parsing order for "extends"?

Seth Delackner seth at jtan.com
Fri Feb 22 08:11:31 PST 2002


Suppose we have the following relationship:

A.java:
public class A {
    public interface I {}
}

B.java:
public class B extends A {}

C.java:

public class C extends B {
    class inner implements I {}
}

Now, if I try to parse C.java, first I get a typeDefinition for 'C',
then it starts analyzing the object block for 'C', which contains the
declaration for 'inner'.  Shouldn't it parse B, then A, then finally get
to A's inner block?  Or does java.g already do this, and the grammar I'm
looking at, which is based loosely on java.g, is broken?

 

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



More information about the antlr-interest mailing list