parent
59d5b1c384
commit
4f59df0cae
2 changed files with 57 additions and 7 deletions
@ -1 +1,15 @@ |
||||
alpha = { 'a'..'z' | 'A'..'Z' } |
||||
operator = @{ "operator" } // TODO |
||||
operand = @{ "operand" } // TODO |
||||
|
||||
instruction = { operator ~ (" "+ ~ operand)*} |
||||
|
||||
loopBlockStart = { "[" } |
||||
loopBlockEnd = { "]" } |
||||
loopBlock = { loopBlockStart |
||||
~ instruction* |
||||
~ loopBlockEnd |
||||
} |
||||
|
||||
statement = _{ instruction | loopBlock } |
||||
|
||||
file = {SOI ~ (statement ~ ("\n" | "\r\n")+)* ~ EOI} |
||||
|
Loading…
Reference in new issue