正在加载图片...
Parse Trees A parse tree is a tree with the following properties: The root is labeled by the start symbol. Each leaf is labeled by a terminal or by E. -Each interior node is labeled by a non-terminal. If A is the non-terminal labeling some interior node and X,X2,..,Xn are the labels of the children of that node from left to right,then there must be a production A-XX2 X.Here,X,X2,...,Xeach stand for a symbol that is either a terminal or a non- terminal. CS308 Compiler TheoryParse Trees • A parse tree is a tree with the following properties: – The root is labeled by the start symbol. – Each leaf is labeled by y a terminal or by E. – Each interior node is labeled by a non-terminal. – If A is the non-terminal labeling some interior node and Xl , X2, • • • , Xn are the labels of the children of that node from left to right then there must be a production A the children of that node from left to right, then there must be a production A -> X X ··· 1 2 · · · Xn. Here, X1 , X2 , . . . , Xn each stand for a symbol that is either a terminal or a non￾terminal . CS308 Compiler Theory 11
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有