C grammar available

magras@bilbo.suite.com (JC Magras)
21 Jun 1996 17:24:03 -0400

          From comp.compilers

Related articles
C grammar available magras@bilbo.suite.com (1996-06-21)
| List of all articles for this month |

From: magras@bilbo.suite.com (JC Magras)
Newsgroups: comp.compilers
Date: 21 Jun 1996 17:24:03 -0400
Organization: Compilers Central
Keywords: C, parse

Dear parseheads..

I used the grammar in the back of K&R and flex/bison to put together the
skeleton of a C compiler that will compile structures into our middleware
and namespace product's namespace. My compiler generates calls to our
C API based on the structure definitions and declarators in the "C" source
file. I took a 3 term compiler sequence at Michigan State University,
building a hand written lexer and simple precedence parser and based on
the dragon book which I still have. I also have "Compiler construction in
C". The problem I have is the grammar gives me 30 reduce/reduce conflicts
and 1 shift/reduce conflict. The only differences from K&R: no "typedef_name",
or typedef keyword in "storage_class_specifier" related rules and the
"struct" keyword directly replaces non-terminal "struct_or_union".


J.C. Magras/SystemAdmin:Dallas


Post a followup to this message

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