diff options
| author | 2016-11-29 12:54:46 +0100 | |
|---|---|---|
| committer | 2016-11-29 12:54:46 +0100 | |
| commit | 43ab25390377f3a312dc7245d83fe6abe9d0728a (patch) | |
| tree | 92ffb225eb58935518c334569da87030a804e7dd | |
| parent | 96c35f6b07ff125d5e784928d11d3063dc04cb44 (diff) | |
| download | OneRoll-43ab25390377f3a312dc7245d83fe6abe9d0728a.tar.gz OneRoll-43ab25390377f3a312dc7245d83fe6abe9d0728a.zip | |
Update README.md
update the grammar of diceparser
| -rw-r--r-- | README.md | 27 |
1 files changed, 21 insertions, 6 deletions
@@ -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 ``` |