[antlr-interest] token ' leads to OutOfMemory Exceptions

Anders Hessellund anders.hessellund at gmail.com
Tue Mar 24 02:05:44 PDT 2009


Hi,

It sounds like the interaction of this rule with some other rule. Do you
> perchance have another rule that can match an empty sequence?


Yep, thanks...that was exactly the problem.

-- Anders

On Mon, Mar 23, 2009 at 3:47 PM, Jim Idle <jimi at temporal-wave.com> wrote:

> Anders Hessellund wrote:
> > Hi,
> >
> > I've experienced a strange thing in my grammar. I need a token for the
> > special character '
> >
> > If I specify it like this:
> >
> > PLING
> >     :    '\''
> >     ;
> >
> > I get an OutOfMemoryException during parsing.
> >
> > But if I specify it like this
> >
> > PLING
> >     :    '\u0027'
> >     ;
> >
> > Everything works fine.
> >
> > Is this a bug or a feature?
> It sounds like the interaction of this rule with some other rule. Do you
> perchance have another rule that can match an empty sequence? Something
> like:
>
> ID : LETTER* ;
>
> Which should be
>
> ID : LETTER+:
>
> We won't be able to help you with only the information you provide -
> best to post the grammar if you can.
>
> Jim
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>



-- 
Anders Hessellund
www.itu.dk/people/hessellund/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090324/39fdffea/attachment.html 


More information about the antlr-interest mailing list