- loopBlocks now contain statements i.o. instructionsrewrite/grammar-implicit-whitespace
parent
c949adeed9
commit
0c87557d39
1 changed files with 12 additions and 10 deletions
@ -1,15 +1,17 @@ |
||||
operator = @{ "operator" } // TODO |
||||
operand = @{ "operand" } // TODO |
||||
operator = @{ "operator" } // TODO |
||||
operand = @{ "operand" } // TODO |
||||
|
||||
instruction = { operator ~ (" "+ ~ operand)*} |
||||
instruction = { operator ~ (" "+ ~ operand)* } |
||||
|
||||
loopBlockStart = { "[" } |
||||
loopBlockEnd = { "]" } |
||||
loopBlock = { loopBlockStart |
||||
~ instruction* |
||||
~ loopBlockEnd |
||||
} |
||||
loopBlockStart = { "[" } |
||||
loopBlockEnd = { "]" } |
||||
loopBlock = { loopBlockStart |
||||
~ statements |
||||
~ loopBlockEnd |
||||
} |
||||
|
||||
statement = _{ instruction | loopBlock } |
||||
statements = _{ statement* } |
||||
|
||||
statement = _{ instruction | loopBlock } |
||||
|
||||
file = {SOI ~ (statement ~ ("\n" | "\r\n")+)* ~ EOI} |
||||
|
Loading…
Reference in new issue