##Java APG
Version: 1.0
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 (ABNF RFC5234) 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
- recently extended to accept case-sensitive literal strings in single quotes
- recently extended to 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
Directories/files: | description |
---|---|
src/apg | Java APG, the generator and the runtime library required by all generated parsers. |
src/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/examples/anbn | Comparisons the CFG and UDT parsers for the anbn, n > 0, grammar. |
src/examples/anbncn | Comparisons the CFG and UDT parsers for the anbncn, n > 0, grammar. |
src/examples/demo | Demonstrates many of the main features of Java APG including UDTs. |
src/examples/expressions | Comparisons the CFG and UDT parsers for the expressions grammar. |
src/examples/inifile | Comparisons the CFG and UDT parsers for the inifile grammar. |
src/examples/mailbox | Comparisons the CFG and UDT parsers for the mailbox grammar (). |
src/examples/testudtlib | Comparisons the CFG and UDT parsers for the suite of UdtLib UDTs. |
build/ | Scripts and files for compiling and documenting Java APG. |
LICENSE | Version 2 of the GNU General Public License. |
README.md | This file. |
Installation:
The build/
directory has scripts and files for compiling and documenting Java APG.
To compile all source code and create the package .jar
files:
cd (repo directory)
cd build
./make-jars
This will create apg.jar
and examples.jar
. To test apg.jar
run:
java -jar apg.jar /version
To test examples.jar
run:
java -jar examples.jar /help
or better
java -jar examples.jar /test=demo-ast
Documentation:
To see the documentation run:
./make-javadoc
Open ../javadoc/index.html
in any web browser. Or visit the APG website.
Copyright:
Copyright © 2011 Lowell D. Thomas, all rights reserved
License:
Java APG Version 1.0 is released under Version 2.0 or higher of the
GNU General Public License.