ietf-822
[Top] [All Lists]

Re: RFC 2231 and CFWS

2003-02-03 10:50:27

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.


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