Commit graph

15 commits

Author SHA1 Message Date
Sei Lisa
66417276ae Test cases for the previous commit 2014-07-31 03:31:42 +02:00
Sei Lisa
6ec39aa745 Add a bunch of optimizations. Fix || and && results.
Notably, addition/subtraction, and llGetListLength -> !=[]

But also parenthesis removal etc.

With test coverage.
2014-07-31 02:53:51 +02:00
Sei Lisa
fb68273eed Turned everything upside down, and fixed a couple bugs.
Bugs fixed:
- %= and the new assignment operators were not emitting error on invalid types.
- List globals referenced in another global were duplicated entirely.
- Properly recognize -option in the command line.

Rest:
- Complete overhaul of the internal data structure.
  - Got rid of the symbol table plus mini-trees, and made everything one big tree plus an auxiliary symbol table.
  - No more special case hacks like using tuples instead of lists...
  - Got rid of the EXPR hack.
  - Dict-based, rather than list-based. Allows adding arbitrary data to any node or symbol entry.
- Added a few coverage tests for the new code.
- Return values can now be chained; the functions parameter requirement is gone. Still not fully convinced, though. My guess is that a parser object should be passed between functions instead. Will do for now.
2014-07-30 04:54:16 +02:00
Sei Lisa
3b4bf13a10 Add coverage for new stuff. 2014-07-28 21:19:23 +02:00
Sei Lisa
56d51b835c Hack to make identifiers in globals in non-global-expression mode work. 2014-07-28 19:20:36 +02:00
Sei Lisa
6c00400d7d Add coverage for new preprocessor option. 2014-07-28 02:45:30 +02:00
Sei Lisa
ae94e80c34 Add a regression test for a case that failed before the globals fix. 2014-07-28 01:01:10 +02:00
Sei Lisa
1747028211 Finish coverage tests. 2014-07-27 20:26:24 +02:00
Sei Lisa
19ca34d7e0 Expand the test case to include more coverage. Triggers errors. 2014-07-27 20:13:12 +02:00
Sei Lisa
716374eb83 Add test cases that failed without the previous commit. 2014-07-27 18:08:18 +02:00
Sei Lisa
f5444bb83d Update coverage tests. Add optimizer test. Rename classes (cosmetic). 2014-07-27 13:52:55 +02:00
Sei Lisa
0959be94bc Add extra coverage case, as we were missing a few lines.
The option extendedglobalexpr shaded string juxtaposition in globals.
2014-07-26 04:51:35 +02:00
Sei Lisa
e03b342f78 Allow concatenation of key+string and string+key producing string.
Also add corresponding test cases, making some mostly cosmetic changes to the test program while on it.
2014-07-26 04:41:09 +02:00
Sei Lisa
0b6ff4646e Add coverage tests for allowmultistrings, and reorder for coverage of the test program itself. 2014-07-26 03:57:02 +02:00
Sei Lisa
4ee320ace1 Add the unit testing files.
testfuncs.py uses custom testing functions.
testparser.py uses the unittest standard module.
2014-07-26 03:18:02 +02:00