Re: Do I need to invent a new type of parser?

hagerman@ece.cmu.edu (John Hagerman)
Tue, 28 Apr 1992 02:11:30 GMT

          From comp.compilers

Related articles
Do I need to invent a new type of parser? jeffk@ecst.csuchico.edu (Jeffery Alan Keasler) (1992-04-20)
Re: Do I need to invent a new type of parser? Jan.Rekers@cwi.nl (1992-04-21)
Re: Do I need to invent a new type of parser? jeffk@ecst.csuchico.edu (1992-04-22)
Re: Do I need to invent a new type of parser? stephen@estragon.uchicago.edu (1992-04-26)
Re: Do I need to invent a new type of parser? hagerman@ece.cmu.edu (1992-04-28)
Re: Do I need to invent a new type of parser? stephen@estragon.uchicago.edu (1992-04-29)
Re: Do I need to invent a new type of parser? anton@mips.complang.tuwien.ac.at (1992-05-04)
Re: Do I need to invent a new type of parser? visser@fwi.uva.nl) (1992-05-06)
Re: Do I need to invent a new type of parser? keithc@dcs.qmw.ac.uk (1992-05-08)
| List of all articles for this month |

Newsgroups: comp.compilers
From: hagerman@ece.cmu.edu (John Hagerman)
In-Reply-To: stephen@estragon.uchicago.edu's message of 26 Apr 92 20:37:27 GMT
Keywords: parse
Organization: Carnegie Mellon University
References: 92-04-087 92-04-137
Date: Tue, 28 Apr 1992 02:11:30 GMT

stephen@estragon.uchicago.edu (Stephen P Spackman) writes:


      Below is my latest experimental grammar - you'll notice that the only
      SYNTACTICALLY reserved words are ; and . (though there are plenty of
      operators that you can't redefine).


Fascinating!


      Note that over half of the productions below concern comment attatchment,
      so this grammar is even simpler than it looks.


This is interesting in itself; I'm working on source-to-source
translation, and it sure would be nice if real languages handled comments
in so clean a fashion (ie, so that they could easily be jammed into the
parse tree, if desired).


- John
--
hagerman@ece.cmu.edu
[In syntax directed editors and other environments in which you need to hold
on to comments, it is my impression that the two possible approaches are
either to attach each comment to the preceding or following token, or else
to put a lot of comment productions in the grammar, as he did here. -John]
--


Post a followup to this message

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