From: Carlo Hogeveen
Hi Skip
The following macro should convert such ascii data to an TSE macro
that does roughly what you request in a simple way:
proc main()
replace("^", "replace(", "gx")
replace("$", ")", "gx")
begfile()
insertline("proc main()")
endfile()
addline("end")
end
Greetings!
Carlo
Skip Gore wrote:
>
> Hi Gang,
>
> I need a macro that takes instructions from a list of variables. For
> example the ASCII text file would look like this:
>
> snip===============================================================snip
> "{[a-z]}U{[a-z]}", "\1u\2", "x"
> "{[a-z]}T'", "\1?"+chr(34), "ix"
> "die", " the", "w"
> "took", "look", "w"
> "failing", "falling", "w"
> "feet", "feel", "w"
> "sit", "sir", "w"
> "fight", "right", "w"
> "stiff", "still", "w"
>
> snip===============================================================snip
>
> And because I am having problems with my wrist, it would be easy if
> the
> macro would use to look for the first part of the replacement
> string. The would be the second part of the replacement
> string.
> And whatever is in the third section would be the options. Any of
> them
> including x.
>
> The macro should continue until the end of file is found and then
> automatically jump to the second line and so on, until the entire list
> is finished. The key might have the option of showing what
> line
> is being executed at the time.
>
> Any help would be greatly appreciated.
>
> Skip
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|