[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Question About Mimicking Syntax
- From: Etan Reisner <deryni@...>
- Date: Wed, 17 Oct 2007 21:29:27 -0400
On Wed, Oct 17, 2007 at 07:21:37PM -0500, Javier Guerra Giraldez wrote:
<snip>
> instead of tryind to write a 'compatibility layer', maybe it would be easier
> to use some text-handling to translate your old scripts to Lua once and for
> all.
>
> something like (using sed):
>
> s/OD/end/
> s/StartTest/StartTest()/
> s/SetDuration%s*[(.-)]/SetDuration (\1)/
>
> and so on
>
> --
> Javier
Yeah, if the extent of the differences is surmountable by some trivial
text manipulation you could either use an external tool to do it or
possibly (though people with more experience doing this would want to
check me on this) just write a custom loader and use that to load/parse
your scripts before calling them.
-Etan