S - >的语法指导定义; '{'L'}'; 1→ L S |空值

时间:2015-02-06 06:44:00

标签: parsing compiler-construction

**Exercise 5.4.4**    Write L-attributed SDD's analogous to that of Example 5.19 
for the fo llowing productions, each of which represents a familiar flow-of-control 
construct , as in the programming language C. You may need to generate a three­
address statement to jump to a particular label L, in which case you should 
generate g;oto L. 
c)S -> '{' L '}' ; L-> L S | null

这是龙书练习中的问题。我在这里混淆是否是List或其他。如果这是列表,那么我试图这样:

List = new()
List.next = S.next

and the list continue with List1,2,....n.

我只想确认我是对还是错? 这是图书链接:http://www.slideshare.net/rajarshisbaisthakurforever/dragon-book-for-compiler-2v2。页码是337第5章第5.5节。实现L-ATTRIB UTED SDD

0 个答案:

没有答案