Terms that are all lowercase are nonterminals.
Terms that are quoted are terminals that match exact lexemes.
Terms that are in all caps are terminals that are a single lexeme whose text representation may vary.
The grammar is in EBNF.
Only semantically significant whitespace is shown in the grammar.
EOL refers to either the end of line character or a semicolon as they are functionally equivalent.
Parser Grammar ==== expression = (NAME | input | infix | group | card | primitive ); input = expression, expression; infix = expression, [EVAL_OPERATOR | ASSIGN_OPERATOR | ACCESS_OPERATOR], expression; group = OPEN_DELIMITER, { expression }, CLOSE_DELIMITER; card = ([TYPE], ["{", {NAME | infix}, ["/", expression], "}"] ) | ([TYPE], "/", expression); primitive = S_INT | U_INT | S_DECIMAL | U_DECIMAL | STRING | BYTES | COMMENT; Primitive Grammar ==== S_INT = ("+" | "-"), INTEGER U_INT = INTEGER S_DECIMAL = ("+" | "-"), INTEGER, ".", INTEGER; U_DECIMAL = INTEGER, ".", INTEGER; STRING = ("'" | '"' | "`"), { CHAR }, ("'" | '"' | "`"), { STRING } BYTES = ( "\x" | "\b" | "\d" ), { INTEGER }; COMMENT = ("\\", { CHAR }, "\n") | ("\*", { CHAR }, "*\") Symbols ==== OPEN_DELIMITER = "[" | "(" | "{" | "(-" | "{:" | "(=" | "[:"; CLOSE_DELIMITER = "]" | ")" | "}"; ACCESS_OPERATOR = "." | "/" | "#" | "*" | "@"; ASSIGN_OPERATOR = ":" | "::" | ":&" | ":?" | ":+" | ":-" | ":#"; EVAL_OPERATOR = "#=" | "==" | "!=" | "<" | ">" | "<=" | ">=" | "|"; KEYWORD = "fn" | "cfn" | "pfn" | "conc" | "try" | "loop" | "next" | "key" | "val" | "init" | "dest" | "in" | "out" | "type" | "src" | "has" | "os" | "vol" | "void" | "esc" | "$" | "free" ; MATH: "sum" | "dif" | "mul" | "div" | "exp" | "mod" |