Incorporating comments in syntax tree?

ag129@ucs.cam.ac.uk (A. Grant)
30 Jan 1996 18:19:15 -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)
[3 later articles]
| List of all articles for this month |
From: ag129@ucs.cam.ac.uk (A. Grant)
Newsgroups: comp.compilers,comp.compilers.tools.pccts
Date: 30 Jan 1996 18:19:15 -0500
Organization: University of Cambridge
Keywords: analysis, question, comment

Does anyone know of any techniques for reading comments in compiler
input and associating them with the syntax tree, e.g. for debugging
("what has been said about variable X"), inclusion in assembler output
or translation into a different language? The trick being to maximise
flexibility in placing comments while being able to make good guesses
about what they refer to.
[The most common technique I know of is to hang them from the preceding or
following token, or if you're feeling clever, maybe a nearby control
structure to which they seem to apply. I've never heard of a technique
that was entirely satisfactory. -John]
--


Post a followup to this message

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