在哪里可以找到C90和C99的显式语法? [英] Where can I find the explicit grammar for C90 and C99?

查看:95
本文介绍了在哪里可以找到C90和C99的显式语法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望编写一个小型C编译器,但似乎在任何地方都找不到C99的语法。我已经找到了C90和C99标准文档,但是在任何地方都找不到语法本身。

I'm looking to write a small C compiler, and I can't seem to find the grammar for C99 anywhere. I've found the C90 and C99 standards document, but I can't find the grammar itself anywhere.

推荐答案

C99标准中的附件A(如由Wikipedia链接)在我看来简直像是一种语法。

Annex A in the C99 standard (as linked by Wikipedia) looks awfully like a grammar to me.

据我记得,有一些语法外的问题是将typedef名称与其他标识符区分开来,这意味着不能仅仅将其输入yacc并期望它起作用,但这是您找到的最权威的来源。

As far as I recall, there are some extra-grammatical issues with distinguishing typedef names from other identifiers that mean that one cannot just feed it into yacc and expect it to work, but it's the most authoritative source you'll find.

这篇关于在哪里可以找到C90和C99的显式语法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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