ParserGen Maven Plugin

The ParserGen Maven Plugin is used for generating parsers based on Java-Cup and JFlex

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

com.github.fracpete
ArtifactId

ArtifactId

parsergen-maven-plugin
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

ParserGen Maven Plugin
The ParserGen Maven Plugin is used for generating parsers based on Java-Cup and JFlex
Project URL

Project URL

https://github.com/fracpete/parsergen-maven-plugin
Project Organization

Project Organization

University of Waikato, Hamilton, NZ
Source Code Management

Source Code Management

https://github.com/fracpete/parsergen-maven-plugin

Download parsergen-maven-plugin

How to add to project

<plugin>
    <groupId>com.github.fracpete</groupId>
    <artifactId>parsergen-maven-plugin</artifactId>
    <version>0.0.1</version>
</plugin>

Dependencies

compile (3)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 2.0.2
com.github.vbmacher : java-cup jar 11b-20160615
de.jflex : jflex jar 1.4.3

Project Modules

There are no modules declared in this project.

parsergen-maven-plugin

Maven plugin for generating parsers using JavaCup and JFlex.

Currently based on:

Example

Assuming you have your Scanner.flex and Parser.cup files in the following directory:

src/main/resources/my/project/parser

Then use the following plugin definition in the build section of you your pom.xml file:

  <build>
    <plugins>
      <plugin>
        <groupId>com.github.fracpete</groupId>
        <artifactId>parsergen-maven-plugin</artifactId>
        <version>0.0.1</version>
        <configuration>
          <directories>
            <directory>${project.basedir}/src/main/resources/my/project/parser</directory>
          </directories>
        </configuration>
      </plugin>
    </plugins>
  </build>

Using mvn parsergen:build will place the generated Java code of the parser in package my.project.parser (the corresponding directory to resources/my/project/parser is java/my/project/parser).

Note: The directory tag can be supplied multiple times, in case you need to compile multiple parsers.

Versions

Version
0.0.1