[antlr-interest] Is this Recognizer optimization valid?

Sander Mägi sander at aqris.com
Tue Oct 2 07:58:04 PDT 2001


Couldn't the codegen actually generate methods like 'statement' and
'statementGuessing' and skip the if(inputStateGuessing ==0) parts at all?

Probably C++ compilers do proper inlining and make it fast, but my
experience shows that in java many things that should be 'naturally
optimized' are not.

Sander

----- Original Message -----
From: "Ric Klaren" <klaren at cs.utwente.nl>
To: <antlr-interest at yahoogroups.com>
Sent: Tuesday, October 02, 2001 4:43 PM
Subject: Re: [antlr-interest] Is this Recognizer optimization valid?


> Hi,
>
> On Tue, Oct 02, 2001 at 04:40:34PM +0200, Sander Mägi wrote:
> > null would give null pointer exception. The ASTpair's root and child
> > variables are still read for their content like returnAst =
currentAst.root.
>
> Ack you're right. But in the codegen these could be guarded by an
> (guessing != 0) check.
>
> Ric
> --
> -----+++++*****************************************************+++++++++--
-----
>     ---- Ric Klaren ----- klaren at cs.utwente.nl ----- +31 53 4893722  ----
> -----+++++*****************************************************+++++++++--
-----
>      Human beings, who are almost unique in having the ability to learn
>    from the experience of others, are also remarkable for their apparent
>          disinclination to do so. --- Douglas Adams, Last Chance to See
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list