标签: code-generation yacc
假设给出了语法,如何设计代码生成过程?
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** }
答案 0 :(得分:2)
这是一个非常广泛的问题,很多书都写有文章。您要查找的常规标题是Syntax directed translation,经典参考是Dragon Book