Giter Club home page Giter Club logo

apg-java's Introduction

Java APG

Version: 1.1.1

Note: Version 1.1.0 updates version 1.0 in a couple of ways. Primarily, the license is changed to the more permissive 2-Clause BSD license. Also, in the installation section below are instructions on how to include Java APG in a maven project. I want to thank Raviteja Lokineni (@bond-) for suggesting these changes and especially Stephen Sill II (@ssill2) for his friendly and expert nudging of me up the maven learning curve. (See issue #6.)

Description:

  • Java APG is APG - an ABNF Parser Generator written completely in the Java language.
  • generates parsers in Java
  • generates language parsers and translators from a superset of the Augmented Backus-Naur Form (RFC5234 and RFC7405) grammar syntax
  • accepts valid ABNF grammars
  • accepts AND & NOT syntactic predicate operators for conditional parsing based on specified, look-ahead phrases
  • accepts User-Defined Terminals (UDTs) which allow user-written, non-Context-Free phrase recognition operators
  • user-written callback functions provide complete monitoring and flow control of the parser
  • accept case-sensitive literal strings in single quotes
  • accept multiple input ABNF grammar files
  • optional generation of an Abstract Syntax Tree (AST)
  • translation of the AST with user-written callback functions
  • extensive tracing facilities
  • statistics gathering for a full picture of parse tree node coverage
  • extensive attribute generation for an overview of the grammar's characteristics
For more details see the documentation or visit the APG website.
Directories/files: description
src/main/java/apg Java APG, the generator and the runtime library required by all generated parsers.
src/test/java/examples/ Examples to demonstrate how to set up and use a Java APG parser. The main function here is the driver for running any and all of the following examples. See javadoc examples.Main for a complete list of the tests that it runs.
src/test/java/examples/anbn Comparisons the CFG and UDT parsers for the anbn, n > 0, grammar.
src/test/java/examples/anbncn Comparisons the CFG and UDT parsers for the anbncn, n > 0, grammar.
src/test/java/examples/demo Demonstrates many of the main features of Java APG including UDTs.
src/test/java/examples/expressions Comparisons the CFG and UDT parsers for the expressions grammar.
src/test/java/examples/inifile Comparisons the CFG and UDT parsers for the inifile grammar.
src/test/java/examples/mailbox Comparisons the CFG and UDT parsers for the mailbox grammar ().
src/test/examples/testudtlib Comparisons the CFG and UDT parsers for the suite of UdtLib UDTs.
build/ (Deprecated carried over from non-maven build) Scripts and files for compiling and documenting Java APG.
LICENSE.md 2-Clause BSD license.
README.md This file.

Installation:

git clone https://github.com/ldthomas/apg-java.git
cd apg-java
git checkout maven
mvn clean install

This will do the following:

  • Build the library jar under target.
  • Execute unit tests.
  • Generate javadoc under target/site/apidocs
  • Install the jar in the local maven repository for use by other projects that need apg-java as a dependency.

To use apg-java in your project just modify the project's pom.xml file to include the following dependency.

<dependencies>
    <dependency>
       <groupId>com.ldthomas.apg</groupId>
       <artifactId>apg-java</artifactId>
       <version>1.1.1</version>
    </dependency>
</dependencies>

See the maven.md for details on how to run the examples in a NetBeans maven project.

NOTE: A second branch, maven, has been added which is a complete maven project for apg and the examples. It was created by Stephen Sill II on his apg-java fork. It has updates to satisfy some of the security items flagged by Fortify security scans. The Fortify updates have not been integrated into the master branch.

To see the documentation open the following file in a web-browser.

target/site/apidocs/index.html

Or visit the APG website.

Copyright:
Copyright © 2021 Lowell D. Thomas, all rights reserved

License:
Java APG Version 1.1.0 is released under the 2-Clause BSD license.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.