[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Experiments with Scripting Languages
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 10 Apr 2000 21:44:11 -0300 (EST)
Here is a program that extracts the scrips that Roberto posted today.
gsub(T,"=+\n(-- (%w+%.lua).-\n)=",function (a,f)
To run, save this script into a file, say a.lua, and then do
lua a.lua < suite.lua
where suite.lua is the file Roberto posted.
For those interested in simple Lua scripts, the program above is a typical
Lua script that processes text by reading it all in memory and then do whatever
is needed with gsub. Note how the text of each script and the name of the
script are both found using pattern matching.