The grammar notation is based on general scannerless context-free grammars with various extensions (ignorable entities, equality entities, regular expression terminals, unordered productions, and production priorities). The parser is an eager variant of Earley's algorithm. (The parser is not intended to be particularly efficient - its main goal is to work as a foundation for the XSugar tool and the ambiguity analyzer.) The grammar ambiguity analyzer uses the ACLA technique (Ambiguity Checking with Language Approximations) described in the research paper "Analyzing Ambiguity of Context-Free Grammars" (see below).
- View the online javadoc API specifications.
- grammar.jar - precompiled Java archive, or
- grammar-all.jar - full jar including necessary libraries (dk.brics.automaton and JSA)
The tool can be used from the command-line:
java -jar grammar-all.jarRun without arguments to start the GUI version; run with option -h to see the command-line usage. For viewing parse trees in the GUI version, you need Graphviz dot.
- See the description of the textual notation of grammars.
- Source code is available on request.
- Read the research paper:
Analyzing Ambiguity of Context-Free Grammars
[ abstract |
You may also be interested in reading Michael Kruse's B.Sc. thesis [ PDF ]