Front-end design

"Salvador V. Cavadini" <scavadini@hotmail.com>
23 Nov 1999 00:42:00 -0500

          From comp.compilers

Related articles
Front-end design scavadini@hotmail.com (Salvador V. Cavadini) (1999-11-23)
| List of all articles for this month |
From: "Salvador V. Cavadini" <scavadini@hotmail.com>
Newsgroups: comp.compilers
Date: 23 Nov 1999 00:42:00 -0500
Organization: Compilers Central
Keywords: parse, question
X-Originating-IP: [200.45.40.118]

Hi,


I'm developing a front-end for a program analysis tool.
This front-end have the following main characteristics:


* It must accept more than one source language (C, Cobol, Pascal,
etc.) and


* It must generate more than one internal representation (AST, CFG,
etc.) of the program.


I'm looking for a design that allow the reuse of the front-end's
components. My goal is to write the C parser once, the Pascal parser
once, the CFG builder once and the AST builder once. If I build the
AST using semantic actions embedded in the languaje's parser, I can
not use the same parser to (now) build a CFG and I will rewrite the
same semantic actions for build the AST for another language.


Do you know how to do this in an elegant way?




Thanks for your time,


Salvador Cavadini


Post a followup to this message

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