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