WPF Syntax Parsing Engine
The Syntax Parsing Engine is a robust technology that processes text and devises, based on the rules of the grammar provided to the engine, tokens that have meaning for syntax analysis processes. It includes find and replace functionality, error reporting, document navigation, and more. The Syntax Parsing Engine fully supports EBNF based language and can parse it into proper tokens, keywords, and constructs.
The Syntax Parsing Engine processes text and creates meaningful tokens based on the rules of the grammar provided to the engine. The tokens generated by the lexing process are then used to apply syntax analysis to the document text based on the language specified. The parser is a high performance engine that works for both deterministic and non-deterministic (i.e. ambiguous) grammars.
The Syntax Parsing Engine provides the ability to search a document for instances of text that match search criteria using methods such as Find, FindReplace, FindAll, and FindReplaceAll. Specify how to perform the search by providing the direction (forward or backward), case sensitivity, whole word or partial word, the text to find, or a regex pattern.
Syntax Tree/Error Reporting
The Syntax Parsing Engine exposes a syntax tree of the text document, which represents the syntactic structure of the text rules of the language provided to the engine. The syntax tree marks invalid nodes as errors and they can be accessed by using methods exposed by the API down to a given character range.
Scan through lines, tokens, and words with a simple API. Go to the start or end of a document, go to a specific line, token, or word. Find where you are in a document and continue to examine the previous or next tokens or words without changing the current position.
Just feed in a language’s EBNF and the syntax library will be able to parse it through and recognize the keywords, tokens and language construct from it. The Plain Text, C#, and VB languages are supported out of the box. Fully supports ISO EBNF notation (ISO-14977:1996(E)).