lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Alain wrote:

Could you not do the thing up side down? Put a script in Lua somewhere and let Lua do it's job :) I believe that this would be 1000 thimes simpler.

Hmm, what do you mean?
What I am trying to do is to create yet-another-lua-binder.
In the simplest case it must preprocess pseudocode, whuch looks like this:

================================================
class Trigger {
   Integer type;
   Table(Anchors) owners;

   //some methods here
}

package world {
   Character findChar(Integer id | String name) {
     Character ch;
     // some valid c code here with some `macroses'
     return ch;
  }
}
=================================================

And translate everything into correct C code mixed with calls to
twisted-by-me lua api.
So `users' in their scripts can do smth like

=================================================
import findChar from world;
local Character ch = findChar("Joseph");
local Character monster = findChar(BIG_MONSTER_ID);
=================================================

So. I hope now you got it.

AMDG,
 Antero Vipunen.