Mindtraveller Messages: 917 Registered: August 2007 Location: Russia, Moscow rgn.
Experienced Contributor
BNF - special way to parse and generate raw data using some protocol. For example: http://en.wikipedia.org/wiki/Syntax_diagram#Example
Package contains classes describing BNF-articles. Each BNF-article is capable of two main functions: parsing and generation, which means converting a number of Values from/to the String. You may construct these articles using their operators, but package gives you much more powerful way. Calling CreateDefaultBNFFunctions() creates rules to construct new BNF-articles from EBNF description.
Parsing/generation process is made within primitive virtual state machine using stack and registers.
If you need custom parse/gen function working within your BNF description, you may write it and register it in runtime with bnfParseProcs.Add()/bnfGenProcs.Add() calls. There's already added bunch of functions to support binary protocols and various crc types.
It is working and it is stable. But currently I don't think that primitive stack/register virtual state machine is the best choice here. So I'd be grateful if anyone interested in optimizing the machine will do the thing. Of course, I'll be in touch and answer all the questions and/or help with upgrade to more optimized version.