[antlr-interest] Antlr grammar to parse Java classfile?

Robert renyedi at yahoo.com
Tue Dec 4 05:44:13 PST 2001


The package I told you about is a part of a project that me and a friend
have done some time ago. It is a relational DBMS called Tomato
(http://tomato4j.hypermart.net/). It is written in Java and includes(besides
other tools) a (hand built) compiler for a custom language. It generates
.class files. The class file generator package is a small one but it offers
sufficient functionality.

Currently, the project currently is at version 1 (beta) and it is freeware.
The good news is that we intend to release version 2 as open source - with
the compiler rewritten using ANTLR and the database engine extended with a
JDBC driver.

The release date of version 2 is unclear right now. I know ArgoUML and it is
a remarcable effort. This is why I'm going to send you (in a separate mail)
the sources of the classfile reader/writer package. It might not be the best
thing around, but it could be enough.


----- Original Message -----
From: "Andreas Rueckert" <a_rueckert at gmx.net>
To: <antlr-interest at yahoogroups.com>
Sent: Tuesday, December 04, 2001 2:43 PM
Subject: Re: [antlr-interest] Antlr grammar to parse Java classfile?

> Hi!
> On Die, 04 Dez 2001 Robert wrote:
> > Greetings!
> >
> > First of all, I don't know about the existence of such a (n ANTLR)
> >
> > I know pretty much the java .class file format. As it is straighforward,
> > have built a package that reads and writes this file format.
> What is it called? I studied some packages yesterday, but most of them are
> big or have the wrong license for my purpose.
> > Based on that experience, I think the main problem of building such a
> > grammar would be to apply a certain rule a specific number of times (for
> > instance you read the number of methods the class file holds and based
> > this number, you iterate to read every method). This is the main
> > characteristic of the .class format (as well as of many binary file
> I know. I already thought about that problem and I guess it could be
> within the production of such a rule.
> > I know that predicates are one of the features ANTLR has. I think this
> > be the only salvation... However, if you manage to find an existing
> > please let me know.
> >
> > Robert
> >
> > PS.: You may find the exact description of the .class format in the Java
> > Virtual Machine Specification.
> I studied the JVM specs before I wrote my posting. That's when I thought
> doing the parsing with Antlr should be easier than writing the parser
> Ciao,
> Andreas
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

More information about the antlr-interest mailing list