What are the columns in a LR Parsing Table?

186 Views Asked by At

yep, question is short and sufficiently posed in the title.

What are the columns in the action-table of a LR(k)-Parsing table?

Are they the union of all productions' left hand sides' NonTerminals FIRST sets?

1

There are 1 best solutions below

10
On

The rows are states and the columns are the grammar's terminals; in other words, the "alphabet". Not every symbol is necessarily in a FIRST set, so the union of FIRST sets can be a subset of the alphabet.

The parser also has a somewhat similar GOTO table, whose rows are states and whose columns are non-terminals. Between the two tables, all the grammar's symbols are covered.