We've seen various techniques for constructing an LR(0) DFA from a context-free grammar.
In this section, we will provide motivations for developing a process to convert an LR(0) DFA into an LR(0) parse table.
Given a context-free grammar, we have the ability to construct an LR(0) DFA from it.
In order to parse an LR(0) language, we need to construct an LR(0) parser. This type of parser consists of the following two pieces of information:
Since we already know the LR(0) parsing algorithm which is not language-specific, we just need to be able to construct an LR(0) parse table.
If we can construct an LR(0) parse table from an LR(0) DFA, then we can complete our parser construction process.
We have seen the motivation for developing a process to construct an LR(0) parse table from an LR(0) DFA.
In the next section, we will begin to illustrate this process.
GitHub Repository: https://github.com/bprollinson/ripal
Copyright © 2017 Brendan Rollinson-Lorimer