[antlr-interest] replacing NoViableAltException with exception with less stack
Loring Craymer
lgcraymer at yahoo.com
Mon Sep 10 13:40:21 PDT 2007
That may be the only practical solution since the
stack trace stuff is from java.lang.Throwable.
Alternatively, you might try adding a dummy
fillInStackTrace() method to RecognitionException or
NoViableAltException--that might work.
--Loring
--- Terence Parr <parrt at cs.usfca.edu> wrote:
> Hi. you could probably create a single exception
> object and return
> that each time. Should be fairly easy to search for
> that string in
> the generator.
> Ter
> On Sep 10, 2007, at 12:43 PM, Jochen Theodorou
> wrote:
>
> > Hi,
> >
> > we (Groovy team) have currently several
> performance problems with
> > our grammar. The resulting Parser is a bit too
> slow for our needs
> > and we are now looking for a way to make it
> faster. The grammar is
> > a big and complicated beast and I am sure there
> are many places we
> > can make it better.
> >
> > But one thing that would speed up the whole thing
> a little is to
> > remove that stack trace used by the
> NoViableAltException. I can do
> > that and if we don't want to debug the grammar
> itself, then we
> > don't need that trace at all. but of course such a
> change would be
> > removed by the next grammar creation.
> >
> > Is there a way to influence the generator to do
> that they way I want?
> >
> > Note: atm antlr 3.0 is no option
> >
> > thanks, blackdrag
> >
> > --
> > Jochen "blackdrag" Theodorou
> > Groovy Tech Lead (http://groovy.codehaus.org)
> > http://blackdragsview.blogspot.com/
>
>
____________________________________________________________________________________
Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz
More information about the antlr-interest
mailing list