r7rs-parser 0.1.0

Simple Scheme R7RS parser & lexer
Documentation
  • Coverage
  • 0.49%
    1 out of 203 items documented0 out of 58 items with examples
  • Size
  • Source code size: 69.88 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 7.23 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • playXE/r7rs-parser
    2 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • playXE

r7rs-parser

Simple R7RS Scheme parser.

Example

use r7rs_parser::{ parser::Parser, expr::NoIntern};

const SOURCE: &'static str = r#"
#!fold-case


(Add 2 3+43i 4145125125153151351351353 3/4)
"#;

fn main() {
    let mut i = NoIntern;
    let mut parser = Parser::new(&mut i, &SOURCE, false);

    while !parser.finished() {
        match parser.parse(true) {
            Ok(expr) => {
                let s = expr.to_string(&NoIntern, false);

                println!("{}", s);
            }
            Err(e) => {
                println!("{}", e);
            }
        }
    }
}