[antlr-interest] ANTLR C: Question regarding the portability of generated lexer C code
jimi at temporal-wave.com
Sun Oct 18 01:12:06 PDT 2009
No - it works, but you have to be careful to avoid ANTLR merging the ranges. See my later post.
> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of David-Sarah Hopwood
> Sent: Saturday, October 17, 2009 11:57 AM
> To: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] ANTLR C: Question regarding the
> portability of generated lexer C code
> Jim Idle wrote:
> > Change the ranges to:
> > ID: ‘a’..’k’ | ‘l’..’t’ …
> I doubt that will work. The generated code sometimes uses character
> literals, sometimes string literals, and sometimes Unicode code point
> values. The code can't be compiled as EBCDIC because the code point
> values are not EBCDIC codes.
> It would be easier to hack the C target so that it avoids character
> literals, and uses only \x escapes in string literals.
> David-Sarah Hopwood ⚥ http://davidsarah.livejournal.com
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
More information about the antlr-interest