WHITESPACE = _{ " " | "\t" } COMMENT = _{ "/*" ~ (!"*/" ~ ANY)* ~ "*/" ~ NEWLINE* } program = { SOI ~ statement+ ~ EOI } statement = { (definition | expression) ~ NEWLINE* } definition = { symbol+ ~ "=" ~ expression } expression = { expression_node+ } expression_node = { integer_literal | operator | symbol | ("(" ~ expression ~ ")") } operator = { "+" | "-" | "/" | "*" } integer_literal = @{ "-"? ~ ASCII_DIGIT+ } symbol = @{ ASCII_ALPHA ~ (ASCII_ALPHANUMERIC | "-" | ".")* }