No description
  • Go 99.2%
  • Shell 0.8%
Find a file
2024-10-19 10:56:17 -04:00
cmd/demo Lots of passing tests 2024-10-18 22:35:58 -04:00
docs Tweaking EBNF 2024-10-18 11:56:43 -04:00
examples Rewrite time 2024-10-11 08:37:09 -04:00
lexer Add lexing and tests for exploding die 2024-10-19 10:56:17 -04:00
.gitignore Add stringer for tokens 2024-10-11 09:00:02 -04:00
build.sh building the bones of the lexer 2024-10-11 09:19:01 -04:00
go.mod Lexing is getting into a good shape 2024-10-14 14:35:26 -04:00
go.sum Lexing is getting into a good shape 2024-10-14 14:35:26 -04:00
README.md fix faces specification 2024-10-11 22:40:19 -04:00

Grammar

Valid dice rolls are defined by an EBNF specification which can be found in the docs. You can view the railroad diagram here.

Examples

Here are some valid roll inputs:

  • 1d20
  • 13d3
  • 2d5 - 4
  • 5d{red,blue,green}
  • 2d{1,3,17}
  • kh2d20 + 3
  • dl3d13 - 4