Monday, May 23, 2011
Progress!
I finally got the 'else' statement finished and working, so now entire decision structures are working including scopes. I also implemented built-in functions. They are fully functioning with return values (or no return value) and multiple arguments. However, I have not yet tested overloading and there is no user defined function option yet. Lastly, I implemented while loops. They are probably the simplest loop structure to implement but it provided a nice a framework for do...while and for loops. After I implement those last two loops I will implement some engine specific things such as states and events. After that it will be a fully functioning scripting engine!
Tuesday, May 17, 2011
Nothing to Report
I didn't work on anything this week so... yeah. I will hopefully have 'else' statements done and hopefully the beginning of functions by this Sunday though.
Sunday, May 8, 2011
Busy Week
I managed to get the start of the 'else' statement done, but other than not much was accomplished. I fixed a few bugs and did a little optimization, but after Tuesday I got really busy. Maybe this week will be better.
Sunday, May 1, 2011
A Bunch of Progress!
I got a lot done this week! I have a working intermediate code generator and virtual machine, basically the code can be compiled and ran. I still have more to implement, specifically functions, but so far I have variables (numbers or strings as data types), assignment statements, and decision structures. The 'else' statement isn't implemented yet, but I have the framework for code generation done so the rest will be easier. Here is some example of code that would compile correctly:
num a = 100;
num b = 20;
a = a + 5 * b;
if ( a == 200 )
{
b = 50;
}
The result would be, a = 200 and b = 50. I also implemented complex conditional statements such as:
if ( a == 50 & b == 20 | ((c == 56 & d == 23) | e == 10) )
By next week I hope to have full decision structures done and some simple functions working (no return type or parameters)
num a = 100;
num b = 20;
a = a + 5 * b;
if ( a == 200 )
{
b = 50;
}
The result would be, a = 200 and b = 50. I also implemented complex conditional statements such as:
if ( a == 50 & b == 20 | ((c == 56 & d == 23) | e == 10) )
By next week I hope to have full decision structures done and some simple functions working (no return type or parameters)
Subscribe to:
Comments (Atom)