The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+1 vote
83 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 (8k points) | 83 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 (5k 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
47,886 questions
52,257 answers
182,152 comments
67,673 users