It's nice that it continues on an error, because otherwise you wouldn't get anything useful out of it.
Reading about doing error reporting with PLY.
I guess you're referring to the fact that default arguments are written to scripts.txt, but the script compiler needs to add defaults for missing arguments to script, function, and math operator calls itself; the interpreter doesn't do so. (Math ops: "increment"/"decrement" can be called with a single argument. Very uncommon, but certain people like to use that form)
In fact, the script interpreter doesn't even use the default args in scripts.txt even when it should (when a plotscript is triggered), and that's a bug.
You can add more parsers. My intent was to have a rough line oriented, preprocessor like parser and a proper one.
Right, that'll be a far cleaner solution.
No reason except for the fact that I'm not sure where I want to go. I think this may be a good time to fork the project if you want to retain or improve compatibility with existing scripts.
There is a lot that can be done with this framework to make the language more familiar for users. C-like operators, local variables introduced by assignment, string literals as arguments, arrays, all sorts of experimental features.
So you're planning to do more than just re-factoring, then?
I want to add most of that stuff to HS/HSpeak anyway.
Introducing variables by assignment (with special syntax like "x <- 2" or "var x := 2") is something I'm considering, I find "variable" annoyingly verbose. And some alternative/new operator spellings, like binary - instead of -- if possible (argh), unary -, != instead of <> and %% as an alternative to ,mod, which is absolutely awful. %% rather than % because I want to reserve % for units, eg 4% == 0.04. Incidentally I want to add other units too, like "walk hero(me, left, 40px)", or "2 tiles" or "wait(0.3s)". They'll compile to e.g. "px(40)". That would be very nice.
I do have a HSpeak branch where I added object.member and array[index] syntax and string literals, which compiled down to kludges like readglobal instead of real objects/types, arrays and strings. But I want to add the real things, after I get past these graphics features.
So if you want to work on these sorts of things, but still diverge from HS, it might be better to have two fork points, for HS-current and HS-future.