   0  $accept : module $end
   1  module : embedded_module
   2  embedded_module : imports_optional top_root
   3  imports_optional : imports
   4                   |
   5  imports : imports import_item
   6          | import_item
   7  import_item : IMPORT
   8              | EMBEDFILE '@{' embedded_module '@}'
   9  top_root : body
  10           |
  11  body : body body_item
  12       | body_item
  13  body_item : namespace_item
  14            | definition
  15            | prototype_declaration
  16  namespace_item : namespace_management
  17                 | instance_item
  18                 | type_alias
  19                 | language_body
  20  namespace_management : NAMESPACE ID '@{' top_root '@}'
  21                       | OPEN namespace_id AS ID ';'
  22                       | OPEN namespace_id ';'
  23  namespace_id : relative_id
  24  definition : defproc
  25             | defdatatype
  26             | defchan
  27             | defenum
  28  prototype_declaration : declare_proc_proto
  29                        | declare_datatype_proto
  30                        | declare_chan_proto
  31                        | declare_enum
  32  type_alias : optional_template_specification TYPEDEF physical_type_ref ID ';'
  33  template_specification : TEMPLATE template_formal_decl_list_in_angles
  34                         | TEMPLATE template_formal_decl_list_optional_in_angles template_formal_decl_nodefault_list_in_angles
  35  optional_template_specification : template_specification
  36                                  |
  37  def_or_proc : DEFINE
  38              | DEFPROC
  39  declare_proc_proto : optional_template_specification def_or_proc ID optional_port_formal_decl_list_in_parens ';'
  40  defproc : optional_template_specification def_or_proc ID optional_port_formal_decl_list_in_parens '@{' optional_definition_body '@}'
  41  optional_port_formal_decl_list_in_parens : '(' port_formal_decl_list ')'
  42                                           | '(' ')'
  43  template_formal_decl_list_in_angles : '<' template_formal_decl_list '>'
  44  template_formal_decl_nodefault_list_in_angles : '<' template_formal_decl_nodefault_list '>'
  45  template_formal_decl_list_optional_in_angles : template_formal_decl_list_in_angles
  46                                               | '<' '>'
  47  template_formal_decl_list : template_formal_decl_list ';' template_formal_decl
  48                            | template_formal_decl
  49  template_formal_decl_nodefault_list : template_formal_decl_nodefault_list ';' template_formal_decl_nodefault
  50                                      | template_formal_decl_nodefault
  51  template_formal_decl : base_param_type template_formal_id_list
  52  template_formal_decl_nodefault : base_param_type template_formal_id_nodefault_list
  53  template_formal_id_list : template_formal_id_list ',' template_formal_id
  54                          | template_formal_id
  55  template_formal_id_nodefault_list : template_formal_id_nodefault_list ',' template_formal_id_nodefault
  56                                    | template_formal_id_nodefault
  57  template_formal_id_default : ID optional_dense_range_list '=' expr
  58  template_formal_id_nodefault : ID optional_dense_range_list
  59  template_formal_id : template_formal_id_default
  60                     | template_formal_id_nodefault
  61  port_formal_decl_list : port_formal_decl_list ';' port_formal_decl
  62                        | port_formal_decl
  63  port_formal_decl : physical_type_ref port_formal_id_list
  64  port_formal_id_list : port_formal_id_list ',' port_formal_id
  65                      | port_formal_id
  66  port_formal_id : ID optional_dense_range_list
  67  generic_type_ref : generic_id strict_relaxed_template_arguments optional_chan_dir
  68  optional_chan_dir : '?'
  69                    | '!'
  70                    |
  71  physical_type_ref : generic_type_ref
  72                    | base_chan_type
  73                    | base_data_type_ref
  74  base_data_type_ref : base_data_type strict_relaxed_template_arguments
  75  data_type_ref : base_data_type_ref
  76                | generic_type_ref
  77  type_id : physical_type_ref
  78          | base_param_type
  79  base_param_type : PINT_TYPE
  80                  | PBOOL_TYPE
  81                  | PREAL_TYPE
  82  base_chan_type : chan_or_port data_type_ref_list_optional_in_parens
  83  chan_or_port : CHANNEL optional_chan_dir
  84  data_type_ref_list_optional_in_parens : '(' data_type_ref_list_optional ')'
  85  data_type_ref_list_optional : data_type_ref_list
  86                              |
  87  data_type_ref_list : data_type_ref_list ',' data_type_ref
  88                     | data_type_ref
  89  base_data_type : INT_TYPE
  90                 | BOOL_TYPE
  91  declare_datatype_proto : optional_template_specification DEFTYPE ID DEFINEOP data_type_ref optional_port_formal_decl_list_in_parens ';'
  92  defdatatype : optional_template_specification DEFTYPE ID DEFINEOP data_type_ref optional_port_formal_decl_list_in_parens '@{' optional_definition_body set_body get_body '@}'
  93  set_body : SET '@{' chp_body_optional '@}'
  94  get_body : GET '@{' chp_body_optional '@}'
  95  declare_enum : ENUM ID ';'
  96  defenum : ENUM ID '@{' enum_member_list '@}'
  97  enum_member_list : enum_member_list ',' ID
  98                   | ID
  99  declare_chan_proto : optional_template_specification DEFCHAN ID DEFINEOP base_chan_type optional_port_formal_decl_list_in_parens ';'
 100  defchan : optional_template_specification DEFCHAN ID DEFINEOP base_chan_type optional_port_formal_decl_list_in_parens '@{' optional_definition_body send_body recv_body '@}'
 101  send_body : SEND '@{' chp_body_optional '@}'
 102  recv_body : RECV '@{' chp_body_optional '@}'
 103  definition_body : definition_body definition_body_item
 104                  | definition_body_item
 105  definition_body_item : instance_item
 106                       | language_body
 107                       | type_alias
 108  optional_definition_body : definition_body
 109                           |
 110  instance_management_list : instance_management_list instance_item
 111                           | instance_item
 112  instance_item : type_instance_declaration
 113                | connection_statement
 114                | instance_type_completion_statement
 115                | instance_type_completion_connection_statement
 116                | nonempty_alias_list ';'
 117                | loop_instantiation
 118                | conditional_instantiation
 119  loop_instantiation : '(' ';' ID ':' range ':' instance_management_list ')'
 120  conditional_instantiation : '[' guarded_instance_management_list ']'
 121  type_instance_declaration : type_id instance_id_list ';'
 122  instance_id_list : instance_id_list ',' instance_id_item
 123                   | instance_id_item
 124  instance_id_item : ID optional_template_arguments_in_angles sparse_range_list
 125                   | ID optional_template_arguments_in_angles
 126                   | ID optional_template_arguments_in_angles connection_actuals_list
 127                   | ID optional_template_arguments_in_angles '=' alias_list
 128  connection_statement : member_index_expr connection_actuals_list ';'
 129  instance_type_completion_statement : index_expr complex_expr_optional_list_in_angles ';'
 130                                     | generic_id complex_expr_optional_list_in_angles ';'
 131  instance_type_completion_connection_statement : index_expr complex_expr_optional_list_in_angles connection_actuals_list ';'
 132                                                | generic_id complex_expr_optional_list_in_angles connection_actuals_list ';'
 133  nonempty_alias_list : nonempty_alias_list '=' complex_aggregate_reference
 134                      | complex_aggregate_reference '=' complex_aggregate_reference
 135  alias_list : alias_list '=' complex_aggregate_reference
 136             | complex_aggregate_reference
 137  connection_actuals_list : '(' complex_aggregate_reference_list ')'
 138  guarded_instance_management_list : guarded_instance_management_list_unmatched THICKBAR instance_management_else_clause
 139                                   | guarded_instance_management_list_unmatched
 140  guarded_instance_management_list_unmatched : guarded_instance_management_list_unmatched THICKBAR guarded_instance_management
 141                                             | guarded_instance_management
 142  guarded_instance_management : expr RARROW instance_management_list
 143  instance_management_else_clause : ELSE RARROW instance_management_list
 144  language_body : CHP_LANG '@{' chp_body '@}'
 145                | HSE_LANG '@{' hse_body '@}'
 146                | PRS_LANG '@{' prs_body '@}'
 147                | SPEC_LANG '@{' spec_body '@}'
 148  chp_body : full_chp_body_item_list
 149  chp_body_optional : chp_body
 150                    |
 151  chp_body_or_skip : chp_body
 152                   | SKIP
 153  chp_sequence_group : '@{' full_chp_body_item_list '@}'
 154  full_chp_body_item_list : full_chp_body_item_list ';' full_chp_body_item
 155                          | full_chp_body_item
 156  full_chp_body_item : chp_concurrent_group
 157  chp_body_item : chp_statement_attributes chp_statement
 158                | chp_statement
 159  chp_statement_attributes : '$' '(' chp_statement_attr_list ')'
 160  chp_statement_attr_list : chp_statement_attr_list ';' chp_statement_attr
 161                          | chp_statement_attr
 162  chp_statement_attr : ID '=' expr
 163  chp_statement : chp_loop
 164                | chp_do_until
 165                | chp_selection
 166                | chp_wait
 167                | chp_binary_assignment
 168                | chp_bool_assignment
 169                | chp_send
 170                | chp_recv
 171                | chp_peek
 172                | LOG expr_list_in_parens
 173                | chp_metaloop_selection
 174                | chp_metaloop_statement
 175                | function_call_expr
 176  chp_loop : BEGINLOOP chp_body ']'
 177  chp_do_until : BEGINLOOP chp_unmatched_det_guarded_command_list ']'
 178  chp_wait : '[' chp_guard_expr ']'
 179  chp_selection : '[' chp_matched_det_guarded_command_list ']'
 180                | '[' chp_nondet_guarded_command_list ']'
 181  chp_metaloop_selection : '[' ':' ID ':' range ':' chp_guarded_command ']'
 182                         | '[' THICKBAR ID ':' range ':' chp_guarded_command ']'
 183  chp_metaloop_statement : '@{' ',' ID ':' range ':' chp_body '@}'
 184                         | '@{' ';' ID ':' range ':' chp_body '@}'
 185  chp_nondet_guarded_command_list : chp_nondet_guarded_command_list ':' chp_guarded_command
 186                                  | chp_guarded_command ':' chp_guarded_command
 187  chp_matched_det_guarded_command_list : chp_unmatched_det_guarded_command_list THICKBAR chp_else_clause
 188                                       | chp_unmatched_det_guarded_command_list
 189  chp_unmatched_det_guarded_command_list : chp_unmatched_det_guarded_command_list THICKBAR chp_guarded_command
 190                                         | chp_guarded_command
 191  chp_guarded_command : chp_guard_expr RARROW chp_body_or_skip
 192  chp_guard_expr : chp_logical_or_expr
 193  chp_unary_bool_expr : chp_simple_bool_expr
 194                      | chp_not_expr
 195                      | '(' chp_logical_or_expr ')'
 196                      | chp_probe_expr
 197                      | function_call_expr
 198  chp_probe_expr : '#' member_index_expr
 199  chp_simple_bool_expr : member_index_expr
 200                       | BOOL_TRUE
 201                       | BOOL_FALSE
 202  chp_unary_expr : '-' chp_unary_expr
 203                 | chp_unary_bool_expr
 204                 | loop_expr
 205                 | INT
 206                 | FLOAT
 207  chp_mult_expr : chp_unary_expr
 208                | chp_mult_expr muldiv_op chp_unary_expr
 209  chp_add_expr : chp_mult_expr
 210               | chp_add_expr_only
 211  chp_add_expr_only : chp_add_expr '+' chp_mult_expr
 212                    | chp_add_expr '-' chp_mult_expr
 213  chp_paren_add_expr : '(' chp_add_expr_only ')'
 214                     | chp_mult_expr
 215  chp_shift_expr : chp_paren_add_expr
 216                 | chp_shift_expr EXTRACT chp_add_expr
 217                 | chp_shift_expr INSERT chp_add_expr
 218  chp_relational_expr : chp_shift_expr relational_op chp_shift_expr
 219                      | chp_unary_bool_expr
 220  chp_bitwise_and_expr : chp_relational_expr
 221                       | chp_bitwise_and_expr '&' chp_relational_expr
 222  chp_bitwise_xor_expr : chp_bitwise_and_expr
 223                       | chp_bitwise_xor_expr '^' chp_bitwise_and_expr
 224  chp_bitwise_or_expr : chp_bitwise_xor_expr
 225                      | chp_bitwise_or_expr '|' chp_bitwise_xor_expr
 226  chp_logical_and_expr : chp_bitwise_or_expr
 227                       | chp_logical_and_expr LOGICAL_AND chp_bitwise_or_expr
 228  chp_logical_or_expr : chp_logical_and_expr
 229                      | chp_logical_or_expr LOGICAL_OR chp_logical_and_expr
 230  chp_not_expr : '~' chp_unary_bool_expr
 231  chp_else_clause : ELSE RARROW chp_body_or_skip
 232  chp_binary_assignment : member_index_expr ASSIGN expr
 233  chp_bool_assignment : member_index_expr '+'
 234                      | member_index_expr '-'
 235  chp_concurrent_item : chp_body_item
 236                      | chp_sequence_group
 237  chp_concurrent_group : chp_concurrent_group ',' chp_concurrent_item
 238                       | chp_concurrent_item
 239  chp_send : member_index_expr '!' connection_actuals_list
 240           | member_index_expr '!'
 241  chp_recv : member_index_expr '?' member_index_expr_list_in_parens_optional
 242  chp_peek : member_index_expr '#' member_index_expr_list_in_parens
 243  hse_body : full_hse_body_item_list
 244  full_hse_body_item_list : full_hse_body_item_list ';' full_hse_body_item
 245                          | full_hse_body_item
 246  full_hse_body_item : hse_body_item
 247  hse_body_item : hse_loop
 248                | hse_do_until
 249                | hse_wait
 250                | hse_selection
 251                | hse_assignment
 252                | SKIP
 253  hse_loop : BEGINLOOP hse_body ']'
 254  hse_do_until : BEGINLOOP hse_matched_det_guarded_command_list ']'
 255  hse_wait : '[' expr ']'
 256  hse_selection : '[' hse_matched_det_guarded_command_list ']'
 257                | '[' hse_nondet_guarded_command_list ']'
 258  hse_guarded_command : expr RARROW hse_body
 259  hse_else_clause : ELSE RARROW hse_body
 260  hse_nondet_guarded_command_list : hse_nondet_guarded_command_list ':' hse_guarded_command
 261                                  | hse_guarded_command ':' hse_guarded_command
 262  hse_matched_det_guarded_command_list : hse_unmatched_det_guarded_command_list THICKBAR hse_else_clause
 263                                       | hse_unmatched_det_guarded_command_list
 264  hse_unmatched_det_guarded_command_list : hse_unmatched_det_guarded_command_list THICKBAR hse_guarded_command
 265                                         | hse_guarded_command
 266  hse_assignment : unary_assignment
 267  prs_body : prs_body prs_body_item
 268           | prs_body_item
 269  prs_body_item : single_prs
 270                | prs_loop
 271                | prs_conditional
 272                | prs_macro
 273                | TREE_LANG optional_template_arguments_in_angles '@{' prs_body '@}'
 274                | SUBCKT_LANG optional_template_arguments_in_angles '@{' prs_body '@}'
 275  prs_macro : prs_literal mandatory_member_index_expr_list_in_parens
 276  prs_loop : '(' ':' ID ':' range ':' prs_body ')'
 277  prs_conditional : '[' prs_guarded_body prs_else_clause_optional ']'
 278  prs_guarded_body : expr RARROW prs_body
 279  prs_else_clause_optional : prs_else_clause
 280                           |
 281  prs_else_clause : THICKBAR ELSE RARROW prs_body
 282  single_prs : prs_rule_attribute_list_in_brackets prs_expr prs_arrow prs_literal_base dir
 283             | prs_expr prs_arrow prs_literal_base dir
 284  prs_rule_attribute_list_in_brackets : '[' prs_rule_attribute_list ']'
 285  prs_rule_attribute_list : prs_rule_attribute_list ';' prs_rule_attribute
 286                          | prs_rule_attribute
 287  prs_rule_attribute : ID '=' expr_list
 288  prs_arrow : RARROW
 289            | IMPLIES
 290  dir : '+'
 291      | '-'
 292  prs_expr : prs_or
 293  prs_paren_expr : '(' prs_expr ')'
 294  prs_literal_base : prs_internal_optional relative_member_index_expr
 295  prs_literal : prs_literal_base expr_list_in_angles_optional
 296  prs_internal_optional : '@@'
 297                        |
 298  prs_unary_expr : prs_literal
 299                 | prs_paren_expr
 300                 | prs_and_loop
 301                 | prs_or_loop
 302  prs_not : '~' prs_unary_expr
 303          | prs_unary_expr
 304  prs_and : prs_and '&' prs_operator_attribute_optional prs_not
 305          | prs_not
 306  prs_or : prs_or '|' prs_and
 307         | prs_and
 308  prs_operator_attribute : '@{' dir prs_expr '@}'
 309  prs_operator_attribute_optional : prs_operator_attribute
 310                                  |
 311  prs_and_loop : '(' '&' ':' ID ':' range ':' prs_expr ')'
 312  prs_or_loop : '(' '|' ':' ID ':' range ':' prs_expr ')'
 313  spec_body : spec_body spec_item
 314            | spec_item
 315  spec_item : spec_directive
 316  spec_directive : ID expr_list_in_angles_optional grouped_reference_list_in_parens
 317  grouped_reference_list_in_parens : '(' grouped_reference_list ')'
 318  grouped_reference_list : grouped_reference_list ',' grouped_reference
 319                         | grouped_reference
 320  grouped_reference : '@{' mandatory_member_index_expr_list '@}'
 321                    | member_index_expr
 322  paren_expr : '(' expr ')'
 323  literal : INT
 324          | FLOAT
 325          | string
 326          | BOOL_TRUE
 327          | BOOL_FALSE
 328  string : string STRING
 329         | STRING
 330  id_expr : generic_id
 331  generic_id : relative_id
 332             | absolute_id
 333  absolute_id : SCOPE relative_id
 334  relative_id : qualified_id
 335              | ID
 336  qualified_id : qualified_id SCOPE ID
 337               | ID SCOPE ID
 338  mandatory_member_index_expr_list_in_parens : '(' mandatory_member_index_expr_list ')'
 339  mandatory_member_index_expr_list : mandatory_member_index_expr_list ',' member_index_expr
 340                                   | member_index_expr
 341  member_index_expr_list : member_index_expr_list ',' optional_member_index_expr
 342                         | optional_member_index_expr
 343  optional_member_index_expr : member_index_expr
 344                             |
 345  member_index_expr : id_expr
 346                    | index_expr
 347                    | member_expr
 348  relative_member_index_expr : ID
 349                             | local_index_expr
 350                             | local_member_expr
 351  local_index_expr : local_member_expr sparse_range_list
 352                   | ID sparse_range_list
 356  index_expr : member_expr sparse_range_list
 357             | id_expr sparse_range_list
 361  simple_expr : member_index_expr
 362              | literal
 363  unary_expr : simple_expr
 364             | function_call_expr
 365             | paren_expr
 366             | loop_expr
 367             | '-' unary_expr
 368             | '!' unary_expr
 369             | '~' unary_expr
 370  function_call_expr : member_index_expr connection_actuals_list
 371  multiplicative_expr : unary_expr
 372                      | multiplicative_expr muldiv_op unary_expr
 373  muldiv_op : '*'
 374            | '/'
 375            | '%'
 376  additive_expr : multiplicative_expr
 377                | additive_expr '+' multiplicative_expr
 378                | additive_expr '-' multiplicative_expr
 379  shift_expr : additive_expr
 380             | shift_expr EXTRACT additive_expr
 381             | shift_expr INSERT additive_expr
 382  relational_equality_expr : shift_expr
 383                           | '(' relational_equality_expr '<' shift_expr ')'
 384                           | '(' relational_equality_expr '>' shift_expr ')'
 385                           | relational_equality_expr LE shift_expr
 386                           | relational_equality_expr GE shift_expr
 387                           | relational_equality_expr EQUAL shift_expr
 388                           | relational_equality_expr NOTEQUAL shift_expr
 389  relational_op : '<'
 390                | '>'
 391                | LE
 392                | GE
 393                | EQUAL
 394                | NOTEQUAL
 395  and_expr : relational_equality_expr
 396           | and_expr '&' relational_equality_expr
 397  exclusive_or_expr : and_expr
 398                    | exclusive_or_expr '^' and_expr
 399  inclusive_or_expr : exclusive_or_expr
 400                    | inclusive_or_expr '|' exclusive_or_expr
 401  logical_and_expr : inclusive_or_expr
 402                   | logical_and_expr LOGICAL_AND inclusive_or_expr
 403  logical_or_expr : logical_and_expr
 404                  | logical_or_expr LOGICAL_OR logical_and_expr
 405  unary_assignment : member_index_expr PLUSPLUS
 406                   | member_index_expr MINUSMINUS
 407  loop_expr : '(' loop_assoc_op ':' ID ':' range ':' expr ')'
 408  loop_assoc_op : '+'
 409                | '*'
 410                | '&'
 411                | '|'
 412                | '^'
 413                | LOGICAL_AND
 414                | LOGICAL_OR
 415  expr : logical_or_expr
 416  strict_relaxed_template_arguments : complex_expr_optional_list_in_angles optional_template_arguments_in_angles
 417                                    |
 418  optional_template_arguments_in_angles : complex_expr_optional_list_in_angles
 419                                        |
 420  expr_list_in_angles_optional : expr_list_in_angles
 421                               |
 422  expr_list_in_angles : '<' expr_list '>'
 423  complex_expr_optional_list_in_angles : '<' complex_expr_optional_list '>'
 424  complex_expr_optional_list : complex_expr_optional_list ',' optional_complex_expr
 425                             | optional_complex_expr
 426  optional_complex_expr : array_concatenation
 427                        |
 428  member_index_expr_list_in_parens_optional : member_index_expr_list_in_parens
 429                                            |
 430  member_index_expr_list_in_parens : '(' member_index_expr_list ')'
 431  expr_list_in_parens : '(' expr_list ')'
 432  expr_list : expr_list ',' expr
 433            | expr
 434  range : expr RANGE expr
 435        | expr
 436  optional_dense_range_list : dense_range_list
 437                            |
 438  dense_range_list : dense_range_list bracketed_dense_range
 439                   | bracketed_dense_range
 440  sparse_range_list : sparse_range_list bracketed_sparse_range
 441                    | bracketed_sparse_range
 442  bracketed_dense_range : '[' expr ']'
 443  bracketed_sparse_range : '[' range ']'
 444  complex_aggregate_reference : array_concatenation
 445  array_concatenation : array_concatenation '#' complex_expr_term
 446                      | complex_expr_term
 447  complex_expr_term : array_construction
 448                    | expr
 449  array_construction : '@{' mandatory_complex_aggregate_reference_list '@}'
 450  optional_complex_aggregate_reference : complex_aggregate_reference
 451                                       |
 452  mandatory_complex_aggregate_reference_list : mandatory_complex_aggregate_reference_list ',' complex_aggregate_reference
 453                                             | complex_aggregate_reference
 454  complex_aggregate_reference_list : complex_aggregate_reference_list ',' optional_complex_aggregate_reference
 455                                   | optional_complex_aggregate_reference
