If all goes well, tomorrow I will release v0.2. New features include a better (as in fast!) parser, completer class functionality, inheritance, interfaces, generics, enum types, structs, implicit declaration, ... Expression power has decreased, but this is only a temporary problem: I simply haven't gotten around to some more trivial parts of the rewrite.
Most checks are missing; which means you will be able to compile invalid code without error. In most places code will (implicitely) assert input to be ok. So obviously (like v0.1) this version is not meant for 'real' use.
For v0.3 I will mainly be writing basic library functions (get/post data access, database access). As I go, I plan to tune and fix features. Currently I do not intend on adding any more major language features until the current code is stable.
When I was looking into inheritance, interfaces and generics I realized I would have to face the inevitable sooner rather than later. The current parser (v0.1) is
slow very, very, very slow. Sure, it can parse anything using just a tuple of rules, but defining the rules was annoying and inefficient (especially for repeating or optional parts). So instead of implementing new features, I threw away the old parser class and started fresh. I've just finished most of it now. The new parser is now a huge amount of hard-coded parser mojo... but it's fast. Hell it's fast :)
The code is definitely not python as Guido intended it. But in a special sort of way it's still structured and maintainable. Btw, when I say 'special' I mean 'unique' special, not 'special olympics' special.
I've released SunRa 0.1 "Vehmic". Download link and info can be found on the roadmap page. The code is incomplete, buggy and only offers basic functionality, but the provided demo file (demo.sr) should compile fine if you would like a preview. Any comments? leave me a message in #sunra on irc.quakenet.org or send an email to firstname.lastname@example.org.
Well, it's been a while since the last update. I had a few other things I needed to get out
of the way. Those things are done now and the past two days I've been focussing on SunRa again.
I've been working on name resolving and
importing. Right now those two features are
both working, although they're still very basic and I've done very little testing.
This afternoon I'll be finishing some pretty obvious functionality I skipped earlier and I'll also write a bit of an introduction-tutorial-thing. Expect another update in about ten hours :)
By the way, the december release of SunRa 0.1 should be some time soon.
Un/fortunately a parser bug popped up earlier. It seemed my recursive tree-building logic
was either too recursive or not recursive enough on a per case basis. However,
clever thinking i had the bug fixed within a few minutes after hours of messing around
i finally got it running again.
I have just added the first rules to the parser. Among other things I've added
rules for basic calls, binary operators (numeric and logical), unary operators,
parenthesized expressions, assignment, comparison;
statements and the
for compound statements.
As I expected (hoped?) extending the parser is really a piece of cake. :)
The past few days I have been working on a bit of a framework for the parser.
After a lot of messing around I ended up with a pretty clean implementation of
Earley's parsing algorithm.
Defining SunRa's syntax is now just a matter of adding lines to syntax.py. I estimate most code will remain usable for at least a few of the upcoming minor releases, despite the minimal compiler performance.