简体   繁体   English

在哪里可以找到 C90 和 C99 的显式语法?

[英]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.

相关问题 如何将Visual Studio 2008 Express Edition配置为c89 / c90 / c99? - How can I configure Visual Studio 2008 Express Edition to c89/c90/c99? C90 - C99:注册结构 - C90 - C99: register struct C90和C99中复合类型对象的对齐 - Alignment of compound type objects in C90 and C99 C90:如何在没有 C99 扩展的情况下在 C 中全局初始化此结构 - C90: How do I globally initialize this struct in C without C99 extensions Q&A: Where can i find the drafts of all C Standards (C89,C90,C99,C11,C18) and C++ Standards (C++98,C++03,C++11,C++17) as PDFs for free? [等候接听] - Q&A: Where can i find the drafts of all C Standards (C89,C90,C99,C11,C18) and C++ Standards (C++98,C++03,C++11,C++17) as PDFs for free? [on hold] C89 / C90,C99和C11的兼容性 - Compatibility of C89/C90, C99 and C11 C89,C90或C99中的所有功能都需要原型吗? - Are prototypes required for all functions in C89, C90 or C99? C ++或C99理论上可以编译成同等便携的C90吗? - Could C++ or C99 theoretically be compiled to equally-portable C90? C 数组遍历导致 c90 标准上的循环(但不在 c99 上) - C array traversal cause loop on c90 standard (but not on c99) 为什么在c99或c90模式下支持_Generic关键字? - Why is _Generic keyword supported in c99 or c90 modes?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM