aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/README.md
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2017-12-18 14:31:18 +0100
committerGitHub <noreply@github.com>2017-12-18 14:31:18 +0100
commit095e1e5016369680dd320036cb1456df54b40a1a (patch)
tree1a503aec5bf1f6ca4f98dc9660747d18f57aeccc /README.md
parent5f3d391c3dce4e47169499de156228e0cbfe933a (diff)
downloadOneRoll-095e1e5016369680dd320036cb1456df54b40a1a.tar.gz
OneRoll-095e1e5016369680dd320036cb1456df54b40a1a.zip
Update README.md
update grammar
Diffstat (limited to 'README.md')
-rw-r--r--README.md17
1 files changed, 12 insertions, 5 deletions
diff --git a/README.md b/README.md
index 0e32f80..79561c9 100644
--- a/README.md
+++ b/README.md
@@ -9,13 +9,18 @@ Rolisteam Dice Parser
The grammar is something like this:
```
-Command =: Expression
-Expression =: number | number Dice DiceOperation | ScalarOperator Expression | string
+Command =: Instruction [';',Instruction]*
+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
+DiceOperation =: Keep | KeepAndExplose | sort | if | explose | jumpbackward | merge | filter | parenthese | count | paint | group
ScalarOperator =: [x,-,*,x,/]
-number =: [0-9]+
+number =: [0-9]+ | constantValue
+constantValue =: ${id | label}
+id=[_,a-z][_,A-z,0-9]*
+label=[_,a-z][_,A-z,0-9,é,è,ç,û,ê,â]*
+variable = ${[0-9]+}
Validator =: BooleanValidator | RangeValidator | CompositeValidator
CompositeValidator =: Validator LogicOpetator Validator
LogicOpetator =: = | > | => | < | =<
@@ -26,7 +31,9 @@ String =: [A-z0-9]+
Keep =: k Number
KeepAndExplose =: K number
sort =: s
-if =: i compareMethod [Validator] {Expression}
+if =: i compareMethod [Validator] {Expression}[{Expression}]
+paint =: p [ count : color ]
+group =: number
explose =: e Validator
jumpbackward =: @DiceOperation
merge =: m | m Expression