Parsing is the process of analysing a string of characters according to the rules of a formal grammar. Parsing a Compositional Grammar expression involves processing the expression string, using the ABNF syntax defined in chapter 5, and breaking it into its constituent parts. This creates a representation of the expression that can be further processed. Parsing an expression is required to perform syntactic validation, concept model validation, translation, querying or classification.
A number of parser development tools are available which can generate a parser from a context-free grammar written in ABNF, such as the one defined in this document. These tools include:
Please note, the ABNF syntax defined in this specification was tested using the APG Parser Generator1 .
Other non-ABNF parser generators are also available which can be used with an alternate syntax representation – for example:
Some of these tools (e.g. XText and ACE) can also be used to generate authoring environments with features such as syntax highlighting and autocompletion.
Alternatively, an expression parser can be created manually using a programming language such as Perl or C++.