program:
program ::= stmts
no referencesstmts:
stmts ::= ( ( if_stmt | match_stmt | while_stmt | break_stmt | cont_stmt | each_stmt | return_stmt | wait_stmt | do_stmt | exp_stmt )? ';' )*
referenced by:
block
program
block:
block ::= '{' stmts '}'
referenced by:
async_exp
do_stmt
each_stmt
if_stmt
match_stmt
method
this_exp
wait_stmt
while_stmt
wait_stmt:
wait_stmt
::= 'wait' block
referenced by:
stmts
do_stmt:
do_stmt ::= 'do' exp? block
referenced by:
stmts
if_stmt:
if_stmt ::= 'if' logic_exp block ( 'elif' logic_exp block )* ( 'else' block )?
referenced by:
stmts
match_stmt:
match_stmt
::= 'match' exp ( 'using' exp )? ( 'into' var_list )? ( 'with' exp ( 'into' var_list )? block )+ ( 'else' block )?
referenced by:
stmts
while_stmt:
while_stmt
::= 'while' logic_exp block
referenced by:
stmts
each_stmt:
each_stmt
::= 'each' ( name_token ':' )? var_list 'in' ( exp | '...' ) block
referenced by:
stmts
break_stmt:
break_stmt
::= 'break' clause
referenced by:
stmts
cont_stmt:
cont_stmt
::= 'continue' clause
referenced by:
stmts
return_stmt:
return_stmt
::= 'return' this_exp? clause
referenced by:
stmts
exp_stmt:
exp_stmt ::= this_exp clause
referenced by:
stmts
this_exp:
this_exp ::= exp ( ( 'using' exp )? block )?
referenced by:
exp_stmt
return_stmt
value
clause:
clause ::= ( ( 'if' | 'while' ) logic_exp | 'each' ( name_token ':' )? var_list 'in' ( exp | '...' ) )*
referenced by:
break_stmt
cont_stmt
exp_stmt
return_stmt
var_list:
var_list ::= name_token ( ',' name_token )*
referenced by:
clause
each_stmt
match_stmt
var_defs:
var_defs ::= name_token '=' append_exp ( ',' name_token '=' append_exp )*
referenced by:
closure
method
exp:
exp ::= async_exp
referenced by:
clause
closure
do_stmt
each_stmt
match_stmt
property
ternary_exp
this_exp
value
async_exp:
async_exp
::= ( '^' | 'async' ) ( assgn_exp | block )
| assgn_exp
referenced by:
exp
assgn_exp:
assgn_exp
::= ( 'local'? lvar ( ( ',' lvar )* '=' | '+=' | '-=' | '*=' | '/=' ) | property ( ':' | ':=' ) )* append_exp ( ',' append_exp )*
referenced by:
async_exp
lvar:
lvar ::= ( suffix | name_token ) suffix*
referenced by:
assgn_exp
append_exp:
append_exp
::= ( ternary_exp? ( '<<' | '>>' ) )? ternary_exp
referenced by:
assgn_exp
suffix
var_defs
ternary_exp:
ternary_exp
::= logic_exp ( '?' exp 'else' exp )?
referenced by:
append_exp
logic_exp:
logic_exp
::= not_exp ( ( '||' | '&&' | 'and' | 'or' ) not_exp )*
referenced by:
clause
if_stmt
ternary_exp
while_stmt
not_exp:
not_exp ::= ( '!' | 'not' )* eval_exp
referenced by:
logic_exp
eval_exp:
eval_exp ::= range_exp ( ( '==' | '!=' | '===' | '~~' | '<=>' | '<' | '<=' | '>' | '>=' ) range_exp )?
referenced by:
not_exp
range_exp:
range_exp
::= arith_exp ( '..' arith_exp )? ( '..' arith_exp )?
referenced by:
eval_exp
arith_exp:
arith_exp
::= prefix_exp ( ( '+' | '-' | '*' | '/' | '%' | '**' ) prefix_exp )*
referenced by:
range_exp
prefix_exp:
prefix_exp
::= ( '-'* | '@' ) term
referenced by:
arith_exp
term:
term ::= ( value | suffix | '+' value ( text_token | symbol_token )? ) suffix*
referenced by:
prefix_exp
suffix:
suffix ::= ( ( '.' | '.:' | '::' ) property )? ( '(' ( if_exp ( ',' if_exp )* )? ')' | '[' ( append_exp ( ',' append_exp )* )? ']' )?
referenced by:
lvar
term
property:
property ::= name_token
| symbol_token
| integer_token
| '(' exp ')'
referenced by:
assgn_exp
suffix
value:
value ::= literal
| name_token
| pseudo
| '(' exp ')'
| meth_val
| 'yield' this_exp?
referenced by:
closure
term
pseudo:
pseudo ::= 'self'
| 'this'
| 'context'
| 'selfmethod'
| 'baseurl'
| '...'
referenced by:
value
meth_val:
meth_val ::= method
| closure
referenced by:
value
method:
method ::= '*'? '[' var_defs ( ',' '...' )? ']' block
referenced by:
meth_val
closure:
closure ::= '<' var_defs '>' ( value | '{' exp ';' exp ';' '}' )
referenced by:
meth_val
literal:
literal ::= float_token
| integer_token
| text_token
| symbol_token
| url_token
| 'true'
| 'false'
| 'null'
referenced by:
value
float_token:
float_token
::= ( '0' - '9' )+ '.' ( '0' - '9' )* ( ( 'e' | 'E' ) ( '-' | '+' )? ( '0' - '9' )+ )?
referenced by:
literal
integer_token:
integer_token
::= ( '0' - '9' )+
| '0x' ( '0' - '9' | 'a' - 'f' | 'A' - 'F' )+
referenced by:
literal
property
text_token:
text_token
::= '"' any_char '"'
referenced by:
literal
term
symbol_token:
symbol_token
::= "'" any_char "'"
referenced by:
literal
property
term
url_token:
url_token
::= '@' any_char ( space | tab | lf | cr )
referenced by:
literal
name_token:
name_token
::= ( '$' | '_' | alpha_char ) ( alpha_char | '0' - '9' | '$' | '_' )* '?'?
referenced by:
clause
each_stmt
lvar
property
value
var_defs
var_list
... generated by Railroad Diagram Generator