Skip to content
This repository

A Lua implementation in C#

branch: master
Octocat-spinner-32 Example Projects lots of updates, a new compiler is about 50% done November 04, 2012
Octocat-spinner-32 GenerateDocumentation lots of updates, a new compiler is about 50% done November 04, 2012
Octocat-spinner-32 Libraries Many updates. Rewriting the new compiler from scratch. its coming alo… December 01, 2012
Octocat-spinner-32 NuGetPackage Added __scope table things, math.factorial, some new compiler updates… November 09, 2012
Octocat-spinner-32 OLD.SharpLua Many updates. Rewriting the new compiler from scratch. its coming alo… December 01, 2012
Octocat-spinner-32 Scripts Found major problem in reconstructor, new compiler needs to be comple… November 08, 2012
Octocat-spinner-32 SharpLua.AlmostADebugger Many updates. Rewriting the new compiler from scratch. its coming alo… December 01, 2012
Octocat-spinner-32 SharpLua.Compiler Found major problem in reconstructor, new compiler needs to be comple… November 08, 2012
Octocat-spinner-32 SharpLua.Interactive Fixed passing nil as an argument to a CLR object not working December 14, 2012
Octocat-spinner-32 SharpLua.InterfacingTests Fixes for Dirk Weltz, started a new beautifer November 16, 2012
Octocat-spinner-32 SharpLua.LASMTests Many updates. Rewriting the new compiler from scratch. its coming alo… December 01, 2012
Octocat-spinner-32 SharpLua.NewCompilerTests Compiler updates... coming along slowly though... December 02, 2012
Octocat-spinner-32 SharpLua Added Simplify() int othe AST, fixed LASM bug with empty string January 10, 2013
Octocat-spinner-32 SharpLuaAddIn wut December 15, 2012
Octocat-spinner-32 experimental-newparser Added Simplify() int othe AST, fixed LASM bug with empty string January 10, 2013
Octocat-spinner-32 .gitignore Addin now has Documentation intellisense (although not all the docume… October 26, 2012
Octocat-spinner-32 LICENSE.txt Incorporated the new parser into #Lua October 15, 2012
Octocat-spinner-32 README.txt Added Simplify() int othe AST, fixed LASM bug with empty string January 10, 2013
Octocat-spinner-32 SharpLua.sln wut December 15, 2012
Octocat-spinner-32 TODO.txt wut December 15, 2012
README.txt
SharpLua 2.0 is a combination of a port of Lua 5.1.5, various interfaces, but will be eventually replaced by new, better, code.
Why did I start with a Lua 5.1.5 C port? because... You Can't Get More Accurate Than The Original (TM), and the C api allows easier porting of C libs.


SharpLua is an implementation of Lua for .NET
It can run lua files including bytecode (compatible with native Lua), create .NET objects and call methods on them (including static methods), and 
supports all standard lua functions. It does not support C Libraries.

To use in your projects, just add a reference to the SharpLua.dll file and use the 
SharpLua.LuaInterface class or the SharpLua.LuaRuntime, SharpLua.Lua is the raw Lua API.

NOTE: If you simplify the AST, you CAN NOT use a reconstructor that operates on the tokens unless you patch the tokens, as the Simplification process does not do that

Features Lua 5.1.5 doesn't have:
- table.unpack (similar to _G.unpack)
- a large extension library
- clr library (allows .NET object access)
- Syntax extensions
    - ! (not)
    - >> (right shift)
    - << (left shift)
    - & (bitwise and)
    - | (bitwise or)
    - ^^ (Xor)
    - ~(bitwise not)
    - using/do statements
    - named functions in tables (e.g. { function x() end })

Current projects:
SharpLua                     The SharpLua core, along with a LASM library
SharpLua.Interactive         SharpLua REPL
SharpLua.InterfacingTests    SharpLua interfacing tests. As apposed to using the raw Lua API.
SharpLua.Compiler            SharpLua bytecode compiler

Future projects:
SharpLua.Decompiler          SharpLua bytecode decompiler
SharpLua.Web                 Web handler for #Lua
SharpLua SharpDevelop AddIn  Support SharpLua/Lua files and projects, GUI 
                                designer, and msbuild project builder
SharpLua Wpf support
Something went wrong with that request. Please try again.