The CZT ParserGen Maven plugin is used to generate source files for CZT parsers and parser generators.

CZT parsers share a lot of similarities among different Z extensions and the differences may appear in the middle of the parser for specific extensions. For that reason, the corresponding classes and sources are defined as single parser definition files for every dialect.

The ParserGen plugin slices such XML definitions based on dialects listed in configuration, producing dialect-specific parser source files. The approach is used to generate Java source files as well as CUP or JFlex specifications for each dialect.

Goals overview

The ParserGen plugin only has one goal:

  • parsergen:generate attempts to generate source files for different CZT parser generators by splitting the corresponding XML definition files.


Refer to goal description for the list of all configuration options for ParserGen plugin.

        <!-- Configure the plugin: mandatory and optional parameters -->

The XML definitions for ParserGen plugin feature <add:dialect></add:dialect> code blocks to indicate that this part must be included when corresponding dialect source file is being generated. An excerpt from a sample definition file is given below:

<?xml version="1.0" encoding="UTF-8"?>
<utils xmlns:add="">
/* */
package <package/>;

import net.sourceforge.czt.util.Section;

import net.sourceforge.czt.z.jaxb.JaxbXmlReader;
import net.sourceforge.czt.circus.jaxb.JaxbXmlReader;

Back to top

Version: 1.6-SNAPSHOT. Last Published: 2016-04-09.

Reflow Maven skin by Andrius Velykis.