707 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

693
views
1 answers
1 votes
vaibhav101 asked Jan 13, 2018
693 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,504 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,074 views
Which states of LR(0) is having conflict..anyone please check
712
views
0 answers
0 votes
Kalpataru Bose asked Dec 20, 2017
712 views
How to solve this problem ?? Is the given solution correct?