From: Peter M. <pet...@ma...> - 2002-01-22 19:35:07
|
Hi, unfortunately I forgot to send this mail to the l=F6ist too. Yours Peter ---------- Forwarded Message ---------- Subject: Re: schema format questions Date: Sun, 13 Jan 2002 13:04:01 +0100 From: Peter Marschall <pet...@ma...> To: John Berthels <joh...@ne...> Hi, On Friday 11 January 2002 10:29, you wrote: > > Since all separation characters used in RFC 2252 are 7bit ASCII, > > parsing stays possible without having to think about those non-ASCII > > characters (just let them where they are ;-) > > Isn't that the problem? The qdstrings are allowed to contain all the > seperation characters in any combination they like. How then to detect = the > end of the qdstring? You are right ! This is the reason. I was mislead by my thinking about non-ASCII characters. > > > I don't see how it is possible at all, without defining an addition= al > > > escape mechanism or list of disallowed characters (the previous > > > approach). > > > > My first idea was not only to check for allowed characters but to che= ck > > for those special words defined in RFC 2252 (DESC, MUST, MAY, ..) > > But I was to lazy to do it that way ;-)) > > And those special words may also exist inside a qdstring. Also correct. > I am sure that we can define a reasonable approach by adding restrictio= ns > on qdstrings. I like Graham's idea very much. It's a short simple parser that does it's best to decode these things and works in most cases. Since RFC2252 allows schemas that allow different interpretations (see Chris' mail with the EQUALITYNOORDERINGBORGCOLLECTIVE example) one has to make restrictions on schemas to be able to parse them successfully. Reading my last lines again, I would suggest a simple change to Grahans solution: I would disallow closing braces after single quotes inside qdstrings, but would allow for qdstringlists with no space between the last qdstring and the follwoing closing brace.. So instead of changing =09'([^']*)' to =09'((?:[^']+|'\S)*)' I would suggest changing it to =09'((?:[^']+|'[^\s)])*)' But i can live well with Graham's version. Yours Peter -- Peter Marschall | eMail: pet...@ma... Scheffelstra=DFe 15 | pet...@is... 97072 W=FCrzburg | Tel: 0931/14721 PGP: D7 FF 20 FE E6 6B 31 74 D1 10 88 E0 3C FE 28 35 ------------------------------------------------------- --=20 Peter Marschall | eMail: pet...@ma... Scheffelstra=DFe 15 | pet...@is... 97072 W=FCrzburg | Tel: 0931/14721 PGP: D7 FF 20 FE E6 6B 31 74 D1 10 88 E0 3C FE 28 35 |