Though it's not included in the question, where would operator precedence parser fit in the terms of power ?

The Gateway to Computer Science Excellence

+5 votes

power of PArser is derived on the basis of NO. of language parsed....

CLR could parsed all the language which could parsed by other.....

0

@Divyanshum29

No. Check this grammar

S --> aX | Eb | Fc

X --> Ec | Fb

E --> A

F --> A

A --> epsilon.

Its LL(1) but not LALR(1).

No. Check this grammar

S --> aX | Eb | Fc

X --> Ec | Fb

E --> A

F --> A

A --> epsilon.

Its LL(1) but not LALR(1).

0

@reena

" Power of parser is in terms of number of GRAMMARS they can parse NOT the number Of LANGUAGES. "

Can u explain a bit more?

" Power of parser is in terms of number of GRAMMARS they can parse NOT the number Of LANGUAGES. "

Can u explain a bit more?

+1

@srestha LR(1) parsers can parse every language in DCFL set because DCFL are not inherently unambiguos i.e they are gaurenteed to exist atleast one unambiguous grammar that derives them . there is one to one correspondence between the number of DCFL languages and the LR(1)( cannonical LR) parsers but the pther parsers SLR LALR LR(0) donot gaurentee to parse even the unambiguous versions of the grammers corresponding to the DCFL hence the power increases as SHOWN ABOVE

0

What she meant was Parser always corresponds to a grammer...for every grammer u will have a corresponding language a language can have many grammars but for every DCFL there is gaurenteed to exist one unambiguos one .. we should not relate a language to the parser as it will be designed based on the grammer rules and its not EXACTLY correct

52,223 questions

59,811 answers

201,020 comments

118,087 users