[antlr-interest] AST with typed nodes C# samples and tree parsing need

Johannes Luber JALuber at gmx.de
Tue May 20 07:10:02 PDT 2008


> Are there more advanced samples for C# target?
> especially creating typed AST, and parse comples tree with generation
> something,
> once default samples produce just flat set of nodes.

Aren't the example grammars in the zip-file not enough?
> 
> especially interesting creation of referenced leafs in AST -
> how to implement variable definition and their use ?
> may be some standard technique is used for this most common case?

That doesn't look like limited to C# target alone. I believe the example grammars cover some of this. But I don't know what you mean with "how to implement variable definition and their use" exactly. Are you after a symbol table?
> 
> Does tree walker sufficient and optimal and for serious language
> code generation from tree ?

That sentence isn't correct English. Do you want to know if you can use a tree walker to generate any kind of output? The answer is yes.

Johannes
> 
> thanks
> 
> I'm glad to join ANTLR society.
> Vladimir Grigoryev

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer


More information about the antlr-interest mailing list