Frequently Asked Questions About Jikes Parser Generator (January 27, 1999)

## The IBM Research Jikes Compiler Project

## http://www.ibm.com/research/jikes

## Frequently Asked Questions About Jikes Parser Generator

## January 27, 1999

### What is Jikes Parser Generator?

### Why is IBM Research making the source available?

### What does IBM Research plan to do with the source?

### What can I do with the source?

### How do I compile the source?

### How do I test the parser generator?

### Do you have any program documentation?

### How do I report bugs?

### What is Jikes Parser Generator?

Jikes Parser Generator is the parser generator used by the Jikes Compiler. It takes as input an annotated version of the Java language grammar and produces as output program source and data that is part of the source for the Jikes compiler.

The current version is written in `C` and reflects its ancient origins; in particular, the parser generator was written at a time when memory was at a premium (work on it began over fifteen years ago), and was designed to be able to process a grammar for Ada in less that 300K running on an original model IBM PC.

### Why is IBM Research making the source available?

IBM Research is releasing the source for the parser generator as a companion effort to the release of the source for the Jikes Compiler. The parser generator is used to generate some of the files that comprise the Jikes parser, and so its release makes the full source of the Jikes compiler available in a form not dependent on machine-generated code.

The release of JikesTM Parser Generator does not establish a policy for the rest of IBM outside of Research, nor does it define a standard Source License for Research. Other Source agreements from IBM, including IBM Research, if and when they do come, are likely to be more restrictive with respect to commercial use -- we are allowing almost any use for Jikes because we believe it benefits the Java community and doesn't give away any intellectual property.

### What does IBM Research plan to do with the source?

We have no plans to actively work on the source right now, as we want to devote our efforts to improving the Jikes compiler.

If time permits, we would anticipate recoding the parser generator in a more modern language, most likely Java.

### What can I do with the source?

Don't forget to read the license carefully. It explains in detail what you can and cannot do.

You can pretty much do whatever you want -- as long as we get some acknowledgment. You can distribute it in binary or source form, take all or part of it and put it in something else, and then redistribute it. It's all up to you.

However, IBM retains control of the names "IBM" and "JikesTM". You can't use them without our permission.

You are under no obligation to tell us what you are doing with the source, or to inform us of any changes you make.

### How do I compile the source?

We provide a simple Makefile that works for the IBM AIX system. You will need to adapt it as necessary for other systems. This shouldn't be hard, as the parser generator is just a medium-sized `c` program that makes few demands on the standard libraries.

To build the source from scratch, do:

        cd jikespg/src
        make clean
        make

### How do I test the parser generator?

Two small example programs are included with the parser generator source: `bnf` and `expr`.

To try `bnf`, a simple demonstration of a bnf parser, do:

        cd jikespg/examples/bnf
        make
        java Main example1.bnf
        java Main example2.bnf

To try `expr`, a simple Java expression evaluator, do:

        cd jikespg/examples/bnf
        make
        java Main

and type in sample expressions, such as `2+4` when prompted.

You can also bootstrap the parser generator. First, note the size of the executable, then do:

        jikespg jikespg.g
        make

and see if the size of the executable is the same (it should be).

You can try it with Jikes as follows:

        cd jikes/src
        touch java.g
        jikespg java

The files produced by running `jikespg` should agree with the versions that were present before running `jikespg`.

### Do you have any program documentation?

All that is availalble now is the source. As is common with many works in progress, we have only had time to comment the source as it has evolved.

### How do I report bugs?

Please send mail to the mail list `jikes-bugs@watson.ibm.com`. You need to subscribe to this list before you can post mail; instructions on how to subscribe can be found at http://www.ibm.com/research/jikes/subscribe. Note that only minimal support, indeed possibly no support at all, is offered at the present time.