Re: Info needed on implementing Java compiler

Dima Bronnikov <Bronikov@inreach.com>
15 May 1998 22:33:37 -0400

          From comp.compilers

Related articles
Info needed on implementing Java compiler esben@post2.tele.dk (Esben Krag Hansen) (1998-05-12)
Re: Info needed on implementing Java compiler Bronikov@inreach.com (Dima Bronnikov) (1998-05-15)
Re: Info needed on implementing Java compiler ast@halcyon.com (1998-05-15)
| List of all articles for this month |
From: Dima Bronnikov <Bronikov@inreach.com>
Newsgroups: comp.compilers
Date: 15 May 1998 22:33:37 -0400
Organization: Home
References: 98-05-076
Keywords: Java

Feel free to disregard my advice since my work is not finished, but I
ended up blatantly reading in all tokens capturing classes (including
nested ones) before feeding tokens to parser. Don't remember the exact
gotcha, but Sun's nested classes made me on this one.


The other thing (pretty much obvious) is that since access to class
member may textually precede definition of the class, it necessary to
leave method bodies and fields init expressions processing until after
all classes in file have been parsed and signatures of all members in
all classes are known.


If you plan to use yacc, consider the grammar in comp.compiler archive,
it's also available (there have been two minor additions) at my page
http://home.inreach.com/bronikov/grammars/java.html


Esben Krag Hansen wrote:
>
> I need information on implementing a Java compiler, with specifics such as
> symbol table management, type-checking, abstract syntax, problems
> encountered, etc. References to papers would be great.
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.