C的无上下文语法 [英] Context-free grammar for C

查看:74
本文介绍了C的无上下文语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究C的解析器。我正在尝试查找C的所有无上下文派生列表。理想情况下,它将以BNF或类似形式出现。我敢肯定有这样的事情,但是在Google周围搜索并没有给我太多帮助。

I'm working on a parser for C. I'm trying to find a list of all of the context-free derivations for C. Ideally it would be in BNF or similar. I'm sure such a thing is out there, but googling around hasn't given me much.

事实证明,阅读现有解析器/编译器的源代码比提供帮助要容易得多,因为我所发现的大多数东西比一个人要雄心勃勃和复杂得多我正在构建。

Reading the source code for existing parsers/compilers has proven to be far more confusing than helpful, as most that I've found are much more ambitious and complicated than the one I'm building.

推荐答案

您始终可以使用C11标准本身的附件A。免费提供的标准草案将为您的目的服务,网址为 http ://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf

You could always use Annex A of the C11 standard itself. The freely available draft standard will work for your purposes, at http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf .

这篇关于C的无上下文语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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