Crate syntaxe

Crate syntaxe 

Source
Expand description

Memoir is a library of self-describing, reflective parser-combinators. Parsers are represented as reified objects that can print themselves as documentation.

For most purposes, syntaxe’s prelude should be imported.

use syntaxe::*;

let parser =
    string("set").then(optional(symbol('!')))
    .then(whitespace())
    .then(string("on").or(string("off")));

assert!(parser.parse("set on").is_ok());

Re-exports§

pub use parsers::*;

Modules§

parsers
Core parser types.
prelude
Exports all the common parser combinators.
result
Parser result types.