retagged by
1,804 views
2 votes
2 votes
How many states are there in the following augmented grammar using lr(0) parser ?

S -> .Sdollar   (Dollar is actually symbol dollar but it's causing formatting issue so I wrote it in words)

S -> x / (A)

A -> A,S / S

In first production do we shift two times or one time ?

S -> S.dollar and S->Sdollar.  or only S->S.dollar . Because last symbol is implicit right ?
retagged by

1 Answer

0 votes
0 votes
In first production we shift one time.

Totally 9 states

Related questions

2 votes
2 votes
0 answers
1
rahul sharma 5 asked Oct 14, 2017
1,534 views
Consider the following grammer:-Stmts - Stmt | Stmts;StmtStmt - Var =EVar ->id[E] | idE- id | (E)Find the number of conflicts in LR(0)?
8 votes
8 votes
3 answers
2
Parshu gate asked Nov 13, 2017
15,462 views
Suppose we are given a grammar and asked to find the type of that grammar , what is the algorithm which needs to be followed for each of them? LL(1), OR LR(0) , OR CLR(1...
1 votes
1 votes
1 answer
4