[antlr-interest] Exception tests eat performance?
Terence Parr
parrt at cs.usfca.edu
Wed Jan 7 10:54:51 PST 2004
On Wednesday, January 7, 2004, at 10:44 AM, Karl Meissner wrote:
>
> --- Terence Parr <parrt at cs.usfca.edu> wrote:
>> Hi gang, my only additional comment would be that using return values
>> makes it pretty hard to have other return values from a rule, which
>> are
>> arguably very handy.
>
> Which is why I used in my psuedo code ;-)
>
> But fine, I used returned values in my rules all the time too.
> The traditional alternatives to a return value are
>
> 1) reference parameters
They don't work for primitives in Java unfortunately.
> 2) Sticking the result into some globally accessable place such as a
> member.
Can make recursion tricky.
> Results could even
> be held in a stack, equivlent to inputState.guessing.
But a bit slower, though workable. I've considered this for ANTLR 3.
Thanks for the suggestions :)
Ter
--
Professor Comp. Sci., University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Co-founder, http://www.jguru.com
Co-founder, http://www.knowspam.net enjoy email again!
Co-founder, http://www.peerscope.com link sharing, pure-n-simple
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list