SourceForge Logo

JavaCC Eclipse Plug-in and Headless Plug-in
for Eclipse 3.7+ with JDK 1.7+ and JavaCC 5.0+ and JTB 1.4.11

Last update: nov 13th, 2015 - version 1.5.32

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 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 (,
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.

The plug-in needs Java 1.7+ and Eclipse 3.7+ to run.
It has been tested with Eclipse Classic 3.7.2 (Indigo), 4.2.2 (Juno), 4.3.2 (Kepler), 4.4.0 (Luna).
It has some compatibility issues with Eclipse 3.6- and 4.1.2.
It is shipped with JavaCC 5.0 and with JTB 1.4.9.
Also are shipped JavaCC 4.2, JavaCC 6.0 and JTB 1.4.7 for the ones who need different versions (JTB 1.4.8 had a regression issue).

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 depends since 1.5.28 from the JavaCC Plug-in, and provides

Changes history (dd/mm/yy)

13/11/2015 - 1.5.32
added spaces between < > and token when inserting through completion proposal;
after formating the cursors stays on the line it was, no more goes to end of file;
suppressed extra option in JJTree options proposal;
added / improved @SuppressWarnings annotations in derived classes;
put the hovers (on code and comments) back in place;

??/??/2015 - 1.5.31
fixed a problem when navigating to private labels;

27/01/2015 - 1.5.30
fixed a regression problem on the compile commands;
fixed a jar path problem on the wizard (bug #88);

18/01/2015 - 1.5.29
fixed a problem on the compile commands (see discussion / help;
configured now to use a JavaSE 1.7 and no more a 1.6 (as 1.6 became obsolete);
updated with JTB 1.4.9;

08/11/2012-30/12/2014 - 1.5.28
updated with JTB 1.4.8;
added the "JVM Options" option and the "Keep deleted files in history" option (default set to false) in the Global Options Tab of the project preferences;
added (JavaCC) parsing problems in JTB hyperlink reporting;
fixed problems markers not showing in derived .jj file issue;
fixed cursor position issue in content assist;
sorted and revised (to be much more accurate and context dependent) the content assist proposals list;
revised the outline view (added nodes and the no node creation flags, added synchronization with the editor, added node highlighting in the outline when double-clicking and modifying in the editor);
revised the call hierarchy view, added synchronization with the editor;
revised the icons transparency;
internal refactoring on file names and package contents; removed JTBEditor subclasse; switched from actions, actionSets, actionSetPartAssociations, editorActions, viewActions and popupMenus to expressions, handlers and menus; added a JavaCC menu in the menu bar and in the toolbar;
made the annotation markers summarizable ; fixed markers deletion;
added the PARSER_BEGIN node to and removed the JAVACODE node from the foldable nodes set;
fixed nature and builder ids (seen in .project);
added next/previous navigation for annotations;
rewrote logs, produced them in the Error Log, added the plugin's version, the stacktrace and context data;
added the generated file filter in the Project Explorer view and removed it from the Outline view;
added in Package and Project Explorer view a button to suppress all generated files in the selected package;
fixed some issues on clearing the JavaCC console after file deletions on automatic builds;
improved displays in the JavaCC console (timestamp, messages);
fixed issues in the JavaCC "options" section (display in the Outline, completion proposals);
added comments folding and fixed the other foldings in one line instead of two;
fixed the templates to reflect the change of the parser name;
fixed some icons in the Outline and the Call Hierarchy views;
fixed some synchronization and display issues (highlight, background color) around selections in the JJEditor, Outline and Call Hierarchy views;
changed the action (from double-click to single-click) in the JJEditor to display a node in the Outline view;
fixed bug #56 "NPE dragging a jj/jjt/jtb file in Eclipse plugin" by adding the drag and drop capability (opening of JJEditor, proper interaction with the Call Hierarchy view, and disabling of compile commands;)
added the OUTPUT_LANGUAGE option (form JavaCC 6.0+; but not yet the ability for JTB to generate C++ classes);
improved displaying the line in error in the JJEditor when clicking on the error in the Outline view;
fixed issues in the completion proposals computation when the grammar file is empty or almost empty;
refactored some packages and classes to simplify the common and different code from the normal and the headless plugin

25/09/2012 - 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/2012 - 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/2012 - 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/2010 - 1.5.24
fixed NPE in JJDecorator; updated with JTB 1.4.4; built over Eclipse 3.5.2

xx/04/2010 - 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/2010 - 1.5.22
fixed spell checking issues (non reported bugs + SR 2904433);
fixed tab issue (bugs 2961174 & 2958124);
fixed wizard template files issue (bug 2962672);
fixed comments highlighting issue (bug 2961174 + non reported bug);
fixed files regeneration warnings issue(bug 2903612);
fixed 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/2010 - 1.5.21
fixed Wizard not closing on error (bug RK and SR 2956977)

25/02/2010 - 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/2010 - 1.5.19
fixed project preferences issues with resulting command line options field / specific options fields / enclosing quotes for paths and files

17/02/2010 - 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/2009 - 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/2009 - 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/2009 - 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;
Changed the released zip to be a zipped update site file

23/05/2009 - 1.5.14
added Call hierarchy view

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

13/07/2008 - 1.5.12
updated with JavaCC 4.1, added Folding, Hover, Completion proposals, and project Cleaning

08/07/2007 - 1.5.10
fixed JJTREE_OUTPUT_DIRECTORY, NullPointerException

10/06/2007 - 1.5.9
fixed javacc.jar to handle output directory for JJDoc

11/03/2007 - 1.5.7
fixed suppress warnings and preserve unicode escape when formatting

26/11/2006 - 1.5.6
restored compatibility with Eclipse 3.1 and handle case where no src/bin dir are defined

05/11/2006 - 1.5.5
added Java 1.5 and Eclipse 3.2.1 support;
fixed bug in console hyperlinks;
added basic content assistant

01/10/2006 - 1.5.4
added suppressed warnings in generated files;
added global preferences for colors

24/05/2006 - 1.5.3
fixed plug-in key conflict F3

27/03/2006 - 1.5.2
removed "exclude from build" and adopted Eclipse way, ie Build Path

24/02/2006 - 1.5.1
added French version (but the help is still in english)

13/11/2005 - 1.4.0
added update site, automatic format, java 1.4 .class files compatibility

31/10/2005 - 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:


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:
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.