Rollex

Summary

roll(roll_expr, options \\ [token_list: [%{__struct__: Rollex.Tokens.Division, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 0, 0, 0, <<69, 82, 67, 80, 74, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A\\/"}}, %{__struct__: Rollex.Tokens.Multiplication, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 0, 0, 0, <<69, 82, 67, 80, 74, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A\\*"}}, %{__struct__: Rollex.Tokens.Subtraction, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 0, 0, 0, <<69, 82, 67, 80, 74, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A\\-"}}, %{__struct__: Rollex.Tokens.Addition, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 0, 0, 0, <<69, 82, 67, 80, 74, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A\\+"}}, %{__struct__: Rollex.Tokens.TakeTopDice, raw_token: nil, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 3, 0, 0, <<69, 82, 67, 80, 138, 0, 0, 0, 16, 0, 0, 0, 65, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 94, 0, 1, 0, 3, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A(\\d+)*[dD](\\d+)\\^(\\d+)"}, rejected_rolls: [], valid_rolls: []}, %{__struct__: Rollex.Tokens.TakeBottomDice, raw_token: nil, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 3, 0, 0, <<69, 82, 67, 80, 138, 0, 0, 0, 16, 0, 0, 0, 65, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 118, 0, 1, 0, 3, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A(\\d+)*[dD](\\d+)v(\\d+)"}, rejected_rolls: [], valid_rolls: []}, %{__struct__: Rollex.Tokens.RegularDice, raw_token: nil, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 2, 0, 0, <<69, 82, 67, 80, 126, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A(\\d+)*[dD](\\d+)"}, rejected_rolls: [], valid_rolls: []}, %{__struct__: Rollex.Tokens.Number, raw_token: nil, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 1, 0, 0, <<69, 82, 67, 80, 87, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A\\d+(\\.\\d+)?"}, value: 0.0}, %{__struct__: Rollex.Tokens.LeftParenthesis, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 0, 0, 0, <<69, 82, 67, 80, 74, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A\\("}}, %{__struct__: Rollex.Tokens.RightParenthesis, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 0, 0, 0, <<69, 82, 67, 80, 74, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A\\)"}}], lexer: Rollex.Lexer, validator: Rollex.Validator, evaluator: Rollex.Evaluator])

Functions

roll(roll_expr, options \\ [token_list: [%{__struct__: Rollex.Tokens.Division, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 0, 0, 0, <<69, 82, 67, 80, 74, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A\\/"}}, %{__struct__: Rollex.Tokens.Multiplication, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 0, 0, 0, <<69, 82, 67, 80, 74, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A\\*"}}, %{__struct__: Rollex.Tokens.Subtraction, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 0, 0, 0, <<69, 82, 67, 80, 74, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A\\-"}}, %{__struct__: Rollex.Tokens.Addition, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 0, 0, 0, <<69, 82, 67, 80, 74, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A\\+"}}, %{__struct__: Rollex.Tokens.TakeTopDice, raw_token: nil, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 3, 0, 0, <<69, 82, 67, 80, 138, 0, 0, 0, 16, 0, 0, 0, 65, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 94, 0, 1, 0, 3, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A(\\d+)*[dD](\\d+)\\^(\\d+)"}, rejected_rolls: [], valid_rolls: []}, %{__struct__: Rollex.Tokens.TakeBottomDice, raw_token: nil, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 3, 0, 0, <<69, 82, 67, 80, 138, 0, 0, 0, 16, 0, 0, 0, 65, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 118, 0, 1, 0, 3, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A(\\d+)*[dD](\\d+)v(\\d+)"}, rejected_rolls: [], valid_rolls: []}, %{__struct__: Rollex.Tokens.RegularDice, raw_token: nil, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 2, 0, 0, <<69, 82, 67, 80, 126, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A(\\d+)*[dD](\\d+)"}, rejected_rolls: [], valid_rolls: []}, %{__struct__: Rollex.Tokens.Number, raw_token: nil, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 1, 0, 0, <<69, 82, 67, 80, 87, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A\\d+(\\.\\d+)?"}, value: 0.0}, %{__struct__: Rollex.Tokens.LeftParenthesis, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 0, 0, 0, <<69, 82, 67, 80, 74, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A\\("}}, %{__struct__: Rollex.Tokens.RightParenthesis, regex: %{__struct__: Regex, opts: "", re_pattern: {:re_pattern, 0, 0, 0, <<69, 82, 67, 80, 74, 0, 0, 0, 16, 0, 0, 0, 1, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...>>}, source: "\\A\\)"}}], lexer: Rollex.Lexer, validator: Rollex.Validator, evaluator: Rollex.Evaluator])