input: package_directive import_directive declaration namespace_declaration
input    ::= package_directive import_directive* ( declaration | namespace_declaration )*
no referencespackage_directive: package identifier optional_library_path api_or_impl ;
package_directive
         ::= 'package' identifier optional_library_path api_or_impl ';'
referenced by: input import_directive: import identifier optional_library_path ;
         ::= 'import' identifier optional_library_path ';'
referenced by: input optional_library_path: library string_literal
         ::= ( 'library' string_literal )?
referenced by: import_directive package_directive api_or_impl: api impl
         ::= 'api'
           | 'impl'
referenced by: package_directive primary_expression: identifier designator . Self integer_literal string_literal true false sized_type_literal String bool Type paren_expression struct_literal struct_type_literal [ expression ; expression ]
         ::= identifier
           | designator
           | '.'? 'Self'
           | integer_literal
           | string_literal
           | 'true'
           | 'false'
           | sized_type_literal
           | 'String'
           | 'bool'
           | 'Type'
           | paren_expression
           | struct_literal
           | struct_type_literal
           | '[' expression ';' expression? ']'
referenced by: postfix_expression postfix_expression: primary_expression intrinsic_identifier tuple designator -> identifier ( expression ) . ( expression ) [ expression ] tuple POSTFIX_STAR UNARY_STAR
         ::= ( primary_expression | intrinsic_identifier tuple ) ( designator | '->' ( identifier | '(' expression ')' ) | '.' '(' expression ')' | '[' expression ']' | tuple | POSTFIX_STAR | UNARY_STAR )*
referenced by: non_expression_pattern ref_deref_expression ref_deref_expression: PREFIX_STAR UNARY_STAR & postfix_expression
         ::= ( PREFIX_STAR | UNARY_STAR | '&' )* postfix_expression
referenced by: and_or_operand comparison_operand complement_expression minus_expression not_expression simple_binary_operand statement_expression type_expression unimpl_expression fn_type_expression: __Fn tuple -> type_expression
         ::= '__Fn' tuple '->' type_expression
referenced by: type_expression value_expression type_expression: ref_deref_expression bitwise_and_expression fn_type_expression
         ::= ref_deref_expression
           | bitwise_and_expression
           | fn_type_expression
referenced by: declaration fn_type_expression impl_type statement type_or_where_expression where_expression minus_expression: - ref_deref_expression
         ::= '-' ref_deref_expression
referenced by: unary_expression complement_expression: ^ ref_deref_expression
         ::= '^' ref_deref_expression
referenced by: unary_expression unary_expression: minus_expression complement_expression
         ::= minus_expression
           | complement_expression
referenced by: simple_binary_operand value_expression simple_binary_operand: ref_deref_expression unary_expression
         ::= ref_deref_expression
           | unary_expression
referenced by: additive_lhs additive_operand as_expression bit_shift_expression bitwise_and_expression bitwise_and_lhs bitwise_or_expression bitwise_or_lhs bitwise_xor_expression bitwise_xor_lhs modulo_expression multiplicative_expression multiplicative_lhs multiplicative_lhs: simple_binary_operand multiplicative_expression
         ::= simple_binary_operand
           | multiplicative_expression
referenced by: multiplicative_expression multiplicative_expression: multiplicative_lhs BINARY_STAR / simple_binary_operand
         ::= multiplicative_lhs ( BINARY_STAR | '/' ) simple_binary_operand
referenced by: additive_expression additive_operand multiplicative_lhs additive_operand: simple_binary_operand multiplicative_expression
         ::= simple_binary_operand
           | multiplicative_expression
referenced by: additive_expression additive_lhs: simple_binary_operand additive_expression
         ::= simple_binary_operand
           | additive_expression
referenced by: additive_expression additive_expression: multiplicative_expression additive_lhs + - additive_operand
         ::= multiplicative_expression
           | additive_lhs ( '+' | '-' ) additive_operand
referenced by: additive_lhs value_expression modulo_expression: simple_binary_operand % simple_binary_operand referenced by: value_expression bitwise_and_lhs: simple_binary_operand bitwise_and_expression
         ::= simple_binary_operand
           | bitwise_and_expression
referenced by: bitwise_and_expression bitwise_and_expression: bitwise_and_lhs & simple_binary_operand
         ::= bitwise_and_lhs '&' simple_binary_operand
