top:
top ::= design_unit+ EOF
no referencesdesign_unit:
design_unit
::= du
referenced by:
top
du:
du ::= module_definition
| procedure_definition
referenced by:
design_unit
module_definition:
module_definition
::= 'module' IDENTIFIER module_body 'end' 'module'
referenced by:
du
procedure_definition:
procedure_definition
::= 'procedure' IDENTIFIER procedure_body 'end' 'procedure'
referenced by:
du
module_body:
module_body
::= parameter_declaration_region? ( code_block_regions | structural_component_declaration | procedure_declaration )* ( behavior_block code_block_regions* )?
referenced by:
module_definition
procedure_body:
procedure_body
::= parameter_declaration_region? ( code_block_regions | procedure_declaration )* ( behavior_block code_block_regions* )?
referenced by:
procedure_definition
code_block_regions:
code_block_regions
::= include_block
| declaration_block
| initialization_block
referenced by:
module_body
procedure_body
include_block:
include_block
::= 'include' code_block_with_info
referenced by:
code_block_regions
declaration_block:
declaration_block
::= 'decl' code_block_with_info
referenced by:
code_block_regions
initialization_block:
initialization_block
::= 'init' code_block_with_info
referenced by:
code_block_regions
structural_component_declaration:
structural_component_declaration
::= port_declaration
| net_declaration
| submodule_declaration
| connection
referenced by:
module_body
parameter_declaration_region:
parameter_declaration_region
::= ( parameter_declaration ';'? )+
referenced by:
module_body
procedure_body
parameter_declaration:
parameter_declaration
::= 'parameter' param_type IDENTIFIER '=' default_value
referenced by:
parameter_declaration_region
param_type:
param_type
::= 'int'
| 'bool'
| 'char'
referenced by:
parameter_declaration
default_value:
default_value
::= integer
| BOOL
| CHAR
referenced by:
parameter_declaration
integer:
integer ::= '-'? INTEGER
referenced by:
default_value
port_declaration:
port_declaration
::= inport_declaration
| inport_array_declaration
| outport_declaration
| outport_array_declaration
referenced by:
structural_component_declaration
inport_declaration:
inport_declaration
::= 'inport' IDENTIFIER ( ',' IDENTIFIER )* ( ':' 'width' expression )?
referenced by:
port_declaration
inport_array_declaration:
inport_array_declaration
::= 'inport_array' IDENTIFIER '[' expression ']' ( '[' expression ']' )? ( ':' 'width' expression )?
referenced by:
port_declaration
outport_declaration:
outport_declaration
::= 'outport' IDENTIFIER ( ',' IDENTIFIER )* ( ':' 'width' expression )?
referenced by:
port_declaration
outport_array_declaration:
outport_array_declaration
::= 'outport_array' IDENTIFIER '[' expression ']' ( '[' expression ']' )? ( ':' 'width' expression )?
referenced by:
port_declaration
net_declaration:
net_declaration
::= simple_net_declaration
| net_array_declaration
referenced by:
structural_component_declaration
simple_net_declaration:
simple_net_declaration
::= 'net' IDENTIFIER ( ',' IDENTIFIER )* ':' 'capacity' expression ( 'width' expression )?
referenced by:
net_declaration
net_array_declaration:
net_array_declaration
::= 'net_array' IDENTIFIER '[' expression ']' ( '[' expression ']' )? ':' 'capacity' expression ( 'width' expression )?
referenced by:
net_declaration
submodule_declaration:
submodule_declaration
::= simple_submodule_declaration
| submodule_array_declaration
referenced by:
structural_component_declaration
simple_submodule_declaration:
simple_submodule_declaration
::= 'submodule' IDENTIFIER ( ',' IDENTIFIER )* ':' IDENTIFIER ( '<' template_arguments? '>' )?
referenced by:
submodule_declaration
template_arguments:
template_arguments
::= argument ( ',' argument )*
referenced by:
procedure_declaration
simple_submodule_declaration
submodule_array_declaration
argument:
argument ::= BOOL
| CHAR
| STRING
| expression
referenced by:
template_arguments
submodule_array_declaration:
submodule_array_declaration
::= 'submodule_array' IDENTIFIER '[' expression ']' ( '[' expression ']' )? ':' IDENTIFIER ( '<' template_arguments? '>' )?
referenced by:
submodule_declaration
procedure_declaration:
procedure_declaration
::= 'procedure' IDENTIFIER ( ',' IDENTIFIER )* ':' IDENTIFIER ( '<' template_arguments? '>' )?
referenced by:
module_body
procedure_body
connection:
connection
::= simple_connect_statement
| for_loop_for_connections
referenced by:
for_loop_for_connections
structural_component_declaration
simple_connect_statement:
simple_connect_statement
::= port_instance_name ( ',' port_instance_name )* ( '<=' | '=>' ) net_instance_name
referenced by:
connection
port_instance_name:
port_instance_name
::= hierarchical_instance_name
referenced by:
simple_connect_statement
net_instance_name:
net_instance_name
::= hierarchical_instance_name
referenced by:
simple_connect_statement
hierarchical_instance_name:
hierarchical_instance_name
::= object_name ( ( '.' | '::' | '->' ) object_name )*
referenced by:
net_instance_name
port_instance_name
object_name:
object_name
::= IDENTIFIER ( '[' expression ']' ( '[' expression ']' )? )?
referenced by:
hierarchical_instance_name
for_loop_for_connections:
for_loop_for_connections
::= 'for' IDENTIFIER 'in' expression 'to' expression connection+ 'end' 'for'
referenced by:
connection
expression:
expression
::= term ( ( '+' | '-' ) term )*
referenced by:
argument
atomic_expression
for_loop_for_connections
inport_array_declaration
inport_declaration
net_array_declaration
object_name
outport_array_declaration
outport_declaration
simple_net_declaration
submodule_array_declaration
term:
term ::= signed_expression ( ( '*' | '/' | '%' ) signed_expression )*
referenced by:
expression
signed_expression:
signed_expression
::= '-'? atomic_expression
referenced by:
term
atomic_expression:
atomic_expression
::= '(' expression ')'
| INTEGER
| IDENTIFIER
referenced by:
signed_expression
behavior_block:
behavior_block
::= cf
referenced by:
module_body
procedure_body
cf:
cf ::= 'behavior' sequence 'end' 'behavior'
referenced by:
behavior_block
sequence:
sequence ::= statement ( ';' statement )* ';'?
| '(' statement ( ';' statement )* ';'? ')'
referenced by:
cf
do_while_statement
if_statement
parallel_statement
statement:
statement
::= atomic_statement
| compound_statement
referenced by:
sequence
atomic_statement:
atomic_statement
::= nothing_statement
| wait_statement
| stop_statement
| run_procedure_statement
| code_block_statement
referenced by:
statement
code_block_statement:
code_block_statement
::= behavior_code_block_statement
| declaration_block_statement
| initialization_block_statement
| includes_block_statement
referenced by:
atomic_statement
behavior_code_block_statement:
behavior_code_block_statement
::= code_block_with_info
referenced by:
code_block_statement
declaration_block_statement:
declaration_block_statement
::= 'decl' code_block_with_info
referenced by:
code_block_statement
initialization_block_statement:
initialization_block_statement
::= 'init' code_block_with_info
referenced by:
code_block_statement
includes_block_statement:
includes_block_statement
::= 'include' code_block_with_info
referenced by:
code_block_statement
nothing_statement:
nothing_statement
::= 'nothing'
referenced by:
atomic_statement
wait_statement:
wait_statement
::= wait_until
| wait_for_time
| single_wait
referenced by:
atomic_statement
wait_until:
wait_until
::= 'wait' 'until' expression_cf
referenced by:
wait_statement
wait_for_time:
wait_for_time
::= 'wait' '(' expression_cf ',' expression_cf ')'
referenced by:
wait_statement
single_wait:
single_wait
::= 'wait'
referenced by:
wait_statement
stop_statement:
stop_statement
::= stop_behavior
| stop_simulation
referenced by:
atomic_statement
stop_behavior:
stop_behavior
::= 'stop' 'behavior'
referenced by:
stop_statement
stop_simulation:
stop_simulation
::= 'stop' 'simulation'
referenced by:
stop_statement
run_procedure_statement:
run_procedure_statement
::= 'run' IDENTIFIER
referenced by:
atomic_statement
compound_statement:
compound_statement
::= if_statement
| do_while_statement
| parallel_statement
referenced by:
statement
if_statement:
if_statement
::= 'if' expression_cf 'then' sequence ( 'else' sequence )? 'end' 'if'
referenced by:
compound_statement
do_while_statement:
do_while_statement
::= 'do' sequence 'while' expression_cf 'end' 'do'
referenced by:
compound_statement
parallel_statement:
parallel_statement
::= '[' sequence ( '||' sequence )+ ']'
referenced by:
compound_statement
expression_cf:
expression_cf
::= exp1 ( 'or' exp1 )*
referenced by:
argument_list
atomic_expression_cf
do_while_statement
if_statement
wait_for_time
wait_until
exp1:
exp1 ::= exp2 ( 'and' exp2 )*
referenced by:
expression_cf
exp2:
exp2 ::= 'not'? exp3
referenced by:
exp1
exp3:
exp3 ::= exp4 ( comparison_operator exp4 )*
referenced by:
exp2
exp4:
exp4 ::= exp5 ( add_operator exp5 )*
referenced by:
exp3
exp5:
exp5 ::= exp6 ( mul_operator exp6 )*
referenced by:
exp4
exp6:
exp6 ::= '-'? atomic_expression_cf
referenced by:
exp5
comparison_operator:
comparison_operator
::= '=='
| '!='
| '>='
| '<='
| '<'
| '>'
referenced by:
exp3
add_operator:
add_operator
::= '+'
| '-'
referenced by:
exp4
mul_operator:
mul_operator
::= '*'
| '/'
| '%'
referenced by:
exp5
atomic_expression_cf:
atomic_expression_cf
::= '(' expression_cf ')'
| function_call
| this_cycle
| this_phase
| INTEGER
| STRING
| identifier
| expression_code_block
referenced by:
exp6
expression_code_block:
expression_code_block
::= code_block
referenced by:
atomic_expression_cf
function_call:
function_call
::= identifier '(' argument_list? ')'
referenced by:
atomic_expression_cf
argument_list:
argument_list
::= expression_cf ( ',' expression_cf )*
referenced by:
function_call
this_cycle:
this_cycle
::= 'this_cycle'
referenced by:
atomic_expression_cf
this_phase:
this_phase
::= 'this_phase'
referenced by:
atomic_expression_cf
code_block_with_info:
code_block_with_info
::= code_block
referenced by:
behavior_code_block_statement
declaration_block
declaration_block_statement
include_block
includes_block_statement
initialization_block
initialization_block_statement
code_block:
code_block
::= CODE_BLOCK
referenced by:
code_block_with_info
expression_code_block
identifier:
identifier
::= IDENTIFIER ( ( '.' | '::' | '->' ) IDENTIFIER )*
referenced by:
atomic_expression_cf
function_call
_:
_ ::= WS
| COMMENT
/* ws: definition */
no referencesCODE_BLOCK:
CODE_BLOCK?
::= '$' .* '$'
referenced by:
code_block
BOOL:
BOOL ::= 'true'
| 'false'
referenced by:
argument
default_value
INTEGER:
INTEGER ::= [0-9]+
referenced by:
atomic_expression
atomic_expression_cf
integer
STRING:
STRING ::= '"' ( ESC_SEQ | [^\"] )* '"'
referenced by:
argument
atomic_expression_cf
CHAR:
CHAR ::= "'" ( ESC_SEQ | [^'\] ) "'"
referenced by:
argument
default_value
IDENTIFIER:
IDENTIFIER
::= ( [a-z] | [A-Z] ) ( [a-z] | [A-Z] | [0-9] | '_' )*
referenced by:
atomic_expression
for_loop_for_connections
identifier
inport_array_declaration
inport_declaration
module_definition
net_array_declaration
object_name
outport_array_declaration
outport_declaration
parameter_declaration
procedure_declaration
procedure_definition
run_procedure_statement
simple_net_declaration
simple_submodule_declaration
submodule_array_declaration
WS:
WS ::= ' '
| #x0009
| #x000D
| #x000A
referenced by:
_
COMMENT:
COMMENT? ::= '//' [^#x000A#x000D]* #x000D? #x000A
| '/*' .* '*/'
referenced by:
_
HEX_DIGIT:
HEX_DIGIT
::= [0-9]
| [a-f]
| [A-F]
referenced by:
UNICODE_ESC
ESC_SEQ:
ESC_SEQ ::= '\' ( 'b' | 't' | 'n' | 'f' | 'r' | '"' | "'" | '\' )
| UNICODE_ESC
| OCTAL_ESC
referenced by:
CHAR
STRING
OCTAL_ESC:
OCTAL_ESC
::= '\' [0-3] [0-7] [0-7]
| '\' [0-7] [0-7]
| '\' [0-7]
referenced by:
ESC_SEQ
UNICODE_ESC:
UNICODE_ESC
::= '\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
referenced by:
ESC_SEQ
EOF:
EOF ::= $
referenced by:
top
... generated by Railroad Diagram Generator