The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+1 vote
61 views
1.Class of grammar that will parse using LR method is proper subset of class of grammar that will parse with predictive parser .

2. LR Parser can be constructed to recognize virtually all programming language constructs for which CFG can be written .

Please give valid justification for each point even if it is false
asked in Compiler Design by Loyal (7.4k points) | 61 views

1 Answer

+1 vote
Best answer

Both are false.

1) LL(1)/Predictive parser accepts a subset of grammars accepted by LR parsers.

2) LR parsers can't parse ambiguous CFGs. Note that, Operator Precedence Parser is Bottom-Up/SR Parser but not LR parser and it also can't parse all ambiguous grammars.

answered by Active (4.8k points)
edited by

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

39,657 questions
46,732 answers
140,421 comments
58,140 users