Re: syntax spec. for C ?

markwh04@yahoo.com
12 Jan 2006 12:15:24 -0500

          From comp.compilers

Related articles
syntax spec. for C ? x-lists@cqsat.com (JR) (2006-01-07)
Re: syntax spec. for C ? david@tribble.com (David R Tribble) (2006-01-12)
Re: syntax spec. for C ? markwh04@yahoo.com (2006-01-12)
Re: syntax spec. for C ? markwh04@yahoo.com (2006-01-19)
| List of all articles for this month |

From: markwh04@yahoo.com
Newsgroups: comp.compilers
Date: 12 Jan 2006 12:15:24 -0500
Organization: http://groups.google.com
References: 06-01-008
Keywords: C, syntax, comment
Posted-Date: 12 Jan 2006 12:15:24 EST

JR wrote:
> I trying to find a syntax spec. for C, something I can feed into a
> compiler generator. It's format is not so important as I can massage
> it with a script but I'd like to get a "superset" of all C variants in
> the one syntax spec. (K&R, ANSI, etc. etc.) within reason.


I might get around to writing up a clean, simplified (but equivalent)
grammar for C since it is, in fact, very small when done right.


But things have changed a bit in recent years and C is not static. Take
a look here


C (and its successors and relatives) on the Wikipedia:
http://en.wikipedia.org/wiki/C_programming_language


This links to the C99 standard, updated to 2005. If it's like any other
standard (and it sounds like it's open since the web site had an
"openstandard" or "openstd" in its name) then there should be a section
which does nothing more than list the phrase structure rules for the
syntax.


John (the moderator) used to keep -- or still keeps -- parsers and
syntax specifications in the comp.compilers library.
[The library is still there, but it hasn't been updated lately. Contributions
always welcome. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.