referenced by: bitwise_and_lhs bitwise_expression type_expression bitwise_or_lhs: simple_binary_operand bitwise_or_expression
         ::= simple_binary_operand
           | bitwise_or_expression
referenced by: bitwise_or_expression bitwise_or_expression: bitwise_or_lhs | simple_binary_operand
         ::= bitwise_or_lhs '|' simple_binary_operand
referenced by: bitwise_expression bitwise_or_lhs bitwise_xor_lhs: simple_binary_operand bitwise_xor_expression
         ::= simple_binary_operand
           | bitwise_xor_expression
referenced by: bitwise_xor_expression bitwise_xor_expression: bitwise_xor_lhs ^ simple_binary_operand
         ::= bitwise_xor_lhs '^' simple_binary_operand
referenced by: bitwise_expression bitwise_xor_lhs bitwise_expression: bitwise_and_expression bitwise_or_expression bitwise_xor_expression
         ::= bitwise_and_expression
           | bitwise_or_expression
           | bitwise_xor_expression
referenced by: value_expression bit_shift_expression: simple_binary_operand << >> simple_binary_operand
         ::= simple_binary_operand ( '<<' | '>>' ) simple_binary_operand
referenced by: value_expression as_expression: simple_binary_operand as simple_binary_operand
         ::= simple_binary_operand 'as' simple_binary_operand
referenced by: value_expression unimpl_expression: ref_deref_expression __unimplemented_example_infix ref_deref_expression
         ::= ref_deref_expression '__unimplemented_example_infix' ref_deref_expression
referenced by: value_expression value_expression: additive_expression as_expression bitwise_expression bit_shift_expression fn_type_expression modulo_expression unary_expression unimpl_expression
         ::= additive_expression
           | as_expression
           | bitwise_expression
           | bit_shift_expression
           | fn_type_expression
           | modulo_expression
           | unary_expression
           | unimpl_expression
referenced by: comparison_expression comparison_operand comparison_operand: ref_deref_expression value_expression
         ::= ref_deref_expression
           | value_expression
referenced by: comparison_expression where_clause comparison_operator: == < <= > >= !=
         ::= '=='
           | '<'
           | '<='
           | '>'
           | '>='
           | '!='
referenced by: comparison_expression comparison_expression: value_expression comparison_operand comparison_operator comparison_operand
         ::= value_expression
referenced by: predicate_expression not_expression: not ref_deref_expression
         ::= 'not' ref_deref_expression
referenced by: predicate_expression predicate_expression: not_expression comparison_expression
         ::= not_expression
           | comparison_expression
referenced by: and_or_operand statement_expression and_or_operand: ref_deref_expression predicate_expression
         ::= ref_deref_expression
           | predicate_expression
referenced by: and_expression and_lhs or_expression or_lhs and_lhs: and_or_operand and_expression
           | and_expression
referenced by: and_expression and_expression: and_lhs and and_or_operand
         ::= and_lhs 'and' and_or_operand
referenced by: and_lhs statement_expression or_lhs: and_or_operand or_expression
           | or_expression
referenced by: or_expression or_expression: or_lhs or and_or_operand
         ::= or_lhs 'or' and_or_operand
referenced by: or_lhs statement_expression where_clause: comparison_operand IMPLS == designator = comparison_operand
         ::= ( comparison_operand ( IMPLS | '==' ) | designator '=' ) comparison_operand
referenced by: where_expression where_expression: type_expression where where_clause and
         ::= type_expression 'where' where_clause ( 'and' where_clause )*
referenced by: statement_expression type_or_where_expression type_or_where_expression: type_expression where_expression
         ::= type_expression
           | where_expression
referenced by: declaration extend_impl_declaration impl_declaration statement_expression: ref_deref_expression predicate_expression and_expression or_expression where_expression
         ::= ref_deref_expression
           | predicate_expression
           | and_expression
           | or_expression
           | where_expression
referenced by: assign_statement if_expression statement if_expression: statement_expression if expression then if_expression else if_expression
         ::= statement_expression
           | 'if' expression 'then' if_expression 'else' if_expression
referenced by: expression if_expression expression: if_expression
         ::= if_expression
referenced by: alias_declaration assign_statement declaration extend_base_declaration generic_binding if_expression if_statement mix_declaration mixin_import non_expression_pattern paren_expression_contents paren_pattern_base pattern postfix_expression primary_expression return_expression return_term statement struct_literal struct_type_literal designator: . identifier base
         ::= '.' ( identifier | 'base' )
