treecc help required

Gomi Kapoor <gomikapoor-/[email protected]> Wed, 29 Dec 2004 02:34:05 +0000 (GMT)
Newsgroups gmane.comp.gnu.dotgnu.developer
Message-ID <[email protected]>
 Hi Rhys and all,
 I have read the treecc manual and trying to
 implement  a small compiler using it (for learning 
 purposes). The IR which I wish to implement is 
 discussed in the first few pages in this report
 (especially page 10 and page 12):
 From Quads to Graphs: An Intermediate
Representation's Journey
 http://citeseer.ist.psu.edu/click93from.html
 
 I have just started implementing a bit of it and you
 can find the attached *.tc files and the main files.
 For running the files:
 bash$ treecc Inst.tc
 bash$ gcc -g Inst.c main.c
 bash$ ./a.out
 
 One major issue which I faced coming with this
 simple  implementation is casting between 
 Instruction* and other derived nodes. 
 I found that casting  between them to be very
tedious.
 I feel that I am  doing a basic mistake in using 
 treecc. Would you  mind commenting on the way I have 
 (mis)used in the attached  simple implementation.
 
 Thanks in advance.
 
 Regards,
 Gomi
 ps : reposting to the mailing list as the earlier one
had exceeded the size limitations of the list.

________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony