dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]Licence question about GNU and GCC


From: James Michael DuPont
Subject: Re: [DotGNU]Licence question about GNU and GCC
Date: Tue, 12 Mar 2002 02:08:55 -0800 (PST)

Rhys,
 I am really impressed by the idea of the treecc. I
will have to read about it in detail. 
This is very similar to what I am doing with the
introspector. 
Have you thought about creating a treecc spec for the
C language yet? 
We can map the data from the introspector on the gcc
trees nodes into treecc. Cool!

You have a c, c++, java and c++ interface.
I support a Perl with XML and SQL layer for the trees,
and am working on a Perl/DB caching system.

This could be very interesting to get working
together!

mike

--- Rhys Weatherley <address@hidden> wrote:
> James Michael DuPont wrote:
> 
> > So, lets start by comparing the AST, can you point
> me
> > to where they are created in the c# compiler?
> 
> In pnet's C# compiler, the parse grammar calls
> functions
> like "ILNode_Add_create", "ILNode_While_create" to
> build the AST nodes.  These functions are in turn
> generated
> from rules in the Treecc input file
> "codegen/cg_nodes.tc".
> Look for "%node" declarations.
> 
> The AST is a plain ordinary tree, constructed to
> follow the
> language syntax reasonably closely.  Operations are
> declared in other "*.tc" files for semantic analysis
> and
> code generation.  Look for "%operation"
> declarations.
> 
> During semantic analysis, the tree structure may be
> altered.  e.g. "x[y]" works on arrays and objects
> with
> indexers.  The parser doesn't know which so it
> creates
> an array access node.  When semantic analysis
> discovers
> that "x" is really an indexed object type, it
> replaces the
> node with a different one for the code generator to
> use.
> 
> This is about the extent of the "tree rewriting"
> that
> happens at the moment.  I've been thinking of adding
> more complicated rewrite systems, but haven't yet
> figured out the correct "style" to use to make it
> work
> well with the rest of Treecc.
> 
> Cheers,
> 
> Rhys.
> 
> 


=====
James Michael DuPont

__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]