Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Canonical LR parser
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Goto === The lookahead of an LR(1) item is used directly only when considering reduce actions (i.e., when the β’ marker is at the right end). The '''core''' of an LR(1) item [S β a A β’ B e, c] is the LR(0) item S β a A β’ B e. Different LR(1) items may share the same core. For example, in item set 2 : [E β T β’, $] : [T β T β’ + n, $] : [T β T β’ + n, +] the parser is required to perform the reduction [E β T] if the next symbol is '$', but to do a shift if the next symbol is '+'. Note that a LR(0) parser would not be able to make this decision, as it only considers the core of the items, and would thus report a shift/reduce conflict. A state containing [A β Ξ± β’ X Ξ², a] will move to a state containing [A β Ξ± X β’ Ξ², a] with label X. Every state has transitions according to Goto.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)