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 references
qualified_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_decl
::= '.type'
IDENT
'<:'
qualified_name
| '=' (
qualified_name
( '|'
qualified_name
)* |
record_list
|
adt_branch
( '|'
adt_branch
)* )
referenced by:
component_decl
program
adt_branch:
IDENT
{
attribute
,
}
adt_branch
::=
IDENT
'{' (
attribute
( ','
attribute
)* )? '}'
referenced by:
type_decl
relation_decl:
.decl
IDENT
,
(
attribute
,
)
override
inline
magic
brie
btree
eqrel
choice_domain
relation_decl
::= '.decl'
IDENT
( ','
IDENT
)* '('
attribute
( ','
attribute
)* ')' ( 'override' | 'inline' | 'magic' | 'brie' | 'btree' | 'eqrel' )*
choice_domain
referenced by:
component_decl
program
record_list:
[
attribute
,
]
record_list
::= '[' (
attribute
( ','
attribute
)* )? ']'
referenced by:
type_decl
attribute:
IDENT
:
qualified_name
attribute
::=
IDENT
':'
qualified_name
referenced by:
adt_branch
record_list
relation_decl
choice_domain:
choice-domain
IDENT
(
IDENT
,
)
,
choice_domain
::= ( '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
;
disjunction
::=
conjunction
( ';'
conjunction
)*
referenced by:
rule
term
conjunction:
term
,
conjunction
::=
term
( ','
term
)*
referenced by:
disjunction
query_plan:
.plan
NUMBER
:
(
NUMBER
,
)
,
query_plan
::= '.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
constraint
::=
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
functor_built_in
::= 'cat'
| 'ord'
| 'range'
| 'strlen'
| 'substr'
| 'to_float'
| 'to_number'
| 'to_string'
| 'to_unsigned'
referenced by:
arg
aggregate_func:
count
max
mean
min
sum
aggregate_func
::= 'count'
| 'max'
| 'mean'
| 'min'
| 'sum'
referenced by:
arg
aggregate_body:
{
body
}
atom
aggregate_body
::= '{'
body
'}'
|
atom
referenced by:
arg
component_decl:
.comp
component_type
:
,
{
directive
rule
fact
.override
IDENT
component_init
component_decl
type_decl
relation_decl
}
component_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
component_type
::=
IDENT
component_params
referenced by:
component_decl
component_init
component_params:
<
IDENT
,
>
component_params
::= ( '<'
IDENT
( ','
IDENT
)* '>' )?
referenced by:
component_type
component_init:
.init
IDENT
=
component_type
component_init
::= '.init'
IDENT
'='
component_type
referenced by:
component_decl
program
functor_decl:
.functor
IDENT
(
functor_arg_type_list
)
:
qualified_name
stateful
functor_decl
::= '.functor'
IDENT
'('
functor_arg_type_list
')' ':'
qualified_name
'stateful'?
referenced by:
program
functor_arg_type_list:
functor_attribute
,
functor_arg_type_list
::= (
functor_attribute
( ','
functor_attribute
)* )?
referenced by:
functor_decl
functor_attribute:
IDENT
:
qualified_name
functor_attribute
::= (
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
::=
directive_qualifier
qualified_name
( ','
qualified_name
)* ( '(' (
IDENT
'='
directive_value
( ','
IDENT
'='
directive_value
)* )? ')' )?
referenced by:
component_decl
program
directive_qualifier:
.input
.output
.printsize
.limitsize
directive_qualifier
::= '.input'
| '.output'
| '.printsize'
| '.limitsize'
referenced by:
directive
directive_value:
STRING
IDENT
NUMBER
true
false
directive_value
::=
STRING
|
IDENT
|
NUMBER
| 'true'
| 'false'
referenced by:
directive
... generated by
RR - Railroad Diagram Generator
R
R