edited by
4,181 views
2 votes
2 votes
can LR(1) parser parse any context-free grammar/language ??

and hence every regular language can be parsed by LR(1) parsers.
edited by

1 Answer

4 votes
4 votes

can LR(1) parser parse any context free grammar/language ??
NO..CFLs are sometime inherently ambiguous..we cant design a LR parser for ambiguous languagaes 

and hence evry regular language can be parsed by LR(1) parsers??
Yes..every regular language can be parsed by a LR parser..because for every regular language there is some unambiguous grammar for sure....moreover we can create a LR parser to parse a DCFl means reglar language can also be parsed..

Related questions

3 votes
3 votes
0 answers
1
santhoshdevulapally asked Nov 1, 2016
632 views
Which of the Parsers from LL(1), LR(0), SLR(1), LALR(1) and CLR(1) can Parse the following grammar ?$\tt E \rightarrow ET | a$$\tt T \rightarrow TE | b$
0 votes
0 votes
3 answers
3
0 votes
0 votes
1 answer
4