No description
Find a file
Sei Lisa ef6ed30536 Fix EParseCantChangeState so that it is always properly reported.
Still somewhat messy, but still reported as soon as it can be detected.

If an ELSE token is detected at the top level, for example, the error position will be rewound to the state change and reported there.

This means that in this situation:

x()
{
    if (1)
    {
        state default;
        x(2);
    }
    else ;
}
default{timer(){}}

an error will be reported in x(2), because the ELSE hasn't been found at that point, therefore the state change statement isn't found to be at fault yet.

However, in this case:

x()
{
    if (1)
        state default;
    else
        x(2);
}
default{timer(){}}

the error WILL be reported at the state change statement.

This commit also changes the position where the exception is reported, to be at the STATE token. As an inconsequential side effect, EParseCantChangeState takes precedence over undefined identifiers, in case the state change is to an undefined state, but only in cases where it can be immediately detected.
2017-11-02 13:45:01 +01:00
lslopt Fix EParseCantChangeState so that it is always properly reported. 2017-11-02 13:45:01 +01:00
.gitignore Yet another follow-up to 2f4f403 (lslcalc support) 2016-12-15 04:15:26 +01:00
builtins-unittest.txt Get rid of builtins.txt.dat by adding a parameter to the parser ctor. 2015-07-09 20:35:14 +02:00
builtins.txt New upstream version of builtins.txt. 2017-10-20 10:00:24 +02:00
COPYING Add copyright notices to all files, to prepare the program for release. 2015-03-05 23:18:41 +01:00
fndata.txt Implement flags aimed at removing "magic names" in the code. 2017-10-27 18:49:58 +02:00
main.py Remove "magic names" where possible, using new data from fndata.txt 2017-10-27 23:39:26 +02:00
README.md URL changed. 2016-12-15 04:37:45 +01:00
testfuncs.py Change strategy for the checking of function input types. 2017-10-12 17:16:16 +02:00
testparser.py Remove "magic names" where possible, using new data from fndata.txt 2017-10-27 23:39:26 +02:00

LSL PyOptimizer

LSL PyOptimizer is a LSL2 script optimizer written in Python 2. Currently it only supports code memory optimization (no speed optimization), only for Mono (no LSO), and only for the Second Life flavour of LSL (no OpenSim etc.).

HTML introduction, list of features and documentation available at http://lsl.project.zone/lsl-pyoptimizer/