change BNF (but not implementation of BNF) for parsing, to handle layers, and also change minimum key in layer tree to be 1
This commit is contained in:
@@ -4,14 +4,16 @@ 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".
|
||||
Terminals are surrounded by `**` to the left and right. (rule)+ means "1 or more".
|
||||
|
||||
```
|
||||
int ::= (0-9)+
|
||||
|
||||
item ::= **{** int int int int int int int int **}**
|
||||
|
||||
grid ::= int int **{** (item)+ **}**
|
||||
grid ::= **[** item **]**
|
||||
|
||||
grid_list ::= int int **{** (grid)+ **}**
|
||||
```
|
||||
|
||||
The first two `int`s in the grid `int int **{** (item)+ **}**` always follow the order: `canvasWidth canvasHeight`.
|
||||
|
||||
Reference in New Issue
Block a user