BNF for VHDLParser.jj

NON-TERMINALS

access_type_definition ::= <ACCESS> subtype_indication
actual_designator ::= expression
| <OPEN>
actual_part ::= actual_designator
| name "(" actual_designator ")"
aggregate ::= "(" element_association ( "," element_association )* ")"
alias_declaration ::= <ALIAS> alias_designator ( ":" subtype_indication )? <IS> name ( signature )? ";"
alias_designator ::= <IDENTIFIER>
| <CHARACTER>
| <STRING>
allocator ::= <NEW> ( qualified_expression | subtype_indication )
architecture_body ::= <ARCHITECTURE> <IDENTIFIER> <OF> name <IS> ( block_declarative_item )* <BEGIN> ( concurrent_statement )* <END> ( <ARCHITECTURE> )? ( <IDENTIFIER> )? ";"
array_type_definition ::= unconstrained_array_definition
| constrained_array_definition
assertion ::= <ASSERT> expression ( <REPORT> expression )? ( <SEVERITY> expression )?
assertion_statement ::= ( <IDENTIFIER> ":" )? assertion ";"
association_element ::= ( formal_part "=>" )? actual_part
association_list ::= association_element ( "," association_element )*
attribute_declaration ::= <ATTRIBUTE> <IDENTIFIER> ":" name ";"
attribute_name ::= prefix ( signature )? "\'" ( <IDENTIFIER> | <RANGE> ) ( "(" expression ")" )?
attribute_specification ::= <ATTRIBUTE> <IDENTIFIER> <OF> entity_specification <IS> expression ";"
base_unit_declaration ::= <IDENTIFIER> ";"
binding_indication ::= ( <USE> entity_aspect )? ( generic_map_aspect )? ( port_map_aspect )?
block_configuration ::= <FOR> block_specification ( use_clause )* ( configuration_item )* <END> <FOR> ";"
block_declarative_item ::= subprogram_body
| subprogram_specification ";"
| type_declaration
| subtype_declaration
| constant_declaration
| signal_declaration
| variable_declaration
| file_declaration
| alias_declaration
| component_declaration
| attribute_declaration
| attribute_specification
| configuration_specification
| disconnection_specification
| use_clause
| group_template_declaration
| group_declaration
block_header ::= ( generic_clause ( generic_map_aspect ";" )? )? ( port_clause ( port_map_aspect ";" )? )?
block_specification ::= name
| <IDENTIFIER> ( "(" index_specification ")" )?
block_statement ::= <BLOCK> ( "(" expression ")" )? ( <IS> )? block_header ( block_declarative_item )* <BEGIN> ( concurrent_statement )* <END> <BLOCK> ( <IDENTIFIER> )? ";"
case_statement ::= ( <IDENTIFIER> ":" )? <CASE> expression <IS> case_statement_alternative ( case_statement_alternative )* <END> <CASE> ( <IDENTIFIER> )? ";"
case_statement_alternative ::= <WHEN> choices "=>" ( sequential_statement )*
choice ::= discrete_range
| simple_expression
| <IDENTIFIER>
| <OTHERS>
choices ::= choice ( "|" choice )*
component_configuration ::= <FOR> component_specification ( binding_indication ";" )? ( block_configuration )? <END> <FOR> ";"
component_declaration ::= <COMPONENT> <IDENTIFIER> ( <IS> )? ( generic_clause )? ( port_clause )? <END> <COMPONENT> ( <IDENTIFIER> )? ";"
component_instantiation_statement ::= instantiated_unit ( generic_map_aspect )? ( port_map_aspect )? ";"
component_specification ::= instantiation_list ":" name
composite_type_definition ::= array_type_definition
| record_type_definition
concurrent_signal_assignment_statement ::= conditional_signal_assignment
| selected_signal_assignment
concurrent_statement ::= <IDENTIFIER> ":" ( block_statement | component_instantiation_statement | generate_statement )
| ( <IDENTIFIER> ":" )? ( <POSTPONED> )? ( concurrent_signal_assignment_statement | procedure_call ";" | assertion ";" | process_statement )
condition_clause ::= <UNTIL> expression
conditional_signal_assignment ::= target "<=" xoptions conditional_waveforms ";"
conditional_waveforms ::= waveform ( <WHEN> expression <ELSE> waveform )* ( <WHEN> expression )?
configuration_declaration ::= <CONFIGURATION> <IDENTIFIER> <OF> name <IS> ( configuration_declarative_item )* block_configuration <END> ( <CONFIGURATION> )? ( <IDENTIFIER> )? ";"
configuration_declarative_item ::= use_clause
| attribute_specification
| group_declaration
configuration_item ::= block_configuration
| component_configuration
configuration_specification ::= <FOR> component_specification binding_indication ";"
constant_declaration ::= <CONSTANT> identifier_list ":" subtype_indication ( ":=" expression )? ";"
constrained_array_definition ::= <ARRAY> index_constraint <OF> subtype_indication
constraint ::= range_constraint
| index_constraint
context_item ::= library_clause
| use_clause
declaration ::= type_declaration
| subtype_declaration
| object_declaration
| interface_declaration
| alias_declaration
| attribute_declaration
| component_declaration
| group_template_declaration
| group_declaration
| entity_declaration
| configuration_declaration
| subprogram_specification ";"
| package_declaration
delay_mechanism ::= <TRANSPORT>
| ( <REJECT> expression )? <INERTIAL>
design_file ::= design_unit ( design_unit )*
design_unit ::= ( context_item )* library_unit
designator ::= <IDENTIFIER>
| <STRING>
disconnection_specification ::= <DISCONNECT> guarded_signal_specification <AFTER> expression ";"
discrete_range ::= range
| subtype_indication
element_association ::= ( choices "=>" )? expression
element_declaration ::= identifier_list ":" subtype_indication ";"
entity_aspect ::= <ENTITY> name ( "(" <IDENTIFIER> ")" )?
| <CONFIGURATION> name
| <OPEN>
entity_class ::= <ENTITY>
| <ARCHITECTURE>
| <CONFIGURATION>
| <PROCEDURE>
| <FUNCTION>
| <PACKAGE>
| <TYPE>
| <SUBTYPE>
| <CONSTANT>
| <SIGNAL>
| <VARIABLE>
| <COMPONENT>
| <LABEL>
| <LITERAL>
| <UNITS>
| <GROUP>
| <FILE>
entity_class_entry_list ::= entity_class ( "<>" )? ( "," entity_class ( "<>" )? )*
entity_declaration_head ::= <ENTITY> <IDENTIFIER> <IS>
entity_declaration ::= entity_declaration_head entity_header ( entity_declarative_item )* ( <BEGIN> ( entity_statement )* )? <END> ( <ENTITY> )? ( <IDENTIFIER> )? ";"
entity_declarative_item ::= subprogram_body
| subprogram_specification ";"
| type_declaration
| subtype_declaration
| constant_declaration
| signal_declaration
| variable_declaration
| file_declaration
| alias_declaration
| attribute_declaration
| attribute_specification
| disconnection_specification
| use_clause
| group_template_declaration
| group_declaration
entity_designator ::= entity_tag ( signature )?
entity_header ::= ( generic_clause )? ( port_clause )?
entity_name_list ::= entity_designator ( "," entity_designator )*
| <OTHERS>
| <ALL>
entity_specification ::= entity_name_list ":" entity_class
entity_statement ::= ( <IDENTIFIER> ":" )? ( <POSTPONED> )? ( procedure_call ";" | assertion ";" | process_statement )
entity_tag ::= <IDENTIFIER>
| <CHARACTER>
| <STRING>
enumeration ::= <CHARACTER>
| <IDENTIFIER>
enumeration_type_definition ::= "(" enumeration ( "," enumeration )* ")"
exit_statement ::= ( <IDENTIFIER> ":" )? <EXIT> ( <IDENTIFIER> )? ( <WHEN> expression )? ";"
expression ::= relation ( ( <NAND> | <NOR> ) relation | ( ( <XOR> | <AND> | <XNOR> | <OR> ) relation )* )
factor ::= primary ( "**" primary )?
| <ABS> primary
| <NOT> primary
file_declaration ::= <FILE> identifier_list ":" subtype_indication ( file_open_information )? ";"
file_open_information ::= ( <OPEN> expression )? <IS> expression
file_type_definition ::= <FILE> <OF> name
formal_part ::= name ( "(" name ")" )?
function_call ::= prefix ( "(" association_list ")" )?
generate_statement ::= generation_scheme <GENERATE> ( ( block_declarative_item )* <BEGIN> )? ( concurrent_statement )* <END> <GENERATE> ( <IDENTIFIER> )? ";"
generation_scheme ::= <FOR> parameter_specification
| <IF> expression
generic_clause ::= <GENERIC> "(" interface_list ")" ";"
generic_map_aspect ::= <GENERIC> <MAP> "(" association_list ")"
group_constituent ::= name
| <CHARACTER>
group_constituent_list ::= group_constituent ( "," group_constituent )*
group_template_declaration ::= <GROUP> <IDENTIFIER> <IS> "(" entity_class_entry_list ")" ";"
group_declaration ::= <GROUP> <IDENTIFIER> ":" name "(" group_constituent_list ")" ";"
guarded_signal_specification ::= signal_list ":" name
identifier_list ::= <IDENTIFIER> ( "," <IDENTIFIER> )*
if_statement ::= ( <IDENTIFIER> ":" )? <IF> expression <THEN> ( sequential_statement )* ( <ELSIF> expression <THEN> ( sequential_statement )* )* ( <ELSE> ( sequential_statement )* )? <END> <IF> ( <IDENTIFIER> )? ";"
index_constraint ::= "(" discrete_range ( "," discrete_range )* ")"
index_specification ::= discrete_range
| expression
index_subtype_definition ::= name <RANGE> "<>"
indexed_name ::= prefix "(" expression ( "," expression )* ")"
instantiated_unit ::= ( <COMPONENT> )? name
| <ENTITY> name ( "(" <IDENTIFIER> ")" )?
| <CONFIGURATION> name
instantiation_list ::= <IDENTIFIER> ( "," <IDENTIFIER> )*
| <OTHERS>
| <ALL>
interface_declaration ::= ( <SIGNAL> | <CONSTANT> | <VARIABLE> | <FILE> )? identifier_list ":" ( mode )? subtype_indication ( <BUS> )? ( ":=" expression )?
interface_list ::= interface_declaration ( ";" interface_declaration )*
iteration_scheme ::= <WHILE> expression
| <FOR> parameter_specification
library_clause ::= <LIBRARY> <IDENTIFIER> ( "," <IDENTIFIER> )* ";"
library_unit ::= primary_unit
| secondary_unit
literal ::= numeric_literal
| enumeration
| <STRING>
| <BIT_STRING>
| <NULL>
loop_statement ::= ( <IDENTIFIER> ":" )? ( iteration_scheme )? <LOOP> ( sequential_statement )* <END> <LOOP> ( <IDENTIFIER> )? ";"
mode ::= <IN>
| <OUT>
| <INOUT>
| <BUFFER>
| <LINKAGE>
name ::= indexed_name
| selected_name
| slice_name
| attribute_name
| function_call
| <IDENTIFIER>
| <STRING>
next_statement ::= ( <IDENTIFIER> ":" )? <NEXT> ( <IDENTIFIER> )? ( <WHEN> expression )? ";"
null_statement ::= ( <IDENTIFIER> ":" )? <NULL> ";"
numeric_literal ::= physical_literal
| <ABSTRACT>
object_declaration ::= constant_declaration
| signal_declaration
| variable_declaration
| file_declaration
xoptions ::= ( <GUARDED> )? ( delay_mechanism )?
package_body ::= <PACKAGE> <BODY> <IDENTIFIER> <IS> ( package_body_declarative_item )* <END> ( <PACKAGE> <BODY> )? ( <IDENTIFIER> )? ";"
package_body_declarative_item ::= subprogram_body
| subprogram_specification ";"
| type_declaration
| subtype_declaration
| constant_declaration
| variable_declaration
| file_declaration
| alias_declaration
| use_clause
| group_template_declaration
| group_declaration
package_declaration ::= <PACKAGE> <IDENTIFIER> <IS> ( package_declarative_item )* <END> ( <PACKAGE> )? ( <IDENTIFIER> )? ";"
package_declarative_item ::= subprogram_specification ";"
| type_declaration
| subtype_declaration
| constant_declaration
| signal_declaration
| variable_declaration
| file_declaration
| alias_declaration
| component_declaration
| attribute_declaration
| attribute_specification
| disconnection_specification
| use_clause
| group_template_declaration
| group_declaration
parameter_specification ::= <IDENTIFIER> <IN> discrete_range
physical_literal ::= ( <ABSTRACT> )? name
physical_type_definition ::= range_constraint <UNITS> base_unit_declaration ( secondary_unit_declaration )* <END> <UNITS> ( <IDENTIFIER> )?
port_clause ::= <PORT> "(" interface_list ")" ";"
port_map_aspect ::= <PORT> <MAP> "(" association_list ")"
prefix ::= <IDENTIFIER>
| <STRING>
primary ::= name
| literal
| aggregate
| function_call
| qualified_expression
| type_conversion
| allocator
primary_unit ::= entity_declaration
| configuration_declaration
| package_declaration
procedure_call ::= name ( "(" association_list ")" )?
procedure_call_statement ::= ( <IDENTIFIER> ":" )? procedure_call ";"
process_declarative_item ::= subprogram_body
| subprogram_specification ";"
| type_declaration
| subtype_declaration
| constant_declaration
| variable_declaration
| file_declaration
| alias_declaration
| attribute_declaration
| attribute_specification
| use_clause
| group_template_declaration
| group_declaration
process_statement ::= <PROCESS> ( "(" name ( "," name )* ")" )? ( <IS> )? ( process_declarative_item )* <BEGIN> ( sequential_statement )* <END> ( <POSTPONED> )? <PROCESS> ( <IDENTIFIER> )? ";"
qualified_expression ::= name "\'" ( "(" expression ")" | aggregate )
range ::= simple_expression ( <TO> | <DOWNTO> ) simple_expression
| attribute_name
range_constraint ::= <RANGE> range
record_type_definition ::= <RECORD> element_declaration ( element_declaration )* <END> <RECORD> ( <IDENTIFIER> )?
relation ::= shift_expression ( ( "=" | "/=" | "<" | "<=" | ">" | ">=" ) shift_expression )?
report_statement ::= ( <IDENTIFIER> ":" )? <REPORT> expression ( <SEVERITY> expression )? ";"
return_statement ::= ( <IDENTIFIER> ":" )? <RETURN> ( expression )? ";"
scalar_type_definition ::= enumeration_type_definition
| physical_type_definition
| range_constraint
secondary_unit ::= architecture_body
| package_body
secondary_unit_declaration ::= <IDENTIFIER> "=" physical_literal ";"
selected_name ::= prefix suffix
selected_signal_assignment ::= <WITH> expression <SELECT> target "<=" xoptions selected_waveforms ";"
selected_waveforms ::= waveform <WHEN> choices ( "," waveform <WHEN> choices )*
sensitivity_clause ::= <ON> name ( "," name )*
sequential_statement ::= wait_statement
| assertion_statement
| report_statement
| signal_assignment_statement
| variable_assignment_statement
| procedure_call_statement
| if_statement
| case_statement
| loop_statement
| next_statement
| exit_statement
| return_statement
| null_statement
shift_expression ::= simple_expression ( ( <SLL> | <SRL> | <SLA> | <SRA> | <ROL> | <ROR> ) simple_expression )?
signal_assignment_statement ::= ( <IDENTIFIER> ":" )? target "<=" ( delay_mechanism )? waveform ";"
signal_declaration ::= <SIGNAL> identifier_list ":" subtype_indication ( signal_kind )? ( ":=" expression )? ";"
signal_kind ::= <REGISTER>
| <BUS>
signal_list ::= name ( "," name )*
| <OTHERS>
| <ALL>
signature ::= "[" ( name ( "," name )* )? ( <RETURN> name )? "]"
simple_expression ::= ( "+" | "-" )? term ( ( "+" | "-" | "&" ) term )*
slice_name ::= prefix "(" discrete_range ")"
subprogram_body ::= subprogram_specification <IS> ( subprogram_declarative_item )* <BEGIN> ( sequential_statement )* <END> ( subprogram_kind )? ( designator )? ";"
subprogram_declarative_item ::= subprogram_body
| subprogram_specification ";"
| type_declaration
| subtype_declaration
| constant_declaration
| variable_declaration
| file_declaration
| alias_declaration
| attribute_declaration
| attribute_specification
| use_clause
| group_template_declaration
| group_declaration
subprogram_kind ::= <PROCEDURE>
| <FUNCTION>
subprogram_specification ::= <PROCEDURE> designator ( "(" interface_list ")" )?
| ( <PURE> | <IMPURE> )? <FUNCTION> designator ( "(" interface_list ")" )? <RETURN> name
subtype_declaration ::= <SUBTYPE> <IDENTIFIER> <IS> subtype_indication ";"
subtype_indication ::= name ( name )? ( constraint )?
suffix ::= "." ( name | <IDENTIFIER> | <CHARACTER> | <STRING> | <ALL> )
target ::= aggregate
| name
term ::= factor ( ( "*" | "/" | <MOD> | <REM> ) factor )*
timeout_clause ::= <FOR> expression
type_conversion ::= name "(" expression ")"
type_declaration ::= <TYPE> <IDENTIFIER> ( <IS> type_definition )? ";"
type_definition ::= scalar_type_definition
| composite_type_definition
| access_type_definition
| file_type_definition
unconstrained_array_definition ::= <ARRAY> "(" index_subtype_definition ( "," index_subtype_definition )* ")" <OF> subtype_indication
use_clause ::= <USE> selected_name ( "," selected_name )* ";"
variable_assignment_statement ::= ( <IDENTIFIER> ":" )? target ":=" expression ";"
variable_declaration ::= ( <SHARED> )? <VARIABLE> identifier_list ":" subtype_indication ( ":=" expression )? ";"
wait_statement ::= ( <IDENTIFIER> ":" )? <WAIT> ( sensitivity_clause )? ( condition_clause )? ( timeout_clause )? ";"
waveform ::= waveform_element ( "," waveform_element )*
| <UNAFFECTED>
waveform_element ::= expression ( <AFTER> expression )?