From da6582f328c17e1842a4632d88e06d851e7c4b5f Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Tue, 5 Sep 2017 22:51:14 -0400 Subject: Update README --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 692b9a2..326a826 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,8 @@ The parser recognizes the following grammar: | Die ' / ' Die | Die '+' Die | Die '-' Die + | Die '*' Die + | Die '/' Die | '-' Die | Die 'E' Die | Die 'e' Die @@ -116,6 +118,10 @@ Semantics are defined in terms of the `pool` function. * `D+E` is the additive bonus operation. For each die in `D`'s pool, the die is rolled and `roll(E)` is added to its result. * `D-E` is equivalent to `D+(-E)`. +* `D*E` is like `D+E` but multiplies each die in `D`'s pool the result of + rolling `E`. +* `D/E` is like `D+E` but performs integer division on each die in `D`'s pool + by the result of rolling `E`. * `DEF` (here `E` is the literal symbol `E`, `D` and `F` are dice expressions) is an "exploding die." First `D` is rolled. Now each die in the dice pool generated by `F` is rolled repeatedly until it rolls something less than the @@ -153,8 +159,9 @@ Additionally: associative. * The binary arithmetic operations bind as expected (multiplication and division bind stronger than addition and subtraction). -* The bonus operations (`+`, `-`) are left associative. They bind stronger than - arithmetic operations. +* The bonus operations (`+`, `-`, `*`, `/`) are left associative. They bind + stronger than arithmetic operations. `/` and `*` bind stronger than `+` and + `-`. * The die operations (`d`, `E`, `K`, etc.) are right associative (`1d2d3` is equivalent to `1d(2d3)`, use explicit parentheses if you need `(1d2)d3`). * Die operations bind stronger than the binary arithmetic operations -- cgit v1.2.3