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

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'EQUALITYgeneralizedTimeMatchORDERINGgeneral
> 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