santiago 0.1.1

A lexing and parsing toolkit for Rust
Documentation

Features

  • ✔️ Crab friendly 🦀

    It's written in Rust, with zero dependencies, maximum portability.

  • ✔️ Human friendly

    Built with a focus on ergonomics, defining a grammar is closely the same to its Backus–Naur form.

  • ✔️ Powerful

    Santiago can parse all context-free languages, including ambiguous and recursive grammars.

  • ✔️ Cutting-edge

    Santiago uses the Earley algorithm. Its time and space performance is close to the known theoretical minimum.

Getting started

Just checkout the examples:

You can run the examples by cloning this project and executing:

/santiago $ cargo run --example calculator

Alternatives

Santiago aims to be an alternative to GNU Bison, Yacc and Flex.

Sadly those long standing tools do not offer Rust compatibility.

Short term goals

In order:

  1. Enforce resolving ambiguities in the input grammar.

  2. Implement a Flex-like interface for the lexer, so that you can really do complex lexing beyond 'char-by-char'

  3. Release 1.0.0.