Skip to content

Commit 0810cb2

Browse files
committed
Added documentation for the grammar
1 parent 12909c5 commit 0810cb2

3 files changed

Lines changed: 30 additions & 1 deletion

File tree

docs/source/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@
116116
('Usage', './usage.html')],
117117
'navbar_links': [('Documentation', [('Acquire', './acquire.html'),
118118
('Usage', './usage.html'),
119-
('Dice model', './docs/dice.html')]),
119+
('Dice model', './docs/dice.html'),
120+
('Grammar', './docs/grammar.html')]),
120121
('Info and Reports', [('Reports', './reports.html'),
121122
('Code docs', './code/index.html')])],
122123
}

docs/source/docs/grammar.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
=======
2+
Grammar
3+
=======
4+
5+
Only the most basic grammar is supported. This means basic operations with
6+
numbers and dice, and only common dice notation which excludes anything fancy
7+
such as percentile or Fudge dice.
8+
9+
The grammar is generated from code, so it is not included in a file.
10+
11+
--------
12+
Operands
13+
--------
14+
15+
The following values can appear in the grammar as operands:
16+
17+
- Dice, in the style of 2d6.
18+
- Numbers, but only integer values.
19+
20+
----------
21+
Operations
22+
----------
23+
24+
Only basic arithmetic operations are supported, and these can be applied any valid operand:
25+
26+
- Addition
27+
- Subtraction

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ Features
2525
reports
2626
code/index
2727
docs/dice
28+
docs/grammar

0 commit comments

Comments
 (0)