|Front-end design email@example.com (Salvador V. Cavadini) (1999-11-23)|
|From:||"Salvador V. Cavadini" <firstname.lastname@example.org>|
|Date:||23 Nov 1999 00:42:00 -0500|
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,
* 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,
Return to the
Search the comp.compilers archives again.