The full formula.
Protected_collapseProtectedCollapse multiple additive operators into a single one.
A sequence of additive operators.
Protected_onProtectedHandle a dice term.
The number of dice.
The number of die faces or a string denomination like "c" or "f".
The matched modifiers string.
Associated flavor text.
The original matched text.
Protected_onProtectedHandle a base roll expression.
The first operand.
Zero or more subsequent (operators, operand) tuples.
Optionalleading: stringA leading operator.
The original matched text.
The peggy error callback to invoke on a parse error.
Protected_onProtectedHandle a math term.
The Math function.
The first term.
Zero or more additional terms.
Associated flavor text.
The original matched text.
Protected_onProtectedHandle a numeric term.
The number.
Associated flavor text.
Protected_onProtectedHandle a parenthetical.
The inner term.
Associated flavor text.
The original matched text.
Protected_onProtectedHandle a pool term.
The first term.
Zero or more additional terms.
The matched modifiers string.
Associated flavor text.
The original matched text.
Protected_onProtectedHandle some string that failed to be classified.
The term.
Optionalflavor: null | stringAssociated flavor text.
Protected_wrapProtectedWrap a term with a leading minus.
The term to wrap.
StaticflattenFlatten a tree structure (either a parse tree or AST) into an array with operators in infix notation.
The root of the tree.
StaticformatFormat a parser argument.
The argument.
StaticformatFormat arguments for debugging.
The method name.
The arguments.
StaticformatFormat a list argument.
The list to format.
StaticisDetermine if a given node is an operator term.
StatictoASTUse the Shunting Yard algorithm to convert a parse tree or list of terms into an AST with correct operator precedence. See https://en.wikipedia.org/wiki/Shunting_yard_algorithm for a description of the algorithm in detail.
The root of the parse tree or a list of terms.
The root of the AST.
A class for transforming events from the Peggy grammar lexer into various formats.