C: Which Grammar to Use?

David Toland <det@sw.stratus.com>
Thu, 30 Mar 1995 13:22:09 GMT

          From comp.compilers

Related articles
C: Which Grammar to Use? akv@srl03.cacs.usl.edu (1995-03-22)
C: Which Grammar to Use? det@sw.stratus.com (David Toland) (1995-03-30)
Re: C: Which Grammar to Use? ophir@actcom.co.il (1995-04-18)
| List of all articles for this month |

Newsgroups: comp.compilers
From: David Toland <det@sw.stratus.com>
Keywords: C, courses
Organization: Compilers Central
References: 95-03-128
Date: Thu, 30 Mar 1995 13:22:09 GMT

> I'd appreciate if you could give me some opinions on which C grammar
> is "better" than the others for building a compiler. I'm planning to
> build one for my compilers course. I have some experience using the
> K&R grammar though not for a compiler; I used it to build a C program
> database (an AST representation in a LISPish style).


With all due respect, wouldn't you learn more by examining these grammars
and using what you see to design your own? Besides, for a compilers course
it is a good idea to select a subset of the language, aiming for design
challenges rather than completeness. Later, if you wish, you can flesh
out your design, at which time you will learn how maintainable your
product is. :-)


--
det@phlan.sw.stratus.com
(Dave Toland)
--


Post a followup to this message

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