- cheeryParticipantAugust 10, 2014 at 1:41 amPost count: 7
I discarded this idea after a while and went to implement a lua-style VM, had lot of trouble getting that working well. Then I read about Cheney on the M.T.A. compilation strategy. That has been working well. I also dropped the syntax from the language, at least temporarily so I could concentrate on what’s under the syntax.
Here’s the repository and the implementation: https://github.com/cheery/language/tree/master/snakelisp
It’s able to run the “parser.sl” in the directory. It’s not yet parsing the parentheses into lists so it’s actually just a tokenizer. Today I’ve been working on hash table implementation to get some namespaces and multiple dispatch. Slowly I’m getting to the point that I need better and more error handling. Now I’ve got an assert() placeholder there. I guess it’s the subject of the next week.
The language already has call-with-current-continuation. I’ll be using that to experiment with different control flows.
I btw. studied writing parsers few weeks ago. I remembered that you told about not using a separate parser. First wrote few hand written parsers, then two different parser generators. Concluded it makes the design much cleaner if you can get rid of the parse trees before bringing the code into intermediate form. Only the lisp seem to be a kind of exceptional language that benefits, or isn’t harmed by parse trees.
You must be logged in to reply to this topic.