- | alternation
- () grouping
- [] option (0 or 1 times)
- {} repetition (0 to n times)
- a...b closed range (from a to b)
Non-terminals are in CamelCase. Terminals are enclosed in double quotes "".
Expression = UnaryExpression | Expression BinaryOperator Expression .
UnaryExpression = [ UnaryOperator ] Operand .
Operand = Literal | "(" Expression ")" .
BinaryOperator = AdditionGroupOperator | MultiplicationGroupOperator .
UnaryOperator = "+" | "-" .
AdditionGroupOperator = "+" | "-" .
MultiplicationGroupOperator = "*" | "/" .
Literal = FloatLiteral .
FloatLiteral = DecimalFloatLiteral .
DecimalFloatLiteral = DecimalDigits [ "." DecimalDigits ] .
DecimalDigits = DecimalDigit { [ "_" ] DecimalDigit } .
DecimalDigit = "0" ... "9" .