[PATCH] Support ANSI escape sequences in the Lexer

Richard Smith richard at metafoo.co.uk
Tue Apr 1 18:27:45 PDT 2014


On Tue, Apr 1, 2014 at 5:49 PM, David Blaikie <dblaikie at gmail.com> wrote:
>
>   Any chance of test cases?
>

Sorry, yes, I have some but Phabricator seems to be strangely unable to
render them properly. I guess it doesn't conform to ISO/IEC 6429 / ECMA-48?
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?

  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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140401/61c6e344/attachment.html>


More information about the cfe-commits mailing list