SourceForge Logo

JavaCC Eclipse Plug-in and Headless Plug-in
for Eclipse 3.6+ with JDK 1.6 and JavaCC 5.0 and JTB 1.4.7

Last update : sept 25th, 2012 - version 1.5.27

The JavaCC plug-in is designed to help development of JavaCC / JTB applications within the Eclipse IDE; the headless plug-in is designed to allow headless builds.
License : GPL / Cecill

How to update / download

You can use this site as an update site in Eclipse :
add http://eclipse-javacc.sourceforge.net/ to your software update sites and follow the instructions.

Or you can download from the JavaCC Eclipse Plug-in site on SourceForge the (zipped) update site file (sf.eclipse.javacc-x.y.z-updatesite.zip),
save it under a local directory, add this directory as a local update site or add this file as an archive update site and follow the instructions.

Or you can get the source from the CVS repository and recompile the plug-ins :
see the JavaCC Eclipse Plug-in CVS information for accessing the CVS repository.
You can also look at the following tutorial on Team development with Eclipse and CVS.

These plug-ins need Java 1.6 and Eclipse 3.6+ to run.
They have been tested with Eclipse Classic 3.6, 3.6.2, 3.7, 3.7.2
They are shipped with JavaCC 5.0 and JTB 1.4.7

See (the old) readme_developer.txt  if you want a quick introduction on how to modify the sources.

The JavaCC Eclipse Plug-in provides

The JavaCC Eclipse Headless Plug-in provides

History (dd/mm/yy)

25/09/12 - 1.5.27 : Localized Call Hierarchy view tooltip texts ; updated with JTB 1.4.7 ; managed new column numbers in JTB messages ; managed multiple messages on the same line in editors ; upgraded the internal JTB grammar and the syntax coloring to handle the JTB 1.4.7 new '!' syntax for not generating a node creation ; tested on Eclipse 3.7 / 3.7.2 ; fixed properties for the wizard

29/06/12 - 1.5.26 : New contributor Bill Fenlason ; added Bill's syntax coloring rewritten code ; updated javadoc (- in @param & @throws, {@inheritdoc} instead of @see, ...) ; fixed some properties issues

03/05/12 - 1.5.25 : Added in JJReconcilingStrategy Bill Fenlason's hack proposal for syntax coloring problems ; fixed property error in JJNewPage ; fixed NPE in JJCallHierarchy ; enhanced Outline view to display identifiers and JJTree Nodes RFE 2968192 ; added "mark generated files as derived" option RFE 3314103 ; enhanced display / navigation in Outline & Call Hierarchy views ; enhanced hyperlink detection / navigation ; added default options display in JavaCC Plugin Preferences ; fixed empty default options display in JavaCC Project Options ; changed default JDK version to 1.6 ; changed plugin dependencies to at least version 3.6.0 ; updated with JTB 1.4.6 ; fixed bug 3157017

02/12/10 - 1.5.24 : Fixed NPE in JJDecorator; updated with JTB 1.4.4; built over Eclipse 3.5.2

xx/04/10 - 1.5.23 : Added spelling problem annotation hover; dropped support of Eclipse 3.4 (Galileo) and JDK 1.5 ; refactored packages and added the headless plug-in

31/03/10 - 1.5.22 : Fixed spell checking issues (non reported bugs + SR 2904433), tab issue (bugs 2961174 & 2958124), wizard template files issue (bug 2962672), comments highlighting issue (bug 2961174 + non reported bug), files regeneration warnings issue(bug 2903612), folding structure update issue (bug 1975872), refactored layouts of Preferences and Project Properties pages (added groups and tooltips), updated with JTB 1.4.3

26/02/10 - 1.5.21 : Fixed Wizard not closing on error (bug RK and SR 2956977)

25/02/10 - 1.5.20 : Fixed JTB preferences issue (for options defaulting to true), fixed extra quote in command line (bug RK and SR 2956977)

19/02/10 - 1.5.19 : Fixed project preferences issues with resulting command line options field / specific options fields / enclosing quotes for paths and files

17/02/10 - 1.5.18 : Fixed /**/ syntax coloring issue (bug 2946447), fixed missing french JTB preferences issue, fixed JTB preferences not stored issue, fixed compile annotations and hyperlink issues in JTB Editor / Console, splitted templates for static = true and static = false (bug 2951454), added spell checking (but not spell correction...), updated with JTB 1.4.1

13/11/09 - 1.5.17 : Fixed formatting / syntax coloring / outline / autoindent / call hierarchy / context menus / messages issues ; updated with JTB 1.4.0 and new options (Marc Mazas)

04/10/09 - 1.5.16 : Added support for Eclipse variables in Builder and Options ; fixed JTB jar store bug in preferences and added use of default jar when no jar is set

07/09/09 - 1.5.15 : Updated with JavaCC 5.0 and for new options, fixed running in Galileo, compiled with Java 1.5 to support Mac OS X ; Change the released zip to be a zipped update site file

23/05/09 - 1.5.14 : Added Call hierarchy view

25/04/09 - 1.5.13 : Updated JavaCC / JJTree / JTB options, New preferences, Enhanced formatting & coloring (Marc Mazas)

13/07/08 - 1.5.12 : Updated with JavaCC 4.1, added Folding, Hover, Completion proposals, and project Cleaning

08/07/07 - 1.5.10 : Fixed JJTREE_OUTPUT_DIRECTORY, NullPointerException

10/06/07 - 1.5.9 : Fixed javacc.jar to handle output directory for JJDoc

11/03/07 - 1.5.7 : Fixed suppress warnings and preserve unicode escape when formatting

26/11/06 - 1.5.6 : Restored compatibility with Eclipse 3.1 and handle case where no src/bin dir are defined

05/11/06 - 1.5.5 : Added Java 1.5 and Eclipse 3.2.1 support, fixed bug in console hyperlinks, added basic content assistant

01/10/06 - 1.5.4 : Suppressed warnings in generated files, global preferences for colors

24/05/06 - 1.5.3 : Fixed plug-in key conflict F3

27/03/06 - 1.5.2 : Removed "exclude from build" and adopted Eclipse way, ie Build Path

24/02/06 - 1.5.1 : Added French version (but the help is still in english)

13/11/05 - 1.4.0 : Added update site, automatic format, java 1.4 .class files compatibility

31/10/05 - 1.3.0 : Added JTB, Ctrl+click to open declaration, Wizard

Quick Start

1) Create a new Java project and a package "foo".

2) Select package "foo" and create a new JavaCC file. Just accept all default settings (note : the following screens are not up to date).

new project

3) You have now a new JavaCC file, compiled with JavaCC, with all the generated java files in you project.
Note that : files generated

4) Run the example :

You can do the same with the template for JJTree :



and also with the template for JTB :




Support

Feel free to report any bug or suggest enhancement at the JavaCC Eclipse Plug-in SourceForge site.

JavaCC Book

Tom Copeland wrote a very nice book on JavaCC : http://generatingparserswithjavacc.com/
A really good book, clear, well written, and full of ready to use examples.
If you need to parse a complex file format and choose JavaCC to generate the parser, this is definitely the best book.