Related articles |
---|
Parser generator for package based protocols torbjoern.mattsson@gmail.com (2006-04-28) |
Re: Parser generator for package based protocols cfc@shell01.TheWorld.com (Chris F Clark) (2006-04-30) |
Re: Parser generator for package based protocols DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-05-09) |
Re: Parser generator for package based protocols Meyer-Eltz@t-online.de (Detlef Meyer-Eltz) (2006-05-12) |
From: | Detlef Meyer-Eltz <Meyer-Eltz@t-online.de> |
Newsgroups: | comp.compilers |
Date: | 12 May 2006 00:48:07 -0400 |
Organization: | Compilers Central |
References: | 06-04-169 |
Keywords: | parse, lex |
Posted-Date: | 12 May 2006 00:48:07 EDT |
>>protocols are normally in the form of header+data where the header
>>describes the length and type of the data and the data can contain
>>new
>>header+data structs.
>>Are there really no tools for this?
With the TextTransformer
http://www.texttransformer.com // english
http://www.texttransformer.de // german
- sorry: not free - you can do something like
{{
node n("root"); // root node of the parse tree
int iSize =
}}
Header // production for the header
{{
// call a sub-parser with the data-text
Data(State.text(State.Position(), State.Position() + iSize), n);
// set the new position in the input and
// recalculate the next token by:
State.SetPosition(State.Position() + iSize);
}}
Regards
Detlef Meyer-Eltz
Return to the
comp.compilers page.
Search the
comp.compilers archives again.