Subject: Re: [Re: [Re: SEP vs. LWSP]]

From: Nissim Buskila <[email-masked]>
Date: Thu, 14 Oct 1999 10:52:32 ASIA/TEL_AVIV

Once again, it it possible to have the following message header:
MECACO/1.11            [10.10.10.10]:222...
There are 12 spaces between the Version token and the mId token. Given the
current grammar both the LWSP and SEP will match. Will the lexer match LWSP or
SEP is unknown.
I'm sure that there are ways to still make this all work using the current
grammar, but the effort certainly does not worth it.

Nissim.

"Abdallah Rayhan" <[email-masked]> wrote:
> I dont see the source of confusion. SEP and LWSP dont appear together.
> If you get SEP then you must have a space or EOL separator between two
> tokens that can not be separated otherwise. SEP appears only in three
places
> of the ABNF. Once a separator occurs, apply LWSP for whatever you see
> if applies. In your example, first space belongs to (WSP | COMMENT | EOL)
> in SEP, the rest belongs to LWSP.
> 
> SEP = (WSP | EOL | COMMENT) LWSP
> 
> regards
> 
> Abdallah Rayhan
> 
> Nissim Buskila wrote:
> 
> > Well, I'm getting a little bit confused here. Suppose you have a sequence
of 4
> > spaces. Given that, LWSP will match (there are 4 spaces), as well as SEP
will
> > match (there are more than 1 spaces).
> > How can you distinguish between LWSP and SEP???
> >
> > Nissim.
> >
> > "Abdallah Rayhan" <[email-masked]> wrote:
> > >
> > > The answer is yes, we need the two. There is difference between LWSP
and
> > SEP.
> > > LWSP means zero or more space, and SEP is at least one space. Why at
least
> > one ?
> > >
> > > Because between authenticationHeader and message there is no separator.
> > > You find separators in "=", ":" ,"}" ," {" , "," , etc. Between the
header
> > and
> > > message
> > > there is not one like that, therefore we need to insert the space to do
it.
> > > Otherwise you can not tell where the header ends and where the message
> > starts.
> > > Same thing applies to Version and mId.
> > >
> > > regards
> > > Abdallah
> > >
> > > Nissim Buskila wrote:
> > >
> > > > Do we really need both the SEP and LWSP tokens??? The SEP token is
only
> > used
> > > > twice in the whole ABNF. IMHO we need to consolidate them into a
single
> > > > token.
> > > >
> > > > Nissim.
> > > >
> > > > ____________________________________________________________________
> > > > Get free email and a permanent address at
http://www.netaddress.com/?N=1
> >
> > ____________________________________________________________________
> > Get free email and a permanent address at http://www.netaddress.com/?N=1

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

---

From: Chip Sharp <[email-masked]>
Date: Thu, 14 Oct 1999 09:21:44 -0400

At 10:52 AM 10/14/99 +0000, Nissim Buskila wrote:
>current grammar both the LWSP and SEP will match. Will the lexer match
>LWSP or SEP is unknown.

Is it important to know the difference if both match?  All that matters is
that a space (or one of the other elements) is legal.
Tim Vetter's suggestion of
SEP = 1*(WSP | COMMENT | EOL)
would seem to be a more efficient production, but I don't think it changes
the meaning of anything.
If you don't want to change LWSP throughout the document you could just
change the LWSP production to be:
LWSP = *(SEP)
:-)

Or use Tim's idea of including a [SEP] instead of LWSP in the ABNF.
While this provides more efficient ABNF (fewer productions) I don't see
that it changes the grammar.

Chip

>http://www.netaddress.com/?N=1

Support NetAid!  http://www.netaid.org
--------------------------------------------------
Chip Sharp                 Consulting Engineering
Cisco Systems              Telco Bio-region
Reality - Love it or Leave it.
--------------------------------------------------