Reputation: 17645
Suppose the grammar is given, how to design the code generation process?
start(res) ::= template. { **how to write stuff here?? Is it true there will only be
one correct way to write this? And Let's suppose the programming language is also given** }
Upvotes: 1
Views: 1302
Reputation: 126517
This is a pretty broad question, with many books an articles written on it. The general heading you're looking for is Syntax directed translation, and the classic reference is the Dragon Book
Upvotes: 2