program:

[program]{.code}(#program “program”) ::= [lines]{.code}(#lines “lines”)
no references
lines:

lines ::= [line]{.ebnf.code}(#line “line”)+
referenced by:
line:

`
line ::= statements ‘↵’?
| ‘↵’ |
`
referenced by:
statements:

`
::= statement+
`
referenced by:
statement:

`
| ::= ( ( ‘for’ ident ‘in’ | ‘while’ | ‘elif’ ) expression | fndefinition ‘(‘ ( ident ( ‘=’ expression )? )? ( ‘,’ ident ( ‘=’ expression )? )* ‘)’ ) ‘:’ codeblock |
| ‘if’ expression ‘:’ ( codeblock ( ‘elif’ expression ‘:’ codeblock )* ( ‘else’ ‘:’ codeblock )? | statements ) |
| ( identscalararraylhs ‘=’ | identscalararray opassgn | ‘print’ ) expression |
| ( ( ‘exit’ | ‘quit’ ) ‘(‘ | ‘native’? ident ‘(‘ fncallargs | ‘alias’ ‘(‘ ident ‘,’ expression ) ‘)’ |
| ‘return’ expression? |
| ‘pass’ |
| ’@’ ident |
`
referenced by:
arrayaccessor:

`
::= ( ‘[’ expression ‘]’ )+
`
referenced by:
fncallargs:

`
::= expression? ( ‘,’ expression )*
`
referenced by:
fndefinition:

`
::= ‘def’ ident
`
referenced by:
codeblock:

`
::= ‘↵’ ‘⇥’ lines ‘⇤’
`
referenced by:
opassgn:

`
opassgn ::= ‘+=’
| ’-=’ |
| ‘*=’ |
| ’/=’ |
| ’%=’ |
| ‘**=’ |
| ’//=’ |
`
referenced by:
declareident:

`
::= ident
`
no references
expression:

`
::= ‘not’? logical_and_expression ( ‘or’ logical_and_expression )*
`
referenced by:
logical_and_expression:

`
::= equality_expression ( ‘and’ equality_expression )*
`
referenced by:
equality_expression:

`
| ::= relational_expression ( ( ‘==’ | NEQ | ‘is’ ) relational_expression )* |
`
referenced by:
relational_expression:

`
| ::= additive_expression ( ( ‘>’ | ’<’ | ’<=’ | ’>=’ ) additive_expression )* |
`
referenced by:
additive_expression:

`
| ::= multiplicative_expression ( ( ‘+’ | ’-‘ ) multiplicative_expression )* |
`
referenced by:
multiplicative_expression:

`
| ::= ( value | ( ‘str’ ‘(‘ expression | ‘input’ ‘(‘ expression? ) ‘)’ | ’[’ expression ( ‘,’ expression )* ‘]’ ( ‘’ expression )? ) ( ( ‘’ | ’/’ | ’//’ | ’%’ | ‘*’ ) value ) |
`
referenced by:
value:

`
| ( ‘(‘ expression | ‘native’? ident ‘(‘ fncallargs | ( ‘id’ | ‘symbol’ ) ‘(‘ ident ) ‘)’ |
| identscalararray |
`
referenced by:
identscalararray:

`
::= ident arrayaccessor?
`
referenced by:
identscalararraylhs:

`
::= ident arrayaccessor?
`
referenced by:
ident:

`
ident ::= identifier
`
referenced by:
constant:

`
| constant ::= unary_operator? ( ‘integer’ | ‘real’ ) |
| HEX |
| ‘string’ |
| ‘True’ |
| ‘False’ |
| ‘None’ |
`
referenced by:
unary_operator:

`
::= ‘+’
| ’-‘ |
`
referenced by:
identifier:

`
| ::= ( letter | ‘_’ ) ( letter | digit | ‘_’ )* |
`
referenced by:
NEQ:

`
NEQ ::= ‘<>’
| ’!=’ |
`
referenced by:
letter:

`
letter ::= ‘A’
| ‘B’ |
| ‘C’ |
| ‘D’ |
| ‘E’ |
| ‘F’ |
| ‘G’ |
| ‘H’ |
| ‘I’ |
| ‘J’ |
| ‘K’ |
| ‘L’ |
| ‘M’ |
| ‘N’ |
| ‘O’ |
| ‘P’ |
| ‘Q’ |
| ‘R’ |
| ‘S’ |
| ‘T’ |
| ‘U’ |
| ‘V’ |
| ‘W’ |
| ‘X’ |
| ‘Y’ |
| ‘Z’ |
| ‘a’ |
| ‘b’ |
| ‘c’ |
| ‘d’ |
| ‘e’ |
| ‘f’ |
| ‘g’ |
| ‘h’ |
| ‘i’ |
| ‘j’ |
| ‘k’ |
| ‘l’ |
| ‘m’ |
| ‘n’ |
| ‘o’ |
| ‘p’ |
| ‘q’ |
| ‘r’ |
| ’s’ |
| ‘t’ |
| ‘u’ |
| ‘v’ |
| ‘w’ |
| ‘x’ |
| ‘y’ |
| ‘z’ |
`
referenced by:
digit:

`
digit ::= ‘0’
| ‘1’ |
| ‘2’ |
| ‘3’ |
| ‘4’ |
| ‘5’ |
| ‘6’ |
| ‘7’ |
| ‘8’ |
| ‘9’ |
`
referenced by:
HEX:

`
| HEX ::= ‘0x’ ( digit | ‘A’ | ‘B’ | ‘C’ | ‘D’ | ‘E’ | ‘F’ )+ |
`
referenced by:
… generated by RR - Railroad Diagram Generator
