compile-fan
compile-fan

Reputation: 17645

Code generation using yacc

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

Answers (1)

Chris Dodd
Chris Dodd

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

Related Questions