[antlr-interest] ANTLR 3.0ea3 released

Paul Johnson gt54-antlr at cyconix.com
Fri Jun 24 01:18:38 PDT 2005


Alex Sedow wrote:

> Yes, but what do if you need multiple context informations?
> For C# partial types is needed use mutiple AST-contexts depend on 
> placement of part declarations in source files. Example:
> 
> // file1
> using I = I1;
> partial class C : I {} // point1
> // file2
> using I = I2;
> partial class C : I {} // point2
> 
> Note: all parts of partial type (on type-lookup) must be processed 
> together in point1 or in point2.
> I think for this case the best way is generate and use pointer to 
> AST-parent.

I'm having a problem seeing when it would be necessary to look back up a 
tree. At first sight, it seems to me that this is only necessary when 
you're carrying out processing during tree construction. If you defer 
processing till after tree completion, then surely you can always pass 
the required information down, rather than up.

Or have I missed the point?



More information about the antlr-interest mailing list