-
Notifications
You must be signed in to change notification settings - Fork 1
Home
RY edited this page Jan 6, 2022
·
24 revisions
The Library main purpose is to provide an easy, straightforward and flexible way to map source text to a desired format with a variety of options and customizations available. Basic components which are involved in the workflow and their relationships can be demonstrated by the following diagram:

- Grammar defines the primary source mapping units(terminals) and the set of rules(productions) describing the way they're supposed to be reduced to a target structure.
- Each terminal is expressed by a regular expression and can be easily constructed from the library included primitives.
- ParserBase defines an primary abstract interface for the parser which partially has to be implemented in the custom parser, while the rest is going to be generated automatically according to the grammar provided.
- Custom parser defines a public interaction interface and also is responsible for source reduction logic.
- Final parser is a dynamic CLR type, with both lexical and syntactic analyzers generated, which guarantees all the custom defined reducers are executed in the expected order.