LSL-PyOptimizer/lslopt
Sei Lisa 6a0eebf157 Implement a couple subtleties of the lexer in the handling of strings.
First, a string does not have its own context, it's a regular expression, therefore if there isn't a matching closing quote until EOF, it's not an unterminated string. It plainly *isn't* a string.

Second, the string lexer searches for either the regexp '[^"\\]' (any character except a double quote or a backslash) or the regexp '\\.', that is, a backslash followed by an "any character" meta. But the "any character" meta does NOT match a newline. The consequence is that a '\' followed by a newline cancels the matching, and the whole thing is not considered a string.

Isolated double quotes are then plain ignored as many other characters.

An example illustrating both cases:
```
default
{
    state_entry()
    {
        string msg = "Hello, Avatar!";
        llOwnerSay"(msg); // the opening quote will be ignored
        // the following backslash at EOL cancels the previous double quote: \
        llOwnerSay(llGetKey(")); // Unterminated string; unmatched so ignored.
    }
}
```
2015-03-08 16:53:58 +01:00
..
__init__.py Initial commit. Status so far: 2014-07-26 02:43:44 +02:00
lslbasefuncs.py Add copyright notices to all files, to prepare the program for release. 2015-03-05 23:18:41 +01:00
lslcommon.py Add copyright notices to all files, to prepare the program for release. 2015-03-05 23:18:41 +01:00
lsldeadcode.py Remove the symbol table entry too when removing a global state/function/var. 2015-03-07 14:33:11 +01:00
lslextrafuncs.py Add copyright notices to all files, to prepare the program for release. 2015-03-05 23:18:41 +01:00
lslfoldconst.py Warn about float constants that can't be represented in globals. Also don't duplicate the globals warnings. 2015-03-06 23:26:58 +01:00
lslfuncs.py Add copyright notices to all files, to prepare the program for release. 2015-03-05 23:18:41 +01:00
lsljson.py Add copyright notices to all files, to prepare the program for release. 2015-03-05 23:18:41 +01:00
lsloptimizer.py Warn about float constants that can't be represented in globals. Also don't duplicate the globals warnings. 2015-03-06 23:26:58 +01:00
lsloutput.py Add copyright notices to all files, to prepare the program for release. 2015-03-05 23:18:41 +01:00
lslparse.py Implement a couple subtleties of the lexer in the handling of strings. 2015-03-08 16:53:58 +01:00
lslrenamer.py Rather than generating random identifiers for locals, prefix them with 'loc_'. 2015-03-07 14:51:51 +01:00