referenced by: postfix_expression primary_expression struct_literal struct_type_literal where_clause paren_expression: paren_expression_base
         ::= paren_expression_base
referenced by: primary_expression tuple: paren_expression_base referenced by: alternative fn_type_expression postfix_expression paren_expression_base: ( paren_expression_contents , )
         ::= '(' ( paren_expression_contents ','? )? ')'
referenced by: paren_expression tuple paren_expression_contents: expression ,
         ::= expression ( ',' expression )*
referenced by: paren_expression_base paren_pattern_base struct_literal: { designator = expression , , }
         ::= '{' ( designator '=' expression ( ',' designator '=' expression )* ','? )? '}'
referenced by: primary_expression struct_type_literal: { designator : expression , , }
         ::= '{' designator ':' expression ( ',' designator ':' expression )* ','? '}'
referenced by: primary_expression pattern: non_expression_pattern expression
           | expression
referenced by: clause non_expression_pattern statement variable_declaration non_expression_pattern: var auto binding_lhs : pattern :! expression TEMPLATE binding_lhs :! expression paren_pattern postfix_expression tuple_pattern
         ::= 'var'* ( 'auto' | binding_lhs ( ':' pattern | ':!' expression ) | TEMPLATE binding_lhs ':!' expression | paren_pattern | postfix_expression tuple_pattern )
referenced by: paren_pattern_base pattern binding_lhs: identifier _
         ::= identifier
           | '_'
referenced by: non_expression_pattern paren_pattern: paren_pattern_base
         ::= paren_pattern_base
referenced by: non_expression_pattern paren_pattern_base: ( paren_expression_contents , non_expression_pattern , expression non_expression_pattern , )
         ::= '(' ( paren_expression_contents ',' )? non_expression_pattern ( ',' ( expression | non_expression_pattern ) )* ','? ')'
referenced by: paren_pattern tuple_pattern tuple_pattern: paren_pattern_base
         ::= paren_pattern_base
referenced by: maybe_empty_tuple_pattern non_expression_pattern type_params maybe_empty_tuple_pattern: ( ) tuple_pattern
         ::= '(' ')'
           | tuple_pattern
