简体   繁体   中英

What is hierarchy for these grammars: LL1,SLR1,LR0,LR1 and LALR1?

How are these grammars related to each other? eg SLR is a subset of LALR1. Is there any set methods for working out the relationships between the others?

There are three types of Context Free Grammers(CFG'S).

1)Floyd-Evans Parsable 2)Unambiguous CFGs 3)Operator Precedence

All the ones u have mentioned above are Unambiguous CFG'S.

LL(0) < LL(1) < LL(k). LR(0) < SLR(1) < LALR(1) < LR(1) < LR(k). Also, LL(k) < LR(k)

Every LR(0) grammer id SLR(1) and every SLR(1) is LALR(1) which in turn is LR(1).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM