[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]Licence question about GNU and GCC
From: |
Rhys Weatherley |
Subject: |
Re: [DotGNU]Licence question about GNU and GCC |
Date: |
Tue, 12 Mar 2002 20:02:52 +1000 |
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.
- Re: [DotGNU]Licence question about GNU and GCC, (continued)
- Re: [DotGNU]Licence question about GNU and GCC, Norbert Bollow, 2002/03/11
- Re: [DotGNU]Licence question about GNU and GCC, James Michael DuPont, 2002/03/11
- Re: [DotGNU]Licence question about GNU and GCC, James Michael DuPont, 2002/03/11
- Re: [DotGNU]Licence question about GNU and GCC, S11001001, 2002/03/11
- Re: [DotGNU]Licence question about GNU and GCC, James Michael DuPont, 2002/03/11
- new version of GPL? (was Re: [DotGNU]Licence question about GNU and GCC), S11001001, 2002/03/11
- Re: [DotGNU]Licence question about GNU and GCC, Gopal.V, 2002/03/12
- Re: [DotGNU]Licence question about GNU and GCC, Fergus Henderson, 2002/03/12
- Re: [DotGNU]Licence question about GNU and GCC, Gopal.V, 2002/03/12
- Re: [DotGNU]Licence question about GNU and GCC, James Michael DuPont, 2002/03/12
- Re: [DotGNU]Licence question about GNU and GCC,
Rhys Weatherley <=
- Re: [DotGNU]Licence question about GNU and GCC, James Michael DuPont, 2002/03/12
- Re: [DotGNU]Licence question about GNU and GCC, Rhys Weatherley, 2002/03/12
- Re: [DotGNU]Licence question about GNU and GCC, James Michael DuPont, 2002/03/12
- Introspector & Treecc (was: [DotGNU]Licence question about GNU and GCC), Gopal.V, 2002/03/12
- Re: Introspector & Treecc (was: [DotGNU]Licence question about GNU and GCC), James Michael DuPont, 2002/03/12
- Re: Introspector & Treecc (was: [DotGNU]Licence question about GNU and GCC), Norbert Bollow, 2002/03/12
- Re: Introspector & Treecc (was: [DotGNU]Licence question about GNU and GCC), James Michael DuPont, 2002/03/12
- Re: Introspector & Treecc (was: [DotGNU]Licence question about GNU and GCC), Norbert Bollow, 2002/03/13
- Re: Introspector & Treecc (was: [DotGNU]Licence question about GNU and GCC), James Michael DuPont, 2002/03/13
- Re: Introspector & Treecc (was: [DotGNU]Licence question about GNU and GCC), Gopal.V, 2002/03/13