Re: TextTransformer: Presentation and some questions (Cedric LEMAIRE)
10 Aug 2004 17:31:46 -0400

          From comp.compilers

Related articles
TextTransformer: Presentation and some questions (2004-07-13)
Re: TextTransformer: Presentation and some questions (2004-08-10)
| List of all articles for this month |

From: (Cedric LEMAIRE)
Newsgroups: comp.compilers
Date: 10 Aug 2004 17:31:46 -0400
References: 04-07-014
Keywords: tools, parse
Posted-Date: 10 Aug 2004 17:31:46 EDT (Detlef Meyer-Eltz) wrote
> [snip ...]

> I am still full of plans and ideas for further improvements, but I would like
> to know your assessements:
> Do you think it is a good idea to combine a parser generator with an
> interpreter?
> Which are the most essential instructions such a tool should master?
> For whom could such a tool be useful?
> Is the use of the regex library favorable?
> Do you know similar tools?
> Would you use an integrated debugger or do you prefer first to create code
> and than use the debugger of your compiler?

I know a similar tool called CodeWorker, which is both a parsing tool
(pred-LL(k), extended-BNF scripts) and a universal source code
generator (template-based scripts), available at

It interprets a scripting language, but a translation of scripts to
C++ is provided (switch '-c++' on the command-line).

It is useful for every aspect of generative programming.

One of the most important instruction is '>ontinue', which reclaims
the rest of the sequence being valid. It is very useful for both
debugging the grammar and checking the syntax of the input file.
You can find more features at
click on the link "CodeWorker_grammar.cwp" and search the non-terminal
template symbol 'script<"extended-BNF">' (non-terminals may look like
C++ template functions here), or you can read the chapter of the
documentation speaking about extended-BNF scripts in CW

See the function 'translate()' to learn how to process
source-to-source translation or program transformation (text
transformer, in fact). It merges both extended-BNF and template-based
    * how to translate a CW script to an HTML syntax highlighting:,
    * how to inject profiling in an C++ source file:

In CodeWorker, the debugging is done during the interpretation:
'#trace' to trace non-terminal calls, 'debug' statement (not useful in
fact), ...

Post a followup to this message

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