SableCC 2.1 - Read Me

Welcome to SableCC version 2.1!

This is the first public release of this new Java Compiler Framework.

License

SableCC (which is contained in the sablecc.jar file) is covered by the license in the file License.html.

The general idea is as follows. SableCC is free software. You can redistribute it and/or modify it under certain conditions. Please refer to the license for the exact terms and conditions.

In case you have an unmodified version, you may contact the author and ask for a different licence. This can be useful if you want to incorporate SableCC, or parts of it, into your proprietary programs.

The sableutil.jar file and the files generated using SableCC are not covered by any license. This allows you to redistribute any program you build using SableCC under any license you want.

Documentation

To get documentation on SableCC, please visit the web site:
http://www.sable.mcgill.ca/

New:Examples

Some example grammars are included in the file examples.zip. As people send me new grammars for other languages, I will add them on SableCC home page. Please read the documentation on the web page before sending your questions.

Be warned: The Java 1.02 and Java 1.1 grammars are correct from a parsing point of view. BUT, the name of tokens, productions and alternatives should be changed and simplified before you build a compiler or pretty-printer using these grammars. For example, the existing grammars would generate the following class: AContinueStatementStatementWithoutTrailingSubstatement. This is clearly unusable!!! We have had no time to change the names and think of short and meaninful names. If someone can fix this, we will distribute the nicely named grammar to everybody.

Source Code

SableCC is distributed along with its source code. To get the source code of SableCC, you need only to uncompress the sablecc.jar file using the command:
  jar -xf sablecc.jar

Verifying the Integrity of this Distribution

If you have PGP version 5.x (USA/Canada, International), you can verify the integrity of this distribution using the signature files (*.sig). You can find the public key of the author at http://www.sable.mcgill.ca/~gagnon/pgpkey.html.

Technical Notes

  1. To run SableCC, you need to add the file sablecc.jar in your classpath. For example, on Windows 95 you would type:
      set CLASSPATH=.;c:\sablecc\sablecc.jar
  2. To run SableCC, you must type:
      java -mx1024m SableCC somegrammar.txt
    The -mx1024m is useful if you run out of memory. For small grammars, this option should not be necessary.
  3. To compile your generated compiler, you need to add the sableutil.jar file in your classpath, or alternatively, you can uncompress it using:
      jar -xf sableutil.jar
  4. The Java compiler may run out of memory. So, you should compile your program with:
      javac -J-mx1024m Main.java
    The -J-mx1024m option will help the compiler to use all available memory on your system.

Bugs and Comments

If you want to submit a bug report or give the author some comments, please visit the web site http://www.sable.mcgill.ca/.

Support

Free Peer Support

We are waiting for your suggestions and help for setting either a mailing-list or other means of helping SableCC users help each other. Please visit http://www.sable.mcgill.ca/ to get the latest information on this.

Paid Support

If you have a pressing need for SableCC to include an additional feature that is key to your work, or if you want some help with a grammar, the author is available to work under contracting terms.