[英]Where can I find the explicit grammar for C90 and C99?
I'm looking to write a small C compiler, and I can't seem to find the grammar for C99 anywhere.我正在寻找编写一个小型 C 编译器,我似乎无法在任何地方找到 C99 的语法。 I've found the C90 and C99 standards document, but I can't find the grammar itself anywhere.
我找到了 C90 和 C99 标准文档,但我在任何地方都找不到语法本身。
Annex A in the C99 standard (as linked by Wikipedia ) looks awfully like a grammar to me. C99 标准中的附件 A(由 Wikipedia 链接)在我看来非常像语法。
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.据我记得,将 typedef 名称与其他标识符区分开来存在一些额外的语法问题,这意味着不能仅仅将其输入 yacc 并期望它能够工作,但它是您能找到的最权威的来源。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.