BLUA: bastardized lua #5


Welcome to my personal lua bastardization - an effort to make lua syntax as bloated and useless like perl's or pythons. There are currently 13 patches, available either as separate or one big un-#ifdefable patch, depending on your needs.


NEW: Lua 5.1.4 port over here
All of the following patches merged (without #ifdefs): merged.diff
All of the following patches merged (with #ifdefs unifdef friendly): blua5.diff
Name/ifdef Description syntax compatible bytecode compatible author
ALTCMP_PATCH != equals to ~= yep yep kt
BITOPS_PATCH and,or,xor,shl,shr,not => &,|,^^,<<,>>,~ yep nope kt (orig. by RISClua)
BREAKN_PATCH php-like break N (multiscope break)yep yep kt
CONTINUE_PATCH continue statement yep yep AKa
DO_PATCH do ... end equals to function() .. endyepyepAKa
LITERALS_PATCH hex(\xABCD) unicode(\uXXXX) literalsyep yep AKa
OPTDO_PATCH optional 'do' after for/whileyep yep kt (orig. by Eric Tetz)
OPTTHEN_PATCH optional 'then' after ifyep yep kt (orig. by Eric Tetz)
PSEUDO_PATCH x.y,a.b = $2+1,$1+1 equals to x.y,a.b = a.b+1,x.y+1 etcyep yep rici
PUDATA_PATCH lua_pushuserdata()yep yep kt
REFSTR_PATCH print("Hello from \$_LUA_VERSION\ ..") equals print("Hello from ".._LUA_VERSION.." ..")yep yep kt
STRHOOK_PATCH Ever wanted to get mmap()ed memory from lua_tolstring()?yep yep kt
USEDINDEX_PATCH __usedindex, like __newindex but for existing keysyepyep kt (orig. by Christopher Dunn)
USEDINDEX_PATCH has been reported to be broken with LuaJIT. BITOPS_PATCH, PSEUDO_PATCH, REFSTR_PATCH, OPTDO_PATCH, OPTTHEN_PATCH reported to work with LuaJIT.
Found a bug or have some cool patches? http://leet.cz