github.com/nevalang/neva@v0.23.1-0.20240507185603-7696a9bb8dda/internal/compiler/parser/generated/neva_parser.go (about) 1 // Code generated from ./neva.g4 by ANTLR 4.13.1. DO NOT EDIT. 2 3 package parsing // neva 4 import ( 5 "fmt" 6 "strconv" 7 "sync" 8 9 "github.com/antlr4-go/antlr/v4" 10 ) 11 12 // Suppress unused import errors 13 var _ = fmt.Printf 14 var _ = strconv.Itoa 15 var _ = sync.Once{} 16 17 type nevaParser struct { 18 *antlr.BaseParser 19 } 20 21 var NevaParserStaticData struct { 22 once sync.Once 23 serializedATN []int32 24 LiteralNames []string 25 SymbolicNames []string 26 RuleNames []string 27 PredictionContextCache *antlr.PredictionContextCache 28 atn *antlr.ATN 29 decisionToDFA []*antlr.DFA 30 } 31 32 func nevaParserInit() { 33 staticData := &NevaParserStaticData 34 staticData.LiteralNames = []string{ 35 "", "'#'", "'('", "','", "')'", "'import'", "'{'", "'}'", "':'", "'@'", 36 "'/'", "'.'", "'type'", "'<'", "'>'", "'enum'", "'struct'", "'|'", "'interface'", 37 "'['", "']'", "'const'", "'='", "'nil'", "'true'", "'false'", "'::'", 38 "'component'", "'nodes'", "'?'", "'net'", "'->'", "'=>'", "'$'", "", 39 "'pub'", "", "", "'-'", 40 } 41 staticData.SymbolicNames = []string{ 42 "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 43 "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 44 "COMMENT", "PUB_KW", "IDENTIFIER", "INT", "MINUS", "FLOAT", "STRING", 45 "NEWLINE", "WS", 46 } 47 staticData.RuleNames = []string{ 48 "prog", "stmt", "compilerDirectives", "compilerDirective", "compilerDirectivesArgs", 49 "compiler_directive_arg", "importStmt", "importDef", "importAlias", 50 "importPath", "importPathMod", "importMod", "importModeDelim", "importPathPkg", 51 "entityRef", "localEntityRef", "importedEntityRef", "pkgRef", "entityName", 52 "typeStmt", "singleTypeStmt", "groupTypeStmt", "typeDef", "typeParams", 53 "typeParamList", "typeParam", "typeExpr", "typeInstExpr", "typeArgs", 54 "typeLitExpr", "enumTypeExpr", "structTypeExpr", "structFields", "structField", 55 "unionTypeExpr", "nonUnionTypeExpr", "interfaceStmt", "singleInterfaceStmt", 56 "groupInterfaceStmt", "interfaceDef", "inPortsDef", "outPortsDef", "portsDef", 57 "portDef", "singlePortDef", "arrayPortDef", "constStmt", "singleConstStmt", 58 "groupConstStmt", "constDef", "constLit", "primitiveConstLit", "nil", 59 "bool", "enumLit", "listLit", "listItems", "compositeItem", "structLit", 60 "structValueFields", "structValueField", "compStmt", "singleCompStmt", 61 "groupCompStmt", "compDef", "compBody", "compNodesDef", "compNodesDefBody", 62 "compNodeDef", "nodeInst", "errGuard", "nodeDIArgs", "compNetDef", "compNetBody", 63 "connDefList", "connDef", "normConnDef", "senderSide", "multipleSenderSide", 64 "arrBypassConnDef", "singleSenderSide", "receiverSide", "chainedNormConn", 65 "deferredConn", "senderConstRef", "portAddr", "lonelySinglePortAddr", 66 "lonelyArrPortAddr", "singlePortAddr", "arrPortAddr", "portAddrNode", 67 "portAddrPort", "portAddrIdx", "structSelectors", "singleReceiverSide", 68 "multipleReceiverSide", 69 } 70 staticData.PredictionContextCache = antlr.NewPredictionContextCache() 71 staticData.serializedATN = []int32{ 72 4, 1, 42, 1212, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 73 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 74 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 75 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 76 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 77 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 78 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 79 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 80 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 81 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 82 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 83 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 84 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 85 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 86 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 87 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 88 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 89 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 90 94, 2, 95, 7, 95, 1, 0, 1, 0, 1, 0, 5, 0, 196, 8, 0, 10, 0, 12, 0, 199, 91 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 208, 8, 1, 1, 2, 92 1, 2, 1, 2, 4, 2, 213, 8, 2, 11, 2, 12, 2, 214, 1, 3, 1, 3, 1, 3, 3, 3, 93 220, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 5, 4, 226, 8, 4, 10, 4, 12, 4, 229, 94 9, 4, 1, 4, 1, 4, 1, 5, 4, 5, 234, 8, 5, 11, 5, 12, 5, 235, 1, 6, 1, 6, 95 5, 6, 240, 8, 6, 10, 6, 12, 6, 243, 9, 6, 1, 6, 1, 6, 5, 6, 247, 8, 6, 96 10, 6, 12, 6, 250, 9, 6, 1, 6, 5, 6, 253, 8, 6, 10, 6, 12, 6, 256, 9, 6, 97 1, 6, 1, 6, 1, 7, 3, 7, 261, 8, 7, 1, 7, 1, 7, 3, 7, 265, 8, 7, 1, 7, 5, 98 7, 268, 8, 7, 10, 7, 12, 7, 271, 9, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 3, 99 9, 278, 8, 9, 1, 9, 1, 9, 1, 10, 1, 10, 3, 10, 284, 8, 10, 1, 11, 1, 11, 100 1, 11, 1, 11, 5, 11, 290, 8, 11, 10, 11, 12, 11, 293, 9, 11, 1, 12, 1, 101 12, 1, 13, 1, 13, 1, 13, 5, 13, 300, 8, 13, 10, 13, 12, 13, 303, 9, 13, 102 1, 14, 1, 14, 3, 14, 307, 8, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 103 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 321, 8, 19, 1, 20, 104 3, 20, 324, 8, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 5, 21, 331, 8, 21, 105 10, 21, 12, 21, 334, 9, 21, 1, 21, 1, 21, 5, 21, 338, 8, 21, 10, 21, 12, 106 21, 341, 9, 21, 1, 21, 3, 21, 344, 8, 21, 1, 21, 1, 21, 5, 21, 348, 8, 107 21, 10, 21, 12, 21, 351, 9, 21, 5, 21, 353, 8, 21, 10, 21, 12, 21, 356, 108 9, 21, 1, 21, 1, 21, 1, 22, 1, 22, 3, 22, 362, 8, 22, 1, 22, 3, 22, 365, 109 8, 22, 1, 22, 3, 22, 368, 8, 22, 1, 23, 1, 23, 5, 23, 372, 8, 23, 10, 23, 110 12, 23, 375, 9, 23, 1, 23, 3, 23, 378, 8, 23, 1, 23, 1, 23, 1, 24, 1, 24, 111 1, 24, 5, 24, 385, 8, 24, 10, 24, 12, 24, 388, 9, 24, 1, 24, 5, 24, 391, 112 8, 24, 10, 24, 12, 24, 394, 9, 24, 1, 25, 1, 25, 3, 25, 398, 8, 25, 1, 113 25, 5, 25, 401, 8, 25, 10, 25, 12, 25, 404, 9, 25, 1, 26, 1, 26, 1, 26, 114 3, 26, 409, 8, 26, 1, 27, 1, 27, 3, 27, 413, 8, 27, 1, 28, 1, 28, 5, 28, 115 417, 8, 28, 10, 28, 12, 28, 420, 9, 28, 1, 28, 1, 28, 1, 28, 5, 28, 425, 116 8, 28, 10, 28, 12, 28, 428, 9, 28, 1, 28, 5, 28, 431, 8, 28, 10, 28, 12, 117 28, 434, 9, 28, 1, 28, 5, 28, 437, 8, 28, 10, 28, 12, 28, 440, 9, 28, 1, 118 28, 1, 28, 1, 29, 1, 29, 3, 29, 446, 8, 29, 1, 30, 1, 30, 5, 30, 450, 8, 119 30, 10, 30, 12, 30, 453, 9, 30, 1, 30, 1, 30, 5, 30, 457, 8, 30, 10, 30, 120 12, 30, 460, 9, 30, 1, 30, 1, 30, 1, 30, 5, 30, 465, 8, 30, 10, 30, 12, 121 30, 468, 9, 30, 1, 30, 5, 30, 471, 8, 30, 10, 30, 12, 30, 474, 9, 30, 1, 122 30, 5, 30, 477, 8, 30, 10, 30, 12, 30, 480, 9, 30, 1, 30, 1, 30, 1, 31, 123 1, 31, 5, 31, 486, 8, 31, 10, 31, 12, 31, 489, 9, 31, 1, 31, 1, 31, 5, 124 31, 493, 8, 31, 10, 31, 12, 31, 496, 9, 31, 1, 31, 3, 31, 499, 8, 31, 1, 125 31, 1, 31, 1, 32, 1, 32, 4, 32, 505, 8, 32, 11, 32, 12, 32, 506, 1, 32, 126 5, 32, 510, 8, 32, 10, 32, 12, 32, 513, 9, 32, 1, 33, 1, 33, 1, 33, 5, 127 33, 518, 8, 33, 10, 33, 12, 33, 521, 9, 33, 1, 34, 1, 34, 5, 34, 525, 8, 128 34, 10, 34, 12, 34, 528, 9, 34, 1, 34, 1, 34, 5, 34, 532, 8, 34, 10, 34, 129 12, 34, 535, 9, 34, 1, 34, 4, 34, 538, 8, 34, 11, 34, 12, 34, 539, 1, 35, 130 1, 35, 3, 35, 544, 8, 35, 1, 36, 1, 36, 3, 36, 548, 8, 36, 1, 37, 3, 37, 131 551, 8, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 5, 38, 558, 8, 38, 10, 38, 132 12, 38, 561, 9, 38, 1, 38, 1, 38, 5, 38, 565, 8, 38, 10, 38, 12, 38, 568, 133 9, 38, 1, 38, 3, 38, 571, 8, 38, 1, 38, 5, 38, 574, 8, 38, 10, 38, 12, 134 38, 577, 9, 38, 1, 38, 1, 38, 1, 39, 1, 39, 3, 39, 583, 8, 39, 1, 39, 1, 135 39, 1, 39, 5, 39, 588, 8, 39, 10, 39, 12, 39, 591, 9, 39, 1, 40, 1, 40, 136 1, 41, 1, 41, 1, 42, 1, 42, 5, 42, 599, 8, 42, 10, 42, 12, 42, 602, 9, 137 42, 1, 42, 3, 42, 605, 8, 42, 1, 42, 1, 42, 1, 42, 5, 42, 610, 8, 42, 10, 138 42, 12, 42, 613, 9, 42, 3, 42, 615, 8, 42, 1, 42, 1, 42, 1, 43, 1, 43, 139 3, 43, 621, 8, 43, 1, 44, 5, 44, 624, 8, 44, 10, 44, 12, 44, 627, 9, 44, 140 1, 44, 1, 44, 3, 44, 631, 8, 44, 1, 44, 5, 44, 634, 8, 44, 10, 44, 12, 141 44, 637, 9, 44, 1, 45, 5, 45, 640, 8, 45, 10, 45, 12, 45, 643, 9, 45, 1, 142 45, 1, 45, 1, 45, 1, 45, 3, 45, 649, 8, 45, 1, 45, 5, 45, 652, 8, 45, 10, 143 45, 12, 45, 655, 9, 45, 1, 46, 1, 46, 3, 46, 659, 8, 46, 1, 47, 3, 47, 144 662, 8, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 5, 48, 669, 8, 48, 10, 48, 145 12, 48, 672, 9, 48, 1, 48, 1, 48, 5, 48, 676, 8, 48, 10, 48, 12, 48, 679, 146 9, 48, 1, 48, 3, 48, 682, 8, 48, 1, 48, 5, 48, 685, 8, 48, 10, 48, 12, 147 48, 688, 9, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 148 697, 8, 49, 1, 49, 5, 49, 700, 8, 49, 10, 49, 12, 49, 703, 9, 49, 1, 50, 149 1, 50, 1, 50, 3, 50, 708, 8, 50, 1, 50, 1, 50, 3, 50, 712, 8, 50, 1, 50, 150 1, 50, 1, 50, 1, 50, 1, 50, 3, 50, 719, 8, 50, 1, 51, 1, 51, 1, 51, 3, 151 51, 724, 8, 51, 1, 51, 1, 51, 3, 51, 728, 8, 51, 1, 51, 1, 51, 1, 51, 3, 152 51, 733, 8, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 153 1, 55, 1, 55, 5, 55, 745, 8, 55, 10, 55, 12, 55, 748, 9, 55, 1, 55, 3, 154 55, 751, 8, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 5, 56, 759, 8, 155 56, 10, 56, 12, 56, 762, 9, 56, 1, 56, 1, 56, 5, 56, 766, 8, 56, 10, 56, 156 12, 56, 769, 9, 56, 5, 56, 771, 8, 56, 10, 56, 12, 56, 774, 9, 56, 3, 56, 157 776, 8, 56, 1, 57, 1, 57, 3, 57, 780, 8, 57, 1, 58, 1, 58, 5, 58, 784, 158 8, 58, 10, 58, 12, 58, 787, 9, 58, 1, 58, 3, 58, 790, 8, 58, 1, 58, 1, 159 58, 1, 59, 1, 59, 1, 59, 5, 59, 797, 8, 59, 10, 59, 12, 59, 800, 9, 59, 160 1, 59, 5, 59, 803, 8, 59, 10, 59, 12, 59, 806, 9, 59, 1, 60, 1, 60, 1, 161 60, 1, 60, 5, 60, 812, 8, 60, 10, 60, 12, 60, 815, 9, 60, 1, 61, 1, 61, 162 3, 61, 819, 8, 61, 1, 62, 3, 62, 822, 8, 62, 1, 62, 3, 62, 825, 8, 62, 163 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 5, 63, 832, 8, 63, 10, 63, 12, 63, 835, 164 9, 63, 1, 63, 1, 63, 5, 63, 839, 8, 63, 10, 63, 12, 63, 842, 9, 63, 1, 165 63, 1, 63, 5, 63, 846, 8, 63, 10, 63, 12, 63, 849, 9, 63, 5, 63, 851, 8, 166 63, 10, 63, 12, 63, 854, 9, 63, 1, 63, 3, 63, 857, 8, 63, 1, 63, 3, 63, 167 860, 8, 63, 1, 63, 5, 63, 863, 8, 63, 10, 63, 12, 63, 866, 9, 63, 1, 63, 168 1, 63, 1, 64, 1, 64, 3, 64, 872, 8, 64, 1, 64, 5, 64, 875, 8, 64, 10, 64, 169 12, 64, 878, 9, 64, 1, 65, 1, 65, 5, 65, 882, 8, 65, 10, 65, 12, 65, 885, 170 9, 65, 1, 65, 1, 65, 5, 65, 889, 8, 65, 10, 65, 12, 65, 892, 9, 65, 5, 171 65, 894, 8, 65, 10, 65, 12, 65, 897, 9, 65, 1, 65, 1, 65, 5, 65, 901, 8, 172 65, 10, 65, 12, 65, 904, 9, 65, 3, 65, 906, 8, 65, 1, 65, 1, 65, 5, 65, 173 910, 8, 65, 10, 65, 12, 65, 913, 9, 65, 5, 65, 915, 8, 65, 10, 65, 12, 174 65, 918, 9, 65, 1, 65, 1, 65, 5, 65, 922, 8, 65, 10, 65, 12, 65, 925, 9, 175 65, 3, 65, 927, 8, 65, 1, 65, 1, 65, 5, 65, 931, 8, 65, 10, 65, 12, 65, 176 934, 9, 65, 5, 65, 936, 8, 65, 10, 65, 12, 65, 939, 9, 65, 1, 65, 1, 65, 177 1, 66, 1, 66, 5, 66, 945, 8, 66, 10, 66, 12, 66, 948, 9, 66, 1, 66, 1, 178 66, 1, 67, 1, 67, 5, 67, 954, 8, 67, 10, 67, 12, 67, 957, 9, 67, 1, 67, 179 1, 67, 3, 67, 961, 8, 67, 1, 67, 3, 67, 964, 8, 67, 1, 67, 5, 67, 967, 180 8, 67, 10, 67, 12, 67, 970, 9, 67, 5, 67, 972, 8, 67, 10, 67, 12, 67, 975, 181 9, 67, 1, 67, 1, 67, 1, 68, 3, 68, 980, 8, 68, 1, 68, 3, 68, 983, 8, 68, 182 1, 68, 1, 68, 1, 69, 1, 69, 5, 69, 989, 8, 69, 10, 69, 12, 69, 992, 9, 183 69, 1, 69, 3, 69, 995, 8, 69, 1, 69, 3, 69, 998, 8, 69, 1, 69, 5, 69, 1001, 184 8, 69, 10, 69, 12, 69, 1004, 9, 69, 1, 69, 3, 69, 1007, 8, 69, 1, 70, 1, 185 70, 1, 71, 1, 71, 1, 72, 1, 72, 5, 72, 1015, 8, 72, 10, 72, 12, 72, 1018, 186 9, 72, 1, 72, 1, 72, 1, 73, 1, 73, 5, 73, 1024, 8, 73, 10, 73, 12, 73, 187 1027, 9, 73, 1, 73, 3, 73, 1030, 8, 73, 1, 73, 5, 73, 1033, 8, 73, 10, 188 73, 12, 73, 1036, 9, 73, 1, 73, 1, 73, 1, 74, 1, 74, 3, 74, 1042, 8, 74, 189 1, 74, 5, 74, 1045, 8, 74, 10, 74, 12, 74, 1048, 9, 74, 1, 74, 1, 74, 3, 190 74, 1052, 8, 74, 5, 74, 1054, 8, 74, 10, 74, 12, 74, 1057, 9, 74, 1, 75, 191 1, 75, 3, 75, 1061, 8, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 3, 192 77, 1069, 8, 77, 1, 78, 1, 78, 5, 78, 1073, 8, 78, 10, 78, 12, 78, 1076, 193 9, 78, 1, 78, 1, 78, 1, 78, 5, 78, 1081, 8, 78, 10, 78, 12, 78, 1084, 9, 194 78, 1, 78, 1, 78, 5, 78, 1088, 8, 78, 10, 78, 12, 78, 1091, 9, 78, 5, 78, 195 1093, 8, 78, 10, 78, 12, 78, 1096, 9, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 196 79, 1, 79, 1, 80, 1, 80, 1, 80, 3, 80, 1107, 8, 80, 1, 80, 3, 80, 1110, 197 8, 80, 1, 81, 1, 81, 1, 81, 3, 81, 1115, 8, 81, 1, 82, 1, 82, 1, 83, 1, 198 83, 5, 83, 1121, 8, 83, 10, 83, 12, 83, 1124, 9, 83, 1, 83, 1, 83, 5, 83, 199 1128, 8, 83, 10, 83, 12, 83, 1131, 9, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 200 84, 1, 85, 1, 85, 1, 85, 1, 85, 3, 85, 1142, 8, 85, 1, 86, 1, 86, 1, 87, 201 1, 87, 1, 87, 1, 88, 3, 88, 1150, 8, 88, 1, 88, 1, 88, 1, 88, 1, 89, 3, 202 89, 1156, 8, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 1, 91, 1, 91, 203 1, 92, 1, 92, 1, 92, 1, 92, 1, 93, 1, 93, 1, 93, 1, 93, 5, 93, 1174, 8, 204 93, 10, 93, 12, 93, 1177, 9, 93, 1, 94, 1, 94, 3, 94, 1181, 8, 94, 1, 95, 205 1, 95, 5, 95, 1185, 8, 95, 10, 95, 12, 95, 1188, 9, 95, 1, 95, 1, 95, 1, 206 95, 5, 95, 1193, 8, 95, 10, 95, 12, 95, 1196, 9, 95, 1, 95, 1, 95, 5, 95, 207 1200, 8, 95, 10, 95, 12, 95, 1203, 9, 95, 5, 95, 1205, 8, 95, 10, 95, 12, 208 95, 1208, 9, 95, 1, 95, 1, 95, 1, 95, 0, 0, 96, 0, 2, 4, 6, 8, 10, 12, 209 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 210 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 211 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 212 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 213 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 214 178, 180, 182, 184, 186, 188, 190, 0, 2, 1, 0, 10, 11, 1, 0, 24, 25, 1300, 215 0, 197, 1, 0, 0, 0, 2, 207, 1, 0, 0, 0, 4, 212, 1, 0, 0, 0, 6, 216, 1, 216 0, 0, 0, 8, 221, 1, 0, 0, 0, 10, 233, 1, 0, 0, 0, 12, 237, 1, 0, 0, 0, 217 14, 260, 1, 0, 0, 0, 16, 272, 1, 0, 0, 0, 18, 277, 1, 0, 0, 0, 20, 283, 218 1, 0, 0, 0, 22, 285, 1, 0, 0, 0, 24, 294, 1, 0, 0, 0, 26, 296, 1, 0, 0, 219 0, 28, 306, 1, 0, 0, 0, 30, 308, 1, 0, 0, 0, 32, 310, 1, 0, 0, 0, 34, 314, 220 1, 0, 0, 0, 36, 316, 1, 0, 0, 0, 38, 320, 1, 0, 0, 0, 40, 323, 1, 0, 0, 221 0, 42, 328, 1, 0, 0, 0, 44, 359, 1, 0, 0, 0, 46, 369, 1, 0, 0, 0, 48, 381, 222 1, 0, 0, 0, 50, 395, 1, 0, 0, 0, 52, 408, 1, 0, 0, 0, 54, 410, 1, 0, 0, 223 0, 56, 414, 1, 0, 0, 0, 58, 445, 1, 0, 0, 0, 60, 447, 1, 0, 0, 0, 62, 483, 224 1, 0, 0, 0, 64, 502, 1, 0, 0, 0, 66, 514, 1, 0, 0, 0, 68, 522, 1, 0, 0, 225 0, 70, 543, 1, 0, 0, 0, 72, 547, 1, 0, 0, 0, 74, 550, 1, 0, 0, 0, 76, 555, 226 1, 0, 0, 0, 78, 580, 1, 0, 0, 0, 80, 592, 1, 0, 0, 0, 82, 594, 1, 0, 0, 227 0, 84, 596, 1, 0, 0, 0, 86, 620, 1, 0, 0, 0, 88, 625, 1, 0, 0, 0, 90, 641, 228 1, 0, 0, 0, 92, 658, 1, 0, 0, 0, 94, 661, 1, 0, 0, 0, 96, 666, 1, 0, 0, 229 0, 98, 691, 1, 0, 0, 0, 100, 718, 1, 0, 0, 0, 102, 732, 1, 0, 0, 0, 104, 230 734, 1, 0, 0, 0, 106, 736, 1, 0, 0, 0, 108, 738, 1, 0, 0, 0, 110, 742, 231 1, 0, 0, 0, 112, 775, 1, 0, 0, 0, 114, 779, 1, 0, 0, 0, 116, 781, 1, 0, 232 0, 0, 118, 793, 1, 0, 0, 0, 120, 807, 1, 0, 0, 0, 122, 818, 1, 0, 0, 0, 233 124, 821, 1, 0, 0, 0, 126, 829, 1, 0, 0, 0, 128, 869, 1, 0, 0, 0, 130, 234 879, 1, 0, 0, 0, 132, 942, 1, 0, 0, 0, 134, 951, 1, 0, 0, 0, 136, 979, 235 1, 0, 0, 0, 138, 986, 1, 0, 0, 0, 140, 1008, 1, 0, 0, 0, 142, 1010, 1, 236 0, 0, 0, 144, 1012, 1, 0, 0, 0, 146, 1021, 1, 0, 0, 0, 148, 1041, 1, 0, 237 0, 0, 150, 1060, 1, 0, 0, 0, 152, 1062, 1, 0, 0, 0, 154, 1068, 1, 0, 0, 238 0, 156, 1070, 1, 0, 0, 0, 158, 1099, 1, 0, 0, 0, 160, 1106, 1, 0, 0, 0, 239 162, 1114, 1, 0, 0, 0, 164, 1116, 1, 0, 0, 0, 166, 1118, 1, 0, 0, 0, 168, 240 1134, 1, 0, 0, 0, 170, 1141, 1, 0, 0, 0, 172, 1143, 1, 0, 0, 0, 174, 1145, 241 1, 0, 0, 0, 176, 1149, 1, 0, 0, 0, 178, 1155, 1, 0, 0, 0, 180, 1161, 1, 242 0, 0, 0, 182, 1163, 1, 0, 0, 0, 184, 1165, 1, 0, 0, 0, 186, 1169, 1, 0, 243 0, 0, 188, 1180, 1, 0, 0, 0, 190, 1182, 1, 0, 0, 0, 192, 196, 5, 41, 0, 244 0, 193, 196, 5, 34, 0, 0, 194, 196, 3, 2, 1, 0, 195, 192, 1, 0, 0, 0, 195, 245 193, 1, 0, 0, 0, 195, 194, 1, 0, 0, 0, 196, 199, 1, 0, 0, 0, 197, 195, 246 1, 0, 0, 0, 197, 198, 1, 0, 0, 0, 198, 200, 1, 0, 0, 0, 199, 197, 1, 0, 247 0, 0, 200, 201, 5, 0, 0, 1, 201, 1, 1, 0, 0, 0, 202, 208, 3, 12, 6, 0, 248 203, 208, 3, 38, 19, 0, 204, 208, 3, 72, 36, 0, 205, 208, 3, 92, 46, 0, 249 206, 208, 3, 122, 61, 0, 207, 202, 1, 0, 0, 0, 207, 203, 1, 0, 0, 0, 207, 250 204, 1, 0, 0, 0, 207, 205, 1, 0, 0, 0, 207, 206, 1, 0, 0, 0, 208, 3, 1, 251 0, 0, 0, 209, 210, 3, 6, 3, 0, 210, 211, 5, 41, 0, 0, 211, 213, 1, 0, 0, 252 0, 212, 209, 1, 0, 0, 0, 213, 214, 1, 0, 0, 0, 214, 212, 1, 0, 0, 0, 214, 253 215, 1, 0, 0, 0, 215, 5, 1, 0, 0, 0, 216, 217, 5, 1, 0, 0, 217, 219, 5, 254 36, 0, 0, 218, 220, 3, 8, 4, 0, 219, 218, 1, 0, 0, 0, 219, 220, 1, 0, 0, 255 0, 220, 7, 1, 0, 0, 0, 221, 222, 5, 2, 0, 0, 222, 227, 3, 10, 5, 0, 223, 256 224, 5, 3, 0, 0, 224, 226, 3, 10, 5, 0, 225, 223, 1, 0, 0, 0, 226, 229, 257 1, 0, 0, 0, 227, 225, 1, 0, 0, 0, 227, 228, 1, 0, 0, 0, 228, 230, 1, 0, 258 0, 0, 229, 227, 1, 0, 0, 0, 230, 231, 5, 4, 0, 0, 231, 9, 1, 0, 0, 0, 232, 259 234, 5, 36, 0, 0, 233, 232, 1, 0, 0, 0, 234, 235, 1, 0, 0, 0, 235, 233, 260 1, 0, 0, 0, 235, 236, 1, 0, 0, 0, 236, 11, 1, 0, 0, 0, 237, 241, 5, 5, 261 0, 0, 238, 240, 5, 41, 0, 0, 239, 238, 1, 0, 0, 0, 240, 243, 1, 0, 0, 0, 262 241, 239, 1, 0, 0, 0, 241, 242, 1, 0, 0, 0, 242, 244, 1, 0, 0, 0, 243, 263 241, 1, 0, 0, 0, 244, 248, 5, 6, 0, 0, 245, 247, 5, 41, 0, 0, 246, 245, 264 1, 0, 0, 0, 247, 250, 1, 0, 0, 0, 248, 246, 1, 0, 0, 0, 248, 249, 1, 0, 265 0, 0, 249, 254, 1, 0, 0, 0, 250, 248, 1, 0, 0, 0, 251, 253, 3, 14, 7, 0, 266 252, 251, 1, 0, 0, 0, 253, 256, 1, 0, 0, 0, 254, 252, 1, 0, 0, 0, 254, 267 255, 1, 0, 0, 0, 255, 257, 1, 0, 0, 0, 256, 254, 1, 0, 0, 0, 257, 258, 268 5, 7, 0, 0, 258, 13, 1, 0, 0, 0, 259, 261, 3, 16, 8, 0, 260, 259, 1, 0, 269 0, 0, 260, 261, 1, 0, 0, 0, 261, 262, 1, 0, 0, 0, 262, 264, 3, 18, 9, 0, 270 263, 265, 5, 3, 0, 0, 264, 263, 1, 0, 0, 0, 264, 265, 1, 0, 0, 0, 265, 271 269, 1, 0, 0, 0, 266, 268, 5, 41, 0, 0, 267, 266, 1, 0, 0, 0, 268, 271, 272 1, 0, 0, 0, 269, 267, 1, 0, 0, 0, 269, 270, 1, 0, 0, 0, 270, 15, 1, 0, 273 0, 0, 271, 269, 1, 0, 0, 0, 272, 273, 5, 36, 0, 0, 273, 17, 1, 0, 0, 0, 274 274, 275, 3, 20, 10, 0, 275, 276, 5, 8, 0, 0, 276, 278, 1, 0, 0, 0, 277, 275 274, 1, 0, 0, 0, 277, 278, 1, 0, 0, 0, 278, 279, 1, 0, 0, 0, 279, 280, 276 3, 26, 13, 0, 280, 19, 1, 0, 0, 0, 281, 284, 5, 9, 0, 0, 282, 284, 3, 22, 277 11, 0, 283, 281, 1, 0, 0, 0, 283, 282, 1, 0, 0, 0, 284, 21, 1, 0, 0, 0, 278 285, 291, 5, 36, 0, 0, 286, 287, 3, 24, 12, 0, 287, 288, 5, 36, 0, 0, 288, 279 290, 1, 0, 0, 0, 289, 286, 1, 0, 0, 0, 290, 293, 1, 0, 0, 0, 291, 289, 280 1, 0, 0, 0, 291, 292, 1, 0, 0, 0, 292, 23, 1, 0, 0, 0, 293, 291, 1, 0, 281 0, 0, 294, 295, 7, 0, 0, 0, 295, 25, 1, 0, 0, 0, 296, 301, 5, 36, 0, 0, 282 297, 298, 5, 10, 0, 0, 298, 300, 5, 36, 0, 0, 299, 297, 1, 0, 0, 0, 300, 283 303, 1, 0, 0, 0, 301, 299, 1, 0, 0, 0, 301, 302, 1, 0, 0, 0, 302, 27, 1, 284 0, 0, 0, 303, 301, 1, 0, 0, 0, 304, 307, 3, 32, 16, 0, 305, 307, 3, 30, 285 15, 0, 306, 304, 1, 0, 0, 0, 306, 305, 1, 0, 0, 0, 307, 29, 1, 0, 0, 0, 286 308, 309, 5, 36, 0, 0, 309, 31, 1, 0, 0, 0, 310, 311, 3, 34, 17, 0, 311, 287 312, 5, 11, 0, 0, 312, 313, 3, 36, 18, 0, 313, 33, 1, 0, 0, 0, 314, 315, 288 5, 36, 0, 0, 315, 35, 1, 0, 0, 0, 316, 317, 5, 36, 0, 0, 317, 37, 1, 0, 289 0, 0, 318, 321, 3, 40, 20, 0, 319, 321, 3, 42, 21, 0, 320, 318, 1, 0, 0, 290 0, 320, 319, 1, 0, 0, 0, 321, 39, 1, 0, 0, 0, 322, 324, 5, 35, 0, 0, 323, 291 322, 1, 0, 0, 0, 323, 324, 1, 0, 0, 0, 324, 325, 1, 0, 0, 0, 325, 326, 292 5, 12, 0, 0, 326, 327, 3, 44, 22, 0, 327, 41, 1, 0, 0, 0, 328, 332, 5, 293 12, 0, 0, 329, 331, 5, 41, 0, 0, 330, 329, 1, 0, 0, 0, 331, 334, 1, 0, 294 0, 0, 332, 330, 1, 0, 0, 0, 332, 333, 1, 0, 0, 0, 333, 335, 1, 0, 0, 0, 295 334, 332, 1, 0, 0, 0, 335, 339, 5, 6, 0, 0, 336, 338, 5, 41, 0, 0, 337, 296 336, 1, 0, 0, 0, 338, 341, 1, 0, 0, 0, 339, 337, 1, 0, 0, 0, 339, 340, 297 1, 0, 0, 0, 340, 354, 1, 0, 0, 0, 341, 339, 1, 0, 0, 0, 342, 344, 5, 35, 298 0, 0, 343, 342, 1, 0, 0, 0, 343, 344, 1, 0, 0, 0, 344, 345, 1, 0, 0, 0, 299 345, 349, 3, 44, 22, 0, 346, 348, 5, 41, 0, 0, 347, 346, 1, 0, 0, 0, 348, 300 351, 1, 0, 0, 0, 349, 347, 1, 0, 0, 0, 349, 350, 1, 0, 0, 0, 350, 353, 301 1, 0, 0, 0, 351, 349, 1, 0, 0, 0, 352, 343, 1, 0, 0, 0, 353, 356, 1, 0, 302 0, 0, 354, 352, 1, 0, 0, 0, 354, 355, 1, 0, 0, 0, 355, 357, 1, 0, 0, 0, 303 356, 354, 1, 0, 0, 0, 357, 358, 5, 7, 0, 0, 358, 43, 1, 0, 0, 0, 359, 361, 304 5, 36, 0, 0, 360, 362, 3, 46, 23, 0, 361, 360, 1, 0, 0, 0, 361, 362, 1, 305 0, 0, 0, 362, 364, 1, 0, 0, 0, 363, 365, 3, 52, 26, 0, 364, 363, 1, 0, 306 0, 0, 364, 365, 1, 0, 0, 0, 365, 367, 1, 0, 0, 0, 366, 368, 5, 34, 0, 0, 307 367, 366, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 45, 1, 0, 0, 0, 369, 373, 308 5, 13, 0, 0, 370, 372, 5, 41, 0, 0, 371, 370, 1, 0, 0, 0, 372, 375, 1, 309 0, 0, 0, 373, 371, 1, 0, 0, 0, 373, 374, 1, 0, 0, 0, 374, 377, 1, 0, 0, 310 0, 375, 373, 1, 0, 0, 0, 376, 378, 3, 48, 24, 0, 377, 376, 1, 0, 0, 0, 311 377, 378, 1, 0, 0, 0, 378, 379, 1, 0, 0, 0, 379, 380, 5, 14, 0, 0, 380, 312 47, 1, 0, 0, 0, 381, 392, 3, 50, 25, 0, 382, 386, 5, 3, 0, 0, 383, 385, 313 5, 41, 0, 0, 384, 383, 1, 0, 0, 0, 385, 388, 1, 0, 0, 0, 386, 384, 1, 0, 314 0, 0, 386, 387, 1, 0, 0, 0, 387, 389, 1, 0, 0, 0, 388, 386, 1, 0, 0, 0, 315 389, 391, 3, 50, 25, 0, 390, 382, 1, 0, 0, 0, 391, 394, 1, 0, 0, 0, 392, 316 390, 1, 0, 0, 0, 392, 393, 1, 0, 0, 0, 393, 49, 1, 0, 0, 0, 394, 392, 1, 317 0, 0, 0, 395, 397, 5, 36, 0, 0, 396, 398, 3, 52, 26, 0, 397, 396, 1, 0, 318 0, 0, 397, 398, 1, 0, 0, 0, 398, 402, 1, 0, 0, 0, 399, 401, 5, 41, 0, 0, 319 400, 399, 1, 0, 0, 0, 401, 404, 1, 0, 0, 0, 402, 400, 1, 0, 0, 0, 402, 320 403, 1, 0, 0, 0, 403, 51, 1, 0, 0, 0, 404, 402, 1, 0, 0, 0, 405, 409, 3, 321 54, 27, 0, 406, 409, 3, 58, 29, 0, 407, 409, 3, 68, 34, 0, 408, 405, 1, 322 0, 0, 0, 408, 406, 1, 0, 0, 0, 408, 407, 1, 0, 0, 0, 409, 53, 1, 0, 0, 323 0, 410, 412, 3, 28, 14, 0, 411, 413, 3, 56, 28, 0, 412, 411, 1, 0, 0, 0, 324 412, 413, 1, 0, 0, 0, 413, 55, 1, 0, 0, 0, 414, 418, 5, 13, 0, 0, 415, 325 417, 5, 41, 0, 0, 416, 415, 1, 0, 0, 0, 417, 420, 1, 0, 0, 0, 418, 416, 326 1, 0, 0, 0, 418, 419, 1, 0, 0, 0, 419, 421, 1, 0, 0, 0, 420, 418, 1, 0, 327 0, 0, 421, 432, 3, 52, 26, 0, 422, 426, 5, 3, 0, 0, 423, 425, 5, 41, 0, 328 0, 424, 423, 1, 0, 0, 0, 425, 428, 1, 0, 0, 0, 426, 424, 1, 0, 0, 0, 426, 329 427, 1, 0, 0, 0, 427, 429, 1, 0, 0, 0, 428, 426, 1, 0, 0, 0, 429, 431, 330 3, 52, 26, 0, 430, 422, 1, 0, 0, 0, 431, 434, 1, 0, 0, 0, 432, 430, 1, 331 0, 0, 0, 432, 433, 1, 0, 0, 0, 433, 438, 1, 0, 0, 0, 434, 432, 1, 0, 0, 332 0, 435, 437, 5, 41, 0, 0, 436, 435, 1, 0, 0, 0, 437, 440, 1, 0, 0, 0, 438, 333 436, 1, 0, 0, 0, 438, 439, 1, 0, 0, 0, 439, 441, 1, 0, 0, 0, 440, 438, 334 1, 0, 0, 0, 441, 442, 5, 14, 0, 0, 442, 57, 1, 0, 0, 0, 443, 446, 3, 60, 335 30, 0, 444, 446, 3, 62, 31, 0, 445, 443, 1, 0, 0, 0, 445, 444, 1, 0, 0, 336 0, 446, 59, 1, 0, 0, 0, 447, 451, 5, 15, 0, 0, 448, 450, 5, 41, 0, 0, 449, 337 448, 1, 0, 0, 0, 450, 453, 1, 0, 0, 0, 451, 449, 1, 0, 0, 0, 451, 452, 338 1, 0, 0, 0, 452, 454, 1, 0, 0, 0, 453, 451, 1, 0, 0, 0, 454, 458, 5, 6, 339 0, 0, 455, 457, 5, 41, 0, 0, 456, 455, 1, 0, 0, 0, 457, 460, 1, 0, 0, 0, 340 458, 456, 1, 0, 0, 0, 458, 459, 1, 0, 0, 0, 459, 461, 1, 0, 0, 0, 460, 341 458, 1, 0, 0, 0, 461, 472, 5, 36, 0, 0, 462, 466, 5, 3, 0, 0, 463, 465, 342 5, 41, 0, 0, 464, 463, 1, 0, 0, 0, 465, 468, 1, 0, 0, 0, 466, 464, 1, 0, 343 0, 0, 466, 467, 1, 0, 0, 0, 467, 469, 1, 0, 0, 0, 468, 466, 1, 0, 0, 0, 344 469, 471, 5, 36, 0, 0, 470, 462, 1, 0, 0, 0, 471, 474, 1, 0, 0, 0, 472, 345 470, 1, 0, 0, 0, 472, 473, 1, 0, 0, 0, 473, 478, 1, 0, 0, 0, 474, 472, 346 1, 0, 0, 0, 475, 477, 5, 41, 0, 0, 476, 475, 1, 0, 0, 0, 477, 480, 1, 0, 347 0, 0, 478, 476, 1, 0, 0, 0, 478, 479, 1, 0, 0, 0, 479, 481, 1, 0, 0, 0, 348 480, 478, 1, 0, 0, 0, 481, 482, 5, 7, 0, 0, 482, 61, 1, 0, 0, 0, 483, 487, 349 5, 16, 0, 0, 484, 486, 5, 41, 0, 0, 485, 484, 1, 0, 0, 0, 486, 489, 1, 350 0, 0, 0, 487, 485, 1, 0, 0, 0, 487, 488, 1, 0, 0, 0, 488, 490, 1, 0, 0, 351 0, 489, 487, 1, 0, 0, 0, 490, 494, 5, 6, 0, 0, 491, 493, 5, 41, 0, 0, 492, 352 491, 1, 0, 0, 0, 493, 496, 1, 0, 0, 0, 494, 492, 1, 0, 0, 0, 494, 495, 353 1, 0, 0, 0, 495, 498, 1, 0, 0, 0, 496, 494, 1, 0, 0, 0, 497, 499, 3, 64, 354 32, 0, 498, 497, 1, 0, 0, 0, 498, 499, 1, 0, 0, 0, 499, 500, 1, 0, 0, 0, 355 500, 501, 5, 7, 0, 0, 501, 63, 1, 0, 0, 0, 502, 511, 3, 66, 33, 0, 503, 356 505, 5, 41, 0, 0, 504, 503, 1, 0, 0, 0, 505, 506, 1, 0, 0, 0, 506, 504, 357 1, 0, 0, 0, 506, 507, 1, 0, 0, 0, 507, 508, 1, 0, 0, 0, 508, 510, 3, 66, 358 33, 0, 509, 504, 1, 0, 0, 0, 510, 513, 1, 0, 0, 0, 511, 509, 1, 0, 0, 0, 359 511, 512, 1, 0, 0, 0, 512, 65, 1, 0, 0, 0, 513, 511, 1, 0, 0, 0, 514, 515, 360 5, 36, 0, 0, 515, 519, 3, 52, 26, 0, 516, 518, 5, 41, 0, 0, 517, 516, 1, 361 0, 0, 0, 518, 521, 1, 0, 0, 0, 519, 517, 1, 0, 0, 0, 519, 520, 1, 0, 0, 362 0, 520, 67, 1, 0, 0, 0, 521, 519, 1, 0, 0, 0, 522, 537, 3, 70, 35, 0, 523, 363 525, 5, 41, 0, 0, 524, 523, 1, 0, 0, 0, 525, 528, 1, 0, 0, 0, 526, 524, 364 1, 0, 0, 0, 526, 527, 1, 0, 0, 0, 527, 529, 1, 0, 0, 0, 528, 526, 1, 0, 365 0, 0, 529, 533, 5, 17, 0, 0, 530, 532, 5, 41, 0, 0, 531, 530, 1, 0, 0, 366 0, 532, 535, 1, 0, 0, 0, 533, 531, 1, 0, 0, 0, 533, 534, 1, 0, 0, 0, 534, 367 536, 1, 0, 0, 0, 535, 533, 1, 0, 0, 0, 536, 538, 3, 70, 35, 0, 537, 526, 368 1, 0, 0, 0, 538, 539, 1, 0, 0, 0, 539, 537, 1, 0, 0, 0, 539, 540, 1, 0, 369 0, 0, 540, 69, 1, 0, 0, 0, 541, 544, 3, 54, 27, 0, 542, 544, 3, 58, 29, 370 0, 543, 541, 1, 0, 0, 0, 543, 542, 1, 0, 0, 0, 544, 71, 1, 0, 0, 0, 545, 371 548, 3, 74, 37, 0, 546, 548, 3, 76, 38, 0, 547, 545, 1, 0, 0, 0, 547, 546, 372 1, 0, 0, 0, 548, 73, 1, 0, 0, 0, 549, 551, 5, 35, 0, 0, 550, 549, 1, 0, 373 0, 0, 550, 551, 1, 0, 0, 0, 551, 552, 1, 0, 0, 0, 552, 553, 5, 18, 0, 0, 374 553, 554, 3, 78, 39, 0, 554, 75, 1, 0, 0, 0, 555, 559, 5, 18, 0, 0, 556, 375 558, 5, 41, 0, 0, 557, 556, 1, 0, 0, 0, 558, 561, 1, 0, 0, 0, 559, 557, 376 1, 0, 0, 0, 559, 560, 1, 0, 0, 0, 560, 562, 1, 0, 0, 0, 561, 559, 1, 0, 377 0, 0, 562, 566, 5, 6, 0, 0, 563, 565, 5, 41, 0, 0, 564, 563, 1, 0, 0, 0, 378 565, 568, 1, 0, 0, 0, 566, 564, 1, 0, 0, 0, 566, 567, 1, 0, 0, 0, 567, 379 575, 1, 0, 0, 0, 568, 566, 1, 0, 0, 0, 569, 571, 5, 35, 0, 0, 570, 569, 380 1, 0, 0, 0, 570, 571, 1, 0, 0, 0, 571, 572, 1, 0, 0, 0, 572, 574, 3, 78, 381 39, 0, 573, 570, 1, 0, 0, 0, 574, 577, 1, 0, 0, 0, 575, 573, 1, 0, 0, 0, 382 575, 576, 1, 0, 0, 0, 576, 578, 1, 0, 0, 0, 577, 575, 1, 0, 0, 0, 578, 383 579, 5, 7, 0, 0, 579, 77, 1, 0, 0, 0, 580, 582, 5, 36, 0, 0, 581, 583, 384 3, 46, 23, 0, 582, 581, 1, 0, 0, 0, 582, 583, 1, 0, 0, 0, 583, 584, 1, 385 0, 0, 0, 584, 585, 3, 80, 40, 0, 585, 589, 3, 82, 41, 0, 586, 588, 5, 41, 386 0, 0, 587, 586, 1, 0, 0, 0, 588, 591, 1, 0, 0, 0, 589, 587, 1, 0, 0, 0, 387 589, 590, 1, 0, 0, 0, 590, 79, 1, 0, 0, 0, 591, 589, 1, 0, 0, 0, 592, 593, 388 3, 84, 42, 0, 593, 81, 1, 0, 0, 0, 594, 595, 3, 84, 42, 0, 595, 83, 1, 389 0, 0, 0, 596, 614, 5, 2, 0, 0, 597, 599, 5, 41, 0, 0, 598, 597, 1, 0, 0, 390 0, 599, 602, 1, 0, 0, 0, 600, 598, 1, 0, 0, 0, 600, 601, 1, 0, 0, 0, 601, 391 615, 1, 0, 0, 0, 602, 600, 1, 0, 0, 0, 603, 605, 3, 86, 43, 0, 604, 603, 392 1, 0, 0, 0, 604, 605, 1, 0, 0, 0, 605, 615, 1, 0, 0, 0, 606, 611, 3, 86, 393 43, 0, 607, 608, 5, 3, 0, 0, 608, 610, 3, 86, 43, 0, 609, 607, 1, 0, 0, 394 0, 610, 613, 1, 0, 0, 0, 611, 609, 1, 0, 0, 0, 611, 612, 1, 0, 0, 0, 612, 395 615, 1, 0, 0, 0, 613, 611, 1, 0, 0, 0, 614, 600, 1, 0, 0, 0, 614, 604, 396 1, 0, 0, 0, 614, 606, 1, 0, 0, 0, 615, 616, 1, 0, 0, 0, 616, 617, 5, 4, 397 0, 0, 617, 85, 1, 0, 0, 0, 618, 621, 3, 88, 44, 0, 619, 621, 3, 90, 45, 398 0, 620, 618, 1, 0, 0, 0, 620, 619, 1, 0, 0, 0, 621, 87, 1, 0, 0, 0, 622, 399 624, 5, 41, 0, 0, 623, 622, 1, 0, 0, 0, 624, 627, 1, 0, 0, 0, 625, 623, 400 1, 0, 0, 0, 625, 626, 1, 0, 0, 0, 626, 628, 1, 0, 0, 0, 627, 625, 1, 0, 401 0, 0, 628, 630, 5, 36, 0, 0, 629, 631, 3, 52, 26, 0, 630, 629, 1, 0, 0, 402 0, 630, 631, 1, 0, 0, 0, 631, 635, 1, 0, 0, 0, 632, 634, 5, 41, 0, 0, 633, 403 632, 1, 0, 0, 0, 634, 637, 1, 0, 0, 0, 635, 633, 1, 0, 0, 0, 635, 636, 404 1, 0, 0, 0, 636, 89, 1, 0, 0, 0, 637, 635, 1, 0, 0, 0, 638, 640, 5, 41, 405 0, 0, 639, 638, 1, 0, 0, 0, 640, 643, 1, 0, 0, 0, 641, 639, 1, 0, 0, 0, 406 641, 642, 1, 0, 0, 0, 642, 644, 1, 0, 0, 0, 643, 641, 1, 0, 0, 0, 644, 407 645, 5, 19, 0, 0, 645, 646, 5, 36, 0, 0, 646, 648, 5, 20, 0, 0, 647, 649, 408 3, 52, 26, 0, 648, 647, 1, 0, 0, 0, 648, 649, 1, 0, 0, 0, 649, 653, 1, 409 0, 0, 0, 650, 652, 5, 41, 0, 0, 651, 650, 1, 0, 0, 0, 652, 655, 1, 0, 0, 410 0, 653, 651, 1, 0, 0, 0, 653, 654, 1, 0, 0, 0, 654, 91, 1, 0, 0, 0, 655, 411 653, 1, 0, 0, 0, 656, 659, 3, 94, 47, 0, 657, 659, 3, 96, 48, 0, 658, 656, 412 1, 0, 0, 0, 658, 657, 1, 0, 0, 0, 659, 93, 1, 0, 0, 0, 660, 662, 5, 35, 413 0, 0, 661, 660, 1, 0, 0, 0, 661, 662, 1, 0, 0, 0, 662, 663, 1, 0, 0, 0, 414 663, 664, 5, 21, 0, 0, 664, 665, 3, 98, 49, 0, 665, 95, 1, 0, 0, 0, 666, 415 670, 5, 21, 0, 0, 667, 669, 5, 41, 0, 0, 668, 667, 1, 0, 0, 0, 669, 672, 416 1, 0, 0, 0, 670, 668, 1, 0, 0, 0, 670, 671, 1, 0, 0, 0, 671, 673, 1, 0, 417 0, 0, 672, 670, 1, 0, 0, 0, 673, 677, 5, 6, 0, 0, 674, 676, 5, 41, 0, 0, 418 675, 674, 1, 0, 0, 0, 676, 679, 1, 0, 0, 0, 677, 675, 1, 0, 0, 0, 677, 419 678, 1, 0, 0, 0, 678, 686, 1, 0, 0, 0, 679, 677, 1, 0, 0, 0, 680, 682, 420 5, 35, 0, 0, 681, 680, 1, 0, 0, 0, 681, 682, 1, 0, 0, 0, 682, 683, 1, 0, 421 0, 0, 683, 685, 3, 98, 49, 0, 684, 681, 1, 0, 0, 0, 685, 688, 1, 0, 0, 422 0, 686, 684, 1, 0, 0, 0, 686, 687, 1, 0, 0, 0, 687, 689, 1, 0, 0, 0, 688, 423 686, 1, 0, 0, 0, 689, 690, 5, 7, 0, 0, 690, 97, 1, 0, 0, 0, 691, 692, 5, 424 36, 0, 0, 692, 693, 3, 52, 26, 0, 693, 696, 5, 22, 0, 0, 694, 697, 3, 28, 425 14, 0, 695, 697, 3, 100, 50, 0, 696, 694, 1, 0, 0, 0, 696, 695, 1, 0, 0, 426 0, 697, 701, 1, 0, 0, 0, 698, 700, 5, 41, 0, 0, 699, 698, 1, 0, 0, 0, 700, 427 703, 1, 0, 0, 0, 701, 699, 1, 0, 0, 0, 701, 702, 1, 0, 0, 0, 702, 99, 1, 428 0, 0, 0, 703, 701, 1, 0, 0, 0, 704, 719, 3, 104, 52, 0, 705, 719, 3, 106, 429 53, 0, 706, 708, 5, 38, 0, 0, 707, 706, 1, 0, 0, 0, 707, 708, 1, 0, 0, 430 0, 708, 709, 1, 0, 0, 0, 709, 719, 5, 37, 0, 0, 710, 712, 5, 38, 0, 0, 431 711, 710, 1, 0, 0, 0, 711, 712, 1, 0, 0, 0, 712, 713, 1, 0, 0, 0, 713, 432 719, 5, 39, 0, 0, 714, 719, 5, 40, 0, 0, 715, 719, 3, 108, 54, 0, 716, 433 719, 3, 110, 55, 0, 717, 719, 3, 116, 58, 0, 718, 704, 1, 0, 0, 0, 718, 434 705, 1, 0, 0, 0, 718, 707, 1, 0, 0, 0, 718, 711, 1, 0, 0, 0, 718, 714, 435 1, 0, 0, 0, 718, 715, 1, 0, 0, 0, 718, 716, 1, 0, 0, 0, 718, 717, 1, 0, 436 0, 0, 719, 101, 1, 0, 0, 0, 720, 733, 3, 104, 52, 0, 721, 733, 3, 106, 437 53, 0, 722, 724, 5, 38, 0, 0, 723, 722, 1, 0, 0, 0, 723, 724, 1, 0, 0, 438 0, 724, 725, 1, 0, 0, 0, 725, 733, 5, 37, 0, 0, 726, 728, 5, 38, 0, 0, 439 727, 726, 1, 0, 0, 0, 727, 728, 1, 0, 0, 0, 728, 729, 1, 0, 0, 0, 729, 440 733, 5, 39, 0, 0, 730, 733, 5, 40, 0, 0, 731, 733, 3, 108, 54, 0, 732, 441 720, 1, 0, 0, 0, 732, 721, 1, 0, 0, 0, 732, 723, 1, 0, 0, 0, 732, 727, 442 1, 0, 0, 0, 732, 730, 1, 0, 0, 0, 732, 731, 1, 0, 0, 0, 733, 103, 1, 0, 443 0, 0, 734, 735, 5, 23, 0, 0, 735, 105, 1, 0, 0, 0, 736, 737, 7, 1, 0, 0, 444 737, 107, 1, 0, 0, 0, 738, 739, 3, 28, 14, 0, 739, 740, 5, 26, 0, 0, 740, 445 741, 5, 36, 0, 0, 741, 109, 1, 0, 0, 0, 742, 746, 5, 19, 0, 0, 743, 745, 446 5, 41, 0, 0, 744, 743, 1, 0, 0, 0, 745, 748, 1, 0, 0, 0, 746, 744, 1, 0, 447 0, 0, 746, 747, 1, 0, 0, 0, 747, 750, 1, 0, 0, 0, 748, 746, 1, 0, 0, 0, 448 749, 751, 3, 112, 56, 0, 750, 749, 1, 0, 0, 0, 750, 751, 1, 0, 0, 0, 751, 449 752, 1, 0, 0, 0, 752, 753, 5, 20, 0, 0, 753, 111, 1, 0, 0, 0, 754, 776, 450 3, 114, 57, 0, 755, 772, 3, 114, 57, 0, 756, 760, 5, 3, 0, 0, 757, 759, 451 5, 41, 0, 0, 758, 757, 1, 0, 0, 0, 759, 762, 1, 0, 0, 0, 760, 758, 1, 0, 452 0, 0, 760, 761, 1, 0, 0, 0, 761, 763, 1, 0, 0, 0, 762, 760, 1, 0, 0, 0, 453 763, 767, 3, 114, 57, 0, 764, 766, 5, 41, 0, 0, 765, 764, 1, 0, 0, 0, 766, 454 769, 1, 0, 0, 0, 767, 765, 1, 0, 0, 0, 767, 768, 1, 0, 0, 0, 768, 771, 455 1, 0, 0, 0, 769, 767, 1, 0, 0, 0, 770, 756, 1, 0, 0, 0, 771, 774, 1, 0, 456 0, 0, 772, 770, 1, 0, 0, 0, 772, 773, 1, 0, 0, 0, 773, 776, 1, 0, 0, 0, 457 774, 772, 1, 0, 0, 0, 775, 754, 1, 0, 0, 0, 775, 755, 1, 0, 0, 0, 776, 458 113, 1, 0, 0, 0, 777, 780, 3, 28, 14, 0, 778, 780, 3, 100, 50, 0, 779, 459 777, 1, 0, 0, 0, 779, 778, 1, 0, 0, 0, 780, 115, 1, 0, 0, 0, 781, 785, 460 5, 6, 0, 0, 782, 784, 5, 41, 0, 0, 783, 782, 1, 0, 0, 0, 784, 787, 1, 0, 461 0, 0, 785, 783, 1, 0, 0, 0, 785, 786, 1, 0, 0, 0, 786, 789, 1, 0, 0, 0, 462 787, 785, 1, 0, 0, 0, 788, 790, 3, 118, 59, 0, 789, 788, 1, 0, 0, 0, 789, 463 790, 1, 0, 0, 0, 790, 791, 1, 0, 0, 0, 791, 792, 5, 7, 0, 0, 792, 117, 464 1, 0, 0, 0, 793, 804, 3, 120, 60, 0, 794, 798, 5, 3, 0, 0, 795, 797, 5, 465 41, 0, 0, 796, 795, 1, 0, 0, 0, 797, 800, 1, 0, 0, 0, 798, 796, 1, 0, 0, 466 0, 798, 799, 1, 0, 0, 0, 799, 801, 1, 0, 0, 0, 800, 798, 1, 0, 0, 0, 801, 467 803, 3, 120, 60, 0, 802, 794, 1, 0, 0, 0, 803, 806, 1, 0, 0, 0, 804, 802, 468 1, 0, 0, 0, 804, 805, 1, 0, 0, 0, 805, 119, 1, 0, 0, 0, 806, 804, 1, 0, 469 0, 0, 807, 808, 5, 36, 0, 0, 808, 809, 5, 8, 0, 0, 809, 813, 3, 114, 57, 470 0, 810, 812, 5, 41, 0, 0, 811, 810, 1, 0, 0, 0, 812, 815, 1, 0, 0, 0, 813, 471 811, 1, 0, 0, 0, 813, 814, 1, 0, 0, 0, 814, 121, 1, 0, 0, 0, 815, 813, 472 1, 0, 0, 0, 816, 819, 3, 124, 62, 0, 817, 819, 3, 126, 63, 0, 818, 816, 473 1, 0, 0, 0, 818, 817, 1, 0, 0, 0, 819, 123, 1, 0, 0, 0, 820, 822, 3, 4, 474 2, 0, 821, 820, 1, 0, 0, 0, 821, 822, 1, 0, 0, 0, 822, 824, 1, 0, 0, 0, 475 823, 825, 5, 35, 0, 0, 824, 823, 1, 0, 0, 0, 824, 825, 1, 0, 0, 0, 825, 476 826, 1, 0, 0, 0, 826, 827, 5, 27, 0, 0, 827, 828, 3, 128, 64, 0, 828, 125, 477 1, 0, 0, 0, 829, 833, 5, 27, 0, 0, 830, 832, 5, 41, 0, 0, 831, 830, 1, 478 0, 0, 0, 832, 835, 1, 0, 0, 0, 833, 831, 1, 0, 0, 0, 833, 834, 1, 0, 0, 479 0, 834, 836, 1, 0, 0, 0, 835, 833, 1, 0, 0, 0, 836, 840, 5, 6, 0, 0, 837, 480 839, 5, 41, 0, 0, 838, 837, 1, 0, 0, 0, 839, 842, 1, 0, 0, 0, 840, 838, 481 1, 0, 0, 0, 840, 841, 1, 0, 0, 0, 841, 864, 1, 0, 0, 0, 842, 840, 1, 0, 482 0, 0, 843, 847, 5, 34, 0, 0, 844, 846, 5, 41, 0, 0, 845, 844, 1, 0, 0, 483 0, 846, 849, 1, 0, 0, 0, 847, 845, 1, 0, 0, 0, 847, 848, 1, 0, 0, 0, 848, 484 851, 1, 0, 0, 0, 849, 847, 1, 0, 0, 0, 850, 843, 1, 0, 0, 0, 851, 854, 485 1, 0, 0, 0, 852, 850, 1, 0, 0, 0, 852, 853, 1, 0, 0, 0, 853, 856, 1, 0, 486 0, 0, 854, 852, 1, 0, 0, 0, 855, 857, 3, 4, 2, 0, 856, 855, 1, 0, 0, 0, 487 856, 857, 1, 0, 0, 0, 857, 859, 1, 0, 0, 0, 858, 860, 5, 35, 0, 0, 859, 488 858, 1, 0, 0, 0, 859, 860, 1, 0, 0, 0, 860, 861, 1, 0, 0, 0, 861, 863, 489 3, 128, 64, 0, 862, 852, 1, 0, 0, 0, 863, 866, 1, 0, 0, 0, 864, 862, 1, 490 0, 0, 0, 864, 865, 1, 0, 0, 0, 865, 867, 1, 0, 0, 0, 866, 864, 1, 0, 0, 491 0, 867, 868, 5, 7, 0, 0, 868, 127, 1, 0, 0, 0, 869, 871, 3, 78, 39, 0, 492 870, 872, 3, 130, 65, 0, 871, 870, 1, 0, 0, 0, 871, 872, 1, 0, 0, 0, 872, 493 876, 1, 0, 0, 0, 873, 875, 5, 41, 0, 0, 874, 873, 1, 0, 0, 0, 875, 878, 494 1, 0, 0, 0, 876, 874, 1, 0, 0, 0, 876, 877, 1, 0, 0, 0, 877, 129, 1, 0, 495 0, 0, 878, 876, 1, 0, 0, 0, 879, 883, 5, 6, 0, 0, 880, 882, 5, 41, 0, 0, 496 881, 880, 1, 0, 0, 0, 882, 885, 1, 0, 0, 0, 883, 881, 1, 0, 0, 0, 883, 497 884, 1, 0, 0, 0, 884, 895, 1, 0, 0, 0, 885, 883, 1, 0, 0, 0, 886, 890, 498 5, 34, 0, 0, 887, 889, 5, 41, 0, 0, 888, 887, 1, 0, 0, 0, 889, 892, 1, 499 0, 0, 0, 890, 888, 1, 0, 0, 0, 890, 891, 1, 0, 0, 0, 891, 894, 1, 0, 0, 500 0, 892, 890, 1, 0, 0, 0, 893, 886, 1, 0, 0, 0, 894, 897, 1, 0, 0, 0, 895, 501 893, 1, 0, 0, 0, 895, 896, 1, 0, 0, 0, 896, 905, 1, 0, 0, 0, 897, 895, 502 1, 0, 0, 0, 898, 902, 3, 132, 66, 0, 899, 901, 5, 41, 0, 0, 900, 899, 1, 503 0, 0, 0, 901, 904, 1, 0, 0, 0, 902, 900, 1, 0, 0, 0, 902, 903, 1, 0, 0, 504 0, 903, 906, 1, 0, 0, 0, 904, 902, 1, 0, 0, 0, 905, 898, 1, 0, 0, 0, 905, 505 906, 1, 0, 0, 0, 906, 916, 1, 0, 0, 0, 907, 911, 5, 34, 0, 0, 908, 910, 506 5, 41, 0, 0, 909, 908, 1, 0, 0, 0, 910, 913, 1, 0, 0, 0, 911, 909, 1, 0, 507 0, 0, 911, 912, 1, 0, 0, 0, 912, 915, 1, 0, 0, 0, 913, 911, 1, 0, 0, 0, 508 914, 907, 1, 0, 0, 0, 915, 918, 1, 0, 0, 0, 916, 914, 1, 0, 0, 0, 916, 509 917, 1, 0, 0, 0, 917, 926, 1, 0, 0, 0, 918, 916, 1, 0, 0, 0, 919, 923, 510 3, 148, 74, 0, 920, 922, 5, 41, 0, 0, 921, 920, 1, 0, 0, 0, 922, 925, 1, 511 0, 0, 0, 923, 921, 1, 0, 0, 0, 923, 924, 1, 0, 0, 0, 924, 927, 1, 0, 0, 512 0, 925, 923, 1, 0, 0, 0, 926, 919, 1, 0, 0, 0, 926, 927, 1, 0, 0, 0, 927, 513 937, 1, 0, 0, 0, 928, 932, 5, 34, 0, 0, 929, 931, 5, 41, 0, 0, 930, 929, 514 1, 0, 0, 0, 931, 934, 1, 0, 0, 0, 932, 930, 1, 0, 0, 0, 932, 933, 1, 0, 515 0, 0, 933, 936, 1, 0, 0, 0, 934, 932, 1, 0, 0, 0, 935, 928, 1, 0, 0, 0, 516 936, 939, 1, 0, 0, 0, 937, 935, 1, 0, 0, 0, 937, 938, 1, 0, 0, 0, 938, 517 940, 1, 0, 0, 0, 939, 937, 1, 0, 0, 0, 940, 941, 5, 7, 0, 0, 941, 131, 518 1, 0, 0, 0, 942, 946, 5, 28, 0, 0, 943, 945, 5, 41, 0, 0, 944, 943, 1, 519 0, 0, 0, 945, 948, 1, 0, 0, 0, 946, 944, 1, 0, 0, 0, 946, 947, 1, 0, 0, 520 0, 947, 949, 1, 0, 0, 0, 948, 946, 1, 0, 0, 0, 949, 950, 3, 134, 67, 0, 521 950, 133, 1, 0, 0, 0, 951, 955, 5, 6, 0, 0, 952, 954, 5, 41, 0, 0, 953, 522 952, 1, 0, 0, 0, 954, 957, 1, 0, 0, 0, 955, 953, 1, 0, 0, 0, 955, 956, 523 1, 0, 0, 0, 956, 973, 1, 0, 0, 0, 957, 955, 1, 0, 0, 0, 958, 961, 3, 136, 524 68, 0, 959, 961, 5, 34, 0, 0, 960, 958, 1, 0, 0, 0, 960, 959, 1, 0, 0, 525 0, 961, 963, 1, 0, 0, 0, 962, 964, 5, 3, 0, 0, 963, 962, 1, 0, 0, 0, 963, 526 964, 1, 0, 0, 0, 964, 968, 1, 0, 0, 0, 965, 967, 5, 41, 0, 0, 966, 965, 527 1, 0, 0, 0, 967, 970, 1, 0, 0, 0, 968, 966, 1, 0, 0, 0, 968, 969, 1, 0, 528 0, 0, 969, 972, 1, 0, 0, 0, 970, 968, 1, 0, 0, 0, 971, 960, 1, 0, 0, 0, 529 972, 975, 1, 0, 0, 0, 973, 971, 1, 0, 0, 0, 973, 974, 1, 0, 0, 0, 974, 530 976, 1, 0, 0, 0, 975, 973, 1, 0, 0, 0, 976, 977, 5, 7, 0, 0, 977, 135, 531 1, 0, 0, 0, 978, 980, 3, 4, 2, 0, 979, 978, 1, 0, 0, 0, 979, 980, 1, 0, 532 0, 0, 980, 982, 1, 0, 0, 0, 981, 983, 5, 36, 0, 0, 982, 981, 1, 0, 0, 0, 533 982, 983, 1, 0, 0, 0, 983, 984, 1, 0, 0, 0, 984, 985, 3, 138, 69, 0, 985, 534 137, 1, 0, 0, 0, 986, 990, 3, 28, 14, 0, 987, 989, 5, 41, 0, 0, 988, 987, 535 1, 0, 0, 0, 989, 992, 1, 0, 0, 0, 990, 988, 1, 0, 0, 0, 990, 991, 1, 0, 536 0, 0, 991, 994, 1, 0, 0, 0, 992, 990, 1, 0, 0, 0, 993, 995, 3, 56, 28, 537 0, 994, 993, 1, 0, 0, 0, 994, 995, 1, 0, 0, 0, 995, 997, 1, 0, 0, 0, 996, 538 998, 3, 140, 70, 0, 997, 996, 1, 0, 0, 0, 997, 998, 1, 0, 0, 0, 998, 1002, 539 1, 0, 0, 0, 999, 1001, 5, 41, 0, 0, 1000, 999, 1, 0, 0, 0, 1001, 1004, 540 1, 0, 0, 0, 1002, 1000, 1, 0, 0, 0, 1002, 1003, 1, 0, 0, 0, 1003, 1006, 541 1, 0, 0, 0, 1004, 1002, 1, 0, 0, 0, 1005, 1007, 3, 142, 71, 0, 1006, 1005, 542 1, 0, 0, 0, 1006, 1007, 1, 0, 0, 0, 1007, 139, 1, 0, 0, 0, 1008, 1009, 543 5, 29, 0, 0, 1009, 141, 1, 0, 0, 0, 1010, 1011, 3, 134, 67, 0, 1011, 143, 544 1, 0, 0, 0, 1012, 1016, 5, 30, 0, 0, 1013, 1015, 5, 41, 0, 0, 1014, 1013, 545 1, 0, 0, 0, 1015, 1018, 1, 0, 0, 0, 1016, 1014, 1, 0, 0, 0, 1016, 1017, 546 1, 0, 0, 0, 1017, 1019, 1, 0, 0, 0, 1018, 1016, 1, 0, 0, 0, 1019, 1020, 547 3, 146, 73, 0, 1020, 145, 1, 0, 0, 0, 1021, 1025, 5, 6, 0, 0, 1022, 1024, 548 5, 41, 0, 0, 1023, 1022, 1, 0, 0, 0, 1024, 1027, 1, 0, 0, 0, 1025, 1023, 549 1, 0, 0, 0, 1025, 1026, 1, 0, 0, 0, 1026, 1029, 1, 0, 0, 0, 1027, 1025, 550 1, 0, 0, 0, 1028, 1030, 3, 148, 74, 0, 1029, 1028, 1, 0, 0, 0, 1029, 1030, 551 1, 0, 0, 0, 1030, 1034, 1, 0, 0, 0, 1031, 1033, 5, 41, 0, 0, 1032, 1031, 552 1, 0, 0, 0, 1033, 1036, 1, 0, 0, 0, 1034, 1032, 1, 0, 0, 0, 1034, 1035, 553 1, 0, 0, 0, 1035, 1037, 1, 0, 0, 0, 1036, 1034, 1, 0, 0, 0, 1037, 1038, 554 5, 7, 0, 0, 1038, 147, 1, 0, 0, 0, 1039, 1042, 3, 150, 75, 0, 1040, 1042, 555 5, 34, 0, 0, 1041, 1039, 1, 0, 0, 0, 1041, 1040, 1, 0, 0, 0, 1042, 1055, 556 1, 0, 0, 0, 1043, 1045, 5, 41, 0, 0, 1044, 1043, 1, 0, 0, 0, 1045, 1048, 557 1, 0, 0, 0, 1046, 1044, 1, 0, 0, 0, 1046, 1047, 1, 0, 0, 0, 1047, 1051, 558 1, 0, 0, 0, 1048, 1046, 1, 0, 0, 0, 1049, 1052, 3, 150, 75, 0, 1050, 1052, 559 5, 34, 0, 0, 1051, 1049, 1, 0, 0, 0, 1051, 1050, 1, 0, 0, 0, 1052, 1054, 560 1, 0, 0, 0, 1053, 1046, 1, 0, 0, 0, 1054, 1057, 1, 0, 0, 0, 1055, 1053, 561 1, 0, 0, 0, 1055, 1056, 1, 0, 0, 0, 1056, 149, 1, 0, 0, 0, 1057, 1055, 562 1, 0, 0, 0, 1058, 1061, 3, 152, 76, 0, 1059, 1061, 3, 158, 79, 0, 1060, 563 1058, 1, 0, 0, 0, 1060, 1059, 1, 0, 0, 0, 1061, 151, 1, 0, 0, 0, 1062, 564 1063, 3, 154, 77, 0, 1063, 1064, 5, 31, 0, 0, 1064, 1065, 3, 162, 81, 0, 565 1065, 153, 1, 0, 0, 0, 1066, 1069, 3, 160, 80, 0, 1067, 1069, 3, 156, 78, 566 0, 1068, 1066, 1, 0, 0, 0, 1068, 1067, 1, 0, 0, 0, 1069, 155, 1, 0, 0, 567 0, 1070, 1074, 5, 19, 0, 0, 1071, 1073, 5, 41, 0, 0, 1072, 1071, 1, 0, 568 0, 0, 1073, 1076, 1, 0, 0, 0, 1074, 1072, 1, 0, 0, 0, 1074, 1075, 1, 0, 569 0, 0, 1075, 1077, 1, 0, 0, 0, 1076, 1074, 1, 0, 0, 0, 1077, 1094, 3, 160, 570 80, 0, 1078, 1082, 5, 3, 0, 0, 1079, 1081, 5, 41, 0, 0, 1080, 1079, 1, 571 0, 0, 0, 1081, 1084, 1, 0, 0, 0, 1082, 1080, 1, 0, 0, 0, 1082, 1083, 1, 572 0, 0, 0, 1083, 1085, 1, 0, 0, 0, 1084, 1082, 1, 0, 0, 0, 1085, 1089, 3, 573 160, 80, 0, 1086, 1088, 5, 41, 0, 0, 1087, 1086, 1, 0, 0, 0, 1088, 1091, 574 1, 0, 0, 0, 1089, 1087, 1, 0, 0, 0, 1089, 1090, 1, 0, 0, 0, 1090, 1093, 575 1, 0, 0, 0, 1091, 1089, 1, 0, 0, 0, 1092, 1078, 1, 0, 0, 0, 1093, 1096, 576 1, 0, 0, 0, 1094, 1092, 1, 0, 0, 0, 1094, 1095, 1, 0, 0, 0, 1095, 1097, 577 1, 0, 0, 0, 1096, 1094, 1, 0, 0, 0, 1097, 1098, 5, 20, 0, 0, 1098, 157, 578 1, 0, 0, 0, 1099, 1100, 3, 176, 88, 0, 1100, 1101, 5, 32, 0, 0, 1101, 1102, 579 3, 176, 88, 0, 1102, 159, 1, 0, 0, 0, 1103, 1107, 3, 170, 85, 0, 1104, 580 1107, 3, 168, 84, 0, 1105, 1107, 3, 102, 51, 0, 1106, 1103, 1, 0, 0, 0, 581 1106, 1104, 1, 0, 0, 0, 1106, 1105, 1, 0, 0, 0, 1107, 1109, 1, 0, 0, 0, 582 1108, 1110, 3, 186, 93, 0, 1109, 1108, 1, 0, 0, 0, 1109, 1110, 1, 0, 0, 583 0, 1110, 161, 1, 0, 0, 0, 1111, 1115, 3, 164, 82, 0, 1112, 1115, 3, 188, 584 94, 0, 1113, 1115, 3, 190, 95, 0, 1114, 1111, 1, 0, 0, 0, 1114, 1112, 1, 585 0, 0, 0, 1114, 1113, 1, 0, 0, 0, 1115, 163, 1, 0, 0, 0, 1116, 1117, 3, 586 152, 76, 0, 1117, 165, 1, 0, 0, 0, 1118, 1122, 5, 2, 0, 0, 1119, 1121, 587 5, 41, 0, 0, 1120, 1119, 1, 0, 0, 0, 1121, 1124, 1, 0, 0, 0, 1122, 1120, 588 1, 0, 0, 0, 1122, 1123, 1, 0, 0, 0, 1123, 1125, 1, 0, 0, 0, 1124, 1122, 589 1, 0, 0, 0, 1125, 1129, 3, 150, 75, 0, 1126, 1128, 5, 41, 0, 0, 1127, 1126, 590 1, 0, 0, 0, 1128, 1131, 1, 0, 0, 0, 1129, 1127, 1, 0, 0, 0, 1129, 1130, 591 1, 0, 0, 0, 1130, 1132, 1, 0, 0, 0, 1131, 1129, 1, 0, 0, 0, 1132, 1133, 592 5, 4, 0, 0, 1133, 167, 1, 0, 0, 0, 1134, 1135, 5, 33, 0, 0, 1135, 1136, 593 3, 28, 14, 0, 1136, 169, 1, 0, 0, 0, 1137, 1142, 3, 176, 88, 0, 1138, 1142, 594 3, 178, 89, 0, 1139, 1142, 3, 172, 86, 0, 1140, 1142, 3, 174, 87, 0, 1141, 595 1137, 1, 0, 0, 0, 1141, 1138, 1, 0, 0, 0, 1141, 1139, 1, 0, 0, 0, 1141, 596 1140, 1, 0, 0, 0, 1142, 171, 1, 0, 0, 0, 1143, 1144, 3, 180, 90, 0, 1144, 597 173, 1, 0, 0, 0, 1145, 1146, 3, 180, 90, 0, 1146, 1147, 3, 184, 92, 0, 598 1147, 175, 1, 0, 0, 0, 1148, 1150, 3, 180, 90, 0, 1149, 1148, 1, 0, 0, 599 0, 1149, 1150, 1, 0, 0, 0, 1150, 1151, 1, 0, 0, 0, 1151, 1152, 5, 8, 0, 600 0, 1152, 1153, 3, 182, 91, 0, 1153, 177, 1, 0, 0, 0, 1154, 1156, 3, 180, 601 90, 0, 1155, 1154, 1, 0, 0, 0, 1155, 1156, 1, 0, 0, 0, 1156, 1157, 1, 0, 602 0, 0, 1157, 1158, 5, 8, 0, 0, 1158, 1159, 3, 182, 91, 0, 1159, 1160, 3, 603 184, 92, 0, 1160, 179, 1, 0, 0, 0, 1161, 1162, 5, 36, 0, 0, 1162, 181, 604 1, 0, 0, 0, 1163, 1164, 5, 36, 0, 0, 1164, 183, 1, 0, 0, 0, 1165, 1166, 605 5, 19, 0, 0, 1166, 1167, 5, 37, 0, 0, 1167, 1168, 5, 20, 0, 0, 1168, 185, 606 1, 0, 0, 0, 1169, 1170, 5, 11, 0, 0, 1170, 1175, 5, 36, 0, 0, 1171, 1172, 607 5, 11, 0, 0, 1172, 1174, 5, 36, 0, 0, 1173, 1171, 1, 0, 0, 0, 1174, 1177, 608 1, 0, 0, 0, 1175, 1173, 1, 0, 0, 0, 1175, 1176, 1, 0, 0, 0, 1176, 187, 609 1, 0, 0, 0, 1177, 1175, 1, 0, 0, 0, 1178, 1181, 3, 170, 85, 0, 1179, 1181, 610 3, 166, 83, 0, 1180, 1178, 1, 0, 0, 0, 1180, 1179, 1, 0, 0, 0, 1181, 189, 611 1, 0, 0, 0, 1182, 1186, 5, 19, 0, 0, 1183, 1185, 5, 41, 0, 0, 1184, 1183, 612 1, 0, 0, 0, 1185, 1188, 1, 0, 0, 0, 1186, 1184, 1, 0, 0, 0, 1186, 1187, 613 1, 0, 0, 0, 1187, 1189, 1, 0, 0, 0, 1188, 1186, 1, 0, 0, 0, 1189, 1206, 614 3, 188, 94, 0, 1190, 1194, 5, 3, 0, 0, 1191, 1193, 5, 41, 0, 0, 1192, 1191, 615 1, 0, 0, 0, 1193, 1196, 1, 0, 0, 0, 1194, 1192, 1, 0, 0, 0, 1194, 1195, 616 1, 0, 0, 0, 1195, 1197, 1, 0, 0, 0, 1196, 1194, 1, 0, 0, 0, 1197, 1201, 617 3, 188, 94, 0, 1198, 1200, 5, 41, 0, 0, 1199, 1198, 1, 0, 0, 0, 1200, 1203, 618 1, 0, 0, 0, 1201, 1199, 1, 0, 0, 0, 1201, 1202, 1, 0, 0, 0, 1202, 1205, 619 1, 0, 0, 0, 1203, 1201, 1, 0, 0, 0, 1204, 1190, 1, 0, 0, 0, 1205, 1208, 620 1, 0, 0, 0, 1206, 1204, 1, 0, 0, 0, 1206, 1207, 1, 0, 0, 0, 1207, 1209, 621 1, 0, 0, 0, 1208, 1206, 1, 0, 0, 0, 1209, 1210, 5, 20, 0, 0, 1210, 191, 622 1, 0, 0, 0, 165, 195, 197, 207, 214, 219, 227, 235, 241, 248, 254, 260, 623 264, 269, 277, 283, 291, 301, 306, 320, 323, 332, 339, 343, 349, 354, 361, 624 364, 367, 373, 377, 386, 392, 397, 402, 408, 412, 418, 426, 432, 438, 445, 625 451, 458, 466, 472, 478, 487, 494, 498, 506, 511, 519, 526, 533, 539, 543, 626 547, 550, 559, 566, 570, 575, 582, 589, 600, 604, 611, 614, 620, 625, 630, 627 635, 641, 648, 653, 658, 661, 670, 677, 681, 686, 696, 701, 707, 711, 718, 628 723, 727, 732, 746, 750, 760, 767, 772, 775, 779, 785, 789, 798, 804, 813, 629 818, 821, 824, 833, 840, 847, 852, 856, 859, 864, 871, 876, 883, 890, 895, 630 902, 905, 911, 916, 923, 926, 932, 937, 946, 955, 960, 963, 968, 973, 979, 631 982, 990, 994, 997, 1002, 1006, 1016, 1025, 1029, 1034, 1041, 1046, 1051, 632 1055, 1060, 1068, 1074, 1082, 1089, 1094, 1106, 1109, 1114, 1122, 1129, 633 1141, 1149, 1155, 1175, 1180, 1186, 1194, 1201, 1206, 634 } 635 deserializer := antlr.NewATNDeserializer(nil) 636 staticData.atn = deserializer.Deserialize(staticData.serializedATN) 637 atn := staticData.atn 638 staticData.decisionToDFA = make([]*antlr.DFA, len(atn.DecisionToState)) 639 decisionToDFA := staticData.decisionToDFA 640 for index, state := range atn.DecisionToState { 641 decisionToDFA[index] = antlr.NewDFA(state, index) 642 } 643 } 644 645 // nevaParserInit initializes any static state used to implement nevaParser. By default the 646 // static state used to implement the parser is lazily initialized during the first call to 647 // NewnevaParser(). You can call this function if you wish to initialize the static state ahead 648 // of time. 649 func NevaParserInit() { 650 staticData := &NevaParserStaticData 651 staticData.once.Do(nevaParserInit) 652 } 653 654 // NewnevaParser produces a new parser instance for the optional input antlr.TokenStream. 655 func NewnevaParser(input antlr.TokenStream) *nevaParser { 656 NevaParserInit() 657 this := new(nevaParser) 658 this.BaseParser = antlr.NewBaseParser(input) 659 staticData := &NevaParserStaticData 660 this.Interpreter = antlr.NewParserATNSimulator(this, staticData.atn, staticData.decisionToDFA, staticData.PredictionContextCache) 661 this.RuleNames = staticData.RuleNames 662 this.LiteralNames = staticData.LiteralNames 663 this.SymbolicNames = staticData.SymbolicNames 664 this.GrammarFileName = "neva.g4" 665 666 return this 667 } 668 669 // nevaParser tokens. 670 const ( 671 nevaParserEOF = antlr.TokenEOF 672 nevaParserT__0 = 1 673 nevaParserT__1 = 2 674 nevaParserT__2 = 3 675 nevaParserT__3 = 4 676 nevaParserT__4 = 5 677 nevaParserT__5 = 6 678 nevaParserT__6 = 7 679 nevaParserT__7 = 8 680 nevaParserT__8 = 9 681 nevaParserT__9 = 10 682 nevaParserT__10 = 11 683 nevaParserT__11 = 12 684 nevaParserT__12 = 13 685 nevaParserT__13 = 14 686 nevaParserT__14 = 15 687 nevaParserT__15 = 16 688 nevaParserT__16 = 17 689 nevaParserT__17 = 18 690 nevaParserT__18 = 19 691 nevaParserT__19 = 20 692 nevaParserT__20 = 21 693 nevaParserT__21 = 22 694 nevaParserT__22 = 23 695 nevaParserT__23 = 24 696 nevaParserT__24 = 25 697 nevaParserT__25 = 26 698 nevaParserT__26 = 27 699 nevaParserT__27 = 28 700 nevaParserT__28 = 29 701 nevaParserT__29 = 30 702 nevaParserT__30 = 31 703 nevaParserT__31 = 32 704 nevaParserT__32 = 33 705 nevaParserCOMMENT = 34 706 nevaParserPUB_KW = 35 707 nevaParserIDENTIFIER = 36 708 nevaParserINT = 37 709 nevaParserMINUS = 38 710 nevaParserFLOAT = 39 711 nevaParserSTRING = 40 712 nevaParserNEWLINE = 41 713 nevaParserWS = 42 714 ) 715 716 // nevaParser rules. 717 const ( 718 nevaParserRULE_prog = 0 719 nevaParserRULE_stmt = 1 720 nevaParserRULE_compilerDirectives = 2 721 nevaParserRULE_compilerDirective = 3 722 nevaParserRULE_compilerDirectivesArgs = 4 723 nevaParserRULE_compiler_directive_arg = 5 724 nevaParserRULE_importStmt = 6 725 nevaParserRULE_importDef = 7 726 nevaParserRULE_importAlias = 8 727 nevaParserRULE_importPath = 9 728 nevaParserRULE_importPathMod = 10 729 nevaParserRULE_importMod = 11 730 nevaParserRULE_importModeDelim = 12 731 nevaParserRULE_importPathPkg = 13 732 nevaParserRULE_entityRef = 14 733 nevaParserRULE_localEntityRef = 15 734 nevaParserRULE_importedEntityRef = 16 735 nevaParserRULE_pkgRef = 17 736 nevaParserRULE_entityName = 18 737 nevaParserRULE_typeStmt = 19 738 nevaParserRULE_singleTypeStmt = 20 739 nevaParserRULE_groupTypeStmt = 21 740 nevaParserRULE_typeDef = 22 741 nevaParserRULE_typeParams = 23 742 nevaParserRULE_typeParamList = 24 743 nevaParserRULE_typeParam = 25 744 nevaParserRULE_typeExpr = 26 745 nevaParserRULE_typeInstExpr = 27 746 nevaParserRULE_typeArgs = 28 747 nevaParserRULE_typeLitExpr = 29 748 nevaParserRULE_enumTypeExpr = 30 749 nevaParserRULE_structTypeExpr = 31 750 nevaParserRULE_structFields = 32 751 nevaParserRULE_structField = 33 752 nevaParserRULE_unionTypeExpr = 34 753 nevaParserRULE_nonUnionTypeExpr = 35 754 nevaParserRULE_interfaceStmt = 36 755 nevaParserRULE_singleInterfaceStmt = 37 756 nevaParserRULE_groupInterfaceStmt = 38 757 nevaParserRULE_interfaceDef = 39 758 nevaParserRULE_inPortsDef = 40 759 nevaParserRULE_outPortsDef = 41 760 nevaParserRULE_portsDef = 42 761 nevaParserRULE_portDef = 43 762 nevaParserRULE_singlePortDef = 44 763 nevaParserRULE_arrayPortDef = 45 764 nevaParserRULE_constStmt = 46 765 nevaParserRULE_singleConstStmt = 47 766 nevaParserRULE_groupConstStmt = 48 767 nevaParserRULE_constDef = 49 768 nevaParserRULE_constLit = 50 769 nevaParserRULE_primitiveConstLit = 51 770 nevaParserRULE_nil = 52 771 nevaParserRULE_bool = 53 772 nevaParserRULE_enumLit = 54 773 nevaParserRULE_listLit = 55 774 nevaParserRULE_listItems = 56 775 nevaParserRULE_compositeItem = 57 776 nevaParserRULE_structLit = 58 777 nevaParserRULE_structValueFields = 59 778 nevaParserRULE_structValueField = 60 779 nevaParserRULE_compStmt = 61 780 nevaParserRULE_singleCompStmt = 62 781 nevaParserRULE_groupCompStmt = 63 782 nevaParserRULE_compDef = 64 783 nevaParserRULE_compBody = 65 784 nevaParserRULE_compNodesDef = 66 785 nevaParserRULE_compNodesDefBody = 67 786 nevaParserRULE_compNodeDef = 68 787 nevaParserRULE_nodeInst = 69 788 nevaParserRULE_errGuard = 70 789 nevaParserRULE_nodeDIArgs = 71 790 nevaParserRULE_compNetDef = 72 791 nevaParserRULE_compNetBody = 73 792 nevaParserRULE_connDefList = 74 793 nevaParserRULE_connDef = 75 794 nevaParserRULE_normConnDef = 76 795 nevaParserRULE_senderSide = 77 796 nevaParserRULE_multipleSenderSide = 78 797 nevaParserRULE_arrBypassConnDef = 79 798 nevaParserRULE_singleSenderSide = 80 799 nevaParserRULE_receiverSide = 81 800 nevaParserRULE_chainedNormConn = 82 801 nevaParserRULE_deferredConn = 83 802 nevaParserRULE_senderConstRef = 84 803 nevaParserRULE_portAddr = 85 804 nevaParserRULE_lonelySinglePortAddr = 86 805 nevaParserRULE_lonelyArrPortAddr = 87 806 nevaParserRULE_singlePortAddr = 88 807 nevaParserRULE_arrPortAddr = 89 808 nevaParserRULE_portAddrNode = 90 809 nevaParserRULE_portAddrPort = 91 810 nevaParserRULE_portAddrIdx = 92 811 nevaParserRULE_structSelectors = 93 812 nevaParserRULE_singleReceiverSide = 94 813 nevaParserRULE_multipleReceiverSide = 95 814 ) 815 816 // IProgContext is an interface to support dynamic dispatch. 817 type IProgContext interface { 818 antlr.ParserRuleContext 819 820 // GetParser returns the parser. 821 GetParser() antlr.Parser 822 823 // Getter signatures 824 EOF() antlr.TerminalNode 825 AllNEWLINE() []antlr.TerminalNode 826 NEWLINE(i int) antlr.TerminalNode 827 AllCOMMENT() []antlr.TerminalNode 828 COMMENT(i int) antlr.TerminalNode 829 AllStmt() []IStmtContext 830 Stmt(i int) IStmtContext 831 832 // IsProgContext differentiates from other interfaces. 833 IsProgContext() 834 } 835 836 type ProgContext struct { 837 antlr.BaseParserRuleContext 838 parser antlr.Parser 839 } 840 841 func NewEmptyProgContext() *ProgContext { 842 var p = new(ProgContext) 843 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 844 p.RuleIndex = nevaParserRULE_prog 845 return p 846 } 847 848 func InitEmptyProgContext(p *ProgContext) { 849 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 850 p.RuleIndex = nevaParserRULE_prog 851 } 852 853 func (*ProgContext) IsProgContext() {} 854 855 func NewProgContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ProgContext { 856 var p = new(ProgContext) 857 858 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 859 860 p.parser = parser 861 p.RuleIndex = nevaParserRULE_prog 862 863 return p 864 } 865 866 func (s *ProgContext) GetParser() antlr.Parser { return s.parser } 867 868 func (s *ProgContext) EOF() antlr.TerminalNode { 869 return s.GetToken(nevaParserEOF, 0) 870 } 871 872 func (s *ProgContext) AllNEWLINE() []antlr.TerminalNode { 873 return s.GetTokens(nevaParserNEWLINE) 874 } 875 876 func (s *ProgContext) NEWLINE(i int) antlr.TerminalNode { 877 return s.GetToken(nevaParserNEWLINE, i) 878 } 879 880 func (s *ProgContext) AllCOMMENT() []antlr.TerminalNode { 881 return s.GetTokens(nevaParserCOMMENT) 882 } 883 884 func (s *ProgContext) COMMENT(i int) antlr.TerminalNode { 885 return s.GetToken(nevaParserCOMMENT, i) 886 } 887 888 func (s *ProgContext) AllStmt() []IStmtContext { 889 children := s.GetChildren() 890 len := 0 891 for _, ctx := range children { 892 if _, ok := ctx.(IStmtContext); ok { 893 len++ 894 } 895 } 896 897 tst := make([]IStmtContext, len) 898 i := 0 899 for _, ctx := range children { 900 if t, ok := ctx.(IStmtContext); ok { 901 tst[i] = t.(IStmtContext) 902 i++ 903 } 904 } 905 906 return tst 907 } 908 909 func (s *ProgContext) Stmt(i int) IStmtContext { 910 var t antlr.RuleContext 911 j := 0 912 for _, ctx := range s.GetChildren() { 913 if _, ok := ctx.(IStmtContext); ok { 914 if j == i { 915 t = ctx.(antlr.RuleContext) 916 break 917 } 918 j++ 919 } 920 } 921 922 if t == nil { 923 return nil 924 } 925 926 return t.(IStmtContext) 927 } 928 929 func (s *ProgContext) GetRuleContext() antlr.RuleContext { 930 return s 931 } 932 933 func (s *ProgContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 934 return antlr.TreesStringTree(s, ruleNames, recog) 935 } 936 937 func (s *ProgContext) EnterRule(listener antlr.ParseTreeListener) { 938 if listenerT, ok := listener.(nevaListener); ok { 939 listenerT.EnterProg(s) 940 } 941 } 942 943 func (s *ProgContext) ExitRule(listener antlr.ParseTreeListener) { 944 if listenerT, ok := listener.(nevaListener); ok { 945 listenerT.ExitProg(s) 946 } 947 } 948 949 func (p *nevaParser) Prog() (localctx IProgContext) { 950 localctx = NewProgContext(p, p.GetParserRuleContext(), p.GetState()) 951 p.EnterRule(localctx, 0, nevaParserRULE_prog) 952 var _la int 953 954 p.EnterOuterAlt(localctx, 1) 955 p.SetState(197) 956 p.GetErrorHandler().Sync(p) 957 if p.HasError() { 958 goto errorExit 959 } 960 _la = p.GetTokenStream().LA(1) 961 962 for (int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&2250699444258) != 0 { 963 p.SetState(195) 964 p.GetErrorHandler().Sync(p) 965 if p.HasError() { 966 goto errorExit 967 } 968 969 switch p.GetTokenStream().LA(1) { 970 case nevaParserNEWLINE: 971 { 972 p.SetState(192) 973 p.Match(nevaParserNEWLINE) 974 if p.HasError() { 975 // Recognition error - abort rule 976 goto errorExit 977 } 978 } 979 980 case nevaParserCOMMENT: 981 { 982 p.SetState(193) 983 p.Match(nevaParserCOMMENT) 984 if p.HasError() { 985 // Recognition error - abort rule 986 goto errorExit 987 } 988 } 989 990 case nevaParserT__0, nevaParserT__4, nevaParserT__11, nevaParserT__17, nevaParserT__20, nevaParserT__26, nevaParserPUB_KW: 991 { 992 p.SetState(194) 993 p.Stmt() 994 } 995 996 default: 997 p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) 998 goto errorExit 999 } 1000 1001 p.SetState(199) 1002 p.GetErrorHandler().Sync(p) 1003 if p.HasError() { 1004 goto errorExit 1005 } 1006 _la = p.GetTokenStream().LA(1) 1007 } 1008 { 1009 p.SetState(200) 1010 p.Match(nevaParserEOF) 1011 if p.HasError() { 1012 // Recognition error - abort rule 1013 goto errorExit 1014 } 1015 } 1016 1017 errorExit: 1018 if p.HasError() { 1019 v := p.GetError() 1020 localctx.SetException(v) 1021 p.GetErrorHandler().ReportError(p, v) 1022 p.GetErrorHandler().Recover(p, v) 1023 p.SetError(nil) 1024 } 1025 p.ExitRule() 1026 return localctx 1027 goto errorExit // Trick to prevent compiler error if the label is not used 1028 } 1029 1030 // IStmtContext is an interface to support dynamic dispatch. 1031 type IStmtContext interface { 1032 antlr.ParserRuleContext 1033 1034 // GetParser returns the parser. 1035 GetParser() antlr.Parser 1036 1037 // Getter signatures 1038 ImportStmt() IImportStmtContext 1039 TypeStmt() ITypeStmtContext 1040 InterfaceStmt() IInterfaceStmtContext 1041 ConstStmt() IConstStmtContext 1042 CompStmt() ICompStmtContext 1043 1044 // IsStmtContext differentiates from other interfaces. 1045 IsStmtContext() 1046 } 1047 1048 type StmtContext struct { 1049 antlr.BaseParserRuleContext 1050 parser antlr.Parser 1051 } 1052 1053 func NewEmptyStmtContext() *StmtContext { 1054 var p = new(StmtContext) 1055 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 1056 p.RuleIndex = nevaParserRULE_stmt 1057 return p 1058 } 1059 1060 func InitEmptyStmtContext(p *StmtContext) { 1061 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 1062 p.RuleIndex = nevaParserRULE_stmt 1063 } 1064 1065 func (*StmtContext) IsStmtContext() {} 1066 1067 func NewStmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StmtContext { 1068 var p = new(StmtContext) 1069 1070 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 1071 1072 p.parser = parser 1073 p.RuleIndex = nevaParserRULE_stmt 1074 1075 return p 1076 } 1077 1078 func (s *StmtContext) GetParser() antlr.Parser { return s.parser } 1079 1080 func (s *StmtContext) ImportStmt() IImportStmtContext { 1081 var t antlr.RuleContext 1082 for _, ctx := range s.GetChildren() { 1083 if _, ok := ctx.(IImportStmtContext); ok { 1084 t = ctx.(antlr.RuleContext) 1085 break 1086 } 1087 } 1088 1089 if t == nil { 1090 return nil 1091 } 1092 1093 return t.(IImportStmtContext) 1094 } 1095 1096 func (s *StmtContext) TypeStmt() ITypeStmtContext { 1097 var t antlr.RuleContext 1098 for _, ctx := range s.GetChildren() { 1099 if _, ok := ctx.(ITypeStmtContext); ok { 1100 t = ctx.(antlr.RuleContext) 1101 break 1102 } 1103 } 1104 1105 if t == nil { 1106 return nil 1107 } 1108 1109 return t.(ITypeStmtContext) 1110 } 1111 1112 func (s *StmtContext) InterfaceStmt() IInterfaceStmtContext { 1113 var t antlr.RuleContext 1114 for _, ctx := range s.GetChildren() { 1115 if _, ok := ctx.(IInterfaceStmtContext); ok { 1116 t = ctx.(antlr.RuleContext) 1117 break 1118 } 1119 } 1120 1121 if t == nil { 1122 return nil 1123 } 1124 1125 return t.(IInterfaceStmtContext) 1126 } 1127 1128 func (s *StmtContext) ConstStmt() IConstStmtContext { 1129 var t antlr.RuleContext 1130 for _, ctx := range s.GetChildren() { 1131 if _, ok := ctx.(IConstStmtContext); ok { 1132 t = ctx.(antlr.RuleContext) 1133 break 1134 } 1135 } 1136 1137 if t == nil { 1138 return nil 1139 } 1140 1141 return t.(IConstStmtContext) 1142 } 1143 1144 func (s *StmtContext) CompStmt() ICompStmtContext { 1145 var t antlr.RuleContext 1146 for _, ctx := range s.GetChildren() { 1147 if _, ok := ctx.(ICompStmtContext); ok { 1148 t = ctx.(antlr.RuleContext) 1149 break 1150 } 1151 } 1152 1153 if t == nil { 1154 return nil 1155 } 1156 1157 return t.(ICompStmtContext) 1158 } 1159 1160 func (s *StmtContext) GetRuleContext() antlr.RuleContext { 1161 return s 1162 } 1163 1164 func (s *StmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 1165 return antlr.TreesStringTree(s, ruleNames, recog) 1166 } 1167 1168 func (s *StmtContext) EnterRule(listener antlr.ParseTreeListener) { 1169 if listenerT, ok := listener.(nevaListener); ok { 1170 listenerT.EnterStmt(s) 1171 } 1172 } 1173 1174 func (s *StmtContext) ExitRule(listener antlr.ParseTreeListener) { 1175 if listenerT, ok := listener.(nevaListener); ok { 1176 listenerT.ExitStmt(s) 1177 } 1178 } 1179 1180 func (p *nevaParser) Stmt() (localctx IStmtContext) { 1181 localctx = NewStmtContext(p, p.GetParserRuleContext(), p.GetState()) 1182 p.EnterRule(localctx, 2, nevaParserRULE_stmt) 1183 p.SetState(207) 1184 p.GetErrorHandler().Sync(p) 1185 if p.HasError() { 1186 goto errorExit 1187 } 1188 1189 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 2, p.GetParserRuleContext()) { 1190 case 1: 1191 p.EnterOuterAlt(localctx, 1) 1192 { 1193 p.SetState(202) 1194 p.ImportStmt() 1195 } 1196 1197 case 2: 1198 p.EnterOuterAlt(localctx, 2) 1199 { 1200 p.SetState(203) 1201 p.TypeStmt() 1202 } 1203 1204 case 3: 1205 p.EnterOuterAlt(localctx, 3) 1206 { 1207 p.SetState(204) 1208 p.InterfaceStmt() 1209 } 1210 1211 case 4: 1212 p.EnterOuterAlt(localctx, 4) 1213 { 1214 p.SetState(205) 1215 p.ConstStmt() 1216 } 1217 1218 case 5: 1219 p.EnterOuterAlt(localctx, 5) 1220 { 1221 p.SetState(206) 1222 p.CompStmt() 1223 } 1224 1225 case antlr.ATNInvalidAltNumber: 1226 goto errorExit 1227 } 1228 1229 errorExit: 1230 if p.HasError() { 1231 v := p.GetError() 1232 localctx.SetException(v) 1233 p.GetErrorHandler().ReportError(p, v) 1234 p.GetErrorHandler().Recover(p, v) 1235 p.SetError(nil) 1236 } 1237 p.ExitRule() 1238 return localctx 1239 goto errorExit // Trick to prevent compiler error if the label is not used 1240 } 1241 1242 // ICompilerDirectivesContext is an interface to support dynamic dispatch. 1243 type ICompilerDirectivesContext interface { 1244 antlr.ParserRuleContext 1245 1246 // GetParser returns the parser. 1247 GetParser() antlr.Parser 1248 1249 // Getter signatures 1250 AllCompilerDirective() []ICompilerDirectiveContext 1251 CompilerDirective(i int) ICompilerDirectiveContext 1252 AllNEWLINE() []antlr.TerminalNode 1253 NEWLINE(i int) antlr.TerminalNode 1254 1255 // IsCompilerDirectivesContext differentiates from other interfaces. 1256 IsCompilerDirectivesContext() 1257 } 1258 1259 type CompilerDirectivesContext struct { 1260 antlr.BaseParserRuleContext 1261 parser antlr.Parser 1262 } 1263 1264 func NewEmptyCompilerDirectivesContext() *CompilerDirectivesContext { 1265 var p = new(CompilerDirectivesContext) 1266 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 1267 p.RuleIndex = nevaParserRULE_compilerDirectives 1268 return p 1269 } 1270 1271 func InitEmptyCompilerDirectivesContext(p *CompilerDirectivesContext) { 1272 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 1273 p.RuleIndex = nevaParserRULE_compilerDirectives 1274 } 1275 1276 func (*CompilerDirectivesContext) IsCompilerDirectivesContext() {} 1277 1278 func NewCompilerDirectivesContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CompilerDirectivesContext { 1279 var p = new(CompilerDirectivesContext) 1280 1281 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 1282 1283 p.parser = parser 1284 p.RuleIndex = nevaParserRULE_compilerDirectives 1285 1286 return p 1287 } 1288 1289 func (s *CompilerDirectivesContext) GetParser() antlr.Parser { return s.parser } 1290 1291 func (s *CompilerDirectivesContext) AllCompilerDirective() []ICompilerDirectiveContext { 1292 children := s.GetChildren() 1293 len := 0 1294 for _, ctx := range children { 1295 if _, ok := ctx.(ICompilerDirectiveContext); ok { 1296 len++ 1297 } 1298 } 1299 1300 tst := make([]ICompilerDirectiveContext, len) 1301 i := 0 1302 for _, ctx := range children { 1303 if t, ok := ctx.(ICompilerDirectiveContext); ok { 1304 tst[i] = t.(ICompilerDirectiveContext) 1305 i++ 1306 } 1307 } 1308 1309 return tst 1310 } 1311 1312 func (s *CompilerDirectivesContext) CompilerDirective(i int) ICompilerDirectiveContext { 1313 var t antlr.RuleContext 1314 j := 0 1315 for _, ctx := range s.GetChildren() { 1316 if _, ok := ctx.(ICompilerDirectiveContext); ok { 1317 if j == i { 1318 t = ctx.(antlr.RuleContext) 1319 break 1320 } 1321 j++ 1322 } 1323 } 1324 1325 if t == nil { 1326 return nil 1327 } 1328 1329 return t.(ICompilerDirectiveContext) 1330 } 1331 1332 func (s *CompilerDirectivesContext) AllNEWLINE() []antlr.TerminalNode { 1333 return s.GetTokens(nevaParserNEWLINE) 1334 } 1335 1336 func (s *CompilerDirectivesContext) NEWLINE(i int) antlr.TerminalNode { 1337 return s.GetToken(nevaParserNEWLINE, i) 1338 } 1339 1340 func (s *CompilerDirectivesContext) GetRuleContext() antlr.RuleContext { 1341 return s 1342 } 1343 1344 func (s *CompilerDirectivesContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 1345 return antlr.TreesStringTree(s, ruleNames, recog) 1346 } 1347 1348 func (s *CompilerDirectivesContext) EnterRule(listener antlr.ParseTreeListener) { 1349 if listenerT, ok := listener.(nevaListener); ok { 1350 listenerT.EnterCompilerDirectives(s) 1351 } 1352 } 1353 1354 func (s *CompilerDirectivesContext) ExitRule(listener antlr.ParseTreeListener) { 1355 if listenerT, ok := listener.(nevaListener); ok { 1356 listenerT.ExitCompilerDirectives(s) 1357 } 1358 } 1359 1360 func (p *nevaParser) CompilerDirectives() (localctx ICompilerDirectivesContext) { 1361 localctx = NewCompilerDirectivesContext(p, p.GetParserRuleContext(), p.GetState()) 1362 p.EnterRule(localctx, 4, nevaParserRULE_compilerDirectives) 1363 var _la int 1364 1365 p.EnterOuterAlt(localctx, 1) 1366 p.SetState(212) 1367 p.GetErrorHandler().Sync(p) 1368 if p.HasError() { 1369 goto errorExit 1370 } 1371 _la = p.GetTokenStream().LA(1) 1372 1373 for ok := true; ok; ok = _la == nevaParserT__0 { 1374 { 1375 p.SetState(209) 1376 p.CompilerDirective() 1377 } 1378 { 1379 p.SetState(210) 1380 p.Match(nevaParserNEWLINE) 1381 if p.HasError() { 1382 // Recognition error - abort rule 1383 goto errorExit 1384 } 1385 } 1386 1387 p.SetState(214) 1388 p.GetErrorHandler().Sync(p) 1389 if p.HasError() { 1390 goto errorExit 1391 } 1392 _la = p.GetTokenStream().LA(1) 1393 } 1394 1395 errorExit: 1396 if p.HasError() { 1397 v := p.GetError() 1398 localctx.SetException(v) 1399 p.GetErrorHandler().ReportError(p, v) 1400 p.GetErrorHandler().Recover(p, v) 1401 p.SetError(nil) 1402 } 1403 p.ExitRule() 1404 return localctx 1405 goto errorExit // Trick to prevent compiler error if the label is not used 1406 } 1407 1408 // ICompilerDirectiveContext is an interface to support dynamic dispatch. 1409 type ICompilerDirectiveContext interface { 1410 antlr.ParserRuleContext 1411 1412 // GetParser returns the parser. 1413 GetParser() antlr.Parser 1414 1415 // Getter signatures 1416 IDENTIFIER() antlr.TerminalNode 1417 CompilerDirectivesArgs() ICompilerDirectivesArgsContext 1418 1419 // IsCompilerDirectiveContext differentiates from other interfaces. 1420 IsCompilerDirectiveContext() 1421 } 1422 1423 type CompilerDirectiveContext struct { 1424 antlr.BaseParserRuleContext 1425 parser antlr.Parser 1426 } 1427 1428 func NewEmptyCompilerDirectiveContext() *CompilerDirectiveContext { 1429 var p = new(CompilerDirectiveContext) 1430 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 1431 p.RuleIndex = nevaParserRULE_compilerDirective 1432 return p 1433 } 1434 1435 func InitEmptyCompilerDirectiveContext(p *CompilerDirectiveContext) { 1436 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 1437 p.RuleIndex = nevaParserRULE_compilerDirective 1438 } 1439 1440 func (*CompilerDirectiveContext) IsCompilerDirectiveContext() {} 1441 1442 func NewCompilerDirectiveContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CompilerDirectiveContext { 1443 var p = new(CompilerDirectiveContext) 1444 1445 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 1446 1447 p.parser = parser 1448 p.RuleIndex = nevaParserRULE_compilerDirective 1449 1450 return p 1451 } 1452 1453 func (s *CompilerDirectiveContext) GetParser() antlr.Parser { return s.parser } 1454 1455 func (s *CompilerDirectiveContext) IDENTIFIER() antlr.TerminalNode { 1456 return s.GetToken(nevaParserIDENTIFIER, 0) 1457 } 1458 1459 func (s *CompilerDirectiveContext) CompilerDirectivesArgs() ICompilerDirectivesArgsContext { 1460 var t antlr.RuleContext 1461 for _, ctx := range s.GetChildren() { 1462 if _, ok := ctx.(ICompilerDirectivesArgsContext); ok { 1463 t = ctx.(antlr.RuleContext) 1464 break 1465 } 1466 } 1467 1468 if t == nil { 1469 return nil 1470 } 1471 1472 return t.(ICompilerDirectivesArgsContext) 1473 } 1474 1475 func (s *CompilerDirectiveContext) GetRuleContext() antlr.RuleContext { 1476 return s 1477 } 1478 1479 func (s *CompilerDirectiveContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 1480 return antlr.TreesStringTree(s, ruleNames, recog) 1481 } 1482 1483 func (s *CompilerDirectiveContext) EnterRule(listener antlr.ParseTreeListener) { 1484 if listenerT, ok := listener.(nevaListener); ok { 1485 listenerT.EnterCompilerDirective(s) 1486 } 1487 } 1488 1489 func (s *CompilerDirectiveContext) ExitRule(listener antlr.ParseTreeListener) { 1490 if listenerT, ok := listener.(nevaListener); ok { 1491 listenerT.ExitCompilerDirective(s) 1492 } 1493 } 1494 1495 func (p *nevaParser) CompilerDirective() (localctx ICompilerDirectiveContext) { 1496 localctx = NewCompilerDirectiveContext(p, p.GetParserRuleContext(), p.GetState()) 1497 p.EnterRule(localctx, 6, nevaParserRULE_compilerDirective) 1498 var _la int 1499 1500 p.EnterOuterAlt(localctx, 1) 1501 { 1502 p.SetState(216) 1503 p.Match(nevaParserT__0) 1504 if p.HasError() { 1505 // Recognition error - abort rule 1506 goto errorExit 1507 } 1508 } 1509 { 1510 p.SetState(217) 1511 p.Match(nevaParserIDENTIFIER) 1512 if p.HasError() { 1513 // Recognition error - abort rule 1514 goto errorExit 1515 } 1516 } 1517 p.SetState(219) 1518 p.GetErrorHandler().Sync(p) 1519 if p.HasError() { 1520 goto errorExit 1521 } 1522 _la = p.GetTokenStream().LA(1) 1523 1524 if _la == nevaParserT__1 { 1525 { 1526 p.SetState(218) 1527 p.CompilerDirectivesArgs() 1528 } 1529 1530 } 1531 1532 errorExit: 1533 if p.HasError() { 1534 v := p.GetError() 1535 localctx.SetException(v) 1536 p.GetErrorHandler().ReportError(p, v) 1537 p.GetErrorHandler().Recover(p, v) 1538 p.SetError(nil) 1539 } 1540 p.ExitRule() 1541 return localctx 1542 goto errorExit // Trick to prevent compiler error if the label is not used 1543 } 1544 1545 // ICompilerDirectivesArgsContext is an interface to support dynamic dispatch. 1546 type ICompilerDirectivesArgsContext interface { 1547 antlr.ParserRuleContext 1548 1549 // GetParser returns the parser. 1550 GetParser() antlr.Parser 1551 1552 // Getter signatures 1553 AllCompiler_directive_arg() []ICompiler_directive_argContext 1554 Compiler_directive_arg(i int) ICompiler_directive_argContext 1555 1556 // IsCompilerDirectivesArgsContext differentiates from other interfaces. 1557 IsCompilerDirectivesArgsContext() 1558 } 1559 1560 type CompilerDirectivesArgsContext struct { 1561 antlr.BaseParserRuleContext 1562 parser antlr.Parser 1563 } 1564 1565 func NewEmptyCompilerDirectivesArgsContext() *CompilerDirectivesArgsContext { 1566 var p = new(CompilerDirectivesArgsContext) 1567 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 1568 p.RuleIndex = nevaParserRULE_compilerDirectivesArgs 1569 return p 1570 } 1571 1572 func InitEmptyCompilerDirectivesArgsContext(p *CompilerDirectivesArgsContext) { 1573 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 1574 p.RuleIndex = nevaParserRULE_compilerDirectivesArgs 1575 } 1576 1577 func (*CompilerDirectivesArgsContext) IsCompilerDirectivesArgsContext() {} 1578 1579 func NewCompilerDirectivesArgsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CompilerDirectivesArgsContext { 1580 var p = new(CompilerDirectivesArgsContext) 1581 1582 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 1583 1584 p.parser = parser 1585 p.RuleIndex = nevaParserRULE_compilerDirectivesArgs 1586 1587 return p 1588 } 1589 1590 func (s *CompilerDirectivesArgsContext) GetParser() antlr.Parser { return s.parser } 1591 1592 func (s *CompilerDirectivesArgsContext) AllCompiler_directive_arg() []ICompiler_directive_argContext { 1593 children := s.GetChildren() 1594 len := 0 1595 for _, ctx := range children { 1596 if _, ok := ctx.(ICompiler_directive_argContext); ok { 1597 len++ 1598 } 1599 } 1600 1601 tst := make([]ICompiler_directive_argContext, len) 1602 i := 0 1603 for _, ctx := range children { 1604 if t, ok := ctx.(ICompiler_directive_argContext); ok { 1605 tst[i] = t.(ICompiler_directive_argContext) 1606 i++ 1607 } 1608 } 1609 1610 return tst 1611 } 1612 1613 func (s *CompilerDirectivesArgsContext) Compiler_directive_arg(i int) ICompiler_directive_argContext { 1614 var t antlr.RuleContext 1615 j := 0 1616 for _, ctx := range s.GetChildren() { 1617 if _, ok := ctx.(ICompiler_directive_argContext); ok { 1618 if j == i { 1619 t = ctx.(antlr.RuleContext) 1620 break 1621 } 1622 j++ 1623 } 1624 } 1625 1626 if t == nil { 1627 return nil 1628 } 1629 1630 return t.(ICompiler_directive_argContext) 1631 } 1632 1633 func (s *CompilerDirectivesArgsContext) GetRuleContext() antlr.RuleContext { 1634 return s 1635 } 1636 1637 func (s *CompilerDirectivesArgsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 1638 return antlr.TreesStringTree(s, ruleNames, recog) 1639 } 1640 1641 func (s *CompilerDirectivesArgsContext) EnterRule(listener antlr.ParseTreeListener) { 1642 if listenerT, ok := listener.(nevaListener); ok { 1643 listenerT.EnterCompilerDirectivesArgs(s) 1644 } 1645 } 1646 1647 func (s *CompilerDirectivesArgsContext) ExitRule(listener antlr.ParseTreeListener) { 1648 if listenerT, ok := listener.(nevaListener); ok { 1649 listenerT.ExitCompilerDirectivesArgs(s) 1650 } 1651 } 1652 1653 func (p *nevaParser) CompilerDirectivesArgs() (localctx ICompilerDirectivesArgsContext) { 1654 localctx = NewCompilerDirectivesArgsContext(p, p.GetParserRuleContext(), p.GetState()) 1655 p.EnterRule(localctx, 8, nevaParserRULE_compilerDirectivesArgs) 1656 var _la int 1657 1658 p.EnterOuterAlt(localctx, 1) 1659 { 1660 p.SetState(221) 1661 p.Match(nevaParserT__1) 1662 if p.HasError() { 1663 // Recognition error - abort rule 1664 goto errorExit 1665 } 1666 } 1667 { 1668 p.SetState(222) 1669 p.Compiler_directive_arg() 1670 } 1671 p.SetState(227) 1672 p.GetErrorHandler().Sync(p) 1673 if p.HasError() { 1674 goto errorExit 1675 } 1676 _la = p.GetTokenStream().LA(1) 1677 1678 for _la == nevaParserT__2 { 1679 { 1680 p.SetState(223) 1681 p.Match(nevaParserT__2) 1682 if p.HasError() { 1683 // Recognition error - abort rule 1684 goto errorExit 1685 } 1686 } 1687 { 1688 p.SetState(224) 1689 p.Compiler_directive_arg() 1690 } 1691 1692 p.SetState(229) 1693 p.GetErrorHandler().Sync(p) 1694 if p.HasError() { 1695 goto errorExit 1696 } 1697 _la = p.GetTokenStream().LA(1) 1698 } 1699 { 1700 p.SetState(230) 1701 p.Match(nevaParserT__3) 1702 if p.HasError() { 1703 // Recognition error - abort rule 1704 goto errorExit 1705 } 1706 } 1707 1708 errorExit: 1709 if p.HasError() { 1710 v := p.GetError() 1711 localctx.SetException(v) 1712 p.GetErrorHandler().ReportError(p, v) 1713 p.GetErrorHandler().Recover(p, v) 1714 p.SetError(nil) 1715 } 1716 p.ExitRule() 1717 return localctx 1718 goto errorExit // Trick to prevent compiler error if the label is not used 1719 } 1720 1721 // ICompiler_directive_argContext is an interface to support dynamic dispatch. 1722 type ICompiler_directive_argContext interface { 1723 antlr.ParserRuleContext 1724 1725 // GetParser returns the parser. 1726 GetParser() antlr.Parser 1727 1728 // Getter signatures 1729 AllIDENTIFIER() []antlr.TerminalNode 1730 IDENTIFIER(i int) antlr.TerminalNode 1731 1732 // IsCompiler_directive_argContext differentiates from other interfaces. 1733 IsCompiler_directive_argContext() 1734 } 1735 1736 type Compiler_directive_argContext struct { 1737 antlr.BaseParserRuleContext 1738 parser antlr.Parser 1739 } 1740 1741 func NewEmptyCompiler_directive_argContext() *Compiler_directive_argContext { 1742 var p = new(Compiler_directive_argContext) 1743 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 1744 p.RuleIndex = nevaParserRULE_compiler_directive_arg 1745 return p 1746 } 1747 1748 func InitEmptyCompiler_directive_argContext(p *Compiler_directive_argContext) { 1749 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 1750 p.RuleIndex = nevaParserRULE_compiler_directive_arg 1751 } 1752 1753 func (*Compiler_directive_argContext) IsCompiler_directive_argContext() {} 1754 1755 func NewCompiler_directive_argContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Compiler_directive_argContext { 1756 var p = new(Compiler_directive_argContext) 1757 1758 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 1759 1760 p.parser = parser 1761 p.RuleIndex = nevaParserRULE_compiler_directive_arg 1762 1763 return p 1764 } 1765 1766 func (s *Compiler_directive_argContext) GetParser() antlr.Parser { return s.parser } 1767 1768 func (s *Compiler_directive_argContext) AllIDENTIFIER() []antlr.TerminalNode { 1769 return s.GetTokens(nevaParserIDENTIFIER) 1770 } 1771 1772 func (s *Compiler_directive_argContext) IDENTIFIER(i int) antlr.TerminalNode { 1773 return s.GetToken(nevaParserIDENTIFIER, i) 1774 } 1775 1776 func (s *Compiler_directive_argContext) GetRuleContext() antlr.RuleContext { 1777 return s 1778 } 1779 1780 func (s *Compiler_directive_argContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 1781 return antlr.TreesStringTree(s, ruleNames, recog) 1782 } 1783 1784 func (s *Compiler_directive_argContext) EnterRule(listener antlr.ParseTreeListener) { 1785 if listenerT, ok := listener.(nevaListener); ok { 1786 listenerT.EnterCompiler_directive_arg(s) 1787 } 1788 } 1789 1790 func (s *Compiler_directive_argContext) ExitRule(listener antlr.ParseTreeListener) { 1791 if listenerT, ok := listener.(nevaListener); ok { 1792 listenerT.ExitCompiler_directive_arg(s) 1793 } 1794 } 1795 1796 func (p *nevaParser) Compiler_directive_arg() (localctx ICompiler_directive_argContext) { 1797 localctx = NewCompiler_directive_argContext(p, p.GetParserRuleContext(), p.GetState()) 1798 p.EnterRule(localctx, 10, nevaParserRULE_compiler_directive_arg) 1799 var _la int 1800 1801 p.EnterOuterAlt(localctx, 1) 1802 p.SetState(233) 1803 p.GetErrorHandler().Sync(p) 1804 if p.HasError() { 1805 goto errorExit 1806 } 1807 _la = p.GetTokenStream().LA(1) 1808 1809 for ok := true; ok; ok = _la == nevaParserIDENTIFIER { 1810 { 1811 p.SetState(232) 1812 p.Match(nevaParserIDENTIFIER) 1813 if p.HasError() { 1814 // Recognition error - abort rule 1815 goto errorExit 1816 } 1817 } 1818 1819 p.SetState(235) 1820 p.GetErrorHandler().Sync(p) 1821 if p.HasError() { 1822 goto errorExit 1823 } 1824 _la = p.GetTokenStream().LA(1) 1825 } 1826 1827 errorExit: 1828 if p.HasError() { 1829 v := p.GetError() 1830 localctx.SetException(v) 1831 p.GetErrorHandler().ReportError(p, v) 1832 p.GetErrorHandler().Recover(p, v) 1833 p.SetError(nil) 1834 } 1835 p.ExitRule() 1836 return localctx 1837 goto errorExit // Trick to prevent compiler error if the label is not used 1838 } 1839 1840 // IImportStmtContext is an interface to support dynamic dispatch. 1841 type IImportStmtContext interface { 1842 antlr.ParserRuleContext 1843 1844 // GetParser returns the parser. 1845 GetParser() antlr.Parser 1846 1847 // Getter signatures 1848 AllNEWLINE() []antlr.TerminalNode 1849 NEWLINE(i int) antlr.TerminalNode 1850 AllImportDef() []IImportDefContext 1851 ImportDef(i int) IImportDefContext 1852 1853 // IsImportStmtContext differentiates from other interfaces. 1854 IsImportStmtContext() 1855 } 1856 1857 type ImportStmtContext struct { 1858 antlr.BaseParserRuleContext 1859 parser antlr.Parser 1860 } 1861 1862 func NewEmptyImportStmtContext() *ImportStmtContext { 1863 var p = new(ImportStmtContext) 1864 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 1865 p.RuleIndex = nevaParserRULE_importStmt 1866 return p 1867 } 1868 1869 func InitEmptyImportStmtContext(p *ImportStmtContext) { 1870 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 1871 p.RuleIndex = nevaParserRULE_importStmt 1872 } 1873 1874 func (*ImportStmtContext) IsImportStmtContext() {} 1875 1876 func NewImportStmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ImportStmtContext { 1877 var p = new(ImportStmtContext) 1878 1879 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 1880 1881 p.parser = parser 1882 p.RuleIndex = nevaParserRULE_importStmt 1883 1884 return p 1885 } 1886 1887 func (s *ImportStmtContext) GetParser() antlr.Parser { return s.parser } 1888 1889 func (s *ImportStmtContext) AllNEWLINE() []antlr.TerminalNode { 1890 return s.GetTokens(nevaParserNEWLINE) 1891 } 1892 1893 func (s *ImportStmtContext) NEWLINE(i int) antlr.TerminalNode { 1894 return s.GetToken(nevaParserNEWLINE, i) 1895 } 1896 1897 func (s *ImportStmtContext) AllImportDef() []IImportDefContext { 1898 children := s.GetChildren() 1899 len := 0 1900 for _, ctx := range children { 1901 if _, ok := ctx.(IImportDefContext); ok { 1902 len++ 1903 } 1904 } 1905 1906 tst := make([]IImportDefContext, len) 1907 i := 0 1908 for _, ctx := range children { 1909 if t, ok := ctx.(IImportDefContext); ok { 1910 tst[i] = t.(IImportDefContext) 1911 i++ 1912 } 1913 } 1914 1915 return tst 1916 } 1917 1918 func (s *ImportStmtContext) ImportDef(i int) IImportDefContext { 1919 var t antlr.RuleContext 1920 j := 0 1921 for _, ctx := range s.GetChildren() { 1922 if _, ok := ctx.(IImportDefContext); ok { 1923 if j == i { 1924 t = ctx.(antlr.RuleContext) 1925 break 1926 } 1927 j++ 1928 } 1929 } 1930 1931 if t == nil { 1932 return nil 1933 } 1934 1935 return t.(IImportDefContext) 1936 } 1937 1938 func (s *ImportStmtContext) GetRuleContext() antlr.RuleContext { 1939 return s 1940 } 1941 1942 func (s *ImportStmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 1943 return antlr.TreesStringTree(s, ruleNames, recog) 1944 } 1945 1946 func (s *ImportStmtContext) EnterRule(listener antlr.ParseTreeListener) { 1947 if listenerT, ok := listener.(nevaListener); ok { 1948 listenerT.EnterImportStmt(s) 1949 } 1950 } 1951 1952 func (s *ImportStmtContext) ExitRule(listener antlr.ParseTreeListener) { 1953 if listenerT, ok := listener.(nevaListener); ok { 1954 listenerT.ExitImportStmt(s) 1955 } 1956 } 1957 1958 func (p *nevaParser) ImportStmt() (localctx IImportStmtContext) { 1959 localctx = NewImportStmtContext(p, p.GetParserRuleContext(), p.GetState()) 1960 p.EnterRule(localctx, 12, nevaParserRULE_importStmt) 1961 var _la int 1962 1963 p.EnterOuterAlt(localctx, 1) 1964 { 1965 p.SetState(237) 1966 p.Match(nevaParserT__4) 1967 if p.HasError() { 1968 // Recognition error - abort rule 1969 goto errorExit 1970 } 1971 } 1972 p.SetState(241) 1973 p.GetErrorHandler().Sync(p) 1974 if p.HasError() { 1975 goto errorExit 1976 } 1977 _la = p.GetTokenStream().LA(1) 1978 1979 for _la == nevaParserNEWLINE { 1980 { 1981 p.SetState(238) 1982 p.Match(nevaParserNEWLINE) 1983 if p.HasError() { 1984 // Recognition error - abort rule 1985 goto errorExit 1986 } 1987 } 1988 1989 p.SetState(243) 1990 p.GetErrorHandler().Sync(p) 1991 if p.HasError() { 1992 goto errorExit 1993 } 1994 _la = p.GetTokenStream().LA(1) 1995 } 1996 { 1997 p.SetState(244) 1998 p.Match(nevaParserT__5) 1999 if p.HasError() { 2000 // Recognition error - abort rule 2001 goto errorExit 2002 } 2003 } 2004 p.SetState(248) 2005 p.GetErrorHandler().Sync(p) 2006 if p.HasError() { 2007 goto errorExit 2008 } 2009 _la = p.GetTokenStream().LA(1) 2010 2011 for _la == nevaParserNEWLINE { 2012 { 2013 p.SetState(245) 2014 p.Match(nevaParserNEWLINE) 2015 if p.HasError() { 2016 // Recognition error - abort rule 2017 goto errorExit 2018 } 2019 } 2020 2021 p.SetState(250) 2022 p.GetErrorHandler().Sync(p) 2023 if p.HasError() { 2024 goto errorExit 2025 } 2026 _la = p.GetTokenStream().LA(1) 2027 } 2028 p.SetState(254) 2029 p.GetErrorHandler().Sync(p) 2030 if p.HasError() { 2031 goto errorExit 2032 } 2033 _la = p.GetTokenStream().LA(1) 2034 2035 for _la == nevaParserT__8 || _la == nevaParserIDENTIFIER { 2036 { 2037 p.SetState(251) 2038 p.ImportDef() 2039 } 2040 2041 p.SetState(256) 2042 p.GetErrorHandler().Sync(p) 2043 if p.HasError() { 2044 goto errorExit 2045 } 2046 _la = p.GetTokenStream().LA(1) 2047 } 2048 { 2049 p.SetState(257) 2050 p.Match(nevaParserT__6) 2051 if p.HasError() { 2052 // Recognition error - abort rule 2053 goto errorExit 2054 } 2055 } 2056 2057 errorExit: 2058 if p.HasError() { 2059 v := p.GetError() 2060 localctx.SetException(v) 2061 p.GetErrorHandler().ReportError(p, v) 2062 p.GetErrorHandler().Recover(p, v) 2063 p.SetError(nil) 2064 } 2065 p.ExitRule() 2066 return localctx 2067 goto errorExit // Trick to prevent compiler error if the label is not used 2068 } 2069 2070 // IImportDefContext is an interface to support dynamic dispatch. 2071 type IImportDefContext interface { 2072 antlr.ParserRuleContext 2073 2074 // GetParser returns the parser. 2075 GetParser() antlr.Parser 2076 2077 // Getter signatures 2078 ImportPath() IImportPathContext 2079 ImportAlias() IImportAliasContext 2080 AllNEWLINE() []antlr.TerminalNode 2081 NEWLINE(i int) antlr.TerminalNode 2082 2083 // IsImportDefContext differentiates from other interfaces. 2084 IsImportDefContext() 2085 } 2086 2087 type ImportDefContext struct { 2088 antlr.BaseParserRuleContext 2089 parser antlr.Parser 2090 } 2091 2092 func NewEmptyImportDefContext() *ImportDefContext { 2093 var p = new(ImportDefContext) 2094 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 2095 p.RuleIndex = nevaParserRULE_importDef 2096 return p 2097 } 2098 2099 func InitEmptyImportDefContext(p *ImportDefContext) { 2100 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 2101 p.RuleIndex = nevaParserRULE_importDef 2102 } 2103 2104 func (*ImportDefContext) IsImportDefContext() {} 2105 2106 func NewImportDefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ImportDefContext { 2107 var p = new(ImportDefContext) 2108 2109 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 2110 2111 p.parser = parser 2112 p.RuleIndex = nevaParserRULE_importDef 2113 2114 return p 2115 } 2116 2117 func (s *ImportDefContext) GetParser() antlr.Parser { return s.parser } 2118 2119 func (s *ImportDefContext) ImportPath() IImportPathContext { 2120 var t antlr.RuleContext 2121 for _, ctx := range s.GetChildren() { 2122 if _, ok := ctx.(IImportPathContext); ok { 2123 t = ctx.(antlr.RuleContext) 2124 break 2125 } 2126 } 2127 2128 if t == nil { 2129 return nil 2130 } 2131 2132 return t.(IImportPathContext) 2133 } 2134 2135 func (s *ImportDefContext) ImportAlias() IImportAliasContext { 2136 var t antlr.RuleContext 2137 for _, ctx := range s.GetChildren() { 2138 if _, ok := ctx.(IImportAliasContext); ok { 2139 t = ctx.(antlr.RuleContext) 2140 break 2141 } 2142 } 2143 2144 if t == nil { 2145 return nil 2146 } 2147 2148 return t.(IImportAliasContext) 2149 } 2150 2151 func (s *ImportDefContext) AllNEWLINE() []antlr.TerminalNode { 2152 return s.GetTokens(nevaParserNEWLINE) 2153 } 2154 2155 func (s *ImportDefContext) NEWLINE(i int) antlr.TerminalNode { 2156 return s.GetToken(nevaParserNEWLINE, i) 2157 } 2158 2159 func (s *ImportDefContext) GetRuleContext() antlr.RuleContext { 2160 return s 2161 } 2162 2163 func (s *ImportDefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 2164 return antlr.TreesStringTree(s, ruleNames, recog) 2165 } 2166 2167 func (s *ImportDefContext) EnterRule(listener antlr.ParseTreeListener) { 2168 if listenerT, ok := listener.(nevaListener); ok { 2169 listenerT.EnterImportDef(s) 2170 } 2171 } 2172 2173 func (s *ImportDefContext) ExitRule(listener antlr.ParseTreeListener) { 2174 if listenerT, ok := listener.(nevaListener); ok { 2175 listenerT.ExitImportDef(s) 2176 } 2177 } 2178 2179 func (p *nevaParser) ImportDef() (localctx IImportDefContext) { 2180 localctx = NewImportDefContext(p, p.GetParserRuleContext(), p.GetState()) 2181 p.EnterRule(localctx, 14, nevaParserRULE_importDef) 2182 var _la int 2183 2184 p.EnterOuterAlt(localctx, 1) 2185 p.SetState(260) 2186 p.GetErrorHandler().Sync(p) 2187 2188 if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 10, p.GetParserRuleContext()) == 1 { 2189 { 2190 p.SetState(259) 2191 p.ImportAlias() 2192 } 2193 2194 } else if p.HasError() { // JIM 2195 goto errorExit 2196 } 2197 { 2198 p.SetState(262) 2199 p.ImportPath() 2200 } 2201 p.SetState(264) 2202 p.GetErrorHandler().Sync(p) 2203 if p.HasError() { 2204 goto errorExit 2205 } 2206 _la = p.GetTokenStream().LA(1) 2207 2208 if _la == nevaParserT__2 { 2209 { 2210 p.SetState(263) 2211 p.Match(nevaParserT__2) 2212 if p.HasError() { 2213 // Recognition error - abort rule 2214 goto errorExit 2215 } 2216 } 2217 2218 } 2219 p.SetState(269) 2220 p.GetErrorHandler().Sync(p) 2221 if p.HasError() { 2222 goto errorExit 2223 } 2224 _la = p.GetTokenStream().LA(1) 2225 2226 for _la == nevaParserNEWLINE { 2227 { 2228 p.SetState(266) 2229 p.Match(nevaParserNEWLINE) 2230 if p.HasError() { 2231 // Recognition error - abort rule 2232 goto errorExit 2233 } 2234 } 2235 2236 p.SetState(271) 2237 p.GetErrorHandler().Sync(p) 2238 if p.HasError() { 2239 goto errorExit 2240 } 2241 _la = p.GetTokenStream().LA(1) 2242 } 2243 2244 errorExit: 2245 if p.HasError() { 2246 v := p.GetError() 2247 localctx.SetException(v) 2248 p.GetErrorHandler().ReportError(p, v) 2249 p.GetErrorHandler().Recover(p, v) 2250 p.SetError(nil) 2251 } 2252 p.ExitRule() 2253 return localctx 2254 goto errorExit // Trick to prevent compiler error if the label is not used 2255 } 2256 2257 // IImportAliasContext is an interface to support dynamic dispatch. 2258 type IImportAliasContext interface { 2259 antlr.ParserRuleContext 2260 2261 // GetParser returns the parser. 2262 GetParser() antlr.Parser 2263 2264 // Getter signatures 2265 IDENTIFIER() antlr.TerminalNode 2266 2267 // IsImportAliasContext differentiates from other interfaces. 2268 IsImportAliasContext() 2269 } 2270 2271 type ImportAliasContext struct { 2272 antlr.BaseParserRuleContext 2273 parser antlr.Parser 2274 } 2275 2276 func NewEmptyImportAliasContext() *ImportAliasContext { 2277 var p = new(ImportAliasContext) 2278 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 2279 p.RuleIndex = nevaParserRULE_importAlias 2280 return p 2281 } 2282 2283 func InitEmptyImportAliasContext(p *ImportAliasContext) { 2284 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 2285 p.RuleIndex = nevaParserRULE_importAlias 2286 } 2287 2288 func (*ImportAliasContext) IsImportAliasContext() {} 2289 2290 func NewImportAliasContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ImportAliasContext { 2291 var p = new(ImportAliasContext) 2292 2293 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 2294 2295 p.parser = parser 2296 p.RuleIndex = nevaParserRULE_importAlias 2297 2298 return p 2299 } 2300 2301 func (s *ImportAliasContext) GetParser() antlr.Parser { return s.parser } 2302 2303 func (s *ImportAliasContext) IDENTIFIER() antlr.TerminalNode { 2304 return s.GetToken(nevaParserIDENTIFIER, 0) 2305 } 2306 2307 func (s *ImportAliasContext) GetRuleContext() antlr.RuleContext { 2308 return s 2309 } 2310 2311 func (s *ImportAliasContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 2312 return antlr.TreesStringTree(s, ruleNames, recog) 2313 } 2314 2315 func (s *ImportAliasContext) EnterRule(listener antlr.ParseTreeListener) { 2316 if listenerT, ok := listener.(nevaListener); ok { 2317 listenerT.EnterImportAlias(s) 2318 } 2319 } 2320 2321 func (s *ImportAliasContext) ExitRule(listener antlr.ParseTreeListener) { 2322 if listenerT, ok := listener.(nevaListener); ok { 2323 listenerT.ExitImportAlias(s) 2324 } 2325 } 2326 2327 func (p *nevaParser) ImportAlias() (localctx IImportAliasContext) { 2328 localctx = NewImportAliasContext(p, p.GetParserRuleContext(), p.GetState()) 2329 p.EnterRule(localctx, 16, nevaParserRULE_importAlias) 2330 p.EnterOuterAlt(localctx, 1) 2331 { 2332 p.SetState(272) 2333 p.Match(nevaParserIDENTIFIER) 2334 if p.HasError() { 2335 // Recognition error - abort rule 2336 goto errorExit 2337 } 2338 } 2339 2340 errorExit: 2341 if p.HasError() { 2342 v := p.GetError() 2343 localctx.SetException(v) 2344 p.GetErrorHandler().ReportError(p, v) 2345 p.GetErrorHandler().Recover(p, v) 2346 p.SetError(nil) 2347 } 2348 p.ExitRule() 2349 return localctx 2350 goto errorExit // Trick to prevent compiler error if the label is not used 2351 } 2352 2353 // IImportPathContext is an interface to support dynamic dispatch. 2354 type IImportPathContext interface { 2355 antlr.ParserRuleContext 2356 2357 // GetParser returns the parser. 2358 GetParser() antlr.Parser 2359 2360 // Getter signatures 2361 ImportPathPkg() IImportPathPkgContext 2362 ImportPathMod() IImportPathModContext 2363 2364 // IsImportPathContext differentiates from other interfaces. 2365 IsImportPathContext() 2366 } 2367 2368 type ImportPathContext struct { 2369 antlr.BaseParserRuleContext 2370 parser antlr.Parser 2371 } 2372 2373 func NewEmptyImportPathContext() *ImportPathContext { 2374 var p = new(ImportPathContext) 2375 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 2376 p.RuleIndex = nevaParserRULE_importPath 2377 return p 2378 } 2379 2380 func InitEmptyImportPathContext(p *ImportPathContext) { 2381 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 2382 p.RuleIndex = nevaParserRULE_importPath 2383 } 2384 2385 func (*ImportPathContext) IsImportPathContext() {} 2386 2387 func NewImportPathContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ImportPathContext { 2388 var p = new(ImportPathContext) 2389 2390 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 2391 2392 p.parser = parser 2393 p.RuleIndex = nevaParserRULE_importPath 2394 2395 return p 2396 } 2397 2398 func (s *ImportPathContext) GetParser() antlr.Parser { return s.parser } 2399 2400 func (s *ImportPathContext) ImportPathPkg() IImportPathPkgContext { 2401 var t antlr.RuleContext 2402 for _, ctx := range s.GetChildren() { 2403 if _, ok := ctx.(IImportPathPkgContext); ok { 2404 t = ctx.(antlr.RuleContext) 2405 break 2406 } 2407 } 2408 2409 if t == nil { 2410 return nil 2411 } 2412 2413 return t.(IImportPathPkgContext) 2414 } 2415 2416 func (s *ImportPathContext) ImportPathMod() IImportPathModContext { 2417 var t antlr.RuleContext 2418 for _, ctx := range s.GetChildren() { 2419 if _, ok := ctx.(IImportPathModContext); ok { 2420 t = ctx.(antlr.RuleContext) 2421 break 2422 } 2423 } 2424 2425 if t == nil { 2426 return nil 2427 } 2428 2429 return t.(IImportPathModContext) 2430 } 2431 2432 func (s *ImportPathContext) GetRuleContext() antlr.RuleContext { 2433 return s 2434 } 2435 2436 func (s *ImportPathContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 2437 return antlr.TreesStringTree(s, ruleNames, recog) 2438 } 2439 2440 func (s *ImportPathContext) EnterRule(listener antlr.ParseTreeListener) { 2441 if listenerT, ok := listener.(nevaListener); ok { 2442 listenerT.EnterImportPath(s) 2443 } 2444 } 2445 2446 func (s *ImportPathContext) ExitRule(listener antlr.ParseTreeListener) { 2447 if listenerT, ok := listener.(nevaListener); ok { 2448 listenerT.ExitImportPath(s) 2449 } 2450 } 2451 2452 func (p *nevaParser) ImportPath() (localctx IImportPathContext) { 2453 localctx = NewImportPathContext(p, p.GetParserRuleContext(), p.GetState()) 2454 p.EnterRule(localctx, 18, nevaParserRULE_importPath) 2455 p.EnterOuterAlt(localctx, 1) 2456 p.SetState(277) 2457 p.GetErrorHandler().Sync(p) 2458 2459 if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 13, p.GetParserRuleContext()) == 1 { 2460 { 2461 p.SetState(274) 2462 p.ImportPathMod() 2463 } 2464 { 2465 p.SetState(275) 2466 p.Match(nevaParserT__7) 2467 if p.HasError() { 2468 // Recognition error - abort rule 2469 goto errorExit 2470 } 2471 } 2472 2473 } else if p.HasError() { // JIM 2474 goto errorExit 2475 } 2476 { 2477 p.SetState(279) 2478 p.ImportPathPkg() 2479 } 2480 2481 errorExit: 2482 if p.HasError() { 2483 v := p.GetError() 2484 localctx.SetException(v) 2485 p.GetErrorHandler().ReportError(p, v) 2486 p.GetErrorHandler().Recover(p, v) 2487 p.SetError(nil) 2488 } 2489 p.ExitRule() 2490 return localctx 2491 goto errorExit // Trick to prevent compiler error if the label is not used 2492 } 2493 2494 // IImportPathModContext is an interface to support dynamic dispatch. 2495 type IImportPathModContext interface { 2496 antlr.ParserRuleContext 2497 2498 // GetParser returns the parser. 2499 GetParser() antlr.Parser 2500 2501 // Getter signatures 2502 ImportMod() IImportModContext 2503 2504 // IsImportPathModContext differentiates from other interfaces. 2505 IsImportPathModContext() 2506 } 2507 2508 type ImportPathModContext struct { 2509 antlr.BaseParserRuleContext 2510 parser antlr.Parser 2511 } 2512 2513 func NewEmptyImportPathModContext() *ImportPathModContext { 2514 var p = new(ImportPathModContext) 2515 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 2516 p.RuleIndex = nevaParserRULE_importPathMod 2517 return p 2518 } 2519 2520 func InitEmptyImportPathModContext(p *ImportPathModContext) { 2521 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 2522 p.RuleIndex = nevaParserRULE_importPathMod 2523 } 2524 2525 func (*ImportPathModContext) IsImportPathModContext() {} 2526 2527 func NewImportPathModContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ImportPathModContext { 2528 var p = new(ImportPathModContext) 2529 2530 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 2531 2532 p.parser = parser 2533 p.RuleIndex = nevaParserRULE_importPathMod 2534 2535 return p 2536 } 2537 2538 func (s *ImportPathModContext) GetParser() antlr.Parser { return s.parser } 2539 2540 func (s *ImportPathModContext) ImportMod() IImportModContext { 2541 var t antlr.RuleContext 2542 for _, ctx := range s.GetChildren() { 2543 if _, ok := ctx.(IImportModContext); ok { 2544 t = ctx.(antlr.RuleContext) 2545 break 2546 } 2547 } 2548 2549 if t == nil { 2550 return nil 2551 } 2552 2553 return t.(IImportModContext) 2554 } 2555 2556 func (s *ImportPathModContext) GetRuleContext() antlr.RuleContext { 2557 return s 2558 } 2559 2560 func (s *ImportPathModContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 2561 return antlr.TreesStringTree(s, ruleNames, recog) 2562 } 2563 2564 func (s *ImportPathModContext) EnterRule(listener antlr.ParseTreeListener) { 2565 if listenerT, ok := listener.(nevaListener); ok { 2566 listenerT.EnterImportPathMod(s) 2567 } 2568 } 2569 2570 func (s *ImportPathModContext) ExitRule(listener antlr.ParseTreeListener) { 2571 if listenerT, ok := listener.(nevaListener); ok { 2572 listenerT.ExitImportPathMod(s) 2573 } 2574 } 2575 2576 func (p *nevaParser) ImportPathMod() (localctx IImportPathModContext) { 2577 localctx = NewImportPathModContext(p, p.GetParserRuleContext(), p.GetState()) 2578 p.EnterRule(localctx, 20, nevaParserRULE_importPathMod) 2579 p.SetState(283) 2580 p.GetErrorHandler().Sync(p) 2581 if p.HasError() { 2582 goto errorExit 2583 } 2584 2585 switch p.GetTokenStream().LA(1) { 2586 case nevaParserT__8: 2587 p.EnterOuterAlt(localctx, 1) 2588 { 2589 p.SetState(281) 2590 p.Match(nevaParserT__8) 2591 if p.HasError() { 2592 // Recognition error - abort rule 2593 goto errorExit 2594 } 2595 } 2596 2597 case nevaParserIDENTIFIER: 2598 p.EnterOuterAlt(localctx, 2) 2599 { 2600 p.SetState(282) 2601 p.ImportMod() 2602 } 2603 2604 default: 2605 p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) 2606 goto errorExit 2607 } 2608 2609 errorExit: 2610 if p.HasError() { 2611 v := p.GetError() 2612 localctx.SetException(v) 2613 p.GetErrorHandler().ReportError(p, v) 2614 p.GetErrorHandler().Recover(p, v) 2615 p.SetError(nil) 2616 } 2617 p.ExitRule() 2618 return localctx 2619 goto errorExit // Trick to prevent compiler error if the label is not used 2620 } 2621 2622 // IImportModContext is an interface to support dynamic dispatch. 2623 type IImportModContext interface { 2624 antlr.ParserRuleContext 2625 2626 // GetParser returns the parser. 2627 GetParser() antlr.Parser 2628 2629 // Getter signatures 2630 AllIDENTIFIER() []antlr.TerminalNode 2631 IDENTIFIER(i int) antlr.TerminalNode 2632 AllImportModeDelim() []IImportModeDelimContext 2633 ImportModeDelim(i int) IImportModeDelimContext 2634 2635 // IsImportModContext differentiates from other interfaces. 2636 IsImportModContext() 2637 } 2638 2639 type ImportModContext struct { 2640 antlr.BaseParserRuleContext 2641 parser antlr.Parser 2642 } 2643 2644 func NewEmptyImportModContext() *ImportModContext { 2645 var p = new(ImportModContext) 2646 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 2647 p.RuleIndex = nevaParserRULE_importMod 2648 return p 2649 } 2650 2651 func InitEmptyImportModContext(p *ImportModContext) { 2652 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 2653 p.RuleIndex = nevaParserRULE_importMod 2654 } 2655 2656 func (*ImportModContext) IsImportModContext() {} 2657 2658 func NewImportModContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ImportModContext { 2659 var p = new(ImportModContext) 2660 2661 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 2662 2663 p.parser = parser 2664 p.RuleIndex = nevaParserRULE_importMod 2665 2666 return p 2667 } 2668 2669 func (s *ImportModContext) GetParser() antlr.Parser { return s.parser } 2670 2671 func (s *ImportModContext) AllIDENTIFIER() []antlr.TerminalNode { 2672 return s.GetTokens(nevaParserIDENTIFIER) 2673 } 2674 2675 func (s *ImportModContext) IDENTIFIER(i int) antlr.TerminalNode { 2676 return s.GetToken(nevaParserIDENTIFIER, i) 2677 } 2678 2679 func (s *ImportModContext) AllImportModeDelim() []IImportModeDelimContext { 2680 children := s.GetChildren() 2681 len := 0 2682 for _, ctx := range children { 2683 if _, ok := ctx.(IImportModeDelimContext); ok { 2684 len++ 2685 } 2686 } 2687 2688 tst := make([]IImportModeDelimContext, len) 2689 i := 0 2690 for _, ctx := range children { 2691 if t, ok := ctx.(IImportModeDelimContext); ok { 2692 tst[i] = t.(IImportModeDelimContext) 2693 i++ 2694 } 2695 } 2696 2697 return tst 2698 } 2699 2700 func (s *ImportModContext) ImportModeDelim(i int) IImportModeDelimContext { 2701 var t antlr.RuleContext 2702 j := 0 2703 for _, ctx := range s.GetChildren() { 2704 if _, ok := ctx.(IImportModeDelimContext); ok { 2705 if j == i { 2706 t = ctx.(antlr.RuleContext) 2707 break 2708 } 2709 j++ 2710 } 2711 } 2712 2713 if t == nil { 2714 return nil 2715 } 2716 2717 return t.(IImportModeDelimContext) 2718 } 2719 2720 func (s *ImportModContext) GetRuleContext() antlr.RuleContext { 2721 return s 2722 } 2723 2724 func (s *ImportModContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 2725 return antlr.TreesStringTree(s, ruleNames, recog) 2726 } 2727 2728 func (s *ImportModContext) EnterRule(listener antlr.ParseTreeListener) { 2729 if listenerT, ok := listener.(nevaListener); ok { 2730 listenerT.EnterImportMod(s) 2731 } 2732 } 2733 2734 func (s *ImportModContext) ExitRule(listener antlr.ParseTreeListener) { 2735 if listenerT, ok := listener.(nevaListener); ok { 2736 listenerT.ExitImportMod(s) 2737 } 2738 } 2739 2740 func (p *nevaParser) ImportMod() (localctx IImportModContext) { 2741 localctx = NewImportModContext(p, p.GetParserRuleContext(), p.GetState()) 2742 p.EnterRule(localctx, 22, nevaParserRULE_importMod) 2743 var _la int 2744 2745 p.EnterOuterAlt(localctx, 1) 2746 { 2747 p.SetState(285) 2748 p.Match(nevaParserIDENTIFIER) 2749 if p.HasError() { 2750 // Recognition error - abort rule 2751 goto errorExit 2752 } 2753 } 2754 p.SetState(291) 2755 p.GetErrorHandler().Sync(p) 2756 if p.HasError() { 2757 goto errorExit 2758 } 2759 _la = p.GetTokenStream().LA(1) 2760 2761 for _la == nevaParserT__9 || _la == nevaParserT__10 { 2762 { 2763 p.SetState(286) 2764 p.ImportModeDelim() 2765 } 2766 { 2767 p.SetState(287) 2768 p.Match(nevaParserIDENTIFIER) 2769 if p.HasError() { 2770 // Recognition error - abort rule 2771 goto errorExit 2772 } 2773 } 2774 2775 p.SetState(293) 2776 p.GetErrorHandler().Sync(p) 2777 if p.HasError() { 2778 goto errorExit 2779 } 2780 _la = p.GetTokenStream().LA(1) 2781 } 2782 2783 errorExit: 2784 if p.HasError() { 2785 v := p.GetError() 2786 localctx.SetException(v) 2787 p.GetErrorHandler().ReportError(p, v) 2788 p.GetErrorHandler().Recover(p, v) 2789 p.SetError(nil) 2790 } 2791 p.ExitRule() 2792 return localctx 2793 goto errorExit // Trick to prevent compiler error if the label is not used 2794 } 2795 2796 // IImportModeDelimContext is an interface to support dynamic dispatch. 2797 type IImportModeDelimContext interface { 2798 antlr.ParserRuleContext 2799 2800 // GetParser returns the parser. 2801 GetParser() antlr.Parser 2802 // IsImportModeDelimContext differentiates from other interfaces. 2803 IsImportModeDelimContext() 2804 } 2805 2806 type ImportModeDelimContext struct { 2807 antlr.BaseParserRuleContext 2808 parser antlr.Parser 2809 } 2810 2811 func NewEmptyImportModeDelimContext() *ImportModeDelimContext { 2812 var p = new(ImportModeDelimContext) 2813 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 2814 p.RuleIndex = nevaParserRULE_importModeDelim 2815 return p 2816 } 2817 2818 func InitEmptyImportModeDelimContext(p *ImportModeDelimContext) { 2819 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 2820 p.RuleIndex = nevaParserRULE_importModeDelim 2821 } 2822 2823 func (*ImportModeDelimContext) IsImportModeDelimContext() {} 2824 2825 func NewImportModeDelimContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ImportModeDelimContext { 2826 var p = new(ImportModeDelimContext) 2827 2828 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 2829 2830 p.parser = parser 2831 p.RuleIndex = nevaParserRULE_importModeDelim 2832 2833 return p 2834 } 2835 2836 func (s *ImportModeDelimContext) GetParser() antlr.Parser { return s.parser } 2837 func (s *ImportModeDelimContext) GetRuleContext() antlr.RuleContext { 2838 return s 2839 } 2840 2841 func (s *ImportModeDelimContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 2842 return antlr.TreesStringTree(s, ruleNames, recog) 2843 } 2844 2845 func (s *ImportModeDelimContext) EnterRule(listener antlr.ParseTreeListener) { 2846 if listenerT, ok := listener.(nevaListener); ok { 2847 listenerT.EnterImportModeDelim(s) 2848 } 2849 } 2850 2851 func (s *ImportModeDelimContext) ExitRule(listener antlr.ParseTreeListener) { 2852 if listenerT, ok := listener.(nevaListener); ok { 2853 listenerT.ExitImportModeDelim(s) 2854 } 2855 } 2856 2857 func (p *nevaParser) ImportModeDelim() (localctx IImportModeDelimContext) { 2858 localctx = NewImportModeDelimContext(p, p.GetParserRuleContext(), p.GetState()) 2859 p.EnterRule(localctx, 24, nevaParserRULE_importModeDelim) 2860 var _la int 2861 2862 p.EnterOuterAlt(localctx, 1) 2863 { 2864 p.SetState(294) 2865 _la = p.GetTokenStream().LA(1) 2866 2867 if !(_la == nevaParserT__9 || _la == nevaParserT__10) { 2868 p.GetErrorHandler().RecoverInline(p) 2869 } else { 2870 p.GetErrorHandler().ReportMatch(p) 2871 p.Consume() 2872 } 2873 } 2874 2875 errorExit: 2876 if p.HasError() { 2877 v := p.GetError() 2878 localctx.SetException(v) 2879 p.GetErrorHandler().ReportError(p, v) 2880 p.GetErrorHandler().Recover(p, v) 2881 p.SetError(nil) 2882 } 2883 p.ExitRule() 2884 return localctx 2885 goto errorExit // Trick to prevent compiler error if the label is not used 2886 } 2887 2888 // IImportPathPkgContext is an interface to support dynamic dispatch. 2889 type IImportPathPkgContext interface { 2890 antlr.ParserRuleContext 2891 2892 // GetParser returns the parser. 2893 GetParser() antlr.Parser 2894 2895 // Getter signatures 2896 AllIDENTIFIER() []antlr.TerminalNode 2897 IDENTIFIER(i int) antlr.TerminalNode 2898 2899 // IsImportPathPkgContext differentiates from other interfaces. 2900 IsImportPathPkgContext() 2901 } 2902 2903 type ImportPathPkgContext struct { 2904 antlr.BaseParserRuleContext 2905 parser antlr.Parser 2906 } 2907 2908 func NewEmptyImportPathPkgContext() *ImportPathPkgContext { 2909 var p = new(ImportPathPkgContext) 2910 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 2911 p.RuleIndex = nevaParserRULE_importPathPkg 2912 return p 2913 } 2914 2915 func InitEmptyImportPathPkgContext(p *ImportPathPkgContext) { 2916 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 2917 p.RuleIndex = nevaParserRULE_importPathPkg 2918 } 2919 2920 func (*ImportPathPkgContext) IsImportPathPkgContext() {} 2921 2922 func NewImportPathPkgContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ImportPathPkgContext { 2923 var p = new(ImportPathPkgContext) 2924 2925 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 2926 2927 p.parser = parser 2928 p.RuleIndex = nevaParserRULE_importPathPkg 2929 2930 return p 2931 } 2932 2933 func (s *ImportPathPkgContext) GetParser() antlr.Parser { return s.parser } 2934 2935 func (s *ImportPathPkgContext) AllIDENTIFIER() []antlr.TerminalNode { 2936 return s.GetTokens(nevaParserIDENTIFIER) 2937 } 2938 2939 func (s *ImportPathPkgContext) IDENTIFIER(i int) antlr.TerminalNode { 2940 return s.GetToken(nevaParserIDENTIFIER, i) 2941 } 2942 2943 func (s *ImportPathPkgContext) GetRuleContext() antlr.RuleContext { 2944 return s 2945 } 2946 2947 func (s *ImportPathPkgContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 2948 return antlr.TreesStringTree(s, ruleNames, recog) 2949 } 2950 2951 func (s *ImportPathPkgContext) EnterRule(listener antlr.ParseTreeListener) { 2952 if listenerT, ok := listener.(nevaListener); ok { 2953 listenerT.EnterImportPathPkg(s) 2954 } 2955 } 2956 2957 func (s *ImportPathPkgContext) ExitRule(listener antlr.ParseTreeListener) { 2958 if listenerT, ok := listener.(nevaListener); ok { 2959 listenerT.ExitImportPathPkg(s) 2960 } 2961 } 2962 2963 func (p *nevaParser) ImportPathPkg() (localctx IImportPathPkgContext) { 2964 localctx = NewImportPathPkgContext(p, p.GetParserRuleContext(), p.GetState()) 2965 p.EnterRule(localctx, 26, nevaParserRULE_importPathPkg) 2966 var _la int 2967 2968 p.EnterOuterAlt(localctx, 1) 2969 { 2970 p.SetState(296) 2971 p.Match(nevaParserIDENTIFIER) 2972 if p.HasError() { 2973 // Recognition error - abort rule 2974 goto errorExit 2975 } 2976 } 2977 p.SetState(301) 2978 p.GetErrorHandler().Sync(p) 2979 if p.HasError() { 2980 goto errorExit 2981 } 2982 _la = p.GetTokenStream().LA(1) 2983 2984 for _la == nevaParserT__9 { 2985 { 2986 p.SetState(297) 2987 p.Match(nevaParserT__9) 2988 if p.HasError() { 2989 // Recognition error - abort rule 2990 goto errorExit 2991 } 2992 } 2993 { 2994 p.SetState(298) 2995 p.Match(nevaParserIDENTIFIER) 2996 if p.HasError() { 2997 // Recognition error - abort rule 2998 goto errorExit 2999 } 3000 } 3001 3002 p.SetState(303) 3003 p.GetErrorHandler().Sync(p) 3004 if p.HasError() { 3005 goto errorExit 3006 } 3007 _la = p.GetTokenStream().LA(1) 3008 } 3009 3010 errorExit: 3011 if p.HasError() { 3012 v := p.GetError() 3013 localctx.SetException(v) 3014 p.GetErrorHandler().ReportError(p, v) 3015 p.GetErrorHandler().Recover(p, v) 3016 p.SetError(nil) 3017 } 3018 p.ExitRule() 3019 return localctx 3020 goto errorExit // Trick to prevent compiler error if the label is not used 3021 } 3022 3023 // IEntityRefContext is an interface to support dynamic dispatch. 3024 type IEntityRefContext interface { 3025 antlr.ParserRuleContext 3026 3027 // GetParser returns the parser. 3028 GetParser() antlr.Parser 3029 3030 // Getter signatures 3031 ImportedEntityRef() IImportedEntityRefContext 3032 LocalEntityRef() ILocalEntityRefContext 3033 3034 // IsEntityRefContext differentiates from other interfaces. 3035 IsEntityRefContext() 3036 } 3037 3038 type EntityRefContext struct { 3039 antlr.BaseParserRuleContext 3040 parser antlr.Parser 3041 } 3042 3043 func NewEmptyEntityRefContext() *EntityRefContext { 3044 var p = new(EntityRefContext) 3045 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 3046 p.RuleIndex = nevaParserRULE_entityRef 3047 return p 3048 } 3049 3050 func InitEmptyEntityRefContext(p *EntityRefContext) { 3051 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 3052 p.RuleIndex = nevaParserRULE_entityRef 3053 } 3054 3055 func (*EntityRefContext) IsEntityRefContext() {} 3056 3057 func NewEntityRefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *EntityRefContext { 3058 var p = new(EntityRefContext) 3059 3060 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 3061 3062 p.parser = parser 3063 p.RuleIndex = nevaParserRULE_entityRef 3064 3065 return p 3066 } 3067 3068 func (s *EntityRefContext) GetParser() antlr.Parser { return s.parser } 3069 3070 func (s *EntityRefContext) ImportedEntityRef() IImportedEntityRefContext { 3071 var t antlr.RuleContext 3072 for _, ctx := range s.GetChildren() { 3073 if _, ok := ctx.(IImportedEntityRefContext); ok { 3074 t = ctx.(antlr.RuleContext) 3075 break 3076 } 3077 } 3078 3079 if t == nil { 3080 return nil 3081 } 3082 3083 return t.(IImportedEntityRefContext) 3084 } 3085 3086 func (s *EntityRefContext) LocalEntityRef() ILocalEntityRefContext { 3087 var t antlr.RuleContext 3088 for _, ctx := range s.GetChildren() { 3089 if _, ok := ctx.(ILocalEntityRefContext); ok { 3090 t = ctx.(antlr.RuleContext) 3091 break 3092 } 3093 } 3094 3095 if t == nil { 3096 return nil 3097 } 3098 3099 return t.(ILocalEntityRefContext) 3100 } 3101 3102 func (s *EntityRefContext) GetRuleContext() antlr.RuleContext { 3103 return s 3104 } 3105 3106 func (s *EntityRefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 3107 return antlr.TreesStringTree(s, ruleNames, recog) 3108 } 3109 3110 func (s *EntityRefContext) EnterRule(listener antlr.ParseTreeListener) { 3111 if listenerT, ok := listener.(nevaListener); ok { 3112 listenerT.EnterEntityRef(s) 3113 } 3114 } 3115 3116 func (s *EntityRefContext) ExitRule(listener antlr.ParseTreeListener) { 3117 if listenerT, ok := listener.(nevaListener); ok { 3118 listenerT.ExitEntityRef(s) 3119 } 3120 } 3121 3122 func (p *nevaParser) EntityRef() (localctx IEntityRefContext) { 3123 localctx = NewEntityRefContext(p, p.GetParserRuleContext(), p.GetState()) 3124 p.EnterRule(localctx, 28, nevaParserRULE_entityRef) 3125 p.SetState(306) 3126 p.GetErrorHandler().Sync(p) 3127 if p.HasError() { 3128 goto errorExit 3129 } 3130 3131 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 17, p.GetParserRuleContext()) { 3132 case 1: 3133 p.EnterOuterAlt(localctx, 1) 3134 { 3135 p.SetState(304) 3136 p.ImportedEntityRef() 3137 } 3138 3139 case 2: 3140 p.EnterOuterAlt(localctx, 2) 3141 { 3142 p.SetState(305) 3143 p.LocalEntityRef() 3144 } 3145 3146 case antlr.ATNInvalidAltNumber: 3147 goto errorExit 3148 } 3149 3150 errorExit: 3151 if p.HasError() { 3152 v := p.GetError() 3153 localctx.SetException(v) 3154 p.GetErrorHandler().ReportError(p, v) 3155 p.GetErrorHandler().Recover(p, v) 3156 p.SetError(nil) 3157 } 3158 p.ExitRule() 3159 return localctx 3160 goto errorExit // Trick to prevent compiler error if the label is not used 3161 } 3162 3163 // ILocalEntityRefContext is an interface to support dynamic dispatch. 3164 type ILocalEntityRefContext interface { 3165 antlr.ParserRuleContext 3166 3167 // GetParser returns the parser. 3168 GetParser() antlr.Parser 3169 3170 // Getter signatures 3171 IDENTIFIER() antlr.TerminalNode 3172 3173 // IsLocalEntityRefContext differentiates from other interfaces. 3174 IsLocalEntityRefContext() 3175 } 3176 3177 type LocalEntityRefContext struct { 3178 antlr.BaseParserRuleContext 3179 parser antlr.Parser 3180 } 3181 3182 func NewEmptyLocalEntityRefContext() *LocalEntityRefContext { 3183 var p = new(LocalEntityRefContext) 3184 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 3185 p.RuleIndex = nevaParserRULE_localEntityRef 3186 return p 3187 } 3188 3189 func InitEmptyLocalEntityRefContext(p *LocalEntityRefContext) { 3190 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 3191 p.RuleIndex = nevaParserRULE_localEntityRef 3192 } 3193 3194 func (*LocalEntityRefContext) IsLocalEntityRefContext() {} 3195 3196 func NewLocalEntityRefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LocalEntityRefContext { 3197 var p = new(LocalEntityRefContext) 3198 3199 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 3200 3201 p.parser = parser 3202 p.RuleIndex = nevaParserRULE_localEntityRef 3203 3204 return p 3205 } 3206 3207 func (s *LocalEntityRefContext) GetParser() antlr.Parser { return s.parser } 3208 3209 func (s *LocalEntityRefContext) IDENTIFIER() antlr.TerminalNode { 3210 return s.GetToken(nevaParserIDENTIFIER, 0) 3211 } 3212 3213 func (s *LocalEntityRefContext) GetRuleContext() antlr.RuleContext { 3214 return s 3215 } 3216 3217 func (s *LocalEntityRefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 3218 return antlr.TreesStringTree(s, ruleNames, recog) 3219 } 3220 3221 func (s *LocalEntityRefContext) EnterRule(listener antlr.ParseTreeListener) { 3222 if listenerT, ok := listener.(nevaListener); ok { 3223 listenerT.EnterLocalEntityRef(s) 3224 } 3225 } 3226 3227 func (s *LocalEntityRefContext) ExitRule(listener antlr.ParseTreeListener) { 3228 if listenerT, ok := listener.(nevaListener); ok { 3229 listenerT.ExitLocalEntityRef(s) 3230 } 3231 } 3232 3233 func (p *nevaParser) LocalEntityRef() (localctx ILocalEntityRefContext) { 3234 localctx = NewLocalEntityRefContext(p, p.GetParserRuleContext(), p.GetState()) 3235 p.EnterRule(localctx, 30, nevaParserRULE_localEntityRef) 3236 p.EnterOuterAlt(localctx, 1) 3237 { 3238 p.SetState(308) 3239 p.Match(nevaParserIDENTIFIER) 3240 if p.HasError() { 3241 // Recognition error - abort rule 3242 goto errorExit 3243 } 3244 } 3245 3246 errorExit: 3247 if p.HasError() { 3248 v := p.GetError() 3249 localctx.SetException(v) 3250 p.GetErrorHandler().ReportError(p, v) 3251 p.GetErrorHandler().Recover(p, v) 3252 p.SetError(nil) 3253 } 3254 p.ExitRule() 3255 return localctx 3256 goto errorExit // Trick to prevent compiler error if the label is not used 3257 } 3258 3259 // IImportedEntityRefContext is an interface to support dynamic dispatch. 3260 type IImportedEntityRefContext interface { 3261 antlr.ParserRuleContext 3262 3263 // GetParser returns the parser. 3264 GetParser() antlr.Parser 3265 3266 // Getter signatures 3267 PkgRef() IPkgRefContext 3268 EntityName() IEntityNameContext 3269 3270 // IsImportedEntityRefContext differentiates from other interfaces. 3271 IsImportedEntityRefContext() 3272 } 3273 3274 type ImportedEntityRefContext struct { 3275 antlr.BaseParserRuleContext 3276 parser antlr.Parser 3277 } 3278 3279 func NewEmptyImportedEntityRefContext() *ImportedEntityRefContext { 3280 var p = new(ImportedEntityRefContext) 3281 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 3282 p.RuleIndex = nevaParserRULE_importedEntityRef 3283 return p 3284 } 3285 3286 func InitEmptyImportedEntityRefContext(p *ImportedEntityRefContext) { 3287 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 3288 p.RuleIndex = nevaParserRULE_importedEntityRef 3289 } 3290 3291 func (*ImportedEntityRefContext) IsImportedEntityRefContext() {} 3292 3293 func NewImportedEntityRefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ImportedEntityRefContext { 3294 var p = new(ImportedEntityRefContext) 3295 3296 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 3297 3298 p.parser = parser 3299 p.RuleIndex = nevaParserRULE_importedEntityRef 3300 3301 return p 3302 } 3303 3304 func (s *ImportedEntityRefContext) GetParser() antlr.Parser { return s.parser } 3305 3306 func (s *ImportedEntityRefContext) PkgRef() IPkgRefContext { 3307 var t antlr.RuleContext 3308 for _, ctx := range s.GetChildren() { 3309 if _, ok := ctx.(IPkgRefContext); ok { 3310 t = ctx.(antlr.RuleContext) 3311 break 3312 } 3313 } 3314 3315 if t == nil { 3316 return nil 3317 } 3318 3319 return t.(IPkgRefContext) 3320 } 3321 3322 func (s *ImportedEntityRefContext) EntityName() IEntityNameContext { 3323 var t antlr.RuleContext 3324 for _, ctx := range s.GetChildren() { 3325 if _, ok := ctx.(IEntityNameContext); ok { 3326 t = ctx.(antlr.RuleContext) 3327 break 3328 } 3329 } 3330 3331 if t == nil { 3332 return nil 3333 } 3334 3335 return t.(IEntityNameContext) 3336 } 3337 3338 func (s *ImportedEntityRefContext) GetRuleContext() antlr.RuleContext { 3339 return s 3340 } 3341 3342 func (s *ImportedEntityRefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 3343 return antlr.TreesStringTree(s, ruleNames, recog) 3344 } 3345 3346 func (s *ImportedEntityRefContext) EnterRule(listener antlr.ParseTreeListener) { 3347 if listenerT, ok := listener.(nevaListener); ok { 3348 listenerT.EnterImportedEntityRef(s) 3349 } 3350 } 3351 3352 func (s *ImportedEntityRefContext) ExitRule(listener antlr.ParseTreeListener) { 3353 if listenerT, ok := listener.(nevaListener); ok { 3354 listenerT.ExitImportedEntityRef(s) 3355 } 3356 } 3357 3358 func (p *nevaParser) ImportedEntityRef() (localctx IImportedEntityRefContext) { 3359 localctx = NewImportedEntityRefContext(p, p.GetParserRuleContext(), p.GetState()) 3360 p.EnterRule(localctx, 32, nevaParserRULE_importedEntityRef) 3361 p.EnterOuterAlt(localctx, 1) 3362 { 3363 p.SetState(310) 3364 p.PkgRef() 3365 } 3366 { 3367 p.SetState(311) 3368 p.Match(nevaParserT__10) 3369 if p.HasError() { 3370 // Recognition error - abort rule 3371 goto errorExit 3372 } 3373 } 3374 { 3375 p.SetState(312) 3376 p.EntityName() 3377 } 3378 3379 errorExit: 3380 if p.HasError() { 3381 v := p.GetError() 3382 localctx.SetException(v) 3383 p.GetErrorHandler().ReportError(p, v) 3384 p.GetErrorHandler().Recover(p, v) 3385 p.SetError(nil) 3386 } 3387 p.ExitRule() 3388 return localctx 3389 goto errorExit // Trick to prevent compiler error if the label is not used 3390 } 3391 3392 // IPkgRefContext is an interface to support dynamic dispatch. 3393 type IPkgRefContext interface { 3394 antlr.ParserRuleContext 3395 3396 // GetParser returns the parser. 3397 GetParser() antlr.Parser 3398 3399 // Getter signatures 3400 IDENTIFIER() antlr.TerminalNode 3401 3402 // IsPkgRefContext differentiates from other interfaces. 3403 IsPkgRefContext() 3404 } 3405 3406 type PkgRefContext struct { 3407 antlr.BaseParserRuleContext 3408 parser antlr.Parser 3409 } 3410 3411 func NewEmptyPkgRefContext() *PkgRefContext { 3412 var p = new(PkgRefContext) 3413 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 3414 p.RuleIndex = nevaParserRULE_pkgRef 3415 return p 3416 } 3417 3418 func InitEmptyPkgRefContext(p *PkgRefContext) { 3419 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 3420 p.RuleIndex = nevaParserRULE_pkgRef 3421 } 3422 3423 func (*PkgRefContext) IsPkgRefContext() {} 3424 3425 func NewPkgRefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PkgRefContext { 3426 var p = new(PkgRefContext) 3427 3428 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 3429 3430 p.parser = parser 3431 p.RuleIndex = nevaParserRULE_pkgRef 3432 3433 return p 3434 } 3435 3436 func (s *PkgRefContext) GetParser() antlr.Parser { return s.parser } 3437 3438 func (s *PkgRefContext) IDENTIFIER() antlr.TerminalNode { 3439 return s.GetToken(nevaParserIDENTIFIER, 0) 3440 } 3441 3442 func (s *PkgRefContext) GetRuleContext() antlr.RuleContext { 3443 return s 3444 } 3445 3446 func (s *PkgRefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 3447 return antlr.TreesStringTree(s, ruleNames, recog) 3448 } 3449 3450 func (s *PkgRefContext) EnterRule(listener antlr.ParseTreeListener) { 3451 if listenerT, ok := listener.(nevaListener); ok { 3452 listenerT.EnterPkgRef(s) 3453 } 3454 } 3455 3456 func (s *PkgRefContext) ExitRule(listener antlr.ParseTreeListener) { 3457 if listenerT, ok := listener.(nevaListener); ok { 3458 listenerT.ExitPkgRef(s) 3459 } 3460 } 3461 3462 func (p *nevaParser) PkgRef() (localctx IPkgRefContext) { 3463 localctx = NewPkgRefContext(p, p.GetParserRuleContext(), p.GetState()) 3464 p.EnterRule(localctx, 34, nevaParserRULE_pkgRef) 3465 p.EnterOuterAlt(localctx, 1) 3466 { 3467 p.SetState(314) 3468 p.Match(nevaParserIDENTIFIER) 3469 if p.HasError() { 3470 // Recognition error - abort rule 3471 goto errorExit 3472 } 3473 } 3474 3475 errorExit: 3476 if p.HasError() { 3477 v := p.GetError() 3478 localctx.SetException(v) 3479 p.GetErrorHandler().ReportError(p, v) 3480 p.GetErrorHandler().Recover(p, v) 3481 p.SetError(nil) 3482 } 3483 p.ExitRule() 3484 return localctx 3485 goto errorExit // Trick to prevent compiler error if the label is not used 3486 } 3487 3488 // IEntityNameContext is an interface to support dynamic dispatch. 3489 type IEntityNameContext interface { 3490 antlr.ParserRuleContext 3491 3492 // GetParser returns the parser. 3493 GetParser() antlr.Parser 3494 3495 // Getter signatures 3496 IDENTIFIER() antlr.TerminalNode 3497 3498 // IsEntityNameContext differentiates from other interfaces. 3499 IsEntityNameContext() 3500 } 3501 3502 type EntityNameContext struct { 3503 antlr.BaseParserRuleContext 3504 parser antlr.Parser 3505 } 3506 3507 func NewEmptyEntityNameContext() *EntityNameContext { 3508 var p = new(EntityNameContext) 3509 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 3510 p.RuleIndex = nevaParserRULE_entityName 3511 return p 3512 } 3513 3514 func InitEmptyEntityNameContext(p *EntityNameContext) { 3515 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 3516 p.RuleIndex = nevaParserRULE_entityName 3517 } 3518 3519 func (*EntityNameContext) IsEntityNameContext() {} 3520 3521 func NewEntityNameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *EntityNameContext { 3522 var p = new(EntityNameContext) 3523 3524 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 3525 3526 p.parser = parser 3527 p.RuleIndex = nevaParserRULE_entityName 3528 3529 return p 3530 } 3531 3532 func (s *EntityNameContext) GetParser() antlr.Parser { return s.parser } 3533 3534 func (s *EntityNameContext) IDENTIFIER() antlr.TerminalNode { 3535 return s.GetToken(nevaParserIDENTIFIER, 0) 3536 } 3537 3538 func (s *EntityNameContext) GetRuleContext() antlr.RuleContext { 3539 return s 3540 } 3541 3542 func (s *EntityNameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 3543 return antlr.TreesStringTree(s, ruleNames, recog) 3544 } 3545 3546 func (s *EntityNameContext) EnterRule(listener antlr.ParseTreeListener) { 3547 if listenerT, ok := listener.(nevaListener); ok { 3548 listenerT.EnterEntityName(s) 3549 } 3550 } 3551 3552 func (s *EntityNameContext) ExitRule(listener antlr.ParseTreeListener) { 3553 if listenerT, ok := listener.(nevaListener); ok { 3554 listenerT.ExitEntityName(s) 3555 } 3556 } 3557 3558 func (p *nevaParser) EntityName() (localctx IEntityNameContext) { 3559 localctx = NewEntityNameContext(p, p.GetParserRuleContext(), p.GetState()) 3560 p.EnterRule(localctx, 36, nevaParserRULE_entityName) 3561 p.EnterOuterAlt(localctx, 1) 3562 { 3563 p.SetState(316) 3564 p.Match(nevaParserIDENTIFIER) 3565 if p.HasError() { 3566 // Recognition error - abort rule 3567 goto errorExit 3568 } 3569 } 3570 3571 errorExit: 3572 if p.HasError() { 3573 v := p.GetError() 3574 localctx.SetException(v) 3575 p.GetErrorHandler().ReportError(p, v) 3576 p.GetErrorHandler().Recover(p, v) 3577 p.SetError(nil) 3578 } 3579 p.ExitRule() 3580 return localctx 3581 goto errorExit // Trick to prevent compiler error if the label is not used 3582 } 3583 3584 // ITypeStmtContext is an interface to support dynamic dispatch. 3585 type ITypeStmtContext interface { 3586 antlr.ParserRuleContext 3587 3588 // GetParser returns the parser. 3589 GetParser() antlr.Parser 3590 3591 // Getter signatures 3592 SingleTypeStmt() ISingleTypeStmtContext 3593 GroupTypeStmt() IGroupTypeStmtContext 3594 3595 // IsTypeStmtContext differentiates from other interfaces. 3596 IsTypeStmtContext() 3597 } 3598 3599 type TypeStmtContext struct { 3600 antlr.BaseParserRuleContext 3601 parser antlr.Parser 3602 } 3603 3604 func NewEmptyTypeStmtContext() *TypeStmtContext { 3605 var p = new(TypeStmtContext) 3606 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 3607 p.RuleIndex = nevaParserRULE_typeStmt 3608 return p 3609 } 3610 3611 func InitEmptyTypeStmtContext(p *TypeStmtContext) { 3612 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 3613 p.RuleIndex = nevaParserRULE_typeStmt 3614 } 3615 3616 func (*TypeStmtContext) IsTypeStmtContext() {} 3617 3618 func NewTypeStmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeStmtContext { 3619 var p = new(TypeStmtContext) 3620 3621 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 3622 3623 p.parser = parser 3624 p.RuleIndex = nevaParserRULE_typeStmt 3625 3626 return p 3627 } 3628 3629 func (s *TypeStmtContext) GetParser() antlr.Parser { return s.parser } 3630 3631 func (s *TypeStmtContext) SingleTypeStmt() ISingleTypeStmtContext { 3632 var t antlr.RuleContext 3633 for _, ctx := range s.GetChildren() { 3634 if _, ok := ctx.(ISingleTypeStmtContext); ok { 3635 t = ctx.(antlr.RuleContext) 3636 break 3637 } 3638 } 3639 3640 if t == nil { 3641 return nil 3642 } 3643 3644 return t.(ISingleTypeStmtContext) 3645 } 3646 3647 func (s *TypeStmtContext) GroupTypeStmt() IGroupTypeStmtContext { 3648 var t antlr.RuleContext 3649 for _, ctx := range s.GetChildren() { 3650 if _, ok := ctx.(IGroupTypeStmtContext); ok { 3651 t = ctx.(antlr.RuleContext) 3652 break 3653 } 3654 } 3655 3656 if t == nil { 3657 return nil 3658 } 3659 3660 return t.(IGroupTypeStmtContext) 3661 } 3662 3663 func (s *TypeStmtContext) GetRuleContext() antlr.RuleContext { 3664 return s 3665 } 3666 3667 func (s *TypeStmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 3668 return antlr.TreesStringTree(s, ruleNames, recog) 3669 } 3670 3671 func (s *TypeStmtContext) EnterRule(listener antlr.ParseTreeListener) { 3672 if listenerT, ok := listener.(nevaListener); ok { 3673 listenerT.EnterTypeStmt(s) 3674 } 3675 } 3676 3677 func (s *TypeStmtContext) ExitRule(listener antlr.ParseTreeListener) { 3678 if listenerT, ok := listener.(nevaListener); ok { 3679 listenerT.ExitTypeStmt(s) 3680 } 3681 } 3682 3683 func (p *nevaParser) TypeStmt() (localctx ITypeStmtContext) { 3684 localctx = NewTypeStmtContext(p, p.GetParserRuleContext(), p.GetState()) 3685 p.EnterRule(localctx, 38, nevaParserRULE_typeStmt) 3686 p.SetState(320) 3687 p.GetErrorHandler().Sync(p) 3688 if p.HasError() { 3689 goto errorExit 3690 } 3691 3692 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 18, p.GetParserRuleContext()) { 3693 case 1: 3694 p.EnterOuterAlt(localctx, 1) 3695 { 3696 p.SetState(318) 3697 p.SingleTypeStmt() 3698 } 3699 3700 case 2: 3701 p.EnterOuterAlt(localctx, 2) 3702 { 3703 p.SetState(319) 3704 p.GroupTypeStmt() 3705 } 3706 3707 case antlr.ATNInvalidAltNumber: 3708 goto errorExit 3709 } 3710 3711 errorExit: 3712 if p.HasError() { 3713 v := p.GetError() 3714 localctx.SetException(v) 3715 p.GetErrorHandler().ReportError(p, v) 3716 p.GetErrorHandler().Recover(p, v) 3717 p.SetError(nil) 3718 } 3719 p.ExitRule() 3720 return localctx 3721 goto errorExit // Trick to prevent compiler error if the label is not used 3722 } 3723 3724 // ISingleTypeStmtContext is an interface to support dynamic dispatch. 3725 type ISingleTypeStmtContext interface { 3726 antlr.ParserRuleContext 3727 3728 // GetParser returns the parser. 3729 GetParser() antlr.Parser 3730 3731 // Getter signatures 3732 TypeDef() ITypeDefContext 3733 PUB_KW() antlr.TerminalNode 3734 3735 // IsSingleTypeStmtContext differentiates from other interfaces. 3736 IsSingleTypeStmtContext() 3737 } 3738 3739 type SingleTypeStmtContext struct { 3740 antlr.BaseParserRuleContext 3741 parser antlr.Parser 3742 } 3743 3744 func NewEmptySingleTypeStmtContext() *SingleTypeStmtContext { 3745 var p = new(SingleTypeStmtContext) 3746 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 3747 p.RuleIndex = nevaParserRULE_singleTypeStmt 3748 return p 3749 } 3750 3751 func InitEmptySingleTypeStmtContext(p *SingleTypeStmtContext) { 3752 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 3753 p.RuleIndex = nevaParserRULE_singleTypeStmt 3754 } 3755 3756 func (*SingleTypeStmtContext) IsSingleTypeStmtContext() {} 3757 3758 func NewSingleTypeStmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SingleTypeStmtContext { 3759 var p = new(SingleTypeStmtContext) 3760 3761 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 3762 3763 p.parser = parser 3764 p.RuleIndex = nevaParserRULE_singleTypeStmt 3765 3766 return p 3767 } 3768 3769 func (s *SingleTypeStmtContext) GetParser() antlr.Parser { return s.parser } 3770 3771 func (s *SingleTypeStmtContext) TypeDef() ITypeDefContext { 3772 var t antlr.RuleContext 3773 for _, ctx := range s.GetChildren() { 3774 if _, ok := ctx.(ITypeDefContext); ok { 3775 t = ctx.(antlr.RuleContext) 3776 break 3777 } 3778 } 3779 3780 if t == nil { 3781 return nil 3782 } 3783 3784 return t.(ITypeDefContext) 3785 } 3786 3787 func (s *SingleTypeStmtContext) PUB_KW() antlr.TerminalNode { 3788 return s.GetToken(nevaParserPUB_KW, 0) 3789 } 3790 3791 func (s *SingleTypeStmtContext) GetRuleContext() antlr.RuleContext { 3792 return s 3793 } 3794 3795 func (s *SingleTypeStmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 3796 return antlr.TreesStringTree(s, ruleNames, recog) 3797 } 3798 3799 func (s *SingleTypeStmtContext) EnterRule(listener antlr.ParseTreeListener) { 3800 if listenerT, ok := listener.(nevaListener); ok { 3801 listenerT.EnterSingleTypeStmt(s) 3802 } 3803 } 3804 3805 func (s *SingleTypeStmtContext) ExitRule(listener antlr.ParseTreeListener) { 3806 if listenerT, ok := listener.(nevaListener); ok { 3807 listenerT.ExitSingleTypeStmt(s) 3808 } 3809 } 3810 3811 func (p *nevaParser) SingleTypeStmt() (localctx ISingleTypeStmtContext) { 3812 localctx = NewSingleTypeStmtContext(p, p.GetParserRuleContext(), p.GetState()) 3813 p.EnterRule(localctx, 40, nevaParserRULE_singleTypeStmt) 3814 var _la int 3815 3816 p.EnterOuterAlt(localctx, 1) 3817 p.SetState(323) 3818 p.GetErrorHandler().Sync(p) 3819 if p.HasError() { 3820 goto errorExit 3821 } 3822 _la = p.GetTokenStream().LA(1) 3823 3824 if _la == nevaParserPUB_KW { 3825 { 3826 p.SetState(322) 3827 p.Match(nevaParserPUB_KW) 3828 if p.HasError() { 3829 // Recognition error - abort rule 3830 goto errorExit 3831 } 3832 } 3833 3834 } 3835 { 3836 p.SetState(325) 3837 p.Match(nevaParserT__11) 3838 if p.HasError() { 3839 // Recognition error - abort rule 3840 goto errorExit 3841 } 3842 } 3843 { 3844 p.SetState(326) 3845 p.TypeDef() 3846 } 3847 3848 errorExit: 3849 if p.HasError() { 3850 v := p.GetError() 3851 localctx.SetException(v) 3852 p.GetErrorHandler().ReportError(p, v) 3853 p.GetErrorHandler().Recover(p, v) 3854 p.SetError(nil) 3855 } 3856 p.ExitRule() 3857 return localctx 3858 goto errorExit // Trick to prevent compiler error if the label is not used 3859 } 3860 3861 // IGroupTypeStmtContext is an interface to support dynamic dispatch. 3862 type IGroupTypeStmtContext interface { 3863 antlr.ParserRuleContext 3864 3865 // GetParser returns the parser. 3866 GetParser() antlr.Parser 3867 3868 // Getter signatures 3869 AllNEWLINE() []antlr.TerminalNode 3870 NEWLINE(i int) antlr.TerminalNode 3871 AllTypeDef() []ITypeDefContext 3872 TypeDef(i int) ITypeDefContext 3873 AllPUB_KW() []antlr.TerminalNode 3874 PUB_KW(i int) antlr.TerminalNode 3875 3876 // IsGroupTypeStmtContext differentiates from other interfaces. 3877 IsGroupTypeStmtContext() 3878 } 3879 3880 type GroupTypeStmtContext struct { 3881 antlr.BaseParserRuleContext 3882 parser antlr.Parser 3883 } 3884 3885 func NewEmptyGroupTypeStmtContext() *GroupTypeStmtContext { 3886 var p = new(GroupTypeStmtContext) 3887 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 3888 p.RuleIndex = nevaParserRULE_groupTypeStmt 3889 return p 3890 } 3891 3892 func InitEmptyGroupTypeStmtContext(p *GroupTypeStmtContext) { 3893 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 3894 p.RuleIndex = nevaParserRULE_groupTypeStmt 3895 } 3896 3897 func (*GroupTypeStmtContext) IsGroupTypeStmtContext() {} 3898 3899 func NewGroupTypeStmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *GroupTypeStmtContext { 3900 var p = new(GroupTypeStmtContext) 3901 3902 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 3903 3904 p.parser = parser 3905 p.RuleIndex = nevaParserRULE_groupTypeStmt 3906 3907 return p 3908 } 3909 3910 func (s *GroupTypeStmtContext) GetParser() antlr.Parser { return s.parser } 3911 3912 func (s *GroupTypeStmtContext) AllNEWLINE() []antlr.TerminalNode { 3913 return s.GetTokens(nevaParserNEWLINE) 3914 } 3915 3916 func (s *GroupTypeStmtContext) NEWLINE(i int) antlr.TerminalNode { 3917 return s.GetToken(nevaParserNEWLINE, i) 3918 } 3919 3920 func (s *GroupTypeStmtContext) AllTypeDef() []ITypeDefContext { 3921 children := s.GetChildren() 3922 len := 0 3923 for _, ctx := range children { 3924 if _, ok := ctx.(ITypeDefContext); ok { 3925 len++ 3926 } 3927 } 3928 3929 tst := make([]ITypeDefContext, len) 3930 i := 0 3931 for _, ctx := range children { 3932 if t, ok := ctx.(ITypeDefContext); ok { 3933 tst[i] = t.(ITypeDefContext) 3934 i++ 3935 } 3936 } 3937 3938 return tst 3939 } 3940 3941 func (s *GroupTypeStmtContext) TypeDef(i int) ITypeDefContext { 3942 var t antlr.RuleContext 3943 j := 0 3944 for _, ctx := range s.GetChildren() { 3945 if _, ok := ctx.(ITypeDefContext); ok { 3946 if j == i { 3947 t = ctx.(antlr.RuleContext) 3948 break 3949 } 3950 j++ 3951 } 3952 } 3953 3954 if t == nil { 3955 return nil 3956 } 3957 3958 return t.(ITypeDefContext) 3959 } 3960 3961 func (s *GroupTypeStmtContext) AllPUB_KW() []antlr.TerminalNode { 3962 return s.GetTokens(nevaParserPUB_KW) 3963 } 3964 3965 func (s *GroupTypeStmtContext) PUB_KW(i int) antlr.TerminalNode { 3966 return s.GetToken(nevaParserPUB_KW, i) 3967 } 3968 3969 func (s *GroupTypeStmtContext) GetRuleContext() antlr.RuleContext { 3970 return s 3971 } 3972 3973 func (s *GroupTypeStmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 3974 return antlr.TreesStringTree(s, ruleNames, recog) 3975 } 3976 3977 func (s *GroupTypeStmtContext) EnterRule(listener antlr.ParseTreeListener) { 3978 if listenerT, ok := listener.(nevaListener); ok { 3979 listenerT.EnterGroupTypeStmt(s) 3980 } 3981 } 3982 3983 func (s *GroupTypeStmtContext) ExitRule(listener antlr.ParseTreeListener) { 3984 if listenerT, ok := listener.(nevaListener); ok { 3985 listenerT.ExitGroupTypeStmt(s) 3986 } 3987 } 3988 3989 func (p *nevaParser) GroupTypeStmt() (localctx IGroupTypeStmtContext) { 3990 localctx = NewGroupTypeStmtContext(p, p.GetParserRuleContext(), p.GetState()) 3991 p.EnterRule(localctx, 42, nevaParserRULE_groupTypeStmt) 3992 var _la int 3993 3994 p.EnterOuterAlt(localctx, 1) 3995 { 3996 p.SetState(328) 3997 p.Match(nevaParserT__11) 3998 if p.HasError() { 3999 // Recognition error - abort rule 4000 goto errorExit 4001 } 4002 } 4003 p.SetState(332) 4004 p.GetErrorHandler().Sync(p) 4005 if p.HasError() { 4006 goto errorExit 4007 } 4008 _la = p.GetTokenStream().LA(1) 4009 4010 for _la == nevaParserNEWLINE { 4011 { 4012 p.SetState(329) 4013 p.Match(nevaParserNEWLINE) 4014 if p.HasError() { 4015 // Recognition error - abort rule 4016 goto errorExit 4017 } 4018 } 4019 4020 p.SetState(334) 4021 p.GetErrorHandler().Sync(p) 4022 if p.HasError() { 4023 goto errorExit 4024 } 4025 _la = p.GetTokenStream().LA(1) 4026 } 4027 { 4028 p.SetState(335) 4029 p.Match(nevaParserT__5) 4030 if p.HasError() { 4031 // Recognition error - abort rule 4032 goto errorExit 4033 } 4034 } 4035 p.SetState(339) 4036 p.GetErrorHandler().Sync(p) 4037 if p.HasError() { 4038 goto errorExit 4039 } 4040 _la = p.GetTokenStream().LA(1) 4041 4042 for _la == nevaParserNEWLINE { 4043 { 4044 p.SetState(336) 4045 p.Match(nevaParserNEWLINE) 4046 if p.HasError() { 4047 // Recognition error - abort rule 4048 goto errorExit 4049 } 4050 } 4051 4052 p.SetState(341) 4053 p.GetErrorHandler().Sync(p) 4054 if p.HasError() { 4055 goto errorExit 4056 } 4057 _la = p.GetTokenStream().LA(1) 4058 } 4059 p.SetState(354) 4060 p.GetErrorHandler().Sync(p) 4061 if p.HasError() { 4062 goto errorExit 4063 } 4064 _la = p.GetTokenStream().LA(1) 4065 4066 for _la == nevaParserPUB_KW || _la == nevaParserIDENTIFIER { 4067 p.SetState(343) 4068 p.GetErrorHandler().Sync(p) 4069 if p.HasError() { 4070 goto errorExit 4071 } 4072 _la = p.GetTokenStream().LA(1) 4073 4074 if _la == nevaParserPUB_KW { 4075 { 4076 p.SetState(342) 4077 p.Match(nevaParserPUB_KW) 4078 if p.HasError() { 4079 // Recognition error - abort rule 4080 goto errorExit 4081 } 4082 } 4083 4084 } 4085 { 4086 p.SetState(345) 4087 p.TypeDef() 4088 } 4089 p.SetState(349) 4090 p.GetErrorHandler().Sync(p) 4091 if p.HasError() { 4092 goto errorExit 4093 } 4094 _la = p.GetTokenStream().LA(1) 4095 4096 for _la == nevaParserNEWLINE { 4097 { 4098 p.SetState(346) 4099 p.Match(nevaParserNEWLINE) 4100 if p.HasError() { 4101 // Recognition error - abort rule 4102 goto errorExit 4103 } 4104 } 4105 4106 p.SetState(351) 4107 p.GetErrorHandler().Sync(p) 4108 if p.HasError() { 4109 goto errorExit 4110 } 4111 _la = p.GetTokenStream().LA(1) 4112 } 4113 4114 p.SetState(356) 4115 p.GetErrorHandler().Sync(p) 4116 if p.HasError() { 4117 goto errorExit 4118 } 4119 _la = p.GetTokenStream().LA(1) 4120 } 4121 { 4122 p.SetState(357) 4123 p.Match(nevaParserT__6) 4124 if p.HasError() { 4125 // Recognition error - abort rule 4126 goto errorExit 4127 } 4128 } 4129 4130 errorExit: 4131 if p.HasError() { 4132 v := p.GetError() 4133 localctx.SetException(v) 4134 p.GetErrorHandler().ReportError(p, v) 4135 p.GetErrorHandler().Recover(p, v) 4136 p.SetError(nil) 4137 } 4138 p.ExitRule() 4139 return localctx 4140 goto errorExit // Trick to prevent compiler error if the label is not used 4141 } 4142 4143 // ITypeDefContext is an interface to support dynamic dispatch. 4144 type ITypeDefContext interface { 4145 antlr.ParserRuleContext 4146 4147 // GetParser returns the parser. 4148 GetParser() antlr.Parser 4149 4150 // Getter signatures 4151 IDENTIFIER() antlr.TerminalNode 4152 TypeParams() ITypeParamsContext 4153 TypeExpr() ITypeExprContext 4154 COMMENT() antlr.TerminalNode 4155 4156 // IsTypeDefContext differentiates from other interfaces. 4157 IsTypeDefContext() 4158 } 4159 4160 type TypeDefContext struct { 4161 antlr.BaseParserRuleContext 4162 parser antlr.Parser 4163 } 4164 4165 func NewEmptyTypeDefContext() *TypeDefContext { 4166 var p = new(TypeDefContext) 4167 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 4168 p.RuleIndex = nevaParserRULE_typeDef 4169 return p 4170 } 4171 4172 func InitEmptyTypeDefContext(p *TypeDefContext) { 4173 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 4174 p.RuleIndex = nevaParserRULE_typeDef 4175 } 4176 4177 func (*TypeDefContext) IsTypeDefContext() {} 4178 4179 func NewTypeDefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeDefContext { 4180 var p = new(TypeDefContext) 4181 4182 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 4183 4184 p.parser = parser 4185 p.RuleIndex = nevaParserRULE_typeDef 4186 4187 return p 4188 } 4189 4190 func (s *TypeDefContext) GetParser() antlr.Parser { return s.parser } 4191 4192 func (s *TypeDefContext) IDENTIFIER() antlr.TerminalNode { 4193 return s.GetToken(nevaParserIDENTIFIER, 0) 4194 } 4195 4196 func (s *TypeDefContext) TypeParams() ITypeParamsContext { 4197 var t antlr.RuleContext 4198 for _, ctx := range s.GetChildren() { 4199 if _, ok := ctx.(ITypeParamsContext); ok { 4200 t = ctx.(antlr.RuleContext) 4201 break 4202 } 4203 } 4204 4205 if t == nil { 4206 return nil 4207 } 4208 4209 return t.(ITypeParamsContext) 4210 } 4211 4212 func (s *TypeDefContext) TypeExpr() ITypeExprContext { 4213 var t antlr.RuleContext 4214 for _, ctx := range s.GetChildren() { 4215 if _, ok := ctx.(ITypeExprContext); ok { 4216 t = ctx.(antlr.RuleContext) 4217 break 4218 } 4219 } 4220 4221 if t == nil { 4222 return nil 4223 } 4224 4225 return t.(ITypeExprContext) 4226 } 4227 4228 func (s *TypeDefContext) COMMENT() antlr.TerminalNode { 4229 return s.GetToken(nevaParserCOMMENT, 0) 4230 } 4231 4232 func (s *TypeDefContext) GetRuleContext() antlr.RuleContext { 4233 return s 4234 } 4235 4236 func (s *TypeDefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 4237 return antlr.TreesStringTree(s, ruleNames, recog) 4238 } 4239 4240 func (s *TypeDefContext) EnterRule(listener antlr.ParseTreeListener) { 4241 if listenerT, ok := listener.(nevaListener); ok { 4242 listenerT.EnterTypeDef(s) 4243 } 4244 } 4245 4246 func (s *TypeDefContext) ExitRule(listener antlr.ParseTreeListener) { 4247 if listenerT, ok := listener.(nevaListener); ok { 4248 listenerT.ExitTypeDef(s) 4249 } 4250 } 4251 4252 func (p *nevaParser) TypeDef() (localctx ITypeDefContext) { 4253 localctx = NewTypeDefContext(p, p.GetParserRuleContext(), p.GetState()) 4254 p.EnterRule(localctx, 44, nevaParserRULE_typeDef) 4255 var _la int 4256 4257 p.EnterOuterAlt(localctx, 1) 4258 { 4259 p.SetState(359) 4260 p.Match(nevaParserIDENTIFIER) 4261 if p.HasError() { 4262 // Recognition error - abort rule 4263 goto errorExit 4264 } 4265 } 4266 p.SetState(361) 4267 p.GetErrorHandler().Sync(p) 4268 if p.HasError() { 4269 goto errorExit 4270 } 4271 _la = p.GetTokenStream().LA(1) 4272 4273 if _la == nevaParserT__12 { 4274 { 4275 p.SetState(360) 4276 p.TypeParams() 4277 } 4278 4279 } 4280 p.SetState(364) 4281 p.GetErrorHandler().Sync(p) 4282 4283 if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 26, p.GetParserRuleContext()) == 1 { 4284 { 4285 p.SetState(363) 4286 p.TypeExpr() 4287 } 4288 4289 } else if p.HasError() { // JIM 4290 goto errorExit 4291 } 4292 p.SetState(367) 4293 p.GetErrorHandler().Sync(p) 4294 4295 if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 27, p.GetParserRuleContext()) == 1 { 4296 { 4297 p.SetState(366) 4298 p.Match(nevaParserCOMMENT) 4299 if p.HasError() { 4300 // Recognition error - abort rule 4301 goto errorExit 4302 } 4303 } 4304 4305 } else if p.HasError() { // JIM 4306 goto errorExit 4307 } 4308 4309 errorExit: 4310 if p.HasError() { 4311 v := p.GetError() 4312 localctx.SetException(v) 4313 p.GetErrorHandler().ReportError(p, v) 4314 p.GetErrorHandler().Recover(p, v) 4315 p.SetError(nil) 4316 } 4317 p.ExitRule() 4318 return localctx 4319 goto errorExit // Trick to prevent compiler error if the label is not used 4320 } 4321 4322 // ITypeParamsContext is an interface to support dynamic dispatch. 4323 type ITypeParamsContext interface { 4324 antlr.ParserRuleContext 4325 4326 // GetParser returns the parser. 4327 GetParser() antlr.Parser 4328 4329 // Getter signatures 4330 AllNEWLINE() []antlr.TerminalNode 4331 NEWLINE(i int) antlr.TerminalNode 4332 TypeParamList() ITypeParamListContext 4333 4334 // IsTypeParamsContext differentiates from other interfaces. 4335 IsTypeParamsContext() 4336 } 4337 4338 type TypeParamsContext struct { 4339 antlr.BaseParserRuleContext 4340 parser antlr.Parser 4341 } 4342 4343 func NewEmptyTypeParamsContext() *TypeParamsContext { 4344 var p = new(TypeParamsContext) 4345 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 4346 p.RuleIndex = nevaParserRULE_typeParams 4347 return p 4348 } 4349 4350 func InitEmptyTypeParamsContext(p *TypeParamsContext) { 4351 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 4352 p.RuleIndex = nevaParserRULE_typeParams 4353 } 4354 4355 func (*TypeParamsContext) IsTypeParamsContext() {} 4356 4357 func NewTypeParamsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeParamsContext { 4358 var p = new(TypeParamsContext) 4359 4360 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 4361 4362 p.parser = parser 4363 p.RuleIndex = nevaParserRULE_typeParams 4364 4365 return p 4366 } 4367 4368 func (s *TypeParamsContext) GetParser() antlr.Parser { return s.parser } 4369 4370 func (s *TypeParamsContext) AllNEWLINE() []antlr.TerminalNode { 4371 return s.GetTokens(nevaParserNEWLINE) 4372 } 4373 4374 func (s *TypeParamsContext) NEWLINE(i int) antlr.TerminalNode { 4375 return s.GetToken(nevaParserNEWLINE, i) 4376 } 4377 4378 func (s *TypeParamsContext) TypeParamList() ITypeParamListContext { 4379 var t antlr.RuleContext 4380 for _, ctx := range s.GetChildren() { 4381 if _, ok := ctx.(ITypeParamListContext); ok { 4382 t = ctx.(antlr.RuleContext) 4383 break 4384 } 4385 } 4386 4387 if t == nil { 4388 return nil 4389 } 4390 4391 return t.(ITypeParamListContext) 4392 } 4393 4394 func (s *TypeParamsContext) GetRuleContext() antlr.RuleContext { 4395 return s 4396 } 4397 4398 func (s *TypeParamsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 4399 return antlr.TreesStringTree(s, ruleNames, recog) 4400 } 4401 4402 func (s *TypeParamsContext) EnterRule(listener antlr.ParseTreeListener) { 4403 if listenerT, ok := listener.(nevaListener); ok { 4404 listenerT.EnterTypeParams(s) 4405 } 4406 } 4407 4408 func (s *TypeParamsContext) ExitRule(listener antlr.ParseTreeListener) { 4409 if listenerT, ok := listener.(nevaListener); ok { 4410 listenerT.ExitTypeParams(s) 4411 } 4412 } 4413 4414 func (p *nevaParser) TypeParams() (localctx ITypeParamsContext) { 4415 localctx = NewTypeParamsContext(p, p.GetParserRuleContext(), p.GetState()) 4416 p.EnterRule(localctx, 46, nevaParserRULE_typeParams) 4417 var _la int 4418 4419 p.EnterOuterAlt(localctx, 1) 4420 { 4421 p.SetState(369) 4422 p.Match(nevaParserT__12) 4423 if p.HasError() { 4424 // Recognition error - abort rule 4425 goto errorExit 4426 } 4427 } 4428 p.SetState(373) 4429 p.GetErrorHandler().Sync(p) 4430 if p.HasError() { 4431 goto errorExit 4432 } 4433 _la = p.GetTokenStream().LA(1) 4434 4435 for _la == nevaParserNEWLINE { 4436 { 4437 p.SetState(370) 4438 p.Match(nevaParserNEWLINE) 4439 if p.HasError() { 4440 // Recognition error - abort rule 4441 goto errorExit 4442 } 4443 } 4444 4445 p.SetState(375) 4446 p.GetErrorHandler().Sync(p) 4447 if p.HasError() { 4448 goto errorExit 4449 } 4450 _la = p.GetTokenStream().LA(1) 4451 } 4452 p.SetState(377) 4453 p.GetErrorHandler().Sync(p) 4454 if p.HasError() { 4455 goto errorExit 4456 } 4457 _la = p.GetTokenStream().LA(1) 4458 4459 if _la == nevaParserIDENTIFIER { 4460 { 4461 p.SetState(376) 4462 p.TypeParamList() 4463 } 4464 4465 } 4466 { 4467 p.SetState(379) 4468 p.Match(nevaParserT__13) 4469 if p.HasError() { 4470 // Recognition error - abort rule 4471 goto errorExit 4472 } 4473 } 4474 4475 errorExit: 4476 if p.HasError() { 4477 v := p.GetError() 4478 localctx.SetException(v) 4479 p.GetErrorHandler().ReportError(p, v) 4480 p.GetErrorHandler().Recover(p, v) 4481 p.SetError(nil) 4482 } 4483 p.ExitRule() 4484 return localctx 4485 goto errorExit // Trick to prevent compiler error if the label is not used 4486 } 4487 4488 // ITypeParamListContext is an interface to support dynamic dispatch. 4489 type ITypeParamListContext interface { 4490 antlr.ParserRuleContext 4491 4492 // GetParser returns the parser. 4493 GetParser() antlr.Parser 4494 4495 // Getter signatures 4496 AllTypeParam() []ITypeParamContext 4497 TypeParam(i int) ITypeParamContext 4498 AllNEWLINE() []antlr.TerminalNode 4499 NEWLINE(i int) antlr.TerminalNode 4500 4501 // IsTypeParamListContext differentiates from other interfaces. 4502 IsTypeParamListContext() 4503 } 4504 4505 type TypeParamListContext struct { 4506 antlr.BaseParserRuleContext 4507 parser antlr.Parser 4508 } 4509 4510 func NewEmptyTypeParamListContext() *TypeParamListContext { 4511 var p = new(TypeParamListContext) 4512 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 4513 p.RuleIndex = nevaParserRULE_typeParamList 4514 return p 4515 } 4516 4517 func InitEmptyTypeParamListContext(p *TypeParamListContext) { 4518 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 4519 p.RuleIndex = nevaParserRULE_typeParamList 4520 } 4521 4522 func (*TypeParamListContext) IsTypeParamListContext() {} 4523 4524 func NewTypeParamListContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeParamListContext { 4525 var p = new(TypeParamListContext) 4526 4527 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 4528 4529 p.parser = parser 4530 p.RuleIndex = nevaParserRULE_typeParamList 4531 4532 return p 4533 } 4534 4535 func (s *TypeParamListContext) GetParser() antlr.Parser { return s.parser } 4536 4537 func (s *TypeParamListContext) AllTypeParam() []ITypeParamContext { 4538 children := s.GetChildren() 4539 len := 0 4540 for _, ctx := range children { 4541 if _, ok := ctx.(ITypeParamContext); ok { 4542 len++ 4543 } 4544 } 4545 4546 tst := make([]ITypeParamContext, len) 4547 i := 0 4548 for _, ctx := range children { 4549 if t, ok := ctx.(ITypeParamContext); ok { 4550 tst[i] = t.(ITypeParamContext) 4551 i++ 4552 } 4553 } 4554 4555 return tst 4556 } 4557 4558 func (s *TypeParamListContext) TypeParam(i int) ITypeParamContext { 4559 var t antlr.RuleContext 4560 j := 0 4561 for _, ctx := range s.GetChildren() { 4562 if _, ok := ctx.(ITypeParamContext); ok { 4563 if j == i { 4564 t = ctx.(antlr.RuleContext) 4565 break 4566 } 4567 j++ 4568 } 4569 } 4570 4571 if t == nil { 4572 return nil 4573 } 4574 4575 return t.(ITypeParamContext) 4576 } 4577 4578 func (s *TypeParamListContext) AllNEWLINE() []antlr.TerminalNode { 4579 return s.GetTokens(nevaParserNEWLINE) 4580 } 4581 4582 func (s *TypeParamListContext) NEWLINE(i int) antlr.TerminalNode { 4583 return s.GetToken(nevaParserNEWLINE, i) 4584 } 4585 4586 func (s *TypeParamListContext) GetRuleContext() antlr.RuleContext { 4587 return s 4588 } 4589 4590 func (s *TypeParamListContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 4591 return antlr.TreesStringTree(s, ruleNames, recog) 4592 } 4593 4594 func (s *TypeParamListContext) EnterRule(listener antlr.ParseTreeListener) { 4595 if listenerT, ok := listener.(nevaListener); ok { 4596 listenerT.EnterTypeParamList(s) 4597 } 4598 } 4599 4600 func (s *TypeParamListContext) ExitRule(listener antlr.ParseTreeListener) { 4601 if listenerT, ok := listener.(nevaListener); ok { 4602 listenerT.ExitTypeParamList(s) 4603 } 4604 } 4605 4606 func (p *nevaParser) TypeParamList() (localctx ITypeParamListContext) { 4607 localctx = NewTypeParamListContext(p, p.GetParserRuleContext(), p.GetState()) 4608 p.EnterRule(localctx, 48, nevaParserRULE_typeParamList) 4609 var _la int 4610 4611 p.EnterOuterAlt(localctx, 1) 4612 { 4613 p.SetState(381) 4614 p.TypeParam() 4615 } 4616 p.SetState(392) 4617 p.GetErrorHandler().Sync(p) 4618 if p.HasError() { 4619 goto errorExit 4620 } 4621 _la = p.GetTokenStream().LA(1) 4622 4623 for _la == nevaParserT__2 { 4624 { 4625 p.SetState(382) 4626 p.Match(nevaParserT__2) 4627 if p.HasError() { 4628 // Recognition error - abort rule 4629 goto errorExit 4630 } 4631 } 4632 p.SetState(386) 4633 p.GetErrorHandler().Sync(p) 4634 if p.HasError() { 4635 goto errorExit 4636 } 4637 _la = p.GetTokenStream().LA(1) 4638 4639 for _la == nevaParserNEWLINE { 4640 { 4641 p.SetState(383) 4642 p.Match(nevaParserNEWLINE) 4643 if p.HasError() { 4644 // Recognition error - abort rule 4645 goto errorExit 4646 } 4647 } 4648 4649 p.SetState(388) 4650 p.GetErrorHandler().Sync(p) 4651 if p.HasError() { 4652 goto errorExit 4653 } 4654 _la = p.GetTokenStream().LA(1) 4655 } 4656 { 4657 p.SetState(389) 4658 p.TypeParam() 4659 } 4660 4661 p.SetState(394) 4662 p.GetErrorHandler().Sync(p) 4663 if p.HasError() { 4664 goto errorExit 4665 } 4666 _la = p.GetTokenStream().LA(1) 4667 } 4668 4669 errorExit: 4670 if p.HasError() { 4671 v := p.GetError() 4672 localctx.SetException(v) 4673 p.GetErrorHandler().ReportError(p, v) 4674 p.GetErrorHandler().Recover(p, v) 4675 p.SetError(nil) 4676 } 4677 p.ExitRule() 4678 return localctx 4679 goto errorExit // Trick to prevent compiler error if the label is not used 4680 } 4681 4682 // ITypeParamContext is an interface to support dynamic dispatch. 4683 type ITypeParamContext interface { 4684 antlr.ParserRuleContext 4685 4686 // GetParser returns the parser. 4687 GetParser() antlr.Parser 4688 4689 // Getter signatures 4690 IDENTIFIER() antlr.TerminalNode 4691 TypeExpr() ITypeExprContext 4692 AllNEWLINE() []antlr.TerminalNode 4693 NEWLINE(i int) antlr.TerminalNode 4694 4695 // IsTypeParamContext differentiates from other interfaces. 4696 IsTypeParamContext() 4697 } 4698 4699 type TypeParamContext struct { 4700 antlr.BaseParserRuleContext 4701 parser antlr.Parser 4702 } 4703 4704 func NewEmptyTypeParamContext() *TypeParamContext { 4705 var p = new(TypeParamContext) 4706 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 4707 p.RuleIndex = nevaParserRULE_typeParam 4708 return p 4709 } 4710 4711 func InitEmptyTypeParamContext(p *TypeParamContext) { 4712 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 4713 p.RuleIndex = nevaParserRULE_typeParam 4714 } 4715 4716 func (*TypeParamContext) IsTypeParamContext() {} 4717 4718 func NewTypeParamContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeParamContext { 4719 var p = new(TypeParamContext) 4720 4721 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 4722 4723 p.parser = parser 4724 p.RuleIndex = nevaParserRULE_typeParam 4725 4726 return p 4727 } 4728 4729 func (s *TypeParamContext) GetParser() antlr.Parser { return s.parser } 4730 4731 func (s *TypeParamContext) IDENTIFIER() antlr.TerminalNode { 4732 return s.GetToken(nevaParserIDENTIFIER, 0) 4733 } 4734 4735 func (s *TypeParamContext) TypeExpr() ITypeExprContext { 4736 var t antlr.RuleContext 4737 for _, ctx := range s.GetChildren() { 4738 if _, ok := ctx.(ITypeExprContext); ok { 4739 t = ctx.(antlr.RuleContext) 4740 break 4741 } 4742 } 4743 4744 if t == nil { 4745 return nil 4746 } 4747 4748 return t.(ITypeExprContext) 4749 } 4750 4751 func (s *TypeParamContext) AllNEWLINE() []antlr.TerminalNode { 4752 return s.GetTokens(nevaParserNEWLINE) 4753 } 4754 4755 func (s *TypeParamContext) NEWLINE(i int) antlr.TerminalNode { 4756 return s.GetToken(nevaParserNEWLINE, i) 4757 } 4758 4759 func (s *TypeParamContext) GetRuleContext() antlr.RuleContext { 4760 return s 4761 } 4762 4763 func (s *TypeParamContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 4764 return antlr.TreesStringTree(s, ruleNames, recog) 4765 } 4766 4767 func (s *TypeParamContext) EnterRule(listener antlr.ParseTreeListener) { 4768 if listenerT, ok := listener.(nevaListener); ok { 4769 listenerT.EnterTypeParam(s) 4770 } 4771 } 4772 4773 func (s *TypeParamContext) ExitRule(listener antlr.ParseTreeListener) { 4774 if listenerT, ok := listener.(nevaListener); ok { 4775 listenerT.ExitTypeParam(s) 4776 } 4777 } 4778 4779 func (p *nevaParser) TypeParam() (localctx ITypeParamContext) { 4780 localctx = NewTypeParamContext(p, p.GetParserRuleContext(), p.GetState()) 4781 p.EnterRule(localctx, 50, nevaParserRULE_typeParam) 4782 var _la int 4783 4784 p.EnterOuterAlt(localctx, 1) 4785 { 4786 p.SetState(395) 4787 p.Match(nevaParserIDENTIFIER) 4788 if p.HasError() { 4789 // Recognition error - abort rule 4790 goto errorExit 4791 } 4792 } 4793 p.SetState(397) 4794 p.GetErrorHandler().Sync(p) 4795 if p.HasError() { 4796 goto errorExit 4797 } 4798 _la = p.GetTokenStream().LA(1) 4799 4800 if (int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&68719575040) != 0 { 4801 { 4802 p.SetState(396) 4803 p.TypeExpr() 4804 } 4805 4806 } 4807 p.SetState(402) 4808 p.GetErrorHandler().Sync(p) 4809 if p.HasError() { 4810 goto errorExit 4811 } 4812 _la = p.GetTokenStream().LA(1) 4813 4814 for _la == nevaParserNEWLINE { 4815 { 4816 p.SetState(399) 4817 p.Match(nevaParserNEWLINE) 4818 if p.HasError() { 4819 // Recognition error - abort rule 4820 goto errorExit 4821 } 4822 } 4823 4824 p.SetState(404) 4825 p.GetErrorHandler().Sync(p) 4826 if p.HasError() { 4827 goto errorExit 4828 } 4829 _la = p.GetTokenStream().LA(1) 4830 } 4831 4832 errorExit: 4833 if p.HasError() { 4834 v := p.GetError() 4835 localctx.SetException(v) 4836 p.GetErrorHandler().ReportError(p, v) 4837 p.GetErrorHandler().Recover(p, v) 4838 p.SetError(nil) 4839 } 4840 p.ExitRule() 4841 return localctx 4842 goto errorExit // Trick to prevent compiler error if the label is not used 4843 } 4844 4845 // ITypeExprContext is an interface to support dynamic dispatch. 4846 type ITypeExprContext interface { 4847 antlr.ParserRuleContext 4848 4849 // GetParser returns the parser. 4850 GetParser() antlr.Parser 4851 4852 // Getter signatures 4853 TypeInstExpr() ITypeInstExprContext 4854 TypeLitExpr() ITypeLitExprContext 4855 UnionTypeExpr() IUnionTypeExprContext 4856 4857 // IsTypeExprContext differentiates from other interfaces. 4858 IsTypeExprContext() 4859 } 4860 4861 type TypeExprContext struct { 4862 antlr.BaseParserRuleContext 4863 parser antlr.Parser 4864 } 4865 4866 func NewEmptyTypeExprContext() *TypeExprContext { 4867 var p = new(TypeExprContext) 4868 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 4869 p.RuleIndex = nevaParserRULE_typeExpr 4870 return p 4871 } 4872 4873 func InitEmptyTypeExprContext(p *TypeExprContext) { 4874 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 4875 p.RuleIndex = nevaParserRULE_typeExpr 4876 } 4877 4878 func (*TypeExprContext) IsTypeExprContext() {} 4879 4880 func NewTypeExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeExprContext { 4881 var p = new(TypeExprContext) 4882 4883 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 4884 4885 p.parser = parser 4886 p.RuleIndex = nevaParserRULE_typeExpr 4887 4888 return p 4889 } 4890 4891 func (s *TypeExprContext) GetParser() antlr.Parser { return s.parser } 4892 4893 func (s *TypeExprContext) TypeInstExpr() ITypeInstExprContext { 4894 var t antlr.RuleContext 4895 for _, ctx := range s.GetChildren() { 4896 if _, ok := ctx.(ITypeInstExprContext); ok { 4897 t = ctx.(antlr.RuleContext) 4898 break 4899 } 4900 } 4901 4902 if t == nil { 4903 return nil 4904 } 4905 4906 return t.(ITypeInstExprContext) 4907 } 4908 4909 func (s *TypeExprContext) TypeLitExpr() ITypeLitExprContext { 4910 var t antlr.RuleContext 4911 for _, ctx := range s.GetChildren() { 4912 if _, ok := ctx.(ITypeLitExprContext); ok { 4913 t = ctx.(antlr.RuleContext) 4914 break 4915 } 4916 } 4917 4918 if t == nil { 4919 return nil 4920 } 4921 4922 return t.(ITypeLitExprContext) 4923 } 4924 4925 func (s *TypeExprContext) UnionTypeExpr() IUnionTypeExprContext { 4926 var t antlr.RuleContext 4927 for _, ctx := range s.GetChildren() { 4928 if _, ok := ctx.(IUnionTypeExprContext); ok { 4929 t = ctx.(antlr.RuleContext) 4930 break 4931 } 4932 } 4933 4934 if t == nil { 4935 return nil 4936 } 4937 4938 return t.(IUnionTypeExprContext) 4939 } 4940 4941 func (s *TypeExprContext) GetRuleContext() antlr.RuleContext { 4942 return s 4943 } 4944 4945 func (s *TypeExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 4946 return antlr.TreesStringTree(s, ruleNames, recog) 4947 } 4948 4949 func (s *TypeExprContext) EnterRule(listener antlr.ParseTreeListener) { 4950 if listenerT, ok := listener.(nevaListener); ok { 4951 listenerT.EnterTypeExpr(s) 4952 } 4953 } 4954 4955 func (s *TypeExprContext) ExitRule(listener antlr.ParseTreeListener) { 4956 if listenerT, ok := listener.(nevaListener); ok { 4957 listenerT.ExitTypeExpr(s) 4958 } 4959 } 4960 4961 func (p *nevaParser) TypeExpr() (localctx ITypeExprContext) { 4962 localctx = NewTypeExprContext(p, p.GetParserRuleContext(), p.GetState()) 4963 p.EnterRule(localctx, 52, nevaParserRULE_typeExpr) 4964 p.SetState(408) 4965 p.GetErrorHandler().Sync(p) 4966 if p.HasError() { 4967 goto errorExit 4968 } 4969 4970 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 34, p.GetParserRuleContext()) { 4971 case 1: 4972 p.EnterOuterAlt(localctx, 1) 4973 { 4974 p.SetState(405) 4975 p.TypeInstExpr() 4976 } 4977 4978 case 2: 4979 p.EnterOuterAlt(localctx, 2) 4980 { 4981 p.SetState(406) 4982 p.TypeLitExpr() 4983 } 4984 4985 case 3: 4986 p.EnterOuterAlt(localctx, 3) 4987 { 4988 p.SetState(407) 4989 p.UnionTypeExpr() 4990 } 4991 4992 case antlr.ATNInvalidAltNumber: 4993 goto errorExit 4994 } 4995 4996 errorExit: 4997 if p.HasError() { 4998 v := p.GetError() 4999 localctx.SetException(v) 5000 p.GetErrorHandler().ReportError(p, v) 5001 p.GetErrorHandler().Recover(p, v) 5002 p.SetError(nil) 5003 } 5004 p.ExitRule() 5005 return localctx 5006 goto errorExit // Trick to prevent compiler error if the label is not used 5007 } 5008 5009 // ITypeInstExprContext is an interface to support dynamic dispatch. 5010 type ITypeInstExprContext interface { 5011 antlr.ParserRuleContext 5012 5013 // GetParser returns the parser. 5014 GetParser() antlr.Parser 5015 5016 // Getter signatures 5017 EntityRef() IEntityRefContext 5018 TypeArgs() ITypeArgsContext 5019 5020 // IsTypeInstExprContext differentiates from other interfaces. 5021 IsTypeInstExprContext() 5022 } 5023 5024 type TypeInstExprContext struct { 5025 antlr.BaseParserRuleContext 5026 parser antlr.Parser 5027 } 5028 5029 func NewEmptyTypeInstExprContext() *TypeInstExprContext { 5030 var p = new(TypeInstExprContext) 5031 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 5032 p.RuleIndex = nevaParserRULE_typeInstExpr 5033 return p 5034 } 5035 5036 func InitEmptyTypeInstExprContext(p *TypeInstExprContext) { 5037 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 5038 p.RuleIndex = nevaParserRULE_typeInstExpr 5039 } 5040 5041 func (*TypeInstExprContext) IsTypeInstExprContext() {} 5042 5043 func NewTypeInstExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeInstExprContext { 5044 var p = new(TypeInstExprContext) 5045 5046 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 5047 5048 p.parser = parser 5049 p.RuleIndex = nevaParserRULE_typeInstExpr 5050 5051 return p 5052 } 5053 5054 func (s *TypeInstExprContext) GetParser() antlr.Parser { return s.parser } 5055 5056 func (s *TypeInstExprContext) EntityRef() IEntityRefContext { 5057 var t antlr.RuleContext 5058 for _, ctx := range s.GetChildren() { 5059 if _, ok := ctx.(IEntityRefContext); ok { 5060 t = ctx.(antlr.RuleContext) 5061 break 5062 } 5063 } 5064 5065 if t == nil { 5066 return nil 5067 } 5068 5069 return t.(IEntityRefContext) 5070 } 5071 5072 func (s *TypeInstExprContext) TypeArgs() ITypeArgsContext { 5073 var t antlr.RuleContext 5074 for _, ctx := range s.GetChildren() { 5075 if _, ok := ctx.(ITypeArgsContext); ok { 5076 t = ctx.(antlr.RuleContext) 5077 break 5078 } 5079 } 5080 5081 if t == nil { 5082 return nil 5083 } 5084 5085 return t.(ITypeArgsContext) 5086 } 5087 5088 func (s *TypeInstExprContext) GetRuleContext() antlr.RuleContext { 5089 return s 5090 } 5091 5092 func (s *TypeInstExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 5093 return antlr.TreesStringTree(s, ruleNames, recog) 5094 } 5095 5096 func (s *TypeInstExprContext) EnterRule(listener antlr.ParseTreeListener) { 5097 if listenerT, ok := listener.(nevaListener); ok { 5098 listenerT.EnterTypeInstExpr(s) 5099 } 5100 } 5101 5102 func (s *TypeInstExprContext) ExitRule(listener antlr.ParseTreeListener) { 5103 if listenerT, ok := listener.(nevaListener); ok { 5104 listenerT.ExitTypeInstExpr(s) 5105 } 5106 } 5107 5108 func (p *nevaParser) TypeInstExpr() (localctx ITypeInstExprContext) { 5109 localctx = NewTypeInstExprContext(p, p.GetParserRuleContext(), p.GetState()) 5110 p.EnterRule(localctx, 54, nevaParserRULE_typeInstExpr) 5111 var _la int 5112 5113 p.EnterOuterAlt(localctx, 1) 5114 { 5115 p.SetState(410) 5116 p.EntityRef() 5117 } 5118 p.SetState(412) 5119 p.GetErrorHandler().Sync(p) 5120 if p.HasError() { 5121 goto errorExit 5122 } 5123 _la = p.GetTokenStream().LA(1) 5124 5125 if _la == nevaParserT__12 { 5126 { 5127 p.SetState(411) 5128 p.TypeArgs() 5129 } 5130 5131 } 5132 5133 errorExit: 5134 if p.HasError() { 5135 v := p.GetError() 5136 localctx.SetException(v) 5137 p.GetErrorHandler().ReportError(p, v) 5138 p.GetErrorHandler().Recover(p, v) 5139 p.SetError(nil) 5140 } 5141 p.ExitRule() 5142 return localctx 5143 goto errorExit // Trick to prevent compiler error if the label is not used 5144 } 5145 5146 // ITypeArgsContext is an interface to support dynamic dispatch. 5147 type ITypeArgsContext interface { 5148 antlr.ParserRuleContext 5149 5150 // GetParser returns the parser. 5151 GetParser() antlr.Parser 5152 5153 // Getter signatures 5154 AllTypeExpr() []ITypeExprContext 5155 TypeExpr(i int) ITypeExprContext 5156 AllNEWLINE() []antlr.TerminalNode 5157 NEWLINE(i int) antlr.TerminalNode 5158 5159 // IsTypeArgsContext differentiates from other interfaces. 5160 IsTypeArgsContext() 5161 } 5162 5163 type TypeArgsContext struct { 5164 antlr.BaseParserRuleContext 5165 parser antlr.Parser 5166 } 5167 5168 func NewEmptyTypeArgsContext() *TypeArgsContext { 5169 var p = new(TypeArgsContext) 5170 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 5171 p.RuleIndex = nevaParserRULE_typeArgs 5172 return p 5173 } 5174 5175 func InitEmptyTypeArgsContext(p *TypeArgsContext) { 5176 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 5177 p.RuleIndex = nevaParserRULE_typeArgs 5178 } 5179 5180 func (*TypeArgsContext) IsTypeArgsContext() {} 5181 5182 func NewTypeArgsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeArgsContext { 5183 var p = new(TypeArgsContext) 5184 5185 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 5186 5187 p.parser = parser 5188 p.RuleIndex = nevaParserRULE_typeArgs 5189 5190 return p 5191 } 5192 5193 func (s *TypeArgsContext) GetParser() antlr.Parser { return s.parser } 5194 5195 func (s *TypeArgsContext) AllTypeExpr() []ITypeExprContext { 5196 children := s.GetChildren() 5197 len := 0 5198 for _, ctx := range children { 5199 if _, ok := ctx.(ITypeExprContext); ok { 5200 len++ 5201 } 5202 } 5203 5204 tst := make([]ITypeExprContext, len) 5205 i := 0 5206 for _, ctx := range children { 5207 if t, ok := ctx.(ITypeExprContext); ok { 5208 tst[i] = t.(ITypeExprContext) 5209 i++ 5210 } 5211 } 5212 5213 return tst 5214 } 5215 5216 func (s *TypeArgsContext) TypeExpr(i int) ITypeExprContext { 5217 var t antlr.RuleContext 5218 j := 0 5219 for _, ctx := range s.GetChildren() { 5220 if _, ok := ctx.(ITypeExprContext); ok { 5221 if j == i { 5222 t = ctx.(antlr.RuleContext) 5223 break 5224 } 5225 j++ 5226 } 5227 } 5228 5229 if t == nil { 5230 return nil 5231 } 5232 5233 return t.(ITypeExprContext) 5234 } 5235 5236 func (s *TypeArgsContext) AllNEWLINE() []antlr.TerminalNode { 5237 return s.GetTokens(nevaParserNEWLINE) 5238 } 5239 5240 func (s *TypeArgsContext) NEWLINE(i int) antlr.TerminalNode { 5241 return s.GetToken(nevaParserNEWLINE, i) 5242 } 5243 5244 func (s *TypeArgsContext) GetRuleContext() antlr.RuleContext { 5245 return s 5246 } 5247 5248 func (s *TypeArgsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 5249 return antlr.TreesStringTree(s, ruleNames, recog) 5250 } 5251 5252 func (s *TypeArgsContext) EnterRule(listener antlr.ParseTreeListener) { 5253 if listenerT, ok := listener.(nevaListener); ok { 5254 listenerT.EnterTypeArgs(s) 5255 } 5256 } 5257 5258 func (s *TypeArgsContext) ExitRule(listener antlr.ParseTreeListener) { 5259 if listenerT, ok := listener.(nevaListener); ok { 5260 listenerT.ExitTypeArgs(s) 5261 } 5262 } 5263 5264 func (p *nevaParser) TypeArgs() (localctx ITypeArgsContext) { 5265 localctx = NewTypeArgsContext(p, p.GetParserRuleContext(), p.GetState()) 5266 p.EnterRule(localctx, 56, nevaParserRULE_typeArgs) 5267 var _la int 5268 5269 p.EnterOuterAlt(localctx, 1) 5270 { 5271 p.SetState(414) 5272 p.Match(nevaParserT__12) 5273 if p.HasError() { 5274 // Recognition error - abort rule 5275 goto errorExit 5276 } 5277 } 5278 p.SetState(418) 5279 p.GetErrorHandler().Sync(p) 5280 if p.HasError() { 5281 goto errorExit 5282 } 5283 _la = p.GetTokenStream().LA(1) 5284 5285 for _la == nevaParserNEWLINE { 5286 { 5287 p.SetState(415) 5288 p.Match(nevaParserNEWLINE) 5289 if p.HasError() { 5290 // Recognition error - abort rule 5291 goto errorExit 5292 } 5293 } 5294 5295 p.SetState(420) 5296 p.GetErrorHandler().Sync(p) 5297 if p.HasError() { 5298 goto errorExit 5299 } 5300 _la = p.GetTokenStream().LA(1) 5301 } 5302 { 5303 p.SetState(421) 5304 p.TypeExpr() 5305 } 5306 p.SetState(432) 5307 p.GetErrorHandler().Sync(p) 5308 if p.HasError() { 5309 goto errorExit 5310 } 5311 _la = p.GetTokenStream().LA(1) 5312 5313 for _la == nevaParserT__2 { 5314 { 5315 p.SetState(422) 5316 p.Match(nevaParserT__2) 5317 if p.HasError() { 5318 // Recognition error - abort rule 5319 goto errorExit 5320 } 5321 } 5322 p.SetState(426) 5323 p.GetErrorHandler().Sync(p) 5324 if p.HasError() { 5325 goto errorExit 5326 } 5327 _la = p.GetTokenStream().LA(1) 5328 5329 for _la == nevaParserNEWLINE { 5330 { 5331 p.SetState(423) 5332 p.Match(nevaParserNEWLINE) 5333 if p.HasError() { 5334 // Recognition error - abort rule 5335 goto errorExit 5336 } 5337 } 5338 5339 p.SetState(428) 5340 p.GetErrorHandler().Sync(p) 5341 if p.HasError() { 5342 goto errorExit 5343 } 5344 _la = p.GetTokenStream().LA(1) 5345 } 5346 { 5347 p.SetState(429) 5348 p.TypeExpr() 5349 } 5350 5351 p.SetState(434) 5352 p.GetErrorHandler().Sync(p) 5353 if p.HasError() { 5354 goto errorExit 5355 } 5356 _la = p.GetTokenStream().LA(1) 5357 } 5358 p.SetState(438) 5359 p.GetErrorHandler().Sync(p) 5360 if p.HasError() { 5361 goto errorExit 5362 } 5363 _la = p.GetTokenStream().LA(1) 5364 5365 for _la == nevaParserNEWLINE { 5366 { 5367 p.SetState(435) 5368 p.Match(nevaParserNEWLINE) 5369 if p.HasError() { 5370 // Recognition error - abort rule 5371 goto errorExit 5372 } 5373 } 5374 5375 p.SetState(440) 5376 p.GetErrorHandler().Sync(p) 5377 if p.HasError() { 5378 goto errorExit 5379 } 5380 _la = p.GetTokenStream().LA(1) 5381 } 5382 { 5383 p.SetState(441) 5384 p.Match(nevaParserT__13) 5385 if p.HasError() { 5386 // Recognition error - abort rule 5387 goto errorExit 5388 } 5389 } 5390 5391 errorExit: 5392 if p.HasError() { 5393 v := p.GetError() 5394 localctx.SetException(v) 5395 p.GetErrorHandler().ReportError(p, v) 5396 p.GetErrorHandler().Recover(p, v) 5397 p.SetError(nil) 5398 } 5399 p.ExitRule() 5400 return localctx 5401 goto errorExit // Trick to prevent compiler error if the label is not used 5402 } 5403 5404 // ITypeLitExprContext is an interface to support dynamic dispatch. 5405 type ITypeLitExprContext interface { 5406 antlr.ParserRuleContext 5407 5408 // GetParser returns the parser. 5409 GetParser() antlr.Parser 5410 5411 // Getter signatures 5412 EnumTypeExpr() IEnumTypeExprContext 5413 StructTypeExpr() IStructTypeExprContext 5414 5415 // IsTypeLitExprContext differentiates from other interfaces. 5416 IsTypeLitExprContext() 5417 } 5418 5419 type TypeLitExprContext struct { 5420 antlr.BaseParserRuleContext 5421 parser antlr.Parser 5422 } 5423 5424 func NewEmptyTypeLitExprContext() *TypeLitExprContext { 5425 var p = new(TypeLitExprContext) 5426 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 5427 p.RuleIndex = nevaParserRULE_typeLitExpr 5428 return p 5429 } 5430 5431 func InitEmptyTypeLitExprContext(p *TypeLitExprContext) { 5432 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 5433 p.RuleIndex = nevaParserRULE_typeLitExpr 5434 } 5435 5436 func (*TypeLitExprContext) IsTypeLitExprContext() {} 5437 5438 func NewTypeLitExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeLitExprContext { 5439 var p = new(TypeLitExprContext) 5440 5441 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 5442 5443 p.parser = parser 5444 p.RuleIndex = nevaParserRULE_typeLitExpr 5445 5446 return p 5447 } 5448 5449 func (s *TypeLitExprContext) GetParser() antlr.Parser { return s.parser } 5450 5451 func (s *TypeLitExprContext) EnumTypeExpr() IEnumTypeExprContext { 5452 var t antlr.RuleContext 5453 for _, ctx := range s.GetChildren() { 5454 if _, ok := ctx.(IEnumTypeExprContext); ok { 5455 t = ctx.(antlr.RuleContext) 5456 break 5457 } 5458 } 5459 5460 if t == nil { 5461 return nil 5462 } 5463 5464 return t.(IEnumTypeExprContext) 5465 } 5466 5467 func (s *TypeLitExprContext) StructTypeExpr() IStructTypeExprContext { 5468 var t antlr.RuleContext 5469 for _, ctx := range s.GetChildren() { 5470 if _, ok := ctx.(IStructTypeExprContext); ok { 5471 t = ctx.(antlr.RuleContext) 5472 break 5473 } 5474 } 5475 5476 if t == nil { 5477 return nil 5478 } 5479 5480 return t.(IStructTypeExprContext) 5481 } 5482 5483 func (s *TypeLitExprContext) GetRuleContext() antlr.RuleContext { 5484 return s 5485 } 5486 5487 func (s *TypeLitExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 5488 return antlr.TreesStringTree(s, ruleNames, recog) 5489 } 5490 5491 func (s *TypeLitExprContext) EnterRule(listener antlr.ParseTreeListener) { 5492 if listenerT, ok := listener.(nevaListener); ok { 5493 listenerT.EnterTypeLitExpr(s) 5494 } 5495 } 5496 5497 func (s *TypeLitExprContext) ExitRule(listener antlr.ParseTreeListener) { 5498 if listenerT, ok := listener.(nevaListener); ok { 5499 listenerT.ExitTypeLitExpr(s) 5500 } 5501 } 5502 5503 func (p *nevaParser) TypeLitExpr() (localctx ITypeLitExprContext) { 5504 localctx = NewTypeLitExprContext(p, p.GetParserRuleContext(), p.GetState()) 5505 p.EnterRule(localctx, 58, nevaParserRULE_typeLitExpr) 5506 p.SetState(445) 5507 p.GetErrorHandler().Sync(p) 5508 if p.HasError() { 5509 goto errorExit 5510 } 5511 5512 switch p.GetTokenStream().LA(1) { 5513 case nevaParserT__14: 5514 p.EnterOuterAlt(localctx, 1) 5515 { 5516 p.SetState(443) 5517 p.EnumTypeExpr() 5518 } 5519 5520 case nevaParserT__15: 5521 p.EnterOuterAlt(localctx, 2) 5522 { 5523 p.SetState(444) 5524 p.StructTypeExpr() 5525 } 5526 5527 default: 5528 p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) 5529 goto errorExit 5530 } 5531 5532 errorExit: 5533 if p.HasError() { 5534 v := p.GetError() 5535 localctx.SetException(v) 5536 p.GetErrorHandler().ReportError(p, v) 5537 p.GetErrorHandler().Recover(p, v) 5538 p.SetError(nil) 5539 } 5540 p.ExitRule() 5541 return localctx 5542 goto errorExit // Trick to prevent compiler error if the label is not used 5543 } 5544 5545 // IEnumTypeExprContext is an interface to support dynamic dispatch. 5546 type IEnumTypeExprContext interface { 5547 antlr.ParserRuleContext 5548 5549 // GetParser returns the parser. 5550 GetParser() antlr.Parser 5551 5552 // Getter signatures 5553 AllIDENTIFIER() []antlr.TerminalNode 5554 IDENTIFIER(i int) antlr.TerminalNode 5555 AllNEWLINE() []antlr.TerminalNode 5556 NEWLINE(i int) antlr.TerminalNode 5557 5558 // IsEnumTypeExprContext differentiates from other interfaces. 5559 IsEnumTypeExprContext() 5560 } 5561 5562 type EnumTypeExprContext struct { 5563 antlr.BaseParserRuleContext 5564 parser antlr.Parser 5565 } 5566 5567 func NewEmptyEnumTypeExprContext() *EnumTypeExprContext { 5568 var p = new(EnumTypeExprContext) 5569 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 5570 p.RuleIndex = nevaParserRULE_enumTypeExpr 5571 return p 5572 } 5573 5574 func InitEmptyEnumTypeExprContext(p *EnumTypeExprContext) { 5575 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 5576 p.RuleIndex = nevaParserRULE_enumTypeExpr 5577 } 5578 5579 func (*EnumTypeExprContext) IsEnumTypeExprContext() {} 5580 5581 func NewEnumTypeExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *EnumTypeExprContext { 5582 var p = new(EnumTypeExprContext) 5583 5584 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 5585 5586 p.parser = parser 5587 p.RuleIndex = nevaParserRULE_enumTypeExpr 5588 5589 return p 5590 } 5591 5592 func (s *EnumTypeExprContext) GetParser() antlr.Parser { return s.parser } 5593 5594 func (s *EnumTypeExprContext) AllIDENTIFIER() []antlr.TerminalNode { 5595 return s.GetTokens(nevaParserIDENTIFIER) 5596 } 5597 5598 func (s *EnumTypeExprContext) IDENTIFIER(i int) antlr.TerminalNode { 5599 return s.GetToken(nevaParserIDENTIFIER, i) 5600 } 5601 5602 func (s *EnumTypeExprContext) AllNEWLINE() []antlr.TerminalNode { 5603 return s.GetTokens(nevaParserNEWLINE) 5604 } 5605 5606 func (s *EnumTypeExprContext) NEWLINE(i int) antlr.TerminalNode { 5607 return s.GetToken(nevaParserNEWLINE, i) 5608 } 5609 5610 func (s *EnumTypeExprContext) GetRuleContext() antlr.RuleContext { 5611 return s 5612 } 5613 5614 func (s *EnumTypeExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 5615 return antlr.TreesStringTree(s, ruleNames, recog) 5616 } 5617 5618 func (s *EnumTypeExprContext) EnterRule(listener antlr.ParseTreeListener) { 5619 if listenerT, ok := listener.(nevaListener); ok { 5620 listenerT.EnterEnumTypeExpr(s) 5621 } 5622 } 5623 5624 func (s *EnumTypeExprContext) ExitRule(listener antlr.ParseTreeListener) { 5625 if listenerT, ok := listener.(nevaListener); ok { 5626 listenerT.ExitEnumTypeExpr(s) 5627 } 5628 } 5629 5630 func (p *nevaParser) EnumTypeExpr() (localctx IEnumTypeExprContext) { 5631 localctx = NewEnumTypeExprContext(p, p.GetParserRuleContext(), p.GetState()) 5632 p.EnterRule(localctx, 60, nevaParserRULE_enumTypeExpr) 5633 var _la int 5634 5635 p.EnterOuterAlt(localctx, 1) 5636 { 5637 p.SetState(447) 5638 p.Match(nevaParserT__14) 5639 if p.HasError() { 5640 // Recognition error - abort rule 5641 goto errorExit 5642 } 5643 } 5644 p.SetState(451) 5645 p.GetErrorHandler().Sync(p) 5646 if p.HasError() { 5647 goto errorExit 5648 } 5649 _la = p.GetTokenStream().LA(1) 5650 5651 for _la == nevaParserNEWLINE { 5652 { 5653 p.SetState(448) 5654 p.Match(nevaParserNEWLINE) 5655 if p.HasError() { 5656 // Recognition error - abort rule 5657 goto errorExit 5658 } 5659 } 5660 5661 p.SetState(453) 5662 p.GetErrorHandler().Sync(p) 5663 if p.HasError() { 5664 goto errorExit 5665 } 5666 _la = p.GetTokenStream().LA(1) 5667 } 5668 { 5669 p.SetState(454) 5670 p.Match(nevaParserT__5) 5671 if p.HasError() { 5672 // Recognition error - abort rule 5673 goto errorExit 5674 } 5675 } 5676 p.SetState(458) 5677 p.GetErrorHandler().Sync(p) 5678 if p.HasError() { 5679 goto errorExit 5680 } 5681 _la = p.GetTokenStream().LA(1) 5682 5683 for _la == nevaParserNEWLINE { 5684 { 5685 p.SetState(455) 5686 p.Match(nevaParserNEWLINE) 5687 if p.HasError() { 5688 // Recognition error - abort rule 5689 goto errorExit 5690 } 5691 } 5692 5693 p.SetState(460) 5694 p.GetErrorHandler().Sync(p) 5695 if p.HasError() { 5696 goto errorExit 5697 } 5698 _la = p.GetTokenStream().LA(1) 5699 } 5700 { 5701 p.SetState(461) 5702 p.Match(nevaParserIDENTIFIER) 5703 if p.HasError() { 5704 // Recognition error - abort rule 5705 goto errorExit 5706 } 5707 } 5708 p.SetState(472) 5709 p.GetErrorHandler().Sync(p) 5710 if p.HasError() { 5711 goto errorExit 5712 } 5713 _la = p.GetTokenStream().LA(1) 5714 5715 for _la == nevaParserT__2 { 5716 { 5717 p.SetState(462) 5718 p.Match(nevaParserT__2) 5719 if p.HasError() { 5720 // Recognition error - abort rule 5721 goto errorExit 5722 } 5723 } 5724 p.SetState(466) 5725 p.GetErrorHandler().Sync(p) 5726 if p.HasError() { 5727 goto errorExit 5728 } 5729 _la = p.GetTokenStream().LA(1) 5730 5731 for _la == nevaParserNEWLINE { 5732 { 5733 p.SetState(463) 5734 p.Match(nevaParserNEWLINE) 5735 if p.HasError() { 5736 // Recognition error - abort rule 5737 goto errorExit 5738 } 5739 } 5740 5741 p.SetState(468) 5742 p.GetErrorHandler().Sync(p) 5743 if p.HasError() { 5744 goto errorExit 5745 } 5746 _la = p.GetTokenStream().LA(1) 5747 } 5748 { 5749 p.SetState(469) 5750 p.Match(nevaParserIDENTIFIER) 5751 if p.HasError() { 5752 // Recognition error - abort rule 5753 goto errorExit 5754 } 5755 } 5756 5757 p.SetState(474) 5758 p.GetErrorHandler().Sync(p) 5759 if p.HasError() { 5760 goto errorExit 5761 } 5762 _la = p.GetTokenStream().LA(1) 5763 } 5764 p.SetState(478) 5765 p.GetErrorHandler().Sync(p) 5766 if p.HasError() { 5767 goto errorExit 5768 } 5769 _la = p.GetTokenStream().LA(1) 5770 5771 for _la == nevaParserNEWLINE { 5772 { 5773 p.SetState(475) 5774 p.Match(nevaParserNEWLINE) 5775 if p.HasError() { 5776 // Recognition error - abort rule 5777 goto errorExit 5778 } 5779 } 5780 5781 p.SetState(480) 5782 p.GetErrorHandler().Sync(p) 5783 if p.HasError() { 5784 goto errorExit 5785 } 5786 _la = p.GetTokenStream().LA(1) 5787 } 5788 { 5789 p.SetState(481) 5790 p.Match(nevaParserT__6) 5791 if p.HasError() { 5792 // Recognition error - abort rule 5793 goto errorExit 5794 } 5795 } 5796 5797 errorExit: 5798 if p.HasError() { 5799 v := p.GetError() 5800 localctx.SetException(v) 5801 p.GetErrorHandler().ReportError(p, v) 5802 p.GetErrorHandler().Recover(p, v) 5803 p.SetError(nil) 5804 } 5805 p.ExitRule() 5806 return localctx 5807 goto errorExit // Trick to prevent compiler error if the label is not used 5808 } 5809 5810 // IStructTypeExprContext is an interface to support dynamic dispatch. 5811 type IStructTypeExprContext interface { 5812 antlr.ParserRuleContext 5813 5814 // GetParser returns the parser. 5815 GetParser() antlr.Parser 5816 5817 // Getter signatures 5818 AllNEWLINE() []antlr.TerminalNode 5819 NEWLINE(i int) antlr.TerminalNode 5820 StructFields() IStructFieldsContext 5821 5822 // IsStructTypeExprContext differentiates from other interfaces. 5823 IsStructTypeExprContext() 5824 } 5825 5826 type StructTypeExprContext struct { 5827 antlr.BaseParserRuleContext 5828 parser antlr.Parser 5829 } 5830 5831 func NewEmptyStructTypeExprContext() *StructTypeExprContext { 5832 var p = new(StructTypeExprContext) 5833 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 5834 p.RuleIndex = nevaParserRULE_structTypeExpr 5835 return p 5836 } 5837 5838 func InitEmptyStructTypeExprContext(p *StructTypeExprContext) { 5839 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 5840 p.RuleIndex = nevaParserRULE_structTypeExpr 5841 } 5842 5843 func (*StructTypeExprContext) IsStructTypeExprContext() {} 5844 5845 func NewStructTypeExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StructTypeExprContext { 5846 var p = new(StructTypeExprContext) 5847 5848 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 5849 5850 p.parser = parser 5851 p.RuleIndex = nevaParserRULE_structTypeExpr 5852 5853 return p 5854 } 5855 5856 func (s *StructTypeExprContext) GetParser() antlr.Parser { return s.parser } 5857 5858 func (s *StructTypeExprContext) AllNEWLINE() []antlr.TerminalNode { 5859 return s.GetTokens(nevaParserNEWLINE) 5860 } 5861 5862 func (s *StructTypeExprContext) NEWLINE(i int) antlr.TerminalNode { 5863 return s.GetToken(nevaParserNEWLINE, i) 5864 } 5865 5866 func (s *StructTypeExprContext) StructFields() IStructFieldsContext { 5867 var t antlr.RuleContext 5868 for _, ctx := range s.GetChildren() { 5869 if _, ok := ctx.(IStructFieldsContext); ok { 5870 t = ctx.(antlr.RuleContext) 5871 break 5872 } 5873 } 5874 5875 if t == nil { 5876 return nil 5877 } 5878 5879 return t.(IStructFieldsContext) 5880 } 5881 5882 func (s *StructTypeExprContext) GetRuleContext() antlr.RuleContext { 5883 return s 5884 } 5885 5886 func (s *StructTypeExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 5887 return antlr.TreesStringTree(s, ruleNames, recog) 5888 } 5889 5890 func (s *StructTypeExprContext) EnterRule(listener antlr.ParseTreeListener) { 5891 if listenerT, ok := listener.(nevaListener); ok { 5892 listenerT.EnterStructTypeExpr(s) 5893 } 5894 } 5895 5896 func (s *StructTypeExprContext) ExitRule(listener antlr.ParseTreeListener) { 5897 if listenerT, ok := listener.(nevaListener); ok { 5898 listenerT.ExitStructTypeExpr(s) 5899 } 5900 } 5901 5902 func (p *nevaParser) StructTypeExpr() (localctx IStructTypeExprContext) { 5903 localctx = NewStructTypeExprContext(p, p.GetParserRuleContext(), p.GetState()) 5904 p.EnterRule(localctx, 62, nevaParserRULE_structTypeExpr) 5905 var _la int 5906 5907 p.EnterOuterAlt(localctx, 1) 5908 { 5909 p.SetState(483) 5910 p.Match(nevaParserT__15) 5911 if p.HasError() { 5912 // Recognition error - abort rule 5913 goto errorExit 5914 } 5915 } 5916 p.SetState(487) 5917 p.GetErrorHandler().Sync(p) 5918 if p.HasError() { 5919 goto errorExit 5920 } 5921 _la = p.GetTokenStream().LA(1) 5922 5923 for _la == nevaParserNEWLINE { 5924 { 5925 p.SetState(484) 5926 p.Match(nevaParserNEWLINE) 5927 if p.HasError() { 5928 // Recognition error - abort rule 5929 goto errorExit 5930 } 5931 } 5932 5933 p.SetState(489) 5934 p.GetErrorHandler().Sync(p) 5935 if p.HasError() { 5936 goto errorExit 5937 } 5938 _la = p.GetTokenStream().LA(1) 5939 } 5940 { 5941 p.SetState(490) 5942 p.Match(nevaParserT__5) 5943 if p.HasError() { 5944 // Recognition error - abort rule 5945 goto errorExit 5946 } 5947 } 5948 p.SetState(494) 5949 p.GetErrorHandler().Sync(p) 5950 if p.HasError() { 5951 goto errorExit 5952 } 5953 _la = p.GetTokenStream().LA(1) 5954 5955 for _la == nevaParserNEWLINE { 5956 { 5957 p.SetState(491) 5958 p.Match(nevaParserNEWLINE) 5959 if p.HasError() { 5960 // Recognition error - abort rule 5961 goto errorExit 5962 } 5963 } 5964 5965 p.SetState(496) 5966 p.GetErrorHandler().Sync(p) 5967 if p.HasError() { 5968 goto errorExit 5969 } 5970 _la = p.GetTokenStream().LA(1) 5971 } 5972 p.SetState(498) 5973 p.GetErrorHandler().Sync(p) 5974 if p.HasError() { 5975 goto errorExit 5976 } 5977 _la = p.GetTokenStream().LA(1) 5978 5979 if _la == nevaParserIDENTIFIER { 5980 { 5981 p.SetState(497) 5982 p.StructFields() 5983 } 5984 5985 } 5986 { 5987 p.SetState(500) 5988 p.Match(nevaParserT__6) 5989 if p.HasError() { 5990 // Recognition error - abort rule 5991 goto errorExit 5992 } 5993 } 5994 5995 errorExit: 5996 if p.HasError() { 5997 v := p.GetError() 5998 localctx.SetException(v) 5999 p.GetErrorHandler().ReportError(p, v) 6000 p.GetErrorHandler().Recover(p, v) 6001 p.SetError(nil) 6002 } 6003 p.ExitRule() 6004 return localctx 6005 goto errorExit // Trick to prevent compiler error if the label is not used 6006 } 6007 6008 // IStructFieldsContext is an interface to support dynamic dispatch. 6009 type IStructFieldsContext interface { 6010 antlr.ParserRuleContext 6011 6012 // GetParser returns the parser. 6013 GetParser() antlr.Parser 6014 6015 // Getter signatures 6016 AllStructField() []IStructFieldContext 6017 StructField(i int) IStructFieldContext 6018 AllNEWLINE() []antlr.TerminalNode 6019 NEWLINE(i int) antlr.TerminalNode 6020 6021 // IsStructFieldsContext differentiates from other interfaces. 6022 IsStructFieldsContext() 6023 } 6024 6025 type StructFieldsContext struct { 6026 antlr.BaseParserRuleContext 6027 parser antlr.Parser 6028 } 6029 6030 func NewEmptyStructFieldsContext() *StructFieldsContext { 6031 var p = new(StructFieldsContext) 6032 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 6033 p.RuleIndex = nevaParserRULE_structFields 6034 return p 6035 } 6036 6037 func InitEmptyStructFieldsContext(p *StructFieldsContext) { 6038 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 6039 p.RuleIndex = nevaParserRULE_structFields 6040 } 6041 6042 func (*StructFieldsContext) IsStructFieldsContext() {} 6043 6044 func NewStructFieldsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StructFieldsContext { 6045 var p = new(StructFieldsContext) 6046 6047 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 6048 6049 p.parser = parser 6050 p.RuleIndex = nevaParserRULE_structFields 6051 6052 return p 6053 } 6054 6055 func (s *StructFieldsContext) GetParser() antlr.Parser { return s.parser } 6056 6057 func (s *StructFieldsContext) AllStructField() []IStructFieldContext { 6058 children := s.GetChildren() 6059 len := 0 6060 for _, ctx := range children { 6061 if _, ok := ctx.(IStructFieldContext); ok { 6062 len++ 6063 } 6064 } 6065 6066 tst := make([]IStructFieldContext, len) 6067 i := 0 6068 for _, ctx := range children { 6069 if t, ok := ctx.(IStructFieldContext); ok { 6070 tst[i] = t.(IStructFieldContext) 6071 i++ 6072 } 6073 } 6074 6075 return tst 6076 } 6077 6078 func (s *StructFieldsContext) StructField(i int) IStructFieldContext { 6079 var t antlr.RuleContext 6080 j := 0 6081 for _, ctx := range s.GetChildren() { 6082 if _, ok := ctx.(IStructFieldContext); ok { 6083 if j == i { 6084 t = ctx.(antlr.RuleContext) 6085 break 6086 } 6087 j++ 6088 } 6089 } 6090 6091 if t == nil { 6092 return nil 6093 } 6094 6095 return t.(IStructFieldContext) 6096 } 6097 6098 func (s *StructFieldsContext) AllNEWLINE() []antlr.TerminalNode { 6099 return s.GetTokens(nevaParserNEWLINE) 6100 } 6101 6102 func (s *StructFieldsContext) NEWLINE(i int) antlr.TerminalNode { 6103 return s.GetToken(nevaParserNEWLINE, i) 6104 } 6105 6106 func (s *StructFieldsContext) GetRuleContext() antlr.RuleContext { 6107 return s 6108 } 6109 6110 func (s *StructFieldsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 6111 return antlr.TreesStringTree(s, ruleNames, recog) 6112 } 6113 6114 func (s *StructFieldsContext) EnterRule(listener antlr.ParseTreeListener) { 6115 if listenerT, ok := listener.(nevaListener); ok { 6116 listenerT.EnterStructFields(s) 6117 } 6118 } 6119 6120 func (s *StructFieldsContext) ExitRule(listener antlr.ParseTreeListener) { 6121 if listenerT, ok := listener.(nevaListener); ok { 6122 listenerT.ExitStructFields(s) 6123 } 6124 } 6125 6126 func (p *nevaParser) StructFields() (localctx IStructFieldsContext) { 6127 localctx = NewStructFieldsContext(p, p.GetParserRuleContext(), p.GetState()) 6128 p.EnterRule(localctx, 64, nevaParserRULE_structFields) 6129 var _la int 6130 6131 p.EnterOuterAlt(localctx, 1) 6132 { 6133 p.SetState(502) 6134 p.StructField() 6135 } 6136 p.SetState(511) 6137 p.GetErrorHandler().Sync(p) 6138 if p.HasError() { 6139 goto errorExit 6140 } 6141 _la = p.GetTokenStream().LA(1) 6142 6143 for _la == nevaParserNEWLINE { 6144 p.SetState(504) 6145 p.GetErrorHandler().Sync(p) 6146 if p.HasError() { 6147 goto errorExit 6148 } 6149 _la = p.GetTokenStream().LA(1) 6150 6151 for ok := true; ok; ok = _la == nevaParserNEWLINE { 6152 { 6153 p.SetState(503) 6154 p.Match(nevaParserNEWLINE) 6155 if p.HasError() { 6156 // Recognition error - abort rule 6157 goto errorExit 6158 } 6159 } 6160 6161 p.SetState(506) 6162 p.GetErrorHandler().Sync(p) 6163 if p.HasError() { 6164 goto errorExit 6165 } 6166 _la = p.GetTokenStream().LA(1) 6167 } 6168 { 6169 p.SetState(508) 6170 p.StructField() 6171 } 6172 6173 p.SetState(513) 6174 p.GetErrorHandler().Sync(p) 6175 if p.HasError() { 6176 goto errorExit 6177 } 6178 _la = p.GetTokenStream().LA(1) 6179 } 6180 6181 errorExit: 6182 if p.HasError() { 6183 v := p.GetError() 6184 localctx.SetException(v) 6185 p.GetErrorHandler().ReportError(p, v) 6186 p.GetErrorHandler().Recover(p, v) 6187 p.SetError(nil) 6188 } 6189 p.ExitRule() 6190 return localctx 6191 goto errorExit // Trick to prevent compiler error if the label is not used 6192 } 6193 6194 // IStructFieldContext is an interface to support dynamic dispatch. 6195 type IStructFieldContext interface { 6196 antlr.ParserRuleContext 6197 6198 // GetParser returns the parser. 6199 GetParser() antlr.Parser 6200 6201 // Getter signatures 6202 IDENTIFIER() antlr.TerminalNode 6203 TypeExpr() ITypeExprContext 6204 AllNEWLINE() []antlr.TerminalNode 6205 NEWLINE(i int) antlr.TerminalNode 6206 6207 // IsStructFieldContext differentiates from other interfaces. 6208 IsStructFieldContext() 6209 } 6210 6211 type StructFieldContext struct { 6212 antlr.BaseParserRuleContext 6213 parser antlr.Parser 6214 } 6215 6216 func NewEmptyStructFieldContext() *StructFieldContext { 6217 var p = new(StructFieldContext) 6218 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 6219 p.RuleIndex = nevaParserRULE_structField 6220 return p 6221 } 6222 6223 func InitEmptyStructFieldContext(p *StructFieldContext) { 6224 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 6225 p.RuleIndex = nevaParserRULE_structField 6226 } 6227 6228 func (*StructFieldContext) IsStructFieldContext() {} 6229 6230 func NewStructFieldContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StructFieldContext { 6231 var p = new(StructFieldContext) 6232 6233 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 6234 6235 p.parser = parser 6236 p.RuleIndex = nevaParserRULE_structField 6237 6238 return p 6239 } 6240 6241 func (s *StructFieldContext) GetParser() antlr.Parser { return s.parser } 6242 6243 func (s *StructFieldContext) IDENTIFIER() antlr.TerminalNode { 6244 return s.GetToken(nevaParserIDENTIFIER, 0) 6245 } 6246 6247 func (s *StructFieldContext) TypeExpr() ITypeExprContext { 6248 var t antlr.RuleContext 6249 for _, ctx := range s.GetChildren() { 6250 if _, ok := ctx.(ITypeExprContext); ok { 6251 t = ctx.(antlr.RuleContext) 6252 break 6253 } 6254 } 6255 6256 if t == nil { 6257 return nil 6258 } 6259 6260 return t.(ITypeExprContext) 6261 } 6262 6263 func (s *StructFieldContext) AllNEWLINE() []antlr.TerminalNode { 6264 return s.GetTokens(nevaParserNEWLINE) 6265 } 6266 6267 func (s *StructFieldContext) NEWLINE(i int) antlr.TerminalNode { 6268 return s.GetToken(nevaParserNEWLINE, i) 6269 } 6270 6271 func (s *StructFieldContext) GetRuleContext() antlr.RuleContext { 6272 return s 6273 } 6274 6275 func (s *StructFieldContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 6276 return antlr.TreesStringTree(s, ruleNames, recog) 6277 } 6278 6279 func (s *StructFieldContext) EnterRule(listener antlr.ParseTreeListener) { 6280 if listenerT, ok := listener.(nevaListener); ok { 6281 listenerT.EnterStructField(s) 6282 } 6283 } 6284 6285 func (s *StructFieldContext) ExitRule(listener antlr.ParseTreeListener) { 6286 if listenerT, ok := listener.(nevaListener); ok { 6287 listenerT.ExitStructField(s) 6288 } 6289 } 6290 6291 func (p *nevaParser) StructField() (localctx IStructFieldContext) { 6292 localctx = NewStructFieldContext(p, p.GetParserRuleContext(), p.GetState()) 6293 p.EnterRule(localctx, 66, nevaParserRULE_structField) 6294 var _alt int 6295 6296 p.EnterOuterAlt(localctx, 1) 6297 { 6298 p.SetState(514) 6299 p.Match(nevaParserIDENTIFIER) 6300 if p.HasError() { 6301 // Recognition error - abort rule 6302 goto errorExit 6303 } 6304 } 6305 { 6306 p.SetState(515) 6307 p.TypeExpr() 6308 } 6309 p.SetState(519) 6310 p.GetErrorHandler().Sync(p) 6311 if p.HasError() { 6312 goto errorExit 6313 } 6314 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 51, p.GetParserRuleContext()) 6315 if p.HasError() { 6316 goto errorExit 6317 } 6318 for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { 6319 if _alt == 1 { 6320 { 6321 p.SetState(516) 6322 p.Match(nevaParserNEWLINE) 6323 if p.HasError() { 6324 // Recognition error - abort rule 6325 goto errorExit 6326 } 6327 } 6328 6329 } 6330 p.SetState(521) 6331 p.GetErrorHandler().Sync(p) 6332 if p.HasError() { 6333 goto errorExit 6334 } 6335 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 51, p.GetParserRuleContext()) 6336 if p.HasError() { 6337 goto errorExit 6338 } 6339 } 6340 6341 errorExit: 6342 if p.HasError() { 6343 v := p.GetError() 6344 localctx.SetException(v) 6345 p.GetErrorHandler().ReportError(p, v) 6346 p.GetErrorHandler().Recover(p, v) 6347 p.SetError(nil) 6348 } 6349 p.ExitRule() 6350 return localctx 6351 goto errorExit // Trick to prevent compiler error if the label is not used 6352 } 6353 6354 // IUnionTypeExprContext is an interface to support dynamic dispatch. 6355 type IUnionTypeExprContext interface { 6356 antlr.ParserRuleContext 6357 6358 // GetParser returns the parser. 6359 GetParser() antlr.Parser 6360 6361 // Getter signatures 6362 AllNonUnionTypeExpr() []INonUnionTypeExprContext 6363 NonUnionTypeExpr(i int) INonUnionTypeExprContext 6364 AllNEWLINE() []antlr.TerminalNode 6365 NEWLINE(i int) antlr.TerminalNode 6366 6367 // IsUnionTypeExprContext differentiates from other interfaces. 6368 IsUnionTypeExprContext() 6369 } 6370 6371 type UnionTypeExprContext struct { 6372 antlr.BaseParserRuleContext 6373 parser antlr.Parser 6374 } 6375 6376 func NewEmptyUnionTypeExprContext() *UnionTypeExprContext { 6377 var p = new(UnionTypeExprContext) 6378 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 6379 p.RuleIndex = nevaParserRULE_unionTypeExpr 6380 return p 6381 } 6382 6383 func InitEmptyUnionTypeExprContext(p *UnionTypeExprContext) { 6384 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 6385 p.RuleIndex = nevaParserRULE_unionTypeExpr 6386 } 6387 6388 func (*UnionTypeExprContext) IsUnionTypeExprContext() {} 6389 6390 func NewUnionTypeExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *UnionTypeExprContext { 6391 var p = new(UnionTypeExprContext) 6392 6393 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 6394 6395 p.parser = parser 6396 p.RuleIndex = nevaParserRULE_unionTypeExpr 6397 6398 return p 6399 } 6400 6401 func (s *UnionTypeExprContext) GetParser() antlr.Parser { return s.parser } 6402 6403 func (s *UnionTypeExprContext) AllNonUnionTypeExpr() []INonUnionTypeExprContext { 6404 children := s.GetChildren() 6405 len := 0 6406 for _, ctx := range children { 6407 if _, ok := ctx.(INonUnionTypeExprContext); ok { 6408 len++ 6409 } 6410 } 6411 6412 tst := make([]INonUnionTypeExprContext, len) 6413 i := 0 6414 for _, ctx := range children { 6415 if t, ok := ctx.(INonUnionTypeExprContext); ok { 6416 tst[i] = t.(INonUnionTypeExprContext) 6417 i++ 6418 } 6419 } 6420 6421 return tst 6422 } 6423 6424 func (s *UnionTypeExprContext) NonUnionTypeExpr(i int) INonUnionTypeExprContext { 6425 var t antlr.RuleContext 6426 j := 0 6427 for _, ctx := range s.GetChildren() { 6428 if _, ok := ctx.(INonUnionTypeExprContext); ok { 6429 if j == i { 6430 t = ctx.(antlr.RuleContext) 6431 break 6432 } 6433 j++ 6434 } 6435 } 6436 6437 if t == nil { 6438 return nil 6439 } 6440 6441 return t.(INonUnionTypeExprContext) 6442 } 6443 6444 func (s *UnionTypeExprContext) AllNEWLINE() []antlr.TerminalNode { 6445 return s.GetTokens(nevaParserNEWLINE) 6446 } 6447 6448 func (s *UnionTypeExprContext) NEWLINE(i int) antlr.TerminalNode { 6449 return s.GetToken(nevaParserNEWLINE, i) 6450 } 6451 6452 func (s *UnionTypeExprContext) GetRuleContext() antlr.RuleContext { 6453 return s 6454 } 6455 6456 func (s *UnionTypeExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 6457 return antlr.TreesStringTree(s, ruleNames, recog) 6458 } 6459 6460 func (s *UnionTypeExprContext) EnterRule(listener antlr.ParseTreeListener) { 6461 if listenerT, ok := listener.(nevaListener); ok { 6462 listenerT.EnterUnionTypeExpr(s) 6463 } 6464 } 6465 6466 func (s *UnionTypeExprContext) ExitRule(listener antlr.ParseTreeListener) { 6467 if listenerT, ok := listener.(nevaListener); ok { 6468 listenerT.ExitUnionTypeExpr(s) 6469 } 6470 } 6471 6472 func (p *nevaParser) UnionTypeExpr() (localctx IUnionTypeExprContext) { 6473 localctx = NewUnionTypeExprContext(p, p.GetParserRuleContext(), p.GetState()) 6474 p.EnterRule(localctx, 68, nevaParserRULE_unionTypeExpr) 6475 var _la int 6476 6477 var _alt int 6478 6479 p.EnterOuterAlt(localctx, 1) 6480 { 6481 p.SetState(522) 6482 p.NonUnionTypeExpr() 6483 } 6484 p.SetState(537) 6485 p.GetErrorHandler().Sync(p) 6486 if p.HasError() { 6487 goto errorExit 6488 } 6489 _alt = 1 6490 for ok := true; ok; ok = _alt != 2 && _alt != antlr.ATNInvalidAltNumber { 6491 switch _alt { 6492 case 1: 6493 p.SetState(526) 6494 p.GetErrorHandler().Sync(p) 6495 if p.HasError() { 6496 goto errorExit 6497 } 6498 _la = p.GetTokenStream().LA(1) 6499 6500 for _la == nevaParserNEWLINE { 6501 { 6502 p.SetState(523) 6503 p.Match(nevaParserNEWLINE) 6504 if p.HasError() { 6505 // Recognition error - abort rule 6506 goto errorExit 6507 } 6508 } 6509 6510 p.SetState(528) 6511 p.GetErrorHandler().Sync(p) 6512 if p.HasError() { 6513 goto errorExit 6514 } 6515 _la = p.GetTokenStream().LA(1) 6516 } 6517 { 6518 p.SetState(529) 6519 p.Match(nevaParserT__16) 6520 if p.HasError() { 6521 // Recognition error - abort rule 6522 goto errorExit 6523 } 6524 } 6525 p.SetState(533) 6526 p.GetErrorHandler().Sync(p) 6527 if p.HasError() { 6528 goto errorExit 6529 } 6530 _la = p.GetTokenStream().LA(1) 6531 6532 for _la == nevaParserNEWLINE { 6533 { 6534 p.SetState(530) 6535 p.Match(nevaParserNEWLINE) 6536 if p.HasError() { 6537 // Recognition error - abort rule 6538 goto errorExit 6539 } 6540 } 6541 6542 p.SetState(535) 6543 p.GetErrorHandler().Sync(p) 6544 if p.HasError() { 6545 goto errorExit 6546 } 6547 _la = p.GetTokenStream().LA(1) 6548 } 6549 { 6550 p.SetState(536) 6551 p.NonUnionTypeExpr() 6552 } 6553 6554 default: 6555 p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) 6556 goto errorExit 6557 } 6558 6559 p.SetState(539) 6560 p.GetErrorHandler().Sync(p) 6561 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 54, p.GetParserRuleContext()) 6562 if p.HasError() { 6563 goto errorExit 6564 } 6565 } 6566 6567 errorExit: 6568 if p.HasError() { 6569 v := p.GetError() 6570 localctx.SetException(v) 6571 p.GetErrorHandler().ReportError(p, v) 6572 p.GetErrorHandler().Recover(p, v) 6573 p.SetError(nil) 6574 } 6575 p.ExitRule() 6576 return localctx 6577 goto errorExit // Trick to prevent compiler error if the label is not used 6578 } 6579 6580 // INonUnionTypeExprContext is an interface to support dynamic dispatch. 6581 type INonUnionTypeExprContext interface { 6582 antlr.ParserRuleContext 6583 6584 // GetParser returns the parser. 6585 GetParser() antlr.Parser 6586 6587 // Getter signatures 6588 TypeInstExpr() ITypeInstExprContext 6589 TypeLitExpr() ITypeLitExprContext 6590 6591 // IsNonUnionTypeExprContext differentiates from other interfaces. 6592 IsNonUnionTypeExprContext() 6593 } 6594 6595 type NonUnionTypeExprContext struct { 6596 antlr.BaseParserRuleContext 6597 parser antlr.Parser 6598 } 6599 6600 func NewEmptyNonUnionTypeExprContext() *NonUnionTypeExprContext { 6601 var p = new(NonUnionTypeExprContext) 6602 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 6603 p.RuleIndex = nevaParserRULE_nonUnionTypeExpr 6604 return p 6605 } 6606 6607 func InitEmptyNonUnionTypeExprContext(p *NonUnionTypeExprContext) { 6608 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 6609 p.RuleIndex = nevaParserRULE_nonUnionTypeExpr 6610 } 6611 6612 func (*NonUnionTypeExprContext) IsNonUnionTypeExprContext() {} 6613 6614 func NewNonUnionTypeExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NonUnionTypeExprContext { 6615 var p = new(NonUnionTypeExprContext) 6616 6617 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 6618 6619 p.parser = parser 6620 p.RuleIndex = nevaParserRULE_nonUnionTypeExpr 6621 6622 return p 6623 } 6624 6625 func (s *NonUnionTypeExprContext) GetParser() antlr.Parser { return s.parser } 6626 6627 func (s *NonUnionTypeExprContext) TypeInstExpr() ITypeInstExprContext { 6628 var t antlr.RuleContext 6629 for _, ctx := range s.GetChildren() { 6630 if _, ok := ctx.(ITypeInstExprContext); ok { 6631 t = ctx.(antlr.RuleContext) 6632 break 6633 } 6634 } 6635 6636 if t == nil { 6637 return nil 6638 } 6639 6640 return t.(ITypeInstExprContext) 6641 } 6642 6643 func (s *NonUnionTypeExprContext) TypeLitExpr() ITypeLitExprContext { 6644 var t antlr.RuleContext 6645 for _, ctx := range s.GetChildren() { 6646 if _, ok := ctx.(ITypeLitExprContext); ok { 6647 t = ctx.(antlr.RuleContext) 6648 break 6649 } 6650 } 6651 6652 if t == nil { 6653 return nil 6654 } 6655 6656 return t.(ITypeLitExprContext) 6657 } 6658 6659 func (s *NonUnionTypeExprContext) GetRuleContext() antlr.RuleContext { 6660 return s 6661 } 6662 6663 func (s *NonUnionTypeExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 6664 return antlr.TreesStringTree(s, ruleNames, recog) 6665 } 6666 6667 func (s *NonUnionTypeExprContext) EnterRule(listener antlr.ParseTreeListener) { 6668 if listenerT, ok := listener.(nevaListener); ok { 6669 listenerT.EnterNonUnionTypeExpr(s) 6670 } 6671 } 6672 6673 func (s *NonUnionTypeExprContext) ExitRule(listener antlr.ParseTreeListener) { 6674 if listenerT, ok := listener.(nevaListener); ok { 6675 listenerT.ExitNonUnionTypeExpr(s) 6676 } 6677 } 6678 6679 func (p *nevaParser) NonUnionTypeExpr() (localctx INonUnionTypeExprContext) { 6680 localctx = NewNonUnionTypeExprContext(p, p.GetParserRuleContext(), p.GetState()) 6681 p.EnterRule(localctx, 70, nevaParserRULE_nonUnionTypeExpr) 6682 p.SetState(543) 6683 p.GetErrorHandler().Sync(p) 6684 if p.HasError() { 6685 goto errorExit 6686 } 6687 6688 switch p.GetTokenStream().LA(1) { 6689 case nevaParserIDENTIFIER: 6690 p.EnterOuterAlt(localctx, 1) 6691 { 6692 p.SetState(541) 6693 p.TypeInstExpr() 6694 } 6695 6696 case nevaParserT__14, nevaParserT__15: 6697 p.EnterOuterAlt(localctx, 2) 6698 { 6699 p.SetState(542) 6700 p.TypeLitExpr() 6701 } 6702 6703 default: 6704 p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) 6705 goto errorExit 6706 } 6707 6708 errorExit: 6709 if p.HasError() { 6710 v := p.GetError() 6711 localctx.SetException(v) 6712 p.GetErrorHandler().ReportError(p, v) 6713 p.GetErrorHandler().Recover(p, v) 6714 p.SetError(nil) 6715 } 6716 p.ExitRule() 6717 return localctx 6718 goto errorExit // Trick to prevent compiler error if the label is not used 6719 } 6720 6721 // IInterfaceStmtContext is an interface to support dynamic dispatch. 6722 type IInterfaceStmtContext interface { 6723 antlr.ParserRuleContext 6724 6725 // GetParser returns the parser. 6726 GetParser() antlr.Parser 6727 6728 // Getter signatures 6729 SingleInterfaceStmt() ISingleInterfaceStmtContext 6730 GroupInterfaceStmt() IGroupInterfaceStmtContext 6731 6732 // IsInterfaceStmtContext differentiates from other interfaces. 6733 IsInterfaceStmtContext() 6734 } 6735 6736 type InterfaceStmtContext struct { 6737 antlr.BaseParserRuleContext 6738 parser antlr.Parser 6739 } 6740 6741 func NewEmptyInterfaceStmtContext() *InterfaceStmtContext { 6742 var p = new(InterfaceStmtContext) 6743 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 6744 p.RuleIndex = nevaParserRULE_interfaceStmt 6745 return p 6746 } 6747 6748 func InitEmptyInterfaceStmtContext(p *InterfaceStmtContext) { 6749 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 6750 p.RuleIndex = nevaParserRULE_interfaceStmt 6751 } 6752 6753 func (*InterfaceStmtContext) IsInterfaceStmtContext() {} 6754 6755 func NewInterfaceStmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *InterfaceStmtContext { 6756 var p = new(InterfaceStmtContext) 6757 6758 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 6759 6760 p.parser = parser 6761 p.RuleIndex = nevaParserRULE_interfaceStmt 6762 6763 return p 6764 } 6765 6766 func (s *InterfaceStmtContext) GetParser() antlr.Parser { return s.parser } 6767 6768 func (s *InterfaceStmtContext) SingleInterfaceStmt() ISingleInterfaceStmtContext { 6769 var t antlr.RuleContext 6770 for _, ctx := range s.GetChildren() { 6771 if _, ok := ctx.(ISingleInterfaceStmtContext); ok { 6772 t = ctx.(antlr.RuleContext) 6773 break 6774 } 6775 } 6776 6777 if t == nil { 6778 return nil 6779 } 6780 6781 return t.(ISingleInterfaceStmtContext) 6782 } 6783 6784 func (s *InterfaceStmtContext) GroupInterfaceStmt() IGroupInterfaceStmtContext { 6785 var t antlr.RuleContext 6786 for _, ctx := range s.GetChildren() { 6787 if _, ok := ctx.(IGroupInterfaceStmtContext); ok { 6788 t = ctx.(antlr.RuleContext) 6789 break 6790 } 6791 } 6792 6793 if t == nil { 6794 return nil 6795 } 6796 6797 return t.(IGroupInterfaceStmtContext) 6798 } 6799 6800 func (s *InterfaceStmtContext) GetRuleContext() antlr.RuleContext { 6801 return s 6802 } 6803 6804 func (s *InterfaceStmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 6805 return antlr.TreesStringTree(s, ruleNames, recog) 6806 } 6807 6808 func (s *InterfaceStmtContext) EnterRule(listener antlr.ParseTreeListener) { 6809 if listenerT, ok := listener.(nevaListener); ok { 6810 listenerT.EnterInterfaceStmt(s) 6811 } 6812 } 6813 6814 func (s *InterfaceStmtContext) ExitRule(listener antlr.ParseTreeListener) { 6815 if listenerT, ok := listener.(nevaListener); ok { 6816 listenerT.ExitInterfaceStmt(s) 6817 } 6818 } 6819 6820 func (p *nevaParser) InterfaceStmt() (localctx IInterfaceStmtContext) { 6821 localctx = NewInterfaceStmtContext(p, p.GetParserRuleContext(), p.GetState()) 6822 p.EnterRule(localctx, 72, nevaParserRULE_interfaceStmt) 6823 p.SetState(547) 6824 p.GetErrorHandler().Sync(p) 6825 if p.HasError() { 6826 goto errorExit 6827 } 6828 6829 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 56, p.GetParserRuleContext()) { 6830 case 1: 6831 p.EnterOuterAlt(localctx, 1) 6832 { 6833 p.SetState(545) 6834 p.SingleInterfaceStmt() 6835 } 6836 6837 case 2: 6838 p.EnterOuterAlt(localctx, 2) 6839 { 6840 p.SetState(546) 6841 p.GroupInterfaceStmt() 6842 } 6843 6844 case antlr.ATNInvalidAltNumber: 6845 goto errorExit 6846 } 6847 6848 errorExit: 6849 if p.HasError() { 6850 v := p.GetError() 6851 localctx.SetException(v) 6852 p.GetErrorHandler().ReportError(p, v) 6853 p.GetErrorHandler().Recover(p, v) 6854 p.SetError(nil) 6855 } 6856 p.ExitRule() 6857 return localctx 6858 goto errorExit // Trick to prevent compiler error if the label is not used 6859 } 6860 6861 // ISingleInterfaceStmtContext is an interface to support dynamic dispatch. 6862 type ISingleInterfaceStmtContext interface { 6863 antlr.ParserRuleContext 6864 6865 // GetParser returns the parser. 6866 GetParser() antlr.Parser 6867 6868 // Getter signatures 6869 InterfaceDef() IInterfaceDefContext 6870 PUB_KW() antlr.TerminalNode 6871 6872 // IsSingleInterfaceStmtContext differentiates from other interfaces. 6873 IsSingleInterfaceStmtContext() 6874 } 6875 6876 type SingleInterfaceStmtContext struct { 6877 antlr.BaseParserRuleContext 6878 parser antlr.Parser 6879 } 6880 6881 func NewEmptySingleInterfaceStmtContext() *SingleInterfaceStmtContext { 6882 var p = new(SingleInterfaceStmtContext) 6883 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 6884 p.RuleIndex = nevaParserRULE_singleInterfaceStmt 6885 return p 6886 } 6887 6888 func InitEmptySingleInterfaceStmtContext(p *SingleInterfaceStmtContext) { 6889 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 6890 p.RuleIndex = nevaParserRULE_singleInterfaceStmt 6891 } 6892 6893 func (*SingleInterfaceStmtContext) IsSingleInterfaceStmtContext() {} 6894 6895 func NewSingleInterfaceStmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SingleInterfaceStmtContext { 6896 var p = new(SingleInterfaceStmtContext) 6897 6898 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 6899 6900 p.parser = parser 6901 p.RuleIndex = nevaParserRULE_singleInterfaceStmt 6902 6903 return p 6904 } 6905 6906 func (s *SingleInterfaceStmtContext) GetParser() antlr.Parser { return s.parser } 6907 6908 func (s *SingleInterfaceStmtContext) InterfaceDef() IInterfaceDefContext { 6909 var t antlr.RuleContext 6910 for _, ctx := range s.GetChildren() { 6911 if _, ok := ctx.(IInterfaceDefContext); ok { 6912 t = ctx.(antlr.RuleContext) 6913 break 6914 } 6915 } 6916 6917 if t == nil { 6918 return nil 6919 } 6920 6921 return t.(IInterfaceDefContext) 6922 } 6923 6924 func (s *SingleInterfaceStmtContext) PUB_KW() antlr.TerminalNode { 6925 return s.GetToken(nevaParserPUB_KW, 0) 6926 } 6927 6928 func (s *SingleInterfaceStmtContext) GetRuleContext() antlr.RuleContext { 6929 return s 6930 } 6931 6932 func (s *SingleInterfaceStmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 6933 return antlr.TreesStringTree(s, ruleNames, recog) 6934 } 6935 6936 func (s *SingleInterfaceStmtContext) EnterRule(listener antlr.ParseTreeListener) { 6937 if listenerT, ok := listener.(nevaListener); ok { 6938 listenerT.EnterSingleInterfaceStmt(s) 6939 } 6940 } 6941 6942 func (s *SingleInterfaceStmtContext) ExitRule(listener antlr.ParseTreeListener) { 6943 if listenerT, ok := listener.(nevaListener); ok { 6944 listenerT.ExitSingleInterfaceStmt(s) 6945 } 6946 } 6947 6948 func (p *nevaParser) SingleInterfaceStmt() (localctx ISingleInterfaceStmtContext) { 6949 localctx = NewSingleInterfaceStmtContext(p, p.GetParserRuleContext(), p.GetState()) 6950 p.EnterRule(localctx, 74, nevaParserRULE_singleInterfaceStmt) 6951 var _la int 6952 6953 p.EnterOuterAlt(localctx, 1) 6954 p.SetState(550) 6955 p.GetErrorHandler().Sync(p) 6956 if p.HasError() { 6957 goto errorExit 6958 } 6959 _la = p.GetTokenStream().LA(1) 6960 6961 if _la == nevaParserPUB_KW { 6962 { 6963 p.SetState(549) 6964 p.Match(nevaParserPUB_KW) 6965 if p.HasError() { 6966 // Recognition error - abort rule 6967 goto errorExit 6968 } 6969 } 6970 6971 } 6972 { 6973 p.SetState(552) 6974 p.Match(nevaParserT__17) 6975 if p.HasError() { 6976 // Recognition error - abort rule 6977 goto errorExit 6978 } 6979 } 6980 { 6981 p.SetState(553) 6982 p.InterfaceDef() 6983 } 6984 6985 errorExit: 6986 if p.HasError() { 6987 v := p.GetError() 6988 localctx.SetException(v) 6989 p.GetErrorHandler().ReportError(p, v) 6990 p.GetErrorHandler().Recover(p, v) 6991 p.SetError(nil) 6992 } 6993 p.ExitRule() 6994 return localctx 6995 goto errorExit // Trick to prevent compiler error if the label is not used 6996 } 6997 6998 // IGroupInterfaceStmtContext is an interface to support dynamic dispatch. 6999 type IGroupInterfaceStmtContext interface { 7000 antlr.ParserRuleContext 7001 7002 // GetParser returns the parser. 7003 GetParser() antlr.Parser 7004 7005 // Getter signatures 7006 AllNEWLINE() []antlr.TerminalNode 7007 NEWLINE(i int) antlr.TerminalNode 7008 AllInterfaceDef() []IInterfaceDefContext 7009 InterfaceDef(i int) IInterfaceDefContext 7010 AllPUB_KW() []antlr.TerminalNode 7011 PUB_KW(i int) antlr.TerminalNode 7012 7013 // IsGroupInterfaceStmtContext differentiates from other interfaces. 7014 IsGroupInterfaceStmtContext() 7015 } 7016 7017 type GroupInterfaceStmtContext struct { 7018 antlr.BaseParserRuleContext 7019 parser antlr.Parser 7020 } 7021 7022 func NewEmptyGroupInterfaceStmtContext() *GroupInterfaceStmtContext { 7023 var p = new(GroupInterfaceStmtContext) 7024 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 7025 p.RuleIndex = nevaParserRULE_groupInterfaceStmt 7026 return p 7027 } 7028 7029 func InitEmptyGroupInterfaceStmtContext(p *GroupInterfaceStmtContext) { 7030 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 7031 p.RuleIndex = nevaParserRULE_groupInterfaceStmt 7032 } 7033 7034 func (*GroupInterfaceStmtContext) IsGroupInterfaceStmtContext() {} 7035 7036 func NewGroupInterfaceStmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *GroupInterfaceStmtContext { 7037 var p = new(GroupInterfaceStmtContext) 7038 7039 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 7040 7041 p.parser = parser 7042 p.RuleIndex = nevaParserRULE_groupInterfaceStmt 7043 7044 return p 7045 } 7046 7047 func (s *GroupInterfaceStmtContext) GetParser() antlr.Parser { return s.parser } 7048 7049 func (s *GroupInterfaceStmtContext) AllNEWLINE() []antlr.TerminalNode { 7050 return s.GetTokens(nevaParserNEWLINE) 7051 } 7052 7053 func (s *GroupInterfaceStmtContext) NEWLINE(i int) antlr.TerminalNode { 7054 return s.GetToken(nevaParserNEWLINE, i) 7055 } 7056 7057 func (s *GroupInterfaceStmtContext) AllInterfaceDef() []IInterfaceDefContext { 7058 children := s.GetChildren() 7059 len := 0 7060 for _, ctx := range children { 7061 if _, ok := ctx.(IInterfaceDefContext); ok { 7062 len++ 7063 } 7064 } 7065 7066 tst := make([]IInterfaceDefContext, len) 7067 i := 0 7068 for _, ctx := range children { 7069 if t, ok := ctx.(IInterfaceDefContext); ok { 7070 tst[i] = t.(IInterfaceDefContext) 7071 i++ 7072 } 7073 } 7074 7075 return tst 7076 } 7077 7078 func (s *GroupInterfaceStmtContext) InterfaceDef(i int) IInterfaceDefContext { 7079 var t antlr.RuleContext 7080 j := 0 7081 for _, ctx := range s.GetChildren() { 7082 if _, ok := ctx.(IInterfaceDefContext); ok { 7083 if j == i { 7084 t = ctx.(antlr.RuleContext) 7085 break 7086 } 7087 j++ 7088 } 7089 } 7090 7091 if t == nil { 7092 return nil 7093 } 7094 7095 return t.(IInterfaceDefContext) 7096 } 7097 7098 func (s *GroupInterfaceStmtContext) AllPUB_KW() []antlr.TerminalNode { 7099 return s.GetTokens(nevaParserPUB_KW) 7100 } 7101 7102 func (s *GroupInterfaceStmtContext) PUB_KW(i int) antlr.TerminalNode { 7103 return s.GetToken(nevaParserPUB_KW, i) 7104 } 7105 7106 func (s *GroupInterfaceStmtContext) GetRuleContext() antlr.RuleContext { 7107 return s 7108 } 7109 7110 func (s *GroupInterfaceStmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 7111 return antlr.TreesStringTree(s, ruleNames, recog) 7112 } 7113 7114 func (s *GroupInterfaceStmtContext) EnterRule(listener antlr.ParseTreeListener) { 7115 if listenerT, ok := listener.(nevaListener); ok { 7116 listenerT.EnterGroupInterfaceStmt(s) 7117 } 7118 } 7119 7120 func (s *GroupInterfaceStmtContext) ExitRule(listener antlr.ParseTreeListener) { 7121 if listenerT, ok := listener.(nevaListener); ok { 7122 listenerT.ExitGroupInterfaceStmt(s) 7123 } 7124 } 7125 7126 func (p *nevaParser) GroupInterfaceStmt() (localctx IGroupInterfaceStmtContext) { 7127 localctx = NewGroupInterfaceStmtContext(p, p.GetParserRuleContext(), p.GetState()) 7128 p.EnterRule(localctx, 76, nevaParserRULE_groupInterfaceStmt) 7129 var _la int 7130 7131 p.EnterOuterAlt(localctx, 1) 7132 { 7133 p.SetState(555) 7134 p.Match(nevaParserT__17) 7135 if p.HasError() { 7136 // Recognition error - abort rule 7137 goto errorExit 7138 } 7139 } 7140 p.SetState(559) 7141 p.GetErrorHandler().Sync(p) 7142 if p.HasError() { 7143 goto errorExit 7144 } 7145 _la = p.GetTokenStream().LA(1) 7146 7147 for _la == nevaParserNEWLINE { 7148 { 7149 p.SetState(556) 7150 p.Match(nevaParserNEWLINE) 7151 if p.HasError() { 7152 // Recognition error - abort rule 7153 goto errorExit 7154 } 7155 } 7156 7157 p.SetState(561) 7158 p.GetErrorHandler().Sync(p) 7159 if p.HasError() { 7160 goto errorExit 7161 } 7162 _la = p.GetTokenStream().LA(1) 7163 } 7164 { 7165 p.SetState(562) 7166 p.Match(nevaParserT__5) 7167 if p.HasError() { 7168 // Recognition error - abort rule 7169 goto errorExit 7170 } 7171 } 7172 p.SetState(566) 7173 p.GetErrorHandler().Sync(p) 7174 if p.HasError() { 7175 goto errorExit 7176 } 7177 _la = p.GetTokenStream().LA(1) 7178 7179 for _la == nevaParserNEWLINE { 7180 { 7181 p.SetState(563) 7182 p.Match(nevaParserNEWLINE) 7183 if p.HasError() { 7184 // Recognition error - abort rule 7185 goto errorExit 7186 } 7187 } 7188 7189 p.SetState(568) 7190 p.GetErrorHandler().Sync(p) 7191 if p.HasError() { 7192 goto errorExit 7193 } 7194 _la = p.GetTokenStream().LA(1) 7195 } 7196 p.SetState(575) 7197 p.GetErrorHandler().Sync(p) 7198 if p.HasError() { 7199 goto errorExit 7200 } 7201 _la = p.GetTokenStream().LA(1) 7202 7203 for _la == nevaParserPUB_KW || _la == nevaParserIDENTIFIER { 7204 p.SetState(570) 7205 p.GetErrorHandler().Sync(p) 7206 if p.HasError() { 7207 goto errorExit 7208 } 7209 _la = p.GetTokenStream().LA(1) 7210 7211 if _la == nevaParserPUB_KW { 7212 { 7213 p.SetState(569) 7214 p.Match(nevaParserPUB_KW) 7215 if p.HasError() { 7216 // Recognition error - abort rule 7217 goto errorExit 7218 } 7219 } 7220 7221 } 7222 { 7223 p.SetState(572) 7224 p.InterfaceDef() 7225 } 7226 7227 p.SetState(577) 7228 p.GetErrorHandler().Sync(p) 7229 if p.HasError() { 7230 goto errorExit 7231 } 7232 _la = p.GetTokenStream().LA(1) 7233 } 7234 { 7235 p.SetState(578) 7236 p.Match(nevaParserT__6) 7237 if p.HasError() { 7238 // Recognition error - abort rule 7239 goto errorExit 7240 } 7241 } 7242 7243 errorExit: 7244 if p.HasError() { 7245 v := p.GetError() 7246 localctx.SetException(v) 7247 p.GetErrorHandler().ReportError(p, v) 7248 p.GetErrorHandler().Recover(p, v) 7249 p.SetError(nil) 7250 } 7251 p.ExitRule() 7252 return localctx 7253 goto errorExit // Trick to prevent compiler error if the label is not used 7254 } 7255 7256 // IInterfaceDefContext is an interface to support dynamic dispatch. 7257 type IInterfaceDefContext interface { 7258 antlr.ParserRuleContext 7259 7260 // GetParser returns the parser. 7261 GetParser() antlr.Parser 7262 7263 // Getter signatures 7264 IDENTIFIER() antlr.TerminalNode 7265 InPortsDef() IInPortsDefContext 7266 OutPortsDef() IOutPortsDefContext 7267 TypeParams() ITypeParamsContext 7268 AllNEWLINE() []antlr.TerminalNode 7269 NEWLINE(i int) antlr.TerminalNode 7270 7271 // IsInterfaceDefContext differentiates from other interfaces. 7272 IsInterfaceDefContext() 7273 } 7274 7275 type InterfaceDefContext struct { 7276 antlr.BaseParserRuleContext 7277 parser antlr.Parser 7278 } 7279 7280 func NewEmptyInterfaceDefContext() *InterfaceDefContext { 7281 var p = new(InterfaceDefContext) 7282 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 7283 p.RuleIndex = nevaParserRULE_interfaceDef 7284 return p 7285 } 7286 7287 func InitEmptyInterfaceDefContext(p *InterfaceDefContext) { 7288 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 7289 p.RuleIndex = nevaParserRULE_interfaceDef 7290 } 7291 7292 func (*InterfaceDefContext) IsInterfaceDefContext() {} 7293 7294 func NewInterfaceDefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *InterfaceDefContext { 7295 var p = new(InterfaceDefContext) 7296 7297 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 7298 7299 p.parser = parser 7300 p.RuleIndex = nevaParserRULE_interfaceDef 7301 7302 return p 7303 } 7304 7305 func (s *InterfaceDefContext) GetParser() antlr.Parser { return s.parser } 7306 7307 func (s *InterfaceDefContext) IDENTIFIER() antlr.TerminalNode { 7308 return s.GetToken(nevaParserIDENTIFIER, 0) 7309 } 7310 7311 func (s *InterfaceDefContext) InPortsDef() IInPortsDefContext { 7312 var t antlr.RuleContext 7313 for _, ctx := range s.GetChildren() { 7314 if _, ok := ctx.(IInPortsDefContext); ok { 7315 t = ctx.(antlr.RuleContext) 7316 break 7317 } 7318 } 7319 7320 if t == nil { 7321 return nil 7322 } 7323 7324 return t.(IInPortsDefContext) 7325 } 7326 7327 func (s *InterfaceDefContext) OutPortsDef() IOutPortsDefContext { 7328 var t antlr.RuleContext 7329 for _, ctx := range s.GetChildren() { 7330 if _, ok := ctx.(IOutPortsDefContext); ok { 7331 t = ctx.(antlr.RuleContext) 7332 break 7333 } 7334 } 7335 7336 if t == nil { 7337 return nil 7338 } 7339 7340 return t.(IOutPortsDefContext) 7341 } 7342 7343 func (s *InterfaceDefContext) TypeParams() ITypeParamsContext { 7344 var t antlr.RuleContext 7345 for _, ctx := range s.GetChildren() { 7346 if _, ok := ctx.(ITypeParamsContext); ok { 7347 t = ctx.(antlr.RuleContext) 7348 break 7349 } 7350 } 7351 7352 if t == nil { 7353 return nil 7354 } 7355 7356 return t.(ITypeParamsContext) 7357 } 7358 7359 func (s *InterfaceDefContext) AllNEWLINE() []antlr.TerminalNode { 7360 return s.GetTokens(nevaParserNEWLINE) 7361 } 7362 7363 func (s *InterfaceDefContext) NEWLINE(i int) antlr.TerminalNode { 7364 return s.GetToken(nevaParserNEWLINE, i) 7365 } 7366 7367 func (s *InterfaceDefContext) GetRuleContext() antlr.RuleContext { 7368 return s 7369 } 7370 7371 func (s *InterfaceDefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 7372 return antlr.TreesStringTree(s, ruleNames, recog) 7373 } 7374 7375 func (s *InterfaceDefContext) EnterRule(listener antlr.ParseTreeListener) { 7376 if listenerT, ok := listener.(nevaListener); ok { 7377 listenerT.EnterInterfaceDef(s) 7378 } 7379 } 7380 7381 func (s *InterfaceDefContext) ExitRule(listener antlr.ParseTreeListener) { 7382 if listenerT, ok := listener.(nevaListener); ok { 7383 listenerT.ExitInterfaceDef(s) 7384 } 7385 } 7386 7387 func (p *nevaParser) InterfaceDef() (localctx IInterfaceDefContext) { 7388 localctx = NewInterfaceDefContext(p, p.GetParserRuleContext(), p.GetState()) 7389 p.EnterRule(localctx, 78, nevaParserRULE_interfaceDef) 7390 var _la int 7391 7392 var _alt int 7393 7394 p.EnterOuterAlt(localctx, 1) 7395 { 7396 p.SetState(580) 7397 p.Match(nevaParserIDENTIFIER) 7398 if p.HasError() { 7399 // Recognition error - abort rule 7400 goto errorExit 7401 } 7402 } 7403 p.SetState(582) 7404 p.GetErrorHandler().Sync(p) 7405 if p.HasError() { 7406 goto errorExit 7407 } 7408 _la = p.GetTokenStream().LA(1) 7409 7410 if _la == nevaParserT__12 { 7411 { 7412 p.SetState(581) 7413 p.TypeParams() 7414 } 7415 7416 } 7417 { 7418 p.SetState(584) 7419 p.InPortsDef() 7420 } 7421 { 7422 p.SetState(585) 7423 p.OutPortsDef() 7424 } 7425 p.SetState(589) 7426 p.GetErrorHandler().Sync(p) 7427 if p.HasError() { 7428 goto errorExit 7429 } 7430 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 63, p.GetParserRuleContext()) 7431 if p.HasError() { 7432 goto errorExit 7433 } 7434 for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { 7435 if _alt == 1 { 7436 { 7437 p.SetState(586) 7438 p.Match(nevaParserNEWLINE) 7439 if p.HasError() { 7440 // Recognition error - abort rule 7441 goto errorExit 7442 } 7443 } 7444 7445 } 7446 p.SetState(591) 7447 p.GetErrorHandler().Sync(p) 7448 if p.HasError() { 7449 goto errorExit 7450 } 7451 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 63, p.GetParserRuleContext()) 7452 if p.HasError() { 7453 goto errorExit 7454 } 7455 } 7456 7457 errorExit: 7458 if p.HasError() { 7459 v := p.GetError() 7460 localctx.SetException(v) 7461 p.GetErrorHandler().ReportError(p, v) 7462 p.GetErrorHandler().Recover(p, v) 7463 p.SetError(nil) 7464 } 7465 p.ExitRule() 7466 return localctx 7467 goto errorExit // Trick to prevent compiler error if the label is not used 7468 } 7469 7470 // IInPortsDefContext is an interface to support dynamic dispatch. 7471 type IInPortsDefContext interface { 7472 antlr.ParserRuleContext 7473 7474 // GetParser returns the parser. 7475 GetParser() antlr.Parser 7476 7477 // Getter signatures 7478 PortsDef() IPortsDefContext 7479 7480 // IsInPortsDefContext differentiates from other interfaces. 7481 IsInPortsDefContext() 7482 } 7483 7484 type InPortsDefContext struct { 7485 antlr.BaseParserRuleContext 7486 parser antlr.Parser 7487 } 7488 7489 func NewEmptyInPortsDefContext() *InPortsDefContext { 7490 var p = new(InPortsDefContext) 7491 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 7492 p.RuleIndex = nevaParserRULE_inPortsDef 7493 return p 7494 } 7495 7496 func InitEmptyInPortsDefContext(p *InPortsDefContext) { 7497 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 7498 p.RuleIndex = nevaParserRULE_inPortsDef 7499 } 7500 7501 func (*InPortsDefContext) IsInPortsDefContext() {} 7502 7503 func NewInPortsDefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *InPortsDefContext { 7504 var p = new(InPortsDefContext) 7505 7506 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 7507 7508 p.parser = parser 7509 p.RuleIndex = nevaParserRULE_inPortsDef 7510 7511 return p 7512 } 7513 7514 func (s *InPortsDefContext) GetParser() antlr.Parser { return s.parser } 7515 7516 func (s *InPortsDefContext) PortsDef() IPortsDefContext { 7517 var t antlr.RuleContext 7518 for _, ctx := range s.GetChildren() { 7519 if _, ok := ctx.(IPortsDefContext); ok { 7520 t = ctx.(antlr.RuleContext) 7521 break 7522 } 7523 } 7524 7525 if t == nil { 7526 return nil 7527 } 7528 7529 return t.(IPortsDefContext) 7530 } 7531 7532 func (s *InPortsDefContext) GetRuleContext() antlr.RuleContext { 7533 return s 7534 } 7535 7536 func (s *InPortsDefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 7537 return antlr.TreesStringTree(s, ruleNames, recog) 7538 } 7539 7540 func (s *InPortsDefContext) EnterRule(listener antlr.ParseTreeListener) { 7541 if listenerT, ok := listener.(nevaListener); ok { 7542 listenerT.EnterInPortsDef(s) 7543 } 7544 } 7545 7546 func (s *InPortsDefContext) ExitRule(listener antlr.ParseTreeListener) { 7547 if listenerT, ok := listener.(nevaListener); ok { 7548 listenerT.ExitInPortsDef(s) 7549 } 7550 } 7551 7552 func (p *nevaParser) InPortsDef() (localctx IInPortsDefContext) { 7553 localctx = NewInPortsDefContext(p, p.GetParserRuleContext(), p.GetState()) 7554 p.EnterRule(localctx, 80, nevaParserRULE_inPortsDef) 7555 p.EnterOuterAlt(localctx, 1) 7556 { 7557 p.SetState(592) 7558 p.PortsDef() 7559 } 7560 7561 errorExit: 7562 if p.HasError() { 7563 v := p.GetError() 7564 localctx.SetException(v) 7565 p.GetErrorHandler().ReportError(p, v) 7566 p.GetErrorHandler().Recover(p, v) 7567 p.SetError(nil) 7568 } 7569 p.ExitRule() 7570 return localctx 7571 goto errorExit // Trick to prevent compiler error if the label is not used 7572 } 7573 7574 // IOutPortsDefContext is an interface to support dynamic dispatch. 7575 type IOutPortsDefContext interface { 7576 antlr.ParserRuleContext 7577 7578 // GetParser returns the parser. 7579 GetParser() antlr.Parser 7580 7581 // Getter signatures 7582 PortsDef() IPortsDefContext 7583 7584 // IsOutPortsDefContext differentiates from other interfaces. 7585 IsOutPortsDefContext() 7586 } 7587 7588 type OutPortsDefContext struct { 7589 antlr.BaseParserRuleContext 7590 parser antlr.Parser 7591 } 7592 7593 func NewEmptyOutPortsDefContext() *OutPortsDefContext { 7594 var p = new(OutPortsDefContext) 7595 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 7596 p.RuleIndex = nevaParserRULE_outPortsDef 7597 return p 7598 } 7599 7600 func InitEmptyOutPortsDefContext(p *OutPortsDefContext) { 7601 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 7602 p.RuleIndex = nevaParserRULE_outPortsDef 7603 } 7604 7605 func (*OutPortsDefContext) IsOutPortsDefContext() {} 7606 7607 func NewOutPortsDefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *OutPortsDefContext { 7608 var p = new(OutPortsDefContext) 7609 7610 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 7611 7612 p.parser = parser 7613 p.RuleIndex = nevaParserRULE_outPortsDef 7614 7615 return p 7616 } 7617 7618 func (s *OutPortsDefContext) GetParser() antlr.Parser { return s.parser } 7619 7620 func (s *OutPortsDefContext) PortsDef() IPortsDefContext { 7621 var t antlr.RuleContext 7622 for _, ctx := range s.GetChildren() { 7623 if _, ok := ctx.(IPortsDefContext); ok { 7624 t = ctx.(antlr.RuleContext) 7625 break 7626 } 7627 } 7628 7629 if t == nil { 7630 return nil 7631 } 7632 7633 return t.(IPortsDefContext) 7634 } 7635 7636 func (s *OutPortsDefContext) GetRuleContext() antlr.RuleContext { 7637 return s 7638 } 7639 7640 func (s *OutPortsDefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 7641 return antlr.TreesStringTree(s, ruleNames, recog) 7642 } 7643 7644 func (s *OutPortsDefContext) EnterRule(listener antlr.ParseTreeListener) { 7645 if listenerT, ok := listener.(nevaListener); ok { 7646 listenerT.EnterOutPortsDef(s) 7647 } 7648 } 7649 7650 func (s *OutPortsDefContext) ExitRule(listener antlr.ParseTreeListener) { 7651 if listenerT, ok := listener.(nevaListener); ok { 7652 listenerT.ExitOutPortsDef(s) 7653 } 7654 } 7655 7656 func (p *nevaParser) OutPortsDef() (localctx IOutPortsDefContext) { 7657 localctx = NewOutPortsDefContext(p, p.GetParserRuleContext(), p.GetState()) 7658 p.EnterRule(localctx, 82, nevaParserRULE_outPortsDef) 7659 p.EnterOuterAlt(localctx, 1) 7660 { 7661 p.SetState(594) 7662 p.PortsDef() 7663 } 7664 7665 errorExit: 7666 if p.HasError() { 7667 v := p.GetError() 7668 localctx.SetException(v) 7669 p.GetErrorHandler().ReportError(p, v) 7670 p.GetErrorHandler().Recover(p, v) 7671 p.SetError(nil) 7672 } 7673 p.ExitRule() 7674 return localctx 7675 goto errorExit // Trick to prevent compiler error if the label is not used 7676 } 7677 7678 // IPortsDefContext is an interface to support dynamic dispatch. 7679 type IPortsDefContext interface { 7680 antlr.ParserRuleContext 7681 7682 // GetParser returns the parser. 7683 GetParser() antlr.Parser 7684 7685 // Getter signatures 7686 AllPortDef() []IPortDefContext 7687 PortDef(i int) IPortDefContext 7688 AllNEWLINE() []antlr.TerminalNode 7689 NEWLINE(i int) antlr.TerminalNode 7690 7691 // IsPortsDefContext differentiates from other interfaces. 7692 IsPortsDefContext() 7693 } 7694 7695 type PortsDefContext struct { 7696 antlr.BaseParserRuleContext 7697 parser antlr.Parser 7698 } 7699 7700 func NewEmptyPortsDefContext() *PortsDefContext { 7701 var p = new(PortsDefContext) 7702 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 7703 p.RuleIndex = nevaParserRULE_portsDef 7704 return p 7705 } 7706 7707 func InitEmptyPortsDefContext(p *PortsDefContext) { 7708 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 7709 p.RuleIndex = nevaParserRULE_portsDef 7710 } 7711 7712 func (*PortsDefContext) IsPortsDefContext() {} 7713 7714 func NewPortsDefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PortsDefContext { 7715 var p = new(PortsDefContext) 7716 7717 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 7718 7719 p.parser = parser 7720 p.RuleIndex = nevaParserRULE_portsDef 7721 7722 return p 7723 } 7724 7725 func (s *PortsDefContext) GetParser() antlr.Parser { return s.parser } 7726 7727 func (s *PortsDefContext) AllPortDef() []IPortDefContext { 7728 children := s.GetChildren() 7729 len := 0 7730 for _, ctx := range children { 7731 if _, ok := ctx.(IPortDefContext); ok { 7732 len++ 7733 } 7734 } 7735 7736 tst := make([]IPortDefContext, len) 7737 i := 0 7738 for _, ctx := range children { 7739 if t, ok := ctx.(IPortDefContext); ok { 7740 tst[i] = t.(IPortDefContext) 7741 i++ 7742 } 7743 } 7744 7745 return tst 7746 } 7747 7748 func (s *PortsDefContext) PortDef(i int) IPortDefContext { 7749 var t antlr.RuleContext 7750 j := 0 7751 for _, ctx := range s.GetChildren() { 7752 if _, ok := ctx.(IPortDefContext); ok { 7753 if j == i { 7754 t = ctx.(antlr.RuleContext) 7755 break 7756 } 7757 j++ 7758 } 7759 } 7760 7761 if t == nil { 7762 return nil 7763 } 7764 7765 return t.(IPortDefContext) 7766 } 7767 7768 func (s *PortsDefContext) AllNEWLINE() []antlr.TerminalNode { 7769 return s.GetTokens(nevaParserNEWLINE) 7770 } 7771 7772 func (s *PortsDefContext) NEWLINE(i int) antlr.TerminalNode { 7773 return s.GetToken(nevaParserNEWLINE, i) 7774 } 7775 7776 func (s *PortsDefContext) GetRuleContext() antlr.RuleContext { 7777 return s 7778 } 7779 7780 func (s *PortsDefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 7781 return antlr.TreesStringTree(s, ruleNames, recog) 7782 } 7783 7784 func (s *PortsDefContext) EnterRule(listener antlr.ParseTreeListener) { 7785 if listenerT, ok := listener.(nevaListener); ok { 7786 listenerT.EnterPortsDef(s) 7787 } 7788 } 7789 7790 func (s *PortsDefContext) ExitRule(listener antlr.ParseTreeListener) { 7791 if listenerT, ok := listener.(nevaListener); ok { 7792 listenerT.ExitPortsDef(s) 7793 } 7794 } 7795 7796 func (p *nevaParser) PortsDef() (localctx IPortsDefContext) { 7797 localctx = NewPortsDefContext(p, p.GetParserRuleContext(), p.GetState()) 7798 p.EnterRule(localctx, 84, nevaParserRULE_portsDef) 7799 var _la int 7800 7801 p.EnterOuterAlt(localctx, 1) 7802 { 7803 p.SetState(596) 7804 p.Match(nevaParserT__1) 7805 if p.HasError() { 7806 // Recognition error - abort rule 7807 goto errorExit 7808 } 7809 } 7810 p.SetState(614) 7811 p.GetErrorHandler().Sync(p) 7812 if p.HasError() { 7813 goto errorExit 7814 } 7815 7816 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 67, p.GetParserRuleContext()) { 7817 case 1: 7818 p.SetState(600) 7819 p.GetErrorHandler().Sync(p) 7820 if p.HasError() { 7821 goto errorExit 7822 } 7823 _la = p.GetTokenStream().LA(1) 7824 7825 for _la == nevaParserNEWLINE { 7826 { 7827 p.SetState(597) 7828 p.Match(nevaParserNEWLINE) 7829 if p.HasError() { 7830 // Recognition error - abort rule 7831 goto errorExit 7832 } 7833 } 7834 7835 p.SetState(602) 7836 p.GetErrorHandler().Sync(p) 7837 if p.HasError() { 7838 goto errorExit 7839 } 7840 _la = p.GetTokenStream().LA(1) 7841 } 7842 7843 case 2: 7844 p.SetState(604) 7845 p.GetErrorHandler().Sync(p) 7846 if p.HasError() { 7847 goto errorExit 7848 } 7849 _la = p.GetTokenStream().LA(1) 7850 7851 if (int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&2267743256576) != 0 { 7852 { 7853 p.SetState(603) 7854 p.PortDef() 7855 } 7856 7857 } 7858 7859 case 3: 7860 { 7861 p.SetState(606) 7862 p.PortDef() 7863 } 7864 p.SetState(611) 7865 p.GetErrorHandler().Sync(p) 7866 if p.HasError() { 7867 goto errorExit 7868 } 7869 _la = p.GetTokenStream().LA(1) 7870 7871 for _la == nevaParserT__2 { 7872 { 7873 p.SetState(607) 7874 p.Match(nevaParserT__2) 7875 if p.HasError() { 7876 // Recognition error - abort rule 7877 goto errorExit 7878 } 7879 } 7880 { 7881 p.SetState(608) 7882 p.PortDef() 7883 } 7884 7885 p.SetState(613) 7886 p.GetErrorHandler().Sync(p) 7887 if p.HasError() { 7888 goto errorExit 7889 } 7890 _la = p.GetTokenStream().LA(1) 7891 } 7892 7893 case antlr.ATNInvalidAltNumber: 7894 goto errorExit 7895 } 7896 { 7897 p.SetState(616) 7898 p.Match(nevaParserT__3) 7899 if p.HasError() { 7900 // Recognition error - abort rule 7901 goto errorExit 7902 } 7903 } 7904 7905 errorExit: 7906 if p.HasError() { 7907 v := p.GetError() 7908 localctx.SetException(v) 7909 p.GetErrorHandler().ReportError(p, v) 7910 p.GetErrorHandler().Recover(p, v) 7911 p.SetError(nil) 7912 } 7913 p.ExitRule() 7914 return localctx 7915 goto errorExit // Trick to prevent compiler error if the label is not used 7916 } 7917 7918 // IPortDefContext is an interface to support dynamic dispatch. 7919 type IPortDefContext interface { 7920 antlr.ParserRuleContext 7921 7922 // GetParser returns the parser. 7923 GetParser() antlr.Parser 7924 7925 // Getter signatures 7926 SinglePortDef() ISinglePortDefContext 7927 ArrayPortDef() IArrayPortDefContext 7928 7929 // IsPortDefContext differentiates from other interfaces. 7930 IsPortDefContext() 7931 } 7932 7933 type PortDefContext struct { 7934 antlr.BaseParserRuleContext 7935 parser antlr.Parser 7936 } 7937 7938 func NewEmptyPortDefContext() *PortDefContext { 7939 var p = new(PortDefContext) 7940 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 7941 p.RuleIndex = nevaParserRULE_portDef 7942 return p 7943 } 7944 7945 func InitEmptyPortDefContext(p *PortDefContext) { 7946 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 7947 p.RuleIndex = nevaParserRULE_portDef 7948 } 7949 7950 func (*PortDefContext) IsPortDefContext() {} 7951 7952 func NewPortDefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PortDefContext { 7953 var p = new(PortDefContext) 7954 7955 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 7956 7957 p.parser = parser 7958 p.RuleIndex = nevaParserRULE_portDef 7959 7960 return p 7961 } 7962 7963 func (s *PortDefContext) GetParser() antlr.Parser { return s.parser } 7964 7965 func (s *PortDefContext) SinglePortDef() ISinglePortDefContext { 7966 var t antlr.RuleContext 7967 for _, ctx := range s.GetChildren() { 7968 if _, ok := ctx.(ISinglePortDefContext); ok { 7969 t = ctx.(antlr.RuleContext) 7970 break 7971 } 7972 } 7973 7974 if t == nil { 7975 return nil 7976 } 7977 7978 return t.(ISinglePortDefContext) 7979 } 7980 7981 func (s *PortDefContext) ArrayPortDef() IArrayPortDefContext { 7982 var t antlr.RuleContext 7983 for _, ctx := range s.GetChildren() { 7984 if _, ok := ctx.(IArrayPortDefContext); ok { 7985 t = ctx.(antlr.RuleContext) 7986 break 7987 } 7988 } 7989 7990 if t == nil { 7991 return nil 7992 } 7993 7994 return t.(IArrayPortDefContext) 7995 } 7996 7997 func (s *PortDefContext) GetRuleContext() antlr.RuleContext { 7998 return s 7999 } 8000 8001 func (s *PortDefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 8002 return antlr.TreesStringTree(s, ruleNames, recog) 8003 } 8004 8005 func (s *PortDefContext) EnterRule(listener antlr.ParseTreeListener) { 8006 if listenerT, ok := listener.(nevaListener); ok { 8007 listenerT.EnterPortDef(s) 8008 } 8009 } 8010 8011 func (s *PortDefContext) ExitRule(listener antlr.ParseTreeListener) { 8012 if listenerT, ok := listener.(nevaListener); ok { 8013 listenerT.ExitPortDef(s) 8014 } 8015 } 8016 8017 func (p *nevaParser) PortDef() (localctx IPortDefContext) { 8018 localctx = NewPortDefContext(p, p.GetParserRuleContext(), p.GetState()) 8019 p.EnterRule(localctx, 86, nevaParserRULE_portDef) 8020 p.SetState(620) 8021 p.GetErrorHandler().Sync(p) 8022 if p.HasError() { 8023 goto errorExit 8024 } 8025 8026 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 68, p.GetParserRuleContext()) { 8027 case 1: 8028 p.EnterOuterAlt(localctx, 1) 8029 { 8030 p.SetState(618) 8031 p.SinglePortDef() 8032 } 8033 8034 case 2: 8035 p.EnterOuterAlt(localctx, 2) 8036 { 8037 p.SetState(619) 8038 p.ArrayPortDef() 8039 } 8040 8041 case antlr.ATNInvalidAltNumber: 8042 goto errorExit 8043 } 8044 8045 errorExit: 8046 if p.HasError() { 8047 v := p.GetError() 8048 localctx.SetException(v) 8049 p.GetErrorHandler().ReportError(p, v) 8050 p.GetErrorHandler().Recover(p, v) 8051 p.SetError(nil) 8052 } 8053 p.ExitRule() 8054 return localctx 8055 goto errorExit // Trick to prevent compiler error if the label is not used 8056 } 8057 8058 // ISinglePortDefContext is an interface to support dynamic dispatch. 8059 type ISinglePortDefContext interface { 8060 antlr.ParserRuleContext 8061 8062 // GetParser returns the parser. 8063 GetParser() antlr.Parser 8064 8065 // Getter signatures 8066 IDENTIFIER() antlr.TerminalNode 8067 AllNEWLINE() []antlr.TerminalNode 8068 NEWLINE(i int) antlr.TerminalNode 8069 TypeExpr() ITypeExprContext 8070 8071 // IsSinglePortDefContext differentiates from other interfaces. 8072 IsSinglePortDefContext() 8073 } 8074 8075 type SinglePortDefContext struct { 8076 antlr.BaseParserRuleContext 8077 parser antlr.Parser 8078 } 8079 8080 func NewEmptySinglePortDefContext() *SinglePortDefContext { 8081 var p = new(SinglePortDefContext) 8082 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 8083 p.RuleIndex = nevaParserRULE_singlePortDef 8084 return p 8085 } 8086 8087 func InitEmptySinglePortDefContext(p *SinglePortDefContext) { 8088 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 8089 p.RuleIndex = nevaParserRULE_singlePortDef 8090 } 8091 8092 func (*SinglePortDefContext) IsSinglePortDefContext() {} 8093 8094 func NewSinglePortDefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SinglePortDefContext { 8095 var p = new(SinglePortDefContext) 8096 8097 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 8098 8099 p.parser = parser 8100 p.RuleIndex = nevaParserRULE_singlePortDef 8101 8102 return p 8103 } 8104 8105 func (s *SinglePortDefContext) GetParser() antlr.Parser { return s.parser } 8106 8107 func (s *SinglePortDefContext) IDENTIFIER() antlr.TerminalNode { 8108 return s.GetToken(nevaParserIDENTIFIER, 0) 8109 } 8110 8111 func (s *SinglePortDefContext) AllNEWLINE() []antlr.TerminalNode { 8112 return s.GetTokens(nevaParserNEWLINE) 8113 } 8114 8115 func (s *SinglePortDefContext) NEWLINE(i int) antlr.TerminalNode { 8116 return s.GetToken(nevaParserNEWLINE, i) 8117 } 8118 8119 func (s *SinglePortDefContext) TypeExpr() ITypeExprContext { 8120 var t antlr.RuleContext 8121 for _, ctx := range s.GetChildren() { 8122 if _, ok := ctx.(ITypeExprContext); ok { 8123 t = ctx.(antlr.RuleContext) 8124 break 8125 } 8126 } 8127 8128 if t == nil { 8129 return nil 8130 } 8131 8132 return t.(ITypeExprContext) 8133 } 8134 8135 func (s *SinglePortDefContext) GetRuleContext() antlr.RuleContext { 8136 return s 8137 } 8138 8139 func (s *SinglePortDefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 8140 return antlr.TreesStringTree(s, ruleNames, recog) 8141 } 8142 8143 func (s *SinglePortDefContext) EnterRule(listener antlr.ParseTreeListener) { 8144 if listenerT, ok := listener.(nevaListener); ok { 8145 listenerT.EnterSinglePortDef(s) 8146 } 8147 } 8148 8149 func (s *SinglePortDefContext) ExitRule(listener antlr.ParseTreeListener) { 8150 if listenerT, ok := listener.(nevaListener); ok { 8151 listenerT.ExitSinglePortDef(s) 8152 } 8153 } 8154 8155 func (p *nevaParser) SinglePortDef() (localctx ISinglePortDefContext) { 8156 localctx = NewSinglePortDefContext(p, p.GetParserRuleContext(), p.GetState()) 8157 p.EnterRule(localctx, 88, nevaParserRULE_singlePortDef) 8158 var _la int 8159 8160 p.EnterOuterAlt(localctx, 1) 8161 p.SetState(625) 8162 p.GetErrorHandler().Sync(p) 8163 if p.HasError() { 8164 goto errorExit 8165 } 8166 _la = p.GetTokenStream().LA(1) 8167 8168 for _la == nevaParserNEWLINE { 8169 { 8170 p.SetState(622) 8171 p.Match(nevaParserNEWLINE) 8172 if p.HasError() { 8173 // Recognition error - abort rule 8174 goto errorExit 8175 } 8176 } 8177 8178 p.SetState(627) 8179 p.GetErrorHandler().Sync(p) 8180 if p.HasError() { 8181 goto errorExit 8182 } 8183 _la = p.GetTokenStream().LA(1) 8184 } 8185 { 8186 p.SetState(628) 8187 p.Match(nevaParserIDENTIFIER) 8188 if p.HasError() { 8189 // Recognition error - abort rule 8190 goto errorExit 8191 } 8192 } 8193 p.SetState(630) 8194 p.GetErrorHandler().Sync(p) 8195 if p.HasError() { 8196 goto errorExit 8197 } 8198 _la = p.GetTokenStream().LA(1) 8199 8200 if (int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&68719575040) != 0 { 8201 { 8202 p.SetState(629) 8203 p.TypeExpr() 8204 } 8205 8206 } 8207 p.SetState(635) 8208 p.GetErrorHandler().Sync(p) 8209 if p.HasError() { 8210 goto errorExit 8211 } 8212 _la = p.GetTokenStream().LA(1) 8213 8214 for _la == nevaParserNEWLINE { 8215 { 8216 p.SetState(632) 8217 p.Match(nevaParserNEWLINE) 8218 if p.HasError() { 8219 // Recognition error - abort rule 8220 goto errorExit 8221 } 8222 } 8223 8224 p.SetState(637) 8225 p.GetErrorHandler().Sync(p) 8226 if p.HasError() { 8227 goto errorExit 8228 } 8229 _la = p.GetTokenStream().LA(1) 8230 } 8231 8232 errorExit: 8233 if p.HasError() { 8234 v := p.GetError() 8235 localctx.SetException(v) 8236 p.GetErrorHandler().ReportError(p, v) 8237 p.GetErrorHandler().Recover(p, v) 8238 p.SetError(nil) 8239 } 8240 p.ExitRule() 8241 return localctx 8242 goto errorExit // Trick to prevent compiler error if the label is not used 8243 } 8244 8245 // IArrayPortDefContext is an interface to support dynamic dispatch. 8246 type IArrayPortDefContext interface { 8247 antlr.ParserRuleContext 8248 8249 // GetParser returns the parser. 8250 GetParser() antlr.Parser 8251 8252 // Getter signatures 8253 IDENTIFIER() antlr.TerminalNode 8254 AllNEWLINE() []antlr.TerminalNode 8255 NEWLINE(i int) antlr.TerminalNode 8256 TypeExpr() ITypeExprContext 8257 8258 // IsArrayPortDefContext differentiates from other interfaces. 8259 IsArrayPortDefContext() 8260 } 8261 8262 type ArrayPortDefContext struct { 8263 antlr.BaseParserRuleContext 8264 parser antlr.Parser 8265 } 8266 8267 func NewEmptyArrayPortDefContext() *ArrayPortDefContext { 8268 var p = new(ArrayPortDefContext) 8269 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 8270 p.RuleIndex = nevaParserRULE_arrayPortDef 8271 return p 8272 } 8273 8274 func InitEmptyArrayPortDefContext(p *ArrayPortDefContext) { 8275 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 8276 p.RuleIndex = nevaParserRULE_arrayPortDef 8277 } 8278 8279 func (*ArrayPortDefContext) IsArrayPortDefContext() {} 8280 8281 func NewArrayPortDefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ArrayPortDefContext { 8282 var p = new(ArrayPortDefContext) 8283 8284 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 8285 8286 p.parser = parser 8287 p.RuleIndex = nevaParserRULE_arrayPortDef 8288 8289 return p 8290 } 8291 8292 func (s *ArrayPortDefContext) GetParser() antlr.Parser { return s.parser } 8293 8294 func (s *ArrayPortDefContext) IDENTIFIER() antlr.TerminalNode { 8295 return s.GetToken(nevaParserIDENTIFIER, 0) 8296 } 8297 8298 func (s *ArrayPortDefContext) AllNEWLINE() []antlr.TerminalNode { 8299 return s.GetTokens(nevaParserNEWLINE) 8300 } 8301 8302 func (s *ArrayPortDefContext) NEWLINE(i int) antlr.TerminalNode { 8303 return s.GetToken(nevaParserNEWLINE, i) 8304 } 8305 8306 func (s *ArrayPortDefContext) TypeExpr() ITypeExprContext { 8307 var t antlr.RuleContext 8308 for _, ctx := range s.GetChildren() { 8309 if _, ok := ctx.(ITypeExprContext); ok { 8310 t = ctx.(antlr.RuleContext) 8311 break 8312 } 8313 } 8314 8315 if t == nil { 8316 return nil 8317 } 8318 8319 return t.(ITypeExprContext) 8320 } 8321 8322 func (s *ArrayPortDefContext) GetRuleContext() antlr.RuleContext { 8323 return s 8324 } 8325 8326 func (s *ArrayPortDefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 8327 return antlr.TreesStringTree(s, ruleNames, recog) 8328 } 8329 8330 func (s *ArrayPortDefContext) EnterRule(listener antlr.ParseTreeListener) { 8331 if listenerT, ok := listener.(nevaListener); ok { 8332 listenerT.EnterArrayPortDef(s) 8333 } 8334 } 8335 8336 func (s *ArrayPortDefContext) ExitRule(listener antlr.ParseTreeListener) { 8337 if listenerT, ok := listener.(nevaListener); ok { 8338 listenerT.ExitArrayPortDef(s) 8339 } 8340 } 8341 8342 func (p *nevaParser) ArrayPortDef() (localctx IArrayPortDefContext) { 8343 localctx = NewArrayPortDefContext(p, p.GetParserRuleContext(), p.GetState()) 8344 p.EnterRule(localctx, 90, nevaParserRULE_arrayPortDef) 8345 var _la int 8346 8347 p.EnterOuterAlt(localctx, 1) 8348 p.SetState(641) 8349 p.GetErrorHandler().Sync(p) 8350 if p.HasError() { 8351 goto errorExit 8352 } 8353 _la = p.GetTokenStream().LA(1) 8354 8355 for _la == nevaParserNEWLINE { 8356 { 8357 p.SetState(638) 8358 p.Match(nevaParserNEWLINE) 8359 if p.HasError() { 8360 // Recognition error - abort rule 8361 goto errorExit 8362 } 8363 } 8364 8365 p.SetState(643) 8366 p.GetErrorHandler().Sync(p) 8367 if p.HasError() { 8368 goto errorExit 8369 } 8370 _la = p.GetTokenStream().LA(1) 8371 } 8372 { 8373 p.SetState(644) 8374 p.Match(nevaParserT__18) 8375 if p.HasError() { 8376 // Recognition error - abort rule 8377 goto errorExit 8378 } 8379 } 8380 { 8381 p.SetState(645) 8382 p.Match(nevaParserIDENTIFIER) 8383 if p.HasError() { 8384 // Recognition error - abort rule 8385 goto errorExit 8386 } 8387 } 8388 { 8389 p.SetState(646) 8390 p.Match(nevaParserT__19) 8391 if p.HasError() { 8392 // Recognition error - abort rule 8393 goto errorExit 8394 } 8395 } 8396 p.SetState(648) 8397 p.GetErrorHandler().Sync(p) 8398 if p.HasError() { 8399 goto errorExit 8400 } 8401 _la = p.GetTokenStream().LA(1) 8402 8403 if (int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&68719575040) != 0 { 8404 { 8405 p.SetState(647) 8406 p.TypeExpr() 8407 } 8408 8409 } 8410 p.SetState(653) 8411 p.GetErrorHandler().Sync(p) 8412 if p.HasError() { 8413 goto errorExit 8414 } 8415 _la = p.GetTokenStream().LA(1) 8416 8417 for _la == nevaParserNEWLINE { 8418 { 8419 p.SetState(650) 8420 p.Match(nevaParserNEWLINE) 8421 if p.HasError() { 8422 // Recognition error - abort rule 8423 goto errorExit 8424 } 8425 } 8426 8427 p.SetState(655) 8428 p.GetErrorHandler().Sync(p) 8429 if p.HasError() { 8430 goto errorExit 8431 } 8432 _la = p.GetTokenStream().LA(1) 8433 } 8434 8435 errorExit: 8436 if p.HasError() { 8437 v := p.GetError() 8438 localctx.SetException(v) 8439 p.GetErrorHandler().ReportError(p, v) 8440 p.GetErrorHandler().Recover(p, v) 8441 p.SetError(nil) 8442 } 8443 p.ExitRule() 8444 return localctx 8445 goto errorExit // Trick to prevent compiler error if the label is not used 8446 } 8447 8448 // IConstStmtContext is an interface to support dynamic dispatch. 8449 type IConstStmtContext interface { 8450 antlr.ParserRuleContext 8451 8452 // GetParser returns the parser. 8453 GetParser() antlr.Parser 8454 8455 // Getter signatures 8456 SingleConstStmt() ISingleConstStmtContext 8457 GroupConstStmt() IGroupConstStmtContext 8458 8459 // IsConstStmtContext differentiates from other interfaces. 8460 IsConstStmtContext() 8461 } 8462 8463 type ConstStmtContext struct { 8464 antlr.BaseParserRuleContext 8465 parser antlr.Parser 8466 } 8467 8468 func NewEmptyConstStmtContext() *ConstStmtContext { 8469 var p = new(ConstStmtContext) 8470 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 8471 p.RuleIndex = nevaParserRULE_constStmt 8472 return p 8473 } 8474 8475 func InitEmptyConstStmtContext(p *ConstStmtContext) { 8476 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 8477 p.RuleIndex = nevaParserRULE_constStmt 8478 } 8479 8480 func (*ConstStmtContext) IsConstStmtContext() {} 8481 8482 func NewConstStmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ConstStmtContext { 8483 var p = new(ConstStmtContext) 8484 8485 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 8486 8487 p.parser = parser 8488 p.RuleIndex = nevaParserRULE_constStmt 8489 8490 return p 8491 } 8492 8493 func (s *ConstStmtContext) GetParser() antlr.Parser { return s.parser } 8494 8495 func (s *ConstStmtContext) SingleConstStmt() ISingleConstStmtContext { 8496 var t antlr.RuleContext 8497 for _, ctx := range s.GetChildren() { 8498 if _, ok := ctx.(ISingleConstStmtContext); ok { 8499 t = ctx.(antlr.RuleContext) 8500 break 8501 } 8502 } 8503 8504 if t == nil { 8505 return nil 8506 } 8507 8508 return t.(ISingleConstStmtContext) 8509 } 8510 8511 func (s *ConstStmtContext) GroupConstStmt() IGroupConstStmtContext { 8512 var t antlr.RuleContext 8513 for _, ctx := range s.GetChildren() { 8514 if _, ok := ctx.(IGroupConstStmtContext); ok { 8515 t = ctx.(antlr.RuleContext) 8516 break 8517 } 8518 } 8519 8520 if t == nil { 8521 return nil 8522 } 8523 8524 return t.(IGroupConstStmtContext) 8525 } 8526 8527 func (s *ConstStmtContext) GetRuleContext() antlr.RuleContext { 8528 return s 8529 } 8530 8531 func (s *ConstStmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 8532 return antlr.TreesStringTree(s, ruleNames, recog) 8533 } 8534 8535 func (s *ConstStmtContext) EnterRule(listener antlr.ParseTreeListener) { 8536 if listenerT, ok := listener.(nevaListener); ok { 8537 listenerT.EnterConstStmt(s) 8538 } 8539 } 8540 8541 func (s *ConstStmtContext) ExitRule(listener antlr.ParseTreeListener) { 8542 if listenerT, ok := listener.(nevaListener); ok { 8543 listenerT.ExitConstStmt(s) 8544 } 8545 } 8546 8547 func (p *nevaParser) ConstStmt() (localctx IConstStmtContext) { 8548 localctx = NewConstStmtContext(p, p.GetParserRuleContext(), p.GetState()) 8549 p.EnterRule(localctx, 92, nevaParserRULE_constStmt) 8550 p.SetState(658) 8551 p.GetErrorHandler().Sync(p) 8552 if p.HasError() { 8553 goto errorExit 8554 } 8555 8556 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 75, p.GetParserRuleContext()) { 8557 case 1: 8558 p.EnterOuterAlt(localctx, 1) 8559 { 8560 p.SetState(656) 8561 p.SingleConstStmt() 8562 } 8563 8564 case 2: 8565 p.EnterOuterAlt(localctx, 2) 8566 { 8567 p.SetState(657) 8568 p.GroupConstStmt() 8569 } 8570 8571 case antlr.ATNInvalidAltNumber: 8572 goto errorExit 8573 } 8574 8575 errorExit: 8576 if p.HasError() { 8577 v := p.GetError() 8578 localctx.SetException(v) 8579 p.GetErrorHandler().ReportError(p, v) 8580 p.GetErrorHandler().Recover(p, v) 8581 p.SetError(nil) 8582 } 8583 p.ExitRule() 8584 return localctx 8585 goto errorExit // Trick to prevent compiler error if the label is not used 8586 } 8587 8588 // ISingleConstStmtContext is an interface to support dynamic dispatch. 8589 type ISingleConstStmtContext interface { 8590 antlr.ParserRuleContext 8591 8592 // GetParser returns the parser. 8593 GetParser() antlr.Parser 8594 8595 // Getter signatures 8596 ConstDef() IConstDefContext 8597 PUB_KW() antlr.TerminalNode 8598 8599 // IsSingleConstStmtContext differentiates from other interfaces. 8600 IsSingleConstStmtContext() 8601 } 8602 8603 type SingleConstStmtContext struct { 8604 antlr.BaseParserRuleContext 8605 parser antlr.Parser 8606 } 8607 8608 func NewEmptySingleConstStmtContext() *SingleConstStmtContext { 8609 var p = new(SingleConstStmtContext) 8610 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 8611 p.RuleIndex = nevaParserRULE_singleConstStmt 8612 return p 8613 } 8614 8615 func InitEmptySingleConstStmtContext(p *SingleConstStmtContext) { 8616 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 8617 p.RuleIndex = nevaParserRULE_singleConstStmt 8618 } 8619 8620 func (*SingleConstStmtContext) IsSingleConstStmtContext() {} 8621 8622 func NewSingleConstStmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SingleConstStmtContext { 8623 var p = new(SingleConstStmtContext) 8624 8625 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 8626 8627 p.parser = parser 8628 p.RuleIndex = nevaParserRULE_singleConstStmt 8629 8630 return p 8631 } 8632 8633 func (s *SingleConstStmtContext) GetParser() antlr.Parser { return s.parser } 8634 8635 func (s *SingleConstStmtContext) ConstDef() IConstDefContext { 8636 var t antlr.RuleContext 8637 for _, ctx := range s.GetChildren() { 8638 if _, ok := ctx.(IConstDefContext); ok { 8639 t = ctx.(antlr.RuleContext) 8640 break 8641 } 8642 } 8643 8644 if t == nil { 8645 return nil 8646 } 8647 8648 return t.(IConstDefContext) 8649 } 8650 8651 func (s *SingleConstStmtContext) PUB_KW() antlr.TerminalNode { 8652 return s.GetToken(nevaParserPUB_KW, 0) 8653 } 8654 8655 func (s *SingleConstStmtContext) GetRuleContext() antlr.RuleContext { 8656 return s 8657 } 8658 8659 func (s *SingleConstStmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 8660 return antlr.TreesStringTree(s, ruleNames, recog) 8661 } 8662 8663 func (s *SingleConstStmtContext) EnterRule(listener antlr.ParseTreeListener) { 8664 if listenerT, ok := listener.(nevaListener); ok { 8665 listenerT.EnterSingleConstStmt(s) 8666 } 8667 } 8668 8669 func (s *SingleConstStmtContext) ExitRule(listener antlr.ParseTreeListener) { 8670 if listenerT, ok := listener.(nevaListener); ok { 8671 listenerT.ExitSingleConstStmt(s) 8672 } 8673 } 8674 8675 func (p *nevaParser) SingleConstStmt() (localctx ISingleConstStmtContext) { 8676 localctx = NewSingleConstStmtContext(p, p.GetParserRuleContext(), p.GetState()) 8677 p.EnterRule(localctx, 94, nevaParserRULE_singleConstStmt) 8678 var _la int 8679 8680 p.EnterOuterAlt(localctx, 1) 8681 p.SetState(661) 8682 p.GetErrorHandler().Sync(p) 8683 if p.HasError() { 8684 goto errorExit 8685 } 8686 _la = p.GetTokenStream().LA(1) 8687 8688 if _la == nevaParserPUB_KW { 8689 { 8690 p.SetState(660) 8691 p.Match(nevaParserPUB_KW) 8692 if p.HasError() { 8693 // Recognition error - abort rule 8694 goto errorExit 8695 } 8696 } 8697 8698 } 8699 { 8700 p.SetState(663) 8701 p.Match(nevaParserT__20) 8702 if p.HasError() { 8703 // Recognition error - abort rule 8704 goto errorExit 8705 } 8706 } 8707 { 8708 p.SetState(664) 8709 p.ConstDef() 8710 } 8711 8712 errorExit: 8713 if p.HasError() { 8714 v := p.GetError() 8715 localctx.SetException(v) 8716 p.GetErrorHandler().ReportError(p, v) 8717 p.GetErrorHandler().Recover(p, v) 8718 p.SetError(nil) 8719 } 8720 p.ExitRule() 8721 return localctx 8722 goto errorExit // Trick to prevent compiler error if the label is not used 8723 } 8724 8725 // IGroupConstStmtContext is an interface to support dynamic dispatch. 8726 type IGroupConstStmtContext interface { 8727 antlr.ParserRuleContext 8728 8729 // GetParser returns the parser. 8730 GetParser() antlr.Parser 8731 8732 // Getter signatures 8733 AllNEWLINE() []antlr.TerminalNode 8734 NEWLINE(i int) antlr.TerminalNode 8735 AllConstDef() []IConstDefContext 8736 ConstDef(i int) IConstDefContext 8737 AllPUB_KW() []antlr.TerminalNode 8738 PUB_KW(i int) antlr.TerminalNode 8739 8740 // IsGroupConstStmtContext differentiates from other interfaces. 8741 IsGroupConstStmtContext() 8742 } 8743 8744 type GroupConstStmtContext struct { 8745 antlr.BaseParserRuleContext 8746 parser antlr.Parser 8747 } 8748 8749 func NewEmptyGroupConstStmtContext() *GroupConstStmtContext { 8750 var p = new(GroupConstStmtContext) 8751 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 8752 p.RuleIndex = nevaParserRULE_groupConstStmt 8753 return p 8754 } 8755 8756 func InitEmptyGroupConstStmtContext(p *GroupConstStmtContext) { 8757 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 8758 p.RuleIndex = nevaParserRULE_groupConstStmt 8759 } 8760 8761 func (*GroupConstStmtContext) IsGroupConstStmtContext() {} 8762 8763 func NewGroupConstStmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *GroupConstStmtContext { 8764 var p = new(GroupConstStmtContext) 8765 8766 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 8767 8768 p.parser = parser 8769 p.RuleIndex = nevaParserRULE_groupConstStmt 8770 8771 return p 8772 } 8773 8774 func (s *GroupConstStmtContext) GetParser() antlr.Parser { return s.parser } 8775 8776 func (s *GroupConstStmtContext) AllNEWLINE() []antlr.TerminalNode { 8777 return s.GetTokens(nevaParserNEWLINE) 8778 } 8779 8780 func (s *GroupConstStmtContext) NEWLINE(i int) antlr.TerminalNode { 8781 return s.GetToken(nevaParserNEWLINE, i) 8782 } 8783 8784 func (s *GroupConstStmtContext) AllConstDef() []IConstDefContext { 8785 children := s.GetChildren() 8786 len := 0 8787 for _, ctx := range children { 8788 if _, ok := ctx.(IConstDefContext); ok { 8789 len++ 8790 } 8791 } 8792 8793 tst := make([]IConstDefContext, len) 8794 i := 0 8795 for _, ctx := range children { 8796 if t, ok := ctx.(IConstDefContext); ok { 8797 tst[i] = t.(IConstDefContext) 8798 i++ 8799 } 8800 } 8801 8802 return tst 8803 } 8804 8805 func (s *GroupConstStmtContext) ConstDef(i int) IConstDefContext { 8806 var t antlr.RuleContext 8807 j := 0 8808 for _, ctx := range s.GetChildren() { 8809 if _, ok := ctx.(IConstDefContext); ok { 8810 if j == i { 8811 t = ctx.(antlr.RuleContext) 8812 break 8813 } 8814 j++ 8815 } 8816 } 8817 8818 if t == nil { 8819 return nil 8820 } 8821 8822 return t.(IConstDefContext) 8823 } 8824 8825 func (s *GroupConstStmtContext) AllPUB_KW() []antlr.TerminalNode { 8826 return s.GetTokens(nevaParserPUB_KW) 8827 } 8828 8829 func (s *GroupConstStmtContext) PUB_KW(i int) antlr.TerminalNode { 8830 return s.GetToken(nevaParserPUB_KW, i) 8831 } 8832 8833 func (s *GroupConstStmtContext) GetRuleContext() antlr.RuleContext { 8834 return s 8835 } 8836 8837 func (s *GroupConstStmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 8838 return antlr.TreesStringTree(s, ruleNames, recog) 8839 } 8840 8841 func (s *GroupConstStmtContext) EnterRule(listener antlr.ParseTreeListener) { 8842 if listenerT, ok := listener.(nevaListener); ok { 8843 listenerT.EnterGroupConstStmt(s) 8844 } 8845 } 8846 8847 func (s *GroupConstStmtContext) ExitRule(listener antlr.ParseTreeListener) { 8848 if listenerT, ok := listener.(nevaListener); ok { 8849 listenerT.ExitGroupConstStmt(s) 8850 } 8851 } 8852 8853 func (p *nevaParser) GroupConstStmt() (localctx IGroupConstStmtContext) { 8854 localctx = NewGroupConstStmtContext(p, p.GetParserRuleContext(), p.GetState()) 8855 p.EnterRule(localctx, 96, nevaParserRULE_groupConstStmt) 8856 var _la int 8857 8858 p.EnterOuterAlt(localctx, 1) 8859 { 8860 p.SetState(666) 8861 p.Match(nevaParserT__20) 8862 if p.HasError() { 8863 // Recognition error - abort rule 8864 goto errorExit 8865 } 8866 } 8867 p.SetState(670) 8868 p.GetErrorHandler().Sync(p) 8869 if p.HasError() { 8870 goto errorExit 8871 } 8872 _la = p.GetTokenStream().LA(1) 8873 8874 for _la == nevaParserNEWLINE { 8875 { 8876 p.SetState(667) 8877 p.Match(nevaParserNEWLINE) 8878 if p.HasError() { 8879 // Recognition error - abort rule 8880 goto errorExit 8881 } 8882 } 8883 8884 p.SetState(672) 8885 p.GetErrorHandler().Sync(p) 8886 if p.HasError() { 8887 goto errorExit 8888 } 8889 _la = p.GetTokenStream().LA(1) 8890 } 8891 { 8892 p.SetState(673) 8893 p.Match(nevaParserT__5) 8894 if p.HasError() { 8895 // Recognition error - abort rule 8896 goto errorExit 8897 } 8898 } 8899 p.SetState(677) 8900 p.GetErrorHandler().Sync(p) 8901 if p.HasError() { 8902 goto errorExit 8903 } 8904 _la = p.GetTokenStream().LA(1) 8905 8906 for _la == nevaParserNEWLINE { 8907 { 8908 p.SetState(674) 8909 p.Match(nevaParserNEWLINE) 8910 if p.HasError() { 8911 // Recognition error - abort rule 8912 goto errorExit 8913 } 8914 } 8915 8916 p.SetState(679) 8917 p.GetErrorHandler().Sync(p) 8918 if p.HasError() { 8919 goto errorExit 8920 } 8921 _la = p.GetTokenStream().LA(1) 8922 } 8923 p.SetState(686) 8924 p.GetErrorHandler().Sync(p) 8925 if p.HasError() { 8926 goto errorExit 8927 } 8928 _la = p.GetTokenStream().LA(1) 8929 8930 for _la == nevaParserPUB_KW || _la == nevaParserIDENTIFIER { 8931 p.SetState(681) 8932 p.GetErrorHandler().Sync(p) 8933 if p.HasError() { 8934 goto errorExit 8935 } 8936 _la = p.GetTokenStream().LA(1) 8937 8938 if _la == nevaParserPUB_KW { 8939 { 8940 p.SetState(680) 8941 p.Match(nevaParserPUB_KW) 8942 if p.HasError() { 8943 // Recognition error - abort rule 8944 goto errorExit 8945 } 8946 } 8947 8948 } 8949 { 8950 p.SetState(683) 8951 p.ConstDef() 8952 } 8953 8954 p.SetState(688) 8955 p.GetErrorHandler().Sync(p) 8956 if p.HasError() { 8957 goto errorExit 8958 } 8959 _la = p.GetTokenStream().LA(1) 8960 } 8961 { 8962 p.SetState(689) 8963 p.Match(nevaParserT__6) 8964 if p.HasError() { 8965 // Recognition error - abort rule 8966 goto errorExit 8967 } 8968 } 8969 8970 errorExit: 8971 if p.HasError() { 8972 v := p.GetError() 8973 localctx.SetException(v) 8974 p.GetErrorHandler().ReportError(p, v) 8975 p.GetErrorHandler().Recover(p, v) 8976 p.SetError(nil) 8977 } 8978 p.ExitRule() 8979 return localctx 8980 goto errorExit // Trick to prevent compiler error if the label is not used 8981 } 8982 8983 // IConstDefContext is an interface to support dynamic dispatch. 8984 type IConstDefContext interface { 8985 antlr.ParserRuleContext 8986 8987 // GetParser returns the parser. 8988 GetParser() antlr.Parser 8989 8990 // Getter signatures 8991 IDENTIFIER() antlr.TerminalNode 8992 TypeExpr() ITypeExprContext 8993 EntityRef() IEntityRefContext 8994 ConstLit() IConstLitContext 8995 AllNEWLINE() []antlr.TerminalNode 8996 NEWLINE(i int) antlr.TerminalNode 8997 8998 // IsConstDefContext differentiates from other interfaces. 8999 IsConstDefContext() 9000 } 9001 9002 type ConstDefContext struct { 9003 antlr.BaseParserRuleContext 9004 parser antlr.Parser 9005 } 9006 9007 func NewEmptyConstDefContext() *ConstDefContext { 9008 var p = new(ConstDefContext) 9009 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 9010 p.RuleIndex = nevaParserRULE_constDef 9011 return p 9012 } 9013 9014 func InitEmptyConstDefContext(p *ConstDefContext) { 9015 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 9016 p.RuleIndex = nevaParserRULE_constDef 9017 } 9018 9019 func (*ConstDefContext) IsConstDefContext() {} 9020 9021 func NewConstDefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ConstDefContext { 9022 var p = new(ConstDefContext) 9023 9024 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 9025 9026 p.parser = parser 9027 p.RuleIndex = nevaParserRULE_constDef 9028 9029 return p 9030 } 9031 9032 func (s *ConstDefContext) GetParser() antlr.Parser { return s.parser } 9033 9034 func (s *ConstDefContext) IDENTIFIER() antlr.TerminalNode { 9035 return s.GetToken(nevaParserIDENTIFIER, 0) 9036 } 9037 9038 func (s *ConstDefContext) TypeExpr() ITypeExprContext { 9039 var t antlr.RuleContext 9040 for _, ctx := range s.GetChildren() { 9041 if _, ok := ctx.(ITypeExprContext); ok { 9042 t = ctx.(antlr.RuleContext) 9043 break 9044 } 9045 } 9046 9047 if t == nil { 9048 return nil 9049 } 9050 9051 return t.(ITypeExprContext) 9052 } 9053 9054 func (s *ConstDefContext) EntityRef() IEntityRefContext { 9055 var t antlr.RuleContext 9056 for _, ctx := range s.GetChildren() { 9057 if _, ok := ctx.(IEntityRefContext); ok { 9058 t = ctx.(antlr.RuleContext) 9059 break 9060 } 9061 } 9062 9063 if t == nil { 9064 return nil 9065 } 9066 9067 return t.(IEntityRefContext) 9068 } 9069 9070 func (s *ConstDefContext) ConstLit() IConstLitContext { 9071 var t antlr.RuleContext 9072 for _, ctx := range s.GetChildren() { 9073 if _, ok := ctx.(IConstLitContext); ok { 9074 t = ctx.(antlr.RuleContext) 9075 break 9076 } 9077 } 9078 9079 if t == nil { 9080 return nil 9081 } 9082 9083 return t.(IConstLitContext) 9084 } 9085 9086 func (s *ConstDefContext) AllNEWLINE() []antlr.TerminalNode { 9087 return s.GetTokens(nevaParserNEWLINE) 9088 } 9089 9090 func (s *ConstDefContext) NEWLINE(i int) antlr.TerminalNode { 9091 return s.GetToken(nevaParserNEWLINE, i) 9092 } 9093 9094 func (s *ConstDefContext) GetRuleContext() antlr.RuleContext { 9095 return s 9096 } 9097 9098 func (s *ConstDefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 9099 return antlr.TreesStringTree(s, ruleNames, recog) 9100 } 9101 9102 func (s *ConstDefContext) EnterRule(listener antlr.ParseTreeListener) { 9103 if listenerT, ok := listener.(nevaListener); ok { 9104 listenerT.EnterConstDef(s) 9105 } 9106 } 9107 9108 func (s *ConstDefContext) ExitRule(listener antlr.ParseTreeListener) { 9109 if listenerT, ok := listener.(nevaListener); ok { 9110 listenerT.ExitConstDef(s) 9111 } 9112 } 9113 9114 func (p *nevaParser) ConstDef() (localctx IConstDefContext) { 9115 localctx = NewConstDefContext(p, p.GetParserRuleContext(), p.GetState()) 9116 p.EnterRule(localctx, 98, nevaParserRULE_constDef) 9117 var _alt int 9118 9119 p.EnterOuterAlt(localctx, 1) 9120 { 9121 p.SetState(691) 9122 p.Match(nevaParserIDENTIFIER) 9123 if p.HasError() { 9124 // Recognition error - abort rule 9125 goto errorExit 9126 } 9127 } 9128 { 9129 p.SetState(692) 9130 p.TypeExpr() 9131 } 9132 { 9133 p.SetState(693) 9134 p.Match(nevaParserT__21) 9135 if p.HasError() { 9136 // Recognition error - abort rule 9137 goto errorExit 9138 } 9139 } 9140 p.SetState(696) 9141 p.GetErrorHandler().Sync(p) 9142 if p.HasError() { 9143 goto errorExit 9144 } 9145 9146 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 81, p.GetParserRuleContext()) { 9147 case 1: 9148 { 9149 p.SetState(694) 9150 p.EntityRef() 9151 } 9152 9153 case 2: 9154 { 9155 p.SetState(695) 9156 p.ConstLit() 9157 } 9158 9159 case antlr.ATNInvalidAltNumber: 9160 goto errorExit 9161 } 9162 p.SetState(701) 9163 p.GetErrorHandler().Sync(p) 9164 if p.HasError() { 9165 goto errorExit 9166 } 9167 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 82, p.GetParserRuleContext()) 9168 if p.HasError() { 9169 goto errorExit 9170 } 9171 for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { 9172 if _alt == 1 { 9173 { 9174 p.SetState(698) 9175 p.Match(nevaParserNEWLINE) 9176 if p.HasError() { 9177 // Recognition error - abort rule 9178 goto errorExit 9179 } 9180 } 9181 9182 } 9183 p.SetState(703) 9184 p.GetErrorHandler().Sync(p) 9185 if p.HasError() { 9186 goto errorExit 9187 } 9188 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 82, p.GetParserRuleContext()) 9189 if p.HasError() { 9190 goto errorExit 9191 } 9192 } 9193 9194 errorExit: 9195 if p.HasError() { 9196 v := p.GetError() 9197 localctx.SetException(v) 9198 p.GetErrorHandler().ReportError(p, v) 9199 p.GetErrorHandler().Recover(p, v) 9200 p.SetError(nil) 9201 } 9202 p.ExitRule() 9203 return localctx 9204 goto errorExit // Trick to prevent compiler error if the label is not used 9205 } 9206 9207 // IConstLitContext is an interface to support dynamic dispatch. 9208 type IConstLitContext interface { 9209 antlr.ParserRuleContext 9210 9211 // GetParser returns the parser. 9212 GetParser() antlr.Parser 9213 9214 // Getter signatures 9215 Nil_() INilContext 9216 Bool_() IBoolContext 9217 INT() antlr.TerminalNode 9218 MINUS() antlr.TerminalNode 9219 FLOAT() antlr.TerminalNode 9220 STRING() antlr.TerminalNode 9221 EnumLit() IEnumLitContext 9222 ListLit() IListLitContext 9223 StructLit() IStructLitContext 9224 9225 // IsConstLitContext differentiates from other interfaces. 9226 IsConstLitContext() 9227 } 9228 9229 type ConstLitContext struct { 9230 antlr.BaseParserRuleContext 9231 parser antlr.Parser 9232 } 9233 9234 func NewEmptyConstLitContext() *ConstLitContext { 9235 var p = new(ConstLitContext) 9236 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 9237 p.RuleIndex = nevaParserRULE_constLit 9238 return p 9239 } 9240 9241 func InitEmptyConstLitContext(p *ConstLitContext) { 9242 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 9243 p.RuleIndex = nevaParserRULE_constLit 9244 } 9245 9246 func (*ConstLitContext) IsConstLitContext() {} 9247 9248 func NewConstLitContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ConstLitContext { 9249 var p = new(ConstLitContext) 9250 9251 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 9252 9253 p.parser = parser 9254 p.RuleIndex = nevaParserRULE_constLit 9255 9256 return p 9257 } 9258 9259 func (s *ConstLitContext) GetParser() antlr.Parser { return s.parser } 9260 9261 func (s *ConstLitContext) Nil_() INilContext { 9262 var t antlr.RuleContext 9263 for _, ctx := range s.GetChildren() { 9264 if _, ok := ctx.(INilContext); ok { 9265 t = ctx.(antlr.RuleContext) 9266 break 9267 } 9268 } 9269 9270 if t == nil { 9271 return nil 9272 } 9273 9274 return t.(INilContext) 9275 } 9276 9277 func (s *ConstLitContext) Bool_() IBoolContext { 9278 var t antlr.RuleContext 9279 for _, ctx := range s.GetChildren() { 9280 if _, ok := ctx.(IBoolContext); ok { 9281 t = ctx.(antlr.RuleContext) 9282 break 9283 } 9284 } 9285 9286 if t == nil { 9287 return nil 9288 } 9289 9290 return t.(IBoolContext) 9291 } 9292 9293 func (s *ConstLitContext) INT() antlr.TerminalNode { 9294 return s.GetToken(nevaParserINT, 0) 9295 } 9296 9297 func (s *ConstLitContext) MINUS() antlr.TerminalNode { 9298 return s.GetToken(nevaParserMINUS, 0) 9299 } 9300 9301 func (s *ConstLitContext) FLOAT() antlr.TerminalNode { 9302 return s.GetToken(nevaParserFLOAT, 0) 9303 } 9304 9305 func (s *ConstLitContext) STRING() antlr.TerminalNode { 9306 return s.GetToken(nevaParserSTRING, 0) 9307 } 9308 9309 func (s *ConstLitContext) EnumLit() IEnumLitContext { 9310 var t antlr.RuleContext 9311 for _, ctx := range s.GetChildren() { 9312 if _, ok := ctx.(IEnumLitContext); ok { 9313 t = ctx.(antlr.RuleContext) 9314 break 9315 } 9316 } 9317 9318 if t == nil { 9319 return nil 9320 } 9321 9322 return t.(IEnumLitContext) 9323 } 9324 9325 func (s *ConstLitContext) ListLit() IListLitContext { 9326 var t antlr.RuleContext 9327 for _, ctx := range s.GetChildren() { 9328 if _, ok := ctx.(IListLitContext); ok { 9329 t = ctx.(antlr.RuleContext) 9330 break 9331 } 9332 } 9333 9334 if t == nil { 9335 return nil 9336 } 9337 9338 return t.(IListLitContext) 9339 } 9340 9341 func (s *ConstLitContext) StructLit() IStructLitContext { 9342 var t antlr.RuleContext 9343 for _, ctx := range s.GetChildren() { 9344 if _, ok := ctx.(IStructLitContext); ok { 9345 t = ctx.(antlr.RuleContext) 9346 break 9347 } 9348 } 9349 9350 if t == nil { 9351 return nil 9352 } 9353 9354 return t.(IStructLitContext) 9355 } 9356 9357 func (s *ConstLitContext) GetRuleContext() antlr.RuleContext { 9358 return s 9359 } 9360 9361 func (s *ConstLitContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 9362 return antlr.TreesStringTree(s, ruleNames, recog) 9363 } 9364 9365 func (s *ConstLitContext) EnterRule(listener antlr.ParseTreeListener) { 9366 if listenerT, ok := listener.(nevaListener); ok { 9367 listenerT.EnterConstLit(s) 9368 } 9369 } 9370 9371 func (s *ConstLitContext) ExitRule(listener antlr.ParseTreeListener) { 9372 if listenerT, ok := listener.(nevaListener); ok { 9373 listenerT.ExitConstLit(s) 9374 } 9375 } 9376 9377 func (p *nevaParser) ConstLit() (localctx IConstLitContext) { 9378 localctx = NewConstLitContext(p, p.GetParserRuleContext(), p.GetState()) 9379 p.EnterRule(localctx, 100, nevaParserRULE_constLit) 9380 var _la int 9381 9382 p.SetState(718) 9383 p.GetErrorHandler().Sync(p) 9384 if p.HasError() { 9385 goto errorExit 9386 } 9387 9388 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 85, p.GetParserRuleContext()) { 9389 case 1: 9390 p.EnterOuterAlt(localctx, 1) 9391 { 9392 p.SetState(704) 9393 p.Nil_() 9394 } 9395 9396 case 2: 9397 p.EnterOuterAlt(localctx, 2) 9398 { 9399 p.SetState(705) 9400 p.Bool_() 9401 } 9402 9403 case 3: 9404 p.EnterOuterAlt(localctx, 3) 9405 p.SetState(707) 9406 p.GetErrorHandler().Sync(p) 9407 if p.HasError() { 9408 goto errorExit 9409 } 9410 _la = p.GetTokenStream().LA(1) 9411 9412 if _la == nevaParserMINUS { 9413 { 9414 p.SetState(706) 9415 p.Match(nevaParserMINUS) 9416 if p.HasError() { 9417 // Recognition error - abort rule 9418 goto errorExit 9419 } 9420 } 9421 9422 } 9423 { 9424 p.SetState(709) 9425 p.Match(nevaParserINT) 9426 if p.HasError() { 9427 // Recognition error - abort rule 9428 goto errorExit 9429 } 9430 } 9431 9432 case 4: 9433 p.EnterOuterAlt(localctx, 4) 9434 p.SetState(711) 9435 p.GetErrorHandler().Sync(p) 9436 if p.HasError() { 9437 goto errorExit 9438 } 9439 _la = p.GetTokenStream().LA(1) 9440 9441 if _la == nevaParserMINUS { 9442 { 9443 p.SetState(710) 9444 p.Match(nevaParserMINUS) 9445 if p.HasError() { 9446 // Recognition error - abort rule 9447 goto errorExit 9448 } 9449 } 9450 9451 } 9452 { 9453 p.SetState(713) 9454 p.Match(nevaParserFLOAT) 9455 if p.HasError() { 9456 // Recognition error - abort rule 9457 goto errorExit 9458 } 9459 } 9460 9461 case 5: 9462 p.EnterOuterAlt(localctx, 5) 9463 { 9464 p.SetState(714) 9465 p.Match(nevaParserSTRING) 9466 if p.HasError() { 9467 // Recognition error - abort rule 9468 goto errorExit 9469 } 9470 } 9471 9472 case 6: 9473 p.EnterOuterAlt(localctx, 6) 9474 { 9475 p.SetState(715) 9476 p.EnumLit() 9477 } 9478 9479 case 7: 9480 p.EnterOuterAlt(localctx, 7) 9481 { 9482 p.SetState(716) 9483 p.ListLit() 9484 } 9485 9486 case 8: 9487 p.EnterOuterAlt(localctx, 8) 9488 { 9489 p.SetState(717) 9490 p.StructLit() 9491 } 9492 9493 case antlr.ATNInvalidAltNumber: 9494 goto errorExit 9495 } 9496 9497 errorExit: 9498 if p.HasError() { 9499 v := p.GetError() 9500 localctx.SetException(v) 9501 p.GetErrorHandler().ReportError(p, v) 9502 p.GetErrorHandler().Recover(p, v) 9503 p.SetError(nil) 9504 } 9505 p.ExitRule() 9506 return localctx 9507 goto errorExit // Trick to prevent compiler error if the label is not used 9508 } 9509 9510 // IPrimitiveConstLitContext is an interface to support dynamic dispatch. 9511 type IPrimitiveConstLitContext interface { 9512 antlr.ParserRuleContext 9513 9514 // GetParser returns the parser. 9515 GetParser() antlr.Parser 9516 9517 // Getter signatures 9518 Nil_() INilContext 9519 Bool_() IBoolContext 9520 INT() antlr.TerminalNode 9521 MINUS() antlr.TerminalNode 9522 FLOAT() antlr.TerminalNode 9523 STRING() antlr.TerminalNode 9524 EnumLit() IEnumLitContext 9525 9526 // IsPrimitiveConstLitContext differentiates from other interfaces. 9527 IsPrimitiveConstLitContext() 9528 } 9529 9530 type PrimitiveConstLitContext struct { 9531 antlr.BaseParserRuleContext 9532 parser antlr.Parser 9533 } 9534 9535 func NewEmptyPrimitiveConstLitContext() *PrimitiveConstLitContext { 9536 var p = new(PrimitiveConstLitContext) 9537 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 9538 p.RuleIndex = nevaParserRULE_primitiveConstLit 9539 return p 9540 } 9541 9542 func InitEmptyPrimitiveConstLitContext(p *PrimitiveConstLitContext) { 9543 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 9544 p.RuleIndex = nevaParserRULE_primitiveConstLit 9545 } 9546 9547 func (*PrimitiveConstLitContext) IsPrimitiveConstLitContext() {} 9548 9549 func NewPrimitiveConstLitContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PrimitiveConstLitContext { 9550 var p = new(PrimitiveConstLitContext) 9551 9552 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 9553 9554 p.parser = parser 9555 p.RuleIndex = nevaParserRULE_primitiveConstLit 9556 9557 return p 9558 } 9559 9560 func (s *PrimitiveConstLitContext) GetParser() antlr.Parser { return s.parser } 9561 9562 func (s *PrimitiveConstLitContext) Nil_() INilContext { 9563 var t antlr.RuleContext 9564 for _, ctx := range s.GetChildren() { 9565 if _, ok := ctx.(INilContext); ok { 9566 t = ctx.(antlr.RuleContext) 9567 break 9568 } 9569 } 9570 9571 if t == nil { 9572 return nil 9573 } 9574 9575 return t.(INilContext) 9576 } 9577 9578 func (s *PrimitiveConstLitContext) Bool_() IBoolContext { 9579 var t antlr.RuleContext 9580 for _, ctx := range s.GetChildren() { 9581 if _, ok := ctx.(IBoolContext); ok { 9582 t = ctx.(antlr.RuleContext) 9583 break 9584 } 9585 } 9586 9587 if t == nil { 9588 return nil 9589 } 9590 9591 return t.(IBoolContext) 9592 } 9593 9594 func (s *PrimitiveConstLitContext) INT() antlr.TerminalNode { 9595 return s.GetToken(nevaParserINT, 0) 9596 } 9597 9598 func (s *PrimitiveConstLitContext) MINUS() antlr.TerminalNode { 9599 return s.GetToken(nevaParserMINUS, 0) 9600 } 9601 9602 func (s *PrimitiveConstLitContext) FLOAT() antlr.TerminalNode { 9603 return s.GetToken(nevaParserFLOAT, 0) 9604 } 9605 9606 func (s *PrimitiveConstLitContext) STRING() antlr.TerminalNode { 9607 return s.GetToken(nevaParserSTRING, 0) 9608 } 9609 9610 func (s *PrimitiveConstLitContext) EnumLit() IEnumLitContext { 9611 var t antlr.RuleContext 9612 for _, ctx := range s.GetChildren() { 9613 if _, ok := ctx.(IEnumLitContext); ok { 9614 t = ctx.(antlr.RuleContext) 9615 break 9616 } 9617 } 9618 9619 if t == nil { 9620 return nil 9621 } 9622 9623 return t.(IEnumLitContext) 9624 } 9625 9626 func (s *PrimitiveConstLitContext) GetRuleContext() antlr.RuleContext { 9627 return s 9628 } 9629 9630 func (s *PrimitiveConstLitContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 9631 return antlr.TreesStringTree(s, ruleNames, recog) 9632 } 9633 9634 func (s *PrimitiveConstLitContext) EnterRule(listener antlr.ParseTreeListener) { 9635 if listenerT, ok := listener.(nevaListener); ok { 9636 listenerT.EnterPrimitiveConstLit(s) 9637 } 9638 } 9639 9640 func (s *PrimitiveConstLitContext) ExitRule(listener antlr.ParseTreeListener) { 9641 if listenerT, ok := listener.(nevaListener); ok { 9642 listenerT.ExitPrimitiveConstLit(s) 9643 } 9644 } 9645 9646 func (p *nevaParser) PrimitiveConstLit() (localctx IPrimitiveConstLitContext) { 9647 localctx = NewPrimitiveConstLitContext(p, p.GetParserRuleContext(), p.GetState()) 9648 p.EnterRule(localctx, 102, nevaParserRULE_primitiveConstLit) 9649 var _la int 9650 9651 p.SetState(732) 9652 p.GetErrorHandler().Sync(p) 9653 if p.HasError() { 9654 goto errorExit 9655 } 9656 9657 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 88, p.GetParserRuleContext()) { 9658 case 1: 9659 p.EnterOuterAlt(localctx, 1) 9660 { 9661 p.SetState(720) 9662 p.Nil_() 9663 } 9664 9665 case 2: 9666 p.EnterOuterAlt(localctx, 2) 9667 { 9668 p.SetState(721) 9669 p.Bool_() 9670 } 9671 9672 case 3: 9673 p.EnterOuterAlt(localctx, 3) 9674 p.SetState(723) 9675 p.GetErrorHandler().Sync(p) 9676 if p.HasError() { 9677 goto errorExit 9678 } 9679 _la = p.GetTokenStream().LA(1) 9680 9681 if _la == nevaParserMINUS { 9682 { 9683 p.SetState(722) 9684 p.Match(nevaParserMINUS) 9685 if p.HasError() { 9686 // Recognition error - abort rule 9687 goto errorExit 9688 } 9689 } 9690 9691 } 9692 { 9693 p.SetState(725) 9694 p.Match(nevaParserINT) 9695 if p.HasError() { 9696 // Recognition error - abort rule 9697 goto errorExit 9698 } 9699 } 9700 9701 case 4: 9702 p.EnterOuterAlt(localctx, 4) 9703 p.SetState(727) 9704 p.GetErrorHandler().Sync(p) 9705 if p.HasError() { 9706 goto errorExit 9707 } 9708 _la = p.GetTokenStream().LA(1) 9709 9710 if _la == nevaParserMINUS { 9711 { 9712 p.SetState(726) 9713 p.Match(nevaParserMINUS) 9714 if p.HasError() { 9715 // Recognition error - abort rule 9716 goto errorExit 9717 } 9718 } 9719 9720 } 9721 { 9722 p.SetState(729) 9723 p.Match(nevaParserFLOAT) 9724 if p.HasError() { 9725 // Recognition error - abort rule 9726 goto errorExit 9727 } 9728 } 9729 9730 case 5: 9731 p.EnterOuterAlt(localctx, 5) 9732 { 9733 p.SetState(730) 9734 p.Match(nevaParserSTRING) 9735 if p.HasError() { 9736 // Recognition error - abort rule 9737 goto errorExit 9738 } 9739 } 9740 9741 case 6: 9742 p.EnterOuterAlt(localctx, 6) 9743 { 9744 p.SetState(731) 9745 p.EnumLit() 9746 } 9747 9748 case antlr.ATNInvalidAltNumber: 9749 goto errorExit 9750 } 9751 9752 errorExit: 9753 if p.HasError() { 9754 v := p.GetError() 9755 localctx.SetException(v) 9756 p.GetErrorHandler().ReportError(p, v) 9757 p.GetErrorHandler().Recover(p, v) 9758 p.SetError(nil) 9759 } 9760 p.ExitRule() 9761 return localctx 9762 goto errorExit // Trick to prevent compiler error if the label is not used 9763 } 9764 9765 // INilContext is an interface to support dynamic dispatch. 9766 type INilContext interface { 9767 antlr.ParserRuleContext 9768 9769 // GetParser returns the parser. 9770 GetParser() antlr.Parser 9771 // IsNilContext differentiates from other interfaces. 9772 IsNilContext() 9773 } 9774 9775 type NilContext struct { 9776 antlr.BaseParserRuleContext 9777 parser antlr.Parser 9778 } 9779 9780 func NewEmptyNilContext() *NilContext { 9781 var p = new(NilContext) 9782 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 9783 p.RuleIndex = nevaParserRULE_nil 9784 return p 9785 } 9786 9787 func InitEmptyNilContext(p *NilContext) { 9788 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 9789 p.RuleIndex = nevaParserRULE_nil 9790 } 9791 9792 func (*NilContext) IsNilContext() {} 9793 9794 func NewNilContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NilContext { 9795 var p = new(NilContext) 9796 9797 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 9798 9799 p.parser = parser 9800 p.RuleIndex = nevaParserRULE_nil 9801 9802 return p 9803 } 9804 9805 func (s *NilContext) GetParser() antlr.Parser { return s.parser } 9806 func (s *NilContext) GetRuleContext() antlr.RuleContext { 9807 return s 9808 } 9809 9810 func (s *NilContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 9811 return antlr.TreesStringTree(s, ruleNames, recog) 9812 } 9813 9814 func (s *NilContext) EnterRule(listener antlr.ParseTreeListener) { 9815 if listenerT, ok := listener.(nevaListener); ok { 9816 listenerT.EnterNil(s) 9817 } 9818 } 9819 9820 func (s *NilContext) ExitRule(listener antlr.ParseTreeListener) { 9821 if listenerT, ok := listener.(nevaListener); ok { 9822 listenerT.ExitNil(s) 9823 } 9824 } 9825 9826 func (p *nevaParser) Nil_() (localctx INilContext) { 9827 localctx = NewNilContext(p, p.GetParserRuleContext(), p.GetState()) 9828 p.EnterRule(localctx, 104, nevaParserRULE_nil) 9829 p.EnterOuterAlt(localctx, 1) 9830 { 9831 p.SetState(734) 9832 p.Match(nevaParserT__22) 9833 if p.HasError() { 9834 // Recognition error - abort rule 9835 goto errorExit 9836 } 9837 } 9838 9839 errorExit: 9840 if p.HasError() { 9841 v := p.GetError() 9842 localctx.SetException(v) 9843 p.GetErrorHandler().ReportError(p, v) 9844 p.GetErrorHandler().Recover(p, v) 9845 p.SetError(nil) 9846 } 9847 p.ExitRule() 9848 return localctx 9849 goto errorExit // Trick to prevent compiler error if the label is not used 9850 } 9851 9852 // IBoolContext is an interface to support dynamic dispatch. 9853 type IBoolContext interface { 9854 antlr.ParserRuleContext 9855 9856 // GetParser returns the parser. 9857 GetParser() antlr.Parser 9858 // IsBoolContext differentiates from other interfaces. 9859 IsBoolContext() 9860 } 9861 9862 type BoolContext struct { 9863 antlr.BaseParserRuleContext 9864 parser antlr.Parser 9865 } 9866 9867 func NewEmptyBoolContext() *BoolContext { 9868 var p = new(BoolContext) 9869 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 9870 p.RuleIndex = nevaParserRULE_bool 9871 return p 9872 } 9873 9874 func InitEmptyBoolContext(p *BoolContext) { 9875 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 9876 p.RuleIndex = nevaParserRULE_bool 9877 } 9878 9879 func (*BoolContext) IsBoolContext() {} 9880 9881 func NewBoolContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *BoolContext { 9882 var p = new(BoolContext) 9883 9884 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 9885 9886 p.parser = parser 9887 p.RuleIndex = nevaParserRULE_bool 9888 9889 return p 9890 } 9891 9892 func (s *BoolContext) GetParser() antlr.Parser { return s.parser } 9893 func (s *BoolContext) GetRuleContext() antlr.RuleContext { 9894 return s 9895 } 9896 9897 func (s *BoolContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 9898 return antlr.TreesStringTree(s, ruleNames, recog) 9899 } 9900 9901 func (s *BoolContext) EnterRule(listener antlr.ParseTreeListener) { 9902 if listenerT, ok := listener.(nevaListener); ok { 9903 listenerT.EnterBool(s) 9904 } 9905 } 9906 9907 func (s *BoolContext) ExitRule(listener antlr.ParseTreeListener) { 9908 if listenerT, ok := listener.(nevaListener); ok { 9909 listenerT.ExitBool(s) 9910 } 9911 } 9912 9913 func (p *nevaParser) Bool_() (localctx IBoolContext) { 9914 localctx = NewBoolContext(p, p.GetParserRuleContext(), p.GetState()) 9915 p.EnterRule(localctx, 106, nevaParserRULE_bool) 9916 var _la int 9917 9918 p.EnterOuterAlt(localctx, 1) 9919 { 9920 p.SetState(736) 9921 _la = p.GetTokenStream().LA(1) 9922 9923 if !(_la == nevaParserT__23 || _la == nevaParserT__24) { 9924 p.GetErrorHandler().RecoverInline(p) 9925 } else { 9926 p.GetErrorHandler().ReportMatch(p) 9927 p.Consume() 9928 } 9929 } 9930 9931 errorExit: 9932 if p.HasError() { 9933 v := p.GetError() 9934 localctx.SetException(v) 9935 p.GetErrorHandler().ReportError(p, v) 9936 p.GetErrorHandler().Recover(p, v) 9937 p.SetError(nil) 9938 } 9939 p.ExitRule() 9940 return localctx 9941 goto errorExit // Trick to prevent compiler error if the label is not used 9942 } 9943 9944 // IEnumLitContext is an interface to support dynamic dispatch. 9945 type IEnumLitContext interface { 9946 antlr.ParserRuleContext 9947 9948 // GetParser returns the parser. 9949 GetParser() antlr.Parser 9950 9951 // Getter signatures 9952 EntityRef() IEntityRefContext 9953 IDENTIFIER() antlr.TerminalNode 9954 9955 // IsEnumLitContext differentiates from other interfaces. 9956 IsEnumLitContext() 9957 } 9958 9959 type EnumLitContext struct { 9960 antlr.BaseParserRuleContext 9961 parser antlr.Parser 9962 } 9963 9964 func NewEmptyEnumLitContext() *EnumLitContext { 9965 var p = new(EnumLitContext) 9966 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 9967 p.RuleIndex = nevaParserRULE_enumLit 9968 return p 9969 } 9970 9971 func InitEmptyEnumLitContext(p *EnumLitContext) { 9972 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 9973 p.RuleIndex = nevaParserRULE_enumLit 9974 } 9975 9976 func (*EnumLitContext) IsEnumLitContext() {} 9977 9978 func NewEnumLitContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *EnumLitContext { 9979 var p = new(EnumLitContext) 9980 9981 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 9982 9983 p.parser = parser 9984 p.RuleIndex = nevaParserRULE_enumLit 9985 9986 return p 9987 } 9988 9989 func (s *EnumLitContext) GetParser() antlr.Parser { return s.parser } 9990 9991 func (s *EnumLitContext) EntityRef() IEntityRefContext { 9992 var t antlr.RuleContext 9993 for _, ctx := range s.GetChildren() { 9994 if _, ok := ctx.(IEntityRefContext); ok { 9995 t = ctx.(antlr.RuleContext) 9996 break 9997 } 9998 } 9999 10000 if t == nil { 10001 return nil 10002 } 10003 10004 return t.(IEntityRefContext) 10005 } 10006 10007 func (s *EnumLitContext) IDENTIFIER() antlr.TerminalNode { 10008 return s.GetToken(nevaParserIDENTIFIER, 0) 10009 } 10010 10011 func (s *EnumLitContext) GetRuleContext() antlr.RuleContext { 10012 return s 10013 } 10014 10015 func (s *EnumLitContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 10016 return antlr.TreesStringTree(s, ruleNames, recog) 10017 } 10018 10019 func (s *EnumLitContext) EnterRule(listener antlr.ParseTreeListener) { 10020 if listenerT, ok := listener.(nevaListener); ok { 10021 listenerT.EnterEnumLit(s) 10022 } 10023 } 10024 10025 func (s *EnumLitContext) ExitRule(listener antlr.ParseTreeListener) { 10026 if listenerT, ok := listener.(nevaListener); ok { 10027 listenerT.ExitEnumLit(s) 10028 } 10029 } 10030 10031 func (p *nevaParser) EnumLit() (localctx IEnumLitContext) { 10032 localctx = NewEnumLitContext(p, p.GetParserRuleContext(), p.GetState()) 10033 p.EnterRule(localctx, 108, nevaParserRULE_enumLit) 10034 p.EnterOuterAlt(localctx, 1) 10035 { 10036 p.SetState(738) 10037 p.EntityRef() 10038 } 10039 { 10040 p.SetState(739) 10041 p.Match(nevaParserT__25) 10042 if p.HasError() { 10043 // Recognition error - abort rule 10044 goto errorExit 10045 } 10046 } 10047 { 10048 p.SetState(740) 10049 p.Match(nevaParserIDENTIFIER) 10050 if p.HasError() { 10051 // Recognition error - abort rule 10052 goto errorExit 10053 } 10054 } 10055 10056 errorExit: 10057 if p.HasError() { 10058 v := p.GetError() 10059 localctx.SetException(v) 10060 p.GetErrorHandler().ReportError(p, v) 10061 p.GetErrorHandler().Recover(p, v) 10062 p.SetError(nil) 10063 } 10064 p.ExitRule() 10065 return localctx 10066 goto errorExit // Trick to prevent compiler error if the label is not used 10067 } 10068 10069 // IListLitContext is an interface to support dynamic dispatch. 10070 type IListLitContext interface { 10071 antlr.ParserRuleContext 10072 10073 // GetParser returns the parser. 10074 GetParser() antlr.Parser 10075 10076 // Getter signatures 10077 AllNEWLINE() []antlr.TerminalNode 10078 NEWLINE(i int) antlr.TerminalNode 10079 ListItems() IListItemsContext 10080 10081 // IsListLitContext differentiates from other interfaces. 10082 IsListLitContext() 10083 } 10084 10085 type ListLitContext struct { 10086 antlr.BaseParserRuleContext 10087 parser antlr.Parser 10088 } 10089 10090 func NewEmptyListLitContext() *ListLitContext { 10091 var p = new(ListLitContext) 10092 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 10093 p.RuleIndex = nevaParserRULE_listLit 10094 return p 10095 } 10096 10097 func InitEmptyListLitContext(p *ListLitContext) { 10098 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 10099 p.RuleIndex = nevaParserRULE_listLit 10100 } 10101 10102 func (*ListLitContext) IsListLitContext() {} 10103 10104 func NewListLitContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ListLitContext { 10105 var p = new(ListLitContext) 10106 10107 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 10108 10109 p.parser = parser 10110 p.RuleIndex = nevaParserRULE_listLit 10111 10112 return p 10113 } 10114 10115 func (s *ListLitContext) GetParser() antlr.Parser { return s.parser } 10116 10117 func (s *ListLitContext) AllNEWLINE() []antlr.TerminalNode { 10118 return s.GetTokens(nevaParserNEWLINE) 10119 } 10120 10121 func (s *ListLitContext) NEWLINE(i int) antlr.TerminalNode { 10122 return s.GetToken(nevaParserNEWLINE, i) 10123 } 10124 10125 func (s *ListLitContext) ListItems() IListItemsContext { 10126 var t antlr.RuleContext 10127 for _, ctx := range s.GetChildren() { 10128 if _, ok := ctx.(IListItemsContext); ok { 10129 t = ctx.(antlr.RuleContext) 10130 break 10131 } 10132 } 10133 10134 if t == nil { 10135 return nil 10136 } 10137 10138 return t.(IListItemsContext) 10139 } 10140 10141 func (s *ListLitContext) GetRuleContext() antlr.RuleContext { 10142 return s 10143 } 10144 10145 func (s *ListLitContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 10146 return antlr.TreesStringTree(s, ruleNames, recog) 10147 } 10148 10149 func (s *ListLitContext) EnterRule(listener antlr.ParseTreeListener) { 10150 if listenerT, ok := listener.(nevaListener); ok { 10151 listenerT.EnterListLit(s) 10152 } 10153 } 10154 10155 func (s *ListLitContext) ExitRule(listener antlr.ParseTreeListener) { 10156 if listenerT, ok := listener.(nevaListener); ok { 10157 listenerT.ExitListLit(s) 10158 } 10159 } 10160 10161 func (p *nevaParser) ListLit() (localctx IListLitContext) { 10162 localctx = NewListLitContext(p, p.GetParserRuleContext(), p.GetState()) 10163 p.EnterRule(localctx, 110, nevaParserRULE_listLit) 10164 var _la int 10165 10166 p.EnterOuterAlt(localctx, 1) 10167 { 10168 p.SetState(742) 10169 p.Match(nevaParserT__18) 10170 if p.HasError() { 10171 // Recognition error - abort rule 10172 goto errorExit 10173 } 10174 } 10175 p.SetState(746) 10176 p.GetErrorHandler().Sync(p) 10177 if p.HasError() { 10178 goto errorExit 10179 } 10180 _la = p.GetTokenStream().LA(1) 10181 10182 for _la == nevaParserNEWLINE { 10183 { 10184 p.SetState(743) 10185 p.Match(nevaParserNEWLINE) 10186 if p.HasError() { 10187 // Recognition error - abort rule 10188 goto errorExit 10189 } 10190 } 10191 10192 p.SetState(748) 10193 p.GetErrorHandler().Sync(p) 10194 if p.HasError() { 10195 goto errorExit 10196 } 10197 _la = p.GetTokenStream().LA(1) 10198 } 10199 p.SetState(750) 10200 p.GetErrorHandler().Sync(p) 10201 if p.HasError() { 10202 goto errorExit 10203 } 10204 _la = p.GetTokenStream().LA(1) 10205 10206 if (int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&2130363023424) != 0 { 10207 { 10208 p.SetState(749) 10209 p.ListItems() 10210 } 10211 10212 } 10213 { 10214 p.SetState(752) 10215 p.Match(nevaParserT__19) 10216 if p.HasError() { 10217 // Recognition error - abort rule 10218 goto errorExit 10219 } 10220 } 10221 10222 errorExit: 10223 if p.HasError() { 10224 v := p.GetError() 10225 localctx.SetException(v) 10226 p.GetErrorHandler().ReportError(p, v) 10227 p.GetErrorHandler().Recover(p, v) 10228 p.SetError(nil) 10229 } 10230 p.ExitRule() 10231 return localctx 10232 goto errorExit // Trick to prevent compiler error if the label is not used 10233 } 10234 10235 // IListItemsContext is an interface to support dynamic dispatch. 10236 type IListItemsContext interface { 10237 antlr.ParserRuleContext 10238 10239 // GetParser returns the parser. 10240 GetParser() antlr.Parser 10241 10242 // Getter signatures 10243 AllCompositeItem() []ICompositeItemContext 10244 CompositeItem(i int) ICompositeItemContext 10245 AllNEWLINE() []antlr.TerminalNode 10246 NEWLINE(i int) antlr.TerminalNode 10247 10248 // IsListItemsContext differentiates from other interfaces. 10249 IsListItemsContext() 10250 } 10251 10252 type ListItemsContext struct { 10253 antlr.BaseParserRuleContext 10254 parser antlr.Parser 10255 } 10256 10257 func NewEmptyListItemsContext() *ListItemsContext { 10258 var p = new(ListItemsContext) 10259 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 10260 p.RuleIndex = nevaParserRULE_listItems 10261 return p 10262 } 10263 10264 func InitEmptyListItemsContext(p *ListItemsContext) { 10265 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 10266 p.RuleIndex = nevaParserRULE_listItems 10267 } 10268 10269 func (*ListItemsContext) IsListItemsContext() {} 10270 10271 func NewListItemsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ListItemsContext { 10272 var p = new(ListItemsContext) 10273 10274 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 10275 10276 p.parser = parser 10277 p.RuleIndex = nevaParserRULE_listItems 10278 10279 return p 10280 } 10281 10282 func (s *ListItemsContext) GetParser() antlr.Parser { return s.parser } 10283 10284 func (s *ListItemsContext) AllCompositeItem() []ICompositeItemContext { 10285 children := s.GetChildren() 10286 len := 0 10287 for _, ctx := range children { 10288 if _, ok := ctx.(ICompositeItemContext); ok { 10289 len++ 10290 } 10291 } 10292 10293 tst := make([]ICompositeItemContext, len) 10294 i := 0 10295 for _, ctx := range children { 10296 if t, ok := ctx.(ICompositeItemContext); ok { 10297 tst[i] = t.(ICompositeItemContext) 10298 i++ 10299 } 10300 } 10301 10302 return tst 10303 } 10304 10305 func (s *ListItemsContext) CompositeItem(i int) ICompositeItemContext { 10306 var t antlr.RuleContext 10307 j := 0 10308 for _, ctx := range s.GetChildren() { 10309 if _, ok := ctx.(ICompositeItemContext); ok { 10310 if j == i { 10311 t = ctx.(antlr.RuleContext) 10312 break 10313 } 10314 j++ 10315 } 10316 } 10317 10318 if t == nil { 10319 return nil 10320 } 10321 10322 return t.(ICompositeItemContext) 10323 } 10324 10325 func (s *ListItemsContext) AllNEWLINE() []antlr.TerminalNode { 10326 return s.GetTokens(nevaParserNEWLINE) 10327 } 10328 10329 func (s *ListItemsContext) NEWLINE(i int) antlr.TerminalNode { 10330 return s.GetToken(nevaParserNEWLINE, i) 10331 } 10332 10333 func (s *ListItemsContext) GetRuleContext() antlr.RuleContext { 10334 return s 10335 } 10336 10337 func (s *ListItemsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 10338 return antlr.TreesStringTree(s, ruleNames, recog) 10339 } 10340 10341 func (s *ListItemsContext) EnterRule(listener antlr.ParseTreeListener) { 10342 if listenerT, ok := listener.(nevaListener); ok { 10343 listenerT.EnterListItems(s) 10344 } 10345 } 10346 10347 func (s *ListItemsContext) ExitRule(listener antlr.ParseTreeListener) { 10348 if listenerT, ok := listener.(nevaListener); ok { 10349 listenerT.ExitListItems(s) 10350 } 10351 } 10352 10353 func (p *nevaParser) ListItems() (localctx IListItemsContext) { 10354 localctx = NewListItemsContext(p, p.GetParserRuleContext(), p.GetState()) 10355 p.EnterRule(localctx, 112, nevaParserRULE_listItems) 10356 var _la int 10357 10358 p.SetState(775) 10359 p.GetErrorHandler().Sync(p) 10360 if p.HasError() { 10361 goto errorExit 10362 } 10363 10364 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 94, p.GetParserRuleContext()) { 10365 case 1: 10366 p.EnterOuterAlt(localctx, 1) 10367 { 10368 p.SetState(754) 10369 p.CompositeItem() 10370 } 10371 10372 case 2: 10373 p.EnterOuterAlt(localctx, 2) 10374 { 10375 p.SetState(755) 10376 p.CompositeItem() 10377 } 10378 p.SetState(772) 10379 p.GetErrorHandler().Sync(p) 10380 if p.HasError() { 10381 goto errorExit 10382 } 10383 _la = p.GetTokenStream().LA(1) 10384 10385 for _la == nevaParserT__2 { 10386 { 10387 p.SetState(756) 10388 p.Match(nevaParserT__2) 10389 if p.HasError() { 10390 // Recognition error - abort rule 10391 goto errorExit 10392 } 10393 } 10394 p.SetState(760) 10395 p.GetErrorHandler().Sync(p) 10396 if p.HasError() { 10397 goto errorExit 10398 } 10399 _la = p.GetTokenStream().LA(1) 10400 10401 for _la == nevaParserNEWLINE { 10402 { 10403 p.SetState(757) 10404 p.Match(nevaParserNEWLINE) 10405 if p.HasError() { 10406 // Recognition error - abort rule 10407 goto errorExit 10408 } 10409 } 10410 10411 p.SetState(762) 10412 p.GetErrorHandler().Sync(p) 10413 if p.HasError() { 10414 goto errorExit 10415 } 10416 _la = p.GetTokenStream().LA(1) 10417 } 10418 { 10419 p.SetState(763) 10420 p.CompositeItem() 10421 } 10422 p.SetState(767) 10423 p.GetErrorHandler().Sync(p) 10424 if p.HasError() { 10425 goto errorExit 10426 } 10427 _la = p.GetTokenStream().LA(1) 10428 10429 for _la == nevaParserNEWLINE { 10430 { 10431 p.SetState(764) 10432 p.Match(nevaParserNEWLINE) 10433 if p.HasError() { 10434 // Recognition error - abort rule 10435 goto errorExit 10436 } 10437 } 10438 10439 p.SetState(769) 10440 p.GetErrorHandler().Sync(p) 10441 if p.HasError() { 10442 goto errorExit 10443 } 10444 _la = p.GetTokenStream().LA(1) 10445 } 10446 10447 p.SetState(774) 10448 p.GetErrorHandler().Sync(p) 10449 if p.HasError() { 10450 goto errorExit 10451 } 10452 _la = p.GetTokenStream().LA(1) 10453 } 10454 10455 case antlr.ATNInvalidAltNumber: 10456 goto errorExit 10457 } 10458 10459 errorExit: 10460 if p.HasError() { 10461 v := p.GetError() 10462 localctx.SetException(v) 10463 p.GetErrorHandler().ReportError(p, v) 10464 p.GetErrorHandler().Recover(p, v) 10465 p.SetError(nil) 10466 } 10467 p.ExitRule() 10468 return localctx 10469 goto errorExit // Trick to prevent compiler error if the label is not used 10470 } 10471 10472 // ICompositeItemContext is an interface to support dynamic dispatch. 10473 type ICompositeItemContext interface { 10474 antlr.ParserRuleContext 10475 10476 // GetParser returns the parser. 10477 GetParser() antlr.Parser 10478 10479 // Getter signatures 10480 EntityRef() IEntityRefContext 10481 ConstLit() IConstLitContext 10482 10483 // IsCompositeItemContext differentiates from other interfaces. 10484 IsCompositeItemContext() 10485 } 10486 10487 type CompositeItemContext struct { 10488 antlr.BaseParserRuleContext 10489 parser antlr.Parser 10490 } 10491 10492 func NewEmptyCompositeItemContext() *CompositeItemContext { 10493 var p = new(CompositeItemContext) 10494 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 10495 p.RuleIndex = nevaParserRULE_compositeItem 10496 return p 10497 } 10498 10499 func InitEmptyCompositeItemContext(p *CompositeItemContext) { 10500 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 10501 p.RuleIndex = nevaParserRULE_compositeItem 10502 } 10503 10504 func (*CompositeItemContext) IsCompositeItemContext() {} 10505 10506 func NewCompositeItemContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CompositeItemContext { 10507 var p = new(CompositeItemContext) 10508 10509 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 10510 10511 p.parser = parser 10512 p.RuleIndex = nevaParserRULE_compositeItem 10513 10514 return p 10515 } 10516 10517 func (s *CompositeItemContext) GetParser() antlr.Parser { return s.parser } 10518 10519 func (s *CompositeItemContext) EntityRef() IEntityRefContext { 10520 var t antlr.RuleContext 10521 for _, ctx := range s.GetChildren() { 10522 if _, ok := ctx.(IEntityRefContext); ok { 10523 t = ctx.(antlr.RuleContext) 10524 break 10525 } 10526 } 10527 10528 if t == nil { 10529 return nil 10530 } 10531 10532 return t.(IEntityRefContext) 10533 } 10534 10535 func (s *CompositeItemContext) ConstLit() IConstLitContext { 10536 var t antlr.RuleContext 10537 for _, ctx := range s.GetChildren() { 10538 if _, ok := ctx.(IConstLitContext); ok { 10539 t = ctx.(antlr.RuleContext) 10540 break 10541 } 10542 } 10543 10544 if t == nil { 10545 return nil 10546 } 10547 10548 return t.(IConstLitContext) 10549 } 10550 10551 func (s *CompositeItemContext) GetRuleContext() antlr.RuleContext { 10552 return s 10553 } 10554 10555 func (s *CompositeItemContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 10556 return antlr.TreesStringTree(s, ruleNames, recog) 10557 } 10558 10559 func (s *CompositeItemContext) EnterRule(listener antlr.ParseTreeListener) { 10560 if listenerT, ok := listener.(nevaListener); ok { 10561 listenerT.EnterCompositeItem(s) 10562 } 10563 } 10564 10565 func (s *CompositeItemContext) ExitRule(listener antlr.ParseTreeListener) { 10566 if listenerT, ok := listener.(nevaListener); ok { 10567 listenerT.ExitCompositeItem(s) 10568 } 10569 } 10570 10571 func (p *nevaParser) CompositeItem() (localctx ICompositeItemContext) { 10572 localctx = NewCompositeItemContext(p, p.GetParserRuleContext(), p.GetState()) 10573 p.EnterRule(localctx, 114, nevaParserRULE_compositeItem) 10574 p.SetState(779) 10575 p.GetErrorHandler().Sync(p) 10576 if p.HasError() { 10577 goto errorExit 10578 } 10579 10580 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 95, p.GetParserRuleContext()) { 10581 case 1: 10582 p.EnterOuterAlt(localctx, 1) 10583 { 10584 p.SetState(777) 10585 p.EntityRef() 10586 } 10587 10588 case 2: 10589 p.EnterOuterAlt(localctx, 2) 10590 { 10591 p.SetState(778) 10592 p.ConstLit() 10593 } 10594 10595 case antlr.ATNInvalidAltNumber: 10596 goto errorExit 10597 } 10598 10599 errorExit: 10600 if p.HasError() { 10601 v := p.GetError() 10602 localctx.SetException(v) 10603 p.GetErrorHandler().ReportError(p, v) 10604 p.GetErrorHandler().Recover(p, v) 10605 p.SetError(nil) 10606 } 10607 p.ExitRule() 10608 return localctx 10609 goto errorExit // Trick to prevent compiler error if the label is not used 10610 } 10611 10612 // IStructLitContext is an interface to support dynamic dispatch. 10613 type IStructLitContext interface { 10614 antlr.ParserRuleContext 10615 10616 // GetParser returns the parser. 10617 GetParser() antlr.Parser 10618 10619 // Getter signatures 10620 AllNEWLINE() []antlr.TerminalNode 10621 NEWLINE(i int) antlr.TerminalNode 10622 StructValueFields() IStructValueFieldsContext 10623 10624 // IsStructLitContext differentiates from other interfaces. 10625 IsStructLitContext() 10626 } 10627 10628 type StructLitContext struct { 10629 antlr.BaseParserRuleContext 10630 parser antlr.Parser 10631 } 10632 10633 func NewEmptyStructLitContext() *StructLitContext { 10634 var p = new(StructLitContext) 10635 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 10636 p.RuleIndex = nevaParserRULE_structLit 10637 return p 10638 } 10639 10640 func InitEmptyStructLitContext(p *StructLitContext) { 10641 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 10642 p.RuleIndex = nevaParserRULE_structLit 10643 } 10644 10645 func (*StructLitContext) IsStructLitContext() {} 10646 10647 func NewStructLitContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StructLitContext { 10648 var p = new(StructLitContext) 10649 10650 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 10651 10652 p.parser = parser 10653 p.RuleIndex = nevaParserRULE_structLit 10654 10655 return p 10656 } 10657 10658 func (s *StructLitContext) GetParser() antlr.Parser { return s.parser } 10659 10660 func (s *StructLitContext) AllNEWLINE() []antlr.TerminalNode { 10661 return s.GetTokens(nevaParserNEWLINE) 10662 } 10663 10664 func (s *StructLitContext) NEWLINE(i int) antlr.TerminalNode { 10665 return s.GetToken(nevaParserNEWLINE, i) 10666 } 10667 10668 func (s *StructLitContext) StructValueFields() IStructValueFieldsContext { 10669 var t antlr.RuleContext 10670 for _, ctx := range s.GetChildren() { 10671 if _, ok := ctx.(IStructValueFieldsContext); ok { 10672 t = ctx.(antlr.RuleContext) 10673 break 10674 } 10675 } 10676 10677 if t == nil { 10678 return nil 10679 } 10680 10681 return t.(IStructValueFieldsContext) 10682 } 10683 10684 func (s *StructLitContext) GetRuleContext() antlr.RuleContext { 10685 return s 10686 } 10687 10688 func (s *StructLitContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 10689 return antlr.TreesStringTree(s, ruleNames, recog) 10690 } 10691 10692 func (s *StructLitContext) EnterRule(listener antlr.ParseTreeListener) { 10693 if listenerT, ok := listener.(nevaListener); ok { 10694 listenerT.EnterStructLit(s) 10695 } 10696 } 10697 10698 func (s *StructLitContext) ExitRule(listener antlr.ParseTreeListener) { 10699 if listenerT, ok := listener.(nevaListener); ok { 10700 listenerT.ExitStructLit(s) 10701 } 10702 } 10703 10704 func (p *nevaParser) StructLit() (localctx IStructLitContext) { 10705 localctx = NewStructLitContext(p, p.GetParserRuleContext(), p.GetState()) 10706 p.EnterRule(localctx, 116, nevaParserRULE_structLit) 10707 var _la int 10708 10709 p.EnterOuterAlt(localctx, 1) 10710 { 10711 p.SetState(781) 10712 p.Match(nevaParserT__5) 10713 if p.HasError() { 10714 // Recognition error - abort rule 10715 goto errorExit 10716 } 10717 } 10718 p.SetState(785) 10719 p.GetErrorHandler().Sync(p) 10720 if p.HasError() { 10721 goto errorExit 10722 } 10723 _la = p.GetTokenStream().LA(1) 10724 10725 for _la == nevaParserNEWLINE { 10726 { 10727 p.SetState(782) 10728 p.Match(nevaParserNEWLINE) 10729 if p.HasError() { 10730 // Recognition error - abort rule 10731 goto errorExit 10732 } 10733 } 10734 10735 p.SetState(787) 10736 p.GetErrorHandler().Sync(p) 10737 if p.HasError() { 10738 goto errorExit 10739 } 10740 _la = p.GetTokenStream().LA(1) 10741 } 10742 p.SetState(789) 10743 p.GetErrorHandler().Sync(p) 10744 if p.HasError() { 10745 goto errorExit 10746 } 10747 _la = p.GetTokenStream().LA(1) 10748 10749 if _la == nevaParserIDENTIFIER { 10750 { 10751 p.SetState(788) 10752 p.StructValueFields() 10753 } 10754 10755 } 10756 { 10757 p.SetState(791) 10758 p.Match(nevaParserT__6) 10759 if p.HasError() { 10760 // Recognition error - abort rule 10761 goto errorExit 10762 } 10763 } 10764 10765 errorExit: 10766 if p.HasError() { 10767 v := p.GetError() 10768 localctx.SetException(v) 10769 p.GetErrorHandler().ReportError(p, v) 10770 p.GetErrorHandler().Recover(p, v) 10771 p.SetError(nil) 10772 } 10773 p.ExitRule() 10774 return localctx 10775 goto errorExit // Trick to prevent compiler error if the label is not used 10776 } 10777 10778 // IStructValueFieldsContext is an interface to support dynamic dispatch. 10779 type IStructValueFieldsContext interface { 10780 antlr.ParserRuleContext 10781 10782 // GetParser returns the parser. 10783 GetParser() antlr.Parser 10784 10785 // Getter signatures 10786 AllStructValueField() []IStructValueFieldContext 10787 StructValueField(i int) IStructValueFieldContext 10788 AllNEWLINE() []antlr.TerminalNode 10789 NEWLINE(i int) antlr.TerminalNode 10790 10791 // IsStructValueFieldsContext differentiates from other interfaces. 10792 IsStructValueFieldsContext() 10793 } 10794 10795 type StructValueFieldsContext struct { 10796 antlr.BaseParserRuleContext 10797 parser antlr.Parser 10798 } 10799 10800 func NewEmptyStructValueFieldsContext() *StructValueFieldsContext { 10801 var p = new(StructValueFieldsContext) 10802 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 10803 p.RuleIndex = nevaParserRULE_structValueFields 10804 return p 10805 } 10806 10807 func InitEmptyStructValueFieldsContext(p *StructValueFieldsContext) { 10808 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 10809 p.RuleIndex = nevaParserRULE_structValueFields 10810 } 10811 10812 func (*StructValueFieldsContext) IsStructValueFieldsContext() {} 10813 10814 func NewStructValueFieldsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StructValueFieldsContext { 10815 var p = new(StructValueFieldsContext) 10816 10817 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 10818 10819 p.parser = parser 10820 p.RuleIndex = nevaParserRULE_structValueFields 10821 10822 return p 10823 } 10824 10825 func (s *StructValueFieldsContext) GetParser() antlr.Parser { return s.parser } 10826 10827 func (s *StructValueFieldsContext) AllStructValueField() []IStructValueFieldContext { 10828 children := s.GetChildren() 10829 len := 0 10830 for _, ctx := range children { 10831 if _, ok := ctx.(IStructValueFieldContext); ok { 10832 len++ 10833 } 10834 } 10835 10836 tst := make([]IStructValueFieldContext, len) 10837 i := 0 10838 for _, ctx := range children { 10839 if t, ok := ctx.(IStructValueFieldContext); ok { 10840 tst[i] = t.(IStructValueFieldContext) 10841 i++ 10842 } 10843 } 10844 10845 return tst 10846 } 10847 10848 func (s *StructValueFieldsContext) StructValueField(i int) IStructValueFieldContext { 10849 var t antlr.RuleContext 10850 j := 0 10851 for _, ctx := range s.GetChildren() { 10852 if _, ok := ctx.(IStructValueFieldContext); ok { 10853 if j == i { 10854 t = ctx.(antlr.RuleContext) 10855 break 10856 } 10857 j++ 10858 } 10859 } 10860 10861 if t == nil { 10862 return nil 10863 } 10864 10865 return t.(IStructValueFieldContext) 10866 } 10867 10868 func (s *StructValueFieldsContext) AllNEWLINE() []antlr.TerminalNode { 10869 return s.GetTokens(nevaParserNEWLINE) 10870 } 10871 10872 func (s *StructValueFieldsContext) NEWLINE(i int) antlr.TerminalNode { 10873 return s.GetToken(nevaParserNEWLINE, i) 10874 } 10875 10876 func (s *StructValueFieldsContext) GetRuleContext() antlr.RuleContext { 10877 return s 10878 } 10879 10880 func (s *StructValueFieldsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 10881 return antlr.TreesStringTree(s, ruleNames, recog) 10882 } 10883 10884 func (s *StructValueFieldsContext) EnterRule(listener antlr.ParseTreeListener) { 10885 if listenerT, ok := listener.(nevaListener); ok { 10886 listenerT.EnterStructValueFields(s) 10887 } 10888 } 10889 10890 func (s *StructValueFieldsContext) ExitRule(listener antlr.ParseTreeListener) { 10891 if listenerT, ok := listener.(nevaListener); ok { 10892 listenerT.ExitStructValueFields(s) 10893 } 10894 } 10895 10896 func (p *nevaParser) StructValueFields() (localctx IStructValueFieldsContext) { 10897 localctx = NewStructValueFieldsContext(p, p.GetParserRuleContext(), p.GetState()) 10898 p.EnterRule(localctx, 118, nevaParserRULE_structValueFields) 10899 var _la int 10900 10901 p.EnterOuterAlt(localctx, 1) 10902 { 10903 p.SetState(793) 10904 p.StructValueField() 10905 } 10906 p.SetState(804) 10907 p.GetErrorHandler().Sync(p) 10908 if p.HasError() { 10909 goto errorExit 10910 } 10911 _la = p.GetTokenStream().LA(1) 10912 10913 for _la == nevaParserT__2 { 10914 { 10915 p.SetState(794) 10916 p.Match(nevaParserT__2) 10917 if p.HasError() { 10918 // Recognition error - abort rule 10919 goto errorExit 10920 } 10921 } 10922 p.SetState(798) 10923 p.GetErrorHandler().Sync(p) 10924 if p.HasError() { 10925 goto errorExit 10926 } 10927 _la = p.GetTokenStream().LA(1) 10928 10929 for _la == nevaParserNEWLINE { 10930 { 10931 p.SetState(795) 10932 p.Match(nevaParserNEWLINE) 10933 if p.HasError() { 10934 // Recognition error - abort rule 10935 goto errorExit 10936 } 10937 } 10938 10939 p.SetState(800) 10940 p.GetErrorHandler().Sync(p) 10941 if p.HasError() { 10942 goto errorExit 10943 } 10944 _la = p.GetTokenStream().LA(1) 10945 } 10946 { 10947 p.SetState(801) 10948 p.StructValueField() 10949 } 10950 10951 p.SetState(806) 10952 p.GetErrorHandler().Sync(p) 10953 if p.HasError() { 10954 goto errorExit 10955 } 10956 _la = p.GetTokenStream().LA(1) 10957 } 10958 10959 errorExit: 10960 if p.HasError() { 10961 v := p.GetError() 10962 localctx.SetException(v) 10963 p.GetErrorHandler().ReportError(p, v) 10964 p.GetErrorHandler().Recover(p, v) 10965 p.SetError(nil) 10966 } 10967 p.ExitRule() 10968 return localctx 10969 goto errorExit // Trick to prevent compiler error if the label is not used 10970 } 10971 10972 // IStructValueFieldContext is an interface to support dynamic dispatch. 10973 type IStructValueFieldContext interface { 10974 antlr.ParserRuleContext 10975 10976 // GetParser returns the parser. 10977 GetParser() antlr.Parser 10978 10979 // Getter signatures 10980 IDENTIFIER() antlr.TerminalNode 10981 CompositeItem() ICompositeItemContext 10982 AllNEWLINE() []antlr.TerminalNode 10983 NEWLINE(i int) antlr.TerminalNode 10984 10985 // IsStructValueFieldContext differentiates from other interfaces. 10986 IsStructValueFieldContext() 10987 } 10988 10989 type StructValueFieldContext struct { 10990 antlr.BaseParserRuleContext 10991 parser antlr.Parser 10992 } 10993 10994 func NewEmptyStructValueFieldContext() *StructValueFieldContext { 10995 var p = new(StructValueFieldContext) 10996 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 10997 p.RuleIndex = nevaParserRULE_structValueField 10998 return p 10999 } 11000 11001 func InitEmptyStructValueFieldContext(p *StructValueFieldContext) { 11002 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 11003 p.RuleIndex = nevaParserRULE_structValueField 11004 } 11005 11006 func (*StructValueFieldContext) IsStructValueFieldContext() {} 11007 11008 func NewStructValueFieldContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StructValueFieldContext { 11009 var p = new(StructValueFieldContext) 11010 11011 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 11012 11013 p.parser = parser 11014 p.RuleIndex = nevaParserRULE_structValueField 11015 11016 return p 11017 } 11018 11019 func (s *StructValueFieldContext) GetParser() antlr.Parser { return s.parser } 11020 11021 func (s *StructValueFieldContext) IDENTIFIER() antlr.TerminalNode { 11022 return s.GetToken(nevaParserIDENTIFIER, 0) 11023 } 11024 11025 func (s *StructValueFieldContext) CompositeItem() ICompositeItemContext { 11026 var t antlr.RuleContext 11027 for _, ctx := range s.GetChildren() { 11028 if _, ok := ctx.(ICompositeItemContext); ok { 11029 t = ctx.(antlr.RuleContext) 11030 break 11031 } 11032 } 11033 11034 if t == nil { 11035 return nil 11036 } 11037 11038 return t.(ICompositeItemContext) 11039 } 11040 11041 func (s *StructValueFieldContext) AllNEWLINE() []antlr.TerminalNode { 11042 return s.GetTokens(nevaParserNEWLINE) 11043 } 11044 11045 func (s *StructValueFieldContext) NEWLINE(i int) antlr.TerminalNode { 11046 return s.GetToken(nevaParserNEWLINE, i) 11047 } 11048 11049 func (s *StructValueFieldContext) GetRuleContext() antlr.RuleContext { 11050 return s 11051 } 11052 11053 func (s *StructValueFieldContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 11054 return antlr.TreesStringTree(s, ruleNames, recog) 11055 } 11056 11057 func (s *StructValueFieldContext) EnterRule(listener antlr.ParseTreeListener) { 11058 if listenerT, ok := listener.(nevaListener); ok { 11059 listenerT.EnterStructValueField(s) 11060 } 11061 } 11062 11063 func (s *StructValueFieldContext) ExitRule(listener antlr.ParseTreeListener) { 11064 if listenerT, ok := listener.(nevaListener); ok { 11065 listenerT.ExitStructValueField(s) 11066 } 11067 } 11068 11069 func (p *nevaParser) StructValueField() (localctx IStructValueFieldContext) { 11070 localctx = NewStructValueFieldContext(p, p.GetParserRuleContext(), p.GetState()) 11071 p.EnterRule(localctx, 120, nevaParserRULE_structValueField) 11072 var _la int 11073 11074 p.EnterOuterAlt(localctx, 1) 11075 { 11076 p.SetState(807) 11077 p.Match(nevaParserIDENTIFIER) 11078 if p.HasError() { 11079 // Recognition error - abort rule 11080 goto errorExit 11081 } 11082 } 11083 { 11084 p.SetState(808) 11085 p.Match(nevaParserT__7) 11086 if p.HasError() { 11087 // Recognition error - abort rule 11088 goto errorExit 11089 } 11090 } 11091 { 11092 p.SetState(809) 11093 p.CompositeItem() 11094 } 11095 p.SetState(813) 11096 p.GetErrorHandler().Sync(p) 11097 if p.HasError() { 11098 goto errorExit 11099 } 11100 _la = p.GetTokenStream().LA(1) 11101 11102 for _la == nevaParserNEWLINE { 11103 { 11104 p.SetState(810) 11105 p.Match(nevaParserNEWLINE) 11106 if p.HasError() { 11107 // Recognition error - abort rule 11108 goto errorExit 11109 } 11110 } 11111 11112 p.SetState(815) 11113 p.GetErrorHandler().Sync(p) 11114 if p.HasError() { 11115 goto errorExit 11116 } 11117 _la = p.GetTokenStream().LA(1) 11118 } 11119 11120 errorExit: 11121 if p.HasError() { 11122 v := p.GetError() 11123 localctx.SetException(v) 11124 p.GetErrorHandler().ReportError(p, v) 11125 p.GetErrorHandler().Recover(p, v) 11126 p.SetError(nil) 11127 } 11128 p.ExitRule() 11129 return localctx 11130 goto errorExit // Trick to prevent compiler error if the label is not used 11131 } 11132 11133 // ICompStmtContext is an interface to support dynamic dispatch. 11134 type ICompStmtContext interface { 11135 antlr.ParserRuleContext 11136 11137 // GetParser returns the parser. 11138 GetParser() antlr.Parser 11139 11140 // Getter signatures 11141 SingleCompStmt() ISingleCompStmtContext 11142 GroupCompStmt() IGroupCompStmtContext 11143 11144 // IsCompStmtContext differentiates from other interfaces. 11145 IsCompStmtContext() 11146 } 11147 11148 type CompStmtContext struct { 11149 antlr.BaseParserRuleContext 11150 parser antlr.Parser 11151 } 11152 11153 func NewEmptyCompStmtContext() *CompStmtContext { 11154 var p = new(CompStmtContext) 11155 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 11156 p.RuleIndex = nevaParserRULE_compStmt 11157 return p 11158 } 11159 11160 func InitEmptyCompStmtContext(p *CompStmtContext) { 11161 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 11162 p.RuleIndex = nevaParserRULE_compStmt 11163 } 11164 11165 func (*CompStmtContext) IsCompStmtContext() {} 11166 11167 func NewCompStmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CompStmtContext { 11168 var p = new(CompStmtContext) 11169 11170 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 11171 11172 p.parser = parser 11173 p.RuleIndex = nevaParserRULE_compStmt 11174 11175 return p 11176 } 11177 11178 func (s *CompStmtContext) GetParser() antlr.Parser { return s.parser } 11179 11180 func (s *CompStmtContext) SingleCompStmt() ISingleCompStmtContext { 11181 var t antlr.RuleContext 11182 for _, ctx := range s.GetChildren() { 11183 if _, ok := ctx.(ISingleCompStmtContext); ok { 11184 t = ctx.(antlr.RuleContext) 11185 break 11186 } 11187 } 11188 11189 if t == nil { 11190 return nil 11191 } 11192 11193 return t.(ISingleCompStmtContext) 11194 } 11195 11196 func (s *CompStmtContext) GroupCompStmt() IGroupCompStmtContext { 11197 var t antlr.RuleContext 11198 for _, ctx := range s.GetChildren() { 11199 if _, ok := ctx.(IGroupCompStmtContext); ok { 11200 t = ctx.(antlr.RuleContext) 11201 break 11202 } 11203 } 11204 11205 if t == nil { 11206 return nil 11207 } 11208 11209 return t.(IGroupCompStmtContext) 11210 } 11211 11212 func (s *CompStmtContext) GetRuleContext() antlr.RuleContext { 11213 return s 11214 } 11215 11216 func (s *CompStmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 11217 return antlr.TreesStringTree(s, ruleNames, recog) 11218 } 11219 11220 func (s *CompStmtContext) EnterRule(listener antlr.ParseTreeListener) { 11221 if listenerT, ok := listener.(nevaListener); ok { 11222 listenerT.EnterCompStmt(s) 11223 } 11224 } 11225 11226 func (s *CompStmtContext) ExitRule(listener antlr.ParseTreeListener) { 11227 if listenerT, ok := listener.(nevaListener); ok { 11228 listenerT.ExitCompStmt(s) 11229 } 11230 } 11231 11232 func (p *nevaParser) CompStmt() (localctx ICompStmtContext) { 11233 localctx = NewCompStmtContext(p, p.GetParserRuleContext(), p.GetState()) 11234 p.EnterRule(localctx, 122, nevaParserRULE_compStmt) 11235 p.SetState(818) 11236 p.GetErrorHandler().Sync(p) 11237 if p.HasError() { 11238 goto errorExit 11239 } 11240 11241 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 101, p.GetParserRuleContext()) { 11242 case 1: 11243 p.EnterOuterAlt(localctx, 1) 11244 { 11245 p.SetState(816) 11246 p.SingleCompStmt() 11247 } 11248 11249 case 2: 11250 p.EnterOuterAlt(localctx, 2) 11251 { 11252 p.SetState(817) 11253 p.GroupCompStmt() 11254 } 11255 11256 case antlr.ATNInvalidAltNumber: 11257 goto errorExit 11258 } 11259 11260 errorExit: 11261 if p.HasError() { 11262 v := p.GetError() 11263 localctx.SetException(v) 11264 p.GetErrorHandler().ReportError(p, v) 11265 p.GetErrorHandler().Recover(p, v) 11266 p.SetError(nil) 11267 } 11268 p.ExitRule() 11269 return localctx 11270 goto errorExit // Trick to prevent compiler error if the label is not used 11271 } 11272 11273 // ISingleCompStmtContext is an interface to support dynamic dispatch. 11274 type ISingleCompStmtContext interface { 11275 antlr.ParserRuleContext 11276 11277 // GetParser returns the parser. 11278 GetParser() antlr.Parser 11279 11280 // Getter signatures 11281 CompDef() ICompDefContext 11282 CompilerDirectives() ICompilerDirectivesContext 11283 PUB_KW() antlr.TerminalNode 11284 11285 // IsSingleCompStmtContext differentiates from other interfaces. 11286 IsSingleCompStmtContext() 11287 } 11288 11289 type SingleCompStmtContext struct { 11290 antlr.BaseParserRuleContext 11291 parser antlr.Parser 11292 } 11293 11294 func NewEmptySingleCompStmtContext() *SingleCompStmtContext { 11295 var p = new(SingleCompStmtContext) 11296 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 11297 p.RuleIndex = nevaParserRULE_singleCompStmt 11298 return p 11299 } 11300 11301 func InitEmptySingleCompStmtContext(p *SingleCompStmtContext) { 11302 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 11303 p.RuleIndex = nevaParserRULE_singleCompStmt 11304 } 11305 11306 func (*SingleCompStmtContext) IsSingleCompStmtContext() {} 11307 11308 func NewSingleCompStmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SingleCompStmtContext { 11309 var p = new(SingleCompStmtContext) 11310 11311 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 11312 11313 p.parser = parser 11314 p.RuleIndex = nevaParserRULE_singleCompStmt 11315 11316 return p 11317 } 11318 11319 func (s *SingleCompStmtContext) GetParser() antlr.Parser { return s.parser } 11320 11321 func (s *SingleCompStmtContext) CompDef() ICompDefContext { 11322 var t antlr.RuleContext 11323 for _, ctx := range s.GetChildren() { 11324 if _, ok := ctx.(ICompDefContext); ok { 11325 t = ctx.(antlr.RuleContext) 11326 break 11327 } 11328 } 11329 11330 if t == nil { 11331 return nil 11332 } 11333 11334 return t.(ICompDefContext) 11335 } 11336 11337 func (s *SingleCompStmtContext) CompilerDirectives() ICompilerDirectivesContext { 11338 var t antlr.RuleContext 11339 for _, ctx := range s.GetChildren() { 11340 if _, ok := ctx.(ICompilerDirectivesContext); ok { 11341 t = ctx.(antlr.RuleContext) 11342 break 11343 } 11344 } 11345 11346 if t == nil { 11347 return nil 11348 } 11349 11350 return t.(ICompilerDirectivesContext) 11351 } 11352 11353 func (s *SingleCompStmtContext) PUB_KW() antlr.TerminalNode { 11354 return s.GetToken(nevaParserPUB_KW, 0) 11355 } 11356 11357 func (s *SingleCompStmtContext) GetRuleContext() antlr.RuleContext { 11358 return s 11359 } 11360 11361 func (s *SingleCompStmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 11362 return antlr.TreesStringTree(s, ruleNames, recog) 11363 } 11364 11365 func (s *SingleCompStmtContext) EnterRule(listener antlr.ParseTreeListener) { 11366 if listenerT, ok := listener.(nevaListener); ok { 11367 listenerT.EnterSingleCompStmt(s) 11368 } 11369 } 11370 11371 func (s *SingleCompStmtContext) ExitRule(listener antlr.ParseTreeListener) { 11372 if listenerT, ok := listener.(nevaListener); ok { 11373 listenerT.ExitSingleCompStmt(s) 11374 } 11375 } 11376 11377 func (p *nevaParser) SingleCompStmt() (localctx ISingleCompStmtContext) { 11378 localctx = NewSingleCompStmtContext(p, p.GetParserRuleContext(), p.GetState()) 11379 p.EnterRule(localctx, 124, nevaParserRULE_singleCompStmt) 11380 var _la int 11381 11382 p.EnterOuterAlt(localctx, 1) 11383 p.SetState(821) 11384 p.GetErrorHandler().Sync(p) 11385 if p.HasError() { 11386 goto errorExit 11387 } 11388 _la = p.GetTokenStream().LA(1) 11389 11390 if _la == nevaParserT__0 { 11391 { 11392 p.SetState(820) 11393 p.CompilerDirectives() 11394 } 11395 11396 } 11397 p.SetState(824) 11398 p.GetErrorHandler().Sync(p) 11399 if p.HasError() { 11400 goto errorExit 11401 } 11402 _la = p.GetTokenStream().LA(1) 11403 11404 if _la == nevaParserPUB_KW { 11405 { 11406 p.SetState(823) 11407 p.Match(nevaParserPUB_KW) 11408 if p.HasError() { 11409 // Recognition error - abort rule 11410 goto errorExit 11411 } 11412 } 11413 11414 } 11415 { 11416 p.SetState(826) 11417 p.Match(nevaParserT__26) 11418 if p.HasError() { 11419 // Recognition error - abort rule 11420 goto errorExit 11421 } 11422 } 11423 { 11424 p.SetState(827) 11425 p.CompDef() 11426 } 11427 11428 errorExit: 11429 if p.HasError() { 11430 v := p.GetError() 11431 localctx.SetException(v) 11432 p.GetErrorHandler().ReportError(p, v) 11433 p.GetErrorHandler().Recover(p, v) 11434 p.SetError(nil) 11435 } 11436 p.ExitRule() 11437 return localctx 11438 goto errorExit // Trick to prevent compiler error if the label is not used 11439 } 11440 11441 // IGroupCompStmtContext is an interface to support dynamic dispatch. 11442 type IGroupCompStmtContext interface { 11443 antlr.ParserRuleContext 11444 11445 // GetParser returns the parser. 11446 GetParser() antlr.Parser 11447 11448 // Getter signatures 11449 AllNEWLINE() []antlr.TerminalNode 11450 NEWLINE(i int) antlr.TerminalNode 11451 AllCompDef() []ICompDefContext 11452 CompDef(i int) ICompDefContext 11453 AllCOMMENT() []antlr.TerminalNode 11454 COMMENT(i int) antlr.TerminalNode 11455 AllCompilerDirectives() []ICompilerDirectivesContext 11456 CompilerDirectives(i int) ICompilerDirectivesContext 11457 AllPUB_KW() []antlr.TerminalNode 11458 PUB_KW(i int) antlr.TerminalNode 11459 11460 // IsGroupCompStmtContext differentiates from other interfaces. 11461 IsGroupCompStmtContext() 11462 } 11463 11464 type GroupCompStmtContext struct { 11465 antlr.BaseParserRuleContext 11466 parser antlr.Parser 11467 } 11468 11469 func NewEmptyGroupCompStmtContext() *GroupCompStmtContext { 11470 var p = new(GroupCompStmtContext) 11471 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 11472 p.RuleIndex = nevaParserRULE_groupCompStmt 11473 return p 11474 } 11475 11476 func InitEmptyGroupCompStmtContext(p *GroupCompStmtContext) { 11477 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 11478 p.RuleIndex = nevaParserRULE_groupCompStmt 11479 } 11480 11481 func (*GroupCompStmtContext) IsGroupCompStmtContext() {} 11482 11483 func NewGroupCompStmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *GroupCompStmtContext { 11484 var p = new(GroupCompStmtContext) 11485 11486 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 11487 11488 p.parser = parser 11489 p.RuleIndex = nevaParserRULE_groupCompStmt 11490 11491 return p 11492 } 11493 11494 func (s *GroupCompStmtContext) GetParser() antlr.Parser { return s.parser } 11495 11496 func (s *GroupCompStmtContext) AllNEWLINE() []antlr.TerminalNode { 11497 return s.GetTokens(nevaParserNEWLINE) 11498 } 11499 11500 func (s *GroupCompStmtContext) NEWLINE(i int) antlr.TerminalNode { 11501 return s.GetToken(nevaParserNEWLINE, i) 11502 } 11503 11504 func (s *GroupCompStmtContext) AllCompDef() []ICompDefContext { 11505 children := s.GetChildren() 11506 len := 0 11507 for _, ctx := range children { 11508 if _, ok := ctx.(ICompDefContext); ok { 11509 len++ 11510 } 11511 } 11512 11513 tst := make([]ICompDefContext, len) 11514 i := 0 11515 for _, ctx := range children { 11516 if t, ok := ctx.(ICompDefContext); ok { 11517 tst[i] = t.(ICompDefContext) 11518 i++ 11519 } 11520 } 11521 11522 return tst 11523 } 11524 11525 func (s *GroupCompStmtContext) CompDef(i int) ICompDefContext { 11526 var t antlr.RuleContext 11527 j := 0 11528 for _, ctx := range s.GetChildren() { 11529 if _, ok := ctx.(ICompDefContext); ok { 11530 if j == i { 11531 t = ctx.(antlr.RuleContext) 11532 break 11533 } 11534 j++ 11535 } 11536 } 11537 11538 if t == nil { 11539 return nil 11540 } 11541 11542 return t.(ICompDefContext) 11543 } 11544 11545 func (s *GroupCompStmtContext) AllCOMMENT() []antlr.TerminalNode { 11546 return s.GetTokens(nevaParserCOMMENT) 11547 } 11548 11549 func (s *GroupCompStmtContext) COMMENT(i int) antlr.TerminalNode { 11550 return s.GetToken(nevaParserCOMMENT, i) 11551 } 11552 11553 func (s *GroupCompStmtContext) AllCompilerDirectives() []ICompilerDirectivesContext { 11554 children := s.GetChildren() 11555 len := 0 11556 for _, ctx := range children { 11557 if _, ok := ctx.(ICompilerDirectivesContext); ok { 11558 len++ 11559 } 11560 } 11561 11562 tst := make([]ICompilerDirectivesContext, len) 11563 i := 0 11564 for _, ctx := range children { 11565 if t, ok := ctx.(ICompilerDirectivesContext); ok { 11566 tst[i] = t.(ICompilerDirectivesContext) 11567 i++ 11568 } 11569 } 11570 11571 return tst 11572 } 11573 11574 func (s *GroupCompStmtContext) CompilerDirectives(i int) ICompilerDirectivesContext { 11575 var t antlr.RuleContext 11576 j := 0 11577 for _, ctx := range s.GetChildren() { 11578 if _, ok := ctx.(ICompilerDirectivesContext); ok { 11579 if j == i { 11580 t = ctx.(antlr.RuleContext) 11581 break 11582 } 11583 j++ 11584 } 11585 } 11586 11587 if t == nil { 11588 return nil 11589 } 11590 11591 return t.(ICompilerDirectivesContext) 11592 } 11593 11594 func (s *GroupCompStmtContext) AllPUB_KW() []antlr.TerminalNode { 11595 return s.GetTokens(nevaParserPUB_KW) 11596 } 11597 11598 func (s *GroupCompStmtContext) PUB_KW(i int) antlr.TerminalNode { 11599 return s.GetToken(nevaParserPUB_KW, i) 11600 } 11601 11602 func (s *GroupCompStmtContext) GetRuleContext() antlr.RuleContext { 11603 return s 11604 } 11605 11606 func (s *GroupCompStmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 11607 return antlr.TreesStringTree(s, ruleNames, recog) 11608 } 11609 11610 func (s *GroupCompStmtContext) EnterRule(listener antlr.ParseTreeListener) { 11611 if listenerT, ok := listener.(nevaListener); ok { 11612 listenerT.EnterGroupCompStmt(s) 11613 } 11614 } 11615 11616 func (s *GroupCompStmtContext) ExitRule(listener antlr.ParseTreeListener) { 11617 if listenerT, ok := listener.(nevaListener); ok { 11618 listenerT.ExitGroupCompStmt(s) 11619 } 11620 } 11621 11622 func (p *nevaParser) GroupCompStmt() (localctx IGroupCompStmtContext) { 11623 localctx = NewGroupCompStmtContext(p, p.GetParserRuleContext(), p.GetState()) 11624 p.EnterRule(localctx, 126, nevaParserRULE_groupCompStmt) 11625 var _la int 11626 11627 p.EnterOuterAlt(localctx, 1) 11628 { 11629 p.SetState(829) 11630 p.Match(nevaParserT__26) 11631 if p.HasError() { 11632 // Recognition error - abort rule 11633 goto errorExit 11634 } 11635 } 11636 p.SetState(833) 11637 p.GetErrorHandler().Sync(p) 11638 if p.HasError() { 11639 goto errorExit 11640 } 11641 _la = p.GetTokenStream().LA(1) 11642 11643 for _la == nevaParserNEWLINE { 11644 { 11645 p.SetState(830) 11646 p.Match(nevaParserNEWLINE) 11647 if p.HasError() { 11648 // Recognition error - abort rule 11649 goto errorExit 11650 } 11651 } 11652 11653 p.SetState(835) 11654 p.GetErrorHandler().Sync(p) 11655 if p.HasError() { 11656 goto errorExit 11657 } 11658 _la = p.GetTokenStream().LA(1) 11659 } 11660 { 11661 p.SetState(836) 11662 p.Match(nevaParserT__5) 11663 if p.HasError() { 11664 // Recognition error - abort rule 11665 goto errorExit 11666 } 11667 } 11668 p.SetState(840) 11669 p.GetErrorHandler().Sync(p) 11670 if p.HasError() { 11671 goto errorExit 11672 } 11673 _la = p.GetTokenStream().LA(1) 11674 11675 for _la == nevaParserNEWLINE { 11676 { 11677 p.SetState(837) 11678 p.Match(nevaParserNEWLINE) 11679 if p.HasError() { 11680 // Recognition error - abort rule 11681 goto errorExit 11682 } 11683 } 11684 11685 p.SetState(842) 11686 p.GetErrorHandler().Sync(p) 11687 if p.HasError() { 11688 goto errorExit 11689 } 11690 _la = p.GetTokenStream().LA(1) 11691 } 11692 p.SetState(864) 11693 p.GetErrorHandler().Sync(p) 11694 if p.HasError() { 11695 goto errorExit 11696 } 11697 _la = p.GetTokenStream().LA(1) 11698 11699 for (int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&120259084290) != 0 { 11700 p.SetState(852) 11701 p.GetErrorHandler().Sync(p) 11702 if p.HasError() { 11703 goto errorExit 11704 } 11705 _la = p.GetTokenStream().LA(1) 11706 11707 for _la == nevaParserCOMMENT { 11708 { 11709 p.SetState(843) 11710 p.Match(nevaParserCOMMENT) 11711 if p.HasError() { 11712 // Recognition error - abort rule 11713 goto errorExit 11714 } 11715 } 11716 p.SetState(847) 11717 p.GetErrorHandler().Sync(p) 11718 if p.HasError() { 11719 goto errorExit 11720 } 11721 _la = p.GetTokenStream().LA(1) 11722 11723 for _la == nevaParserNEWLINE { 11724 { 11725 p.SetState(844) 11726 p.Match(nevaParserNEWLINE) 11727 if p.HasError() { 11728 // Recognition error - abort rule 11729 goto errorExit 11730 } 11731 } 11732 11733 p.SetState(849) 11734 p.GetErrorHandler().Sync(p) 11735 if p.HasError() { 11736 goto errorExit 11737 } 11738 _la = p.GetTokenStream().LA(1) 11739 } 11740 11741 p.SetState(854) 11742 p.GetErrorHandler().Sync(p) 11743 if p.HasError() { 11744 goto errorExit 11745 } 11746 _la = p.GetTokenStream().LA(1) 11747 } 11748 p.SetState(856) 11749 p.GetErrorHandler().Sync(p) 11750 if p.HasError() { 11751 goto errorExit 11752 } 11753 _la = p.GetTokenStream().LA(1) 11754 11755 if _la == nevaParserT__0 { 11756 { 11757 p.SetState(855) 11758 p.CompilerDirectives() 11759 } 11760 11761 } 11762 p.SetState(859) 11763 p.GetErrorHandler().Sync(p) 11764 if p.HasError() { 11765 goto errorExit 11766 } 11767 _la = p.GetTokenStream().LA(1) 11768 11769 if _la == nevaParserPUB_KW { 11770 { 11771 p.SetState(858) 11772 p.Match(nevaParserPUB_KW) 11773 if p.HasError() { 11774 // Recognition error - abort rule 11775 goto errorExit 11776 } 11777 } 11778 11779 } 11780 { 11781 p.SetState(861) 11782 p.CompDef() 11783 } 11784 11785 p.SetState(866) 11786 p.GetErrorHandler().Sync(p) 11787 if p.HasError() { 11788 goto errorExit 11789 } 11790 _la = p.GetTokenStream().LA(1) 11791 } 11792 { 11793 p.SetState(867) 11794 p.Match(nevaParserT__6) 11795 if p.HasError() { 11796 // Recognition error - abort rule 11797 goto errorExit 11798 } 11799 } 11800 11801 errorExit: 11802 if p.HasError() { 11803 v := p.GetError() 11804 localctx.SetException(v) 11805 p.GetErrorHandler().ReportError(p, v) 11806 p.GetErrorHandler().Recover(p, v) 11807 p.SetError(nil) 11808 } 11809 p.ExitRule() 11810 return localctx 11811 goto errorExit // Trick to prevent compiler error if the label is not used 11812 } 11813 11814 // ICompDefContext is an interface to support dynamic dispatch. 11815 type ICompDefContext interface { 11816 antlr.ParserRuleContext 11817 11818 // GetParser returns the parser. 11819 GetParser() antlr.Parser 11820 11821 // Getter signatures 11822 InterfaceDef() IInterfaceDefContext 11823 CompBody() ICompBodyContext 11824 AllNEWLINE() []antlr.TerminalNode 11825 NEWLINE(i int) antlr.TerminalNode 11826 11827 // IsCompDefContext differentiates from other interfaces. 11828 IsCompDefContext() 11829 } 11830 11831 type CompDefContext struct { 11832 antlr.BaseParserRuleContext 11833 parser antlr.Parser 11834 } 11835 11836 func NewEmptyCompDefContext() *CompDefContext { 11837 var p = new(CompDefContext) 11838 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 11839 p.RuleIndex = nevaParserRULE_compDef 11840 return p 11841 } 11842 11843 func InitEmptyCompDefContext(p *CompDefContext) { 11844 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 11845 p.RuleIndex = nevaParserRULE_compDef 11846 } 11847 11848 func (*CompDefContext) IsCompDefContext() {} 11849 11850 func NewCompDefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CompDefContext { 11851 var p = new(CompDefContext) 11852 11853 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 11854 11855 p.parser = parser 11856 p.RuleIndex = nevaParserRULE_compDef 11857 11858 return p 11859 } 11860 11861 func (s *CompDefContext) GetParser() antlr.Parser { return s.parser } 11862 11863 func (s *CompDefContext) InterfaceDef() IInterfaceDefContext { 11864 var t antlr.RuleContext 11865 for _, ctx := range s.GetChildren() { 11866 if _, ok := ctx.(IInterfaceDefContext); ok { 11867 t = ctx.(antlr.RuleContext) 11868 break 11869 } 11870 } 11871 11872 if t == nil { 11873 return nil 11874 } 11875 11876 return t.(IInterfaceDefContext) 11877 } 11878 11879 func (s *CompDefContext) CompBody() ICompBodyContext { 11880 var t antlr.RuleContext 11881 for _, ctx := range s.GetChildren() { 11882 if _, ok := ctx.(ICompBodyContext); ok { 11883 t = ctx.(antlr.RuleContext) 11884 break 11885 } 11886 } 11887 11888 if t == nil { 11889 return nil 11890 } 11891 11892 return t.(ICompBodyContext) 11893 } 11894 11895 func (s *CompDefContext) AllNEWLINE() []antlr.TerminalNode { 11896 return s.GetTokens(nevaParserNEWLINE) 11897 } 11898 11899 func (s *CompDefContext) NEWLINE(i int) antlr.TerminalNode { 11900 return s.GetToken(nevaParserNEWLINE, i) 11901 } 11902 11903 func (s *CompDefContext) GetRuleContext() antlr.RuleContext { 11904 return s 11905 } 11906 11907 func (s *CompDefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 11908 return antlr.TreesStringTree(s, ruleNames, recog) 11909 } 11910 11911 func (s *CompDefContext) EnterRule(listener antlr.ParseTreeListener) { 11912 if listenerT, ok := listener.(nevaListener); ok { 11913 listenerT.EnterCompDef(s) 11914 } 11915 } 11916 11917 func (s *CompDefContext) ExitRule(listener antlr.ParseTreeListener) { 11918 if listenerT, ok := listener.(nevaListener); ok { 11919 listenerT.ExitCompDef(s) 11920 } 11921 } 11922 11923 func (p *nevaParser) CompDef() (localctx ICompDefContext) { 11924 localctx = NewCompDefContext(p, p.GetParserRuleContext(), p.GetState()) 11925 p.EnterRule(localctx, 128, nevaParserRULE_compDef) 11926 var _la int 11927 11928 var _alt int 11929 11930 p.EnterOuterAlt(localctx, 1) 11931 { 11932 p.SetState(869) 11933 p.InterfaceDef() 11934 } 11935 p.SetState(871) 11936 p.GetErrorHandler().Sync(p) 11937 if p.HasError() { 11938 goto errorExit 11939 } 11940 _la = p.GetTokenStream().LA(1) 11941 11942 if _la == nevaParserT__5 { 11943 { 11944 p.SetState(870) 11945 p.CompBody() 11946 } 11947 11948 } 11949 p.SetState(876) 11950 p.GetErrorHandler().Sync(p) 11951 if p.HasError() { 11952 goto errorExit 11953 } 11954 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 112, p.GetParserRuleContext()) 11955 if p.HasError() { 11956 goto errorExit 11957 } 11958 for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { 11959 if _alt == 1 { 11960 { 11961 p.SetState(873) 11962 p.Match(nevaParserNEWLINE) 11963 if p.HasError() { 11964 // Recognition error - abort rule 11965 goto errorExit 11966 } 11967 } 11968 11969 } 11970 p.SetState(878) 11971 p.GetErrorHandler().Sync(p) 11972 if p.HasError() { 11973 goto errorExit 11974 } 11975 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 112, p.GetParserRuleContext()) 11976 if p.HasError() { 11977 goto errorExit 11978 } 11979 } 11980 11981 errorExit: 11982 if p.HasError() { 11983 v := p.GetError() 11984 localctx.SetException(v) 11985 p.GetErrorHandler().ReportError(p, v) 11986 p.GetErrorHandler().Recover(p, v) 11987 p.SetError(nil) 11988 } 11989 p.ExitRule() 11990 return localctx 11991 goto errorExit // Trick to prevent compiler error if the label is not used 11992 } 11993 11994 // ICompBodyContext is an interface to support dynamic dispatch. 11995 type ICompBodyContext interface { 11996 antlr.ParserRuleContext 11997 11998 // GetParser returns the parser. 11999 GetParser() antlr.Parser 12000 12001 // Getter signatures 12002 AllNEWLINE() []antlr.TerminalNode 12003 NEWLINE(i int) antlr.TerminalNode 12004 AllCOMMENT() []antlr.TerminalNode 12005 COMMENT(i int) antlr.TerminalNode 12006 CompNodesDef() ICompNodesDefContext 12007 ConnDefList() IConnDefListContext 12008 12009 // IsCompBodyContext differentiates from other interfaces. 12010 IsCompBodyContext() 12011 } 12012 12013 type CompBodyContext struct { 12014 antlr.BaseParserRuleContext 12015 parser antlr.Parser 12016 } 12017 12018 func NewEmptyCompBodyContext() *CompBodyContext { 12019 var p = new(CompBodyContext) 12020 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 12021 p.RuleIndex = nevaParserRULE_compBody 12022 return p 12023 } 12024 12025 func InitEmptyCompBodyContext(p *CompBodyContext) { 12026 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 12027 p.RuleIndex = nevaParserRULE_compBody 12028 } 12029 12030 func (*CompBodyContext) IsCompBodyContext() {} 12031 12032 func NewCompBodyContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CompBodyContext { 12033 var p = new(CompBodyContext) 12034 12035 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 12036 12037 p.parser = parser 12038 p.RuleIndex = nevaParserRULE_compBody 12039 12040 return p 12041 } 12042 12043 func (s *CompBodyContext) GetParser() antlr.Parser { return s.parser } 12044 12045 func (s *CompBodyContext) AllNEWLINE() []antlr.TerminalNode { 12046 return s.GetTokens(nevaParserNEWLINE) 12047 } 12048 12049 func (s *CompBodyContext) NEWLINE(i int) antlr.TerminalNode { 12050 return s.GetToken(nevaParserNEWLINE, i) 12051 } 12052 12053 func (s *CompBodyContext) AllCOMMENT() []antlr.TerminalNode { 12054 return s.GetTokens(nevaParserCOMMENT) 12055 } 12056 12057 func (s *CompBodyContext) COMMENT(i int) antlr.TerminalNode { 12058 return s.GetToken(nevaParserCOMMENT, i) 12059 } 12060 12061 func (s *CompBodyContext) CompNodesDef() ICompNodesDefContext { 12062 var t antlr.RuleContext 12063 for _, ctx := range s.GetChildren() { 12064 if _, ok := ctx.(ICompNodesDefContext); ok { 12065 t = ctx.(antlr.RuleContext) 12066 break 12067 } 12068 } 12069 12070 if t == nil { 12071 return nil 12072 } 12073 12074 return t.(ICompNodesDefContext) 12075 } 12076 12077 func (s *CompBodyContext) ConnDefList() IConnDefListContext { 12078 var t antlr.RuleContext 12079 for _, ctx := range s.GetChildren() { 12080 if _, ok := ctx.(IConnDefListContext); ok { 12081 t = ctx.(antlr.RuleContext) 12082 break 12083 } 12084 } 12085 12086 if t == nil { 12087 return nil 12088 } 12089 12090 return t.(IConnDefListContext) 12091 } 12092 12093 func (s *CompBodyContext) GetRuleContext() antlr.RuleContext { 12094 return s 12095 } 12096 12097 func (s *CompBodyContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 12098 return antlr.TreesStringTree(s, ruleNames, recog) 12099 } 12100 12101 func (s *CompBodyContext) EnterRule(listener antlr.ParseTreeListener) { 12102 if listenerT, ok := listener.(nevaListener); ok { 12103 listenerT.EnterCompBody(s) 12104 } 12105 } 12106 12107 func (s *CompBodyContext) ExitRule(listener antlr.ParseTreeListener) { 12108 if listenerT, ok := listener.(nevaListener); ok { 12109 listenerT.ExitCompBody(s) 12110 } 12111 } 12112 12113 func (p *nevaParser) CompBody() (localctx ICompBodyContext) { 12114 localctx = NewCompBodyContext(p, p.GetParserRuleContext(), p.GetState()) 12115 p.EnterRule(localctx, 130, nevaParserRULE_compBody) 12116 var _la int 12117 12118 var _alt int 12119 12120 p.EnterOuterAlt(localctx, 1) 12121 { 12122 p.SetState(879) 12123 p.Match(nevaParserT__5) 12124 if p.HasError() { 12125 // Recognition error - abort rule 12126 goto errorExit 12127 } 12128 } 12129 p.SetState(883) 12130 p.GetErrorHandler().Sync(p) 12131 if p.HasError() { 12132 goto errorExit 12133 } 12134 _la = p.GetTokenStream().LA(1) 12135 12136 for _la == nevaParserNEWLINE { 12137 { 12138 p.SetState(880) 12139 p.Match(nevaParserNEWLINE) 12140 if p.HasError() { 12141 // Recognition error - abort rule 12142 goto errorExit 12143 } 12144 } 12145 12146 p.SetState(885) 12147 p.GetErrorHandler().Sync(p) 12148 if p.HasError() { 12149 goto errorExit 12150 } 12151 _la = p.GetTokenStream().LA(1) 12152 } 12153 p.SetState(895) 12154 p.GetErrorHandler().Sync(p) 12155 if p.HasError() { 12156 goto errorExit 12157 } 12158 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 115, p.GetParserRuleContext()) 12159 if p.HasError() { 12160 goto errorExit 12161 } 12162 for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { 12163 if _alt == 1 { 12164 { 12165 p.SetState(886) 12166 p.Match(nevaParserCOMMENT) 12167 if p.HasError() { 12168 // Recognition error - abort rule 12169 goto errorExit 12170 } 12171 } 12172 p.SetState(890) 12173 p.GetErrorHandler().Sync(p) 12174 if p.HasError() { 12175 goto errorExit 12176 } 12177 _la = p.GetTokenStream().LA(1) 12178 12179 for _la == nevaParserNEWLINE { 12180 { 12181 p.SetState(887) 12182 p.Match(nevaParserNEWLINE) 12183 if p.HasError() { 12184 // Recognition error - abort rule 12185 goto errorExit 12186 } 12187 } 12188 12189 p.SetState(892) 12190 p.GetErrorHandler().Sync(p) 12191 if p.HasError() { 12192 goto errorExit 12193 } 12194 _la = p.GetTokenStream().LA(1) 12195 } 12196 12197 } 12198 p.SetState(897) 12199 p.GetErrorHandler().Sync(p) 12200 if p.HasError() { 12201 goto errorExit 12202 } 12203 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 115, p.GetParserRuleContext()) 12204 if p.HasError() { 12205 goto errorExit 12206 } 12207 } 12208 p.SetState(905) 12209 p.GetErrorHandler().Sync(p) 12210 if p.HasError() { 12211 goto errorExit 12212 } 12213 _la = p.GetTokenStream().LA(1) 12214 12215 if _la == nevaParserT__27 { 12216 { 12217 p.SetState(898) 12218 p.CompNodesDef() 12219 } 12220 p.SetState(902) 12221 p.GetErrorHandler().Sync(p) 12222 if p.HasError() { 12223 goto errorExit 12224 } 12225 _la = p.GetTokenStream().LA(1) 12226 12227 for _la == nevaParserNEWLINE { 12228 { 12229 p.SetState(899) 12230 p.Match(nevaParserNEWLINE) 12231 if p.HasError() { 12232 // Recognition error - abort rule 12233 goto errorExit 12234 } 12235 } 12236 12237 p.SetState(904) 12238 p.GetErrorHandler().Sync(p) 12239 if p.HasError() { 12240 goto errorExit 12241 } 12242 _la = p.GetTokenStream().LA(1) 12243 } 12244 12245 } 12246 p.SetState(916) 12247 p.GetErrorHandler().Sync(p) 12248 if p.HasError() { 12249 goto errorExit 12250 } 12251 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 119, p.GetParserRuleContext()) 12252 if p.HasError() { 12253 goto errorExit 12254 } 12255 for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { 12256 if _alt == 1 { 12257 { 12258 p.SetState(907) 12259 p.Match(nevaParserCOMMENT) 12260 if p.HasError() { 12261 // Recognition error - abort rule 12262 goto errorExit 12263 } 12264 } 12265 p.SetState(911) 12266 p.GetErrorHandler().Sync(p) 12267 if p.HasError() { 12268 goto errorExit 12269 } 12270 _la = p.GetTokenStream().LA(1) 12271 12272 for _la == nevaParserNEWLINE { 12273 { 12274 p.SetState(908) 12275 p.Match(nevaParserNEWLINE) 12276 if p.HasError() { 12277 // Recognition error - abort rule 12278 goto errorExit 12279 } 12280 } 12281 12282 p.SetState(913) 12283 p.GetErrorHandler().Sync(p) 12284 if p.HasError() { 12285 goto errorExit 12286 } 12287 _la = p.GetTokenStream().LA(1) 12288 } 12289 12290 } 12291 p.SetState(918) 12292 p.GetErrorHandler().Sync(p) 12293 if p.HasError() { 12294 goto errorExit 12295 } 12296 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 119, p.GetParserRuleContext()) 12297 if p.HasError() { 12298 goto errorExit 12299 } 12300 } 12301 p.SetState(926) 12302 p.GetErrorHandler().Sync(p) 12303 12304 if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 121, p.GetParserRuleContext()) == 1 { 12305 { 12306 p.SetState(919) 12307 p.ConnDefList() 12308 } 12309 p.SetState(923) 12310 p.GetErrorHandler().Sync(p) 12311 if p.HasError() { 12312 goto errorExit 12313 } 12314 _la = p.GetTokenStream().LA(1) 12315 12316 for _la == nevaParserNEWLINE { 12317 { 12318 p.SetState(920) 12319 p.Match(nevaParserNEWLINE) 12320 if p.HasError() { 12321 // Recognition error - abort rule 12322 goto errorExit 12323 } 12324 } 12325 12326 p.SetState(925) 12327 p.GetErrorHandler().Sync(p) 12328 if p.HasError() { 12329 goto errorExit 12330 } 12331 _la = p.GetTokenStream().LA(1) 12332 } 12333 12334 } else if p.HasError() { // JIM 12335 goto errorExit 12336 } 12337 p.SetState(937) 12338 p.GetErrorHandler().Sync(p) 12339 if p.HasError() { 12340 goto errorExit 12341 } 12342 _la = p.GetTokenStream().LA(1) 12343 12344 for _la == nevaParserCOMMENT { 12345 { 12346 p.SetState(928) 12347 p.Match(nevaParserCOMMENT) 12348 if p.HasError() { 12349 // Recognition error - abort rule 12350 goto errorExit 12351 } 12352 } 12353 p.SetState(932) 12354 p.GetErrorHandler().Sync(p) 12355 if p.HasError() { 12356 goto errorExit 12357 } 12358 _la = p.GetTokenStream().LA(1) 12359 12360 for _la == nevaParserNEWLINE { 12361 { 12362 p.SetState(929) 12363 p.Match(nevaParserNEWLINE) 12364 if p.HasError() { 12365 // Recognition error - abort rule 12366 goto errorExit 12367 } 12368 } 12369 12370 p.SetState(934) 12371 p.GetErrorHandler().Sync(p) 12372 if p.HasError() { 12373 goto errorExit 12374 } 12375 _la = p.GetTokenStream().LA(1) 12376 } 12377 12378 p.SetState(939) 12379 p.GetErrorHandler().Sync(p) 12380 if p.HasError() { 12381 goto errorExit 12382 } 12383 _la = p.GetTokenStream().LA(1) 12384 } 12385 { 12386 p.SetState(940) 12387 p.Match(nevaParserT__6) 12388 if p.HasError() { 12389 // Recognition error - abort rule 12390 goto errorExit 12391 } 12392 } 12393 12394 errorExit: 12395 if p.HasError() { 12396 v := p.GetError() 12397 localctx.SetException(v) 12398 p.GetErrorHandler().ReportError(p, v) 12399 p.GetErrorHandler().Recover(p, v) 12400 p.SetError(nil) 12401 } 12402 p.ExitRule() 12403 return localctx 12404 goto errorExit // Trick to prevent compiler error if the label is not used 12405 } 12406 12407 // ICompNodesDefContext is an interface to support dynamic dispatch. 12408 type ICompNodesDefContext interface { 12409 antlr.ParserRuleContext 12410 12411 // GetParser returns the parser. 12412 GetParser() antlr.Parser 12413 12414 // Getter signatures 12415 CompNodesDefBody() ICompNodesDefBodyContext 12416 AllNEWLINE() []antlr.TerminalNode 12417 NEWLINE(i int) antlr.TerminalNode 12418 12419 // IsCompNodesDefContext differentiates from other interfaces. 12420 IsCompNodesDefContext() 12421 } 12422 12423 type CompNodesDefContext struct { 12424 antlr.BaseParserRuleContext 12425 parser antlr.Parser 12426 } 12427 12428 func NewEmptyCompNodesDefContext() *CompNodesDefContext { 12429 var p = new(CompNodesDefContext) 12430 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 12431 p.RuleIndex = nevaParserRULE_compNodesDef 12432 return p 12433 } 12434 12435 func InitEmptyCompNodesDefContext(p *CompNodesDefContext) { 12436 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 12437 p.RuleIndex = nevaParserRULE_compNodesDef 12438 } 12439 12440 func (*CompNodesDefContext) IsCompNodesDefContext() {} 12441 12442 func NewCompNodesDefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CompNodesDefContext { 12443 var p = new(CompNodesDefContext) 12444 12445 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 12446 12447 p.parser = parser 12448 p.RuleIndex = nevaParserRULE_compNodesDef 12449 12450 return p 12451 } 12452 12453 func (s *CompNodesDefContext) GetParser() antlr.Parser { return s.parser } 12454 12455 func (s *CompNodesDefContext) CompNodesDefBody() ICompNodesDefBodyContext { 12456 var t antlr.RuleContext 12457 for _, ctx := range s.GetChildren() { 12458 if _, ok := ctx.(ICompNodesDefBodyContext); ok { 12459 t = ctx.(antlr.RuleContext) 12460 break 12461 } 12462 } 12463 12464 if t == nil { 12465 return nil 12466 } 12467 12468 return t.(ICompNodesDefBodyContext) 12469 } 12470 12471 func (s *CompNodesDefContext) AllNEWLINE() []antlr.TerminalNode { 12472 return s.GetTokens(nevaParserNEWLINE) 12473 } 12474 12475 func (s *CompNodesDefContext) NEWLINE(i int) antlr.TerminalNode { 12476 return s.GetToken(nevaParserNEWLINE, i) 12477 } 12478 12479 func (s *CompNodesDefContext) GetRuleContext() antlr.RuleContext { 12480 return s 12481 } 12482 12483 func (s *CompNodesDefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 12484 return antlr.TreesStringTree(s, ruleNames, recog) 12485 } 12486 12487 func (s *CompNodesDefContext) EnterRule(listener antlr.ParseTreeListener) { 12488 if listenerT, ok := listener.(nevaListener); ok { 12489 listenerT.EnterCompNodesDef(s) 12490 } 12491 } 12492 12493 func (s *CompNodesDefContext) ExitRule(listener antlr.ParseTreeListener) { 12494 if listenerT, ok := listener.(nevaListener); ok { 12495 listenerT.ExitCompNodesDef(s) 12496 } 12497 } 12498 12499 func (p *nevaParser) CompNodesDef() (localctx ICompNodesDefContext) { 12500 localctx = NewCompNodesDefContext(p, p.GetParserRuleContext(), p.GetState()) 12501 p.EnterRule(localctx, 132, nevaParserRULE_compNodesDef) 12502 var _la int 12503 12504 p.EnterOuterAlt(localctx, 1) 12505 { 12506 p.SetState(942) 12507 p.Match(nevaParserT__27) 12508 if p.HasError() { 12509 // Recognition error - abort rule 12510 goto errorExit 12511 } 12512 } 12513 p.SetState(946) 12514 p.GetErrorHandler().Sync(p) 12515 if p.HasError() { 12516 goto errorExit 12517 } 12518 _la = p.GetTokenStream().LA(1) 12519 12520 for _la == nevaParserNEWLINE { 12521 { 12522 p.SetState(943) 12523 p.Match(nevaParserNEWLINE) 12524 if p.HasError() { 12525 // Recognition error - abort rule 12526 goto errorExit 12527 } 12528 } 12529 12530 p.SetState(948) 12531 p.GetErrorHandler().Sync(p) 12532 if p.HasError() { 12533 goto errorExit 12534 } 12535 _la = p.GetTokenStream().LA(1) 12536 } 12537 { 12538 p.SetState(949) 12539 p.CompNodesDefBody() 12540 } 12541 12542 errorExit: 12543 if p.HasError() { 12544 v := p.GetError() 12545 localctx.SetException(v) 12546 p.GetErrorHandler().ReportError(p, v) 12547 p.GetErrorHandler().Recover(p, v) 12548 p.SetError(nil) 12549 } 12550 p.ExitRule() 12551 return localctx 12552 goto errorExit // Trick to prevent compiler error if the label is not used 12553 } 12554 12555 // ICompNodesDefBodyContext is an interface to support dynamic dispatch. 12556 type ICompNodesDefBodyContext interface { 12557 antlr.ParserRuleContext 12558 12559 // GetParser returns the parser. 12560 GetParser() antlr.Parser 12561 12562 // Getter signatures 12563 AllNEWLINE() []antlr.TerminalNode 12564 NEWLINE(i int) antlr.TerminalNode 12565 AllCompNodeDef() []ICompNodeDefContext 12566 CompNodeDef(i int) ICompNodeDefContext 12567 AllCOMMENT() []antlr.TerminalNode 12568 COMMENT(i int) antlr.TerminalNode 12569 12570 // IsCompNodesDefBodyContext differentiates from other interfaces. 12571 IsCompNodesDefBodyContext() 12572 } 12573 12574 type CompNodesDefBodyContext struct { 12575 antlr.BaseParserRuleContext 12576 parser antlr.Parser 12577 } 12578 12579 func NewEmptyCompNodesDefBodyContext() *CompNodesDefBodyContext { 12580 var p = new(CompNodesDefBodyContext) 12581 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 12582 p.RuleIndex = nevaParserRULE_compNodesDefBody 12583 return p 12584 } 12585 12586 func InitEmptyCompNodesDefBodyContext(p *CompNodesDefBodyContext) { 12587 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 12588 p.RuleIndex = nevaParserRULE_compNodesDefBody 12589 } 12590 12591 func (*CompNodesDefBodyContext) IsCompNodesDefBodyContext() {} 12592 12593 func NewCompNodesDefBodyContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CompNodesDefBodyContext { 12594 var p = new(CompNodesDefBodyContext) 12595 12596 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 12597 12598 p.parser = parser 12599 p.RuleIndex = nevaParserRULE_compNodesDefBody 12600 12601 return p 12602 } 12603 12604 func (s *CompNodesDefBodyContext) GetParser() antlr.Parser { return s.parser } 12605 12606 func (s *CompNodesDefBodyContext) AllNEWLINE() []antlr.TerminalNode { 12607 return s.GetTokens(nevaParserNEWLINE) 12608 } 12609 12610 func (s *CompNodesDefBodyContext) NEWLINE(i int) antlr.TerminalNode { 12611 return s.GetToken(nevaParserNEWLINE, i) 12612 } 12613 12614 func (s *CompNodesDefBodyContext) AllCompNodeDef() []ICompNodeDefContext { 12615 children := s.GetChildren() 12616 len := 0 12617 for _, ctx := range children { 12618 if _, ok := ctx.(ICompNodeDefContext); ok { 12619 len++ 12620 } 12621 } 12622 12623 tst := make([]ICompNodeDefContext, len) 12624 i := 0 12625 for _, ctx := range children { 12626 if t, ok := ctx.(ICompNodeDefContext); ok { 12627 tst[i] = t.(ICompNodeDefContext) 12628 i++ 12629 } 12630 } 12631 12632 return tst 12633 } 12634 12635 func (s *CompNodesDefBodyContext) CompNodeDef(i int) ICompNodeDefContext { 12636 var t antlr.RuleContext 12637 j := 0 12638 for _, ctx := range s.GetChildren() { 12639 if _, ok := ctx.(ICompNodeDefContext); ok { 12640 if j == i { 12641 t = ctx.(antlr.RuleContext) 12642 break 12643 } 12644 j++ 12645 } 12646 } 12647 12648 if t == nil { 12649 return nil 12650 } 12651 12652 return t.(ICompNodeDefContext) 12653 } 12654 12655 func (s *CompNodesDefBodyContext) AllCOMMENT() []antlr.TerminalNode { 12656 return s.GetTokens(nevaParserCOMMENT) 12657 } 12658 12659 func (s *CompNodesDefBodyContext) COMMENT(i int) antlr.TerminalNode { 12660 return s.GetToken(nevaParserCOMMENT, i) 12661 } 12662 12663 func (s *CompNodesDefBodyContext) GetRuleContext() antlr.RuleContext { 12664 return s 12665 } 12666 12667 func (s *CompNodesDefBodyContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 12668 return antlr.TreesStringTree(s, ruleNames, recog) 12669 } 12670 12671 func (s *CompNodesDefBodyContext) EnterRule(listener antlr.ParseTreeListener) { 12672 if listenerT, ok := listener.(nevaListener); ok { 12673 listenerT.EnterCompNodesDefBody(s) 12674 } 12675 } 12676 12677 func (s *CompNodesDefBodyContext) ExitRule(listener antlr.ParseTreeListener) { 12678 if listenerT, ok := listener.(nevaListener); ok { 12679 listenerT.ExitCompNodesDefBody(s) 12680 } 12681 } 12682 12683 func (p *nevaParser) CompNodesDefBody() (localctx ICompNodesDefBodyContext) { 12684 localctx = NewCompNodesDefBodyContext(p, p.GetParserRuleContext(), p.GetState()) 12685 p.EnterRule(localctx, 134, nevaParserRULE_compNodesDefBody) 12686 var _la int 12687 12688 p.EnterOuterAlt(localctx, 1) 12689 { 12690 p.SetState(951) 12691 p.Match(nevaParserT__5) 12692 if p.HasError() { 12693 // Recognition error - abort rule 12694 goto errorExit 12695 } 12696 } 12697 p.SetState(955) 12698 p.GetErrorHandler().Sync(p) 12699 if p.HasError() { 12700 goto errorExit 12701 } 12702 _la = p.GetTokenStream().LA(1) 12703 12704 for _la == nevaParserNEWLINE { 12705 { 12706 p.SetState(952) 12707 p.Match(nevaParserNEWLINE) 12708 if p.HasError() { 12709 // Recognition error - abort rule 12710 goto errorExit 12711 } 12712 } 12713 12714 p.SetState(957) 12715 p.GetErrorHandler().Sync(p) 12716 if p.HasError() { 12717 goto errorExit 12718 } 12719 _la = p.GetTokenStream().LA(1) 12720 } 12721 p.SetState(973) 12722 p.GetErrorHandler().Sync(p) 12723 if p.HasError() { 12724 goto errorExit 12725 } 12726 _la = p.GetTokenStream().LA(1) 12727 12728 for (int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&85899345922) != 0 { 12729 p.SetState(960) 12730 p.GetErrorHandler().Sync(p) 12731 if p.HasError() { 12732 goto errorExit 12733 } 12734 12735 switch p.GetTokenStream().LA(1) { 12736 case nevaParserT__0, nevaParserIDENTIFIER: 12737 { 12738 p.SetState(958) 12739 p.CompNodeDef() 12740 } 12741 12742 case nevaParserCOMMENT: 12743 { 12744 p.SetState(959) 12745 p.Match(nevaParserCOMMENT) 12746 if p.HasError() { 12747 // Recognition error - abort rule 12748 goto errorExit 12749 } 12750 } 12751 12752 default: 12753 p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) 12754 goto errorExit 12755 } 12756 p.SetState(963) 12757 p.GetErrorHandler().Sync(p) 12758 if p.HasError() { 12759 goto errorExit 12760 } 12761 _la = p.GetTokenStream().LA(1) 12762 12763 if _la == nevaParserT__2 { 12764 { 12765 p.SetState(962) 12766 p.Match(nevaParserT__2) 12767 if p.HasError() { 12768 // Recognition error - abort rule 12769 goto errorExit 12770 } 12771 } 12772 12773 } 12774 p.SetState(968) 12775 p.GetErrorHandler().Sync(p) 12776 if p.HasError() { 12777 goto errorExit 12778 } 12779 _la = p.GetTokenStream().LA(1) 12780 12781 for _la == nevaParserNEWLINE { 12782 { 12783 p.SetState(965) 12784 p.Match(nevaParserNEWLINE) 12785 if p.HasError() { 12786 // Recognition error - abort rule 12787 goto errorExit 12788 } 12789 } 12790 12791 p.SetState(970) 12792 p.GetErrorHandler().Sync(p) 12793 if p.HasError() { 12794 goto errorExit 12795 } 12796 _la = p.GetTokenStream().LA(1) 12797 } 12798 12799 p.SetState(975) 12800 p.GetErrorHandler().Sync(p) 12801 if p.HasError() { 12802 goto errorExit 12803 } 12804 _la = p.GetTokenStream().LA(1) 12805 } 12806 { 12807 p.SetState(976) 12808 p.Match(nevaParserT__6) 12809 if p.HasError() { 12810 // Recognition error - abort rule 12811 goto errorExit 12812 } 12813 } 12814 12815 errorExit: 12816 if p.HasError() { 12817 v := p.GetError() 12818 localctx.SetException(v) 12819 p.GetErrorHandler().ReportError(p, v) 12820 p.GetErrorHandler().Recover(p, v) 12821 p.SetError(nil) 12822 } 12823 p.ExitRule() 12824 return localctx 12825 goto errorExit // Trick to prevent compiler error if the label is not used 12826 } 12827 12828 // ICompNodeDefContext is an interface to support dynamic dispatch. 12829 type ICompNodeDefContext interface { 12830 antlr.ParserRuleContext 12831 12832 // GetParser returns the parser. 12833 GetParser() antlr.Parser 12834 12835 // Getter signatures 12836 NodeInst() INodeInstContext 12837 CompilerDirectives() ICompilerDirectivesContext 12838 IDENTIFIER() antlr.TerminalNode 12839 12840 // IsCompNodeDefContext differentiates from other interfaces. 12841 IsCompNodeDefContext() 12842 } 12843 12844 type CompNodeDefContext struct { 12845 antlr.BaseParserRuleContext 12846 parser antlr.Parser 12847 } 12848 12849 func NewEmptyCompNodeDefContext() *CompNodeDefContext { 12850 var p = new(CompNodeDefContext) 12851 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 12852 p.RuleIndex = nevaParserRULE_compNodeDef 12853 return p 12854 } 12855 12856 func InitEmptyCompNodeDefContext(p *CompNodeDefContext) { 12857 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 12858 p.RuleIndex = nevaParserRULE_compNodeDef 12859 } 12860 12861 func (*CompNodeDefContext) IsCompNodeDefContext() {} 12862 12863 func NewCompNodeDefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CompNodeDefContext { 12864 var p = new(CompNodeDefContext) 12865 12866 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 12867 12868 p.parser = parser 12869 p.RuleIndex = nevaParserRULE_compNodeDef 12870 12871 return p 12872 } 12873 12874 func (s *CompNodeDefContext) GetParser() antlr.Parser { return s.parser } 12875 12876 func (s *CompNodeDefContext) NodeInst() INodeInstContext { 12877 var t antlr.RuleContext 12878 for _, ctx := range s.GetChildren() { 12879 if _, ok := ctx.(INodeInstContext); ok { 12880 t = ctx.(antlr.RuleContext) 12881 break 12882 } 12883 } 12884 12885 if t == nil { 12886 return nil 12887 } 12888 12889 return t.(INodeInstContext) 12890 } 12891 12892 func (s *CompNodeDefContext) CompilerDirectives() ICompilerDirectivesContext { 12893 var t antlr.RuleContext 12894 for _, ctx := range s.GetChildren() { 12895 if _, ok := ctx.(ICompilerDirectivesContext); ok { 12896 t = ctx.(antlr.RuleContext) 12897 break 12898 } 12899 } 12900 12901 if t == nil { 12902 return nil 12903 } 12904 12905 return t.(ICompilerDirectivesContext) 12906 } 12907 12908 func (s *CompNodeDefContext) IDENTIFIER() antlr.TerminalNode { 12909 return s.GetToken(nevaParserIDENTIFIER, 0) 12910 } 12911 12912 func (s *CompNodeDefContext) GetRuleContext() antlr.RuleContext { 12913 return s 12914 } 12915 12916 func (s *CompNodeDefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 12917 return antlr.TreesStringTree(s, ruleNames, recog) 12918 } 12919 12920 func (s *CompNodeDefContext) EnterRule(listener antlr.ParseTreeListener) { 12921 if listenerT, ok := listener.(nevaListener); ok { 12922 listenerT.EnterCompNodeDef(s) 12923 } 12924 } 12925 12926 func (s *CompNodeDefContext) ExitRule(listener antlr.ParseTreeListener) { 12927 if listenerT, ok := listener.(nevaListener); ok { 12928 listenerT.ExitCompNodeDef(s) 12929 } 12930 } 12931 12932 func (p *nevaParser) CompNodeDef() (localctx ICompNodeDefContext) { 12933 localctx = NewCompNodeDefContext(p, p.GetParserRuleContext(), p.GetState()) 12934 p.EnterRule(localctx, 136, nevaParserRULE_compNodeDef) 12935 var _la int 12936 12937 p.EnterOuterAlt(localctx, 1) 12938 p.SetState(979) 12939 p.GetErrorHandler().Sync(p) 12940 if p.HasError() { 12941 goto errorExit 12942 } 12943 _la = p.GetTokenStream().LA(1) 12944 12945 if _la == nevaParserT__0 { 12946 { 12947 p.SetState(978) 12948 p.CompilerDirectives() 12949 } 12950 12951 } 12952 p.SetState(982) 12953 p.GetErrorHandler().Sync(p) 12954 12955 if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 131, p.GetParserRuleContext()) == 1 { 12956 { 12957 p.SetState(981) 12958 p.Match(nevaParserIDENTIFIER) 12959 if p.HasError() { 12960 // Recognition error - abort rule 12961 goto errorExit 12962 } 12963 } 12964 12965 } else if p.HasError() { // JIM 12966 goto errorExit 12967 } 12968 { 12969 p.SetState(984) 12970 p.NodeInst() 12971 } 12972 12973 errorExit: 12974 if p.HasError() { 12975 v := p.GetError() 12976 localctx.SetException(v) 12977 p.GetErrorHandler().ReportError(p, v) 12978 p.GetErrorHandler().Recover(p, v) 12979 p.SetError(nil) 12980 } 12981 p.ExitRule() 12982 return localctx 12983 goto errorExit // Trick to prevent compiler error if the label is not used 12984 } 12985 12986 // INodeInstContext is an interface to support dynamic dispatch. 12987 type INodeInstContext interface { 12988 antlr.ParserRuleContext 12989 12990 // GetParser returns the parser. 12991 GetParser() antlr.Parser 12992 12993 // Getter signatures 12994 EntityRef() IEntityRefContext 12995 AllNEWLINE() []antlr.TerminalNode 12996 NEWLINE(i int) antlr.TerminalNode 12997 TypeArgs() ITypeArgsContext 12998 ErrGuard() IErrGuardContext 12999 NodeDIArgs() INodeDIArgsContext 13000 13001 // IsNodeInstContext differentiates from other interfaces. 13002 IsNodeInstContext() 13003 } 13004 13005 type NodeInstContext struct { 13006 antlr.BaseParserRuleContext 13007 parser antlr.Parser 13008 } 13009 13010 func NewEmptyNodeInstContext() *NodeInstContext { 13011 var p = new(NodeInstContext) 13012 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 13013 p.RuleIndex = nevaParserRULE_nodeInst 13014 return p 13015 } 13016 13017 func InitEmptyNodeInstContext(p *NodeInstContext) { 13018 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 13019 p.RuleIndex = nevaParserRULE_nodeInst 13020 } 13021 13022 func (*NodeInstContext) IsNodeInstContext() {} 13023 13024 func NewNodeInstContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NodeInstContext { 13025 var p = new(NodeInstContext) 13026 13027 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 13028 13029 p.parser = parser 13030 p.RuleIndex = nevaParserRULE_nodeInst 13031 13032 return p 13033 } 13034 13035 func (s *NodeInstContext) GetParser() antlr.Parser { return s.parser } 13036 13037 func (s *NodeInstContext) EntityRef() IEntityRefContext { 13038 var t antlr.RuleContext 13039 for _, ctx := range s.GetChildren() { 13040 if _, ok := ctx.(IEntityRefContext); ok { 13041 t = ctx.(antlr.RuleContext) 13042 break 13043 } 13044 } 13045 13046 if t == nil { 13047 return nil 13048 } 13049 13050 return t.(IEntityRefContext) 13051 } 13052 13053 func (s *NodeInstContext) AllNEWLINE() []antlr.TerminalNode { 13054 return s.GetTokens(nevaParserNEWLINE) 13055 } 13056 13057 func (s *NodeInstContext) NEWLINE(i int) antlr.TerminalNode { 13058 return s.GetToken(nevaParserNEWLINE, i) 13059 } 13060 13061 func (s *NodeInstContext) TypeArgs() ITypeArgsContext { 13062 var t antlr.RuleContext 13063 for _, ctx := range s.GetChildren() { 13064 if _, ok := ctx.(ITypeArgsContext); ok { 13065 t = ctx.(antlr.RuleContext) 13066 break 13067 } 13068 } 13069 13070 if t == nil { 13071 return nil 13072 } 13073 13074 return t.(ITypeArgsContext) 13075 } 13076 13077 func (s *NodeInstContext) ErrGuard() IErrGuardContext { 13078 var t antlr.RuleContext 13079 for _, ctx := range s.GetChildren() { 13080 if _, ok := ctx.(IErrGuardContext); ok { 13081 t = ctx.(antlr.RuleContext) 13082 break 13083 } 13084 } 13085 13086 if t == nil { 13087 return nil 13088 } 13089 13090 return t.(IErrGuardContext) 13091 } 13092 13093 func (s *NodeInstContext) NodeDIArgs() INodeDIArgsContext { 13094 var t antlr.RuleContext 13095 for _, ctx := range s.GetChildren() { 13096 if _, ok := ctx.(INodeDIArgsContext); ok { 13097 t = ctx.(antlr.RuleContext) 13098 break 13099 } 13100 } 13101 13102 if t == nil { 13103 return nil 13104 } 13105 13106 return t.(INodeDIArgsContext) 13107 } 13108 13109 func (s *NodeInstContext) GetRuleContext() antlr.RuleContext { 13110 return s 13111 } 13112 13113 func (s *NodeInstContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 13114 return antlr.TreesStringTree(s, ruleNames, recog) 13115 } 13116 13117 func (s *NodeInstContext) EnterRule(listener antlr.ParseTreeListener) { 13118 if listenerT, ok := listener.(nevaListener); ok { 13119 listenerT.EnterNodeInst(s) 13120 } 13121 } 13122 13123 func (s *NodeInstContext) ExitRule(listener antlr.ParseTreeListener) { 13124 if listenerT, ok := listener.(nevaListener); ok { 13125 listenerT.ExitNodeInst(s) 13126 } 13127 } 13128 13129 func (p *nevaParser) NodeInst() (localctx INodeInstContext) { 13130 localctx = NewNodeInstContext(p, p.GetParserRuleContext(), p.GetState()) 13131 p.EnterRule(localctx, 138, nevaParserRULE_nodeInst) 13132 var _la int 13133 13134 var _alt int 13135 13136 p.EnterOuterAlt(localctx, 1) 13137 { 13138 p.SetState(986) 13139 p.EntityRef() 13140 } 13141 p.SetState(990) 13142 p.GetErrorHandler().Sync(p) 13143 if p.HasError() { 13144 goto errorExit 13145 } 13146 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 132, p.GetParserRuleContext()) 13147 if p.HasError() { 13148 goto errorExit 13149 } 13150 for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { 13151 if _alt == 1 { 13152 { 13153 p.SetState(987) 13154 p.Match(nevaParserNEWLINE) 13155 if p.HasError() { 13156 // Recognition error - abort rule 13157 goto errorExit 13158 } 13159 } 13160 13161 } 13162 p.SetState(992) 13163 p.GetErrorHandler().Sync(p) 13164 if p.HasError() { 13165 goto errorExit 13166 } 13167 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 132, p.GetParserRuleContext()) 13168 if p.HasError() { 13169 goto errorExit 13170 } 13171 } 13172 p.SetState(994) 13173 p.GetErrorHandler().Sync(p) 13174 if p.HasError() { 13175 goto errorExit 13176 } 13177 _la = p.GetTokenStream().LA(1) 13178 13179 if _la == nevaParserT__12 { 13180 { 13181 p.SetState(993) 13182 p.TypeArgs() 13183 } 13184 13185 } 13186 p.SetState(997) 13187 p.GetErrorHandler().Sync(p) 13188 if p.HasError() { 13189 goto errorExit 13190 } 13191 _la = p.GetTokenStream().LA(1) 13192 13193 if _la == nevaParserT__28 { 13194 { 13195 p.SetState(996) 13196 p.ErrGuard() 13197 } 13198 13199 } 13200 p.SetState(1002) 13201 p.GetErrorHandler().Sync(p) 13202 if p.HasError() { 13203 goto errorExit 13204 } 13205 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 135, p.GetParserRuleContext()) 13206 if p.HasError() { 13207 goto errorExit 13208 } 13209 for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { 13210 if _alt == 1 { 13211 { 13212 p.SetState(999) 13213 p.Match(nevaParserNEWLINE) 13214 if p.HasError() { 13215 // Recognition error - abort rule 13216 goto errorExit 13217 } 13218 } 13219 13220 } 13221 p.SetState(1004) 13222 p.GetErrorHandler().Sync(p) 13223 if p.HasError() { 13224 goto errorExit 13225 } 13226 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 135, p.GetParserRuleContext()) 13227 if p.HasError() { 13228 goto errorExit 13229 } 13230 } 13231 p.SetState(1006) 13232 p.GetErrorHandler().Sync(p) 13233 if p.HasError() { 13234 goto errorExit 13235 } 13236 _la = p.GetTokenStream().LA(1) 13237 13238 if _la == nevaParserT__5 { 13239 { 13240 p.SetState(1005) 13241 p.NodeDIArgs() 13242 } 13243 13244 } 13245 13246 errorExit: 13247 if p.HasError() { 13248 v := p.GetError() 13249 localctx.SetException(v) 13250 p.GetErrorHandler().ReportError(p, v) 13251 p.GetErrorHandler().Recover(p, v) 13252 p.SetError(nil) 13253 } 13254 p.ExitRule() 13255 return localctx 13256 goto errorExit // Trick to prevent compiler error if the label is not used 13257 } 13258 13259 // IErrGuardContext is an interface to support dynamic dispatch. 13260 type IErrGuardContext interface { 13261 antlr.ParserRuleContext 13262 13263 // GetParser returns the parser. 13264 GetParser() antlr.Parser 13265 // IsErrGuardContext differentiates from other interfaces. 13266 IsErrGuardContext() 13267 } 13268 13269 type ErrGuardContext struct { 13270 antlr.BaseParserRuleContext 13271 parser antlr.Parser 13272 } 13273 13274 func NewEmptyErrGuardContext() *ErrGuardContext { 13275 var p = new(ErrGuardContext) 13276 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 13277 p.RuleIndex = nevaParserRULE_errGuard 13278 return p 13279 } 13280 13281 func InitEmptyErrGuardContext(p *ErrGuardContext) { 13282 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 13283 p.RuleIndex = nevaParserRULE_errGuard 13284 } 13285 13286 func (*ErrGuardContext) IsErrGuardContext() {} 13287 13288 func NewErrGuardContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ErrGuardContext { 13289 var p = new(ErrGuardContext) 13290 13291 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 13292 13293 p.parser = parser 13294 p.RuleIndex = nevaParserRULE_errGuard 13295 13296 return p 13297 } 13298 13299 func (s *ErrGuardContext) GetParser() antlr.Parser { return s.parser } 13300 func (s *ErrGuardContext) GetRuleContext() antlr.RuleContext { 13301 return s 13302 } 13303 13304 func (s *ErrGuardContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 13305 return antlr.TreesStringTree(s, ruleNames, recog) 13306 } 13307 13308 func (s *ErrGuardContext) EnterRule(listener antlr.ParseTreeListener) { 13309 if listenerT, ok := listener.(nevaListener); ok { 13310 listenerT.EnterErrGuard(s) 13311 } 13312 } 13313 13314 func (s *ErrGuardContext) ExitRule(listener antlr.ParseTreeListener) { 13315 if listenerT, ok := listener.(nevaListener); ok { 13316 listenerT.ExitErrGuard(s) 13317 } 13318 } 13319 13320 func (p *nevaParser) ErrGuard() (localctx IErrGuardContext) { 13321 localctx = NewErrGuardContext(p, p.GetParserRuleContext(), p.GetState()) 13322 p.EnterRule(localctx, 140, nevaParserRULE_errGuard) 13323 p.EnterOuterAlt(localctx, 1) 13324 { 13325 p.SetState(1008) 13326 p.Match(nevaParserT__28) 13327 if p.HasError() { 13328 // Recognition error - abort rule 13329 goto errorExit 13330 } 13331 } 13332 13333 errorExit: 13334 if p.HasError() { 13335 v := p.GetError() 13336 localctx.SetException(v) 13337 p.GetErrorHandler().ReportError(p, v) 13338 p.GetErrorHandler().Recover(p, v) 13339 p.SetError(nil) 13340 } 13341 p.ExitRule() 13342 return localctx 13343 goto errorExit // Trick to prevent compiler error if the label is not used 13344 } 13345 13346 // INodeDIArgsContext is an interface to support dynamic dispatch. 13347 type INodeDIArgsContext interface { 13348 antlr.ParserRuleContext 13349 13350 // GetParser returns the parser. 13351 GetParser() antlr.Parser 13352 13353 // Getter signatures 13354 CompNodesDefBody() ICompNodesDefBodyContext 13355 13356 // IsNodeDIArgsContext differentiates from other interfaces. 13357 IsNodeDIArgsContext() 13358 } 13359 13360 type NodeDIArgsContext struct { 13361 antlr.BaseParserRuleContext 13362 parser antlr.Parser 13363 } 13364 13365 func NewEmptyNodeDIArgsContext() *NodeDIArgsContext { 13366 var p = new(NodeDIArgsContext) 13367 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 13368 p.RuleIndex = nevaParserRULE_nodeDIArgs 13369 return p 13370 } 13371 13372 func InitEmptyNodeDIArgsContext(p *NodeDIArgsContext) { 13373 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 13374 p.RuleIndex = nevaParserRULE_nodeDIArgs 13375 } 13376 13377 func (*NodeDIArgsContext) IsNodeDIArgsContext() {} 13378 13379 func NewNodeDIArgsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NodeDIArgsContext { 13380 var p = new(NodeDIArgsContext) 13381 13382 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 13383 13384 p.parser = parser 13385 p.RuleIndex = nevaParserRULE_nodeDIArgs 13386 13387 return p 13388 } 13389 13390 func (s *NodeDIArgsContext) GetParser() antlr.Parser { return s.parser } 13391 13392 func (s *NodeDIArgsContext) CompNodesDefBody() ICompNodesDefBodyContext { 13393 var t antlr.RuleContext 13394 for _, ctx := range s.GetChildren() { 13395 if _, ok := ctx.(ICompNodesDefBodyContext); ok { 13396 t = ctx.(antlr.RuleContext) 13397 break 13398 } 13399 } 13400 13401 if t == nil { 13402 return nil 13403 } 13404 13405 return t.(ICompNodesDefBodyContext) 13406 } 13407 13408 func (s *NodeDIArgsContext) GetRuleContext() antlr.RuleContext { 13409 return s 13410 } 13411 13412 func (s *NodeDIArgsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 13413 return antlr.TreesStringTree(s, ruleNames, recog) 13414 } 13415 13416 func (s *NodeDIArgsContext) EnterRule(listener antlr.ParseTreeListener) { 13417 if listenerT, ok := listener.(nevaListener); ok { 13418 listenerT.EnterNodeDIArgs(s) 13419 } 13420 } 13421 13422 func (s *NodeDIArgsContext) ExitRule(listener antlr.ParseTreeListener) { 13423 if listenerT, ok := listener.(nevaListener); ok { 13424 listenerT.ExitNodeDIArgs(s) 13425 } 13426 } 13427 13428 func (p *nevaParser) NodeDIArgs() (localctx INodeDIArgsContext) { 13429 localctx = NewNodeDIArgsContext(p, p.GetParserRuleContext(), p.GetState()) 13430 p.EnterRule(localctx, 142, nevaParserRULE_nodeDIArgs) 13431 p.EnterOuterAlt(localctx, 1) 13432 { 13433 p.SetState(1010) 13434 p.CompNodesDefBody() 13435 } 13436 13437 errorExit: 13438 if p.HasError() { 13439 v := p.GetError() 13440 localctx.SetException(v) 13441 p.GetErrorHandler().ReportError(p, v) 13442 p.GetErrorHandler().Recover(p, v) 13443 p.SetError(nil) 13444 } 13445 p.ExitRule() 13446 return localctx 13447 goto errorExit // Trick to prevent compiler error if the label is not used 13448 } 13449 13450 // ICompNetDefContext is an interface to support dynamic dispatch. 13451 type ICompNetDefContext interface { 13452 antlr.ParserRuleContext 13453 13454 // GetParser returns the parser. 13455 GetParser() antlr.Parser 13456 13457 // Getter signatures 13458 CompNetBody() ICompNetBodyContext 13459 AllNEWLINE() []antlr.TerminalNode 13460 NEWLINE(i int) antlr.TerminalNode 13461 13462 // IsCompNetDefContext differentiates from other interfaces. 13463 IsCompNetDefContext() 13464 } 13465 13466 type CompNetDefContext struct { 13467 antlr.BaseParserRuleContext 13468 parser antlr.Parser 13469 } 13470 13471 func NewEmptyCompNetDefContext() *CompNetDefContext { 13472 var p = new(CompNetDefContext) 13473 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 13474 p.RuleIndex = nevaParserRULE_compNetDef 13475 return p 13476 } 13477 13478 func InitEmptyCompNetDefContext(p *CompNetDefContext) { 13479 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 13480 p.RuleIndex = nevaParserRULE_compNetDef 13481 } 13482 13483 func (*CompNetDefContext) IsCompNetDefContext() {} 13484 13485 func NewCompNetDefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CompNetDefContext { 13486 var p = new(CompNetDefContext) 13487 13488 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 13489 13490 p.parser = parser 13491 p.RuleIndex = nevaParserRULE_compNetDef 13492 13493 return p 13494 } 13495 13496 func (s *CompNetDefContext) GetParser() antlr.Parser { return s.parser } 13497 13498 func (s *CompNetDefContext) CompNetBody() ICompNetBodyContext { 13499 var t antlr.RuleContext 13500 for _, ctx := range s.GetChildren() { 13501 if _, ok := ctx.(ICompNetBodyContext); ok { 13502 t = ctx.(antlr.RuleContext) 13503 break 13504 } 13505 } 13506 13507 if t == nil { 13508 return nil 13509 } 13510 13511 return t.(ICompNetBodyContext) 13512 } 13513 13514 func (s *CompNetDefContext) AllNEWLINE() []antlr.TerminalNode { 13515 return s.GetTokens(nevaParserNEWLINE) 13516 } 13517 13518 func (s *CompNetDefContext) NEWLINE(i int) antlr.TerminalNode { 13519 return s.GetToken(nevaParserNEWLINE, i) 13520 } 13521 13522 func (s *CompNetDefContext) GetRuleContext() antlr.RuleContext { 13523 return s 13524 } 13525 13526 func (s *CompNetDefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 13527 return antlr.TreesStringTree(s, ruleNames, recog) 13528 } 13529 13530 func (s *CompNetDefContext) EnterRule(listener antlr.ParseTreeListener) { 13531 if listenerT, ok := listener.(nevaListener); ok { 13532 listenerT.EnterCompNetDef(s) 13533 } 13534 } 13535 13536 func (s *CompNetDefContext) ExitRule(listener antlr.ParseTreeListener) { 13537 if listenerT, ok := listener.(nevaListener); ok { 13538 listenerT.ExitCompNetDef(s) 13539 } 13540 } 13541 13542 func (p *nevaParser) CompNetDef() (localctx ICompNetDefContext) { 13543 localctx = NewCompNetDefContext(p, p.GetParserRuleContext(), p.GetState()) 13544 p.EnterRule(localctx, 144, nevaParserRULE_compNetDef) 13545 var _la int 13546 13547 p.EnterOuterAlt(localctx, 1) 13548 { 13549 p.SetState(1012) 13550 p.Match(nevaParserT__29) 13551 if p.HasError() { 13552 // Recognition error - abort rule 13553 goto errorExit 13554 } 13555 } 13556 p.SetState(1016) 13557 p.GetErrorHandler().Sync(p) 13558 if p.HasError() { 13559 goto errorExit 13560 } 13561 _la = p.GetTokenStream().LA(1) 13562 13563 for _la == nevaParserNEWLINE { 13564 { 13565 p.SetState(1013) 13566 p.Match(nevaParserNEWLINE) 13567 if p.HasError() { 13568 // Recognition error - abort rule 13569 goto errorExit 13570 } 13571 } 13572 13573 p.SetState(1018) 13574 p.GetErrorHandler().Sync(p) 13575 if p.HasError() { 13576 goto errorExit 13577 } 13578 _la = p.GetTokenStream().LA(1) 13579 } 13580 { 13581 p.SetState(1019) 13582 p.CompNetBody() 13583 } 13584 13585 errorExit: 13586 if p.HasError() { 13587 v := p.GetError() 13588 localctx.SetException(v) 13589 p.GetErrorHandler().ReportError(p, v) 13590 p.GetErrorHandler().Recover(p, v) 13591 p.SetError(nil) 13592 } 13593 p.ExitRule() 13594 return localctx 13595 goto errorExit // Trick to prevent compiler error if the label is not used 13596 } 13597 13598 // ICompNetBodyContext is an interface to support dynamic dispatch. 13599 type ICompNetBodyContext interface { 13600 antlr.ParserRuleContext 13601 13602 // GetParser returns the parser. 13603 GetParser() antlr.Parser 13604 13605 // Getter signatures 13606 AllNEWLINE() []antlr.TerminalNode 13607 NEWLINE(i int) antlr.TerminalNode 13608 ConnDefList() IConnDefListContext 13609 13610 // IsCompNetBodyContext differentiates from other interfaces. 13611 IsCompNetBodyContext() 13612 } 13613 13614 type CompNetBodyContext struct { 13615 antlr.BaseParserRuleContext 13616 parser antlr.Parser 13617 } 13618 13619 func NewEmptyCompNetBodyContext() *CompNetBodyContext { 13620 var p = new(CompNetBodyContext) 13621 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 13622 p.RuleIndex = nevaParserRULE_compNetBody 13623 return p 13624 } 13625 13626 func InitEmptyCompNetBodyContext(p *CompNetBodyContext) { 13627 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 13628 p.RuleIndex = nevaParserRULE_compNetBody 13629 } 13630 13631 func (*CompNetBodyContext) IsCompNetBodyContext() {} 13632 13633 func NewCompNetBodyContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CompNetBodyContext { 13634 var p = new(CompNetBodyContext) 13635 13636 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 13637 13638 p.parser = parser 13639 p.RuleIndex = nevaParserRULE_compNetBody 13640 13641 return p 13642 } 13643 13644 func (s *CompNetBodyContext) GetParser() antlr.Parser { return s.parser } 13645 13646 func (s *CompNetBodyContext) AllNEWLINE() []antlr.TerminalNode { 13647 return s.GetTokens(nevaParserNEWLINE) 13648 } 13649 13650 func (s *CompNetBodyContext) NEWLINE(i int) antlr.TerminalNode { 13651 return s.GetToken(nevaParserNEWLINE, i) 13652 } 13653 13654 func (s *CompNetBodyContext) ConnDefList() IConnDefListContext { 13655 var t antlr.RuleContext 13656 for _, ctx := range s.GetChildren() { 13657 if _, ok := ctx.(IConnDefListContext); ok { 13658 t = ctx.(antlr.RuleContext) 13659 break 13660 } 13661 } 13662 13663 if t == nil { 13664 return nil 13665 } 13666 13667 return t.(IConnDefListContext) 13668 } 13669 13670 func (s *CompNetBodyContext) GetRuleContext() antlr.RuleContext { 13671 return s 13672 } 13673 13674 func (s *CompNetBodyContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 13675 return antlr.TreesStringTree(s, ruleNames, recog) 13676 } 13677 13678 func (s *CompNetBodyContext) EnterRule(listener antlr.ParseTreeListener) { 13679 if listenerT, ok := listener.(nevaListener); ok { 13680 listenerT.EnterCompNetBody(s) 13681 } 13682 } 13683 13684 func (s *CompNetBodyContext) ExitRule(listener antlr.ParseTreeListener) { 13685 if listenerT, ok := listener.(nevaListener); ok { 13686 listenerT.ExitCompNetBody(s) 13687 } 13688 } 13689 13690 func (p *nevaParser) CompNetBody() (localctx ICompNetBodyContext) { 13691 localctx = NewCompNetBodyContext(p, p.GetParserRuleContext(), p.GetState()) 13692 p.EnterRule(localctx, 146, nevaParserRULE_compNetBody) 13693 var _la int 13694 13695 var _alt int 13696 13697 p.EnterOuterAlt(localctx, 1) 13698 { 13699 p.SetState(1021) 13700 p.Match(nevaParserT__5) 13701 if p.HasError() { 13702 // Recognition error - abort rule 13703 goto errorExit 13704 } 13705 } 13706 p.SetState(1025) 13707 p.GetErrorHandler().Sync(p) 13708 if p.HasError() { 13709 goto errorExit 13710 } 13711 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 138, p.GetParserRuleContext()) 13712 if p.HasError() { 13713 goto errorExit 13714 } 13715 for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { 13716 if _alt == 1 { 13717 { 13718 p.SetState(1022) 13719 p.Match(nevaParserNEWLINE) 13720 if p.HasError() { 13721 // Recognition error - abort rule 13722 goto errorExit 13723 } 13724 } 13725 13726 } 13727 p.SetState(1027) 13728 p.GetErrorHandler().Sync(p) 13729 if p.HasError() { 13730 goto errorExit 13731 } 13732 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 138, p.GetParserRuleContext()) 13733 if p.HasError() { 13734 goto errorExit 13735 } 13736 } 13737 p.SetState(1029) 13738 p.GetErrorHandler().Sync(p) 13739 if p.HasError() { 13740 goto errorExit 13741 } 13742 _la = p.GetTokenStream().LA(1) 13743 13744 if (int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&2156132827392) != 0 { 13745 { 13746 p.SetState(1028) 13747 p.ConnDefList() 13748 } 13749 13750 } 13751 p.SetState(1034) 13752 p.GetErrorHandler().Sync(p) 13753 if p.HasError() { 13754 goto errorExit 13755 } 13756 _la = p.GetTokenStream().LA(1) 13757 13758 for _la == nevaParserNEWLINE { 13759 { 13760 p.SetState(1031) 13761 p.Match(nevaParserNEWLINE) 13762 if p.HasError() { 13763 // Recognition error - abort rule 13764 goto errorExit 13765 } 13766 } 13767 13768 p.SetState(1036) 13769 p.GetErrorHandler().Sync(p) 13770 if p.HasError() { 13771 goto errorExit 13772 } 13773 _la = p.GetTokenStream().LA(1) 13774 } 13775 { 13776 p.SetState(1037) 13777 p.Match(nevaParserT__6) 13778 if p.HasError() { 13779 // Recognition error - abort rule 13780 goto errorExit 13781 } 13782 } 13783 13784 errorExit: 13785 if p.HasError() { 13786 v := p.GetError() 13787 localctx.SetException(v) 13788 p.GetErrorHandler().ReportError(p, v) 13789 p.GetErrorHandler().Recover(p, v) 13790 p.SetError(nil) 13791 } 13792 p.ExitRule() 13793 return localctx 13794 goto errorExit // Trick to prevent compiler error if the label is not used 13795 } 13796 13797 // IConnDefListContext is an interface to support dynamic dispatch. 13798 type IConnDefListContext interface { 13799 antlr.ParserRuleContext 13800 13801 // GetParser returns the parser. 13802 GetParser() antlr.Parser 13803 13804 // Getter signatures 13805 AllConnDef() []IConnDefContext 13806 ConnDef(i int) IConnDefContext 13807 AllCOMMENT() []antlr.TerminalNode 13808 COMMENT(i int) antlr.TerminalNode 13809 AllNEWLINE() []antlr.TerminalNode 13810 NEWLINE(i int) antlr.TerminalNode 13811 13812 // IsConnDefListContext differentiates from other interfaces. 13813 IsConnDefListContext() 13814 } 13815 13816 type ConnDefListContext struct { 13817 antlr.BaseParserRuleContext 13818 parser antlr.Parser 13819 } 13820 13821 func NewEmptyConnDefListContext() *ConnDefListContext { 13822 var p = new(ConnDefListContext) 13823 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 13824 p.RuleIndex = nevaParserRULE_connDefList 13825 return p 13826 } 13827 13828 func InitEmptyConnDefListContext(p *ConnDefListContext) { 13829 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 13830 p.RuleIndex = nevaParserRULE_connDefList 13831 } 13832 13833 func (*ConnDefListContext) IsConnDefListContext() {} 13834 13835 func NewConnDefListContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ConnDefListContext { 13836 var p = new(ConnDefListContext) 13837 13838 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 13839 13840 p.parser = parser 13841 p.RuleIndex = nevaParserRULE_connDefList 13842 13843 return p 13844 } 13845 13846 func (s *ConnDefListContext) GetParser() antlr.Parser { return s.parser } 13847 13848 func (s *ConnDefListContext) AllConnDef() []IConnDefContext { 13849 children := s.GetChildren() 13850 len := 0 13851 for _, ctx := range children { 13852 if _, ok := ctx.(IConnDefContext); ok { 13853 len++ 13854 } 13855 } 13856 13857 tst := make([]IConnDefContext, len) 13858 i := 0 13859 for _, ctx := range children { 13860 if t, ok := ctx.(IConnDefContext); ok { 13861 tst[i] = t.(IConnDefContext) 13862 i++ 13863 } 13864 } 13865 13866 return tst 13867 } 13868 13869 func (s *ConnDefListContext) ConnDef(i int) IConnDefContext { 13870 var t antlr.RuleContext 13871 j := 0 13872 for _, ctx := range s.GetChildren() { 13873 if _, ok := ctx.(IConnDefContext); ok { 13874 if j == i { 13875 t = ctx.(antlr.RuleContext) 13876 break 13877 } 13878 j++ 13879 } 13880 } 13881 13882 if t == nil { 13883 return nil 13884 } 13885 13886 return t.(IConnDefContext) 13887 } 13888 13889 func (s *ConnDefListContext) AllCOMMENT() []antlr.TerminalNode { 13890 return s.GetTokens(nevaParserCOMMENT) 13891 } 13892 13893 func (s *ConnDefListContext) COMMENT(i int) antlr.TerminalNode { 13894 return s.GetToken(nevaParserCOMMENT, i) 13895 } 13896 13897 func (s *ConnDefListContext) AllNEWLINE() []antlr.TerminalNode { 13898 return s.GetTokens(nevaParserNEWLINE) 13899 } 13900 13901 func (s *ConnDefListContext) NEWLINE(i int) antlr.TerminalNode { 13902 return s.GetToken(nevaParserNEWLINE, i) 13903 } 13904 13905 func (s *ConnDefListContext) GetRuleContext() antlr.RuleContext { 13906 return s 13907 } 13908 13909 func (s *ConnDefListContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 13910 return antlr.TreesStringTree(s, ruleNames, recog) 13911 } 13912 13913 func (s *ConnDefListContext) EnterRule(listener antlr.ParseTreeListener) { 13914 if listenerT, ok := listener.(nevaListener); ok { 13915 listenerT.EnterConnDefList(s) 13916 } 13917 } 13918 13919 func (s *ConnDefListContext) ExitRule(listener antlr.ParseTreeListener) { 13920 if listenerT, ok := listener.(nevaListener); ok { 13921 listenerT.ExitConnDefList(s) 13922 } 13923 } 13924 13925 func (p *nevaParser) ConnDefList() (localctx IConnDefListContext) { 13926 localctx = NewConnDefListContext(p, p.GetParserRuleContext(), p.GetState()) 13927 p.EnterRule(localctx, 148, nevaParserRULE_connDefList) 13928 var _la int 13929 13930 var _alt int 13931 13932 p.EnterOuterAlt(localctx, 1) 13933 p.SetState(1041) 13934 p.GetErrorHandler().Sync(p) 13935 if p.HasError() { 13936 goto errorExit 13937 } 13938 13939 switch p.GetTokenStream().LA(1) { 13940 case nevaParserT__7, nevaParserT__18, nevaParserT__22, nevaParserT__23, nevaParserT__24, nevaParserT__32, nevaParserIDENTIFIER, nevaParserINT, nevaParserMINUS, nevaParserFLOAT, nevaParserSTRING: 13941 { 13942 p.SetState(1039) 13943 p.ConnDef() 13944 } 13945 13946 case nevaParserCOMMENT: 13947 { 13948 p.SetState(1040) 13949 p.Match(nevaParserCOMMENT) 13950 if p.HasError() { 13951 // Recognition error - abort rule 13952 goto errorExit 13953 } 13954 } 13955 13956 default: 13957 p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) 13958 goto errorExit 13959 } 13960 p.SetState(1055) 13961 p.GetErrorHandler().Sync(p) 13962 if p.HasError() { 13963 goto errorExit 13964 } 13965 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 144, p.GetParserRuleContext()) 13966 if p.HasError() { 13967 goto errorExit 13968 } 13969 for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { 13970 if _alt == 1 { 13971 p.SetState(1046) 13972 p.GetErrorHandler().Sync(p) 13973 if p.HasError() { 13974 goto errorExit 13975 } 13976 _la = p.GetTokenStream().LA(1) 13977 13978 for _la == nevaParserNEWLINE { 13979 { 13980 p.SetState(1043) 13981 p.Match(nevaParserNEWLINE) 13982 if p.HasError() { 13983 // Recognition error - abort rule 13984 goto errorExit 13985 } 13986 } 13987 13988 p.SetState(1048) 13989 p.GetErrorHandler().Sync(p) 13990 if p.HasError() { 13991 goto errorExit 13992 } 13993 _la = p.GetTokenStream().LA(1) 13994 } 13995 p.SetState(1051) 13996 p.GetErrorHandler().Sync(p) 13997 if p.HasError() { 13998 goto errorExit 13999 } 14000 14001 switch p.GetTokenStream().LA(1) { 14002 case nevaParserT__7, nevaParserT__18, nevaParserT__22, nevaParserT__23, nevaParserT__24, nevaParserT__32, nevaParserIDENTIFIER, nevaParserINT, nevaParserMINUS, nevaParserFLOAT, nevaParserSTRING: 14003 { 14004 p.SetState(1049) 14005 p.ConnDef() 14006 } 14007 14008 case nevaParserCOMMENT: 14009 { 14010 p.SetState(1050) 14011 p.Match(nevaParserCOMMENT) 14012 if p.HasError() { 14013 // Recognition error - abort rule 14014 goto errorExit 14015 } 14016 } 14017 14018 default: 14019 p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) 14020 goto errorExit 14021 } 14022 14023 } 14024 p.SetState(1057) 14025 p.GetErrorHandler().Sync(p) 14026 if p.HasError() { 14027 goto errorExit 14028 } 14029 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 144, p.GetParserRuleContext()) 14030 if p.HasError() { 14031 goto errorExit 14032 } 14033 } 14034 14035 errorExit: 14036 if p.HasError() { 14037 v := p.GetError() 14038 localctx.SetException(v) 14039 p.GetErrorHandler().ReportError(p, v) 14040 p.GetErrorHandler().Recover(p, v) 14041 p.SetError(nil) 14042 } 14043 p.ExitRule() 14044 return localctx 14045 goto errorExit // Trick to prevent compiler error if the label is not used 14046 } 14047 14048 // IConnDefContext is an interface to support dynamic dispatch. 14049 type IConnDefContext interface { 14050 antlr.ParserRuleContext 14051 14052 // GetParser returns the parser. 14053 GetParser() antlr.Parser 14054 14055 // Getter signatures 14056 NormConnDef() INormConnDefContext 14057 ArrBypassConnDef() IArrBypassConnDefContext 14058 14059 // IsConnDefContext differentiates from other interfaces. 14060 IsConnDefContext() 14061 } 14062 14063 type ConnDefContext struct { 14064 antlr.BaseParserRuleContext 14065 parser antlr.Parser 14066 } 14067 14068 func NewEmptyConnDefContext() *ConnDefContext { 14069 var p = new(ConnDefContext) 14070 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 14071 p.RuleIndex = nevaParserRULE_connDef 14072 return p 14073 } 14074 14075 func InitEmptyConnDefContext(p *ConnDefContext) { 14076 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 14077 p.RuleIndex = nevaParserRULE_connDef 14078 } 14079 14080 func (*ConnDefContext) IsConnDefContext() {} 14081 14082 func NewConnDefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ConnDefContext { 14083 var p = new(ConnDefContext) 14084 14085 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 14086 14087 p.parser = parser 14088 p.RuleIndex = nevaParserRULE_connDef 14089 14090 return p 14091 } 14092 14093 func (s *ConnDefContext) GetParser() antlr.Parser { return s.parser } 14094 14095 func (s *ConnDefContext) NormConnDef() INormConnDefContext { 14096 var t antlr.RuleContext 14097 for _, ctx := range s.GetChildren() { 14098 if _, ok := ctx.(INormConnDefContext); ok { 14099 t = ctx.(antlr.RuleContext) 14100 break 14101 } 14102 } 14103 14104 if t == nil { 14105 return nil 14106 } 14107 14108 return t.(INormConnDefContext) 14109 } 14110 14111 func (s *ConnDefContext) ArrBypassConnDef() IArrBypassConnDefContext { 14112 var t antlr.RuleContext 14113 for _, ctx := range s.GetChildren() { 14114 if _, ok := ctx.(IArrBypassConnDefContext); ok { 14115 t = ctx.(antlr.RuleContext) 14116 break 14117 } 14118 } 14119 14120 if t == nil { 14121 return nil 14122 } 14123 14124 return t.(IArrBypassConnDefContext) 14125 } 14126 14127 func (s *ConnDefContext) GetRuleContext() antlr.RuleContext { 14128 return s 14129 } 14130 14131 func (s *ConnDefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 14132 return antlr.TreesStringTree(s, ruleNames, recog) 14133 } 14134 14135 func (s *ConnDefContext) EnterRule(listener antlr.ParseTreeListener) { 14136 if listenerT, ok := listener.(nevaListener); ok { 14137 listenerT.EnterConnDef(s) 14138 } 14139 } 14140 14141 func (s *ConnDefContext) ExitRule(listener antlr.ParseTreeListener) { 14142 if listenerT, ok := listener.(nevaListener); ok { 14143 listenerT.ExitConnDef(s) 14144 } 14145 } 14146 14147 func (p *nevaParser) ConnDef() (localctx IConnDefContext) { 14148 localctx = NewConnDefContext(p, p.GetParserRuleContext(), p.GetState()) 14149 p.EnterRule(localctx, 150, nevaParserRULE_connDef) 14150 p.SetState(1060) 14151 p.GetErrorHandler().Sync(p) 14152 if p.HasError() { 14153 goto errorExit 14154 } 14155 14156 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 145, p.GetParserRuleContext()) { 14157 case 1: 14158 p.EnterOuterAlt(localctx, 1) 14159 { 14160 p.SetState(1058) 14161 p.NormConnDef() 14162 } 14163 14164 case 2: 14165 p.EnterOuterAlt(localctx, 2) 14166 { 14167 p.SetState(1059) 14168 p.ArrBypassConnDef() 14169 } 14170 14171 case antlr.ATNInvalidAltNumber: 14172 goto errorExit 14173 } 14174 14175 errorExit: 14176 if p.HasError() { 14177 v := p.GetError() 14178 localctx.SetException(v) 14179 p.GetErrorHandler().ReportError(p, v) 14180 p.GetErrorHandler().Recover(p, v) 14181 p.SetError(nil) 14182 } 14183 p.ExitRule() 14184 return localctx 14185 goto errorExit // Trick to prevent compiler error if the label is not used 14186 } 14187 14188 // INormConnDefContext is an interface to support dynamic dispatch. 14189 type INormConnDefContext interface { 14190 antlr.ParserRuleContext 14191 14192 // GetParser returns the parser. 14193 GetParser() antlr.Parser 14194 14195 // Getter signatures 14196 SenderSide() ISenderSideContext 14197 ReceiverSide() IReceiverSideContext 14198 14199 // IsNormConnDefContext differentiates from other interfaces. 14200 IsNormConnDefContext() 14201 } 14202 14203 type NormConnDefContext struct { 14204 antlr.BaseParserRuleContext 14205 parser antlr.Parser 14206 } 14207 14208 func NewEmptyNormConnDefContext() *NormConnDefContext { 14209 var p = new(NormConnDefContext) 14210 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 14211 p.RuleIndex = nevaParserRULE_normConnDef 14212 return p 14213 } 14214 14215 func InitEmptyNormConnDefContext(p *NormConnDefContext) { 14216 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 14217 p.RuleIndex = nevaParserRULE_normConnDef 14218 } 14219 14220 func (*NormConnDefContext) IsNormConnDefContext() {} 14221 14222 func NewNormConnDefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NormConnDefContext { 14223 var p = new(NormConnDefContext) 14224 14225 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 14226 14227 p.parser = parser 14228 p.RuleIndex = nevaParserRULE_normConnDef 14229 14230 return p 14231 } 14232 14233 func (s *NormConnDefContext) GetParser() antlr.Parser { return s.parser } 14234 14235 func (s *NormConnDefContext) SenderSide() ISenderSideContext { 14236 var t antlr.RuleContext 14237 for _, ctx := range s.GetChildren() { 14238 if _, ok := ctx.(ISenderSideContext); ok { 14239 t = ctx.(antlr.RuleContext) 14240 break 14241 } 14242 } 14243 14244 if t == nil { 14245 return nil 14246 } 14247 14248 return t.(ISenderSideContext) 14249 } 14250 14251 func (s *NormConnDefContext) ReceiverSide() IReceiverSideContext { 14252 var t antlr.RuleContext 14253 for _, ctx := range s.GetChildren() { 14254 if _, ok := ctx.(IReceiverSideContext); ok { 14255 t = ctx.(antlr.RuleContext) 14256 break 14257 } 14258 } 14259 14260 if t == nil { 14261 return nil 14262 } 14263 14264 return t.(IReceiverSideContext) 14265 } 14266 14267 func (s *NormConnDefContext) GetRuleContext() antlr.RuleContext { 14268 return s 14269 } 14270 14271 func (s *NormConnDefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 14272 return antlr.TreesStringTree(s, ruleNames, recog) 14273 } 14274 14275 func (s *NormConnDefContext) EnterRule(listener antlr.ParseTreeListener) { 14276 if listenerT, ok := listener.(nevaListener); ok { 14277 listenerT.EnterNormConnDef(s) 14278 } 14279 } 14280 14281 func (s *NormConnDefContext) ExitRule(listener antlr.ParseTreeListener) { 14282 if listenerT, ok := listener.(nevaListener); ok { 14283 listenerT.ExitNormConnDef(s) 14284 } 14285 } 14286 14287 func (p *nevaParser) NormConnDef() (localctx INormConnDefContext) { 14288 localctx = NewNormConnDefContext(p, p.GetParserRuleContext(), p.GetState()) 14289 p.EnterRule(localctx, 152, nevaParserRULE_normConnDef) 14290 p.EnterOuterAlt(localctx, 1) 14291 { 14292 p.SetState(1062) 14293 p.SenderSide() 14294 } 14295 { 14296 p.SetState(1063) 14297 p.Match(nevaParserT__30) 14298 if p.HasError() { 14299 // Recognition error - abort rule 14300 goto errorExit 14301 } 14302 } 14303 { 14304 p.SetState(1064) 14305 p.ReceiverSide() 14306 } 14307 14308 errorExit: 14309 if p.HasError() { 14310 v := p.GetError() 14311 localctx.SetException(v) 14312 p.GetErrorHandler().ReportError(p, v) 14313 p.GetErrorHandler().Recover(p, v) 14314 p.SetError(nil) 14315 } 14316 p.ExitRule() 14317 return localctx 14318 goto errorExit // Trick to prevent compiler error if the label is not used 14319 } 14320 14321 // ISenderSideContext is an interface to support dynamic dispatch. 14322 type ISenderSideContext interface { 14323 antlr.ParserRuleContext 14324 14325 // GetParser returns the parser. 14326 GetParser() antlr.Parser 14327 14328 // Getter signatures 14329 SingleSenderSide() ISingleSenderSideContext 14330 MultipleSenderSide() IMultipleSenderSideContext 14331 14332 // IsSenderSideContext differentiates from other interfaces. 14333 IsSenderSideContext() 14334 } 14335 14336 type SenderSideContext struct { 14337 antlr.BaseParserRuleContext 14338 parser antlr.Parser 14339 } 14340 14341 func NewEmptySenderSideContext() *SenderSideContext { 14342 var p = new(SenderSideContext) 14343 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 14344 p.RuleIndex = nevaParserRULE_senderSide 14345 return p 14346 } 14347 14348 func InitEmptySenderSideContext(p *SenderSideContext) { 14349 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 14350 p.RuleIndex = nevaParserRULE_senderSide 14351 } 14352 14353 func (*SenderSideContext) IsSenderSideContext() {} 14354 14355 func NewSenderSideContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SenderSideContext { 14356 var p = new(SenderSideContext) 14357 14358 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 14359 14360 p.parser = parser 14361 p.RuleIndex = nevaParserRULE_senderSide 14362 14363 return p 14364 } 14365 14366 func (s *SenderSideContext) GetParser() antlr.Parser { return s.parser } 14367 14368 func (s *SenderSideContext) SingleSenderSide() ISingleSenderSideContext { 14369 var t antlr.RuleContext 14370 for _, ctx := range s.GetChildren() { 14371 if _, ok := ctx.(ISingleSenderSideContext); ok { 14372 t = ctx.(antlr.RuleContext) 14373 break 14374 } 14375 } 14376 14377 if t == nil { 14378 return nil 14379 } 14380 14381 return t.(ISingleSenderSideContext) 14382 } 14383 14384 func (s *SenderSideContext) MultipleSenderSide() IMultipleSenderSideContext { 14385 var t antlr.RuleContext 14386 for _, ctx := range s.GetChildren() { 14387 if _, ok := ctx.(IMultipleSenderSideContext); ok { 14388 t = ctx.(antlr.RuleContext) 14389 break 14390 } 14391 } 14392 14393 if t == nil { 14394 return nil 14395 } 14396 14397 return t.(IMultipleSenderSideContext) 14398 } 14399 14400 func (s *SenderSideContext) GetRuleContext() antlr.RuleContext { 14401 return s 14402 } 14403 14404 func (s *SenderSideContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 14405 return antlr.TreesStringTree(s, ruleNames, recog) 14406 } 14407 14408 func (s *SenderSideContext) EnterRule(listener antlr.ParseTreeListener) { 14409 if listenerT, ok := listener.(nevaListener); ok { 14410 listenerT.EnterSenderSide(s) 14411 } 14412 } 14413 14414 func (s *SenderSideContext) ExitRule(listener antlr.ParseTreeListener) { 14415 if listenerT, ok := listener.(nevaListener); ok { 14416 listenerT.ExitSenderSide(s) 14417 } 14418 } 14419 14420 func (p *nevaParser) SenderSide() (localctx ISenderSideContext) { 14421 localctx = NewSenderSideContext(p, p.GetParserRuleContext(), p.GetState()) 14422 p.EnterRule(localctx, 154, nevaParserRULE_senderSide) 14423 p.SetState(1068) 14424 p.GetErrorHandler().Sync(p) 14425 if p.HasError() { 14426 goto errorExit 14427 } 14428 14429 switch p.GetTokenStream().LA(1) { 14430 case nevaParserT__7, nevaParserT__22, nevaParserT__23, nevaParserT__24, nevaParserT__32, nevaParserIDENTIFIER, nevaParserINT, nevaParserMINUS, nevaParserFLOAT, nevaParserSTRING: 14431 p.EnterOuterAlt(localctx, 1) 14432 { 14433 p.SetState(1066) 14434 p.SingleSenderSide() 14435 } 14436 14437 case nevaParserT__18: 14438 p.EnterOuterAlt(localctx, 2) 14439 { 14440 p.SetState(1067) 14441 p.MultipleSenderSide() 14442 } 14443 14444 default: 14445 p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) 14446 goto errorExit 14447 } 14448 14449 errorExit: 14450 if p.HasError() { 14451 v := p.GetError() 14452 localctx.SetException(v) 14453 p.GetErrorHandler().ReportError(p, v) 14454 p.GetErrorHandler().Recover(p, v) 14455 p.SetError(nil) 14456 } 14457 p.ExitRule() 14458 return localctx 14459 goto errorExit // Trick to prevent compiler error if the label is not used 14460 } 14461 14462 // IMultipleSenderSideContext is an interface to support dynamic dispatch. 14463 type IMultipleSenderSideContext interface { 14464 antlr.ParserRuleContext 14465 14466 // GetParser returns the parser. 14467 GetParser() antlr.Parser 14468 14469 // Getter signatures 14470 AllSingleSenderSide() []ISingleSenderSideContext 14471 SingleSenderSide(i int) ISingleSenderSideContext 14472 AllNEWLINE() []antlr.TerminalNode 14473 NEWLINE(i int) antlr.TerminalNode 14474 14475 // IsMultipleSenderSideContext differentiates from other interfaces. 14476 IsMultipleSenderSideContext() 14477 } 14478 14479 type MultipleSenderSideContext struct { 14480 antlr.BaseParserRuleContext 14481 parser antlr.Parser 14482 } 14483 14484 func NewEmptyMultipleSenderSideContext() *MultipleSenderSideContext { 14485 var p = new(MultipleSenderSideContext) 14486 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 14487 p.RuleIndex = nevaParserRULE_multipleSenderSide 14488 return p 14489 } 14490 14491 func InitEmptyMultipleSenderSideContext(p *MultipleSenderSideContext) { 14492 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 14493 p.RuleIndex = nevaParserRULE_multipleSenderSide 14494 } 14495 14496 func (*MultipleSenderSideContext) IsMultipleSenderSideContext() {} 14497 14498 func NewMultipleSenderSideContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MultipleSenderSideContext { 14499 var p = new(MultipleSenderSideContext) 14500 14501 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 14502 14503 p.parser = parser 14504 p.RuleIndex = nevaParserRULE_multipleSenderSide 14505 14506 return p 14507 } 14508 14509 func (s *MultipleSenderSideContext) GetParser() antlr.Parser { return s.parser } 14510 14511 func (s *MultipleSenderSideContext) AllSingleSenderSide() []ISingleSenderSideContext { 14512 children := s.GetChildren() 14513 len := 0 14514 for _, ctx := range children { 14515 if _, ok := ctx.(ISingleSenderSideContext); ok { 14516 len++ 14517 } 14518 } 14519 14520 tst := make([]ISingleSenderSideContext, len) 14521 i := 0 14522 for _, ctx := range children { 14523 if t, ok := ctx.(ISingleSenderSideContext); ok { 14524 tst[i] = t.(ISingleSenderSideContext) 14525 i++ 14526 } 14527 } 14528 14529 return tst 14530 } 14531 14532 func (s *MultipleSenderSideContext) SingleSenderSide(i int) ISingleSenderSideContext { 14533 var t antlr.RuleContext 14534 j := 0 14535 for _, ctx := range s.GetChildren() { 14536 if _, ok := ctx.(ISingleSenderSideContext); ok { 14537 if j == i { 14538 t = ctx.(antlr.RuleContext) 14539 break 14540 } 14541 j++ 14542 } 14543 } 14544 14545 if t == nil { 14546 return nil 14547 } 14548 14549 return t.(ISingleSenderSideContext) 14550 } 14551 14552 func (s *MultipleSenderSideContext) AllNEWLINE() []antlr.TerminalNode { 14553 return s.GetTokens(nevaParserNEWLINE) 14554 } 14555 14556 func (s *MultipleSenderSideContext) NEWLINE(i int) antlr.TerminalNode { 14557 return s.GetToken(nevaParserNEWLINE, i) 14558 } 14559 14560 func (s *MultipleSenderSideContext) GetRuleContext() antlr.RuleContext { 14561 return s 14562 } 14563 14564 func (s *MultipleSenderSideContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 14565 return antlr.TreesStringTree(s, ruleNames, recog) 14566 } 14567 14568 func (s *MultipleSenderSideContext) EnterRule(listener antlr.ParseTreeListener) { 14569 if listenerT, ok := listener.(nevaListener); ok { 14570 listenerT.EnterMultipleSenderSide(s) 14571 } 14572 } 14573 14574 func (s *MultipleSenderSideContext) ExitRule(listener antlr.ParseTreeListener) { 14575 if listenerT, ok := listener.(nevaListener); ok { 14576 listenerT.ExitMultipleSenderSide(s) 14577 } 14578 } 14579 14580 func (p *nevaParser) MultipleSenderSide() (localctx IMultipleSenderSideContext) { 14581 localctx = NewMultipleSenderSideContext(p, p.GetParserRuleContext(), p.GetState()) 14582 p.EnterRule(localctx, 156, nevaParserRULE_multipleSenderSide) 14583 var _la int 14584 14585 p.EnterOuterAlt(localctx, 1) 14586 { 14587 p.SetState(1070) 14588 p.Match(nevaParserT__18) 14589 if p.HasError() { 14590 // Recognition error - abort rule 14591 goto errorExit 14592 } 14593 } 14594 p.SetState(1074) 14595 p.GetErrorHandler().Sync(p) 14596 if p.HasError() { 14597 goto errorExit 14598 } 14599 _la = p.GetTokenStream().LA(1) 14600 14601 for _la == nevaParserNEWLINE { 14602 { 14603 p.SetState(1071) 14604 p.Match(nevaParserNEWLINE) 14605 if p.HasError() { 14606 // Recognition error - abort rule 14607 goto errorExit 14608 } 14609 } 14610 14611 p.SetState(1076) 14612 p.GetErrorHandler().Sync(p) 14613 if p.HasError() { 14614 goto errorExit 14615 } 14616 _la = p.GetTokenStream().LA(1) 14617 } 14618 { 14619 p.SetState(1077) 14620 p.SingleSenderSide() 14621 } 14622 p.SetState(1094) 14623 p.GetErrorHandler().Sync(p) 14624 if p.HasError() { 14625 goto errorExit 14626 } 14627 _la = p.GetTokenStream().LA(1) 14628 14629 for _la == nevaParserT__2 { 14630 { 14631 p.SetState(1078) 14632 p.Match(nevaParserT__2) 14633 if p.HasError() { 14634 // Recognition error - abort rule 14635 goto errorExit 14636 } 14637 } 14638 p.SetState(1082) 14639 p.GetErrorHandler().Sync(p) 14640 if p.HasError() { 14641 goto errorExit 14642 } 14643 _la = p.GetTokenStream().LA(1) 14644 14645 for _la == nevaParserNEWLINE { 14646 { 14647 p.SetState(1079) 14648 p.Match(nevaParserNEWLINE) 14649 if p.HasError() { 14650 // Recognition error - abort rule 14651 goto errorExit 14652 } 14653 } 14654 14655 p.SetState(1084) 14656 p.GetErrorHandler().Sync(p) 14657 if p.HasError() { 14658 goto errorExit 14659 } 14660 _la = p.GetTokenStream().LA(1) 14661 } 14662 { 14663 p.SetState(1085) 14664 p.SingleSenderSide() 14665 } 14666 p.SetState(1089) 14667 p.GetErrorHandler().Sync(p) 14668 if p.HasError() { 14669 goto errorExit 14670 } 14671 _la = p.GetTokenStream().LA(1) 14672 14673 for _la == nevaParserNEWLINE { 14674 { 14675 p.SetState(1086) 14676 p.Match(nevaParserNEWLINE) 14677 if p.HasError() { 14678 // Recognition error - abort rule 14679 goto errorExit 14680 } 14681 } 14682 14683 p.SetState(1091) 14684 p.GetErrorHandler().Sync(p) 14685 if p.HasError() { 14686 goto errorExit 14687 } 14688 _la = p.GetTokenStream().LA(1) 14689 } 14690 14691 p.SetState(1096) 14692 p.GetErrorHandler().Sync(p) 14693 if p.HasError() { 14694 goto errorExit 14695 } 14696 _la = p.GetTokenStream().LA(1) 14697 } 14698 { 14699 p.SetState(1097) 14700 p.Match(nevaParserT__19) 14701 if p.HasError() { 14702 // Recognition error - abort rule 14703 goto errorExit 14704 } 14705 } 14706 14707 errorExit: 14708 if p.HasError() { 14709 v := p.GetError() 14710 localctx.SetException(v) 14711 p.GetErrorHandler().ReportError(p, v) 14712 p.GetErrorHandler().Recover(p, v) 14713 p.SetError(nil) 14714 } 14715 p.ExitRule() 14716 return localctx 14717 goto errorExit // Trick to prevent compiler error if the label is not used 14718 } 14719 14720 // IArrBypassConnDefContext is an interface to support dynamic dispatch. 14721 type IArrBypassConnDefContext interface { 14722 antlr.ParserRuleContext 14723 14724 // GetParser returns the parser. 14725 GetParser() antlr.Parser 14726 14727 // Getter signatures 14728 AllSinglePortAddr() []ISinglePortAddrContext 14729 SinglePortAddr(i int) ISinglePortAddrContext 14730 14731 // IsArrBypassConnDefContext differentiates from other interfaces. 14732 IsArrBypassConnDefContext() 14733 } 14734 14735 type ArrBypassConnDefContext struct { 14736 antlr.BaseParserRuleContext 14737 parser antlr.Parser 14738 } 14739 14740 func NewEmptyArrBypassConnDefContext() *ArrBypassConnDefContext { 14741 var p = new(ArrBypassConnDefContext) 14742 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 14743 p.RuleIndex = nevaParserRULE_arrBypassConnDef 14744 return p 14745 } 14746 14747 func InitEmptyArrBypassConnDefContext(p *ArrBypassConnDefContext) { 14748 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 14749 p.RuleIndex = nevaParserRULE_arrBypassConnDef 14750 } 14751 14752 func (*ArrBypassConnDefContext) IsArrBypassConnDefContext() {} 14753 14754 func NewArrBypassConnDefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ArrBypassConnDefContext { 14755 var p = new(ArrBypassConnDefContext) 14756 14757 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 14758 14759 p.parser = parser 14760 p.RuleIndex = nevaParserRULE_arrBypassConnDef 14761 14762 return p 14763 } 14764 14765 func (s *ArrBypassConnDefContext) GetParser() antlr.Parser { return s.parser } 14766 14767 func (s *ArrBypassConnDefContext) AllSinglePortAddr() []ISinglePortAddrContext { 14768 children := s.GetChildren() 14769 len := 0 14770 for _, ctx := range children { 14771 if _, ok := ctx.(ISinglePortAddrContext); ok { 14772 len++ 14773 } 14774 } 14775 14776 tst := make([]ISinglePortAddrContext, len) 14777 i := 0 14778 for _, ctx := range children { 14779 if t, ok := ctx.(ISinglePortAddrContext); ok { 14780 tst[i] = t.(ISinglePortAddrContext) 14781 i++ 14782 } 14783 } 14784 14785 return tst 14786 } 14787 14788 func (s *ArrBypassConnDefContext) SinglePortAddr(i int) ISinglePortAddrContext { 14789 var t antlr.RuleContext 14790 j := 0 14791 for _, ctx := range s.GetChildren() { 14792 if _, ok := ctx.(ISinglePortAddrContext); ok { 14793 if j == i { 14794 t = ctx.(antlr.RuleContext) 14795 break 14796 } 14797 j++ 14798 } 14799 } 14800 14801 if t == nil { 14802 return nil 14803 } 14804 14805 return t.(ISinglePortAddrContext) 14806 } 14807 14808 func (s *ArrBypassConnDefContext) GetRuleContext() antlr.RuleContext { 14809 return s 14810 } 14811 14812 func (s *ArrBypassConnDefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 14813 return antlr.TreesStringTree(s, ruleNames, recog) 14814 } 14815 14816 func (s *ArrBypassConnDefContext) EnterRule(listener antlr.ParseTreeListener) { 14817 if listenerT, ok := listener.(nevaListener); ok { 14818 listenerT.EnterArrBypassConnDef(s) 14819 } 14820 } 14821 14822 func (s *ArrBypassConnDefContext) ExitRule(listener antlr.ParseTreeListener) { 14823 if listenerT, ok := listener.(nevaListener); ok { 14824 listenerT.ExitArrBypassConnDef(s) 14825 } 14826 } 14827 14828 func (p *nevaParser) ArrBypassConnDef() (localctx IArrBypassConnDefContext) { 14829 localctx = NewArrBypassConnDefContext(p, p.GetParserRuleContext(), p.GetState()) 14830 p.EnterRule(localctx, 158, nevaParserRULE_arrBypassConnDef) 14831 p.EnterOuterAlt(localctx, 1) 14832 { 14833 p.SetState(1099) 14834 p.SinglePortAddr() 14835 } 14836 { 14837 p.SetState(1100) 14838 p.Match(nevaParserT__31) 14839 if p.HasError() { 14840 // Recognition error - abort rule 14841 goto errorExit 14842 } 14843 } 14844 { 14845 p.SetState(1101) 14846 p.SinglePortAddr() 14847 } 14848 14849 errorExit: 14850 if p.HasError() { 14851 v := p.GetError() 14852 localctx.SetException(v) 14853 p.GetErrorHandler().ReportError(p, v) 14854 p.GetErrorHandler().Recover(p, v) 14855 p.SetError(nil) 14856 } 14857 p.ExitRule() 14858 return localctx 14859 goto errorExit // Trick to prevent compiler error if the label is not used 14860 } 14861 14862 // ISingleSenderSideContext is an interface to support dynamic dispatch. 14863 type ISingleSenderSideContext interface { 14864 antlr.ParserRuleContext 14865 14866 // GetParser returns the parser. 14867 GetParser() antlr.Parser 14868 14869 // Getter signatures 14870 PortAddr() IPortAddrContext 14871 SenderConstRef() ISenderConstRefContext 14872 PrimitiveConstLit() IPrimitiveConstLitContext 14873 StructSelectors() IStructSelectorsContext 14874 14875 // IsSingleSenderSideContext differentiates from other interfaces. 14876 IsSingleSenderSideContext() 14877 } 14878 14879 type SingleSenderSideContext struct { 14880 antlr.BaseParserRuleContext 14881 parser antlr.Parser 14882 } 14883 14884 func NewEmptySingleSenderSideContext() *SingleSenderSideContext { 14885 var p = new(SingleSenderSideContext) 14886 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 14887 p.RuleIndex = nevaParserRULE_singleSenderSide 14888 return p 14889 } 14890 14891 func InitEmptySingleSenderSideContext(p *SingleSenderSideContext) { 14892 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 14893 p.RuleIndex = nevaParserRULE_singleSenderSide 14894 } 14895 14896 func (*SingleSenderSideContext) IsSingleSenderSideContext() {} 14897 14898 func NewSingleSenderSideContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SingleSenderSideContext { 14899 var p = new(SingleSenderSideContext) 14900 14901 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 14902 14903 p.parser = parser 14904 p.RuleIndex = nevaParserRULE_singleSenderSide 14905 14906 return p 14907 } 14908 14909 func (s *SingleSenderSideContext) GetParser() antlr.Parser { return s.parser } 14910 14911 func (s *SingleSenderSideContext) PortAddr() IPortAddrContext { 14912 var t antlr.RuleContext 14913 for _, ctx := range s.GetChildren() { 14914 if _, ok := ctx.(IPortAddrContext); ok { 14915 t = ctx.(antlr.RuleContext) 14916 break 14917 } 14918 } 14919 14920 if t == nil { 14921 return nil 14922 } 14923 14924 return t.(IPortAddrContext) 14925 } 14926 14927 func (s *SingleSenderSideContext) SenderConstRef() ISenderConstRefContext { 14928 var t antlr.RuleContext 14929 for _, ctx := range s.GetChildren() { 14930 if _, ok := ctx.(ISenderConstRefContext); ok { 14931 t = ctx.(antlr.RuleContext) 14932 break 14933 } 14934 } 14935 14936 if t == nil { 14937 return nil 14938 } 14939 14940 return t.(ISenderConstRefContext) 14941 } 14942 14943 func (s *SingleSenderSideContext) PrimitiveConstLit() IPrimitiveConstLitContext { 14944 var t antlr.RuleContext 14945 for _, ctx := range s.GetChildren() { 14946 if _, ok := ctx.(IPrimitiveConstLitContext); ok { 14947 t = ctx.(antlr.RuleContext) 14948 break 14949 } 14950 } 14951 14952 if t == nil { 14953 return nil 14954 } 14955 14956 return t.(IPrimitiveConstLitContext) 14957 } 14958 14959 func (s *SingleSenderSideContext) StructSelectors() IStructSelectorsContext { 14960 var t antlr.RuleContext 14961 for _, ctx := range s.GetChildren() { 14962 if _, ok := ctx.(IStructSelectorsContext); ok { 14963 t = ctx.(antlr.RuleContext) 14964 break 14965 } 14966 } 14967 14968 if t == nil { 14969 return nil 14970 } 14971 14972 return t.(IStructSelectorsContext) 14973 } 14974 14975 func (s *SingleSenderSideContext) GetRuleContext() antlr.RuleContext { 14976 return s 14977 } 14978 14979 func (s *SingleSenderSideContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 14980 return antlr.TreesStringTree(s, ruleNames, recog) 14981 } 14982 14983 func (s *SingleSenderSideContext) EnterRule(listener antlr.ParseTreeListener) { 14984 if listenerT, ok := listener.(nevaListener); ok { 14985 listenerT.EnterSingleSenderSide(s) 14986 } 14987 } 14988 14989 func (s *SingleSenderSideContext) ExitRule(listener antlr.ParseTreeListener) { 14990 if listenerT, ok := listener.(nevaListener); ok { 14991 listenerT.ExitSingleSenderSide(s) 14992 } 14993 } 14994 14995 func (p *nevaParser) SingleSenderSide() (localctx ISingleSenderSideContext) { 14996 localctx = NewSingleSenderSideContext(p, p.GetParserRuleContext(), p.GetState()) 14997 p.EnterRule(localctx, 160, nevaParserRULE_singleSenderSide) 14998 var _la int 14999 15000 p.EnterOuterAlt(localctx, 1) 15001 p.SetState(1106) 15002 p.GetErrorHandler().Sync(p) 15003 if p.HasError() { 15004 goto errorExit 15005 } 15006 15007 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 151, p.GetParserRuleContext()) { 15008 case 1: 15009 { 15010 p.SetState(1103) 15011 p.PortAddr() 15012 } 15013 15014 case 2: 15015 { 15016 p.SetState(1104) 15017 p.SenderConstRef() 15018 } 15019 15020 case 3: 15021 { 15022 p.SetState(1105) 15023 p.PrimitiveConstLit() 15024 } 15025 15026 case antlr.ATNInvalidAltNumber: 15027 goto errorExit 15028 } 15029 p.SetState(1109) 15030 p.GetErrorHandler().Sync(p) 15031 if p.HasError() { 15032 goto errorExit 15033 } 15034 _la = p.GetTokenStream().LA(1) 15035 15036 if _la == nevaParserT__10 { 15037 { 15038 p.SetState(1108) 15039 p.StructSelectors() 15040 } 15041 15042 } 15043 15044 errorExit: 15045 if p.HasError() { 15046 v := p.GetError() 15047 localctx.SetException(v) 15048 p.GetErrorHandler().ReportError(p, v) 15049 p.GetErrorHandler().Recover(p, v) 15050 p.SetError(nil) 15051 } 15052 p.ExitRule() 15053 return localctx 15054 goto errorExit // Trick to prevent compiler error if the label is not used 15055 } 15056 15057 // IReceiverSideContext is an interface to support dynamic dispatch. 15058 type IReceiverSideContext interface { 15059 antlr.ParserRuleContext 15060 15061 // GetParser returns the parser. 15062 GetParser() antlr.Parser 15063 15064 // Getter signatures 15065 ChainedNormConn() IChainedNormConnContext 15066 SingleReceiverSide() ISingleReceiverSideContext 15067 MultipleReceiverSide() IMultipleReceiverSideContext 15068 15069 // IsReceiverSideContext differentiates from other interfaces. 15070 IsReceiverSideContext() 15071 } 15072 15073 type ReceiverSideContext struct { 15074 antlr.BaseParserRuleContext 15075 parser antlr.Parser 15076 } 15077 15078 func NewEmptyReceiverSideContext() *ReceiverSideContext { 15079 var p = new(ReceiverSideContext) 15080 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 15081 p.RuleIndex = nevaParserRULE_receiverSide 15082 return p 15083 } 15084 15085 func InitEmptyReceiverSideContext(p *ReceiverSideContext) { 15086 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 15087 p.RuleIndex = nevaParserRULE_receiverSide 15088 } 15089 15090 func (*ReceiverSideContext) IsReceiverSideContext() {} 15091 15092 func NewReceiverSideContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ReceiverSideContext { 15093 var p = new(ReceiverSideContext) 15094 15095 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 15096 15097 p.parser = parser 15098 p.RuleIndex = nevaParserRULE_receiverSide 15099 15100 return p 15101 } 15102 15103 func (s *ReceiverSideContext) GetParser() antlr.Parser { return s.parser } 15104 15105 func (s *ReceiverSideContext) ChainedNormConn() IChainedNormConnContext { 15106 var t antlr.RuleContext 15107 for _, ctx := range s.GetChildren() { 15108 if _, ok := ctx.(IChainedNormConnContext); ok { 15109 t = ctx.(antlr.RuleContext) 15110 break 15111 } 15112 } 15113 15114 if t == nil { 15115 return nil 15116 } 15117 15118 return t.(IChainedNormConnContext) 15119 } 15120 15121 func (s *ReceiverSideContext) SingleReceiverSide() ISingleReceiverSideContext { 15122 var t antlr.RuleContext 15123 for _, ctx := range s.GetChildren() { 15124 if _, ok := ctx.(ISingleReceiverSideContext); ok { 15125 t = ctx.(antlr.RuleContext) 15126 break 15127 } 15128 } 15129 15130 if t == nil { 15131 return nil 15132 } 15133 15134 return t.(ISingleReceiverSideContext) 15135 } 15136 15137 func (s *ReceiverSideContext) MultipleReceiverSide() IMultipleReceiverSideContext { 15138 var t antlr.RuleContext 15139 for _, ctx := range s.GetChildren() { 15140 if _, ok := ctx.(IMultipleReceiverSideContext); ok { 15141 t = ctx.(antlr.RuleContext) 15142 break 15143 } 15144 } 15145 15146 if t == nil { 15147 return nil 15148 } 15149 15150 return t.(IMultipleReceiverSideContext) 15151 } 15152 15153 func (s *ReceiverSideContext) GetRuleContext() antlr.RuleContext { 15154 return s 15155 } 15156 15157 func (s *ReceiverSideContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 15158 return antlr.TreesStringTree(s, ruleNames, recog) 15159 } 15160 15161 func (s *ReceiverSideContext) EnterRule(listener antlr.ParseTreeListener) { 15162 if listenerT, ok := listener.(nevaListener); ok { 15163 listenerT.EnterReceiverSide(s) 15164 } 15165 } 15166 15167 func (s *ReceiverSideContext) ExitRule(listener antlr.ParseTreeListener) { 15168 if listenerT, ok := listener.(nevaListener); ok { 15169 listenerT.ExitReceiverSide(s) 15170 } 15171 } 15172 15173 func (p *nevaParser) ReceiverSide() (localctx IReceiverSideContext) { 15174 localctx = NewReceiverSideContext(p, p.GetParserRuleContext(), p.GetState()) 15175 p.EnterRule(localctx, 162, nevaParserRULE_receiverSide) 15176 p.SetState(1114) 15177 p.GetErrorHandler().Sync(p) 15178 if p.HasError() { 15179 goto errorExit 15180 } 15181 15182 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 153, p.GetParserRuleContext()) { 15183 case 1: 15184 p.EnterOuterAlt(localctx, 1) 15185 { 15186 p.SetState(1111) 15187 p.ChainedNormConn() 15188 } 15189 15190 case 2: 15191 p.EnterOuterAlt(localctx, 2) 15192 { 15193 p.SetState(1112) 15194 p.SingleReceiverSide() 15195 } 15196 15197 case 3: 15198 p.EnterOuterAlt(localctx, 3) 15199 { 15200 p.SetState(1113) 15201 p.MultipleReceiverSide() 15202 } 15203 15204 case antlr.ATNInvalidAltNumber: 15205 goto errorExit 15206 } 15207 15208 errorExit: 15209 if p.HasError() { 15210 v := p.GetError() 15211 localctx.SetException(v) 15212 p.GetErrorHandler().ReportError(p, v) 15213 p.GetErrorHandler().Recover(p, v) 15214 p.SetError(nil) 15215 } 15216 p.ExitRule() 15217 return localctx 15218 goto errorExit // Trick to prevent compiler error if the label is not used 15219 } 15220 15221 // IChainedNormConnContext is an interface to support dynamic dispatch. 15222 type IChainedNormConnContext interface { 15223 antlr.ParserRuleContext 15224 15225 // GetParser returns the parser. 15226 GetParser() antlr.Parser 15227 15228 // Getter signatures 15229 NormConnDef() INormConnDefContext 15230 15231 // IsChainedNormConnContext differentiates from other interfaces. 15232 IsChainedNormConnContext() 15233 } 15234 15235 type ChainedNormConnContext struct { 15236 antlr.BaseParserRuleContext 15237 parser antlr.Parser 15238 } 15239 15240 func NewEmptyChainedNormConnContext() *ChainedNormConnContext { 15241 var p = new(ChainedNormConnContext) 15242 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 15243 p.RuleIndex = nevaParserRULE_chainedNormConn 15244 return p 15245 } 15246 15247 func InitEmptyChainedNormConnContext(p *ChainedNormConnContext) { 15248 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 15249 p.RuleIndex = nevaParserRULE_chainedNormConn 15250 } 15251 15252 func (*ChainedNormConnContext) IsChainedNormConnContext() {} 15253 15254 func NewChainedNormConnContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ChainedNormConnContext { 15255 var p = new(ChainedNormConnContext) 15256 15257 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 15258 15259 p.parser = parser 15260 p.RuleIndex = nevaParserRULE_chainedNormConn 15261 15262 return p 15263 } 15264 15265 func (s *ChainedNormConnContext) GetParser() antlr.Parser { return s.parser } 15266 15267 func (s *ChainedNormConnContext) NormConnDef() INormConnDefContext { 15268 var t antlr.RuleContext 15269 for _, ctx := range s.GetChildren() { 15270 if _, ok := ctx.(INormConnDefContext); ok { 15271 t = ctx.(antlr.RuleContext) 15272 break 15273 } 15274 } 15275 15276 if t == nil { 15277 return nil 15278 } 15279 15280 return t.(INormConnDefContext) 15281 } 15282 15283 func (s *ChainedNormConnContext) GetRuleContext() antlr.RuleContext { 15284 return s 15285 } 15286 15287 func (s *ChainedNormConnContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 15288 return antlr.TreesStringTree(s, ruleNames, recog) 15289 } 15290 15291 func (s *ChainedNormConnContext) EnterRule(listener antlr.ParseTreeListener) { 15292 if listenerT, ok := listener.(nevaListener); ok { 15293 listenerT.EnterChainedNormConn(s) 15294 } 15295 } 15296 15297 func (s *ChainedNormConnContext) ExitRule(listener antlr.ParseTreeListener) { 15298 if listenerT, ok := listener.(nevaListener); ok { 15299 listenerT.ExitChainedNormConn(s) 15300 } 15301 } 15302 15303 func (p *nevaParser) ChainedNormConn() (localctx IChainedNormConnContext) { 15304 localctx = NewChainedNormConnContext(p, p.GetParserRuleContext(), p.GetState()) 15305 p.EnterRule(localctx, 164, nevaParserRULE_chainedNormConn) 15306 p.EnterOuterAlt(localctx, 1) 15307 { 15308 p.SetState(1116) 15309 p.NormConnDef() 15310 } 15311 15312 errorExit: 15313 if p.HasError() { 15314 v := p.GetError() 15315 localctx.SetException(v) 15316 p.GetErrorHandler().ReportError(p, v) 15317 p.GetErrorHandler().Recover(p, v) 15318 p.SetError(nil) 15319 } 15320 p.ExitRule() 15321 return localctx 15322 goto errorExit // Trick to prevent compiler error if the label is not used 15323 } 15324 15325 // IDeferredConnContext is an interface to support dynamic dispatch. 15326 type IDeferredConnContext interface { 15327 antlr.ParserRuleContext 15328 15329 // GetParser returns the parser. 15330 GetParser() antlr.Parser 15331 15332 // Getter signatures 15333 ConnDef() IConnDefContext 15334 AllNEWLINE() []antlr.TerminalNode 15335 NEWLINE(i int) antlr.TerminalNode 15336 15337 // IsDeferredConnContext differentiates from other interfaces. 15338 IsDeferredConnContext() 15339 } 15340 15341 type DeferredConnContext struct { 15342 antlr.BaseParserRuleContext 15343 parser antlr.Parser 15344 } 15345 15346 func NewEmptyDeferredConnContext() *DeferredConnContext { 15347 var p = new(DeferredConnContext) 15348 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 15349 p.RuleIndex = nevaParserRULE_deferredConn 15350 return p 15351 } 15352 15353 func InitEmptyDeferredConnContext(p *DeferredConnContext) { 15354 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 15355 p.RuleIndex = nevaParserRULE_deferredConn 15356 } 15357 15358 func (*DeferredConnContext) IsDeferredConnContext() {} 15359 15360 func NewDeferredConnContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *DeferredConnContext { 15361 var p = new(DeferredConnContext) 15362 15363 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 15364 15365 p.parser = parser 15366 p.RuleIndex = nevaParserRULE_deferredConn 15367 15368 return p 15369 } 15370 15371 func (s *DeferredConnContext) GetParser() antlr.Parser { return s.parser } 15372 15373 func (s *DeferredConnContext) ConnDef() IConnDefContext { 15374 var t antlr.RuleContext 15375 for _, ctx := range s.GetChildren() { 15376 if _, ok := ctx.(IConnDefContext); ok { 15377 t = ctx.(antlr.RuleContext) 15378 break 15379 } 15380 } 15381 15382 if t == nil { 15383 return nil 15384 } 15385 15386 return t.(IConnDefContext) 15387 } 15388 15389 func (s *DeferredConnContext) AllNEWLINE() []antlr.TerminalNode { 15390 return s.GetTokens(nevaParserNEWLINE) 15391 } 15392 15393 func (s *DeferredConnContext) NEWLINE(i int) antlr.TerminalNode { 15394 return s.GetToken(nevaParserNEWLINE, i) 15395 } 15396 15397 func (s *DeferredConnContext) GetRuleContext() antlr.RuleContext { 15398 return s 15399 } 15400 15401 func (s *DeferredConnContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 15402 return antlr.TreesStringTree(s, ruleNames, recog) 15403 } 15404 15405 func (s *DeferredConnContext) EnterRule(listener antlr.ParseTreeListener) { 15406 if listenerT, ok := listener.(nevaListener); ok { 15407 listenerT.EnterDeferredConn(s) 15408 } 15409 } 15410 15411 func (s *DeferredConnContext) ExitRule(listener antlr.ParseTreeListener) { 15412 if listenerT, ok := listener.(nevaListener); ok { 15413 listenerT.ExitDeferredConn(s) 15414 } 15415 } 15416 15417 func (p *nevaParser) DeferredConn() (localctx IDeferredConnContext) { 15418 localctx = NewDeferredConnContext(p, p.GetParserRuleContext(), p.GetState()) 15419 p.EnterRule(localctx, 166, nevaParserRULE_deferredConn) 15420 var _la int 15421 15422 p.EnterOuterAlt(localctx, 1) 15423 { 15424 p.SetState(1118) 15425 p.Match(nevaParserT__1) 15426 if p.HasError() { 15427 // Recognition error - abort rule 15428 goto errorExit 15429 } 15430 } 15431 p.SetState(1122) 15432 p.GetErrorHandler().Sync(p) 15433 if p.HasError() { 15434 goto errorExit 15435 } 15436 _la = p.GetTokenStream().LA(1) 15437 15438 for _la == nevaParserNEWLINE { 15439 { 15440 p.SetState(1119) 15441 p.Match(nevaParserNEWLINE) 15442 if p.HasError() { 15443 // Recognition error - abort rule 15444 goto errorExit 15445 } 15446 } 15447 15448 p.SetState(1124) 15449 p.GetErrorHandler().Sync(p) 15450 if p.HasError() { 15451 goto errorExit 15452 } 15453 _la = p.GetTokenStream().LA(1) 15454 } 15455 { 15456 p.SetState(1125) 15457 p.ConnDef() 15458 } 15459 p.SetState(1129) 15460 p.GetErrorHandler().Sync(p) 15461 if p.HasError() { 15462 goto errorExit 15463 } 15464 _la = p.GetTokenStream().LA(1) 15465 15466 for _la == nevaParserNEWLINE { 15467 { 15468 p.SetState(1126) 15469 p.Match(nevaParserNEWLINE) 15470 if p.HasError() { 15471 // Recognition error - abort rule 15472 goto errorExit 15473 } 15474 } 15475 15476 p.SetState(1131) 15477 p.GetErrorHandler().Sync(p) 15478 if p.HasError() { 15479 goto errorExit 15480 } 15481 _la = p.GetTokenStream().LA(1) 15482 } 15483 { 15484 p.SetState(1132) 15485 p.Match(nevaParserT__3) 15486 if p.HasError() { 15487 // Recognition error - abort rule 15488 goto errorExit 15489 } 15490 } 15491 15492 errorExit: 15493 if p.HasError() { 15494 v := p.GetError() 15495 localctx.SetException(v) 15496 p.GetErrorHandler().ReportError(p, v) 15497 p.GetErrorHandler().Recover(p, v) 15498 p.SetError(nil) 15499 } 15500 p.ExitRule() 15501 return localctx 15502 goto errorExit // Trick to prevent compiler error if the label is not used 15503 } 15504 15505 // ISenderConstRefContext is an interface to support dynamic dispatch. 15506 type ISenderConstRefContext interface { 15507 antlr.ParserRuleContext 15508 15509 // GetParser returns the parser. 15510 GetParser() antlr.Parser 15511 15512 // Getter signatures 15513 EntityRef() IEntityRefContext 15514 15515 // IsSenderConstRefContext differentiates from other interfaces. 15516 IsSenderConstRefContext() 15517 } 15518 15519 type SenderConstRefContext struct { 15520 antlr.BaseParserRuleContext 15521 parser antlr.Parser 15522 } 15523 15524 func NewEmptySenderConstRefContext() *SenderConstRefContext { 15525 var p = new(SenderConstRefContext) 15526 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 15527 p.RuleIndex = nevaParserRULE_senderConstRef 15528 return p 15529 } 15530 15531 func InitEmptySenderConstRefContext(p *SenderConstRefContext) { 15532 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 15533 p.RuleIndex = nevaParserRULE_senderConstRef 15534 } 15535 15536 func (*SenderConstRefContext) IsSenderConstRefContext() {} 15537 15538 func NewSenderConstRefContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SenderConstRefContext { 15539 var p = new(SenderConstRefContext) 15540 15541 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 15542 15543 p.parser = parser 15544 p.RuleIndex = nevaParserRULE_senderConstRef 15545 15546 return p 15547 } 15548 15549 func (s *SenderConstRefContext) GetParser() antlr.Parser { return s.parser } 15550 15551 func (s *SenderConstRefContext) EntityRef() IEntityRefContext { 15552 var t antlr.RuleContext 15553 for _, ctx := range s.GetChildren() { 15554 if _, ok := ctx.(IEntityRefContext); ok { 15555 t = ctx.(antlr.RuleContext) 15556 break 15557 } 15558 } 15559 15560 if t == nil { 15561 return nil 15562 } 15563 15564 return t.(IEntityRefContext) 15565 } 15566 15567 func (s *SenderConstRefContext) GetRuleContext() antlr.RuleContext { 15568 return s 15569 } 15570 15571 func (s *SenderConstRefContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 15572 return antlr.TreesStringTree(s, ruleNames, recog) 15573 } 15574 15575 func (s *SenderConstRefContext) EnterRule(listener antlr.ParseTreeListener) { 15576 if listenerT, ok := listener.(nevaListener); ok { 15577 listenerT.EnterSenderConstRef(s) 15578 } 15579 } 15580 15581 func (s *SenderConstRefContext) ExitRule(listener antlr.ParseTreeListener) { 15582 if listenerT, ok := listener.(nevaListener); ok { 15583 listenerT.ExitSenderConstRef(s) 15584 } 15585 } 15586 15587 func (p *nevaParser) SenderConstRef() (localctx ISenderConstRefContext) { 15588 localctx = NewSenderConstRefContext(p, p.GetParserRuleContext(), p.GetState()) 15589 p.EnterRule(localctx, 168, nevaParserRULE_senderConstRef) 15590 p.EnterOuterAlt(localctx, 1) 15591 { 15592 p.SetState(1134) 15593 p.Match(nevaParserT__32) 15594 if p.HasError() { 15595 // Recognition error - abort rule 15596 goto errorExit 15597 } 15598 } 15599 { 15600 p.SetState(1135) 15601 p.EntityRef() 15602 } 15603 15604 errorExit: 15605 if p.HasError() { 15606 v := p.GetError() 15607 localctx.SetException(v) 15608 p.GetErrorHandler().ReportError(p, v) 15609 p.GetErrorHandler().Recover(p, v) 15610 p.SetError(nil) 15611 } 15612 p.ExitRule() 15613 return localctx 15614 goto errorExit // Trick to prevent compiler error if the label is not used 15615 } 15616 15617 // IPortAddrContext is an interface to support dynamic dispatch. 15618 type IPortAddrContext interface { 15619 antlr.ParserRuleContext 15620 15621 // GetParser returns the parser. 15622 GetParser() antlr.Parser 15623 15624 // Getter signatures 15625 SinglePortAddr() ISinglePortAddrContext 15626 ArrPortAddr() IArrPortAddrContext 15627 LonelySinglePortAddr() ILonelySinglePortAddrContext 15628 LonelyArrPortAddr() ILonelyArrPortAddrContext 15629 15630 // IsPortAddrContext differentiates from other interfaces. 15631 IsPortAddrContext() 15632 } 15633 15634 type PortAddrContext struct { 15635 antlr.BaseParserRuleContext 15636 parser antlr.Parser 15637 } 15638 15639 func NewEmptyPortAddrContext() *PortAddrContext { 15640 var p = new(PortAddrContext) 15641 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 15642 p.RuleIndex = nevaParserRULE_portAddr 15643 return p 15644 } 15645 15646 func InitEmptyPortAddrContext(p *PortAddrContext) { 15647 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 15648 p.RuleIndex = nevaParserRULE_portAddr 15649 } 15650 15651 func (*PortAddrContext) IsPortAddrContext() {} 15652 15653 func NewPortAddrContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PortAddrContext { 15654 var p = new(PortAddrContext) 15655 15656 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 15657 15658 p.parser = parser 15659 p.RuleIndex = nevaParserRULE_portAddr 15660 15661 return p 15662 } 15663 15664 func (s *PortAddrContext) GetParser() antlr.Parser { return s.parser } 15665 15666 func (s *PortAddrContext) SinglePortAddr() ISinglePortAddrContext { 15667 var t antlr.RuleContext 15668 for _, ctx := range s.GetChildren() { 15669 if _, ok := ctx.(ISinglePortAddrContext); ok { 15670 t = ctx.(antlr.RuleContext) 15671 break 15672 } 15673 } 15674 15675 if t == nil { 15676 return nil 15677 } 15678 15679 return t.(ISinglePortAddrContext) 15680 } 15681 15682 func (s *PortAddrContext) ArrPortAddr() IArrPortAddrContext { 15683 var t antlr.RuleContext 15684 for _, ctx := range s.GetChildren() { 15685 if _, ok := ctx.(IArrPortAddrContext); ok { 15686 t = ctx.(antlr.RuleContext) 15687 break 15688 } 15689 } 15690 15691 if t == nil { 15692 return nil 15693 } 15694 15695 return t.(IArrPortAddrContext) 15696 } 15697 15698 func (s *PortAddrContext) LonelySinglePortAddr() ILonelySinglePortAddrContext { 15699 var t antlr.RuleContext 15700 for _, ctx := range s.GetChildren() { 15701 if _, ok := ctx.(ILonelySinglePortAddrContext); ok { 15702 t = ctx.(antlr.RuleContext) 15703 break 15704 } 15705 } 15706 15707 if t == nil { 15708 return nil 15709 } 15710 15711 return t.(ILonelySinglePortAddrContext) 15712 } 15713 15714 func (s *PortAddrContext) LonelyArrPortAddr() ILonelyArrPortAddrContext { 15715 var t antlr.RuleContext 15716 for _, ctx := range s.GetChildren() { 15717 if _, ok := ctx.(ILonelyArrPortAddrContext); ok { 15718 t = ctx.(antlr.RuleContext) 15719 break 15720 } 15721 } 15722 15723 if t == nil { 15724 return nil 15725 } 15726 15727 return t.(ILonelyArrPortAddrContext) 15728 } 15729 15730 func (s *PortAddrContext) GetRuleContext() antlr.RuleContext { 15731 return s 15732 } 15733 15734 func (s *PortAddrContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 15735 return antlr.TreesStringTree(s, ruleNames, recog) 15736 } 15737 15738 func (s *PortAddrContext) EnterRule(listener antlr.ParseTreeListener) { 15739 if listenerT, ok := listener.(nevaListener); ok { 15740 listenerT.EnterPortAddr(s) 15741 } 15742 } 15743 15744 func (s *PortAddrContext) ExitRule(listener antlr.ParseTreeListener) { 15745 if listenerT, ok := listener.(nevaListener); ok { 15746 listenerT.ExitPortAddr(s) 15747 } 15748 } 15749 15750 func (p *nevaParser) PortAddr() (localctx IPortAddrContext) { 15751 localctx = NewPortAddrContext(p, p.GetParserRuleContext(), p.GetState()) 15752 p.EnterRule(localctx, 170, nevaParserRULE_portAddr) 15753 p.SetState(1141) 15754 p.GetErrorHandler().Sync(p) 15755 if p.HasError() { 15756 goto errorExit 15757 } 15758 15759 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 156, p.GetParserRuleContext()) { 15760 case 1: 15761 p.EnterOuterAlt(localctx, 1) 15762 { 15763 p.SetState(1137) 15764 p.SinglePortAddr() 15765 } 15766 15767 case 2: 15768 p.EnterOuterAlt(localctx, 2) 15769 { 15770 p.SetState(1138) 15771 p.ArrPortAddr() 15772 } 15773 15774 case 3: 15775 p.EnterOuterAlt(localctx, 3) 15776 { 15777 p.SetState(1139) 15778 p.LonelySinglePortAddr() 15779 } 15780 15781 case 4: 15782 p.EnterOuterAlt(localctx, 4) 15783 { 15784 p.SetState(1140) 15785 p.LonelyArrPortAddr() 15786 } 15787 15788 case antlr.ATNInvalidAltNumber: 15789 goto errorExit 15790 } 15791 15792 errorExit: 15793 if p.HasError() { 15794 v := p.GetError() 15795 localctx.SetException(v) 15796 p.GetErrorHandler().ReportError(p, v) 15797 p.GetErrorHandler().Recover(p, v) 15798 p.SetError(nil) 15799 } 15800 p.ExitRule() 15801 return localctx 15802 goto errorExit // Trick to prevent compiler error if the label is not used 15803 } 15804 15805 // ILonelySinglePortAddrContext is an interface to support dynamic dispatch. 15806 type ILonelySinglePortAddrContext interface { 15807 antlr.ParserRuleContext 15808 15809 // GetParser returns the parser. 15810 GetParser() antlr.Parser 15811 15812 // Getter signatures 15813 PortAddrNode() IPortAddrNodeContext 15814 15815 // IsLonelySinglePortAddrContext differentiates from other interfaces. 15816 IsLonelySinglePortAddrContext() 15817 } 15818 15819 type LonelySinglePortAddrContext struct { 15820 antlr.BaseParserRuleContext 15821 parser antlr.Parser 15822 } 15823 15824 func NewEmptyLonelySinglePortAddrContext() *LonelySinglePortAddrContext { 15825 var p = new(LonelySinglePortAddrContext) 15826 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 15827 p.RuleIndex = nevaParserRULE_lonelySinglePortAddr 15828 return p 15829 } 15830 15831 func InitEmptyLonelySinglePortAddrContext(p *LonelySinglePortAddrContext) { 15832 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 15833 p.RuleIndex = nevaParserRULE_lonelySinglePortAddr 15834 } 15835 15836 func (*LonelySinglePortAddrContext) IsLonelySinglePortAddrContext() {} 15837 15838 func NewLonelySinglePortAddrContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LonelySinglePortAddrContext { 15839 var p = new(LonelySinglePortAddrContext) 15840 15841 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 15842 15843 p.parser = parser 15844 p.RuleIndex = nevaParserRULE_lonelySinglePortAddr 15845 15846 return p 15847 } 15848 15849 func (s *LonelySinglePortAddrContext) GetParser() antlr.Parser { return s.parser } 15850 15851 func (s *LonelySinglePortAddrContext) PortAddrNode() IPortAddrNodeContext { 15852 var t antlr.RuleContext 15853 for _, ctx := range s.GetChildren() { 15854 if _, ok := ctx.(IPortAddrNodeContext); ok { 15855 t = ctx.(antlr.RuleContext) 15856 break 15857 } 15858 } 15859 15860 if t == nil { 15861 return nil 15862 } 15863 15864 return t.(IPortAddrNodeContext) 15865 } 15866 15867 func (s *LonelySinglePortAddrContext) GetRuleContext() antlr.RuleContext { 15868 return s 15869 } 15870 15871 func (s *LonelySinglePortAddrContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 15872 return antlr.TreesStringTree(s, ruleNames, recog) 15873 } 15874 15875 func (s *LonelySinglePortAddrContext) EnterRule(listener antlr.ParseTreeListener) { 15876 if listenerT, ok := listener.(nevaListener); ok { 15877 listenerT.EnterLonelySinglePortAddr(s) 15878 } 15879 } 15880 15881 func (s *LonelySinglePortAddrContext) ExitRule(listener antlr.ParseTreeListener) { 15882 if listenerT, ok := listener.(nevaListener); ok { 15883 listenerT.ExitLonelySinglePortAddr(s) 15884 } 15885 } 15886 15887 func (p *nevaParser) LonelySinglePortAddr() (localctx ILonelySinglePortAddrContext) { 15888 localctx = NewLonelySinglePortAddrContext(p, p.GetParserRuleContext(), p.GetState()) 15889 p.EnterRule(localctx, 172, nevaParserRULE_lonelySinglePortAddr) 15890 p.EnterOuterAlt(localctx, 1) 15891 { 15892 p.SetState(1143) 15893 p.PortAddrNode() 15894 } 15895 15896 errorExit: 15897 if p.HasError() { 15898 v := p.GetError() 15899 localctx.SetException(v) 15900 p.GetErrorHandler().ReportError(p, v) 15901 p.GetErrorHandler().Recover(p, v) 15902 p.SetError(nil) 15903 } 15904 p.ExitRule() 15905 return localctx 15906 goto errorExit // Trick to prevent compiler error if the label is not used 15907 } 15908 15909 // ILonelyArrPortAddrContext is an interface to support dynamic dispatch. 15910 type ILonelyArrPortAddrContext interface { 15911 antlr.ParserRuleContext 15912 15913 // GetParser returns the parser. 15914 GetParser() antlr.Parser 15915 15916 // Getter signatures 15917 PortAddrNode() IPortAddrNodeContext 15918 PortAddrIdx() IPortAddrIdxContext 15919 15920 // IsLonelyArrPortAddrContext differentiates from other interfaces. 15921 IsLonelyArrPortAddrContext() 15922 } 15923 15924 type LonelyArrPortAddrContext struct { 15925 antlr.BaseParserRuleContext 15926 parser antlr.Parser 15927 } 15928 15929 func NewEmptyLonelyArrPortAddrContext() *LonelyArrPortAddrContext { 15930 var p = new(LonelyArrPortAddrContext) 15931 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 15932 p.RuleIndex = nevaParserRULE_lonelyArrPortAddr 15933 return p 15934 } 15935 15936 func InitEmptyLonelyArrPortAddrContext(p *LonelyArrPortAddrContext) { 15937 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 15938 p.RuleIndex = nevaParserRULE_lonelyArrPortAddr 15939 } 15940 15941 func (*LonelyArrPortAddrContext) IsLonelyArrPortAddrContext() {} 15942 15943 func NewLonelyArrPortAddrContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LonelyArrPortAddrContext { 15944 var p = new(LonelyArrPortAddrContext) 15945 15946 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 15947 15948 p.parser = parser 15949 p.RuleIndex = nevaParserRULE_lonelyArrPortAddr 15950 15951 return p 15952 } 15953 15954 func (s *LonelyArrPortAddrContext) GetParser() antlr.Parser { return s.parser } 15955 15956 func (s *LonelyArrPortAddrContext) PortAddrNode() IPortAddrNodeContext { 15957 var t antlr.RuleContext 15958 for _, ctx := range s.GetChildren() { 15959 if _, ok := ctx.(IPortAddrNodeContext); ok { 15960 t = ctx.(antlr.RuleContext) 15961 break 15962 } 15963 } 15964 15965 if t == nil { 15966 return nil 15967 } 15968 15969 return t.(IPortAddrNodeContext) 15970 } 15971 15972 func (s *LonelyArrPortAddrContext) PortAddrIdx() IPortAddrIdxContext { 15973 var t antlr.RuleContext 15974 for _, ctx := range s.GetChildren() { 15975 if _, ok := ctx.(IPortAddrIdxContext); ok { 15976 t = ctx.(antlr.RuleContext) 15977 break 15978 } 15979 } 15980 15981 if t == nil { 15982 return nil 15983 } 15984 15985 return t.(IPortAddrIdxContext) 15986 } 15987 15988 func (s *LonelyArrPortAddrContext) GetRuleContext() antlr.RuleContext { 15989 return s 15990 } 15991 15992 func (s *LonelyArrPortAddrContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 15993 return antlr.TreesStringTree(s, ruleNames, recog) 15994 } 15995 15996 func (s *LonelyArrPortAddrContext) EnterRule(listener antlr.ParseTreeListener) { 15997 if listenerT, ok := listener.(nevaListener); ok { 15998 listenerT.EnterLonelyArrPortAddr(s) 15999 } 16000 } 16001 16002 func (s *LonelyArrPortAddrContext) ExitRule(listener antlr.ParseTreeListener) { 16003 if listenerT, ok := listener.(nevaListener); ok { 16004 listenerT.ExitLonelyArrPortAddr(s) 16005 } 16006 } 16007 16008 func (p *nevaParser) LonelyArrPortAddr() (localctx ILonelyArrPortAddrContext) { 16009 localctx = NewLonelyArrPortAddrContext(p, p.GetParserRuleContext(), p.GetState()) 16010 p.EnterRule(localctx, 174, nevaParserRULE_lonelyArrPortAddr) 16011 p.EnterOuterAlt(localctx, 1) 16012 { 16013 p.SetState(1145) 16014 p.PortAddrNode() 16015 } 16016 { 16017 p.SetState(1146) 16018 p.PortAddrIdx() 16019 } 16020 16021 errorExit: 16022 if p.HasError() { 16023 v := p.GetError() 16024 localctx.SetException(v) 16025 p.GetErrorHandler().ReportError(p, v) 16026 p.GetErrorHandler().Recover(p, v) 16027 p.SetError(nil) 16028 } 16029 p.ExitRule() 16030 return localctx 16031 goto errorExit // Trick to prevent compiler error if the label is not used 16032 } 16033 16034 // ISinglePortAddrContext is an interface to support dynamic dispatch. 16035 type ISinglePortAddrContext interface { 16036 antlr.ParserRuleContext 16037 16038 // GetParser returns the parser. 16039 GetParser() antlr.Parser 16040 16041 // Getter signatures 16042 PortAddrPort() IPortAddrPortContext 16043 PortAddrNode() IPortAddrNodeContext 16044 16045 // IsSinglePortAddrContext differentiates from other interfaces. 16046 IsSinglePortAddrContext() 16047 } 16048 16049 type SinglePortAddrContext struct { 16050 antlr.BaseParserRuleContext 16051 parser antlr.Parser 16052 } 16053 16054 func NewEmptySinglePortAddrContext() *SinglePortAddrContext { 16055 var p = new(SinglePortAddrContext) 16056 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 16057 p.RuleIndex = nevaParserRULE_singlePortAddr 16058 return p 16059 } 16060 16061 func InitEmptySinglePortAddrContext(p *SinglePortAddrContext) { 16062 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 16063 p.RuleIndex = nevaParserRULE_singlePortAddr 16064 } 16065 16066 func (*SinglePortAddrContext) IsSinglePortAddrContext() {} 16067 16068 func NewSinglePortAddrContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SinglePortAddrContext { 16069 var p = new(SinglePortAddrContext) 16070 16071 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 16072 16073 p.parser = parser 16074 p.RuleIndex = nevaParserRULE_singlePortAddr 16075 16076 return p 16077 } 16078 16079 func (s *SinglePortAddrContext) GetParser() antlr.Parser { return s.parser } 16080 16081 func (s *SinglePortAddrContext) PortAddrPort() IPortAddrPortContext { 16082 var t antlr.RuleContext 16083 for _, ctx := range s.GetChildren() { 16084 if _, ok := ctx.(IPortAddrPortContext); ok { 16085 t = ctx.(antlr.RuleContext) 16086 break 16087 } 16088 } 16089 16090 if t == nil { 16091 return nil 16092 } 16093 16094 return t.(IPortAddrPortContext) 16095 } 16096 16097 func (s *SinglePortAddrContext) PortAddrNode() IPortAddrNodeContext { 16098 var t antlr.RuleContext 16099 for _, ctx := range s.GetChildren() { 16100 if _, ok := ctx.(IPortAddrNodeContext); ok { 16101 t = ctx.(antlr.RuleContext) 16102 break 16103 } 16104 } 16105 16106 if t == nil { 16107 return nil 16108 } 16109 16110 return t.(IPortAddrNodeContext) 16111 } 16112 16113 func (s *SinglePortAddrContext) GetRuleContext() antlr.RuleContext { 16114 return s 16115 } 16116 16117 func (s *SinglePortAddrContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 16118 return antlr.TreesStringTree(s, ruleNames, recog) 16119 } 16120 16121 func (s *SinglePortAddrContext) EnterRule(listener antlr.ParseTreeListener) { 16122 if listenerT, ok := listener.(nevaListener); ok { 16123 listenerT.EnterSinglePortAddr(s) 16124 } 16125 } 16126 16127 func (s *SinglePortAddrContext) ExitRule(listener antlr.ParseTreeListener) { 16128 if listenerT, ok := listener.(nevaListener); ok { 16129 listenerT.ExitSinglePortAddr(s) 16130 } 16131 } 16132 16133 func (p *nevaParser) SinglePortAddr() (localctx ISinglePortAddrContext) { 16134 localctx = NewSinglePortAddrContext(p, p.GetParserRuleContext(), p.GetState()) 16135 p.EnterRule(localctx, 176, nevaParserRULE_singlePortAddr) 16136 var _la int 16137 16138 p.EnterOuterAlt(localctx, 1) 16139 p.SetState(1149) 16140 p.GetErrorHandler().Sync(p) 16141 if p.HasError() { 16142 goto errorExit 16143 } 16144 _la = p.GetTokenStream().LA(1) 16145 16146 if _la == nevaParserIDENTIFIER { 16147 { 16148 p.SetState(1148) 16149 p.PortAddrNode() 16150 } 16151 16152 } 16153 { 16154 p.SetState(1151) 16155 p.Match(nevaParserT__7) 16156 if p.HasError() { 16157 // Recognition error - abort rule 16158 goto errorExit 16159 } 16160 } 16161 { 16162 p.SetState(1152) 16163 p.PortAddrPort() 16164 } 16165 16166 errorExit: 16167 if p.HasError() { 16168 v := p.GetError() 16169 localctx.SetException(v) 16170 p.GetErrorHandler().ReportError(p, v) 16171 p.GetErrorHandler().Recover(p, v) 16172 p.SetError(nil) 16173 } 16174 p.ExitRule() 16175 return localctx 16176 goto errorExit // Trick to prevent compiler error if the label is not used 16177 } 16178 16179 // IArrPortAddrContext is an interface to support dynamic dispatch. 16180 type IArrPortAddrContext interface { 16181 antlr.ParserRuleContext 16182 16183 // GetParser returns the parser. 16184 GetParser() antlr.Parser 16185 16186 // Getter signatures 16187 PortAddrPort() IPortAddrPortContext 16188 PortAddrIdx() IPortAddrIdxContext 16189 PortAddrNode() IPortAddrNodeContext 16190 16191 // IsArrPortAddrContext differentiates from other interfaces. 16192 IsArrPortAddrContext() 16193 } 16194 16195 type ArrPortAddrContext struct { 16196 antlr.BaseParserRuleContext 16197 parser antlr.Parser 16198 } 16199 16200 func NewEmptyArrPortAddrContext() *ArrPortAddrContext { 16201 var p = new(ArrPortAddrContext) 16202 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 16203 p.RuleIndex = nevaParserRULE_arrPortAddr 16204 return p 16205 } 16206 16207 func InitEmptyArrPortAddrContext(p *ArrPortAddrContext) { 16208 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 16209 p.RuleIndex = nevaParserRULE_arrPortAddr 16210 } 16211 16212 func (*ArrPortAddrContext) IsArrPortAddrContext() {} 16213 16214 func NewArrPortAddrContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ArrPortAddrContext { 16215 var p = new(ArrPortAddrContext) 16216 16217 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 16218 16219 p.parser = parser 16220 p.RuleIndex = nevaParserRULE_arrPortAddr 16221 16222 return p 16223 } 16224 16225 func (s *ArrPortAddrContext) GetParser() antlr.Parser { return s.parser } 16226 16227 func (s *ArrPortAddrContext) PortAddrPort() IPortAddrPortContext { 16228 var t antlr.RuleContext 16229 for _, ctx := range s.GetChildren() { 16230 if _, ok := ctx.(IPortAddrPortContext); ok { 16231 t = ctx.(antlr.RuleContext) 16232 break 16233 } 16234 } 16235 16236 if t == nil { 16237 return nil 16238 } 16239 16240 return t.(IPortAddrPortContext) 16241 } 16242 16243 func (s *ArrPortAddrContext) PortAddrIdx() IPortAddrIdxContext { 16244 var t antlr.RuleContext 16245 for _, ctx := range s.GetChildren() { 16246 if _, ok := ctx.(IPortAddrIdxContext); ok { 16247 t = ctx.(antlr.RuleContext) 16248 break 16249 } 16250 } 16251 16252 if t == nil { 16253 return nil 16254 } 16255 16256 return t.(IPortAddrIdxContext) 16257 } 16258 16259 func (s *ArrPortAddrContext) PortAddrNode() IPortAddrNodeContext { 16260 var t antlr.RuleContext 16261 for _, ctx := range s.GetChildren() { 16262 if _, ok := ctx.(IPortAddrNodeContext); ok { 16263 t = ctx.(antlr.RuleContext) 16264 break 16265 } 16266 } 16267 16268 if t == nil { 16269 return nil 16270 } 16271 16272 return t.(IPortAddrNodeContext) 16273 } 16274 16275 func (s *ArrPortAddrContext) GetRuleContext() antlr.RuleContext { 16276 return s 16277 } 16278 16279 func (s *ArrPortAddrContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 16280 return antlr.TreesStringTree(s, ruleNames, recog) 16281 } 16282 16283 func (s *ArrPortAddrContext) EnterRule(listener antlr.ParseTreeListener) { 16284 if listenerT, ok := listener.(nevaListener); ok { 16285 listenerT.EnterArrPortAddr(s) 16286 } 16287 } 16288 16289 func (s *ArrPortAddrContext) ExitRule(listener antlr.ParseTreeListener) { 16290 if listenerT, ok := listener.(nevaListener); ok { 16291 listenerT.ExitArrPortAddr(s) 16292 } 16293 } 16294 16295 func (p *nevaParser) ArrPortAddr() (localctx IArrPortAddrContext) { 16296 localctx = NewArrPortAddrContext(p, p.GetParserRuleContext(), p.GetState()) 16297 p.EnterRule(localctx, 178, nevaParserRULE_arrPortAddr) 16298 var _la int 16299 16300 p.EnterOuterAlt(localctx, 1) 16301 p.SetState(1155) 16302 p.GetErrorHandler().Sync(p) 16303 if p.HasError() { 16304 goto errorExit 16305 } 16306 _la = p.GetTokenStream().LA(1) 16307 16308 if _la == nevaParserIDENTIFIER { 16309 { 16310 p.SetState(1154) 16311 p.PortAddrNode() 16312 } 16313 16314 } 16315 { 16316 p.SetState(1157) 16317 p.Match(nevaParserT__7) 16318 if p.HasError() { 16319 // Recognition error - abort rule 16320 goto errorExit 16321 } 16322 } 16323 { 16324 p.SetState(1158) 16325 p.PortAddrPort() 16326 } 16327 { 16328 p.SetState(1159) 16329 p.PortAddrIdx() 16330 } 16331 16332 errorExit: 16333 if p.HasError() { 16334 v := p.GetError() 16335 localctx.SetException(v) 16336 p.GetErrorHandler().ReportError(p, v) 16337 p.GetErrorHandler().Recover(p, v) 16338 p.SetError(nil) 16339 } 16340 p.ExitRule() 16341 return localctx 16342 goto errorExit // Trick to prevent compiler error if the label is not used 16343 } 16344 16345 // IPortAddrNodeContext is an interface to support dynamic dispatch. 16346 type IPortAddrNodeContext interface { 16347 antlr.ParserRuleContext 16348 16349 // GetParser returns the parser. 16350 GetParser() antlr.Parser 16351 16352 // Getter signatures 16353 IDENTIFIER() antlr.TerminalNode 16354 16355 // IsPortAddrNodeContext differentiates from other interfaces. 16356 IsPortAddrNodeContext() 16357 } 16358 16359 type PortAddrNodeContext struct { 16360 antlr.BaseParserRuleContext 16361 parser antlr.Parser 16362 } 16363 16364 func NewEmptyPortAddrNodeContext() *PortAddrNodeContext { 16365 var p = new(PortAddrNodeContext) 16366 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 16367 p.RuleIndex = nevaParserRULE_portAddrNode 16368 return p 16369 } 16370 16371 func InitEmptyPortAddrNodeContext(p *PortAddrNodeContext) { 16372 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 16373 p.RuleIndex = nevaParserRULE_portAddrNode 16374 } 16375 16376 func (*PortAddrNodeContext) IsPortAddrNodeContext() {} 16377 16378 func NewPortAddrNodeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PortAddrNodeContext { 16379 var p = new(PortAddrNodeContext) 16380 16381 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 16382 16383 p.parser = parser 16384 p.RuleIndex = nevaParserRULE_portAddrNode 16385 16386 return p 16387 } 16388 16389 func (s *PortAddrNodeContext) GetParser() antlr.Parser { return s.parser } 16390 16391 func (s *PortAddrNodeContext) IDENTIFIER() antlr.TerminalNode { 16392 return s.GetToken(nevaParserIDENTIFIER, 0) 16393 } 16394 16395 func (s *PortAddrNodeContext) GetRuleContext() antlr.RuleContext { 16396 return s 16397 } 16398 16399 func (s *PortAddrNodeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 16400 return antlr.TreesStringTree(s, ruleNames, recog) 16401 } 16402 16403 func (s *PortAddrNodeContext) EnterRule(listener antlr.ParseTreeListener) { 16404 if listenerT, ok := listener.(nevaListener); ok { 16405 listenerT.EnterPortAddrNode(s) 16406 } 16407 } 16408 16409 func (s *PortAddrNodeContext) ExitRule(listener antlr.ParseTreeListener) { 16410 if listenerT, ok := listener.(nevaListener); ok { 16411 listenerT.ExitPortAddrNode(s) 16412 } 16413 } 16414 16415 func (p *nevaParser) PortAddrNode() (localctx IPortAddrNodeContext) { 16416 localctx = NewPortAddrNodeContext(p, p.GetParserRuleContext(), p.GetState()) 16417 p.EnterRule(localctx, 180, nevaParserRULE_portAddrNode) 16418 p.EnterOuterAlt(localctx, 1) 16419 { 16420 p.SetState(1161) 16421 p.Match(nevaParserIDENTIFIER) 16422 if p.HasError() { 16423 // Recognition error - abort rule 16424 goto errorExit 16425 } 16426 } 16427 16428 errorExit: 16429 if p.HasError() { 16430 v := p.GetError() 16431 localctx.SetException(v) 16432 p.GetErrorHandler().ReportError(p, v) 16433 p.GetErrorHandler().Recover(p, v) 16434 p.SetError(nil) 16435 } 16436 p.ExitRule() 16437 return localctx 16438 goto errorExit // Trick to prevent compiler error if the label is not used 16439 } 16440 16441 // IPortAddrPortContext is an interface to support dynamic dispatch. 16442 type IPortAddrPortContext interface { 16443 antlr.ParserRuleContext 16444 16445 // GetParser returns the parser. 16446 GetParser() antlr.Parser 16447 16448 // Getter signatures 16449 IDENTIFIER() antlr.TerminalNode 16450 16451 // IsPortAddrPortContext differentiates from other interfaces. 16452 IsPortAddrPortContext() 16453 } 16454 16455 type PortAddrPortContext struct { 16456 antlr.BaseParserRuleContext 16457 parser antlr.Parser 16458 } 16459 16460 func NewEmptyPortAddrPortContext() *PortAddrPortContext { 16461 var p = new(PortAddrPortContext) 16462 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 16463 p.RuleIndex = nevaParserRULE_portAddrPort 16464 return p 16465 } 16466 16467 func InitEmptyPortAddrPortContext(p *PortAddrPortContext) { 16468 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 16469 p.RuleIndex = nevaParserRULE_portAddrPort 16470 } 16471 16472 func (*PortAddrPortContext) IsPortAddrPortContext() {} 16473 16474 func NewPortAddrPortContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PortAddrPortContext { 16475 var p = new(PortAddrPortContext) 16476 16477 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 16478 16479 p.parser = parser 16480 p.RuleIndex = nevaParserRULE_portAddrPort 16481 16482 return p 16483 } 16484 16485 func (s *PortAddrPortContext) GetParser() antlr.Parser { return s.parser } 16486 16487 func (s *PortAddrPortContext) IDENTIFIER() antlr.TerminalNode { 16488 return s.GetToken(nevaParserIDENTIFIER, 0) 16489 } 16490 16491 func (s *PortAddrPortContext) GetRuleContext() antlr.RuleContext { 16492 return s 16493 } 16494 16495 func (s *PortAddrPortContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 16496 return antlr.TreesStringTree(s, ruleNames, recog) 16497 } 16498 16499 func (s *PortAddrPortContext) EnterRule(listener antlr.ParseTreeListener) { 16500 if listenerT, ok := listener.(nevaListener); ok { 16501 listenerT.EnterPortAddrPort(s) 16502 } 16503 } 16504 16505 func (s *PortAddrPortContext) ExitRule(listener antlr.ParseTreeListener) { 16506 if listenerT, ok := listener.(nevaListener); ok { 16507 listenerT.ExitPortAddrPort(s) 16508 } 16509 } 16510 16511 func (p *nevaParser) PortAddrPort() (localctx IPortAddrPortContext) { 16512 localctx = NewPortAddrPortContext(p, p.GetParserRuleContext(), p.GetState()) 16513 p.EnterRule(localctx, 182, nevaParserRULE_portAddrPort) 16514 p.EnterOuterAlt(localctx, 1) 16515 { 16516 p.SetState(1163) 16517 p.Match(nevaParserIDENTIFIER) 16518 if p.HasError() { 16519 // Recognition error - abort rule 16520 goto errorExit 16521 } 16522 } 16523 16524 errorExit: 16525 if p.HasError() { 16526 v := p.GetError() 16527 localctx.SetException(v) 16528 p.GetErrorHandler().ReportError(p, v) 16529 p.GetErrorHandler().Recover(p, v) 16530 p.SetError(nil) 16531 } 16532 p.ExitRule() 16533 return localctx 16534 goto errorExit // Trick to prevent compiler error if the label is not used 16535 } 16536 16537 // IPortAddrIdxContext is an interface to support dynamic dispatch. 16538 type IPortAddrIdxContext interface { 16539 antlr.ParserRuleContext 16540 16541 // GetParser returns the parser. 16542 GetParser() antlr.Parser 16543 16544 // Getter signatures 16545 INT() antlr.TerminalNode 16546 16547 // IsPortAddrIdxContext differentiates from other interfaces. 16548 IsPortAddrIdxContext() 16549 } 16550 16551 type PortAddrIdxContext struct { 16552 antlr.BaseParserRuleContext 16553 parser antlr.Parser 16554 } 16555 16556 func NewEmptyPortAddrIdxContext() *PortAddrIdxContext { 16557 var p = new(PortAddrIdxContext) 16558 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 16559 p.RuleIndex = nevaParserRULE_portAddrIdx 16560 return p 16561 } 16562 16563 func InitEmptyPortAddrIdxContext(p *PortAddrIdxContext) { 16564 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 16565 p.RuleIndex = nevaParserRULE_portAddrIdx 16566 } 16567 16568 func (*PortAddrIdxContext) IsPortAddrIdxContext() {} 16569 16570 func NewPortAddrIdxContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PortAddrIdxContext { 16571 var p = new(PortAddrIdxContext) 16572 16573 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 16574 16575 p.parser = parser 16576 p.RuleIndex = nevaParserRULE_portAddrIdx 16577 16578 return p 16579 } 16580 16581 func (s *PortAddrIdxContext) GetParser() antlr.Parser { return s.parser } 16582 16583 func (s *PortAddrIdxContext) INT() antlr.TerminalNode { 16584 return s.GetToken(nevaParserINT, 0) 16585 } 16586 16587 func (s *PortAddrIdxContext) GetRuleContext() antlr.RuleContext { 16588 return s 16589 } 16590 16591 func (s *PortAddrIdxContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 16592 return antlr.TreesStringTree(s, ruleNames, recog) 16593 } 16594 16595 func (s *PortAddrIdxContext) EnterRule(listener antlr.ParseTreeListener) { 16596 if listenerT, ok := listener.(nevaListener); ok { 16597 listenerT.EnterPortAddrIdx(s) 16598 } 16599 } 16600 16601 func (s *PortAddrIdxContext) ExitRule(listener antlr.ParseTreeListener) { 16602 if listenerT, ok := listener.(nevaListener); ok { 16603 listenerT.ExitPortAddrIdx(s) 16604 } 16605 } 16606 16607 func (p *nevaParser) PortAddrIdx() (localctx IPortAddrIdxContext) { 16608 localctx = NewPortAddrIdxContext(p, p.GetParserRuleContext(), p.GetState()) 16609 p.EnterRule(localctx, 184, nevaParserRULE_portAddrIdx) 16610 p.EnterOuterAlt(localctx, 1) 16611 { 16612 p.SetState(1165) 16613 p.Match(nevaParserT__18) 16614 if p.HasError() { 16615 // Recognition error - abort rule 16616 goto errorExit 16617 } 16618 } 16619 { 16620 p.SetState(1166) 16621 p.Match(nevaParserINT) 16622 if p.HasError() { 16623 // Recognition error - abort rule 16624 goto errorExit 16625 } 16626 } 16627 { 16628 p.SetState(1167) 16629 p.Match(nevaParserT__19) 16630 if p.HasError() { 16631 // Recognition error - abort rule 16632 goto errorExit 16633 } 16634 } 16635 16636 errorExit: 16637 if p.HasError() { 16638 v := p.GetError() 16639 localctx.SetException(v) 16640 p.GetErrorHandler().ReportError(p, v) 16641 p.GetErrorHandler().Recover(p, v) 16642 p.SetError(nil) 16643 } 16644 p.ExitRule() 16645 return localctx 16646 goto errorExit // Trick to prevent compiler error if the label is not used 16647 } 16648 16649 // IStructSelectorsContext is an interface to support dynamic dispatch. 16650 type IStructSelectorsContext interface { 16651 antlr.ParserRuleContext 16652 16653 // GetParser returns the parser. 16654 GetParser() antlr.Parser 16655 16656 // Getter signatures 16657 AllIDENTIFIER() []antlr.TerminalNode 16658 IDENTIFIER(i int) antlr.TerminalNode 16659 16660 // IsStructSelectorsContext differentiates from other interfaces. 16661 IsStructSelectorsContext() 16662 } 16663 16664 type StructSelectorsContext struct { 16665 antlr.BaseParserRuleContext 16666 parser antlr.Parser 16667 } 16668 16669 func NewEmptyStructSelectorsContext() *StructSelectorsContext { 16670 var p = new(StructSelectorsContext) 16671 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 16672 p.RuleIndex = nevaParserRULE_structSelectors 16673 return p 16674 } 16675 16676 func InitEmptyStructSelectorsContext(p *StructSelectorsContext) { 16677 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 16678 p.RuleIndex = nevaParserRULE_structSelectors 16679 } 16680 16681 func (*StructSelectorsContext) IsStructSelectorsContext() {} 16682 16683 func NewStructSelectorsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StructSelectorsContext { 16684 var p = new(StructSelectorsContext) 16685 16686 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 16687 16688 p.parser = parser 16689 p.RuleIndex = nevaParserRULE_structSelectors 16690 16691 return p 16692 } 16693 16694 func (s *StructSelectorsContext) GetParser() antlr.Parser { return s.parser } 16695 16696 func (s *StructSelectorsContext) AllIDENTIFIER() []antlr.TerminalNode { 16697 return s.GetTokens(nevaParserIDENTIFIER) 16698 } 16699 16700 func (s *StructSelectorsContext) IDENTIFIER(i int) antlr.TerminalNode { 16701 return s.GetToken(nevaParserIDENTIFIER, i) 16702 } 16703 16704 func (s *StructSelectorsContext) GetRuleContext() antlr.RuleContext { 16705 return s 16706 } 16707 16708 func (s *StructSelectorsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 16709 return antlr.TreesStringTree(s, ruleNames, recog) 16710 } 16711 16712 func (s *StructSelectorsContext) EnterRule(listener antlr.ParseTreeListener) { 16713 if listenerT, ok := listener.(nevaListener); ok { 16714 listenerT.EnterStructSelectors(s) 16715 } 16716 } 16717 16718 func (s *StructSelectorsContext) ExitRule(listener antlr.ParseTreeListener) { 16719 if listenerT, ok := listener.(nevaListener); ok { 16720 listenerT.ExitStructSelectors(s) 16721 } 16722 } 16723 16724 func (p *nevaParser) StructSelectors() (localctx IStructSelectorsContext) { 16725 localctx = NewStructSelectorsContext(p, p.GetParserRuleContext(), p.GetState()) 16726 p.EnterRule(localctx, 186, nevaParserRULE_structSelectors) 16727 var _la int 16728 16729 p.EnterOuterAlt(localctx, 1) 16730 { 16731 p.SetState(1169) 16732 p.Match(nevaParserT__10) 16733 if p.HasError() { 16734 // Recognition error - abort rule 16735 goto errorExit 16736 } 16737 } 16738 { 16739 p.SetState(1170) 16740 p.Match(nevaParserIDENTIFIER) 16741 if p.HasError() { 16742 // Recognition error - abort rule 16743 goto errorExit 16744 } 16745 } 16746 p.SetState(1175) 16747 p.GetErrorHandler().Sync(p) 16748 if p.HasError() { 16749 goto errorExit 16750 } 16751 _la = p.GetTokenStream().LA(1) 16752 16753 for _la == nevaParserT__10 { 16754 { 16755 p.SetState(1171) 16756 p.Match(nevaParserT__10) 16757 if p.HasError() { 16758 // Recognition error - abort rule 16759 goto errorExit 16760 } 16761 } 16762 { 16763 p.SetState(1172) 16764 p.Match(nevaParserIDENTIFIER) 16765 if p.HasError() { 16766 // Recognition error - abort rule 16767 goto errorExit 16768 } 16769 } 16770 16771 p.SetState(1177) 16772 p.GetErrorHandler().Sync(p) 16773 if p.HasError() { 16774 goto errorExit 16775 } 16776 _la = p.GetTokenStream().LA(1) 16777 } 16778 16779 errorExit: 16780 if p.HasError() { 16781 v := p.GetError() 16782 localctx.SetException(v) 16783 p.GetErrorHandler().ReportError(p, v) 16784 p.GetErrorHandler().Recover(p, v) 16785 p.SetError(nil) 16786 } 16787 p.ExitRule() 16788 return localctx 16789 goto errorExit // Trick to prevent compiler error if the label is not used 16790 } 16791 16792 // ISingleReceiverSideContext is an interface to support dynamic dispatch. 16793 type ISingleReceiverSideContext interface { 16794 antlr.ParserRuleContext 16795 16796 // GetParser returns the parser. 16797 GetParser() antlr.Parser 16798 16799 // Getter signatures 16800 PortAddr() IPortAddrContext 16801 DeferredConn() IDeferredConnContext 16802 16803 // IsSingleReceiverSideContext differentiates from other interfaces. 16804 IsSingleReceiverSideContext() 16805 } 16806 16807 type SingleReceiverSideContext struct { 16808 antlr.BaseParserRuleContext 16809 parser antlr.Parser 16810 } 16811 16812 func NewEmptySingleReceiverSideContext() *SingleReceiverSideContext { 16813 var p = new(SingleReceiverSideContext) 16814 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 16815 p.RuleIndex = nevaParserRULE_singleReceiverSide 16816 return p 16817 } 16818 16819 func InitEmptySingleReceiverSideContext(p *SingleReceiverSideContext) { 16820 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 16821 p.RuleIndex = nevaParserRULE_singleReceiverSide 16822 } 16823 16824 func (*SingleReceiverSideContext) IsSingleReceiverSideContext() {} 16825 16826 func NewSingleReceiverSideContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SingleReceiverSideContext { 16827 var p = new(SingleReceiverSideContext) 16828 16829 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 16830 16831 p.parser = parser 16832 p.RuleIndex = nevaParserRULE_singleReceiverSide 16833 16834 return p 16835 } 16836 16837 func (s *SingleReceiverSideContext) GetParser() antlr.Parser { return s.parser } 16838 16839 func (s *SingleReceiverSideContext) PortAddr() IPortAddrContext { 16840 var t antlr.RuleContext 16841 for _, ctx := range s.GetChildren() { 16842 if _, ok := ctx.(IPortAddrContext); ok { 16843 t = ctx.(antlr.RuleContext) 16844 break 16845 } 16846 } 16847 16848 if t == nil { 16849 return nil 16850 } 16851 16852 return t.(IPortAddrContext) 16853 } 16854 16855 func (s *SingleReceiverSideContext) DeferredConn() IDeferredConnContext { 16856 var t antlr.RuleContext 16857 for _, ctx := range s.GetChildren() { 16858 if _, ok := ctx.(IDeferredConnContext); ok { 16859 t = ctx.(antlr.RuleContext) 16860 break 16861 } 16862 } 16863 16864 if t == nil { 16865 return nil 16866 } 16867 16868 return t.(IDeferredConnContext) 16869 } 16870 16871 func (s *SingleReceiverSideContext) GetRuleContext() antlr.RuleContext { 16872 return s 16873 } 16874 16875 func (s *SingleReceiverSideContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 16876 return antlr.TreesStringTree(s, ruleNames, recog) 16877 } 16878 16879 func (s *SingleReceiverSideContext) EnterRule(listener antlr.ParseTreeListener) { 16880 if listenerT, ok := listener.(nevaListener); ok { 16881 listenerT.EnterSingleReceiverSide(s) 16882 } 16883 } 16884 16885 func (s *SingleReceiverSideContext) ExitRule(listener antlr.ParseTreeListener) { 16886 if listenerT, ok := listener.(nevaListener); ok { 16887 listenerT.ExitSingleReceiverSide(s) 16888 } 16889 } 16890 16891 func (p *nevaParser) SingleReceiverSide() (localctx ISingleReceiverSideContext) { 16892 localctx = NewSingleReceiverSideContext(p, p.GetParserRuleContext(), p.GetState()) 16893 p.EnterRule(localctx, 188, nevaParserRULE_singleReceiverSide) 16894 p.SetState(1180) 16895 p.GetErrorHandler().Sync(p) 16896 if p.HasError() { 16897 goto errorExit 16898 } 16899 16900 switch p.GetTokenStream().LA(1) { 16901 case nevaParserT__7, nevaParserIDENTIFIER: 16902 p.EnterOuterAlt(localctx, 1) 16903 { 16904 p.SetState(1178) 16905 p.PortAddr() 16906 } 16907 16908 case nevaParserT__1: 16909 p.EnterOuterAlt(localctx, 2) 16910 { 16911 p.SetState(1179) 16912 p.DeferredConn() 16913 } 16914 16915 default: 16916 p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) 16917 goto errorExit 16918 } 16919 16920 errorExit: 16921 if p.HasError() { 16922 v := p.GetError() 16923 localctx.SetException(v) 16924 p.GetErrorHandler().ReportError(p, v) 16925 p.GetErrorHandler().Recover(p, v) 16926 p.SetError(nil) 16927 } 16928 p.ExitRule() 16929 return localctx 16930 goto errorExit // Trick to prevent compiler error if the label is not used 16931 } 16932 16933 // IMultipleReceiverSideContext is an interface to support dynamic dispatch. 16934 type IMultipleReceiverSideContext interface { 16935 antlr.ParserRuleContext 16936 16937 // GetParser returns the parser. 16938 GetParser() antlr.Parser 16939 16940 // Getter signatures 16941 AllSingleReceiverSide() []ISingleReceiverSideContext 16942 SingleReceiverSide(i int) ISingleReceiverSideContext 16943 AllNEWLINE() []antlr.TerminalNode 16944 NEWLINE(i int) antlr.TerminalNode 16945 16946 // IsMultipleReceiverSideContext differentiates from other interfaces. 16947 IsMultipleReceiverSideContext() 16948 } 16949 16950 type MultipleReceiverSideContext struct { 16951 antlr.BaseParserRuleContext 16952 parser antlr.Parser 16953 } 16954 16955 func NewEmptyMultipleReceiverSideContext() *MultipleReceiverSideContext { 16956 var p = new(MultipleReceiverSideContext) 16957 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 16958 p.RuleIndex = nevaParserRULE_multipleReceiverSide 16959 return p 16960 } 16961 16962 func InitEmptyMultipleReceiverSideContext(p *MultipleReceiverSideContext) { 16963 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) 16964 p.RuleIndex = nevaParserRULE_multipleReceiverSide 16965 } 16966 16967 func (*MultipleReceiverSideContext) IsMultipleReceiverSideContext() {} 16968 16969 func NewMultipleReceiverSideContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MultipleReceiverSideContext { 16970 var p = new(MultipleReceiverSideContext) 16971 16972 antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) 16973 16974 p.parser = parser 16975 p.RuleIndex = nevaParserRULE_multipleReceiverSide 16976 16977 return p 16978 } 16979 16980 func (s *MultipleReceiverSideContext) GetParser() antlr.Parser { return s.parser } 16981 16982 func (s *MultipleReceiverSideContext) AllSingleReceiverSide() []ISingleReceiverSideContext { 16983 children := s.GetChildren() 16984 len := 0 16985 for _, ctx := range children { 16986 if _, ok := ctx.(ISingleReceiverSideContext); ok { 16987 len++ 16988 } 16989 } 16990 16991 tst := make([]ISingleReceiverSideContext, len) 16992 i := 0 16993 for _, ctx := range children { 16994 if t, ok := ctx.(ISingleReceiverSideContext); ok { 16995 tst[i] = t.(ISingleReceiverSideContext) 16996 i++ 16997 } 16998 } 16999 17000 return tst 17001 } 17002 17003 func (s *MultipleReceiverSideContext) SingleReceiverSide(i int) ISingleReceiverSideContext { 17004 var t antlr.RuleContext 17005 j := 0 17006 for _, ctx := range s.GetChildren() { 17007 if _, ok := ctx.(ISingleReceiverSideContext); ok { 17008 if j == i { 17009 t = ctx.(antlr.RuleContext) 17010 break 17011 } 17012 j++ 17013 } 17014 } 17015 17016 if t == nil { 17017 return nil 17018 } 17019 17020 return t.(ISingleReceiverSideContext) 17021 } 17022 17023 func (s *MultipleReceiverSideContext) AllNEWLINE() []antlr.TerminalNode { 17024 return s.GetTokens(nevaParserNEWLINE) 17025 } 17026 17027 func (s *MultipleReceiverSideContext) NEWLINE(i int) antlr.TerminalNode { 17028 return s.GetToken(nevaParserNEWLINE, i) 17029 } 17030 17031 func (s *MultipleReceiverSideContext) GetRuleContext() antlr.RuleContext { 17032 return s 17033 } 17034 17035 func (s *MultipleReceiverSideContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { 17036 return antlr.TreesStringTree(s, ruleNames, recog) 17037 } 17038 17039 func (s *MultipleReceiverSideContext) EnterRule(listener antlr.ParseTreeListener) { 17040 if listenerT, ok := listener.(nevaListener); ok { 17041 listenerT.EnterMultipleReceiverSide(s) 17042 } 17043 } 17044 17045 func (s *MultipleReceiverSideContext) ExitRule(listener antlr.ParseTreeListener) { 17046 if listenerT, ok := listener.(nevaListener); ok { 17047 listenerT.ExitMultipleReceiverSide(s) 17048 } 17049 } 17050 17051 func (p *nevaParser) MultipleReceiverSide() (localctx IMultipleReceiverSideContext) { 17052 localctx = NewMultipleReceiverSideContext(p, p.GetParserRuleContext(), p.GetState()) 17053 p.EnterRule(localctx, 190, nevaParserRULE_multipleReceiverSide) 17054 var _la int 17055 17056 p.EnterOuterAlt(localctx, 1) 17057 { 17058 p.SetState(1182) 17059 p.Match(nevaParserT__18) 17060 if p.HasError() { 17061 // Recognition error - abort rule 17062 goto errorExit 17063 } 17064 } 17065 p.SetState(1186) 17066 p.GetErrorHandler().Sync(p) 17067 if p.HasError() { 17068 goto errorExit 17069 } 17070 _la = p.GetTokenStream().LA(1) 17071 17072 for _la == nevaParserNEWLINE { 17073 { 17074 p.SetState(1183) 17075 p.Match(nevaParserNEWLINE) 17076 if p.HasError() { 17077 // Recognition error - abort rule 17078 goto errorExit 17079 } 17080 } 17081 17082 p.SetState(1188) 17083 p.GetErrorHandler().Sync(p) 17084 if p.HasError() { 17085 goto errorExit 17086 } 17087 _la = p.GetTokenStream().LA(1) 17088 } 17089 { 17090 p.SetState(1189) 17091 p.SingleReceiverSide() 17092 } 17093 p.SetState(1206) 17094 p.GetErrorHandler().Sync(p) 17095 if p.HasError() { 17096 goto errorExit 17097 } 17098 _la = p.GetTokenStream().LA(1) 17099 17100 for _la == nevaParserT__2 { 17101 { 17102 p.SetState(1190) 17103 p.Match(nevaParserT__2) 17104 if p.HasError() { 17105 // Recognition error - abort rule 17106 goto errorExit 17107 } 17108 } 17109 p.SetState(1194) 17110 p.GetErrorHandler().Sync(p) 17111 if p.HasError() { 17112 goto errorExit 17113 } 17114 _la = p.GetTokenStream().LA(1) 17115 17116 for _la == nevaParserNEWLINE { 17117 { 17118 p.SetState(1191) 17119 p.Match(nevaParserNEWLINE) 17120 if p.HasError() { 17121 // Recognition error - abort rule 17122 goto errorExit 17123 } 17124 } 17125 17126 p.SetState(1196) 17127 p.GetErrorHandler().Sync(p) 17128 if p.HasError() { 17129 goto errorExit 17130 } 17131 _la = p.GetTokenStream().LA(1) 17132 } 17133 { 17134 p.SetState(1197) 17135 p.SingleReceiverSide() 17136 } 17137 p.SetState(1201) 17138 p.GetErrorHandler().Sync(p) 17139 if p.HasError() { 17140 goto errorExit 17141 } 17142 _la = p.GetTokenStream().LA(1) 17143 17144 for _la == nevaParserNEWLINE { 17145 { 17146 p.SetState(1198) 17147 p.Match(nevaParserNEWLINE) 17148 if p.HasError() { 17149 // Recognition error - abort rule 17150 goto errorExit 17151 } 17152 } 17153 17154 p.SetState(1203) 17155 p.GetErrorHandler().Sync(p) 17156 if p.HasError() { 17157 goto errorExit 17158 } 17159 _la = p.GetTokenStream().LA(1) 17160 } 17161 17162 p.SetState(1208) 17163 p.GetErrorHandler().Sync(p) 17164 if p.HasError() { 17165 goto errorExit 17166 } 17167 _la = p.GetTokenStream().LA(1) 17168 } 17169 { 17170 p.SetState(1209) 17171 p.Match(nevaParserT__19) 17172 if p.HasError() { 17173 // Recognition error - abort rule 17174 goto errorExit 17175 } 17176 } 17177 17178 errorExit: 17179 if p.HasError() { 17180 v := p.GetError() 17181 localctx.SetException(v) 17182 p.GetErrorHandler().ReportError(p, v) 17183 p.GetErrorHandler().Recover(p, v) 17184 p.SetError(nil) 17185 } 17186 p.ExitRule() 17187 return localctx 17188 goto errorExit // Trick to prevent compiler error if the label is not used 17189 }