The Gateway to Computer Science Excellence
+1 vote
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
in Compiler Design by Loyal (6.4k points) | 139 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.

by Loyal (5.4k 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
50,737 questions
57,299 answers
104,993 users