[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Using LUA to mimic another language
- From: "Adam D. Moss" <adam@...>
- Date: Sun, 07 Dec 2003 11:24:06 +0000
chris@kandji.com wrote:
Hello, I wonder if LUA is capable to mimic the syntax of another language (more or
less)...
So, I could use LUA to prototype another script language.
For example : could LUA partially mimics PASCAL syntax ??
No. :)
You could write a (i.e.) pascal parser in lua, of course. You could
even use that to write a pascal interpreter, or with a lot of effort
to convert pascal source to lua source. But lua's flexibility
is more in the semantics department than in syntax, so a heavy
preprocessing/parsing stage would almost always be necessary to
have lua even begin to understand another language's syntax 'as
its own' rather than simply hosting an interpreter (at which
lua has no special advantage besides being a neat language in
its own right).
--Adam
--
Adam D. Moss . ,,^^ adam@gimp.org http://www.foxbox.org/ co:3
Consume Less, Live More