Add BNF for axes parsing

This commit is contained in:
Starbeamrainbowlabs 2021-11-29 23:20:40 +00:00
parent 14ba42fa4a
commit 50840ad5b9
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 27 additions and 0 deletions

27
.docs/grammars/axes.bnf Normal file
View File

@ -0,0 +1,27 @@
{%
Examples:
```
front 3 left 10 y 77 x 30 back 99
```
%}
<axes> ::= <axis_part> *
<axes_part> ::= <axis_name> <number>
<axis_name> ::= <axis_name_absolute>
| <axis_name_relative>
<axis_name_absolute> ::= <axis_letters_absolute>
| "-" <axis_letters_absolute>
<axis_name_relative> ::= front | back | left | right | up | down | "?"
<axis_letters_absolute> ::= x | y | z
<number> ::= <digit> *
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 0