referenced by: function_declaration clause: case pattern default => block
clause   ::= ( 'case' pattern | 'default' ) '=>' block
referenced by: statement statement: match ( expression ) { clause } assign_statement var pattern returned var variable_declaration = expression let pattern = expression statement_expression break continue return return_expression var ; if_statement while ( expression for ( variable_declaration in type_expression ) block
         ::= assign_statement
           | ( ( 'var' pattern | 'returned' 'var' variable_declaration ) ( '=' expression )? | 'let' pattern '=' expression | statement_expression | 'break' | 'continue' | 'return' ( return_expression | 'var' ) ) ';'
           | if_statement
           | ( 'while' '(' expression | 'for' '(' variable_declaration 'in' type_expression ) ')' block
           | 'match' '(' expression ')' '{' clause* '}'
referenced by: block assign_statement: statement_expression assign_operator PLUS_PLUS MINUS_MINUS expression ; referenced by: statement assign_operator: = PLUS_EQUAL SLASH_EQUAL STAR_EQUAL PERCENT_EQUAL MINUS_EQUAL AMPERSAND_EQUAL PIPE_EQUAL CARET_EQUAL LESS_LESS_EQUAL GREATER_GREATER_EQUAL
         ::= '='
           | PLUS_EQUAL
           | SLASH_EQUAL
           | STAR_EQUAL
           | PERCENT_EQUAL
           | MINUS_EQUAL
           | AMPERSAND_EQUAL
           | PIPE_EQUAL
           | CARET_EQUAL
           | LESS_LESS_EQUAL
           | GREATER_GREATER_EQUAL
referenced by: assign_statement if_statement: if ( expression ) block optional_else
         ::= 'if' '(' expression ')' block optional_else
referenced by: optional_else statement optional_else: else if_statement block
         ::= ( 'else' ( if_statement | block ) )?
referenced by: if_statement return_expression: expression
         ::= expression?
referenced by: statement block: { statement }
block    ::= '{' statement* '}'
referenced by: clause destructor_declaration function_declaration if_statement optional_else statement return_term: -> auto expression
         ::= ( '->' ( 'auto' | expression ) )?
referenced by: function_declaration generic_binding: TEMPLATE identifier :! expression
         ::= TEMPLATE? identifier ':!' expression
referenced by: declaration deduced_param deduced_param: generic_binding addr variable_declaration
         ::= generic_binding
           | 'addr'? variable_declaration
referenced by: deduced_param_list deduced_param_list: deduced_param , deduced_param
         ::= deduced_param? ( ',' deduced_param )*
referenced by: deduced_params impl_deduced_params deduced_params: [ deduced_param_list ]
         ::= ( '[' deduced_param_list ']' )?
referenced by: destructor_declaration function_declaration impl_deduced_params: forall [ deduced_param_list ]
         ::= ( 'forall' '[' deduced_param_list ']' )?
referenced by: impl_declaration declared_name: declared_name . identifier ( declared_name )
         ::= ( declared_name '.' )? identifier
           | '(' declared_name ')'
referenced by: alias_declaration declaration declared_name function_declaration namespace_declaration fn_virtual_override_intro: abstract VIRTUAL impl fn
         ::= ( 'abstract' | VIRTUAL | 'impl' )? 'fn'
referenced by: function_declaration function_declaration: fn_virtual_override_intro declared_name deduced_params maybe_empty_tuple_pattern return_term block ; referenced by: declaration impl_body variable_declaration: identifier : pattern
         ::= identifier ':' pattern
referenced by: declaration deduced_param statement alias_declaration: alias declared_name = expression ;
         ::= 'alias' declared_name '=' expression ';'
referenced by: declaration impl_body mix_declaration: __mix expression ;
         ::= '__mix' expression ';'
referenced by: declaration alternative: identifier tuple
         ::= identifier tuple?
referenced by: alternative_list alternative_list: alternative , ,
         ::= ( alternative ( ',' alternative )* ','? )?
referenced by: declaration type_params: tuple_pattern
         ::= tuple_pattern?
referenced by: declaration mixin_import: for expression
         ::= ( 'for' expression )?
referenced by: declaration class_declaration_extensibility: abstract base
         ::= ( 'abstract' | 'base' )?
referenced by: declaration declaration: class_declaration_extensibility class declared_name type_params { declaration mix_declaration extend_base_declaration extend_impl_declaration __mixin declared_name type_params mixin_import { function_declaration mix_declaration choice declared_name type_params { alternative_list interface CONSTRAINT declared_name type_params { function_declaration let generic_binding EXTEND expression REQUIRE type_expression IMPLS type_or_where_expression ; } function_declaration destructor_declaration var variable_declaration = expression let variable_declaration = expression ; impl_declaration match_first_declaration alias_declaration
         ::= function_declaration
           | destructor_declaration
           | ( 'var' variable_declaration ( '=' expression )? | 'let' variable_declaration '=' expression ) ';'
           | impl_declaration
           | match_first_declaration
           | alias_declaration
referenced by: declaration input impl_declaration: impl impl_deduced_params impl_type as type_or_where_expression { impl_body }
         ::= 'impl' impl_deduced_params impl_type 'as' type_or_where_expression '{' impl_body '}'
referenced by: declaration match_first_declaration extend_impl_declaration: EXTEND impl no_impl_type as type_or_where_expression { impl_body }
         ::= EXTEND 'impl' no_impl_type 'as' type_or_where_expression '{' impl_body '}'
referenced by: declaration impl_type: type_expression
         ::= type_expression?
referenced by: impl_declaration no_impl_type:
         ::=
referenced by: extend_impl_declaration match_first_declaration: MATCH_FIRST { impl_declaration }
         ::= MATCH_FIRST '{' impl_declaration* '}'
referenced by: declaration destructor_virtual_override_intro: VIRTUAL impl destructor
         ::= ( VIRTUAL | 'impl' )? 'destructor'
referenced by: destructor_declaration destructor_declaration: destructor_virtual_override_intro deduced_params block referenced by: declaration namespace_declaration: NAMESPACE declared_name ;
         ::= NAMESPACE declared_name ';'
referenced by: input extend_base_declaration: EXTEND base : expression ;
         ::= EXTEND 'base' ':' expression ';'
referenced by: declaration impl_body: function_declaration alias_declaration
         ::= ( function_declaration | alias_declaration )*
referenced by: extend_impl_declaration impl_declaration   ... generated by RR - Railroad Diagram Generator R R