[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: RFC2252 wshp and other ABNF issues



An alternative to backslash escaping is to repeat the quote character when
it appears in the data string. So the string "this ain't good" becomes
'this aint''t good' and "this is 'bad' too" becomes 'this is ''bad'' too'.
There is no need to escape the escape character with this scheme.

On parsing, if a quote is encountered the next character is considered.
If it is another quote, accept it and continue parsing the string. Anything
else and it must be the end of the string. There needs to be a separator
between successive quoted strings in the value encoding. A mandatory space
is sufficient.

Regards,
Steven

> -----Original Message-----
> From: owner-ietf-ldapbis@OpenLDAP.org
> [mailto:owner-ietf-ldapbis@OpenLDAP.org]On Behalf Of Ryan Moats
> Sent: Friday, 9 February 2001 5:59
> To: ietf-ldapbis@OpenLDAP.org
> Subject: RE: RFC2252 wshp and other ABNF issues
> 
> 
> On the whitespace issue, I like the idea and look
> forward to the ABNF.
> 
> On quoting, do we need \ hex or can we live with \ char?
> 
> Ryan
> 
> Subject: Re: RFC2252 wshp and other ABNF issues
> 
> "Kurt D. Zeilenga" <Kurt@OpenLDAP.org> wrote:
> > RFC 2252, 4.1:
> >    space           = 1*" "
> >    whsp            = [ space ]
> > 
> > meaning that:
> > 
> > 
> (2.5.18.1NAME'createTimestamp'EQUALITYgeneralizedTimeMatchORDE
> RINGgeneral
> > 
> izedTimeOrderingMatchSYNTAX1.3.6.1.4.1.1466.115.121.1.24SINGLE
> -VALUENO-US
> > ER-MODIFICATIONUSAGEdirectoryOperation)
> > 
> > is valid!  Is there any implementation which correctly parses this?
> 
> Yes, ours does. The ABNF is crazy :-(
> 
> > I suggest most (but not all) uses of whsp be replaced by 'space'.
> > I say "not all" as there are some productions which have whsp
> > followed by whsp and space space would require two spaces.
> 
> Makes sense.
> 
> Having space as optional as it currently stands makes it very 
> difficult
> (perhaps impossible, but I've not thought too hard about it) to parse
> extended items (the X- things).
> 
> > I believe that some, but not all, uses of whsp should be changed
> > to space.  If folks concur in spirit, I put together a more
> > specific ABNF change proposal.
> > 
> > Also, I note that:
> >     dstring         = 1*utf8                              
> >     qdstring        = whsp "'" dstring "'" whsp
> > 
> > allows 'this ain't good'.  If whsp were replaced with space,
> > then 'this ain't good' would be parsable, but 'this is 'bad' too'.
> > Obviously there needs to be some restriction upon dstring and
> > possibly an escaping mechanism.
> 
> Yup. Anyone for using backslash followed by hex?
> 
> > Kurt
> > 
> 
> Cheers,
> 
> Chris
> 
>