aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorRobin Moussu <robin.moussu+git@gmail.com>2018-04-08 01:07:05 +0200
committerRobin Moussu <robin.moussu+git@gmail.com>2018-04-09 01:04:38 +0200
commit715fbec331bd1f91a8bd5ece992aab66203af222 (patch)
tree24d78eccc2316b18cacdfe49f9329aa57ad5d959
parent5037bbc102fec39fbdef810427c31cb0a1722709 (diff)
downloadOneRoll-715fbec331bd1f91a8bd5ece992aab66203af222.tar.gz
OneRoll-715fbec331bd1f91a8bd5ece992aab66203af222.zip
add all operators in README.md
-rw-r--r--README.md29
-rw-r--r--diceparser.h15
2 files changed, 19 insertions, 25 deletions
diff --git a/README.md b/README.md
index 79561c9..c23ea6c 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ Instruction =: Expression
Expression =: number | number Dice DiceOperation | ScalarOperator Expression | string | variable Expression
Dice =: DiceOperator Number(faces) | DiceOperator ListOfValues
DiceOperator =: D | L
-DiceOperation =: Keep | KeepAndExplose | sort | if | explose | jumpbackward | merge | filter | parenthese | count | paint | group
+DiceOperation =: Keep | KeepAndExplose | Sort | Count | Reroll | If | Explose | RerollAndAdd | Jumpbackward | Merge | Filter | Split | Parenthese | Count | Paint | Group
ScalarOperator =: [x,-,*,x,/]
number =: [0-9]+ | constantValue
constantValue =: ${id | label}
@@ -30,16 +30,23 @@ ListOfValue=: String[Range],ListOfValue | String[Range]
String =: [A-z0-9]+
Keep =: k Number
KeepAndExplose =: K number
-sort =: s
-if =: i compareMethod [Validator] {Expression}[{Expression}]
-paint =: p [ count : color ]
-group =: number
-explose =: e Validator
-jumpbackward =: @DiceOperation
-merge =: m | m Expression
-filter =: f Validator
-parenthese =: (expression)
-count =: c Validator
+Reroll =: r
+Explosing =: e
+RerollOnceAndAdd =: a
+RerollAndAdd =: A
+Painter =: p
+Split =: u
+Group =: g
+Sort =: s
+If =: i compareMethod [Validator] {Expression}[{Expression}]
+Paint =: p [ Count : color ]
+Group =: number
+Explose =: e Validator
+Jumpbackward =: @DiceOperation
+Merge =: m | m Expression
+Filter =: f Validator
+Parenthese =: (expression)
+Count =: c Validator
```
diff --git a/diceparser.h b/diceparser.h
index abe19a1..6c59bae 100644
--- a/diceparser.h
+++ b/diceparser.h
@@ -47,20 +47,7 @@ class ExploseDiceNode;
*
* @section grammar The Grammar
*
- * The grammar is something like this:
- *
- * Line =: Command | Command;Command<br/>
- * Command =: Expression | ScalarOperator Expression | ScalarOperator NodeAction Expression<br/>
- * Expression =: number | number Dice | Command<br/>
- * Dice =: DiceOperator Number(faces) | DiceOperator List<br/>
- * List =: [Word[range|percentage],Number[range|percentage],',']+<br/>
- * Persentage =: Number <br/>
- * NodeAction =: @<br/>
- * DiceOperator =: [D,L]<br/>
- * ScalarOperator =: [x,-,*,x,/]<br/>
- * number =: [0-9]+<br/>
- * Word =: [A-z]+<br/>
- *
+ * The grammar is described in Readme.md
*/
/**