UNPKG

pss-langserver

Version:

A Language server for the Portable Stimulus Standard

1,000 lines 1.53 MB
"use strict"; /* * Copyright (C) 2025 Darshan(@thisisthedarshan) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ // Generated from ./src/grammar/antlr/pss.g4 by ANTLR 4.13.2 // noinspection ES6UnusedImports,JSUnusedGlobalSymbols,JSUnusedLocalSymbols Object.defineProperty(exports, "__esModule", { value: true }); exports.Monitor_declarationContext = exports.Cover_stmtContext = exports.Symbol_paramContext = exports.Symbol_paramlistContext = exports.Symbol_declarationContext = exports.Activity_constraint_stmtContext = exports.Activity_bind_item_or_listContext = exports.Activity_bind_stmtContext = exports.Activity_atomic_block_stmtContext = exports.Activity_super_stmtContext = exports.Activity_replicate_stmtContext = exports.Match_choiceContext = exports.Match_expressionContext = exports.Activity_match_stmtContext = exports.Activity_if_else_stmtContext = exports.Select_branchContext = exports.Activity_select_stmtContext = exports.Activity_foreach_stmtContext = exports.Activity_repeat_stmtContext = exports.Activity_join_firstContext = exports.Activity_join_noneContext = exports.Activity_join_selectContext = exports.Activity_join_branchContext = exports.Activity_join_specContext = exports.Activity_schedule_stmtContext = exports.Activity_parallel_stmtContext = exports.Activity_sequence_block_stmtContext = exports.Inline_constraints_or_emptyContext = exports.Activity_action_traversal_stmtContext = exports.Labeled_activity_stmtContext = exports.Activity_stmtContext = exports.Activity_declarationContext = exports.Activity_scheduling_constraintContext = exports.Activity_data_fieldContext = exports.Action_instantiationContext = exports.Action_handle_declarationContext = exports.Object_ref_fieldContext = exports.Resource_object_typeContext = exports.Flow_object_typeContext = exports.Resource_ref_field_declarationContext = exports.Flow_ref_field_declarationContext = exports.Object_ref_field_declarationContext = exports.Action_field_declarationContext = exports.Action_body_itemContext = exports.Action_super_specContext = exports.Abstract_action_declarationContext = exports.Action_declarationContext = exports.Package_bodyContext = exports.PssContext = exports.Pss_entryContext = void 0; exports.Override_compile_if_stmtContext = exports.Covergroup_body_compile_if_itemContext = exports.Constraint_body_compile_if_itemContext = exports.Procedural_compile_if_stmtContext = exports.Struct_body_compile_if_itemContext = exports.Component_body_compile_if_itemContext = exports.Monitor_body_compile_if_itemContext = exports.Action_body_compile_if_itemContext = exports.Package_body_compile_if_itemContext = exports.Override_compile_ifContext = exports.Covergroup_body_compile_ifContext = exports.Constraint_body_compile_ifContext = exports.Procedural_compile_ifContext = exports.Struct_body_compile_ifContext = exports.Component_body_compile_ifContext = exports.Action_body_compile_ifContext = exports.Monitor_body_compile_ifContext = exports.Package_body_compile_ifContext = exports.Object_bind_itemContext = exports.Component_path_elemContext = exports.Object_bind_item_pathContext = exports.Object_bind_item_or_listContext = exports.Object_bind_stmtContext = exports.Component_pool_declarationContext = exports.Component_data_declarationContext = exports.Component_body_itemContext = exports.Component_super_specContext = exports.Component_declarationContext = exports.Monitor_constraint_body_itemContext = exports.Monitor_constraint_blockContext = exports.Monitor_constraint_setContext = exports.Monitor_constraint_declarationContext = exports.Monitor_activity_constraint_stmtContext = exports.Monitor_inline_constraints_or_emptyContext = exports.Monitor_activity_monitor_traversal_stmtContext = exports.Monitor_activity_schedule_stmtContext = exports.Monitor_activity_select_stmtContext = exports.Monitor_activity_overlap_stmtContext = exports.Monitor_activity_eventually_stmtContext = exports.Monitor_activity_concat_stmtContext = exports.Monitor_activity_sequence_block_stmtContext = exports.Monitor_instantiationContext = exports.Monitor_handle_declarationContext = exports.Labeled_monitor_activity_stmtContext = exports.Monitor_activity_stmtContext = exports.Monitor_activity_declarationContext = exports.Monitor_field_declarationContext = exports.Monitor_body_itemContext = exports.Monitor_super_specContext = exports.Abstract_monitor_declarationContext = void 0; exports.Integer_typeContext = exports.Chandle_typeContext = exports.Casting_typeContext = exports.Scalar_data_typeContext = exports.Data_typeContext = exports.Attr_groupContext = exports.Access_modifierContext = exports.Attr_fieldContext = exports.Array_dimContext = exports.Data_instantiationContext = exports.Data_declarationContext = exports.Covergroup_cross_binspecContext = exports.Covergroup_cross_body_itemContext = exports.Cross_item_or_nullContext = exports.Covergroup_crossContext = exports.Covergroup_expressionContext = exports.Bins_keywordContext = exports.Covergroup_value_rangeContext = exports.Covergroup_range_listContext = exports.Coverpoint_binsContext = exports.Covergroup_coverpoint_binspecContext = exports.Covergroup_coverpoint_body_itemContext = exports.Bins_or_emptyContext = exports.Covergroup_coverpointContext = exports.Covergroup_options_or_emptyContext = exports.Covergroup_portmapContext = exports.Covergroup_portmap_listContext = exports.Covergroup_type_instantiationContext = exports.Inline_covergroupContext = exports.Covergroup_instantiationContext = exports.Covergroup_optionContext = exports.Covergroup_body_itemContext = exports.Covergroup_portContext = exports.Covergroup_declarationContext = exports.Dist_weightContext = exports.Dist_itemContext = exports.Dist_listContext = exports.Dist_directiveContext = exports.Unique_constraint_itemContext = exports.Implication_constraint_itemContext = exports.If_constraint_itemContext = exports.Forall_constraint_itemContext = exports.Foreach_constraint_itemContext = exports.Expression_constraint_itemContext = exports.Constraint_body_itemContext = exports.Constraint_blockContext = exports.Constraint_setContext = exports.Constraint_declarationContext = exports.Compile_assert_stmtContext = exports.Compile_has_exprContext = void 0; exports.Logical_orContext = exports.Logical_andContext = exports.Bitwise_orContext = exports.Bitwise_xorContext = exports.Bitwise_andContext = exports.Equality_compareContext = exports.Logical_compareContext = exports.In_statementsContext = exports.ShiftingContext = exports.Add_subContext = exports.Mul_divContext = exports.Parenthesis_expressionsContext = exports.Assign_opContext = exports.Binary_operatorContext = exports.Power_opContext = exports.Unary_operatorContext = exports.PrimaryContext = exports.ItemCallContext = exports.Conditional_expressionContext = exports.Unary_expressionContext = exports.Power_expressionContext = exports.Multiplicative_expressionContext = exports.Additive_expressionContext = exports.Shift_expressionContext = exports.Bitwise_expressionContext = exports.Relational_expressionContext = exports.Equality_expressionContext = exports.Logical_expressionContext = exports.ExpressionContext = exports.Constant_expressionContext = exports.Target_file_exec_blockContext = exports.Target_code_exec_blockContext = exports.Exec_super_stmtContext = exports.Exec_stmtContext = exports.Exec_kindContext = exports.Exec_blockContext = exports.Exec_block_stmtContext = exports.Typedef_declarationContext = exports.Reference_typeContext = exports.Array_size_expressionContext = exports.Collection_typeContext = exports.Float_typeContext = exports.Enum_typeContext = exports.Enum_itemContext = exports.Enum_declarationContext = exports.Bool_typeContext = exports.String_typeContext = exports.Domain_open_range_valueContext = exports.Domain_open_range_listContext = exports.Integer_atom_typeContext = void 0; exports.Function_identifierContext = exports.Enum_identifierContext = exports.Coverpoint_identifierContext = exports.Covergroup_identifierContext = exports.Covercross_identifierContext = exports.Component_identifierContext = exports.Action_handle_identifierContext = exports.Action_identifierContext = exports.Member_path_elemContext = exports.Hierarchical_idContext = exports.Hierarchical_id_listContext = exports.IdentifierContext = exports.Function_call_paramsContext = exports.User_typeContext = exports.Varargs_parameterContext = exports.Function_parameter_dirContext = exports.Function_parameterContext = exports.Function_parameter_list_prototypeContext = exports.Function_return_typeContext = exports.Function_prototypeContext = exports.Return_itemContext = exports.Platform_qualifierContext = exports.Function_declContext = exports.Procedural_functionContext = exports.Export_actionContext = exports.Import_class_function_declContext = exports.Import_class_extendsContext = exports.Import_class_declContext = exports.Target_template_functionContext = exports.Import_functionContext = exports.CommentsContext = exports.Action_extensionContext = exports.Filename_stringContext = exports.String_literalContext = exports.Expression_listContext = exports.Function_parameter_listContext = exports.Symbol_callContext = exports.Function_paramsContext = exports.Function_ref_pathContext = exports.Function_callContext = exports.String_sliceContext = exports.Bit_sliceContext = exports.Static_ref_pathContext = exports.SliceContext = exports.Ref_pathContext = exports.Cast_expressionContext = exports.Collection_expressionContext = exports.Open_range_listContext = exports.In_expressionContext = exports.Open_range_valueContext = void 0; exports.Package_import_patternContext = exports.Import_stmtContext = exports.Package_body_itemContext = exports.Package_id_pathContext = exports.Package_declarationContext = exports.Instance_overrideContext = exports.Type_overrideContext = exports.Override_stmtContext = exports.Override_declarationContext = exports.Null_refContext = exports.Bool_literalContext = exports.Struct_literal_itemContext = exports.Struct_literalContext = exports.Map_literal_itemContext = exports.Map_literalContext = exports.Value_list_literalContext = exports.Empty_aggregate_literalContext = exports.Aggregate_literalContext = exports.Floating_point_sci_numberContext = exports.Floating_point_dec_numberContext = exports.Unsigned_numberContext = exports.Floating_point_numberContext = exports.Based_hex_numberContext = exports.Based_dec_numberContext = exports.Based_oct_numberContext = exports.Based_bin_numberContext = exports.Integer_numberContext = exports.NumberContext = exports.Entity_type_identifierContext = exports.Stream_type_identifierContext = exports.State_type_identifierContext = exports.Resource_type_identifierContext = exports.Monitor_type_identifierContext = exports.Enum_type_identifierContext = exports.Covergroup_type_identifierContext = exports.Component_type_identifierContext = exports.Buffer_type_identifierContext = exports.Action_type_identifierContext = exports.Type_identifier_elemContext = exports.Type_identifierContext = exports.Symbol_identifierContext = exports.Struct_kind_identifierContext = exports.Struct_identifierContext = exports.Package_identifierContext = exports.Monitor_identifierContext = exports.Language_identifierContext = exports.Label_identifierContext = exports.Iterator_identifierContext = exports.Index_identifierContext = exports.Import_class_identifierContext = void 0; exports.Contiguous_addr_space_defContext = exports.Bool_identifierContext = exports.Number_identifierContext = exports.Trait_propertyContext = exports.OffsetContext = exports.Trait_identifierContext = exports.Claim_identifierContext = exports.Addr_space_traitsContext = exports.Addr_space_identifierContext = exports.Addr_handle_identifierContext = exports.Addr_region_identifierContext = exports.Template_param_valueContext = exports.Template_param_value_listContext = exports.Value_param_declContext = exports.Type_categoryContext = exports.Type_restrictionContext = exports.Category_type_param_declContext = exports.Generic_type_param_declContext = exports.Type_param_declContext = exports.Template_param_declContext = exports.Template_param_decl_listContext = exports.Struct_body_itemContext = exports.Struct_super_specContext = exports.Object_kindContext = exports.Struct_kindContext = exports.Struct_declarationContext = exports.Procedural_yield_stmtContext = exports.Procedural_randomization_termContext = exports.Procedural_randomization_targetContext = exports.Procedural_randomization_stmtContext = exports.Procedural_continue_stmtContext = exports.Procedural_break_stmtContext = exports.Procedural_match_choiceContext = exports.Procedural_match_stmtContext = exports.Procedural_if_else_stmtContext = exports.Procedural_foreach_stmtContext = exports.Procedural_repeat_stmtContext = exports.Procedural_return_stmtContext = exports.Procedural_void_function_call_stmtContext = exports.Procedural_assignment_stmtContext = exports.Procedural_data_instantiationContext = exports.Procedural_data_declarationContext = exports.Procedural_sequence_block_stmtContext = exports.Procedural_stmtContext = exports.Stmt_terminatorContext = exports.Const_field_declarationContext = exports.Extend_stmtContext = exports.Package_import_aliasContext = exports.Package_import_wildcardContext = exports.Package_import_qualifierContext = void 0; exports.Reg_write_fieldsContext = exports.Reg_write_fieldContext = exports.Reg_write_val_maskedContext = exports.Reg_write_maskedContext = exports.Reg_write_valContext = exports.Reg_read_valContext = exports.Reg_writeContext = exports.Reg_readContext = exports.Register_operation_callContext = exports.Reg_function_callsContext = exports.Offset_returnsContext = exports.Offset_return_itemsContext = exports.Reg_match_stmtsContext = exports.If_else_stmtsContext = exports.Offset_match_stmtsContext = exports.Function_offset_of_instance_arr_defContext = exports.Function_offset_of_instance_defContext = exports.Register_definitionContext = exports.Register_comp_instanceContext = exports.Register_body_definitionContext = exports.Register_group_definitionContext = exports.Register_comp_definitionContext = exports.Reg_lengthContext = exports.Access_typeContext = exports.Value_list_identifierContext = exports.Names_list_identifierContext = exports.Field_identifierContext = exports.Mask_identifierContext = exports.Value_struct_identifierContext = exports.Mask_struct_identifierContext = exports.Value_identifierContext = exports.Reg_struct_identifierContext = exports.Register_group_identifierContext = exports.Register_comp_identifierContext = exports.Register_identifierContext = exports.Addr_region_defContext = exports.Addr_space_defContext = exports.Mem_opsContext = exports.Addr_value_absContext = exports.Addr_value_solveContext = exports.Addr_valueContext = exports.Make_handle_from_handleContext = exports.Make_handle_from_claimContext = exports.Add_addr_regionContext = exports.Add_addr_region_nonallocatableContext = exports.Transparent_addr_claimContext = exports.Addr_region_settingContext = exports.Transparent_addr_region_defContext = exports.Transparent_addr_space_defContext = exports.Addr_claimContext = void 0; exports.Example_codeContext = exports.Todo_descriptionContext = exports.File_pathContext = exports.Attention_descriptionContext = exports.See_descriptionContext = exports.See_linkContext = exports.Version_valueContext = exports.Date_valueContext = exports.Author_nameContext = exports.Deprecated_descriptionContext = exports.Return_descriptionContext = exports.Param_descriptionContext = exports.Param_identifierContext = exports.Brief_textContext = exports.Example_commandContext = exports.Todo_commandContext = exports.File_commandContext = exports.Attention_commandContext = exports.See_commandContext = exports.Version_commandContext = exports.Date_commandContext = exports.Author_commandContext = exports.Deprecated_commandContext = exports.Return_commandContext = exports.Param_commandContext = exports.Brief_commandContext = exports.Doc_contentContext = exports.Documentation_commentContext = exports.File_doc_commentContext = exports.Reg_declarationsContext = exports.Reg_set_handleContext = void 0; const antlr4_1 = require("antlr4"); class pss extends antlr4_1.Parser { get grammarFileName() { return "pss.g4"; } get literalNames() { return pss.literalNames; } get symbolicNames() { return pss.symbolicNames; } get ruleNames() { return pss.ruleNames; } get serializedATN() { return pss._serializedATN; } createFailedPredicateException(predicate, message) { return new antlr4_1.FailedPredicateException(this, predicate, message); } constructor(input) { super(input); this._interp = new antlr4_1.ParserATNSimulator(this, pss._ATN, pss.DecisionsToDFA, new antlr4_1.PredictionContextCache()); } // @RuleVersion(0) pss_entry() { let localctx = new Pss_entryContext(this, this._ctx, this.state); this.enterRule(localctx, 0, pss.RULE_pss_entry); let _la; try { this.enterOuterAlt(localctx, 1); { this.state = 864; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 0, this._ctx)) { case 1: { this.state = 862; this.file_doc_comment(); } break; case 2: { this.state = 863; this.comments(); } break; } this.state = 869; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 2 || ((((_la - 48)) & ~0x1F) === 0 && ((1 << (_la - 48)) & 4063733) !== 0) || ((((_la - 83)) & ~0x1F) === 0 && ((1 << (_la - 83)) & 327) !== 0) || ((((_la - 141)) & ~0x1F) === 0 && ((1 << (_la - 141)) & 16449) !== 0) || _la === 178 || ((((_la - 223)) & ~0x1F) === 0 && ((1 << (_la - 223)) & 7) !== 0)) { { { this.state = 866; this.pss(); } } this.state = 871; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 872; this.match(pss.EOF); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) pss() { let localctx = new PssContext(this, this._ctx, this.state); this.enterRule(localctx, 2, pss.RULE_pss); try { this.state = 877; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 2, this._ctx)) { case 1: this.enterOuterAlt(localctx, 1); { this.state = 874; this.package_body(); } break; case 2: this.enterOuterAlt(localctx, 2); { this.state = 875; this.package_declaration(); } break; case 3: this.enterOuterAlt(localctx, 3); { this.state = 876; this.component_declaration(); } break; } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) package_body() { let localctx = new Package_bodyContext(this, this._ctx, this.state); this.enterRule(localctx, 4, pss.RULE_package_body); try { this.state = 899; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 3, this._ctx)) { case 1: this.enterOuterAlt(localctx, 1); { this.state = 879; this.comments(); } break; case 2: this.enterOuterAlt(localctx, 2); { this.state = 880; this.abstract_action_declaration(); } break; case 3: this.enterOuterAlt(localctx, 3); { this.state = 881; this.struct_declaration(); } break; case 4: this.enterOuterAlt(localctx, 4); { this.state = 882; this.enum_declaration(); } break; case 5: this.enterOuterAlt(localctx, 5); { this.state = 883; this.covergroup_declaration(); } break; case 6: this.enterOuterAlt(localctx, 6); { this.state = 884; this.function_decl(); } break; case 7: this.enterOuterAlt(localctx, 7); { this.state = 885; this.import_class_decl(); } break; case 8: this.enterOuterAlt(localctx, 8); { this.state = 886; this.procedural_function(); } break; case 9: this.enterOuterAlt(localctx, 9); { this.state = 887; this.import_function(); } break; case 10: this.enterOuterAlt(localctx, 10); { this.state = 888; this.target_template_function(); } break; case 11: this.enterOuterAlt(localctx, 11); { this.state = 889; this.export_action(); } break; case 12: this.enterOuterAlt(localctx, 12); { this.state = 890; this.typedef_declaration(); } break; case 13: this.enterOuterAlt(localctx, 13); { this.state = 891; this.import_stmt(); } break; case 14: this.enterOuterAlt(localctx, 14); { this.state = 892; this.extend_stmt(); } break; case 15: this.enterOuterAlt(localctx, 15); { this.state = 893; this.const_field_declaration(); } break; case 16: this.enterOuterAlt(localctx, 16); { this.state = 894; this.component_declaration(); } break; case 17: this.enterOuterAlt(localctx, 17); { this.state = 895; this.package_declaration(); } break; case 18: this.enterOuterAlt(localctx, 18); { this.state = 896; this.compile_assert_stmt(); } break; case 19: this.enterOuterAlt(localctx, 19); { this.state = 897; this.package_body_compile_if(); } break; case 20: this.enterOuterAlt(localctx, 20); { this.state = 898; this.stmt_terminator(); } break; } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) action_declaration() { let localctx = new Action_declarationContext(this, this._ctx, this.state); this.enterRule(localctx, 6, pss.RULE_action_declaration); let _la; try { this.enterOuterAlt(localctx, 1); { this.state = 901; this.match(pss.TOKEN_ACTION); this.state = 902; this.action_identifier(); this.state = 904; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 10) { { this.state = 903; this.template_param_decl_list(); } } this.state = 907; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 5) { { this.state = 906; this.action_super_spec(); } } this.state = 909; this.match(pss.TOKEN_CLBRACE); this.state = 913; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 1 || _la === 2 || ((((_la - 51)) & ~0x1F) === 0 && ((1 << (_la - 51)) & 528073) !== 0) || ((((_la - 88)) & ~0x1F) === 0 && ((1 << (_la - 88)) & 2952790017) !== 0) || ((((_la - 120)) & ~0x1F) === 0 && ((1 << (_la - 120)) & 140507687) !== 0) || _la === 155 || _la === 188 || _la === 189 || ((((_la - 223)) & ~0x1F) === 0 && ((1 << (_la - 223)) & 391) !== 0)) { { { this.state = 910; this.action_body_item(); } } this.state = 915; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 916; this.match(pss.TOKEN_CRBRACE); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) abstract_action_declaration() { let localctx = new Abstract_action_declarationContext(this, this._ctx, this.state); this.enterRule(localctx, 8, pss.RULE_abstract_action_declaration); try { this.enterOuterAlt(localctx, 1); { this.state = 918; this.match(pss.TOKEN_ABSTRACT); this.state = 919; this.action_declaration(); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) action_super_spec() { let localctx = new Action_super_specContext(this, this._ctx, this.state); this.enterRule(localctx, 10, pss.RULE_action_super_spec); try { this.enterOuterAlt(localctx, 1); { this.state = 921; this.match(pss.TOKEN_COLON); this.state = 922; this.type_identifier(); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) action_body_item() { let localctx = new Action_body_itemContext(this, this._ctx, this.state); this.enterRule(localctx, 12, pss.RULE_action_body_item); try { this.state = 940; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 7, this._ctx)) { case 1: this.enterOuterAlt(localctx, 1); { this.state = 924; this.comments(); } break; case 2: this.enterOuterAlt(localctx, 2); { this.state = 925; this.activity_declaration(); } break; case 3: this.enterOuterAlt(localctx, 3); { this.state = 926; this.override_declaration(); } break; case 4: this.enterOuterAlt(localctx, 4); { this.state = 927; this.constraint_declaration(); } break; case 5: this.enterOuterAlt(localctx, 5); { this.state = 928; this.action_field_declaration(); } break; case 6: this.enterOuterAlt(localctx, 6); { this.state = 929; this.symbol_declaration(); } break; case 7: this.enterOuterAlt(localctx, 7); { this.state = 930; this.covergroup_declaration(); } break; case 8: this.enterOuterAlt(localctx, 8); { this.state = 931; this.exec_block_stmt(); } break; case 9: this.enterOuterAlt(localctx, 9); { this.state = 932; this.activity_scheduling_constraint(); } break; case 10: this.enterOuterAlt(localctx, 10); { this.state = 933; this.attr_group(); } break; case 11: this.enterOuterAlt(localctx, 11); { this.state = 934; this.compile_assert_stmt(); } break; case 12: this.enterOuterAlt(localctx, 12); { this.state = 935; this.covergroup_instantiation(); } break; case 13: this.enterOuterAlt(localctx, 13); { this.state = 936; this.action_body_compile_if(); } break; case 14: this.enterOuterAlt(localctx, 14); { this.state = 937; this.transparent_addr_claim(); } break; case 15: this.enterOuterAlt(localctx, 15); { this.state = 938; this.addr_claim(); } break; case 16: this.enterOuterAlt(localctx, 16); { this.state = 939; this.stmt_terminator(); } break; } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) action_field_declaration() { let localctx = new Action_field_declarationContext(this, this._ctx, this.state); this.enterRule(localctx, 14, pss.RULE_action_field_declaration); try { this.state = 947; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 8, this._ctx)) { case 1: this.enterOuterAlt(localctx, 1); { this.state = 942; this.comments(); } break; case 2: this.enterOuterAlt(localctx, 2); { this.state = 943; this.attr_field(); } break; case 3: this.enterOuterAlt(localctx, 3); { this.state = 944; this.activity_data_field(); } break; case 4: this.enterOuterAlt(localctx, 4); { this.state = 945; this.action_handle_declaration(); } break; case 5: this.enterOuterAlt(localctx, 5); { this.state = 946; this.object_ref_field_declaration(); } break; } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) object_ref_field_declaration() { let localctx = new Object_ref_field_declarationContext(this, this._ctx, this.state); this.enterRule(localctx, 16, pss.RULE_object_ref_field_declaration); try { this.state = 952; this._errHandler.sync(this); switch (this._input.LA(1)) { case 223: case 224: case 225: this.enterOuterAlt(localctx, 1); { this.state = 949; this.comments(); } break; case 57: case 58: this.enterOuterAlt(localctx, 2); { this.state = 950; this.flow_ref_field_declaration(); } break; case 60: case 61: this.enterOuterAlt(localctx, 3); { this.state = 951; this.resource_ref_field_declaration(); } break; default: throw new antlr4_1.NoViableAltException(this); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) flow_ref_field_declaration() { let localctx = new Flow_ref_field_declarationContext(this, this._ctx, this.state); this.enterRule(localctx, 18, pss.RULE_flow_ref_field_declaration); let _la; try { this.enterOuterAlt(localctx, 1); { this.state = 954; _la = this._input.LA(1); if (!(_la === 57 || _la === 58)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } this.state = 955; this.flow_object_type(); this.state = 956; this.object_ref_field(); this.state = 961; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 4) { { { this.state = 957; this.match(pss.TOKEN_COMMA); this.state = 958; this.object_ref_field(); } } this.state = 963; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 964; this.match(pss.TOKEN_SEMICOLON); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) resource_ref_field_declaration() { let localctx = new Resource_ref_field_declarationContext(this, this._ctx, this.state); this.enterRule(localctx, 20, pss.RULE_resource_ref_field_declaration); let _la; try { this.enterOuterAlt(localctx, 1); { this.state = 966; _la = this._input.LA(1); if (!(_la === 60 || _la === 61)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } this.state = 967; this.resource_object_type(); this.state = 968; this.object_ref_field(); this.state = 973; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 4) { { { this.state = 969; this.match(pss.TOKEN_COMMA); this.state = 970; this.object_ref_field(); } } this.state = 975; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 976; this.match(pss.TOKEN_SEMICOLON); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) flow_object_type() { let localctx = new Flow_object_typeContext(this, this._ctx, this.state); this.enterRule(localctx, 22, pss.RULE_flow_object_type); try { this.state = 981; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 12, this._ctx)) { case 1: this.enterOuterAlt(localctx, 1); { this.state = 978; this.buffer_type_identifier(); } break; case 2: this.enterOuterAlt(localctx, 2); { this.state = 979; this.state_type_identifier(); } break; case 3: this.enterOuterAlt(localctx, 3); { this.state = 980; this.stream_type_identifier(); } break; } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) resource_object_type() { let localctx = new Resource_object_typeContext(this, this._ctx, this.state); this.enterRule(localctx, 24, pss.RULE_resource_object_type); try { this.enterOuterAlt(localctx, 1); { this.state = 983; this.resource_type_identifier(); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) object_ref_field() { let localctx = new Object_ref_fieldContext(this, this._ctx, this.state); this.enterRule(localctx, 26, pss.RULE_object_ref_field); let _la; try { this.enterOuterAlt(localctx, 1); { this.state = 985; this.identifier(); this.state = 987; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 46) { { this.state = 986; this.array_dim(); } } } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) action_handle_declaration() { let localctx = new Action_handle_declarationContext(this, this._ctx, this.state); this.enterRule(localctx, 28, pss.RULE_action_handle_declaration); try { this.enterOuterAlt(localctx, 1); { this.state = 989; this.action_type_identifier(); this.state = 990; this.action_instantiation(); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) action_instantiation() { let localctx = new Action_instantiationContext(this, this._ctx, this.state); this.enterRule(localctx, 30, pss.RULE_action_instantiation); let _la; try { this.enterOuterAlt(localctx, 1); { this.state = 992; this.action_handle_identifier(); this.state = 994; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 14, this._ctx)) { case 1: { this.state = 993; this.array_dim(); } break; } this.state = 1003; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 4) { { { this.state = 996; this.match(pss.TOKEN_COMMA); this.state = 997; this.action_handle_identifier(); this.state = 999; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 15, this._ctx)) { case 1: { this.state = 998; this.array_dim(); } break; } } } this.state = 1005; this._errHandler.sync(this); _la = this._input.LA(1); } } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) activity_data_field() { let localctx = new Activity_data_fieldContext(this, this._ctx, this.state); this.enterRule(localctx, 32, pss.RULE_activity_data_field); try { this.enterOuterAlt(localctx, 1); { this.sta