Related articles |
---|
Parser generator for package based protocols torbjoern.mattsson@gmail.com (2006-04-28) |
RE: Parser generator for package based protocols lowell@coasttocoastresearch.com (Lowell Thomas) (2006-04-30) |
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: | torbjoern.mattsson@gmail.com |
Newsgroups: | comp.compilers |
Date: | 28 Apr 2006 23:56:28 -0400 |
Organization: | http://groups.google.com |
Keywords: | parse, question, comment |
Posted-Date: | 28 Apr 2006 23:56:28 EDT |
Hi.
I work with a lot of different package based communication protocols
and would like to use some tool to generate parsers for these. The
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.
The data selldom has delimiter bytes after the data but instead uses
the length information in the header. The protocol is riding on other
lower protocols so they are considered error free and there is no
resending.
It seems like it should be a much simpler problem writing parsers for
this case than for languages like C so I would think that there should
exist numerous free tools to do this but so far I have found none! All
parser generators seems to require that the syntax can be described in
a way where tokens are separated by delimiter characters.
Are there really no tools for this, or are I seraching with the wrong
terminology?
What I want is a way to define the protocol in a grammar in a way that
allows the tokens to be defined by the length information in the data
before the token and generate a parser that will give me a parse tree
of the data package.
[Parser generators like yacc handle streams of tokens, not streams of
bytes, and need something else to create the token streams from the
input. To tokenize typical human-readable languages we use flex which
does regular expression matching, but it's straightforward to write
your own lexer, which I suspect is what people do here. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.