[antlr-interest] [C] my v3 Parser no reuse() slower 20% than v2. With reuse() 2GB leaks, oops.

Jim Idle jimi at temporal-wave.com
Wed Nov 16 10:44:13 PST 2011


Do it without the .type then, just use C code directly. Don't forget that
you can do things like:

{
  pANTLR3_BASE_TOKEN t;
  t = LT(-1);
  t->type = XXCX;
}

Or perhaps
 myHelper($s, MYTYPE);

Jim


> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Ruslan Zasukhin
> Sent: Wednesday, November 16, 2011 10:40 AM
> To: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] [C] my v3 Parser no reuse() slower 20%
> than v2. With reuse() 2GB leaks, oops.
>
> On 11/16/11 6:00 PM, "Jim Idle" <jimi at temporal-wave.com> wrote:
>
> > xxx: s=HEX_NUMBER { $s.type = CONST_STR_HEX; } ;
>
> Jim,
>
> This gives error as
>     SqlParser_v3.g:879:21: cannot write to read only attribute: $u.type
>
>
> --
> Best regards,
>
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
>
> Valentina - Joining Worlds of Information http://www.paradigmasoft.com
>
> [I feel the need: the need for speed]
>
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address


More information about the antlr-interest mailing list