home *** CD-ROM | disk | FTP | other *** search
- The files in this directory contain the ANSI C grammar from the Nov 12, 1984
- draft of the standard. Note that a newer draft has come out since then.
- I have applied the two bug fixes I have seen reported on the net for this
- grammar.
-
- With a little work, this grammar can be made to parse regular C.
- I am reposting it, due to popular demand. Credit for creating this in
- the first place goes to my office mate, Jeff Lee, gatech!jeff.
-
- Here is his original note:
- > This is the current (Nov 12, 1984) draft of the C grammar in Yacc form
- > with a little scanner I wrote in Lex so that you end up with a complete
- > program with which you can amaze and befuddle your friends. Or you can
- > sit and crank your own output through it to amuse yourself if you have the
- > personality of a cumquat(sp?). This contains nothing to handle preprocessor
- > stuff nor to handle "#line" directives so you must remove these beforehand
- > to allow it to parse the stuff. Also, it bypasses the typedef problem
- > by always returning an IDENTIFIER when it encounters anything that looks
- > like an IDENTIFIER, but it has a little stub in place where you would put
- > your symbol table lookup to determine if it a typedef or not. Other than
- > that, this is all yours. Wear it in good health and if anyone asks, just say
- > I told you so. Oh, by the way..... this is in 'shar' format, so you know
- > what to do.
-
- Arnold Robbins
- gatech!arnold
- May, 1985