add function to quad tree to turn items into strings (for later saving to file)

This commit is contained in:
2025-07-12 03:38:20 +01:00
parent 21512cc979
commit 04bb7a18c0
15 changed files with 50 additions and 15 deletions

19
fcore/parser/parser.md Normal file
View File

@@ -0,0 +1,19 @@
# 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 first two `int`s in the grid `int int **{** (item)+ **}**` always follow the order: `canvasWidth canvasHeight`.
The large number of `int`s in the `item` always follows the order: `x y ex ey r g b a`.