Subject: Re: suitability of lex and yacc for parsing SIP messages

From: Remon Lapid <[email-masked]>
Date: Wed, 29 Dec 1999 10:27:01 -0500

I think that lex and yacc are particularly good tools for parsing SIP
messages. The key to success is to recognize that RFC 2543, although it
appears to have the foundations of a yacc grammar, is not a suitable as
input to yacc. You will have to manually separate out those parts of the

grammar that are best expressed in lex, leveraging the strengths of both

lex and yacc where appropriate.

The main reason I like this approach is because future modifications to
the RFC might require substantial changes to the C++ implementation,
whereas this happens pretty much automatically when you use yacc/lex.
Also, verification that the parser works correctly is substantially
easier with a yacc grammar. You can almost do it by eye that way.

That's my personal opinion.

Good luck!

Remon

Remon Lapid
dynamicsoft
[email-masked]