LL(1),LR(1),LR(0),LALR(1)语法的示例? [英] Examples of LL(1), LR(1), LR(0), LALR(1) grammars?

查看:233
本文介绍了LL(1),LR(1),LR(0),LALR(1)语法的示例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在线上是否有很好的资源,其中包含一些主要解析算法(LL(1),LR(1),LR(0),LALR(1))的语法集合?我发现有许多属于这些家族的语法,但是我不知道有人在其中写了大量示例语法.

Is there a good resource online with a collection of grammars for some of the major parsing algorithms (LL(1), LR(1), LR(0), LALR(1))? I've found many individual grammars that fall into these families, but I know of no good resource where someone has written up a large set of example grammars.

有人知道这样的资源吗?

Does anyone know of such a resource?

推荐答案

网站免费获得第一版.表单(链接底部附近).

Parsing Techniques - A Practical Guide has several examples (i.e. probably half a dozen or so per type) of almost every type of grammar. You can purchase the 2nd edition book, although the 1st edition is available for free on the author's website in PDF form (near bottom of link).

作者还具有一些测试语法,并将其与第二版的代码示例捆绑在一起,可以在

The author also has some test grammars that he bundles with his code examples from the second edition, which can be found here.

注意:所有这些语法都很小(少于二十个规则),因为这显然是一本已出版的书.

Note: all of these grammars are small (less than a couple dozen rules), because of this obviously being a published book.

这篇关于LL(1),LR(1),LR(0),LALR(1)语法的示例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