[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Question About Mimicking Syntax
- From: Javier Guerra Giraldez <javier@...>
- Date: Wed, 17 Oct 2007 19:21:37 -0500
On Wednesday 17 October 2007, Brent Fulgham wrote:
> The original syntax was very tiny, with only a few operations (some math
> and numerical comparison test), and was only really meant to allow a
> particular operation in the application to be repeated some set number of
> times. However, there are some syntax differences that might make it
> difficult to emulate in Lua. Here is an example:
>
> x=1.0;WHILE x<4.0 DO
> StartTest;
> SetDuration[20000.0];
> x=x+1.0
> OD;
> Stop
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
Attachment:
pgpc_k3zcm4BN.pgp
Description: PGP signature