全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 LR(0) item, item closure, goto function?

又称: LR(0) item · item closure · goto function

Definition 3.3 University Computer Science — Year 3 · 第 3 章 — Bottom-Up Parsing

An LR(0) item is a production with a dot in its right side, such as T→T⋅∗FT \to T \cdot * F: the part before the dot has been seen, the part after it is expected. The item closure of a set of items adds B→⋅ δB \to \cdot\,\delta for every production of BB whenever some item has its dot before the nonterminal BB, and repeats until nothing changes. The goto function maps a set of items II and a symbol XX to the closure of the items A→αX⋅βA \to \alpha X \cdot \beta for which A→α⋅XβA \to \alpha \cdot X \beta is in II.

在原文中阅读 →