|
|
@ -1,7 +1,7 @@ |
|
|
|
operator = @{ "operator" } // TODO |
|
|
|
operator = @{ "operator" } // TODO |
|
|
|
operand = @{ "operand" } // TODO |
|
|
|
operand = @{ "operand" } // TODO |
|
|
|
|
|
|
|
|
|
|
|
instruction = { operator ~ (" "+ ~ operand)? } |
|
|
|
instruction = { operator ~ (spacing+ ~ operand)? } |
|
|
|
|
|
|
|
|
|
|
|
loopBlockStart = { "[" ~ newline } |
|
|
|
loopBlockStart = { "[" ~ newline } |
|
|
|
loopBlockEnd = { "]" } |
|
|
|
loopBlockEnd = { "]" } |
|
|
@ -15,5 +15,6 @@ statement = _{ instruction | loopBlock } |
|
|
|
statements = _{ statement* } |
|
|
|
statements = _{ statement* } |
|
|
|
|
|
|
|
|
|
|
|
newline = _{ "\n" | "\r\n" } |
|
|
|
newline = _{ "\n" | "\r\n" } |
|
|
|
|
|
|
|
spacing = _{ " " | "\t" } |
|
|
|
|
|
|
|
|
|
|
|
file = {SOI ~ (statement ~ newline+)* ~ EOI} |
|
|
|
file = {SOI ~ (statement ~ newline+)* ~ EOI} |
|
|
|