[antlr-interest] Re: C# CommonAST class and Clone()

Ney, Richard richard.ney at aspect.com
Wed Mar 19 20:18:28 PST 2003


Okay, I retract my original comment on the reflection issue. The dupXXX()
methods do work on my ASTs. I assumed they wouldn't work after attempting to
use the factory in my parser to create a node using a token from my other
parser. So I assumed that I would have the same issue using the dupXXX()
methods.

-Richard

-----Original Message-----
From: Ney, Richard [mailto:richard.ney at aspect.com] 
Sent: Wednesday, March 19, 2003 8:01 PM
To: 'antlr-interest at yahoogroups.com'
Subject: RE: [antlr-interest] Re: C# CommonAST class and Clone()

The methods in the ASTFactory eventually uses the method
createFromNodeTypeObject which uses the reflection. This only works if I am
inside a the parser the created the AST originally or I have an instance of
that parser around. I am cloning the ASTs inside a parser that supports a
different grammar.

Do you know an easier way?

-Richard

-----Original Message-----
From: micheal_jor [mailto:open.zone at virgin.net] 
Sent: Wednesday, March 19, 2003 12:22 PM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] Re: C# CommonAST class and Clone()

> Okay,
> 
> I have seen the code that uses reflection to create AST nodes and 
tokens.
> Now that I know clone is no longer used by ANTLR directly I have 
implemented
> it to do a complete clone of the tree.

Hmmm....How does this differ from the dupXXX() methods of the 
ASTFactory class?. 

Cheers,

Micheal


 

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/ 


 

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



More information about the antlr-interest mailing list