Tech Support > Computers & Technology > Programming > Generic protocol builder/parser
Generic protocol builder/parser
Posted by oshaer@nds.com on April 28th, 2008


Hello everyone.

In my work many people (including me) need to write a parser and/or a
builder for a certain application-layer protocol.
We work with both ASCII and binary protocols. The protocols are
usually dynamic and have many variations according to certain
parameters.

Each programmer implements the needed componenet independently, in a
different style, using different concepts.

Is it reasonable to try and suggest a generic framework for parsing
and building various protocols?
Do you have any suggestions for a concept?
Do you know of any existing framework or tool that might help?

Thanks.
Oshaer.

Posted by Phlip on April 28th, 2008


Uh, in the same team?


Posted by oshaer@nds.com on April 28th, 2008


On Apr 28, 5:13*pm, Phlip <phlip2...@gmail.com> wrote:
No, in the same department. I work at the infrastucture & tools team,
and I would like to suggest a general solution.
I am not talking about diffrerent implementations of the same
protocol, but about diffrenets attitudes when working on the same
general task.

Thanks

Posted by rossum on April 28th, 2008


On Mon, 28 Apr 2008 07:10:43 -0700 (PDT), oshaer@nds.com wrote:

to your requirement. BNF-style input and a parser in C as output.

rossum


Posted by kwikius on April 28th, 2008



"rossum" <rossum48@coldmail.com> wrote in message
news:2nob145o2nupvul5kqsoe1d36s8cj1gst7@4ax.com...
Coolest parser IMO is SLK (use Flex for lexer

http://home.earthlink.net/~slkpg/

works intimately and scaleable with C, C++ Java and C#, ( not minging ugly
macro munging like YACC)

Uses LL(k) grammars ... the Only grammars for the true grammar aesthete.

regards
Andy Little






Posted by Jon Harrop on May 1st, 2008


oshaer@nds.com wrote:
Use a functional language like OCaml, Haskell or F# and write parser
combinators. This gives you more potential for reuse than any other
approach.

--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u

Posted by oshaer@gmail.com on May 11th, 2008


On May 1, 6:54*pm, Jon Harrop <j...@ffconsultancy.com> wrote:

Hi
Can you please elaborate on this? Why do you think this is the best
approach? What do you mean by 'parser combinators?'

Thanks.

Posted by Gene on May 11th, 2008


On Apr 28, 10:10*am, osh...@nds.com wrote:
This is a kind of problem that XML and the related schema and
transformation languages were meant to solve. YMMV with respect to
performance, of course.