[antlr-interest] ANTLR C: Question regarding the portability of generated lexer C code

Jim Idle jimi at temporal-wave.com
Sun Oct 18 02:06:59 PDT 2009


Normally I am in US Pacific, but this week and next I am in the India timezone.

 

Jim

 

From: Lego Haryanto [mailto:legoharyanto at gmail.com] 
Sent: Saturday, October 17, 2009 1:49 PM
To: Jim Idle
Cc: David-Sarah Hopwood; antlr-interest at antlr.org
Subject: Re: [antlr-interest] ANTLR C: Question regarding the portability of generated lexer C code

 

Jim, I'm not sure which time zone you're in, I'm assuming it's already after midnight ... I do appreciate your taking time on this.

 

I'll try your suggestion in my z/OS env next week.  I'll update this thread with the result. 

 

Thanks,

-Lego

On Sun, Oct 18, 2009 at 1:12 AM, Jim Idle <jimi at temporal-wave.com> wrote:

No - it works, but you have to be careful to avoid ANTLR merging the ranges. See my later post.

Jim


> -----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-
> email-address




List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address




-- 
Fear of the LORD is the beginning of knowledge (Proverbs 1:7)



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20091018/7b8cccc2/attachment.html 


More information about the antlr-interest mailing list