TomyLobo
662e597f1a
Moved temporary variable creation from Parser to Expression.
2011-11-30 04:45:48 +01:00
TomyLobo
5ec6276674
Made ExpressionTest invoke the optimizer every time it evaluates an expression.
...
This way that thing at least gets SOME coverage.
2011-11-24 21:00:09 +01:00
TomyLobo
71287299b5
Added a simple for loop to the expression parser.
...
Syntax: for (counter = first, last) { body }
Also added a test case.
2011-11-24 02:35:19 +01:00
TomyLobo
7e13b60a51
Cleanup
2011-11-23 04:48:40 +01:00
TomyLobo
effbf9f79c
Added for loops to the expression parser, java style.
...
Also:
- Added a test case for for
- Fixed Identifiable.id() for the runtime Nodes and added missing elements to the list in Identifiable.java.
- Factored keyword and character consumption into a common function.
2011-11-22 16:08:15 +01:00
TomyLobo
f217be0bdf
Added while loops to the expression parser.
...
Also added a test case.
Iterations are currently limited to 256 maximum.
2011-11-22 06:16:23 +01:00
TomyLobo
aa43975e34
Added support for if/else to the expression parser. Basically same syntax as Java.
...
Also added a test case.
2011-11-22 05:12:32 +01:00
TomyLobo
e70446e82e
Renamed RValue.invoke() to getValue.
2011-10-29 16:03:55 +02:00
TomyLobo
ee79abff67
The expression parser can now parse more than a simple expression
...
- Added sequencing (; and {}).
- Added =, +=, -=, *=, /=, %=, ^= to the expression parser. (left-associative for now, will change later)
- Added pre-increment(++) and pre-decrement(--) operators.
- Adjusted/added tests.
2011-10-27 19:16:46 +02:00
TomyLobo
d93d85cd37
Added an expression parser.
2011-10-18 01:04:04 +02:00