This updates the operators supported by the C&
interpretor in LambdaMOO. Added operators are +=, -=,
*=, /=, %=, ^=, &.=, |.=, ~.=, >>=, <<=, |., &., ~.,
>>, <<, var++, var--, ++var, --var, and ~var. This also
updates the syntax to support hexadecimal (0xFF), octal
(0o77), and binary (0b11) numbers when compiling. Like
/* */ comments, however, the original base of a number
is forgotten and therefore hex/oct/binary numbers will
be decompiled as decimal.
This patch is NOT by default compatible with the
Scattered For patch. If you use Scattered For, you must
uncomment 2 groups of code (cmp_scatter and some code
in cmp_expr)
Patch for LambdaMOO
Logged In: YES
user_id=25634
A bug with `var++' was discovered... Probably during
free_expr... Working on a fix. In the meantime, be aware
that this is NOT stable (until I follow-up a fix).
Logged In: YES
user_id=25634
Okay... got a fix made up. Attaching a patch for current
users and new users.
If you have the buggy syntax update, use the r1_to_r2 patch.
If you don't have the syntax update, use the r2 patch.
Fixes a bug in the initial Syntax Update code.
Updates Lambda+SyntaxR2 to R3 (bugfix: variable lossage in decompile)
Patches SyntaxR3 into LambdaMOO
Logged In: YES
user_id=25634
Just fixed a major bug which caused verbs to be decompiled
without the variable name for normal assign operations (`a =
*').
Logged In: YES
user_id=25634
Sigh... Fixed a bug with silly stuff like ||= and &&= (which
don't exist) coming out of the decompiler... This time I
actually tested it by loading and saving a JHCore
database... the savings were about 4.5 KB and it was able to
load the output db...
Patches SyntaxR4 into LambdaMOO
Updates Lambda+SyntaxR3 to R4
Logged In: YES
user_id=25634
I have been using this modification for month in my own MOOs
and it seems stable.
Logged In: NO
Using var++ with a property (IE $foo.bar++) will crash the MOO.
Patches SyntaxR5 into LambdaMOO
Logged In: YES
user_id=25634
Originator: YES
File Added: syntax_update_r5.patch
Updates Lambda+SyntaxR4 to R5 (bugfix: o.prop++ crash)
Logged In: YES
user_id=25634
Originator: YES
File Added: syntax_update_r4_to_r5.patch
Logged In: YES
user_id=25634
Originator: YES
Fixed. Using var++ with a property (IE $foo.bar++) now works correctly with R5.
If you use ~ on a variable that does not exist, it panics the server.
Additionally, just a minor cosmetic issue, but, using ++ with a variable does not parse back to ++, but rather back to foo.bar = foo.bar + 1
If you use ~ on a variable that does not exist, it panics the server.
Additionally, just a minor cosmetic issue, but, using ++ with a variable does not parse back to ++, but rather back to foo.bar = foo.bar + 1
Thanks for the bug report with ~; I will upload a bugfix patch in a moment.
Whether the decompiler uses shorthand syntax or not is a verb_code() option in GammaMOO. Porting this back to a patch is beyond the scope of this bug report, however.
File Added: syntax_update_r5_to_r6.patch
;;var=0;return ~var also panics the server.
Is there an FAQ on how to install these?