Rust scheme parser definitions. I have been following r7rs for the formal syntax, but it shouldn't be too hard to switch to another version.
The parser is defined using nom.
I would like to note that as of right now - if you pick the Datum parser and parse an arbitrary program with it, it should not be too hard to implement a Scheme interpreter from those data structures.
I am not building a Scheme interpreter, but rather a set of tools to easily transform Scheme sources and data structures into representations that may be further useful for building compilers and interpreters. Thus from my side I am ignoring most of the standard library.
The future of this project is to compile the Scheme sources into a simple assembly language that works directly with contexts (stack frames), which are not a part of standard linear stack, but rather allocated on the heap.
Implement a non-recursive macro substitutor: given a macro definition(implemented in rusch.eval.macros)my-macro
and a call site of that macro:(my-macro argA argB)
, resolve that with a single pass of macro invocation.- Implement a CPS transformer for all call sites of the program.
- at this step we're planning to substitute all macros
- Implement a lambda lifter.
- Implement type information pass.
- Support strings.
- Support function (closure) pointers.
- Aggressively raise errors for anything else.
For now, just look in tests.
rusch
is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in rusch by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.