von spotz
von spotz

Reputation: 895

What are the columns in a LR Parsing Table?

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?

Upvotes: 0

Views: 214

Answers (1)

rici
rici

Reputation: 241721

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.

Upvotes: 1

Related Questions