The full formula.
Protected_ProtectedCollapse multiple additive operators into a single one.
A sequence of additive operators.
Protected_ProtectedHandle 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.
The position of the matched term in the formula string.
Protected_ProtectedHandle 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_ProtectedHandle a math term.
The Math function.
The first term.
Zero or more additional terms.
Associated flavor text.
The original matched text.
The position of the matched term in the formula string.
Protected_ProtectedHandle a numeric term.
The number.
Associated flavor text.
The position of the matched term in the formula string.
Protected_ProtectedHandle a parenthetical.
The inner term.
Associated flavor text.
The original matched text.
The position of the matched term in the formula string.
Protected_ProtectedHandle a pool term.
The first term.
Zero or more additional terms.
The matched modifiers string.
Associated flavor text.
The original matched text.
The position of the matched term in the formula string.
Protected_ProtectedHandle some string that failed to be classified.
The term.
Optionalflavor: string | nullAssociated flavor text.
The position of the matched term in the formula string.
Protected_ProtectedWrap 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.
StatictoUse 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.