2014compiler课件Ch5_1_2013章节(896KB).pptVIP

  • 1
  • 0
  • 约1.39万字
  • 约 38页
  • 2018-04-01 发布于未知
  • 举报
LR(0) Grammar A grammar is said to be an LR(0) grammar if the described rules are unambiguous. If a state contains a complete item A- α . , then it can contain to other items. If there is an item A- α . X β (X is terminal), then an ambiguity arises as to which action is to be performed (shift-reduce conflict). If a state contains another complete item B- β . , then an ambiguity arises as to which production to use for the reduction (reduce-reduce conflict). A grammar is LR(0) grammar if and only if each state is a shift state or a reduce state containing a single complete item. Compiler * E

文档评论(0)

1亿VIP精品文档

相关文档