These are fair observations. In fact SIP ABNF is not LL(1) therefore
you cannot easily build a parser for it using a parser generator.

The ABNF is context sensitive. If you want to build a parse for it
using parser generators, I have built one using antlr but it is so
convoluted and slow that I gave up. Best parse sip by hand.

Ranga

On Wed, Mar 26, 2008 at 5:29 PM, Paul Kyzivat <[EMAIL PROTECTED]> wrote:
> You could make the same argument about C or Java. They would (arguably)
>  be easier to compile if you only allowed whitespace in a much more
>  restricted set of places.
>
>  I think this is more a matter of how the syntax is described, rather
>  than what it allows. Most parsers that I know of distinguish lexical
>  processing from parsing. If you do that, each becomes simpler. But the
>  3261 syntax in ABNF encompasses both, and is more complex as a result.
>
>  I think you might find that if you manually transformed the syntax,
>  splitting off a lexical phase, you wouldn't see the same complexity.
>
>  In any case, the form of the syntax is now institutionalized and won't
>  be changed any time soon.
>
>         Paul
>
>
>  Iñaki Baz Castillo wrote:
>  > El Wednesday 26 March 2008 14:50:45 Iñaki Baz Castillo escribió:
>  >
>  >> Am I the only who thinks that SIP could be really much easier than it's 
> now
>  >> just by doing it less permissive?
>  >
>  > More things:
>  >
>  >
>  > - Why line folding allows any number of space or tab at the beggining of 
> the
>  > line instead of just a single space?
>  > -------------------------------------------------------
>  > Subject: This is the
>  >  subject in
>  >         line
>  >                       folding
>  > -------------------------------------------------------
>  > In fact, when it's rebuilt in the UAS any number of spaces at the line 
> start
>  > is converted into a single space:
>  > -------------------------------------------------------
>  > Subject: This is the subject in line folding
>  > -------------------------------------------------------
>  >
>  >
>  > - Why host:port allows any number of spaces, tabs, CRLF between "host" and 
> ":"
>  > and between ":" and "port"?
>  > -------------------------------------------------------
>  > 192.168.1.33
>  >      :
>  >                               5061
>  > -------------------------------------------------------
>  > Wouldn't it be much easier if there couldn't be any space between them?
>  > -------------------------------------------------------
>  > 192.168.1.33:5061
>  > -------------------------------------------------------
>  >
>  >
>  > Best regards.
>  >
>
>
> _______________________________________________
>  Sip-implementors mailing list
>  Sip-implementors@lists.cs.columbia.edu
>  https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors
>



-- 
M. Ranganathan

_______________________________________________
Sip-implementors mailing list
Sip-implementors@lists.cs.columbia.edu
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors

Reply via email to