This project contains a fork of CUP parser generator for Java. The CUP parser and lexer are already generated.

This library requires Java CUP Runtime, which is split off to allow lighter deployment of generated parsers: they only need to depend on the runtime.

The original code was taken from the CUP TUM SVN repository, corresponding to the released CUP version 0.11a.

Community Z Tools updates (version 0.11-a-czt01)

The official Java CUP parser generator is no longer in active development. This fork features several updates added by the Community Z Tools project:

  • Changed the java_cup.emit class to break up each case in the switch statement (each case in the parse table) into its own method. Furthermore, very large parse table definitions (e.g. action_table) are written to external files and loaded during runtime.

    These prevent do_action() method and static initialization from growing too large, thus avoiding the “code too large” Java compiler error. The error appears for very large grammars (e.g. in CZT parsers).

  • Replaced System.exit() calls on fatal errors with unchecked exception. This makes parser generation within IDEs better, since an error in generator no longer kills the IDE with it.

  • Also updated to use Java Generics and avoid other warnings.

Usage

CUP parser generator can be used standalone. Refer to the user manual for details on usage, configuration options and writing CUP specifications.

CUP Maven plugin allows using this CUP parser generator within Maven build.

License

CUP is released under CUP License (MIT-like license). See the included LICENSE file.

Back to top

Version: 0.11-a-czt02-SNAPSHOT. Last Published: 2016-04-09.

Reflow Maven skin by Andrius Velykis.