|translation tools? Maciej.Komosinski@cs.put.poznan.pl (Maciej Komosinski) (2001-01-18)|
|Re: translation tools? email@example.com (Mike Dimmick) (2001-01-19)|
|Re: translation tools? firstname.lastname@example.org (Michael Tiomkin) (2001-01-19)|
|From:||"Mike Dimmick" <email@example.com>|
|Date:||19 Jan 2001 23:23:47 -0500|
|Posted-Date:||19 Jan 2001 23:23:47 EST|
"Maciej Komosinski" <Maciej.Komosinski@cs.put.poznan.pl> wrote in message
> I have to write a translator from a simple scripting language to a
> complex assembler. I'd like to use some yacc-similar tool, but I would
> prefer a C++ output. What are up-to-date, free tools for that?
I'm probably just preferring the tool that I'm using to write my final
year project with here, but I would currently recommend ANTLR (known
as PCCTS in version 1). Version 1 is written in C++, and can produce
C or C++ output, and the latest maintenance release is available from
http://www.polhode.com/pccts, while version 2 is written in Java and
can produce either Java or C++ (available from http://www.antlr.org).
I found it to be well documented and supported, partly through the
comp.compilers.tools.pccts newsgroup. It seems to have pretty
powerful parsing concepts.
The only slight disadvantage you might have with it is that it
generates recursive-descent parsers, which may require a lot of stack
space with heavily nested code. The output produced is much easier to
debug, though! If stack space is a premium, you're better off with a
tool that produces a table-driven parsing automaton, possibly such as
PRECCX. I found this to be badly documented, though (which I find to
be a common failing of free/open source tools).
Return to the
Search the comp.compilers archives again.