Module mice::parse

source · []
Expand description

Types and a parser for dice programs. Note that all byte strings in this module are conventionally UTF-8.

Structs

A parsed dice program. The result of invoking parse_expression on something like "3d6 + 4".

Enums

Expression parsing error.

Operators

An AST node. This represents an expression as a tree of nodes stored in an Arena.

Units of input as segmented by the lexer.

Functions

Dice program parser combinator. Consumes input until it reaches unrecognizable tokens, and attempts to build a dice program from the consumed input.