program: pragma functor_decl component_decl component_init directive rule fact relation_decl type_decl
program  ::= ( pragma | functor_decl | component_decl | component_init | directive | rule | fact | relation_decl | type_decl )*
no referencesqualified_name: IDENT .
qualified_name
         ::= IDENT ( '.' IDENT )*
referenced by: arg atom attribute directive functor_attribute functor_decl type_decl type_decl: .type IDENT <: qualified_name = qualified_name | record_list adt_branch |
         ::= '.type' IDENT '<:' qualified_name
           | '=' ( qualified_name ( '|' qualified_name )* | record_list | adt_branch ( '|' adt_branch )* )
referenced by: component_decl program adt_branch: IDENT { attribute , }
         ::= IDENT '{' ( attribute ( ',' attribute )* )? '}'
referenced by: type_decl relation_decl: .decl IDENT , ( attribute , ) override inline magic brie btree eqrel choice_domain
         ::= '.decl' IDENT ( ',' IDENT )* '(' attribute ( ',' attribute )* ')' ( 'override' | 'inline' | 'magic' | 'brie' | 'btree' | 'eqrel' )* choice_domain
referenced by: component_decl program record_list: [ attribute , ]
         ::= '[' ( attribute ( ',' attribute )* )? ']'
referenced by: type_decl attribute: IDENT : qualified_name
         ::= IDENT ':' qualified_name
referenced by: adt_branch record_list relation_decl choice_domain: choice-domain IDENT ( IDENT , ) ,
         ::= ( 'choice-domain' ( IDENT | '(' IDENT ( ',' IDENT )* ')' ) ( ',' ( IDENT | '(' IDENT ( ',' IDENT )* ')' ) )* )?
referenced by: relation_decl fact: atom .
fact     ::= atom '.'
referenced by: component_decl program rule: atom , :- disjunction . query_plan
rule     ::= atom ( ',' atom )* ':-' disjunction '.' query_plan?
referenced by: component_decl program disjunction: conjunction ;
         ::= conjunction ( ';' conjunction )*
referenced by: rule term conjunction: term ,
         ::= term ( ',' term )*
referenced by: disjunction query_plan: .plan NUMBER : ( NUMBER , ) ,
         ::= '.plan' NUMBER ':' '(' ( NUMBER ( ',' NUMBER )* )? ')' ( ',' NUMBER ':' '(' ( NUMBER ( ',' NUMBER )* )? ')' )*
referenced by: rule term: ! atom constraint ( disjunction )
term     ::= '!'* ( atom | constraint | '(' disjunction ')' )
referenced by: conjunction atom: qualified_name ( arg_list )
atom     ::= qualified_name '(' arg_list ')'
referenced by: aggregate_body fact rule term constraint: arg < > <= >= = != arg match contains ( arg , arg ) true false
         ::= arg ( '<' | '>' | '<=' | '>=' | '=' | '!=' ) arg
           | ( 'match' | 'contains' ) '(' arg ',' arg ')'
           | 'true'
           | 'false'
referenced by: term arg_list: arg ,
arg_list ::= ( arg ( ',' arg )* )?
referenced by: arg atom arg: STRING FLOAT UNSIGNED NUMBER _ $ IDENT ( arg_list ) IDENT nil [ arg_list ] ( arg as ( arg , qualified_name @ IDENT functor_built_in ( arg_list ) aggregate_func ( arg , arg ) arg_list : aggregate_body - bnot lnot arg + - * / % ^ land lor lxor band bor bxor bshl bshr bshru arg
arg      ::= STRING
           | FLOAT
           | UNSIGNED
           | NUMBER
           | '_'
           | '$' ( IDENT ( '(' arg_list ')' )? )?
           | IDENT
           | 'nil'
           | '[' arg_list ']'
           | ( '(' arg | 'as' '(' arg ',' qualified_name | ( '@' IDENT | functor_built_in ) '(' arg_list ) ')'
           | aggregate_func ( '(' arg ( ',' arg )+ ')' | arg_list ':' aggregate_body )
           | ( '-' | 'bnot' | 'lnot' | arg ( '+' | '-' | '*' | '/' | '%' | '^' | 'land' | 'lor' | 'lxor' | 'band' | 'bor' | 'bxor' | 'bshl' | 'bshr' | 'bshru' ) ) arg
referenced by: arg arg_list constraint functor_built_in: cat ord range strlen substr to_float to_number to_string to_unsigned
         ::= 'cat'
           | 'ord'
           | 'range'
           | 'strlen'
           | 'substr'
           | 'to_float'
           | 'to_number'
           | 'to_string'
           | 'to_unsigned'
referenced by: arg aggregate_func: count max mean min sum
         ::= 'count'
           | 'max'
           | 'mean'
           | 'min'
           | 'sum'
referenced by: arg aggregate_body: { body } atom
         ::= '{' body '}'
           | atom
referenced by: arg component_decl: .comp component_type : , { directive rule fact .override IDENT component_init component_decl type_decl relation_decl }
         ::= '.comp' component_type ( ( ':' | ',' ) component_type )* '{' ( directive | rule | fact | '.override' IDENT | component_init | component_decl | type_decl | relation_decl )* '}'
referenced by: component_decl program component_type: IDENT component_params
         ::= IDENT component_params
referenced by: component_decl component_init component_params: < IDENT , >
         ::= ( '<' IDENT ( ',' IDENT )* '>' )?
referenced by: component_type component_init: .init IDENT = component_type
         ::= '.init' IDENT '=' component_type
referenced by: component_decl program functor_decl: .functor IDENT ( functor_arg_type_list ) : qualified_name stateful
         ::= '.functor' IDENT '(' functor_arg_type_list ')' ':' qualified_name 'stateful'?
referenced by: program functor_arg_type_list: functor_attribute ,
         ::= ( functor_attribute ( ',' functor_attribute )* )?
referenced by: functor_decl functor_attribute: IDENT : qualified_name
         ::= ( IDENT ':' )? qualified_name
referenced by: functor_arg_type_list pragma: .pragma STRING STRING
pragma   ::= '.pragma' STRING STRING?
referenced by: program directive: directive_qualifier qualified_name , ( IDENT = directive_value , )
         ::= directive_qualifier qualified_name ( ',' qualified_name )* ( '(' ( IDENT '=' directive_value ( ',' IDENT '=' directive_value )* )? ')' )?
referenced by: component_decl program directive_qualifier: .input .output .printsize .limitsize
         ::= '.input'
           | '.output'
           | '.printsize'
           | '.limitsize'
referenced by: directive directive_value: STRING IDENT NUMBER true false
         ::= STRING
           | IDENT
           | NUMBER
           | 'true'
           | 'false'
referenced by: directive   ... generated by RR - Railroad Diagram Generator R R