Skip to content

To compare different java parsers and parser combinators

Notifications You must be signed in to change notification settings

parseworks/java-parser-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Parser Combinator Comparison

This project is a benchmark suite for comparing different Java parser combinator libraries.

Project Structure

  • core: Contains the common interfaces for parsers (e.g., CsvParser).
  • benchmarks: The main module that runs performance tests on all implementations.
  • dot-parse: Implementation using dot-parse.
  • parseworks-impl: Implementation using parseworks.

How to add a new implementation

Anybody can contribute a new implementation by following these steps:

  1. Create a new Maven submodule: Create a new directory and add a pom.xml that inherits from the root project.
  2. Add dependencies: Add the core module as a dependency, along with your chosen parser library.
  3. Implement the interface: Create a class that implements io.github.parsercompare.TestParser.
  4. Register as a Service: Create a file src/main/resources/META-INF/services/io.github.parsercompare.TestParser in your module, and put the full name of your implementation class there.
  5. Run benchmarks: Execute mvn clean install followed by java -jar benchmarks/target/benchmarks.jar. The benchmarks.jar will automatically discover and test all implementations found on the classpath.

Running the Benchmarks

To run the current benchmarks:

mvn clean install
java -jar benchmarks/target/benchmarks.jar

About

To compare different java parsers and parser combinators

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages