intermediate code generation in bison

christian.hresko <christian.hresko@verizon.net>
27 Apr 2003 02:30:15 -0400

          From comp.compilers

Related articles
intermediate code generation in bison christian.hresko@verizon.net (christian.hresko) (2003-04-27)
| List of all articles for this month |

From: christian.hresko <christian.hresko@verizon.net>
Newsgroups: comp.compilers
Date: 27 Apr 2003 02:30:15 -0400
Organization: Compilers Central
Keywords: yacc, code, question
Posted-Date: 27 Apr 2003 02:30:15 EDT

I'M Looking For References As To How To Implement (Simple)
Intermediate Code Generation In Bison. I Have The Aho Book, And I
Don'T Quite Understand How The Temporary Variables Get Propagated
Through An Entire Expression. For Example:


x = y * 5 + (z - 3);


should be:


temp1 = y * 5;
temp2 = z - 3;
temp3 = temp1 + temp2;
x = temp3;


I Guess I'M Not Seeing (From Aho) How The temp1, temp2 And temp3 Make
There Way Into Each Statement (Particulary temp3 = temp1 + temp2).
Maybe I Should Be Using My Own Internal Stack?


thanks,


christian


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.