ietf-822
[Top] [All Lists]

Re: RFC 2231 and CFWS

2003-02-04 05:15:57

In <3E3EABDD(_dot_)3050400(_at_)Sonietta(_dot_)blilly(_dot_)com> Bruce Lilly 
<blilly(_at_)erols(_dot_)com> writes:

Charles Lindsey wrote:

Thanks for the pointer to RFC 2978. I see that '%' is also allowed, but
not '*'. So writing a foolproof parser for extended-initial-value would be
tricky (you have to scan from R to L until you have identified the two
rightmost "'"s), but I doubt implementors will bother to go so far.

That is not the only way to skin that particular cat; a grammar-based
parser can easily handle extended parameters including a hypothetical
charset name containing a single quote and/or percent sign without
resorting to reverse scanning -- it's handled by the normal parser
state machine stack.  It's not even particularly "tricky" -- one
simply writes the appropriate grammar rules and it just works.

Yes, but a hypothetical charset could also contain 56 single quotes.

-- 
Charles H. Lindsey ---------At Home, doing my own thing------------------------
Tel: +44 161 436 6131 Fax: +44 161 436 6133   Web: http://www.cs.man.ac.uk/~chl
Email: chl(_at_)clw(_dot_)cs(_dot_)man(_dot_)ac(_dot_)uk      Snail: 5 
Clerewood Ave, CHEADLE, SK8 3JU, U.K.
PGP: 2C15F1A9      Fingerprint: 73 6D C2 51 93 A0 01 E7 65 E8 64 7E 14 A4 AB A5

<Prev in Thread] Current Thread [Next in Thread>