Compiler Design and Construction: SLR(1) Parser

Описание к видео Compiler Design and Construction: SLR(1) Parser

SLR (1) refers to simple LR Parsing. It is same as LR(0) parsing. The only difference is in the parsing table. To construct SLR (1) parsing table, we use canonical collection of LR (0) item.

In the SLR (1) parsing, we place the reduce move only in the follow of left hand side.

Various steps involved in the SLR (1) Parsing:

For the given input string write a context free grammar
Check the ambiguity of the grammar
Add Augment production in the given grammar
Create Canonical collection of LR (0) items
Draw a data flow diagram (DFA)
Construct a SLR (1) parsing table

Комментарии

Информация по комментариям в разработке