简体   繁体   English

这些语法的层次结构是什么:LL1,SLR1,LR0,LR1和LALR1?

[英]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. 例如,SLR是LALR1的子集。 Is there any set methods for working out the relationships between the others? 是否有任何固定的方法来解决其他人之间的关系?

There are three types of Context Free Grammers(CFG'S). 有三种类型的Context Free Grammers(CFG'S)。

1)Floyd-Evans Parsable 2)Unambiguous CFGs 3)Operator Precedence 1)Floyd-Evans Parsable 2)明确的CFG 3)运算符优先级

All the ones u have mentioned above are Unambiguous CFG'S. 你上面提到的所有都是明确的CFG'。

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

Every LR(0) grammer id SLR(1) and every SLR(1) is LALR(1) which in turn is LR(1). 每个LR(0)语法id SLR(1)和每个SLR(1)是LALR(1),其又是LR(1)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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