From: Graham B. <gb...@po...> - 2002-01-23 13:22:19
|
Ah, good point. I will put it in. Thanks, Graham. On Tue, Jan 22, 2002 at 09:55:18PM +0100, Peter Marschall wrote: > Hi, > > sure, laziness ;-) > > Sometimes one may be too lazy to write a space after the > last element of a qdstring list. So, > ('first' 'second' 'last') > should parse with my proposed solution. > The other solution should require a space after 'last' > (worked out theoretically, not checked; But I have my s > olution running in some programs for over a week now) > > Yours > PEter > > On Tuesday 22 January 2002 21:25, you wrote: > > On Sun, Jan 20, 2002 at 05:23:23PM +0100, Peter Marschall wrote: > > > 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 > > > '([^']*)' > > > to > > > '((?:[^']+|'\S)*)' > > > I would suggest changing it to > > > '((?:[^']+|'[^\s)])*)' > > > > I don't really mind either way. But can you give a reason for this ? > > > > Graham. > > -- > Peter Marschall | eMail: pet...@ma... > Scheffelstraße 15 | pet...@is... > 97072 Würzburg | Tel: 0931/14721 > PGP: D7 FF 20 FE E6 6B 31 74 D1 10 88 E0 3C FE 28 35 > |