Re: Java Compiler Documentation

"Scott Stanchfield" <>
26 Jul 1998 13:31:49 -0400

          From comp.compilers

Related articles
Java Compiler Documentation (Kerry Benefield) (1998-07-26)
Re: Java Compiler Documentation (Scott Stanchfield) (1998-07-26)
Re: Java Compiler Documentation (Cathal McCarron) (1998-07-27)
Re: Java Compiler Documentation (1998-07-28)
| List of all articles for this month |

From: "Scott Stanchfield" <>
Newsgroups: comp.compilers
Date: 26 Jul 1998 13:31:49 -0400
Organization: MageLang Institute -
References: 98-07-185
Keywords: Java

>For my project towards an MSc I'm taking I have to modify the Java
>compiler to introduce a form of assertion support.

Be careful of licensing issues here -- did you get the javac compiler
source from Sun? The source license is pretty restrictive. AFAIK,
there are no docs on it.

Also -- you may be better off writing a pre-processor to do assertion
processing. (Stick in method calls for assertion constructs).

Pre-processors are used quite a bit for this sort of thing -- also,
saying that you're modifying the compiler to support a superset of
Java can leave a very bad taste in many people's mouths -- this is
more like changing the Java language, which is a big no-no. A
pre-processor makes it clear that the feature isn't part of the real
language, just an add on.

BTW: There's a java 1.1 grammar (with a few minor bugs) for ANTLR 2.x at which might provide a decent starting point...)
-- Scott

Scott Stanchfield, Santa Cruz, California, USA

Post a followup to this message

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