Subject: RE: [SIP] SIP Parser

From: Peter Kjellerstedt <[email-masked]>
Date: Sun, 30 Jul 2000 16:59:56 +0200

> -----Original Message-----
> From: Sean Olson [mailto:[email-masked]]
> Sent: 30 July 2000 16:45
> To: [email-masked]
> Cc: [email-masked]
> Subject: Re: [SIP] SIP Parser
> 
> > Hi folks,
> > 
> > Can someone recommend a good lexical software package 
> > (parser tool) to parse SIP messages.
> > 
> > Thanks
> > 
> > Michel Eilat
> 
> If you want to take this route, I would recommend
> 
> Flex - http://www.gnu.org/software/flex/flex.html
> for lexical analysis

And be aware that it is anything but easy to create the flex
rules to cover the entire SIP grammar, though possible...

> and
> 
> Bison - http://www.gnu.org/software/bison/bison.html
> for parsing

And I would like to recommend Lemon (not nearly as known as Bison)
for parsing. It has a nice feature that it handles destruction
of tokens that are not used (especially useful when you get a
syntax error), which makes it much easier to avoid memory leaks...
Lemon can be found at: http://www.hwaci.com/sw/lemon/
At least my parser was greatly improved when I switched to Lemon 
(from Bison ;)

> Also see the SIP grammar at:
> http://www.cs.columbia.edu/~hgs/sip/SIPgrammar.html

Which is becoming rather outdated (compared to the bis draft...)

> P.S.
> Hopefully no one will start another "dialogue" on using a tool
> versus hand-crafting a parser :)
> 
> --
> Sean Olson <[email-masked]>

//Peter

_______________________________________________
SIP mailing list
[email-masked]
http://lists.bell-labs.com/mailman/listinfo/sip