Re: Need recommendations on books for grammar writing

drw@nevanlinna.mit.edu (Dale R. Worley)
Fri, 1 May 1992 19:57:01 GMT

          From comp.compilers

Related articles
Need recommendations on books for grammar writing tini@iss.nus.sg (1992-04-29)
Re: Need recommendations on books for grammar writing pakstas@idt.unit.no (1992-04-30)
Re: Need recommendations on books for grammar writing drw@nevanlinna.mit.edu (1992-05-01)
| List of all articles for this month |
Newsgroups: comp.compilers
From: drw@nevanlinna.mit.edu (Dale R. Worley)
Keywords: parse, design
Organization: MIT Dept. of Tetrapilotomy, Cambridge, MA, USA
References: 92-04-153
Date: Fri, 1 May 1992 19:57:01 GMT

tini@iss.nus.sg writes:
      Can anyone recommend any good compiler books that details the
      process of grammar writing? Or is it essentially a "black art"?


Grammar writing, itself, is reasonably simple. Or, from a CS point of
view, "You don't really have a language until you've written a grammar for
it." The black art comes in when you have to tweak your grammar so that
it works with the parser you've chosen, handles error recovery well, etc.,
etc. As far as I know, that part of the job is extremely specific to the
tools you are using. (And often is unique, since serious compiler
projects often customize the parser generator to get the facilities they
need...) Unfortunately, no parser generator that I know of has
documentation for that part of the job, although I suppose a few
commercial tools might.


Dale Worley Dept. of Math., MIT drw@math.mit.edu
[Indeed, the bulk of the O'Reilly lex&yacc book, which I am currently
revising, involves discussions of just this kind of black art. -John]
--


Post a followup to this message

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