706 views
1 votes
1 votes
Consider the following grammar:

$S \rightarrow A$

$S \rightarrow xb$

$A \rightarrow aAb$

$A \rightarrow B$

$B \rightarrow x$

The average length of the stack used while parsing the string "axb$" using LR(1) parser is _________.

I am getting 5, but answer is 2.5.

Please log in or register to answer this question.

Related questions

690
views
1 answers
1 votes
vaibhav101 asked Jan 13, 2018
690 views
According to my understanding, we LALR is constructed by reducing LR(1) automaton states. So I think it should be LR(1)However, we construct SLR(1) items from the LR(0) ... ...) is equal to number of states in LALR(...), how can this be?
3.5k
views
3 answers
0 votes
rahuldb asked Mar 17, 2018
3,502 views
Please anyone create a $LR(0)$ Parsing table on this grammar and show the working of each step:$S' \rightarrow S$S \rightarrow S$;$ ... Please take a screenshot of copy and show in the answer the whole working.
1.1k
views
2 answers
1 votes
KISHALAY DAS asked Nov 6, 2016
1,073 views
Which states of LR(0) is having conflict..anyone please check
710
views
0 answers
0 votes
Kalpataru Bose asked Dec 20, 2017
710 views
How to solve this problem ?? Is the given solution correct?