On Wed, 3 May 2017, Martin Sebor wrote: > > Clarifying the comment is helpful, but a data structure involving putting > > the same character in both still doesn't make sense to me. It would seem > > a lot clearer to (for example) split "DFKTEV" into separate "DFTV" and > > "EK" cases, where "EK" uses NULL there just like "s", "d" etc. do. > > Then the begin/end strings for the "DFTV" entry will be the empty > string (to indicate that they are expected to be quoted), as in > the attached incremental diff. Let me know if I misunderstood > and you had something else in mind.
Yes, that's what I'd expect (incrementally). > FWIW, I don't mind doing this way if you prefer, but I'm hard > pressed to see the improvement. All it did is grow the size of > the tables. The code stayed the same. Really I think it might be better not to have pointers / strings there at all - rather, have a four-state enum value that says directly whether those format specifiers are quote-neutral, should-be-quoted, left-quote or right-quote. Or that information could go in the existing flags2 field, '"' to mean should-be-quoted, '<' to mean left-quote and '>' to mean right-quote, for example. -- Joseph S. Myers jos...@codesourcery.com