- 1,501 views
Grammar builder is a java deserializer that allows you to specify your own syntax.
Essentially, it allows you to specify elements of a grammar using java annotations.
Generally when specifying a language, one would write a grammar for that language, and then create a number of classes representing the syntax tree of that language. Since the structure of the syntax tree often replicates the structure of the grammar, there is duplicate information about the structure of the language. Grammar builder attempts to simplify this process by eliminating the need to create both a grammar and an abstract syntax tree.
Instead, users need only specify the abstract syntax tree and annotate it, showing Grammar builder exactly how to parse it.