Skip to main content

Module parser

Module parser 

Source
Expand description

Symbolic expression parser.

Parses mathematical expressions (e.g. "x^2 + 2*x + 1") into the global DAG using nom-based combinators with precedence climbing. Symbolic expression parser.

Parses textual mathematical expressions into the global DAG. Uses nom combinators with precedence climbing for correct operator binding.

  • lexer — Tokenizer for numbers, identifiers, operators, parens.
  • expr — Precedence-climbing expression parser.
  • error — Span-annotated parse error types.

Re-exports§

pub use expr::PrecedenceTable;
pub use expr::parse_expression;
pub use expr::parse_with_table;

Modules§

error
Parse error types with line/column span information.
expr
Precedence-climbing expression parser.
lexer
Lexer helper functions for expression parsing.