Ian Farmer
534e69fcfb
Add pattern matcher implementation ported from C version of Lua. Still
...
work to do:
(1) Replace use of recursion with while/continue
(2) Remove as many array bounds checks as possible
2007-09-18 04:18:39 +00:00
James Roseborough
952a2f9f16
Add skeleton for string library calls.
2007-09-18 01:00:36 +00:00
Ian Farmer
6d0e9bb566
Add some helper methods:
...
(1) getKeys() in LTable is now public. It provides a convenient interface
to access the table's elements from Java instead of Lua.
(2) LString.toInputStream produces an instance of InputStream from which
the string's bytes can be read.
2007-09-12 05:22:30 +00:00
Ian Farmer
aeafca11b6
Change LString to use an array of bytes instead of wrapping Java's String.
...
This brings our implementation more in line with regular C Lua.
2007-09-10 06:27:54 +00:00
Ian Farmer
aa44eedf4b
Allow metatable operations on values of all types, and use the metatable
...
on strings as the string package, so that string functions can be called
with self (:) syntax. Autoload test case now inexplicably fails more,
but it was already broken.
2007-09-08 20:54:40 +00:00
James Roseborough
8bf4c82a12
Rework the main API"s that implement the calling convention. Provide utility methods to get arguments that were supplied, and provide return values. Add a VM interface to clarify the relationship between the VM, things that call the VM, and things that are called by the VM. Make the code more closely aligned with the C++ version.
2007-07-24 05:06:10 +00:00
Ian Farmer
ee5007e718
Add implicit LString to number coercions.
2007-07-22 06:20:14 +00:00
Ian Farmer
635f127cd0
Add new built-in function type() that returns the name of the type of
...
the given value as a string. Includes test case.
2007-07-16 02:37:08 +00:00
James Roseborough
93fc4699a9
Type coercion for luajava package, make luajava an "addon"
2007-06-24 15:04:19 +00:00
James Roseborough
19bd995ba6
Enhance binary compare operators, especially equals, to more closely match what standard lua does.
2007-06-14 04:58:09 +00:00
James Roseborough
de763e0a1e
Support for iterator-style for loops, and "pairs" builting function
2007-06-10 22:53:09 +00:00
James Roseborough
e1e6625aa1
Add binary compares, some unary ops, fix binary arithmetic, add plain for loop.
2007-06-10 19:49:47 +00:00
James Roseborough
70dfc20f57
Initial draft of interpreter. Lua compiled "chunks" can be unmarshalled. Approximately half of bytecodes implemented in some form or another.
2007-06-08 05:11:37 +00:00