Re: Incorporating comments in syntax tree?

Nadav Aharoni <nadav@cc.huji.ac.il>
2 Feb 1996 09:50:52 -0500

          From comp.compilers

Related articles
Incorporating comments in syntax tree? ag129@ucs.cam.ac.uk (1996-01-30)
Re: Incorporating comments in syntax tree? Steve_Kilbane@cegelecproj.co.uk (1996-01-31)
Re: Incorporating comments in syntax tree? ok@cs.rmit.edu.au (1996-02-01)
Re: Incorporating comments in syntax tree? solution@gate.net (1996-02-01)
Re: Incorporating comments in syntax tree? synaptx!thymus!daveg@uunet.uu.net (Dave Gillespie) (1996-02-02)
Re: Incorporating comments in syntax tree? nadav@cc.huji.ac.il (Nadav Aharoni) (1996-02-02)
Re: Incorporating comments in syntax tree? cef@geodesic.com (Charles Fiterman) (1996-02-02)
Re: Incorporating comments in syntax tree? Uwe.Assmann@inria.fr (1996-02-09)
Re: Incorporating comments in syntax tree? greg.titus@attws.com (Greg Titus) (1996-02-13)
Re: Incorporating comments in syntax tree? Conor@puddle.demon.co.uk (Conor O'Neill) (1996-02-23)
| List of all articles for this month |
From: Nadav Aharoni <nadav@cc.huji.ac.il>
Newsgroups: comp.compilers,comp.compilers.tools.pccts
Date: 2 Feb 1996 09:50:52 -0500
Organization: Compilers Central
References: 96-01-121
Keywords: syntax

I've also encountered this problem and did not find a really good
solution. What I would like to have is something like a
"skip-rule". Everytihng that matches this rule will be skipped, but
will still be available to the parser somehow.


If this was possible, we would write:


comment (skip) :
"//[~\n]*\n"
<< write to output, or keep somewhere >>


other rules...


Does this make any sense?




By the way, I read in Tom Moog's newbie-notes that there is a
description of a pretty printer that was written with PCCTS. This
probably includes dealing with comments, but I didn't look into it to
see exactly how.


good luck!
--
Nadav Aharoni | http://www.cs.huji.ac.il/~nadav
Hebrew University, | email: nadav@cs.huji.ac.il
Jerusalem, Israel
--


Post a followup to this message

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