18 lines
424 B
Markdown
18 lines
424 B
Markdown
|
|
# Parsing
|
||
|
|
|
||
|
|
The parsing functionality is for saving and loading from a custom file format.
|
||
|
|
|
||
|
|
The BNF for the custom file format is below.
|
||
|
|
|
||
|
|
Terminals are surrounded by `**` to the left and right. (rule)+ means "1 o more".
|
||
|
|
|
||
|
|
```
|
||
|
|
int ::= (0-9)+
|
||
|
|
|
||
|
|
item ::= **{** int int int int int int int int **}**
|
||
|
|
|
||
|
|
grid ::= int int **{** (item)+ **}**
|
||
|
|
```
|
||
|
|
|
||
|
|
The large number of `int`s in the `item` always follows the order: `x y ex ey r g b a`.
|