Alle boeken

Professioneel

Apps Over Coach Inloggen Begin met lezen

Computer Science · Begrippenlijst

Wat is LR(0) item, item closure, goto function?

Ook bekend als: LR(0) item · item closure · goto function

Definition 3.3 University Computer Science — Year 3 · Hoofdstuk 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.

Lees in het hoofdstuk →