Related articles |
---|
Saving comments in an abstract syntax tree gautier@irisa.fr (1995-03-22) |
Re: Saving comments in an abstract syntax tree steve@cegelecproj.co.uk (1995-03-30) |
Re: Saving comments in an abstract syntax tree jsgray@ix.netcom.com (1995-03-31) |
Newsgroups: | comp.compilers |
From: | gautier@irisa.fr (Thierry Gautier) |
Keywords: | parse, question |
Organization: | IRISA, Campus de Beaulieu, 35042 Rennes Cedex, FRANCE |
Date: | Wed, 22 Mar 1995 17:37:18 GMT |
Has anybody some experience in attaching comments, during parsing,
as attributes of an abstract syntax tree
(where and how attaching them)?
The parser is built using bison (or yacc).
The abstract syntax tree is built using rules such as:
exp : exp KW_PLUS term
{ $$=mk2(opplus,$1,$3) }
;
(here, the function mk2 builds a binary tree, the root of the tree
being the "operator" opplus)
--
Thierry Gautier E-mail: gautier@irisa.fr
IRISA / INRIA Phone: +33 99 84 72 41
Campus de Beaulieu Fax: +33 99 84 71 71
F-35042 RENNES CEDEX - FRANCE Telex: UNIRISA 950 473F
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.