Grammatica Features
Existing Features
This is a summary of the features currently present in
Grammatica.
-
Clean grammar syntax files
The grammar files only define the grammar, and are not
tied to the parser. This means that they can easily be used
by other applications.
-
Simple grammar definitions
The grammar is defined in a straight-forward syntax,
using regular expressions for tokens and EBNF for
productions. Also, simple tokens can be specified as quoted
strings instead of regular expressions.
-
No source code in grammars
No parser source code is present in the grammar files,
providing a cleaner separation between the grammar and the
parser.
-
Parsing though callbacks or syntax trees
It is possible to parse the grammar either through
callbacks or by traversing the syntax tree. When using
callbacks, the syntax tree creation can be avoided.
-
Support for LL(k) grammars
LL grammars with various number of look-ahead tokens
are supported. There is no need to declare the number of
look-ahead tokens needed.
-
Readable and commented output source code
The source code generated is fully readable, being
correctly indented and commented.
-
Run-time parser creation
With the Grammatica parser libraries, an ad-hoc parser
can be created at run-time without the need for generating
source code. This can be used for easier debugging of
grammars, or for creating parser interactively.
Upcoming Features
No commitment has been made regarding which new features will
be present in future releases. See the
TODO-list for a the currently known
future improvements.