Carmine Margiotta <car.margiotta@icloud.com>
dice-parser is a tool for parsing and rolling dice expression.
A simple dice expression is in format ndX where n and X are natural numbers or, simply, n. Simple dice expressions can be composed in full dice expressions with + and - operators.
>(simple-rollexpression)
>(defineexpr"6d6")>(simple-rollexpr)'(653522)
>(rollexpression)
>(defineexpr"6d6+1d20-4")>(rollexpr)"6d6(6,5,3,5,2,2)+1d20(15)-4"34