|
|
|
@ -1,6 +1,3 @@ |
|
|
|
|
operator = @{ "operator" } // TODO |
|
|
|
|
operand = @{ "operand" } // TODO |
|
|
|
|
|
|
|
|
|
wordSeperator =_{ " " | "-" | "_" } |
|
|
|
|
variable =@{ ASCII_ALPHA |
|
|
|
|
~ (ASCII_ALPHANUMERIC | wordSeperator)* |
|
|
|
@ -58,8 +55,6 @@ instruction =_{ macaroo |
|
|
|
|
|
|
|
|
|
| getchr |
|
|
|
|
| print |
|
|
|
|
|
|
|
|
|
| operator ~ (spacing+ ~ operand)? |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
loopBlockStart = { "[" ~ NEWLINE } |
|
|
|
@ -69,13 +64,13 @@ loopBlock = { loopBlockStart |
|
|
|
|
~ spacing* ~ loopBlockEnd |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
statement = _{ spacing* |
|
|
|
|
statement =_{ spacing* |
|
|
|
|
~ (instruction | loopBlock) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
statements = _{ (statement | NEWLINE)* } |
|
|
|
|
statements =_{ (statement | NEWLINE)* } |
|
|
|
|
|
|
|
|
|
spacing = _{ " " | "\t" } |
|
|
|
|
COMMENT = _{ ";;" ~ (!NEWLINE ~ ANY)* ~ NEWLINE} |
|
|
|
|
spacing =_{ " " | "\t" } |
|
|
|
|
COMMENT =_{ ";;" ~ (!NEWLINE ~ ANY)* ~ NEWLINE } |
|
|
|
|
|
|
|
|
|
file = {SOI ~ (statement ~ NEWLINE+)* ~ EOI} |
|
|
|
|
file = { SOI ~ (statement ~ NEWLINE+)* ~ EOI } |
|
|
|
|