(6.3)--Samuels Ch5_3编译原理与实践英文版.pptVIP

  • 5
  • 0
  • 约6.64千字
  • 约 19页
  • 2023-11-23 发布于陕西
  • 举报

(6.3)--Samuels Ch5_3编译原理与实践英文版.ppt

Chapter 5 Compiler2Simple LR(1) ParsingUses DFA of set of LR(0) items as constructed in the previous section.The power of LR(0) is increased significantly.SLR(1) uses the next token of the input string to direct its actions.The input token is consulted before a shift to make sure that appropriate DFA transition exists.The Follow sets of nonterminals are used to decide if a reduction should be performed.This approach is powerful enough to parse almost all commonly occurring language constructs. Compiler3SLR(1) Parsing AlgorithmLet s be a current state (at the top of the parsing stack)If state s

文档评论(0)

1亿VIP精品文档

相关文档