Grammar:
- START -> STATEMENT START?
- BLOCK -> whitespace STATEMENT BLOCK?
- STATEMENT -> SIMPLE whitespace? comment? newline | COMPOUND | newline
- SIMPLE -> whitespace | comment | EXPRESSION | identifier whitespace? assignment whitespace? EXPRESSION | reserved:return whitespace EXPRESSION | reserved:pass | reserved:break | reserved:continue
- COMPOUND -> IF | WHILE | FOR | FUNCTION
- IF -> reserved:if whitespace EXPRESSION whitespace? punctuation:: whitespace? comment? newline BLOCK ELIF?
- ELIF -> whitespace? reserved:elif whitespace EXPRESSION whitespace? punctuation:: whitespace? comment? newline BLOCK ELIF? | ELSE?
- ELSE -> whitespace? reserved:else whitespace? punctuation:: whitespace? comment? newline BLOCK
- WHILE -> reserved:while whitespace EXPRESSION whitespace? punctuation:: whitespace? comment? newline BLOCK ELSE?
- FOR -> reserved:for whitespace identifier whitespace reserved:in whitespace EXPRESSION whitespace? punctuation:: whitespace? comment? newline BLOCK ELSE?
- FUNCTION -> reserved:def whitespace identifier whitespace? punctuation:( whitespace? ARGS? whitespace? punctuation:) whitespace? punctuation:: whitespace? comment? newline BLOCK
- ARGS -> identifier ARGS_PRIME?
- ARGS_PRIME -> whitespace? punctuation:, whitespace? identifier ARGS_PRIME?
- FUNCTION_CALL -> identifier whitespace? punctuation:( whitespace? PARAMS? whitespace? punctuation:)
- PARAMS -> EXPRESSION PARAMS_PRIME?
- PARAMS_PRIME -> whitespace? punctuation:, whitespace? EXPRESSION PARAMS_PRIME?
- EXPRESSION -> COMPARISION whitespace? EXPRESSION_PRIME?
- EXPRESSION_PRIME -> operator:and whitespace? COMPARISION whitespace? EXPRESSION_PRIME? | operator:or whitespace? COMPARISION whitespace? EXPRESSION_PRIME?
- COMPARISION -> BITWISE whitespace? COMPARISION_PRIME?
- COMPARISION_PRIME -> comparator:<= whitespace? BITWISE whitespace? COMPARISION_PRIME? | comparator:>= whitespace? BITWISE whitespace? COMPARISION_PRIME? | comparator:< whitespace? BITWISE whitespace? COMPARISION_PRIME? | comparator:> whitespace? BITWISE whitespace? COMPARISION_PRIME? | comparator:== whitespace? BITWISE whitespace? COMPARISION_PRIME? | comparator:!= whitespace? BITWISE whitespace? COMPARISION_PRIME?
- BITWISE -> OPERAND whitespace? BITWISE_PRIME?
- BITWISE_PRIME -> bitwise:<< whitespace? OPERAND whitespace? BITWISE_PRIME? | bitwise:>> whitespace? OPERAND whitespace? BITWISE_PRIME? | bitwise:& whitespace? OPERAND whitespace? BITWISE_PRIME? | bitwise:| whitespace? OPERAND whitespace? BITWISE_PRIME? | bitwise:^ whitespace? OPERAND whitespace? BITWISE_PRIME?
- OPERAND -> TERM whitespace? OPERAND_PRIME?
- OPERAND_PRIME -> operator:+ whitespace? TERM whitespace? OPERAND_PRIME? | operator:- whitespace? TERM whitespace? OPERAND_PRIME?
- TERM -> FACTOR whitespace? TERM_PRIME?
- TERM_PRIME -> operator:% whitespace? FACTOR whitespace? TERM_PRIME? | operator:// whitespace? FACTOR whitespace? TERM_PRIME? | operator:/ whitespace? FACTOR whitespace? TERM_PRIME? | operator:* whitespace? FACTOR whitespace? TERM_PRIME?
- FACTOR -> punctuation:( whitespace? EXPRESSION whitespace? punctuation:) | FUNCTION_CALL | none | boolean | int | float | string | identifier