Related articles |
---|
Using yacc and lex for implementing a C++-translator sof3@ztivax.siemens.com (1991-11-11) |
Newsgroups: | comp.compilers |
From: | sof3@ztivax.siemens.com ( ) |
Keywords: | yacc, lex, attribute |
Organization: | Siemens AG, Munich, W-Germany |
Date: | 11 Nov 91 10:42:20 GMT |
We here at Siemens (ZFE IS SOF 31) are planning to build a translator
using the Unix-tools yacc and lex. This translator must be capable of
reading any C++-source, creating a symbol table during the translation,
and adding some new code to the original sources. Since yacc does only
provide synthesized attributes, the following questions arise:
- Is it possible to develop a complete translator
using only synthesized attributes ?
- If this is not the case, how can we simulate
inherited attributes ?
all suggestions and hints are welcome
Michael Stal
[You can always do inherited attributes by walking the parse tree yourself,
which is what most C compilers do for value numbering and the like. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.