Computer Science, asked by Tushargambhir, 7 days ago

what are issues with slr parsing table​

Answers

Answered by jnick05980
0

Answer:

Problems with SLR parser:

1. A state may include a final item (one in which the position marker is at the end) and a non- final item. This may result in a shift-reduce conflict.

2. A state may include two different final items. This might result in a reduce-reduce conflict.

Explanation:

However SLR reduces only when the next token is in Follow of the left-hand side of the production. Proper choices may help to resolve reduce-reduce conflicts. However, still similar conflicts exist:

->Shift-reduce conflicts include the case in which

Follow of the LHS nonterminal of any final item overlaps with first token after the dot in any of the remaining items in that item set.

Reduce-reduce conflicts include the case Follow of left-hand-sides of more than one final items in an item set overlap.

This grammar is called LR(0.5) or SLR. This is because when we reduce, we do not really consider the lookahead. The production is placed in the table corresponding to the entire follow set of the nonterminal. Hence this cannot strictly be referred to as LR(1).

Similar questions