Crate songe

Source
Expand description

An interpreter for a lisp dialect.

There are three phases through which code is transformed:

  1. Scanner: transforms the input string into tokens
  2. Parser: transforms the tokens into an abstract syntax tree (AST) made of expressions
  3. Evaluator: Evaluates the program represented by the AST

Each phase is an iterator which feeds into the next.

Re-exports§

pub use evaluator::Evaluator;
pub use evaluator::Expr;
pub use parser::Parser;
pub use scanner::Scanner;

Modules§

evaluator
Expression evaluator.
parser
Parser.
scanner
Token scanner or “lexer”.

Functions§

evaluate
Evaluate expressions returned by a parser.
execute
Execute a program as a string, returning all top-level values.
parse
Build a syntax tree from the input string.