[antlr-interest] Re: Does ANTLR *need* ASTNull?
micheal_jor
open.zone at virgin.net
Thu Mar 20 20:26:03 PST 2003
> Hi,
>
> I have run into an issue with ASTNULL and hetero-ASTs using Java as
> the target language (IIRC C# doesn't have ASTNULL and it isn't an
> issue with C++).
My comments about C# is inaccurate - it does have ASTNULL and hence
the same problem.
In my limited analysis, ASTNULL seems to be used as a performance
optimization essentially. I guess my focus is now on ideas for
ensuring ASTNULL plays nice with hetero-AST usage.
Is anyone mixing TreeParsers and hetero-ASTs?. Any issues?.
> Specifically, there are a few situations where ASTNULL is assigned
as
> the value of a vriable then, an attempt is made to cast that
variable
> whose value is ASTNULL to an hetero-AST class ==>
classCastException!
>
> Why does ANTLR-Java need ASTNULL?.
> Why isn't just "null" simply used as in ANTLR-C#?
The last question is misleading, ASTNULL is used in ANTL-C# too.
This issue only arises with TreeParsers incidentally and I've
inherited a few I could do without ;-)
Cheers,
Michael
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list