[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: help to (slightly) modify Lua interpreter
- From: Francesco Abbate <francesco.bbt@...>
- Date: Thu, 5 Nov 2009 14:18:01 +0100
Hi guys,
I'm coming again with the same help request, I would like to use
expressions where userdata are indexed with more comma-separated
values. For example, if you want to index a matrix it would be natural
to write something like:
m[i, j]
but Lua does not accept this construct. For the moment I've
implemented that with the syntax
m:get(i,j ) and m:set(i, j, value)
which is quite reasonable but ugly to read for a mathematician or a
non-Lua casual user.
I'm quite determined to change Lua to obtain this syntax extension and
I would appreciate a lot any suggestions about where to look in the
source code to understand how it works for the part I'm interested on
and make the modification right. I already have a good knowledge of
the paser but I think that I would need to make non-trivial changes in
the AST and in the way the AST is interpreted.
Any suggestions or help would be very welcome. Thank you very much in any case.
Best regards,
Francesco