Re: + Symbol as An Argument not Getting Printed in Output

 new new list compose Reply to this message Top page
Attachments:
+ (text/html)

Delete this message
Author: Roman Mishin
Date:  
To: Yves Cloutier
CC: txr-users@kylheku.com
Subject: Re: + Symbol as An Argument not Getting Printed in Output
Yves,

I just used a tool I use some time for my own work. In this case for simple C++ to Tcl conversion.
I've thought you may take a look at it too: http://gema.sourceforge.net/

I do not see the whole scope of your conceived language but, for example, to translate this text:

<size 12<text>
<size +2<text>
<size -2<text>
<size +6< some other <t]e>xt,>

into this:

\*[SIZE 12]text\*[SIZE]
\*[SIZE +2]text\*[SIZE]
\*[SIZE -2]text\*[SIZE]
\*[SIZE +6] some other <t]e>xt,\*[SIZE]

in gema you define only one rule:

\<size <N>\<<U>\>\N=\\\*[SIZE $1]$2\\\*[SIZE]

A lot of escape symbols are because <,>,*,\ are special in gema (among others).

It does not support Unicode, though. But, as I remember, if you do not touch it, it goes straight from in to out.

There is an excellent article mentioned on the Documentation page.
The link is dead but the content is available via Web Archive:
http://wayback.archive.org/web/20051025073052/http://www.anthus.com/Gema/WhyILoveGema.html
 
--
Roman