[antlr-interest] OutOfMemoryException when parsing incorrect input
Clinton Roy
clinton.roy at gmail.com
Wed Nov 28 12:55:09 PST 2007
Hi Rob,
On Nov 29, 2007 3:55 AM, Rob Harrop <rob.harrop at springsource.com> wrote:
> IDENTIFIER
> : IDENTIFIER_PART ('.' IDENTIFIER_PART) *
>
> fragment
> IDENTIFIER_PART
> : (ALPHA | DIGIT | '_' | '$' | '-') *
Don't let your token rules allow empty matches, if I replace these
zero-to-many matches with one-to-many matches (+) things seem a little
more happy.
More of a rule of thumb than a specific solution to your problem, hope
that helps,
--
Clinton Roy
CSIRO - Robotics Platform Engineer
Autonomous Systems Lab
humbug.org.au - Brisbane Unix Group
azure.humbug.org.au/~croy/blog - Blog
flickr.com/photos/croy/ - Photos
More information about the antlr-interest
mailing list