[PATCH] Support ANSI escape sequences in the Lexer

Richard Smith richard at metafoo.co.uk
Tue Apr 1 19:42:33 PDT 2014


On Tue, Apr 1, 2014 at 7:03 PM, David Blaikie <dblaikie at gmail.com> wrote:

> On Tue, Apr 1, 2014 at 6:27 PM, Richard Smith <richard at metafoo.co.uk>
> wrote:
> > I could take photos of the testcases on my screen and fax them to you,
> would
> > that work? Do you have a color fax machine?
>
> Crayon renderings dropped in my mail slot would be fine.


Will do.


> >>   Does this produce any ambiguities in the grammar? Or is it strictly
> >> turning invalid cases into valid ones?
> >
> >
> > It's possible for there to be ambiguities here, in cases like:
> >
> > #define STR(x) #x
> > #define m
> > const char *p = STR(<U+1B>[m);
> >
> > With the patch we'll emit "\x1b[m", without it we'll emit "\x1b[".
> Tricky.
> > Any ideas?
>
> Hmm - pity. Can't say I've got any particularly compelling ideas.
> Though I assume this is at least in the domain of acceptable
> implementation defined behavior regarding the translation of bytes to
> the source character set, etc?
>

Yes, I believe so.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140401/0fb56414/attachment.html>


More information about the cfe-commits mailing list