klang 0.2.0

The Klang programming language
Documentation
WHITESPACE = _{ " " | "\t" }
COMMENT = _{
    "//" ~ (!("\n" | "\r") ~ ANY)* ~ ("\r"? ~ "\n" | EOI) |
    "/*" ~ (!"*/" ~ ANY)* ~ "*/"
}

text = { ( ASCII_ALPHANUMERIC | "," | "." | "!" | "?" | "%" | " " )+ }

function_arg = { "[" ~ text ~ "]" }
text_with_function_args = { (text | function_arg)+ }

function_param = { "[" ~ text ~ "]" }
text_with_function_params = { (text | function_param)+ }

command = { text_with_function_args }
function_def = { ">" ~ text_with_function_params ~ "{" ~ line* ~ "}" }
function_call = { "\"" ~ text_with_function_args }

empty_line = { NEWLINE }
line = { function_def | function_call | command | empty_line }
program = { SOI ~ line* ~ EOI }