![]() |
![]() |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
TParserAll This non-visual component is designed especially for programmers that need parsing power without having to understand parsing theory or deal with code generators. It requires a Backus-Naur Form grammar to work. Since you can define a grammar for all situations, TParserAll can parse all you can imagine. The grammar is a TStrings object accessible at run-time and design-time through the BNF property. In design-time, the grammar is supported by a powerfull property editor with color syntax highlighting and real time grammar validation. Also allows the programmer to test the grammar and to debug it, in order to find out why a specific non-terminal did or did not recognized the data.
Syntactically, a BNF grammar defines a set of productions (or rules) consisting of a non-terminal followed by the symbol ::= and a combination of terminals and non-terminals. A terminal is an atomic token, like a digit, and a non-terminal is a high level symbol that ultimately expands into a series of tokens, such as a mathematical expression. All non-terminals are delimited by '<' and '>'. For example, here is one grammar that might be used by TParserAll for automatic recognition of a person's last name, first name and middle initial:
The above grammar is able to recognize the parts of a name from, for example: Lewis, Jay Lewis, Jay R Jay R Lewis Jay Lewis Jay or even with no spaces or extra spaces between, Lewis,Jay R This grammar is available in the downloaded Demo. More information regarding BNF grammars is available in the component help. Technology TParserAll is an efficient, general-purpose, top-down parsing engine with pratically unlimited backtracking capability, that uses a LL(1) grammar. It is a top-down parser, so it doesn't support immediate left recursions. Instead, TParserAll can find and warn you of both immediate and hidden left recursions in your grammar so that they can be easly changed. Most Important Features Grammar defined by the user - For a new parsing task, the engine doesn't change, you just load a new grammar; Powerfull property editor for the grammar definition, grammar testing and debugging; Grammar syntax highlighting; Extensive and fast grammar validation; Methods for data streams also available for file streams; Simplicity of use; On-line help. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Web hosting by WebStrikeSolutions |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||