Bottoms Scheme implementation project
history | edit |


S-Expressions are easy to parse in their basics, although there are still many special cases to handle for full Scheme support (special values, floating point numbers, etc.), we will want to simplify a bit at first.

For the text representation of VML, basic support for S-Exprs should be enough, or perhaps even something more basic.

The plan is to write the parser using parser combinators, and write the parser combinator library from scratch, just like the rest of the compiler. It is also a good case to improve functional programming skills, and possible to do incrementally (later on we could even use monadic abstractions). It will also not restrict good error handling (it's up to us to make it work nicely). (Also, the library could probably be ported rather easily to other languages if ever necessary.)

The VM might have a simplified Sexpr-Parser built in (enough to read VML) if we think we will be short on time; we might then rely on that one until we need more features and so defer implementing the parser combinators until our base language is more powerful (doesn't that leave out some of the fun, though?).