From 8ae72d92044d4cb60deb31c2d1b29b1a56b32a3a Mon Sep 17 00:00:00 2001 From: Renaud G Date: Mon, 28 Nov 2016 01:28:43 +0100 Subject: update. echap some character. --- HelpMe.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/HelpMe.md b/HelpMe.md index d2a12a0..b7a7db8 100644 --- a/HelpMe.md +++ b/HelpMe.md @@ -170,20 +170,20 @@ There is also 2 optional parameters > i*[]{}{} -\* : the compare method -[] : the validator -{} : the true instruction -{} : the false instruction +* \* : the compare method +* [] : the validator +* {} : the true instruction +* {} : the false instruction ## Compare method There are 3 different methods. -* On Each : the condition is tested on each die from the previous part of the command. \[Default method\] -* All Of Them : All dice must fit the condition to trigger the true instruction. If all dice do not fit the condition the false instruction is run. -* One Of Them : at least one die must fit the condition to trigger the true instruction. If no dices fit the condition the false instruction is run. +* **On Each** : the condition is tested on each die from the previous part of the command. \[Default method\] +* **All Of Them** : All dice must fit the condition to trigger the true instruction. If all dice do not fit the condition the false instruction is run. +* **One Of Them** : at least one die must fit the condition to trigger the true instruction. If no dices fit the condition the false instruction is run. -To switch the operator to act in '''All Of Them''' method you must add '*' character as compare method position. -To switch the operator to act in '''One Of Them''' method you must add '.' character as compare method position. +To switch the operator to act in **All Of Them** method you must add **\*** character as compare method position. +To switch the operator to act in **One Of Them** method you must add **.** character as compare method position. ## example: -- cgit v1.2.3-70-g09d2 From 96c35f6b07ff125d5e784928d11d3063dc04cb44 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Tue, 29 Nov 2016 12:37:33 +0100 Subject: Update README.md update readme --- README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a0031a6..1aeb49e 100644 --- a/README.md +++ b/README.md @@ -10,19 +10,15 @@ Rolisteam Dice Parser ## Grammar The grammar is something like this: +``` Command =: Expression - Expression =: number | number Dice | ScalarOperator Expression - Dice =: DiceOperator Number(faces) - DiceOperator =: D - ScalarOperator =: [x,-,*,x,/] - number =: [0-9]+ - Validator =: number | [operator number] | [ number - number ] +``` ## Example: -- cgit v1.2.3-70-g09d2 From 43ab25390377f3a312dc7245d83fe6abe9d0728a Mon Sep 17 00:00:00 2001 From: Renaud G Date: Tue, 29 Nov 2016 12:54:46 +0100 Subject: Update README.md update the grammar of diceparser --- README.md | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1aeb49e..0746586 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,6 @@ # DiceParser - - Rolisteam Dice Parser ## Grammar @@ -12,12 +10,29 @@ The grammar is something like this: ``` Command =: Expression -Expression =: number | number Dice | ScalarOperator Expression -Dice =: DiceOperator Number(faces) -DiceOperator =: D +Expression =: number | number Dice DiceOperation | ScalarOperator Expression | string +Dice =: DiceOperator Number(faces) | DiceOperator ListOfValues +DiceOperator =: D | L +DiceOperation =: Keep | KeepAndExplose | sort | if | explose | jumpbackward | merge | filter | parenthese | count ScalarOperator =: [x,-,*,x,/] number =: [0-9]+ -Validator =: number | [operator number] | [ number - number ] +Validator =: BooleanValidator | RangeValidator | CompositeValidator +CompositeValidator =: Validator LogicOpetator Validator +LogicOpetator =: = | > | => | < | =< +RangeValidator =: [ number - number ] +BooleanValidator =: number | [operator number] | +ListOfValue=: String[Range],ListOfValue | String[Range] +String =: [A-z0-9]+ +Keep =: k Number +KeepAndExplose =: K number +sort =: s +if =: i compareMethod [Validator] {Expression} +explose =: e Validator +jumpbackward =: @DiceOperation +merge =: m | m Expression +filter =: f Validator +parenthese =: (expression) +count =: c Validator ``` -- cgit v1.2.3-70-g09d2