// Code generated from WatParser.g4 by ANTLR 4.9.3. DO NOT EDIT.

package wat // WatParser
import (
	"fmt"
	"reflect"
	"strconv"

	"github.com/antlr/antlr4/runtime/Go/antlr"
)

// Suppress unused import errors
var _ = fmt.Printf
var _ = reflect.Copy
var _ = strconv.Itoa

var parserATN = []uint16{
	3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 78, 1006,
	4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7,
	4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13,
	9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9,
	18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23,
	4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4,
	29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34,
	9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9,
	39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44,
	4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4,
	50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55,
	9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9,
	60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65,
	4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4,
	3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 5, 6, 151, 10, 6,
	3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 7, 8, 161, 10, 8, 12, 8,
	14, 8, 164, 11, 8, 3, 8, 3, 8, 7, 8, 168, 10, 8, 12, 8, 14, 8, 171, 11,
	8, 3, 8, 3, 8, 3, 8, 3, 8, 5, 8, 177, 10, 8, 3, 8, 7, 8, 180, 10, 8, 12,
	8, 14, 8, 183, 11, 8, 3, 9, 3, 9, 5, 9, 187, 10, 9, 3, 9, 3, 9, 3, 10,
	3, 10, 5, 10, 193, 10, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3,
	12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 5, 15, 210,
	10, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16,
	3, 16, 6, 16, 222, 10, 16, 13, 16, 14, 16, 223, 3, 16, 3, 16, 3, 16, 3,
	16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16,
	3, 16, 5, 16, 241, 10, 16, 3, 16, 5, 16, 244, 10, 16, 3, 16, 3, 16, 5,
	16, 248, 10, 16, 3, 16, 5, 16, 251, 10, 16, 3, 16, 3, 16, 3, 16, 3, 16,
	3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 5, 16, 262, 10, 16, 3, 17, 3, 17, 5,
	17, 266, 10, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 7, 18, 273, 10, 18,
	12, 18, 14, 18, 276, 11, 18, 3, 18, 7, 18, 279, 10, 18, 12, 18, 14, 18,
	282, 11, 18, 3, 18, 3, 18, 3, 18, 7, 18, 287, 10, 18, 12, 18, 14, 18, 290,
	11, 18, 3, 18, 7, 18, 293, 10, 18, 12, 18, 14, 18, 296, 11, 18, 3, 19,
	3, 19, 5, 19, 300, 10, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 7, 20, 307,
	10, 20, 12, 20, 14, 20, 310, 11, 20, 3, 20, 7, 20, 313, 10, 20, 12, 20,
	14, 20, 316, 11, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 7, 21, 323, 10,
	21, 12, 21, 14, 21, 326, 11, 21, 3, 21, 7, 21, 329, 10, 21, 12, 21, 14,
	21, 332, 11, 21, 3, 21, 3, 21, 3, 22, 3, 22, 5, 22, 338, 10, 22, 3, 22,
	3, 22, 3, 22, 5, 22, 343, 10, 22, 3, 22, 3, 22, 5, 22, 347, 10, 22, 3,
	22, 3, 22, 3, 22, 5, 22, 352, 10, 22, 3, 22, 5, 22, 355, 10, 22, 3, 22,
	3, 22, 5, 22, 359, 10, 22, 5, 22, 361, 10, 22, 3, 23, 3, 23, 3, 23, 3,
	23, 3, 23, 3, 24, 5, 24, 369, 10, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25,
	3, 25, 3, 26, 3, 26, 7, 26, 379, 10, 26, 12, 26, 14, 26, 382, 11, 26, 3,
	26, 3, 26, 3, 26, 3, 26, 5, 26, 388, 10, 26, 3, 26, 3, 26, 3, 26, 5, 26,
	393, 10, 26, 3, 26, 3, 26, 3, 26, 5, 26, 398, 10, 26, 3, 26, 5, 26, 401,
	10, 26, 3, 27, 5, 27, 404, 10, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 7,
	28, 411, 10, 28, 12, 28, 14, 28, 414, 11, 28, 3, 28, 7, 28, 417, 10, 28,
	12, 28, 14, 28, 420, 11, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 7, 29,
	427, 10, 29, 12, 29, 14, 29, 430, 11, 29, 3, 29, 7, 29, 433, 10, 29, 12,
	29, 14, 29, 436, 11, 29, 3, 29, 7, 29, 439, 10, 29, 12, 29, 14, 29, 442,
	11, 29, 3, 30, 3, 30, 3, 30, 3, 30, 7, 30, 448, 10, 30, 12, 30, 14, 30,
	451, 11, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3,
	30, 5, 30, 462, 10, 30, 5, 30, 464, 10, 30, 3, 31, 7, 31, 467, 10, 31,
	12, 31, 14, 31, 470, 11, 31, 3, 31, 5, 31, 473, 10, 31, 3, 32, 3, 32, 3,
	33, 3, 33, 3, 33, 5, 33, 480, 10, 33, 3, 33, 3, 33, 3, 33, 3, 34, 5, 34,
	486, 10, 34, 3, 34, 3, 34, 3, 34, 5, 34, 491, 10, 34, 3, 34, 3, 34, 3,
	34, 3, 34, 3, 34, 5, 34, 498, 10, 34, 3, 35, 3, 35, 3, 35, 7, 35, 503,
	10, 35, 12, 35, 14, 35, 506, 11, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35,
	3, 35, 3, 35, 5, 35, 515, 10, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 7,
	36, 522, 10, 36, 12, 36, 14, 36, 525, 11, 36, 3, 36, 7, 36, 528, 10, 36,
	12, 36, 14, 36, 531, 11, 36, 3, 37, 3, 37, 3, 37, 7, 37, 536, 10, 37, 12,
	37, 14, 37, 539, 11, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37,
	7, 37, 548, 10, 37, 12, 37, 14, 37, 551, 11, 37, 3, 37, 3, 37, 3, 38, 3,
	38, 3, 38, 7, 38, 558, 10, 38, 12, 38, 14, 38, 561, 11, 38, 3, 38, 7, 38,
	564, 10, 38, 12, 38, 14, 38, 567, 11, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3,
	39, 7, 39, 574, 10, 39, 12, 39, 14, 39, 577, 11, 39, 3, 39, 3, 39, 3, 39,
	3, 39, 3, 39, 3, 39, 3, 39, 7, 39, 586, 10, 39, 12, 39, 14, 39, 589, 11,
	39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 5, 40, 599,
	10, 40, 3, 41, 3, 41, 3, 41, 5, 41, 604, 10, 41, 3, 41, 3, 41, 7, 41, 608,
	10, 41, 12, 41, 14, 41, 611, 11, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42,
	5, 42, 618, 10, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3,
	43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 7, 43, 634, 10, 43, 12, 43,
	14, 43, 637, 11, 43, 3, 43, 3, 43, 5, 43, 641, 10, 43, 3, 44, 3, 44, 3,
	44, 5, 44, 646, 10, 44, 3, 44, 3, 44, 7, 44, 650, 10, 44, 12, 44, 14, 44,
	653, 11, 44, 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 5, 45, 660, 10, 45, 3,
	45, 3, 45, 3, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46,
	3, 46, 3, 46, 7, 46, 675, 10, 46, 12, 46, 14, 46, 678, 11, 46, 3, 46, 5,
	46, 681, 10, 46, 3, 47, 3, 47, 3, 47, 5, 47, 686, 10, 47, 3, 47, 3, 47,
	3, 47, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 5,
	48, 700, 10, 48, 3, 49, 3, 49, 3, 49, 5, 49, 705, 10, 49, 3, 49, 3, 49,
	3, 49, 3, 49, 3, 49, 3, 49, 5, 49, 713, 10, 49, 3, 49, 3, 49, 3, 49, 3,
	49, 3, 49, 3, 49, 5, 49, 721, 10, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49,
	3, 49, 5, 49, 729, 10, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 5,
	49, 737, 10, 49, 3, 49, 3, 49, 3, 49, 5, 49, 742, 10, 49, 3, 50, 3, 50,
	3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3,
	51, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52,
	3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 5,
	52, 777, 10, 52, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 54, 3, 54,
	3, 54, 3, 54, 3, 54, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 5, 56, 795, 10,
	56, 3, 56, 3, 56, 3, 56, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 58, 3, 58,
	3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 5, 58, 815, 10,
	58, 3, 59, 3, 59, 3, 59, 5, 59, 820, 10, 59, 3, 59, 7, 59, 823, 10, 59,
	12, 59, 14, 59, 826, 11, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 3, 60,
	5, 60, 834, 10, 60, 3, 60, 3, 60, 7, 60, 838, 10, 60, 12, 60, 14, 60, 841,
	11, 60, 3, 60, 5, 60, 844, 10, 60, 3, 61, 3, 61, 3, 61, 5, 61, 849, 10,
	61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 5, 61, 858, 10, 61,
	3, 61, 3, 61, 3, 61, 5, 61, 863, 10, 61, 3, 62, 3, 62, 3, 62, 3, 62, 3,
	62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62,
	3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3,
	62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62,
	3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3,
	62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 5, 62, 917, 10, 62, 3, 63, 3, 63,
	3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 5, 63, 926, 10, 63, 3, 63, 3, 63, 3,
	63, 5, 63, 931, 10, 63, 3, 64, 3, 64, 3, 64, 5, 64, 936, 10, 64, 3, 64,
	7, 64, 939, 10, 64, 12, 64, 14, 64, 942, 11, 64, 3, 64, 3, 64, 3, 64, 3,
	64, 5, 64, 948, 10, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 5, 64, 955,
	10, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 5, 64, 962, 10, 64, 3, 64, 5,
	64, 965, 10, 64, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 66, 7, 66, 973,
	10, 66, 12, 66, 14, 66, 976, 11, 66, 3, 67, 7, 67, 979, 10, 67, 12, 67,
	14, 67, 982, 11, 67, 3, 67, 3, 67, 6, 67, 986, 10, 67, 13, 67, 14, 67,
	987, 3, 67, 3, 67, 5, 67, 992, 10, 67, 3, 68, 3, 68, 3, 68, 3, 68, 7, 68,
	998, 10, 68, 12, 68, 14, 68, 1001, 11, 68, 3, 68, 5, 68, 1004, 10, 68,
	3, 68, 2, 2, 69, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30,
	32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66,
	68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102,
	104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132,
	134, 2, 7, 3, 2, 6, 7, 3, 2, 5, 7, 4, 2, 5, 5, 76, 76, 3, 2, 16, 17, 3,
	2, 60, 61, 2, 1106, 2, 136, 3, 2, 2, 2, 4, 138, 3, 2, 2, 2, 6, 140, 3,
	2, 2, 2, 8, 142, 3, 2, 2, 2, 10, 150, 3, 2, 2, 2, 12, 152, 3, 2, 2, 2,
	14, 181, 3, 2, 2, 2, 16, 184, 3, 2, 2, 2, 18, 190, 3, 2, 2, 2, 20, 194,
	3, 2, 2, 2, 22, 199, 3, 2, 2, 2, 24, 201, 3, 2, 2, 2, 26, 203, 3, 2, 2,
	2, 28, 209, 3, 2, 2, 2, 30, 261, 3, 2, 2, 2, 32, 263, 3, 2, 2, 2, 34, 280,
	3, 2, 2, 2, 36, 297, 3, 2, 2, 2, 38, 314, 3, 2, 2, 2, 40, 330, 3, 2, 2,
	2, 42, 360, 3, 2, 2, 2, 44, 362, 3, 2, 2, 2, 46, 368, 3, 2, 2, 2, 48, 372,
	3, 2, 2, 2, 50, 400, 3, 2, 2, 2, 52, 403, 3, 2, 2, 2, 54, 418, 3, 2, 2,
	2, 56, 434, 3, 2, 2, 2, 58, 463, 3, 2, 2, 2, 60, 468, 3, 2, 2, 2, 62, 474,
	3, 2, 2, 2, 64, 476, 3, 2, 2, 2, 66, 497, 3, 2, 2, 2, 68, 514, 3, 2, 2,
	2, 70, 529, 3, 2, 2, 2, 72, 549, 3, 2, 2, 2, 74, 565, 3, 2, 2, 2, 76, 587,
	3, 2, 2, 2, 78, 598, 3, 2, 2, 2, 80, 600, 3, 2, 2, 2, 82, 614, 3, 2, 2,
	2, 84, 640, 3, 2, 2, 2, 86, 642, 3, 2, 2, 2, 88, 656, 3, 2, 2, 2, 90, 680,
	3, 2, 2, 2, 92, 682, 3, 2, 2, 2, 94, 699, 3, 2, 2, 2, 96, 741, 3, 2, 2,
	2, 98, 743, 3, 2, 2, 2, 100, 750, 3, 2, 2, 2, 102, 776, 3, 2, 2, 2, 104,
	778, 3, 2, 2, 2, 106, 784, 3, 2, 2, 2, 108, 789, 3, 2, 2, 2, 110, 791,
	3, 2, 2, 2, 112, 799, 3, 2, 2, 2, 114, 814, 3, 2, 2, 2, 116, 816, 3, 2,
	2, 2, 118, 843, 3, 2, 2, 2, 120, 862, 3, 2, 2, 2, 122, 916, 3, 2, 2, 2,
	124, 930, 3, 2, 2, 2, 126, 964, 3, 2, 2, 2, 128, 966, 3, 2, 2, 2, 130,
	974, 3, 2, 2, 2, 132, 991, 3, 2, 2, 2, 134, 1003, 3, 2, 2, 2, 136, 137,
	9, 2, 2, 2, 137, 3, 3, 2, 2, 2, 138, 139, 7, 8, 2, 2, 139, 5, 3, 2, 2,
	2, 140, 141, 7, 9, 2, 2, 141, 7, 3, 2, 2, 2, 142, 143, 7, 11, 2, 2, 143,
	9, 3, 2, 2, 2, 144, 151, 5, 6, 4, 2, 145, 146, 7, 3, 2, 2, 146, 147, 7,
	12, 2, 2, 147, 148, 5, 6, 4, 2, 148, 149, 7, 4, 2, 2, 149, 151, 3, 2, 2,
	2, 150, 144, 3, 2, 2, 2, 150, 145, 3, 2, 2, 2, 151, 11, 3, 2, 2, 2, 152,
	153, 7, 3, 2, 2, 153, 154, 7, 46, 2, 2, 154, 155, 5, 14, 8, 2, 155, 156,
	7, 4, 2, 2, 156, 13, 3, 2, 2, 2, 157, 176, 7, 3, 2, 2, 158, 162, 7, 49,
	2, 2, 159, 161, 5, 6, 4, 2, 160, 159, 3, 2, 2, 2, 161, 164, 3, 2, 2, 2,
	162, 160, 3, 2, 2, 2, 162, 163, 3, 2, 2, 2, 163, 177, 3, 2, 2, 2, 164,
	162, 3, 2, 2, 2, 165, 169, 7, 48, 2, 2, 166, 168, 5, 6, 4, 2, 167, 166,
	3, 2, 2, 2, 168, 171, 3, 2, 2, 2, 169, 167, 3, 2, 2, 2, 169, 170, 3, 2,
	2, 2, 170, 177, 3, 2, 2, 2, 171, 169, 3, 2, 2, 2, 172, 173, 7, 48, 2, 2,
	173, 174, 5, 26, 14, 2, 174, 175, 5, 6, 4, 2, 175, 177, 3, 2, 2, 2, 176,
	158, 3, 2, 2, 2, 176, 165, 3, 2, 2, 2, 176, 172, 3, 2, 2, 2, 177, 178,
	3, 2, 2, 2, 178, 180, 7, 4, 2, 2, 179, 157, 3, 2, 2, 2, 180, 183, 3, 2,
	2, 2, 181, 179, 3, 2, 2, 2, 181, 182, 3, 2, 2, 2, 182, 15, 3, 2, 2, 2,
	183, 181, 3, 2, 2, 2, 184, 186, 7, 5, 2, 2, 185, 187, 7, 5, 2, 2, 186,
	185, 3, 2, 2, 2, 186, 187, 3, 2, 2, 2, 187, 188, 3, 2, 2, 2, 188, 189,
	5, 8, 5, 2, 189, 17, 3, 2, 2, 2, 190, 192, 7, 5, 2, 2, 191, 193, 7, 5,
	2, 2, 192, 191, 3, 2, 2, 2, 192, 193, 3, 2, 2, 2, 193, 19, 3, 2, 2, 2,
	194, 195, 7, 3, 2, 2, 195, 196, 7, 45, 2, 2, 196, 197, 5, 24, 13, 2, 197,
	198, 7, 4, 2, 2, 198, 21, 3, 2, 2, 2, 199, 200, 9, 3, 2, 2, 200, 23, 3,
	2, 2, 2, 201, 202, 9, 4, 2, 2, 202, 25, 3, 2, 2, 2, 203, 204, 7, 76, 2,
	2, 204, 27, 3, 2, 2, 2, 205, 210, 5, 30, 16, 2, 206, 210, 5, 36, 19, 2,
	207, 210, 5, 42, 22, 2, 208, 210, 5, 48, 25, 2, 209, 205, 3, 2, 2, 2, 209,
	206, 3, 2, 2, 2, 209, 207, 3, 2, 2, 2, 209, 208, 3, 2, 2, 2, 210, 29, 3,
	2, 2, 2, 211, 262, 7, 14, 2, 2, 212, 262, 7, 13, 2, 2, 213, 262, 7, 15,
	2, 2, 214, 262, 7, 26, 2, 2, 215, 216, 7, 19, 2, 2, 216, 262, 5, 24, 13,
	2, 217, 218, 7, 20, 2, 2, 218, 262, 5, 24, 13, 2, 219, 221, 7, 21, 2, 2,
	220, 222, 5, 24, 13, 2, 221, 220, 3, 2, 2, 2, 222, 223, 3, 2, 2, 2, 223,
	221, 3, 2, 2, 2, 223, 224, 3, 2, 2, 2, 224, 262, 3, 2, 2, 2, 225, 262,
	7, 22, 2, 2, 226, 227, 7, 27, 2, 2, 227, 262, 5, 24, 13, 2, 228, 229, 7,
	29, 2, 2, 229, 262, 5, 24, 13, 2, 230, 231, 7, 30, 2, 2, 231, 262, 5, 24,
	13, 2, 232, 233, 7, 31, 2, 2, 233, 262, 5, 24, 13, 2, 234, 235, 7, 32,
	2, 2, 235, 262, 5, 24, 13, 2, 236, 237, 7, 33, 2, 2, 237, 262, 5, 24, 13,
	2, 238, 240, 7, 34, 2, 2, 239, 241, 7, 36, 2, 2, 240, 239, 3, 2, 2, 2,
	240, 241, 3, 2, 2, 2, 241, 243, 3, 2, 2, 2, 242, 244, 7, 37, 2, 2, 243,
	242, 3, 2, 2, 2, 243, 244, 3, 2, 2, 2, 244, 262, 3, 2, 2, 2, 245, 247,
	7, 35, 2, 2, 246, 248, 7, 36, 2, 2, 247, 246, 3, 2, 2, 2, 247, 248, 3,
	2, 2, 2, 248, 250, 3, 2, 2, 2, 249, 251, 7, 37, 2, 2, 250, 249, 3, 2, 2,
	2, 250, 251, 3, 2, 2, 2, 251, 262, 3, 2, 2, 2, 252, 262, 7, 43, 2, 2, 253,
	262, 7, 44, 2, 2, 254, 255, 7, 10, 2, 2, 255, 262, 5, 22, 12, 2, 256, 262,
	7, 40, 2, 2, 257, 262, 7, 41, 2, 2, 258, 262, 7, 38, 2, 2, 259, 262, 7,
	39, 2, 2, 260, 262, 7, 42, 2, 2, 261, 211, 3, 2, 2, 2, 261, 212, 3, 2,
	2, 2, 261, 213, 3, 2, 2, 2, 261, 214, 3, 2, 2, 2, 261, 215, 3, 2, 2, 2,
	261, 217, 3, 2, 2, 2, 261, 219, 3, 2, 2, 2, 261, 225, 3, 2, 2, 2, 261,
	226, 3, 2, 2, 2, 261, 228, 3, 2, 2, 2, 261, 230, 3, 2, 2, 2, 261, 232,
	3, 2, 2, 2, 261, 234, 3, 2, 2, 2, 261, 236, 3, 2, 2, 2, 261, 238, 3, 2,
	2, 2, 261, 245, 3, 2, 2, 2, 261, 252, 3, 2, 2, 2, 261, 253, 3, 2, 2, 2,
	261, 254, 3, 2, 2, 2, 261, 256, 3, 2, 2, 2, 261, 257, 3, 2, 2, 2, 261,
	258, 3, 2, 2, 2, 261, 259, 3, 2, 2, 2, 261, 260, 3, 2, 2, 2, 262, 31, 3,
	2, 2, 2, 263, 265, 7, 28, 2, 2, 264, 266, 5, 20, 11, 2, 265, 264, 3, 2,
	2, 2, 265, 266, 3, 2, 2, 2, 266, 267, 3, 2, 2, 2, 267, 268, 5, 34, 18,
	2, 268, 33, 3, 2, 2, 2, 269, 270, 7, 3, 2, 2, 270, 274, 7, 48, 2, 2, 271,
	273, 5, 6, 4, 2, 272, 271, 3, 2, 2, 2, 273, 276, 3, 2, 2, 2, 274, 272,
	3, 2, 2, 2, 274, 275, 3, 2, 2, 2, 275, 277, 3, 2, 2, 2, 276, 274, 3, 2,
	2, 2, 277, 279, 7, 4, 2, 2, 278, 269, 3, 2, 2, 2, 279, 282, 3, 2, 2, 2,
	280, 278, 3, 2, 2, 2, 280, 281, 3, 2, 2, 2, 281, 294, 3, 2, 2, 2, 282,
	280, 3, 2, 2, 2, 283, 284, 7, 3, 2, 2, 284, 288, 7, 49, 2, 2, 285, 287,
	5, 6, 4, 2, 286, 285, 3, 2, 2, 2, 287, 290, 3, 2, 2, 2, 288, 286, 3, 2,
	2, 2, 288, 289, 3, 2, 2, 2, 289, 291, 3, 2, 2, 2, 290, 288, 3, 2, 2, 2,
	291, 293, 7, 4, 2, 2, 292, 283, 3, 2, 2, 2, 293, 296, 3, 2, 2, 2, 294,
	292, 3, 2, 2, 2, 294, 295, 3, 2, 2, 2, 295, 35, 3, 2, 2, 2, 296, 294, 3,
	2, 2, 2, 297, 299, 7, 28, 2, 2, 298, 300, 5, 20, 11, 2, 299, 298, 3, 2,
	2, 2, 299, 300, 3, 2, 2, 2, 300, 301, 3, 2, 2, 2, 301, 302, 5, 38, 20,
	2, 302, 37, 3, 2, 2, 2, 303, 304, 7, 3, 2, 2, 304, 308, 7, 48, 2, 2, 305,
	307, 5, 6, 4, 2, 306, 305, 3, 2, 2, 2, 307, 310, 3, 2, 2, 2, 308, 306,
	3, 2, 2, 2, 308, 309, 3, 2, 2, 2, 309, 311, 3, 2, 2, 2, 310, 308, 3, 2,
	2, 2, 311, 313, 7, 4, 2, 2, 312, 303, 3, 2, 2, 2, 313, 316, 3, 2, 2, 2,
	314, 312, 3, 2, 2, 2, 314, 315, 3, 2, 2, 2, 315, 317, 3, 2, 2, 2, 316,
	314, 3, 2, 2, 2, 317, 318, 5, 40, 21, 2, 318, 39, 3, 2, 2, 2, 319, 320,
	7, 3, 2, 2, 320, 324, 7, 49, 2, 2, 321, 323, 5, 6, 4, 2, 322, 321, 3, 2,
	2, 2, 323, 326, 3, 2, 2, 2, 324, 322, 3, 2, 2, 2, 324, 325, 3, 2, 2, 2,
	325, 327, 3, 2, 2, 2, 326, 324, 3, 2, 2, 2, 327, 329, 7, 4, 2, 2, 328,
	319, 3, 2, 2, 2, 329, 332, 3, 2, 2, 2, 330, 328, 3, 2, 2, 2, 330, 331,
	3, 2, 2, 2, 331, 333, 3, 2, 2, 2, 332, 330, 3, 2, 2, 2, 333, 334, 5, 28,
	15, 2, 334, 41, 3, 2, 2, 2, 335, 337, 9, 5, 2, 2, 336, 338, 5, 26, 14,
	2, 337, 336, 3, 2, 2, 2, 337, 338, 3, 2, 2, 2, 338, 339, 3, 2, 2, 2, 339,
	340, 5, 46, 24, 2, 340, 342, 7, 18, 2, 2, 341, 343, 5, 26, 14, 2, 342,
	341, 3, 2, 2, 2, 342, 343, 3, 2, 2, 2, 343, 361, 3, 2, 2, 2, 344, 346,
	7, 23, 2, 2, 345, 347, 5, 26, 14, 2, 346, 345, 3, 2, 2, 2, 346, 347, 3,
	2, 2, 2, 347, 348, 3, 2, 2, 2, 348, 354, 5, 46, 24, 2, 349, 351, 7, 25,
	2, 2, 350, 352, 5, 26, 14, 2, 351, 350, 3, 2, 2, 2, 351, 352, 3, 2, 2,
	2, 352, 353, 3, 2, 2, 2, 353, 355, 5, 60, 31, 2, 354, 349, 3, 2, 2, 2,
	354, 355, 3, 2, 2, 2, 355, 356, 3, 2, 2, 2, 356, 358, 7, 18, 2, 2, 357,
	359, 5, 26, 14, 2, 358, 357, 3, 2, 2, 2, 358, 359, 3, 2, 2, 2, 359, 361,
	3, 2, 2, 2, 360, 335, 3, 2, 2, 2, 360, 344, 3, 2, 2, 2, 361, 43, 3, 2,
	2, 2, 362, 363, 7, 3, 2, 2, 363, 364, 7, 49, 2, 2, 364, 365, 5, 6, 4, 2,
	365, 366, 7, 4, 2, 2, 366, 45, 3, 2, 2, 2, 367, 369, 5, 44, 23, 2, 368,
	367, 3, 2, 2, 2, 368, 369, 3, 2, 2, 2, 369, 370, 3, 2, 2, 2, 370, 371,
	5, 60, 31, 2, 371, 47, 3, 2, 2, 2, 372, 373, 7, 3, 2, 2, 373, 374, 5, 50,
	26, 2, 374, 375, 7, 4, 2, 2, 375, 49, 3, 2, 2, 2, 376, 380, 5, 30, 16,
	2, 377, 379, 5, 48, 25, 2, 378, 377, 3, 2, 2, 2, 379, 382, 3, 2, 2, 2,
	380, 378, 3, 2, 2, 2, 380, 381, 3, 2, 2, 2, 381, 401, 3, 2, 2, 2, 382,
	380, 3, 2, 2, 2, 383, 384, 7, 28, 2, 2, 384, 401, 5, 52, 27, 2, 385, 387,
	7, 16, 2, 2, 386, 388, 5, 26, 14, 2, 387, 386, 3, 2, 2, 2, 387, 388, 3,
	2, 2, 2, 388, 389, 3, 2, 2, 2, 389, 401, 5, 46, 24, 2, 390, 392, 7, 17,
	2, 2, 391, 393, 5, 26, 14, 2, 392, 391, 3, 2, 2, 2, 392, 393, 3, 2, 2,
	2, 393, 394, 3, 2, 2, 2, 394, 401, 5, 46, 24, 2, 395, 397, 7, 23, 2, 2,
	396, 398, 5, 26, 14, 2, 397, 396, 3, 2, 2, 2, 397, 398, 3, 2, 2, 2, 398,
	399, 3, 2, 2, 2, 399, 401, 5, 58, 30, 2, 400, 376, 3, 2, 2, 2, 400, 383,
	3, 2, 2, 2, 400, 385, 3, 2, 2, 2, 400, 390, 3, 2, 2, 2, 400, 395, 3, 2,
	2, 2, 401, 51, 3, 2, 2, 2, 402, 404, 5, 20, 11, 2, 403, 402, 3, 2, 2, 2,
	403, 404, 3, 2, 2, 2, 404, 405, 3, 2, 2, 2, 405, 406, 5, 54, 28, 2, 406,
	53, 3, 2, 2, 2, 407, 408, 7, 3, 2, 2, 408, 412, 7, 48, 2, 2, 409, 411,
	5, 6, 4, 2, 410, 409, 3, 2, 2, 2, 411, 414, 3, 2, 2, 2, 412, 410, 3, 2,
	2, 2, 412, 413, 3, 2, 2, 2, 413, 415, 3, 2, 2, 2, 414, 412, 3, 2, 2, 2,
	415, 417, 7, 4, 2, 2, 416, 407, 3, 2, 2, 2, 417, 420, 3, 2, 2, 2, 418,
	416, 3, 2, 2, 2, 418, 419, 3, 2, 2, 2, 419, 421, 3, 2, 2, 2, 420, 418,
	3, 2, 2, 2, 421, 422, 5, 56, 29, 2, 422, 55, 3, 2, 2, 2, 423, 424, 7, 3,
	2, 2, 424, 428, 7, 49, 2, 2, 425, 427, 5, 6, 4, 2, 426, 425, 3, 2, 2, 2,
	427, 430, 3, 2, 2, 2, 428, 426, 3, 2, 2, 2, 428, 429, 3, 2, 2, 2, 429,
	431, 3, 2, 2, 2, 430, 428, 3, 2, 2, 2, 431, 433, 7, 4, 2, 2, 432, 423,
	3, 2, 2, 2, 433, 436, 3, 2, 2, 2, 434, 432, 3, 2, 2, 2, 434, 435, 3, 2,
	2, 2, 435, 440, 3, 2, 2, 2, 436, 434, 3, 2, 2, 2, 437, 439, 5, 48, 25,
	2, 438, 437, 3, 2, 2, 2, 439, 442, 3, 2, 2, 2, 440, 438, 3, 2, 2, 2, 440,
	441, 3, 2, 2, 2, 441, 57, 3, 2, 2, 2, 442, 440, 3, 2, 2, 2, 443, 444, 5,
	44, 23, 2, 444, 445, 5, 58, 30, 2, 445, 464, 3, 2, 2, 2, 446, 448, 5, 48,
	25, 2, 447, 446, 3, 2, 2, 2, 448, 451, 3, 2, 2, 2, 449, 447, 3, 2, 2, 2,
	449, 450, 3, 2, 2, 2, 450, 452, 3, 2, 2, 2, 451, 449, 3, 2, 2, 2, 452,
	453, 7, 3, 2, 2, 453, 454, 7, 24, 2, 2, 454, 455, 5, 60, 31, 2, 455, 461,
	7, 4, 2, 2, 456, 457, 7, 3, 2, 2, 457, 458, 7, 25, 2, 2, 458, 459, 5, 60,
	31, 2, 459, 460, 7, 4, 2, 2, 460, 462, 3, 2, 2, 2, 461, 456, 3, 2, 2, 2,
	461, 462, 3, 2, 2, 2, 462, 464, 3, 2, 2, 2, 463, 443, 3, 2, 2, 2, 463,
	449, 3, 2, 2, 2, 464, 59, 3, 2, 2, 2, 465, 467, 5, 28, 15, 2, 466, 465,
	3, 2, 2, 2, 467, 470, 3, 2, 2, 2, 468, 466, 3, 2, 2, 2, 468, 469, 3, 2,
	2, 2, 469, 472, 3, 2, 2, 2, 470, 468, 3, 2, 2, 2, 471, 473, 5, 32, 17,
	2, 472, 471, 3, 2, 2, 2, 472, 473, 3, 2, 2, 2, 473, 61, 3, 2, 2, 2, 474,
	475, 5, 60, 31, 2, 475, 63, 3, 2, 2, 2, 476, 477, 7, 3, 2, 2, 477, 479,
	7, 46, 2, 2, 478, 480, 5, 26, 14, 2, 479, 478, 3, 2, 2, 2, 479, 480, 3,
	2, 2, 2, 480, 481, 3, 2, 2, 2, 481, 482, 5, 66, 34, 2, 482, 483, 7, 4,
	2, 2, 483, 65, 3, 2, 2, 2, 484, 486, 5, 20, 11, 2, 485, 484, 3, 2, 2, 2,
	485, 486, 3, 2, 2, 2, 486, 487, 3, 2, 2, 2, 487, 498, 5, 72, 37, 2, 488,
	490, 5, 100, 51, 2, 489, 491, 5, 20, 11, 2, 490, 489, 3, 2, 2, 2, 490,
	491, 3, 2, 2, 2, 491, 492, 3, 2, 2, 2, 492, 493, 5, 68, 35, 2, 493, 498,
	3, 2, 2, 2, 494, 495, 5, 106, 54, 2, 495, 496, 5, 66, 34, 2, 496, 498,
	3, 2, 2, 2, 497, 485, 3, 2, 2, 2, 497, 488, 3, 2, 2, 2, 497, 494, 3, 2,
	2, 2, 498, 67, 3, 2, 2, 2, 499, 500, 7, 3, 2, 2, 500, 504, 7, 48, 2, 2,
	501, 503, 5, 6, 4, 2, 502, 501, 3, 2, 2, 2, 503, 506, 3, 2, 2, 2, 504,
	502, 3, 2, 2, 2, 504, 505, 3, 2, 2, 2, 505, 507, 3, 2, 2, 2, 506, 504,
	3, 2, 2, 2, 507, 515, 7, 4, 2, 2, 508, 509, 7, 3, 2, 2, 509, 510, 7, 48,
	2, 2, 510, 511, 5, 26, 14, 2, 511, 512, 5, 6, 4, 2, 512, 513, 7, 4, 2,
	2, 513, 515, 3, 2, 2, 2, 514, 499, 3, 2, 2, 2, 514, 508, 3, 2, 2, 2, 515,
	516, 3, 2, 2, 2, 516, 517, 5, 70, 36, 2, 517, 69, 3, 2, 2, 2, 518, 519,
	7, 3, 2, 2, 519, 523, 7, 49, 2, 2, 520, 522, 5, 6, 4, 2, 521, 520, 3, 2,
	2, 2, 522, 525, 3, 2, 2, 2, 523, 521, 3, 2, 2, 2, 523, 524, 3, 2, 2, 2,
	524, 526, 3, 2, 2, 2, 525, 523, 3, 2, 2, 2, 526, 528, 7, 4, 2, 2, 527,
	518, 3, 2, 2, 2, 528, 531, 3, 2, 2, 2, 529, 527, 3, 2, 2, 2, 529, 530,
	3, 2, 2, 2, 530, 71, 3, 2, 2, 2, 531, 529, 3, 2, 2, 2, 532, 533, 7, 3,
	2, 2, 533, 537, 7, 48, 2, 2, 534, 536, 5, 6, 4, 2, 535, 534, 3, 2, 2, 2,
	536, 539, 3, 2, 2, 2, 537, 535, 3, 2, 2, 2, 537, 538, 3, 2, 2, 2, 538,
	540, 3, 2, 2, 2, 539, 537, 3, 2, 2, 2, 540, 548, 7, 4, 2, 2, 541, 542,
	7, 3, 2, 2, 542, 543, 7, 48, 2, 2, 543, 544, 5, 26, 14, 2, 544, 545, 5,
	6, 4, 2, 545, 546, 7, 4, 2, 2, 546, 548, 3, 2, 2, 2, 547, 532, 3, 2, 2,
	2, 547, 541, 3, 2, 2, 2, 548, 551, 3, 2, 2, 2, 549, 547, 3, 2, 2, 2, 549,
	550, 3, 2, 2, 2, 550, 552, 3, 2, 2, 2, 551, 549, 3, 2, 2, 2, 552, 553,
	5, 74, 38, 2, 553, 73, 3, 2, 2, 2, 554, 555, 7, 3, 2, 2, 555, 559, 7, 49,
	2, 2, 556, 558, 5, 6, 4, 2, 557, 556, 3, 2, 2, 2, 558, 561, 3, 2, 2, 2,
	559, 557, 3, 2, 2, 2, 559, 560, 3, 2, 2, 2, 560, 562, 3, 2, 2, 2, 561,
	559, 3, 2, 2, 2, 562, 564, 7, 4, 2, 2, 563, 554, 3, 2, 2, 2, 564, 567,
	3, 2, 2, 2, 565, 563, 3, 2, 2, 2, 565, 566, 3, 2, 2, 2, 566, 568, 3, 2,
	2, 2, 567, 565, 3, 2, 2, 2, 568, 569, 5, 76, 39, 2, 569, 75, 3, 2, 2, 2,
	570, 571, 7, 3, 2, 2, 571, 575, 7, 50, 2, 2, 572, 574, 5, 6, 4, 2, 573,
	572, 3, 2, 2, 2, 574, 577, 3, 2, 2, 2, 575, 573, 3, 2, 2, 2, 575, 576,
	3, 2, 2, 2, 576, 578, 3, 2, 2, 2, 577, 575, 3, 2, 2, 2, 578, 586, 7, 4,
	2, 2, 579, 580, 7, 3, 2, 2, 580, 581, 7, 50, 2, 2, 581, 582, 5, 26, 14,
	2, 582, 583, 5, 6, 4, 2, 583, 584, 7, 4, 2, 2, 584, 586, 3, 2, 2, 2, 585,
	570, 3, 2, 2, 2, 585, 579, 3, 2, 2, 2, 586, 589, 3, 2, 2, 2, 587, 585,
	3, 2, 2, 2, 587, 588, 3, 2, 2, 2, 588, 590, 3, 2, 2, 2, 589, 587, 3, 2,
	2, 2, 590, 591, 5, 60, 31, 2, 591, 77, 3, 2, 2, 2, 592, 593, 7, 3, 2, 2,
	593, 594, 7, 56, 2, 2, 594, 595, 5, 62, 32, 2, 595, 596, 7, 4, 2, 2, 596,
	599, 3, 2, 2, 2, 597, 599, 5, 48, 25, 2, 598, 592, 3, 2, 2, 2, 598, 597,
	3, 2, 2, 2, 599, 79, 3, 2, 2, 2, 600, 601, 7, 3, 2, 2, 601, 603, 7, 54,
	2, 2, 602, 604, 5, 24, 13, 2, 603, 602, 3, 2, 2, 2, 603, 604, 3, 2, 2,
	2, 604, 605, 3, 2, 2, 2, 605, 609, 5, 78, 40, 2, 606, 608, 5, 24, 13, 2,
	607, 606, 3, 2, 2, 2, 608, 611, 3, 2, 2, 2, 609, 607, 3, 2, 2, 2, 609,
	610, 3, 2, 2, 2, 610, 612, 3, 2, 2, 2, 611, 609, 3, 2, 2, 2, 612, 613,
	7, 4, 2, 2, 613, 81, 3, 2, 2, 2, 614, 615, 7, 3, 2, 2, 615, 617, 7, 52,
	2, 2, 616, 618, 5, 26, 14, 2, 617, 616, 3, 2, 2, 2, 617, 618, 3, 2, 2,
	2, 618, 619, 3, 2, 2, 2, 619, 620, 5, 84, 43, 2, 620, 621, 7, 4, 2, 2,
	621, 83, 3, 2, 2, 2, 622, 641, 5, 16, 9, 2, 623, 624, 5, 100, 51, 2, 624,
	625, 5, 16, 9, 2, 625, 641, 3, 2, 2, 2, 626, 627, 5, 106, 54, 2, 627, 628,
	5, 84, 43, 2, 628, 641, 3, 2, 2, 2, 629, 630, 5, 8, 5, 2, 630, 631, 7,
	3, 2, 2, 631, 635, 7, 54, 2, 2, 632, 634, 5, 24, 13, 2, 633, 632, 3, 2,
	2, 2, 634, 637, 3, 2, 2, 2, 635, 633, 3, 2, 2, 2, 635, 636, 3, 2, 2, 2,
	636, 638, 3, 2, 2, 2, 637, 635, 3, 2, 2, 2, 638, 639, 7, 4, 2, 2, 639,
	641, 3, 2, 2, 2, 640, 622, 3, 2, 2, 2, 640, 623, 3, 2, 2, 2, 640, 626,
	3, 2, 2, 2, 640, 629, 3, 2, 2, 2, 641, 85, 3, 2, 2, 2, 642, 643, 7, 3,
	2, 2, 643, 645, 7, 55, 2, 2, 644, 646, 5, 24, 13, 2, 645, 644, 3, 2, 2,
	2, 645, 646, 3, 2, 2, 2, 646, 647, 3, 2, 2, 2, 647, 651, 5, 78, 40, 2,
	648, 650, 7, 8, 2, 2, 649, 648, 3, 2, 2, 2, 650, 653, 3, 2, 2, 2, 651,
	649, 3, 2, 2, 2, 651, 652, 3, 2, 2, 2, 652, 654, 3, 2, 2, 2, 653, 651,
	3, 2, 2, 2, 654, 655, 7, 4, 2, 2, 655, 87, 3, 2, 2, 2, 656, 657, 7, 3,
	2, 2, 657, 659, 7, 53, 2, 2, 658, 660, 5, 26, 14, 2, 659, 658, 3, 2, 2,
	2, 659, 660, 3, 2, 2, 2, 660, 661, 3, 2, 2, 2, 661, 662, 5, 90, 46, 2,
	662, 663, 7, 4, 2, 2, 663, 89, 3, 2, 2, 2, 664, 681, 5, 18, 10, 2, 665,
	666, 5, 100, 51, 2, 666, 667, 5, 18, 10, 2, 667, 681, 3, 2, 2, 2, 668,
	669, 5, 106, 54, 2, 669, 670, 5, 90, 46, 2, 670, 681, 3, 2, 2, 2, 671,
	672, 7, 3, 2, 2, 672, 676, 7, 55, 2, 2, 673, 675, 7, 8, 2, 2, 674, 673,
	3, 2, 2, 2, 675, 678, 3, 2, 2, 2, 676, 674, 3, 2, 2, 2, 676, 677, 3, 2,
	2, 2, 677, 679, 3, 2, 2, 2, 678, 676, 3, 2, 2, 2, 679, 681, 7, 4, 2, 2,
	680, 664, 3, 2, 2, 2, 680, 665, 3, 2, 2, 2, 680, 668, 3, 2, 2, 2, 680,
	671, 3, 2, 2, 2, 681, 91, 3, 2, 2, 2, 682, 683, 7, 3, 2, 2, 683, 685, 7,
	51, 2, 2, 684, 686, 5, 26, 14, 2, 685, 684, 3, 2, 2, 2, 685, 686, 3, 2,
	2, 2, 686, 687, 3, 2, 2, 2, 687, 688, 5, 94, 48, 2, 688, 689, 7, 4, 2,
	2, 689, 93, 3, 2, 2, 2, 690, 691, 5, 10, 6, 2, 691, 692, 5, 62, 32, 2,
	692, 700, 3, 2, 2, 2, 693, 694, 5, 100, 51, 2, 694, 695, 5, 10, 6, 2, 695,
	700, 3, 2, 2, 2, 696, 697, 5, 106, 54, 2, 697, 698, 5, 94, 48, 2, 698,
	700, 3, 2, 2, 2, 699, 690, 3, 2, 2, 2, 699, 693, 3, 2, 2, 2, 699, 696,
	3, 2, 2, 2, 700, 95, 3, 2, 2, 2, 701, 702, 7, 3, 2, 2, 702, 704, 7, 46,
	2, 2, 703, 705, 5, 26, 14, 2, 704, 703, 3, 2, 2, 2, 704, 705, 3, 2, 2,
	2, 705, 706, 3, 2, 2, 2, 706, 707, 5, 20, 11, 2, 707, 708, 7, 4, 2, 2,
	708, 742, 3, 2, 2, 2, 709, 710, 7, 3, 2, 2, 710, 712, 7, 46, 2, 2, 711,
	713, 5, 26, 14, 2, 712, 711, 3, 2, 2, 2, 712, 713, 3, 2, 2, 2, 713, 714,
	3, 2, 2, 2, 714, 715, 5, 14, 8, 2, 715, 716, 7, 4, 2, 2, 716, 742, 3, 2,
	2, 2, 717, 718, 7, 3, 2, 2, 718, 720, 7, 52, 2, 2, 719, 721, 5, 26, 14,
	2, 720, 719, 3, 2, 2, 2, 720, 721, 3, 2, 2, 2, 721, 722, 3, 2, 2, 2, 722,
	723, 5, 16, 9, 2, 723, 724, 7, 4, 2, 2, 724, 742, 3, 2, 2, 2, 725, 726,
	7, 3, 2, 2, 726, 728, 7, 53, 2, 2, 727, 729, 5, 26, 14, 2, 728, 727, 3,
	2, 2, 2, 728, 729, 3, 2, 2, 2, 729, 730, 3, 2, 2, 2, 730, 731, 5, 18, 10,
	2, 731, 732, 7, 4, 2, 2, 732, 742, 3, 2, 2, 2, 733, 734, 7, 3, 2, 2, 734,
	736, 7, 51, 2, 2, 735, 737, 5, 26, 14, 2, 736, 735, 3, 2, 2, 2, 736, 737,
	3, 2, 2, 2, 737, 738, 3, 2, 2, 2, 738, 739, 5, 10, 6, 2, 739, 740, 7, 4,
	2, 2, 740, 742, 3, 2, 2, 2, 741, 701, 3, 2, 2, 2, 741, 709, 3, 2, 2, 2,
	741, 717, 3, 2, 2, 2, 741, 725, 3, 2, 2, 2, 741, 733, 3, 2, 2, 2, 742,
	97, 3, 2, 2, 2, 743, 744, 7, 3, 2, 2, 744, 745, 7, 57, 2, 2, 745, 746,
	5, 4, 3, 2, 746, 747, 5, 4, 3, 2, 747, 748, 5, 96, 49, 2, 748, 749, 7,
	4, 2, 2, 749, 99, 3, 2, 2, 2, 750, 751, 7, 3, 2, 2, 751, 752, 7, 57, 2,
	2, 752, 753, 5, 4, 3, 2, 753, 754, 5, 4, 3, 2, 754, 755, 7, 4, 2, 2, 755,
	101, 3, 2, 2, 2, 756, 757, 7, 3, 2, 2, 757, 758, 7, 46, 2, 2, 758, 759,
	5, 24, 13, 2, 759, 760, 7, 4, 2, 2, 760, 777, 3, 2, 2, 2, 761, 762, 7,
	3, 2, 2, 762, 763, 7, 52, 2, 2, 763, 764, 5, 24, 13, 2, 764, 765, 7, 4,
	2, 2, 765, 777, 3, 2, 2, 2, 766, 767, 7, 3, 2, 2, 767, 768, 7, 53, 2, 2,
	768, 769, 5, 24, 13, 2, 769, 770, 7, 4, 2, 2, 770, 777, 3, 2, 2, 2, 771,
	772, 7, 3, 2, 2, 772, 773, 7, 51, 2, 2, 773, 774, 5, 24, 13, 2, 774, 775,
	7, 4, 2, 2, 775, 777, 3, 2, 2, 2, 776, 756, 3, 2, 2, 2, 776, 761, 3, 2,
	2, 2, 776, 766, 3, 2, 2, 2, 776, 771, 3, 2, 2, 2, 777, 103, 3, 2, 2, 2,
	778, 779, 7, 3, 2, 2, 779, 780, 7, 58, 2, 2, 780, 781, 5, 4, 3, 2, 781,
	782, 5, 102, 52, 2, 782, 783, 7, 4, 2, 2, 783, 105, 3, 2, 2, 2, 784, 785,
	7, 3, 2, 2, 785, 786, 7, 58, 2, 2, 786, 787, 5, 4, 3, 2, 787, 788, 7, 4,
	2, 2, 788, 107, 3, 2, 2, 2, 789, 790, 5, 12, 7, 2, 790, 109, 3, 2, 2, 2,
	791, 792, 7, 3, 2, 2, 792, 794, 7, 45, 2, 2, 793, 795, 5, 26, 14, 2, 794,
	793, 3, 2, 2, 2, 794, 795, 3, 2, 2, 2, 795, 796, 3, 2, 2, 2, 796, 797,
	5, 108, 55, 2, 797, 798, 7, 4, 2, 2, 798, 111, 3, 2, 2, 2, 799, 800, 7,
	3, 2, 2, 800, 801, 7, 47, 2, 2, 801, 802, 5, 24, 13, 2, 802, 803, 7, 4,
	2, 2, 803, 113, 3, 2, 2, 2, 804, 815, 5, 110, 56, 2, 805, 815, 5, 92, 47,
	2, 806, 815, 5, 82, 42, 2, 807, 815, 5, 88, 45, 2, 808, 815, 5, 64, 33,
	2, 809, 815, 5, 80, 41, 2, 810, 815, 5, 86, 44, 2, 811, 815, 5, 112, 57,
	2, 812, 815, 5, 98, 50, 2, 813, 815, 5, 104, 53, 2, 814, 804, 3, 2, 2,
	2, 814, 805, 3, 2, 2, 2, 814, 806, 3, 2, 2, 2, 814, 807, 3, 2, 2, 2, 814,
	808, 3, 2, 2, 2, 814, 809, 3, 2, 2, 2, 814, 810, 3, 2, 2, 2, 814, 811,
	3, 2, 2, 2, 814, 812, 3, 2, 2, 2, 814, 813, 3, 2, 2, 2, 815, 115, 3, 2,
	2, 2, 816, 817, 7, 3, 2, 2, 817, 819, 7, 59, 2, 2, 818, 820, 7, 76, 2,
	2, 819, 818, 3, 2, 2, 2, 819, 820, 3, 2, 2, 2, 820, 824, 3, 2, 2, 2, 821,
	823, 5, 114, 58, 2, 822, 821, 3, 2, 2, 2, 823, 826, 3, 2, 2, 2, 824, 822,
	3, 2, 2, 2, 824, 825, 3, 2, 2, 2, 825, 827, 3, 2, 2, 2, 826, 824, 3, 2,
	2, 2, 827, 828, 7, 4, 2, 2, 828, 117, 3, 2, 2, 2, 829, 844, 5, 116, 59,
	2, 830, 831, 7, 3, 2, 2, 831, 833, 7, 59, 2, 2, 832, 834, 7, 76, 2, 2,
	833, 832, 3, 2, 2, 2, 833, 834, 3, 2, 2, 2, 834, 835, 3, 2, 2, 2, 835,
	839, 9, 6, 2, 2, 836, 838, 7, 8, 2, 2, 837, 836, 3, 2, 2, 2, 838, 841,
	3, 2, 2, 2, 839, 837, 3, 2, 2, 2, 839, 840, 3, 2, 2, 2, 840, 842, 3, 2,
	2, 2, 841, 839, 3, 2, 2, 2, 842, 844, 7, 4, 2, 2, 843, 829, 3, 2, 2, 2,
	843, 830, 3, 2, 2, 2, 844, 119, 3, 2, 2, 2, 845, 846, 7, 3, 2, 2, 846,
	848, 7, 64, 2, 2, 847, 849, 7, 76, 2, 2, 848, 847, 3, 2, 2, 2, 848, 849,
	3, 2, 2, 2, 849, 850, 3, 2, 2, 2, 850, 851, 5, 4, 3, 2, 851, 852, 5, 130,
	66, 2, 852, 853, 7, 4, 2, 2, 853, 863, 3, 2, 2, 2, 854, 855, 7, 3, 2, 2,
	855, 857, 7, 65, 2, 2, 856, 858, 7, 76, 2, 2, 857, 856, 3, 2, 2, 2, 857,
	858, 3, 2, 2, 2, 858, 859, 3, 2, 2, 2, 859, 860, 5, 4, 3, 2, 860, 861,
	7, 4, 2, 2, 861, 863, 3, 2, 2, 2, 862, 845, 3, 2, 2, 2, 862, 854, 3, 2,
	2, 2, 863, 121, 3, 2, 2, 2, 864, 865, 7, 3, 2, 2, 865, 866, 7, 66, 2, 2,
	866, 867, 5, 118, 60, 2, 867, 868, 7, 8, 2, 2, 868, 869, 7, 4, 2, 2, 869,
	917, 3, 2, 2, 2, 870, 871, 7, 3, 2, 2, 871, 872, 7, 67, 2, 2, 872, 873,
	5, 118, 60, 2, 873, 874, 7, 8, 2, 2, 874, 875, 7, 4, 2, 2, 875, 917, 3,
	2, 2, 2, 876, 877, 7, 3, 2, 2, 877, 878, 7, 68, 2, 2, 878, 879, 5, 118,
	60, 2, 879, 880, 7, 8, 2, 2, 880, 881, 7, 4, 2, 2, 881, 917, 3, 2, 2, 2,
	882, 883, 7, 3, 2, 2, 883, 884, 7, 72, 2, 2, 884, 885, 5, 118, 60, 2, 885,
	886, 7, 8, 2, 2, 886, 887, 7, 4, 2, 2, 887, 917, 3, 2, 2, 2, 888, 889,
	7, 3, 2, 2, 889, 890, 7, 69, 2, 2, 890, 891, 5, 120, 61, 2, 891, 892, 5,
	130, 66, 2, 892, 893, 7, 4, 2, 2, 893, 917, 3, 2, 2, 2, 894, 895, 7, 3,
	2, 2, 895, 896, 7, 70, 2, 2, 896, 897, 5, 120, 61, 2, 897, 898, 7, 4, 2,
	2, 898, 917, 3, 2, 2, 2, 899, 900, 7, 3, 2, 2, 900, 901, 7, 71, 2, 2, 901,
	902, 5, 120, 61, 2, 902, 903, 7, 4, 2, 2, 903, 917, 3, 2, 2, 2, 904, 905,
	7, 3, 2, 2, 905, 906, 7, 72, 2, 2, 906, 907, 5, 120, 61, 2, 907, 908, 7,
	8, 2, 2, 908, 909, 7, 4, 2, 2, 909, 917, 3, 2, 2, 2, 910, 911, 7, 3, 2,
	2, 911, 912, 7, 73, 2, 2, 912, 913, 5, 120, 61, 2, 913, 914, 7, 8, 2, 2,
	914, 915, 7, 4, 2, 2, 915, 917, 3, 2, 2, 2, 916, 864, 3, 2, 2, 2, 916,
	870, 3, 2, 2, 2, 916, 876, 3, 2, 2, 2, 916, 882, 3, 2, 2, 2, 916, 888,
	3, 2, 2, 2, 916, 894, 3, 2, 2, 2, 916, 899, 3, 2, 2, 2, 916, 904, 3, 2,
	2, 2, 916, 910, 3, 2, 2, 2, 917, 123, 3, 2, 2, 2, 918, 931, 5, 120, 61,
	2, 919, 931, 5, 122, 62, 2, 920, 931, 5, 118, 60, 2, 921, 922, 7, 3, 2,
	2, 922, 923, 7, 63, 2, 2, 923, 925, 5, 4, 3, 2, 924, 926, 7, 76, 2, 2,
	925, 924, 3, 2, 2, 2, 925, 926, 3, 2, 2, 2, 926, 927, 3, 2, 2, 2, 927,
	928, 7, 4, 2, 2, 928, 931, 3, 2, 2, 2, 929, 931, 5, 126, 64, 2, 930, 918,
	3, 2, 2, 2, 930, 919, 3, 2, 2, 2, 930, 920, 3, 2, 2, 2, 930, 921, 3, 2,
	2, 2, 930, 929, 3, 2, 2, 2, 931, 125, 3, 2, 2, 2, 932, 933, 7, 3, 2, 2,
	933, 935, 7, 62, 2, 2, 934, 936, 7, 76, 2, 2, 935, 934, 3, 2, 2, 2, 935,
	936, 3, 2, 2, 2, 936, 940, 3, 2, 2, 2, 937, 939, 5, 124, 63, 2, 938, 937,
	3, 2, 2, 2, 939, 942, 3, 2, 2, 2, 940, 938, 3, 2, 2, 2, 940, 941, 3, 2,
	2, 2, 941, 943, 3, 2, 2, 2, 942, 940, 3, 2, 2, 2, 943, 965, 7, 4, 2, 2,
	944, 945, 7, 3, 2, 2, 945, 947, 7, 74, 2, 2, 946, 948, 7, 76, 2, 2, 947,
	946, 3, 2, 2, 2, 947, 948, 3, 2, 2, 2, 948, 949, 3, 2, 2, 2, 949, 950,
	7, 8, 2, 2, 950, 965, 7, 4, 2, 2, 951, 952, 7, 3, 2, 2, 952, 954, 7, 75,
	2, 2, 953, 955, 7, 76, 2, 2, 954, 953, 3, 2, 2, 2, 954, 955, 3, 2, 2, 2,
	955, 956, 3, 2, 2, 2, 956, 957, 7, 8, 2, 2, 957, 965, 7, 4, 2, 2, 958,
	959, 7, 3, 2, 2, 959, 961, 7, 75, 2, 2, 960, 962, 7, 76, 2, 2, 961, 960,
	3, 2, 2, 2, 961, 962, 3, 2, 2, 2, 962, 963, 3, 2, 2, 2, 963, 965, 7, 4,
	2, 2, 964, 932, 3, 2, 2, 2, 964, 944, 3, 2, 2, 2, 964, 951, 3, 2, 2, 2,
	964, 958, 3, 2, 2, 2, 965, 127, 3, 2, 2, 2, 966, 967, 7, 3, 2, 2, 967,
	968, 7, 10, 2, 2, 968, 969, 5, 22, 12, 2, 969, 970, 7, 4, 2, 2, 970, 129,
	3, 2, 2, 2, 971, 973, 5, 128, 65, 2, 972, 971, 3, 2, 2, 2, 973, 976, 3,
	2, 2, 2, 974, 972, 3, 2, 2, 2, 974, 975, 3, 2, 2, 2, 975, 131, 3, 2, 2,
	2, 976, 974, 3, 2, 2, 2, 977, 979, 5, 124, 63, 2, 978, 977, 3, 2, 2, 2,
	979, 982, 3, 2, 2, 2, 980, 978, 3, 2, 2, 2, 980, 981, 3, 2, 2, 2, 981,
	983, 3, 2, 2, 2, 982, 980, 3, 2, 2, 2, 983, 992, 7, 2, 2, 3, 984, 986,
	5, 114, 58, 2, 985, 984, 3, 2, 2, 2, 986, 987, 3, 2, 2, 2, 987, 985, 3,
	2, 2, 2, 987, 988, 3, 2, 2, 2, 988, 989, 3, 2, 2, 2, 989, 990, 7, 2, 2,
	3, 990, 992, 3, 2, 2, 2, 991, 980, 3, 2, 2, 2, 991, 985, 3, 2, 2, 2, 992,
	133, 3, 2, 2, 2, 993, 994, 5, 116, 59, 2, 994, 995, 7, 2, 2, 3, 995, 1004,
	3, 2, 2, 2, 996, 998, 5, 114, 58, 2, 997, 996, 3, 2, 2, 2, 998, 1001, 3,
	2, 2, 2, 999, 997, 3, 2, 2, 2, 999, 1000, 3, 2, 2, 2, 1000, 1002, 3, 2,
	2, 2, 1001, 999, 3, 2, 2, 2, 1002, 1004, 7, 2, 2, 3, 1003, 993, 3, 2, 2,
	2, 1003, 999, 3, 2, 2, 2, 1004, 135, 3, 2, 2, 2, 111, 150, 162, 169, 176,
	181, 186, 192, 209, 223, 240, 243, 247, 250, 261, 265, 274, 280, 288, 294,
	299, 308, 314, 324, 330, 337, 342, 346, 351, 354, 358, 360, 368, 380, 387,
	392, 397, 400, 403, 412, 418, 428, 434, 440, 449, 461, 463, 468, 472, 479,
	485, 490, 497, 504, 514, 523, 529, 537, 547, 549, 559, 565, 575, 585, 587,
	598, 603, 609, 617, 635, 640, 645, 651, 659, 676, 680, 685, 699, 704, 712,
	720, 728, 736, 741, 776, 794, 814, 819, 824, 833, 839, 843, 848, 857, 862,
	916, 925, 930, 935, 940, 947, 954, 961, 964, 974, 980, 987, 991, 999, 1003,
}
var literalNames = []string{
	"", "'('", "')'", "", "", "", "", "", "", "'funcref'", "'mut'", "'nop'",
	"'unreachable'", "'drop'", "'block'", "'loop'", "'end'", "'br'", "'br_if'",
	"'br_table'", "'return'", "'if'", "'then'", "'else'", "'select'", "'call'",
	"'call_indirect'", "'local.get'", "'local.set'", "'local.tee'", "'global.get'",
	"'global.set'", "", "", "", "", "", "", "", "", "", "'memory.size'", "'memory.grow'",
	"'type'", "'func'", "'start'", "'param'", "'result'", "'local'", "'global'",
	"'table'", "'memory'", "'elem'", "'data'", "'offset'", "'import'", "'export'",
	"'module'", "'binary'", "'quote'", "'script'", "'register'", "'invoke'",
	"'get'", "'assert_malformed'", "'assert_invalid'", "'assert_unlinkable'",
	"'assert_return'", "'assert_return_canonical_nan'", "'assert_return_arithmetic_nan'",
	"'assert_trap'", "'assert_exhaustion'", "'input'", "'output'",
}
var symbolicNames = []string{
	"", "LPAR", "RPAR", "NAT", "INT", "FLOAT", "STRING_", "VALUE_TYPE", "CONST",
	"FUNCREF", "MUT", "NOP", "UNREACHABLE", "DROP", "BLOCK", "LOOP", "END",
	"BR", "BR_IF", "BR_TABLE", "RETURN", "IF", "THEN", "ELSE", "SELECT", "CALL",
	"CALL_INDIRECT", "LOCAL_GET", "LOCAL_SET", "LOCAL_TEE", "GLOBAL_GET", "GLOBAL_SET",
	"LOAD", "STORE", "OFFSET_EQ_NAT", "ALIGN_EQ_NAT", "UNARY", "BINARY", "TEST",
	"COMPARE", "CONVERT", "MEMORY_SIZE", "MEMORY_GROW", "TYPE", "FUNC", "START_",
	"PARAM", "RESULT", "LOCAL", "GLOBAL", "TABLE", "MEMORY", "ELEM", "DATA",
	"OFFSET", "IMPORT", "EXPORT", "MODULE", "BIN", "QUOTE", "SCRIPT", "REGISTER",
	"INVOKE", "GET", "ASSERT_MALFORMED", "ASSERT_INVALID", "ASSERT_UNLINKABLE",
	"ASSERT_RETURN", "ASSERT_RETURN_CANONICAL_NAN", "ASSERT_RETURN_ARITHMETIC_NAN",
	"ASSERT_TRAP", "ASSERT_EXHAUSTION", "INPUT", "OUTPUT", "VAR", "SPACE",
	"COMMENT",
}

var ruleNames = []string{
	"value", "name", "value_type", "elem_type", "global_type", "def_type",
	"func_type", "table_type", "memory_type", "type_use", "literal", "var_",
	"bind_var", "instr", "plain_instr", "call_instr", "call_instr_params",
	"call_instr_instr", "call_instr_params_instr", "call_instr_results_instr",
	"block_instr", "block_type", "block", "expr", "expr1", "call_expr_type",
	"call_expr_params", "call_expr_results", "if_block", "instr_list", "const_expr",
	"func_", "func_fields", "func_fields_import", "func_fields_import_result",
	"func_fields_body", "func_result_body", "func_body", "offset", "elem",
	"table", "table_fields", "data", "memory", "memory_fields", "sglobal",
	"global_fields", "import_desc", "simport", "inline_import", "export_desc",
	"export_", "inline_export", "type_", "type_def", "start_", "module_field",
	"module_", "script_module", "action_", "assertion", "cmd", "meta", "wconst",
	"const_list", "script", "module",
}

type WatParser struct {
	*antlr.BaseParser
}

// NewWatParser produces a new parser instance for the optional input antlr.TokenStream.
//
// The *WatParser instance produced may be reused by calling the SetInputStream method.
// The initial parser configuration is expensive to construct, and the object is not thread-safe;
// however, if used within a Golang sync.Pool, the construction cost amortizes well and the
// objects can be used in a thread-safe manner.
func NewWatParser(input antlr.TokenStream) *WatParser {
	this := new(WatParser)
	deserializer := antlr.NewATNDeserializer(nil)
	deserializedATN := deserializer.DeserializeFromUInt16(parserATN)
	decisionToDFA := make([]*antlr.DFA, len(deserializedATN.DecisionToState))
	for index, ds := range deserializedATN.DecisionToState {
		decisionToDFA[index] = antlr.NewDFA(ds, index)
	}
	this.BaseParser = antlr.NewBaseParser(input)

	this.Interpreter = antlr.NewParserATNSimulator(this, deserializedATN, decisionToDFA, antlr.NewPredictionContextCache())
	this.RuleNames = ruleNames
	this.LiteralNames = literalNames
	this.SymbolicNames = symbolicNames
	this.GrammarFileName = "WatParser.g4"

	return this
}

// WatParser tokens.
const (
	WatParserEOF                          = antlr.TokenEOF
	WatParserLPAR                         = 1
	WatParserRPAR                         = 2
	WatParserNAT                          = 3
	WatParserINT                          = 4
	WatParserFLOAT                        = 5
	WatParserSTRING_                      = 6
	WatParserVALUE_TYPE                   = 7
	WatParserCONST                        = 8
	WatParserFUNCREF                      = 9
	WatParserMUT                          = 10
	WatParserNOP                          = 11
	WatParserUNREACHABLE                  = 12
	WatParserDROP                         = 13
	WatParserBLOCK                        = 14
	WatParserLOOP                         = 15
	WatParserEND                          = 16
	WatParserBR                           = 17
	WatParserBR_IF                        = 18
	WatParserBR_TABLE                     = 19
	WatParserRETURN                       = 20
	WatParserIF                           = 21
	WatParserTHEN                         = 22
	WatParserELSE                         = 23
	WatParserSELECT                       = 24
	WatParserCALL                         = 25
	WatParserCALL_INDIRECT                = 26
	WatParserLOCAL_GET                    = 27
	WatParserLOCAL_SET                    = 28
	WatParserLOCAL_TEE                    = 29
	WatParserGLOBAL_GET                   = 30
	WatParserGLOBAL_SET                   = 31
	WatParserLOAD                         = 32
	WatParserSTORE                        = 33
	WatParserOFFSET_EQ_NAT                = 34
	WatParserALIGN_EQ_NAT                 = 35
	WatParserUNARY                        = 36
	WatParserBINARY                       = 37
	WatParserTEST                         = 38
	WatParserCOMPARE                      = 39
	WatParserCONVERT                      = 40
	WatParserMEMORY_SIZE                  = 41
	WatParserMEMORY_GROW                  = 42
	WatParserTYPE                         = 43
	WatParserFUNC                         = 44
	WatParserSTART_                       = 45
	WatParserPARAM                        = 46
	WatParserRESULT                       = 47
	WatParserLOCAL                        = 48
	WatParserGLOBAL                       = 49
	WatParserTABLE                        = 50
	WatParserMEMORY                       = 51
	WatParserELEM                         = 52
	WatParserDATA                         = 53
	WatParserOFFSET                       = 54
	WatParserIMPORT                       = 55
	WatParserEXPORT                       = 56
	WatParserMODULE                       = 57
	WatParserBIN                          = 58
	WatParserQUOTE                        = 59
	WatParserSCRIPT                       = 60
	WatParserREGISTER                     = 61
	WatParserINVOKE                       = 62
	WatParserGET                          = 63
	WatParserASSERT_MALFORMED             = 64
	WatParserASSERT_INVALID               = 65
	WatParserASSERT_UNLINKABLE            = 66
	WatParserASSERT_RETURN                = 67
	WatParserASSERT_RETURN_CANONICAL_NAN  = 68
	WatParserASSERT_RETURN_ARITHMETIC_NAN = 69
	WatParserASSERT_TRAP                  = 70
	WatParserASSERT_EXHAUSTION            = 71
	WatParserINPUT                        = 72
	WatParserOUTPUT                       = 73
	WatParserVAR                          = 74
	WatParserSPACE                        = 75
	WatParserCOMMENT                      = 76
)

// WatParser rules.
const (
	WatParserRULE_value                     = 0
	WatParserRULE_name                      = 1
	WatParserRULE_value_type                = 2
	WatParserRULE_elem_type                 = 3
	WatParserRULE_global_type               = 4
	WatParserRULE_def_type                  = 5
	WatParserRULE_func_type                 = 6
	WatParserRULE_table_type                = 7
	WatParserRULE_memory_type               = 8
	WatParserRULE_type_use                  = 9
	WatParserRULE_literal                   = 10
	WatParserRULE_var_                      = 11
	WatParserRULE_bind_var                  = 12
	WatParserRULE_instr                     = 13
	WatParserRULE_plain_instr               = 14
	WatParserRULE_call_instr                = 15
	WatParserRULE_call_instr_params         = 16
	WatParserRULE_call_instr_instr          = 17
	WatParserRULE_call_instr_params_instr   = 18
	WatParserRULE_call_instr_results_instr  = 19
	WatParserRULE_block_instr               = 20
	WatParserRULE_block_type                = 21
	WatParserRULE_block                     = 22
	WatParserRULE_expr                      = 23
	WatParserRULE_expr1                     = 24
	WatParserRULE_call_expr_type            = 25
	WatParserRULE_call_expr_params          = 26
	WatParserRULE_call_expr_results         = 27
	WatParserRULE_if_block                  = 28
	WatParserRULE_instr_list                = 29
	WatParserRULE_const_expr                = 30
	WatParserRULE_func_                     = 31
	WatParserRULE_func_fields               = 32
	WatParserRULE_func_fields_import        = 33
	WatParserRULE_func_fields_import_result = 34
	WatParserRULE_func_fields_body          = 35
	WatParserRULE_func_result_body          = 36
	WatParserRULE_func_body                 = 37
	WatParserRULE_offset                    = 38
	WatParserRULE_elem                      = 39
	WatParserRULE_table                     = 40
	WatParserRULE_table_fields              = 41
	WatParserRULE_data                      = 42
	WatParserRULE_memory                    = 43
	WatParserRULE_memory_fields             = 44
	WatParserRULE_sglobal                   = 45
	WatParserRULE_global_fields             = 46
	WatParserRULE_import_desc               = 47
	WatParserRULE_simport                   = 48
	WatParserRULE_inline_import             = 49
	WatParserRULE_export_desc               = 50
	WatParserRULE_export_                   = 51
	WatParserRULE_inline_export             = 52
	WatParserRULE_type_                     = 53
	WatParserRULE_type_def                  = 54
	WatParserRULE_start_                    = 55
	WatParserRULE_module_field              = 56
	WatParserRULE_module_                   = 57
	WatParserRULE_script_module             = 58
	WatParserRULE_action_                   = 59
	WatParserRULE_assertion                 = 60
	WatParserRULE_cmd                       = 61
	WatParserRULE_meta                      = 62
	WatParserRULE_wconst                    = 63
	WatParserRULE_const_list                = 64
	WatParserRULE_script                    = 65
	WatParserRULE_module                    = 66
)

// IValueContext is an interface to support dynamic dispatch.
type IValueContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsValueContext differentiates from other interfaces.
	IsValueContext()
}

type ValueContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyValueContext() *ValueContext {
	var p = new(ValueContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_value
	return p
}

func (*ValueContext) IsValueContext() {}

func NewValueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ValueContext {
	var p = new(ValueContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_value

	return p
}

func (s *ValueContext) GetParser() antlr.Parser { return s.parser }

func (s *ValueContext) INT() antlr.TerminalNode {
	return s.GetToken(WatParserINT, 0)
}

func (s *ValueContext) FLOAT() antlr.TerminalNode {
	return s.GetToken(WatParserFLOAT, 0)
}

func (s *ValueContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *ValueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *ValueContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterValue(s)
	}
}

func (s *ValueContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitValue(s)
	}
}

func (p *WatParser) Value() (localctx IValueContext) {
	this := p
	_ = this

	localctx = NewValueContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 0, WatParserRULE_value)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(134)
		_la = p.GetTokenStream().LA(1)

		if !(_la == WatParserINT || _la == WatParserFLOAT) {
			p.GetErrorHandler().RecoverInline(p)
		} else {
			p.GetErrorHandler().ReportMatch(p)
			p.Consume()
		}
	}

	return localctx
}

// INameContext is an interface to support dynamic dispatch.
type INameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsNameContext differentiates from other interfaces.
	IsNameContext()
}

type NameContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyNameContext() *NameContext {
	var p = new(NameContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_name
	return p
}

func (*NameContext) IsNameContext() {}

func NewNameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NameContext {
	var p = new(NameContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_name

	return p
}

func (s *NameContext) GetParser() antlr.Parser { return s.parser }

func (s *NameContext) STRING_() antlr.TerminalNode {
	return s.GetToken(WatParserSTRING_, 0)
}

func (s *NameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *NameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *NameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterName(s)
	}
}

func (s *NameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitName(s)
	}
}

func (p *WatParser) Name() (localctx INameContext) {
	this := p
	_ = this

	localctx = NewNameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 2, WatParserRULE_name)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(136)
		p.Match(WatParserSTRING_)
	}

	return localctx
}

// IValue_typeContext is an interface to support dynamic dispatch.
type IValue_typeContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsValue_typeContext differentiates from other interfaces.
	IsValue_typeContext()
}

type Value_typeContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyValue_typeContext() *Value_typeContext {
	var p = new(Value_typeContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_value_type
	return p
}

func (*Value_typeContext) IsValue_typeContext() {}

func NewValue_typeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Value_typeContext {
	var p = new(Value_typeContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_value_type

	return p
}

func (s *Value_typeContext) GetParser() antlr.Parser { return s.parser }

func (s *Value_typeContext) VALUE_TYPE() antlr.TerminalNode {
	return s.GetToken(WatParserVALUE_TYPE, 0)
}

func (s *Value_typeContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Value_typeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Value_typeContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterValue_type(s)
	}
}

func (s *Value_typeContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitValue_type(s)
	}
}

func (p *WatParser) Value_type() (localctx IValue_typeContext) {
	this := p
	_ = this

	localctx = NewValue_typeContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 4, WatParserRULE_value_type)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(138)
		p.Match(WatParserVALUE_TYPE)
	}

	return localctx
}

// IElem_typeContext is an interface to support dynamic dispatch.
type IElem_typeContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsElem_typeContext differentiates from other interfaces.
	IsElem_typeContext()
}

type Elem_typeContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyElem_typeContext() *Elem_typeContext {
	var p = new(Elem_typeContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_elem_type
	return p
}

func (*Elem_typeContext) IsElem_typeContext() {}

func NewElem_typeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Elem_typeContext {
	var p = new(Elem_typeContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_elem_type

	return p
}

func (s *Elem_typeContext) GetParser() antlr.Parser { return s.parser }

func (s *Elem_typeContext) FUNCREF() antlr.TerminalNode {
	return s.GetToken(WatParserFUNCREF, 0)
}

func (s *Elem_typeContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Elem_typeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Elem_typeContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterElem_type(s)
	}
}

func (s *Elem_typeContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitElem_type(s)
	}
}

func (p *WatParser) Elem_type() (localctx IElem_typeContext) {
	this := p
	_ = this

	localctx = NewElem_typeContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 6, WatParserRULE_elem_type)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(140)
		p.Match(WatParserFUNCREF)
	}

	return localctx
}

// IGlobal_typeContext is an interface to support dynamic dispatch.
type IGlobal_typeContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsGlobal_typeContext differentiates from other interfaces.
	IsGlobal_typeContext()
}

type Global_typeContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyGlobal_typeContext() *Global_typeContext {
	var p = new(Global_typeContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_global_type
	return p
}

func (*Global_typeContext) IsGlobal_typeContext() {}

func NewGlobal_typeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Global_typeContext {
	var p = new(Global_typeContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_global_type

	return p
}

func (s *Global_typeContext) GetParser() antlr.Parser { return s.parser }

func (s *Global_typeContext) Value_type() IValue_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IValue_typeContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IValue_typeContext)
}

func (s *Global_typeContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *Global_typeContext) MUT() antlr.TerminalNode {
	return s.GetToken(WatParserMUT, 0)
}

func (s *Global_typeContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *Global_typeContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Global_typeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Global_typeContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterGlobal_type(s)
	}
}

func (s *Global_typeContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitGlobal_type(s)
	}
}

func (p *WatParser) Global_type() (localctx IGlobal_typeContext) {
	this := p
	_ = this

	localctx = NewGlobal_typeContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 8, WatParserRULE_global_type)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(148)
	p.GetErrorHandler().Sync(p)

	switch p.GetTokenStream().LA(1) {
	case WatParserVALUE_TYPE:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(142)
			p.Value_type()
		}

	case WatParserLPAR:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(143)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(144)
			p.Match(WatParserMUT)
		}
		{
			p.SetState(145)
			p.Value_type()
		}
		{
			p.SetState(146)
			p.Match(WatParserRPAR)
		}

	default:
		panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
	}

	return localctx
}

// IDef_typeContext is an interface to support dynamic dispatch.
type IDef_typeContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsDef_typeContext differentiates from other interfaces.
	IsDef_typeContext()
}

type Def_typeContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyDef_typeContext() *Def_typeContext {
	var p = new(Def_typeContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_def_type
	return p
}

func (*Def_typeContext) IsDef_typeContext() {}

func NewDef_typeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Def_typeContext {
	var p = new(Def_typeContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_def_type

	return p
}

func (s *Def_typeContext) GetParser() antlr.Parser { return s.parser }

func (s *Def_typeContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *Def_typeContext) FUNC() antlr.TerminalNode {
	return s.GetToken(WatParserFUNC, 0)
}

func (s *Def_typeContext) Func_type() IFunc_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunc_typeContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IFunc_typeContext)
}

func (s *Def_typeContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *Def_typeContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Def_typeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Def_typeContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterDef_type(s)
	}
}

func (s *Def_typeContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitDef_type(s)
	}
}

func (p *WatParser) Def_type() (localctx IDef_typeContext) {
	this := p
	_ = this

	localctx = NewDef_typeContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 10, WatParserRULE_def_type)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(150)
		p.Match(WatParserLPAR)
	}
	{
		p.SetState(151)
		p.Match(WatParserFUNC)
	}
	{
		p.SetState(152)
		p.Func_type()
	}
	{
		p.SetState(153)
		p.Match(WatParserRPAR)
	}

	return localctx
}

// IFunc_typeContext is an interface to support dynamic dispatch.
type IFunc_typeContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsFunc_typeContext differentiates from other interfaces.
	IsFunc_typeContext()
}

type Func_typeContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyFunc_typeContext() *Func_typeContext {
	var p = new(Func_typeContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_func_type
	return p
}

func (*Func_typeContext) IsFunc_typeContext() {}

func NewFunc_typeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Func_typeContext {
	var p = new(Func_typeContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_func_type

	return p
}

func (s *Func_typeContext) GetParser() antlr.Parser { return s.parser }

func (s *Func_typeContext) AllLPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserLPAR)
}

func (s *Func_typeContext) LPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, i)
}

func (s *Func_typeContext) AllRPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserRPAR)
}

func (s *Func_typeContext) RPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, i)
}

func (s *Func_typeContext) AllRESULT() []antlr.TerminalNode {
	return s.GetTokens(WatParserRESULT)
}

func (s *Func_typeContext) RESULT(i int) antlr.TerminalNode {
	return s.GetToken(WatParserRESULT, i)
}

func (s *Func_typeContext) AllPARAM() []antlr.TerminalNode {
	return s.GetTokens(WatParserPARAM)
}

func (s *Func_typeContext) PARAM(i int) antlr.TerminalNode {
	return s.GetToken(WatParserPARAM, i)
}

func (s *Func_typeContext) AllBind_var() []IBind_varContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IBind_varContext)(nil)).Elem())
	var tst = make([]IBind_varContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IBind_varContext)
		}
	}

	return tst
}

func (s *Func_typeContext) Bind_var(i int) IBind_varContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IBind_varContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IBind_varContext)
}

func (s *Func_typeContext) AllValue_type() []IValue_typeContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IValue_typeContext)(nil)).Elem())
	var tst = make([]IValue_typeContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IValue_typeContext)
		}
	}

	return tst
}

func (s *Func_typeContext) Value_type(i int) IValue_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IValue_typeContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IValue_typeContext)
}

func (s *Func_typeContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Func_typeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Func_typeContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterFunc_type(s)
	}
}

func (s *Func_typeContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitFunc_type(s)
	}
}

func (p *WatParser) Func_type() (localctx IFunc_typeContext) {
	this := p
	_ = this

	localctx = NewFunc_typeContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 12, WatParserRULE_func_type)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	p.SetState(179)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	for _la == WatParserLPAR {
		{
			p.SetState(155)
			p.Match(WatParserLPAR)
		}
		p.SetState(174)
		p.GetErrorHandler().Sync(p)
		switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 3, p.GetParserRuleContext()) {
		case 1:
			{
				p.SetState(156)
				p.Match(WatParserRESULT)
			}
			p.SetState(160)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)

			for _la == WatParserVALUE_TYPE {
				{
					p.SetState(157)
					p.Value_type()
				}

				p.SetState(162)
				p.GetErrorHandler().Sync(p)
				_la = p.GetTokenStream().LA(1)
			}

		case 2:
			{
				p.SetState(163)
				p.Match(WatParserPARAM)
			}
			p.SetState(167)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)

			for _la == WatParserVALUE_TYPE {
				{
					p.SetState(164)
					p.Value_type()
				}

				p.SetState(169)
				p.GetErrorHandler().Sync(p)
				_la = p.GetTokenStream().LA(1)
			}

		case 3:
			{
				p.SetState(170)
				p.Match(WatParserPARAM)
			}
			{
				p.SetState(171)
				p.Bind_var()
			}
			{
				p.SetState(172)
				p.Value_type()
			}

		}
		{
			p.SetState(176)
			p.Match(WatParserRPAR)
		}

		p.SetState(181)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)
	}

	return localctx
}

// ITable_typeContext is an interface to support dynamic dispatch.
type ITable_typeContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsTable_typeContext differentiates from other interfaces.
	IsTable_typeContext()
}

type Table_typeContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyTable_typeContext() *Table_typeContext {
	var p = new(Table_typeContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_table_type
	return p
}

func (*Table_typeContext) IsTable_typeContext() {}

func NewTable_typeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_typeContext {
	var p = new(Table_typeContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_table_type

	return p
}

func (s *Table_typeContext) GetParser() antlr.Parser { return s.parser }

func (s *Table_typeContext) AllNAT() []antlr.TerminalNode {
	return s.GetTokens(WatParserNAT)
}

func (s *Table_typeContext) NAT(i int) antlr.TerminalNode {
	return s.GetToken(WatParserNAT, i)
}

func (s *Table_typeContext) Elem_type() IElem_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IElem_typeContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IElem_typeContext)
}

func (s *Table_typeContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Table_typeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Table_typeContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterTable_type(s)
	}
}

func (s *Table_typeContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitTable_type(s)
	}
}

func (p *WatParser) Table_type() (localctx ITable_typeContext) {
	this := p
	_ = this

	localctx = NewTable_typeContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 14, WatParserRULE_table_type)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(182)
		p.Match(WatParserNAT)
	}
	p.SetState(184)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	if _la == WatParserNAT {
		{
			p.SetState(183)
			p.Match(WatParserNAT)
		}

	}
	{
		p.SetState(186)
		p.Elem_type()
	}

	return localctx
}

// IMemory_typeContext is an interface to support dynamic dispatch.
type IMemory_typeContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsMemory_typeContext differentiates from other interfaces.
	IsMemory_typeContext()
}

type Memory_typeContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyMemory_typeContext() *Memory_typeContext {
	var p = new(Memory_typeContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_memory_type
	return p
}

func (*Memory_typeContext) IsMemory_typeContext() {}

func NewMemory_typeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Memory_typeContext {
	var p = new(Memory_typeContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_memory_type

	return p
}

func (s *Memory_typeContext) GetParser() antlr.Parser { return s.parser }

func (s *Memory_typeContext) AllNAT() []antlr.TerminalNode {
	return s.GetTokens(WatParserNAT)
}

func (s *Memory_typeContext) NAT(i int) antlr.TerminalNode {
	return s.GetToken(WatParserNAT, i)
}

func (s *Memory_typeContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Memory_typeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Memory_typeContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterMemory_type(s)
	}
}

func (s *Memory_typeContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitMemory_type(s)
	}
}

func (p *WatParser) Memory_type() (localctx IMemory_typeContext) {
	this := p
	_ = this

	localctx = NewMemory_typeContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 16, WatParserRULE_memory_type)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(188)
		p.Match(WatParserNAT)
	}
	p.SetState(190)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	if _la == WatParserNAT {
		{
			p.SetState(189)
			p.Match(WatParserNAT)
		}

	}

	return localctx
}

// IType_useContext is an interface to support dynamic dispatch.
type IType_useContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsType_useContext differentiates from other interfaces.
	IsType_useContext()
}

type Type_useContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyType_useContext() *Type_useContext {
	var p = new(Type_useContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_type_use
	return p
}

func (*Type_useContext) IsType_useContext() {}

func NewType_useContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Type_useContext {
	var p = new(Type_useContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_type_use

	return p
}

func (s *Type_useContext) GetParser() antlr.Parser { return s.parser }

func (s *Type_useContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *Type_useContext) TYPE() antlr.TerminalNode {
	return s.GetToken(WatParserTYPE, 0)
}

func (s *Type_useContext) Var_() IVar_Context {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IVar_Context)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IVar_Context)
}

func (s *Type_useContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *Type_useContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Type_useContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Type_useContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterType_use(s)
	}
}

func (s *Type_useContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitType_use(s)
	}
}

func (p *WatParser) Type_use() (localctx IType_useContext) {
	this := p
	_ = this

	localctx = NewType_useContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 18, WatParserRULE_type_use)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(192)
		p.Match(WatParserLPAR)
	}
	{
		p.SetState(193)
		p.Match(WatParserTYPE)
	}
	{
		p.SetState(194)
		p.Var_()
	}
	{
		p.SetState(195)
		p.Match(WatParserRPAR)
	}

	return localctx
}

// ILiteralContext is an interface to support dynamic dispatch.
type ILiteralContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsLiteralContext differentiates from other interfaces.
	IsLiteralContext()
}

type LiteralContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyLiteralContext() *LiteralContext {
	var p = new(LiteralContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_literal
	return p
}

func (*LiteralContext) IsLiteralContext() {}

func NewLiteralContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LiteralContext {
	var p = new(LiteralContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_literal

	return p
}

func (s *LiteralContext) GetParser() antlr.Parser { return s.parser }

func (s *LiteralContext) NAT() antlr.TerminalNode {
	return s.GetToken(WatParserNAT, 0)
}

func (s *LiteralContext) INT() antlr.TerminalNode {
	return s.GetToken(WatParserINT, 0)
}

func (s *LiteralContext) FLOAT() antlr.TerminalNode {
	return s.GetToken(WatParserFLOAT, 0)
}

func (s *LiteralContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *LiteralContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *LiteralContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterLiteral(s)
	}
}

func (s *LiteralContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitLiteral(s)
	}
}

func (p *WatParser) Literal() (localctx ILiteralContext) {
	this := p
	_ = this

	localctx = NewLiteralContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 20, WatParserRULE_literal)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(197)
		_la = p.GetTokenStream().LA(1)

		if !(((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<WatParserNAT)|(1<<WatParserINT)|(1<<WatParserFLOAT))) != 0) {
			p.GetErrorHandler().RecoverInline(p)
		} else {
			p.GetErrorHandler().ReportMatch(p)
			p.Consume()
		}
	}

	return localctx
}

// IVar_Context is an interface to support dynamic dispatch.
type IVar_Context interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsVar_Context differentiates from other interfaces.
	IsVar_Context()
}

type Var_Context struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyVar_Context() *Var_Context {
	var p = new(Var_Context)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_var_
	return p
}

func (*Var_Context) IsVar_Context() {}

func NewVar_Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Var_Context {
	var p = new(Var_Context)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_var_

	return p
}

func (s *Var_Context) GetParser() antlr.Parser { return s.parser }

func (s *Var_Context) NAT() antlr.TerminalNode {
	return s.GetToken(WatParserNAT, 0)
}

func (s *Var_Context) VAR() antlr.TerminalNode {
	return s.GetToken(WatParserVAR, 0)
}

func (s *Var_Context) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Var_Context) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Var_Context) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterVar_(s)
	}
}

func (s *Var_Context) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitVar_(s)
	}
}

func (p *WatParser) Var_() (localctx IVar_Context) {
	this := p
	_ = this

	localctx = NewVar_Context(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 22, WatParserRULE_var_)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(199)
		_la = p.GetTokenStream().LA(1)

		if !(_la == WatParserNAT || _la == WatParserVAR) {
			p.GetErrorHandler().RecoverInline(p)
		} else {
			p.GetErrorHandler().ReportMatch(p)
			p.Consume()
		}
	}

	return localctx
}

// IBind_varContext is an interface to support dynamic dispatch.
type IBind_varContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsBind_varContext differentiates from other interfaces.
	IsBind_varContext()
}

type Bind_varContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyBind_varContext() *Bind_varContext {
	var p = new(Bind_varContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_bind_var
	return p
}

func (*Bind_varContext) IsBind_varContext() {}

func NewBind_varContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Bind_varContext {
	var p = new(Bind_varContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_bind_var

	return p
}

func (s *Bind_varContext) GetParser() antlr.Parser { return s.parser }

func (s *Bind_varContext) VAR() antlr.TerminalNode {
	return s.GetToken(WatParserVAR, 0)
}

func (s *Bind_varContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Bind_varContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Bind_varContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterBind_var(s)
	}
}

func (s *Bind_varContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitBind_var(s)
	}
}

func (p *WatParser) Bind_var() (localctx IBind_varContext) {
	this := p
	_ = this

	localctx = NewBind_varContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 24, WatParserRULE_bind_var)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(201)
		p.Match(WatParserVAR)
	}

	return localctx
}

// IInstrContext is an interface to support dynamic dispatch.
type IInstrContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsInstrContext differentiates from other interfaces.
	IsInstrContext()
}

type InstrContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyInstrContext() *InstrContext {
	var p = new(InstrContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_instr
	return p
}

func (*InstrContext) IsInstrContext() {}

func NewInstrContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *InstrContext {
	var p = new(InstrContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_instr

	return p
}

func (s *InstrContext) GetParser() antlr.Parser { return s.parser }

func (s *InstrContext) Plain_instr() IPlain_instrContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IPlain_instrContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IPlain_instrContext)
}

func (s *InstrContext) Call_instr_instr() ICall_instr_instrContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ICall_instr_instrContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(ICall_instr_instrContext)
}

func (s *InstrContext) Block_instr() IBlock_instrContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IBlock_instrContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IBlock_instrContext)
}

func (s *InstrContext) Expr() IExprContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IExprContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *InstrContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *InstrContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *InstrContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterInstr(s)
	}
}

func (s *InstrContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitInstr(s)
	}
}

func (p *WatParser) Instr() (localctx IInstrContext) {
	this := p
	_ = this

	localctx = NewInstrContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 26, WatParserRULE_instr)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(207)
	p.GetErrorHandler().Sync(p)

	switch p.GetTokenStream().LA(1) {
	case WatParserCONST, WatParserNOP, WatParserUNREACHABLE, WatParserDROP, WatParserBR, WatParserBR_IF, WatParserBR_TABLE, WatParserRETURN, WatParserSELECT, WatParserCALL, WatParserLOCAL_GET, WatParserLOCAL_SET, WatParserLOCAL_TEE, WatParserGLOBAL_GET, WatParserGLOBAL_SET, WatParserLOAD, WatParserSTORE, WatParserUNARY, WatParserBINARY, WatParserTEST, WatParserCOMPARE, WatParserCONVERT, WatParserMEMORY_SIZE, WatParserMEMORY_GROW:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(203)
			p.Plain_instr()
		}

	case WatParserCALL_INDIRECT:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(204)
			p.Call_instr_instr()
		}

	case WatParserBLOCK, WatParserLOOP, WatParserIF:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(205)
			p.Block_instr()
		}

	case WatParserLPAR:
		p.EnterOuterAlt(localctx, 4)
		{
			p.SetState(206)
			p.Expr()
		}

	default:
		panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
	}

	return localctx
}

// IPlain_instrContext is an interface to support dynamic dispatch.
type IPlain_instrContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsPlain_instrContext differentiates from other interfaces.
	IsPlain_instrContext()
}

type Plain_instrContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyPlain_instrContext() *Plain_instrContext {
	var p = new(Plain_instrContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_plain_instr
	return p
}

func (*Plain_instrContext) IsPlain_instrContext() {}

func NewPlain_instrContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Plain_instrContext {
	var p = new(Plain_instrContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_plain_instr

	return p
}

func (s *Plain_instrContext) GetParser() antlr.Parser { return s.parser }

func (s *Plain_instrContext) UNREACHABLE() antlr.TerminalNode {
	return s.GetToken(WatParserUNREACHABLE, 0)
}

func (s *Plain_instrContext) NOP() antlr.TerminalNode {
	return s.GetToken(WatParserNOP, 0)
}

func (s *Plain_instrContext) DROP() antlr.TerminalNode {
	return s.GetToken(WatParserDROP, 0)
}

func (s *Plain_instrContext) SELECT() antlr.TerminalNode {
	return s.GetToken(WatParserSELECT, 0)
}

func (s *Plain_instrContext) BR() antlr.TerminalNode {
	return s.GetToken(WatParserBR, 0)
}

func (s *Plain_instrContext) AllVar_() []IVar_Context {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IVar_Context)(nil)).Elem())
	var tst = make([]IVar_Context, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IVar_Context)
		}
	}

	return tst
}

func (s *Plain_instrContext) Var_(i int) IVar_Context {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IVar_Context)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IVar_Context)
}

func (s *Plain_instrContext) BR_IF() antlr.TerminalNode {
	return s.GetToken(WatParserBR_IF, 0)
}

func (s *Plain_instrContext) BR_TABLE() antlr.TerminalNode {
	return s.GetToken(WatParserBR_TABLE, 0)
}

func (s *Plain_instrContext) RETURN() antlr.TerminalNode {
	return s.GetToken(WatParserRETURN, 0)
}

func (s *Plain_instrContext) CALL() antlr.TerminalNode {
	return s.GetToken(WatParserCALL, 0)
}

func (s *Plain_instrContext) LOCAL_GET() antlr.TerminalNode {
	return s.GetToken(WatParserLOCAL_GET, 0)
}

func (s *Plain_instrContext) LOCAL_SET() antlr.TerminalNode {
	return s.GetToken(WatParserLOCAL_SET, 0)
}

func (s *Plain_instrContext) LOCAL_TEE() antlr.TerminalNode {
	return s.GetToken(WatParserLOCAL_TEE, 0)
}

func (s *Plain_instrContext) GLOBAL_GET() antlr.TerminalNode {
	return s.GetToken(WatParserGLOBAL_GET, 0)
}

func (s *Plain_instrContext) GLOBAL_SET() antlr.TerminalNode {
	return s.GetToken(WatParserGLOBAL_SET, 0)
}

func (s *Plain_instrContext) LOAD() antlr.TerminalNode {
	return s.GetToken(WatParserLOAD, 0)
}

func (s *Plain_instrContext) OFFSET_EQ_NAT() antlr.TerminalNode {
	return s.GetToken(WatParserOFFSET_EQ_NAT, 0)
}

func (s *Plain_instrContext) ALIGN_EQ_NAT() antlr.TerminalNode {
	return s.GetToken(WatParserALIGN_EQ_NAT, 0)
}

func (s *Plain_instrContext) STORE() antlr.TerminalNode {
	return s.GetToken(WatParserSTORE, 0)
}

func (s *Plain_instrContext) MEMORY_SIZE() antlr.TerminalNode {
	return s.GetToken(WatParserMEMORY_SIZE, 0)
}

func (s *Plain_instrContext) MEMORY_GROW() antlr.TerminalNode {
	return s.GetToken(WatParserMEMORY_GROW, 0)
}

func (s *Plain_instrContext) CONST() antlr.TerminalNode {
	return s.GetToken(WatParserCONST, 0)
}

func (s *Plain_instrContext) Literal() ILiteralContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ILiteralContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(ILiteralContext)
}

func (s *Plain_instrContext) TEST() antlr.TerminalNode {
	return s.GetToken(WatParserTEST, 0)
}

func (s *Plain_instrContext) COMPARE() antlr.TerminalNode {
	return s.GetToken(WatParserCOMPARE, 0)
}

func (s *Plain_instrContext) UNARY() antlr.TerminalNode {
	return s.GetToken(WatParserUNARY, 0)
}

func (s *Plain_instrContext) BINARY() antlr.TerminalNode {
	return s.GetToken(WatParserBINARY, 0)
}

func (s *Plain_instrContext) CONVERT() antlr.TerminalNode {
	return s.GetToken(WatParserCONVERT, 0)
}

func (s *Plain_instrContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Plain_instrContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Plain_instrContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterPlain_instr(s)
	}
}

func (s *Plain_instrContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitPlain_instr(s)
	}
}

func (p *WatParser) Plain_instr() (localctx IPlain_instrContext) {
	this := p
	_ = this

	localctx = NewPlain_instrContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 28, WatParserRULE_plain_instr)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(259)
	p.GetErrorHandler().Sync(p)

	switch p.GetTokenStream().LA(1) {
	case WatParserUNREACHABLE:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(209)
			p.Match(WatParserUNREACHABLE)
		}

	case WatParserNOP:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(210)
			p.Match(WatParserNOP)
		}

	case WatParserDROP:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(211)
			p.Match(WatParserDROP)
		}

	case WatParserSELECT:
		p.EnterOuterAlt(localctx, 4)
		{
			p.SetState(212)
			p.Match(WatParserSELECT)
		}

	case WatParserBR:
		p.EnterOuterAlt(localctx, 5)
		{
			p.SetState(213)
			p.Match(WatParserBR)
		}
		{
			p.SetState(214)
			p.Var_()
		}

	case WatParserBR_IF:
		p.EnterOuterAlt(localctx, 6)
		{
			p.SetState(215)
			p.Match(WatParserBR_IF)
		}
		{
			p.SetState(216)
			p.Var_()
		}

	case WatParserBR_TABLE:
		p.EnterOuterAlt(localctx, 7)
		{
			p.SetState(217)
			p.Match(WatParserBR_TABLE)
		}
		p.SetState(219)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		for ok := true; ok; ok = _la == WatParserNAT || _la == WatParserVAR {
			{
				p.SetState(218)
				p.Var_()
			}

			p.SetState(221)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)
		}

	case WatParserRETURN:
		p.EnterOuterAlt(localctx, 8)
		{
			p.SetState(223)
			p.Match(WatParserRETURN)
		}

	case WatParserCALL:
		p.EnterOuterAlt(localctx, 9)
		{
			p.SetState(224)
			p.Match(WatParserCALL)
		}
		{
			p.SetState(225)
			p.Var_()
		}

	case WatParserLOCAL_GET:
		p.EnterOuterAlt(localctx, 10)
		{
			p.SetState(226)
			p.Match(WatParserLOCAL_GET)
		}
		{
			p.SetState(227)
			p.Var_()
		}

	case WatParserLOCAL_SET:
		p.EnterOuterAlt(localctx, 11)
		{
			p.SetState(228)
			p.Match(WatParserLOCAL_SET)
		}
		{
			p.SetState(229)
			p.Var_()
		}

	case WatParserLOCAL_TEE:
		p.EnterOuterAlt(localctx, 12)
		{
			p.SetState(230)
			p.Match(WatParserLOCAL_TEE)
		}
		{
			p.SetState(231)
			p.Var_()
		}

	case WatParserGLOBAL_GET:
		p.EnterOuterAlt(localctx, 13)
		{
			p.SetState(232)
			p.Match(WatParserGLOBAL_GET)
		}
		{
			p.SetState(233)
			p.Var_()
		}

	case WatParserGLOBAL_SET:
		p.EnterOuterAlt(localctx, 14)
		{
			p.SetState(234)
			p.Match(WatParserGLOBAL_SET)
		}
		{
			p.SetState(235)
			p.Var_()
		}

	case WatParserLOAD:
		p.EnterOuterAlt(localctx, 15)
		{
			p.SetState(236)
			p.Match(WatParserLOAD)
		}
		p.SetState(238)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserOFFSET_EQ_NAT {
			{
				p.SetState(237)
				p.Match(WatParserOFFSET_EQ_NAT)
			}

		}
		p.SetState(241)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserALIGN_EQ_NAT {
			{
				p.SetState(240)
				p.Match(WatParserALIGN_EQ_NAT)
			}

		}

	case WatParserSTORE:
		p.EnterOuterAlt(localctx, 16)
		{
			p.SetState(243)
			p.Match(WatParserSTORE)
		}
		p.SetState(245)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserOFFSET_EQ_NAT {
			{
				p.SetState(244)
				p.Match(WatParserOFFSET_EQ_NAT)
			}

		}
		p.SetState(248)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserALIGN_EQ_NAT {
			{
				p.SetState(247)
				p.Match(WatParserALIGN_EQ_NAT)
			}

		}

	case WatParserMEMORY_SIZE:
		p.EnterOuterAlt(localctx, 17)
		{
			p.SetState(250)
			p.Match(WatParserMEMORY_SIZE)
		}

	case WatParserMEMORY_GROW:
		p.EnterOuterAlt(localctx, 18)
		{
			p.SetState(251)
			p.Match(WatParserMEMORY_GROW)
		}

	case WatParserCONST:
		p.EnterOuterAlt(localctx, 19)
		{
			p.SetState(252)
			p.Match(WatParserCONST)
		}
		{
			p.SetState(253)
			p.Literal()
		}

	case WatParserTEST:
		p.EnterOuterAlt(localctx, 20)
		{
			p.SetState(254)
			p.Match(WatParserTEST)
		}

	case WatParserCOMPARE:
		p.EnterOuterAlt(localctx, 21)
		{
			p.SetState(255)
			p.Match(WatParserCOMPARE)
		}

	case WatParserUNARY:
		p.EnterOuterAlt(localctx, 22)
		{
			p.SetState(256)
			p.Match(WatParserUNARY)
		}

	case WatParserBINARY:
		p.EnterOuterAlt(localctx, 23)
		{
			p.SetState(257)
			p.Match(WatParserBINARY)
		}

	case WatParserCONVERT:
		p.EnterOuterAlt(localctx, 24)
		{
			p.SetState(258)
			p.Match(WatParserCONVERT)
		}

	default:
		panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
	}

	return localctx
}

// ICall_instrContext is an interface to support dynamic dispatch.
type ICall_instrContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsCall_instrContext differentiates from other interfaces.
	IsCall_instrContext()
}

type Call_instrContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCall_instrContext() *Call_instrContext {
	var p = new(Call_instrContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_call_instr
	return p
}

func (*Call_instrContext) IsCall_instrContext() {}

func NewCall_instrContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Call_instrContext {
	var p = new(Call_instrContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_call_instr

	return p
}

func (s *Call_instrContext) GetParser() antlr.Parser { return s.parser }

func (s *Call_instrContext) CALL_INDIRECT() antlr.TerminalNode {
	return s.GetToken(WatParserCALL_INDIRECT, 0)
}

func (s *Call_instrContext) Call_instr_params() ICall_instr_paramsContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ICall_instr_paramsContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(ICall_instr_paramsContext)
}

func (s *Call_instrContext) Type_use() IType_useContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IType_useContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IType_useContext)
}

func (s *Call_instrContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Call_instrContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Call_instrContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterCall_instr(s)
	}
}

func (s *Call_instrContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitCall_instr(s)
	}
}

func (p *WatParser) Call_instr() (localctx ICall_instrContext) {
	this := p
	_ = this

	localctx = NewCall_instrContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 30, WatParserRULE_call_instr)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(261)
		p.Match(WatParserCALL_INDIRECT)
	}
	p.SetState(263)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 14, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(262)
			p.Type_use()
		}

	}
	{
		p.SetState(265)
		p.Call_instr_params()
	}

	return localctx
}

// ICall_instr_paramsContext is an interface to support dynamic dispatch.
type ICall_instr_paramsContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsCall_instr_paramsContext differentiates from other interfaces.
	IsCall_instr_paramsContext()
}

type Call_instr_paramsContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCall_instr_paramsContext() *Call_instr_paramsContext {
	var p = new(Call_instr_paramsContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_call_instr_params
	return p
}

func (*Call_instr_paramsContext) IsCall_instr_paramsContext() {}

func NewCall_instr_paramsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Call_instr_paramsContext {
	var p = new(Call_instr_paramsContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_call_instr_params

	return p
}

func (s *Call_instr_paramsContext) GetParser() antlr.Parser { return s.parser }

func (s *Call_instr_paramsContext) AllLPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserLPAR)
}

func (s *Call_instr_paramsContext) LPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, i)
}

func (s *Call_instr_paramsContext) AllPARAM() []antlr.TerminalNode {
	return s.GetTokens(WatParserPARAM)
}

func (s *Call_instr_paramsContext) PARAM(i int) antlr.TerminalNode {
	return s.GetToken(WatParserPARAM, i)
}

func (s *Call_instr_paramsContext) AllRPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserRPAR)
}

func (s *Call_instr_paramsContext) RPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, i)
}

func (s *Call_instr_paramsContext) AllRESULT() []antlr.TerminalNode {
	return s.GetTokens(WatParserRESULT)
}

func (s *Call_instr_paramsContext) RESULT(i int) antlr.TerminalNode {
	return s.GetToken(WatParserRESULT, i)
}

func (s *Call_instr_paramsContext) AllValue_type() []IValue_typeContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IValue_typeContext)(nil)).Elem())
	var tst = make([]IValue_typeContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IValue_typeContext)
		}
	}

	return tst
}

func (s *Call_instr_paramsContext) Value_type(i int) IValue_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IValue_typeContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IValue_typeContext)
}

func (s *Call_instr_paramsContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Call_instr_paramsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Call_instr_paramsContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterCall_instr_params(s)
	}
}

func (s *Call_instr_paramsContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitCall_instr_params(s)
	}
}

func (p *WatParser) Call_instr_params() (localctx ICall_instr_paramsContext) {
	this := p
	_ = this

	localctx = NewCall_instr_paramsContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 32, WatParserRULE_call_instr_params)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	var _alt int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(278)
	p.GetErrorHandler().Sync(p)
	_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 16, p.GetParserRuleContext())

	for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
		if _alt == 1 {
			{
				p.SetState(267)
				p.Match(WatParserLPAR)
			}
			{
				p.SetState(268)
				p.Match(WatParserPARAM)
			}
			p.SetState(272)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)

			for _la == WatParserVALUE_TYPE {
				{
					p.SetState(269)
					p.Value_type()
				}

				p.SetState(274)
				p.GetErrorHandler().Sync(p)
				_la = p.GetTokenStream().LA(1)
			}
			{
				p.SetState(275)
				p.Match(WatParserRPAR)
			}

		}
		p.SetState(280)
		p.GetErrorHandler().Sync(p)
		_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 16, p.GetParserRuleContext())
	}
	p.SetState(292)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	for _la == WatParserLPAR {
		{
			p.SetState(281)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(282)
			p.Match(WatParserRESULT)
		}
		p.SetState(286)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		for _la == WatParserVALUE_TYPE {
			{
				p.SetState(283)
				p.Value_type()
			}

			p.SetState(288)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(289)
			p.Match(WatParserRPAR)
		}

		p.SetState(294)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)
	}

	return localctx
}

// ICall_instr_instrContext is an interface to support dynamic dispatch.
type ICall_instr_instrContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsCall_instr_instrContext differentiates from other interfaces.
	IsCall_instr_instrContext()
}

type Call_instr_instrContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCall_instr_instrContext() *Call_instr_instrContext {
	var p = new(Call_instr_instrContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_call_instr_instr
	return p
}

func (*Call_instr_instrContext) IsCall_instr_instrContext() {}

func NewCall_instr_instrContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Call_instr_instrContext {
	var p = new(Call_instr_instrContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_call_instr_instr

	return p
}

func (s *Call_instr_instrContext) GetParser() antlr.Parser { return s.parser }

func (s *Call_instr_instrContext) CALL_INDIRECT() antlr.TerminalNode {
	return s.GetToken(WatParserCALL_INDIRECT, 0)
}

func (s *Call_instr_instrContext) Call_instr_params_instr() ICall_instr_params_instrContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ICall_instr_params_instrContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(ICall_instr_params_instrContext)
}

func (s *Call_instr_instrContext) Type_use() IType_useContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IType_useContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IType_useContext)
}

func (s *Call_instr_instrContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Call_instr_instrContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Call_instr_instrContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterCall_instr_instr(s)
	}
}

func (s *Call_instr_instrContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitCall_instr_instr(s)
	}
}

func (p *WatParser) Call_instr_instr() (localctx ICall_instr_instrContext) {
	this := p
	_ = this

	localctx = NewCall_instr_instrContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 34, WatParserRULE_call_instr_instr)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(295)
		p.Match(WatParserCALL_INDIRECT)
	}
	p.SetState(297)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 19, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(296)
			p.Type_use()
		}

	}
	{
		p.SetState(299)
		p.Call_instr_params_instr()
	}

	return localctx
}

// ICall_instr_params_instrContext is an interface to support dynamic dispatch.
type ICall_instr_params_instrContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsCall_instr_params_instrContext differentiates from other interfaces.
	IsCall_instr_params_instrContext()
}

type Call_instr_params_instrContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCall_instr_params_instrContext() *Call_instr_params_instrContext {
	var p = new(Call_instr_params_instrContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_call_instr_params_instr
	return p
}

func (*Call_instr_params_instrContext) IsCall_instr_params_instrContext() {}

func NewCall_instr_params_instrContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Call_instr_params_instrContext {
	var p = new(Call_instr_params_instrContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_call_instr_params_instr

	return p
}

func (s *Call_instr_params_instrContext) GetParser() antlr.Parser { return s.parser }

func (s *Call_instr_params_instrContext) Call_instr_results_instr() ICall_instr_results_instrContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ICall_instr_results_instrContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(ICall_instr_results_instrContext)
}

func (s *Call_instr_params_instrContext) AllLPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserLPAR)
}

func (s *Call_instr_params_instrContext) LPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, i)
}

func (s *Call_instr_params_instrContext) AllPARAM() []antlr.TerminalNode {
	return s.GetTokens(WatParserPARAM)
}

func (s *Call_instr_params_instrContext) PARAM(i int) antlr.TerminalNode {
	return s.GetToken(WatParserPARAM, i)
}

func (s *Call_instr_params_instrContext) AllRPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserRPAR)
}

func (s *Call_instr_params_instrContext) RPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, i)
}

func (s *Call_instr_params_instrContext) AllValue_type() []IValue_typeContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IValue_typeContext)(nil)).Elem())
	var tst = make([]IValue_typeContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IValue_typeContext)
		}
	}

	return tst
}

func (s *Call_instr_params_instrContext) Value_type(i int) IValue_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IValue_typeContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IValue_typeContext)
}

func (s *Call_instr_params_instrContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Call_instr_params_instrContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Call_instr_params_instrContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterCall_instr_params_instr(s)
	}
}

func (s *Call_instr_params_instrContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitCall_instr_params_instr(s)
	}
}

func (p *WatParser) Call_instr_params_instr() (localctx ICall_instr_params_instrContext) {
	this := p
	_ = this

	localctx = NewCall_instr_params_instrContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 36, WatParserRULE_call_instr_params_instr)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	var _alt int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(312)
	p.GetErrorHandler().Sync(p)
	_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 21, p.GetParserRuleContext())

	for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
		if _alt == 1 {
			{
				p.SetState(301)
				p.Match(WatParserLPAR)
			}
			{
				p.SetState(302)
				p.Match(WatParserPARAM)
			}
			p.SetState(306)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)

			for _la == WatParserVALUE_TYPE {
				{
					p.SetState(303)
					p.Value_type()
				}

				p.SetState(308)
				p.GetErrorHandler().Sync(p)
				_la = p.GetTokenStream().LA(1)
			}
			{
				p.SetState(309)
				p.Match(WatParserRPAR)
			}

		}
		p.SetState(314)
		p.GetErrorHandler().Sync(p)
		_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 21, p.GetParserRuleContext())
	}
	{
		p.SetState(315)
		p.Call_instr_results_instr()
	}

	return localctx
}

// ICall_instr_results_instrContext is an interface to support dynamic dispatch.
type ICall_instr_results_instrContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsCall_instr_results_instrContext differentiates from other interfaces.
	IsCall_instr_results_instrContext()
}

type Call_instr_results_instrContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCall_instr_results_instrContext() *Call_instr_results_instrContext {
	var p = new(Call_instr_results_instrContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_call_instr_results_instr
	return p
}

func (*Call_instr_results_instrContext) IsCall_instr_results_instrContext() {}

func NewCall_instr_results_instrContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Call_instr_results_instrContext {
	var p = new(Call_instr_results_instrContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_call_instr_results_instr

	return p
}

func (s *Call_instr_results_instrContext) GetParser() antlr.Parser { return s.parser }

func (s *Call_instr_results_instrContext) Instr() IInstrContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IInstrContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IInstrContext)
}

func (s *Call_instr_results_instrContext) AllLPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserLPAR)
}

func (s *Call_instr_results_instrContext) LPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, i)
}

func (s *Call_instr_results_instrContext) AllRESULT() []antlr.TerminalNode {
	return s.GetTokens(WatParserRESULT)
}

func (s *Call_instr_results_instrContext) RESULT(i int) antlr.TerminalNode {
	return s.GetToken(WatParserRESULT, i)
}

func (s *Call_instr_results_instrContext) AllRPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserRPAR)
}

func (s *Call_instr_results_instrContext) RPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, i)
}

func (s *Call_instr_results_instrContext) AllValue_type() []IValue_typeContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IValue_typeContext)(nil)).Elem())
	var tst = make([]IValue_typeContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IValue_typeContext)
		}
	}

	return tst
}

func (s *Call_instr_results_instrContext) Value_type(i int) IValue_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IValue_typeContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IValue_typeContext)
}

func (s *Call_instr_results_instrContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Call_instr_results_instrContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Call_instr_results_instrContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterCall_instr_results_instr(s)
	}
}

func (s *Call_instr_results_instrContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitCall_instr_results_instr(s)
	}
}

func (p *WatParser) Call_instr_results_instr() (localctx ICall_instr_results_instrContext) {
	this := p
	_ = this

	localctx = NewCall_instr_results_instrContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 38, WatParserRULE_call_instr_results_instr)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	var _alt int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(328)
	p.GetErrorHandler().Sync(p)
	_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 23, p.GetParserRuleContext())

	for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
		if _alt == 1 {
			{
				p.SetState(317)
				p.Match(WatParserLPAR)
			}
			{
				p.SetState(318)
				p.Match(WatParserRESULT)
			}
			p.SetState(322)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)

			for _la == WatParserVALUE_TYPE {
				{
					p.SetState(319)
					p.Value_type()
				}

				p.SetState(324)
				p.GetErrorHandler().Sync(p)
				_la = p.GetTokenStream().LA(1)
			}
			{
				p.SetState(325)
				p.Match(WatParserRPAR)
			}

		}
		p.SetState(330)
		p.GetErrorHandler().Sync(p)
		_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 23, p.GetParserRuleContext())
	}
	{
		p.SetState(331)
		p.Instr()
	}

	return localctx
}

// IBlock_instrContext is an interface to support dynamic dispatch.
type IBlock_instrContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsBlock_instrContext differentiates from other interfaces.
	IsBlock_instrContext()
}

type Block_instrContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyBlock_instrContext() *Block_instrContext {
	var p = new(Block_instrContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_block_instr
	return p
}

func (*Block_instrContext) IsBlock_instrContext() {}

func NewBlock_instrContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Block_instrContext {
	var p = new(Block_instrContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_block_instr

	return p
}

func (s *Block_instrContext) GetParser() antlr.Parser { return s.parser }

func (s *Block_instrContext) Block() IBlockContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IBlockContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IBlockContext)
}

func (s *Block_instrContext) END() antlr.TerminalNode {
	return s.GetToken(WatParserEND, 0)
}

func (s *Block_instrContext) BLOCK() antlr.TerminalNode {
	return s.GetToken(WatParserBLOCK, 0)
}

func (s *Block_instrContext) LOOP() antlr.TerminalNode {
	return s.GetToken(WatParserLOOP, 0)
}

func (s *Block_instrContext) AllBind_var() []IBind_varContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IBind_varContext)(nil)).Elem())
	var tst = make([]IBind_varContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IBind_varContext)
		}
	}

	return tst
}

func (s *Block_instrContext) Bind_var(i int) IBind_varContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IBind_varContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IBind_varContext)
}

func (s *Block_instrContext) IF() antlr.TerminalNode {
	return s.GetToken(WatParserIF, 0)
}

func (s *Block_instrContext) ELSE() antlr.TerminalNode {
	return s.GetToken(WatParserELSE, 0)
}

func (s *Block_instrContext) Instr_list() IInstr_listContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IInstr_listContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IInstr_listContext)
}

func (s *Block_instrContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Block_instrContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Block_instrContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterBlock_instr(s)
	}
}

func (s *Block_instrContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitBlock_instr(s)
	}
}

func (p *WatParser) Block_instr() (localctx IBlock_instrContext) {
	this := p
	_ = this

	localctx = NewBlock_instrContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 40, WatParserRULE_block_instr)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(358)
	p.GetErrorHandler().Sync(p)

	switch p.GetTokenStream().LA(1) {
	case WatParserBLOCK, WatParserLOOP:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(333)
			_la = p.GetTokenStream().LA(1)

			if !(_la == WatParserBLOCK || _la == WatParserLOOP) {
				p.GetErrorHandler().RecoverInline(p)
			} else {
				p.GetErrorHandler().ReportMatch(p)
				p.Consume()
			}
		}
		p.SetState(335)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(334)
				p.Bind_var()
			}

		}
		{
			p.SetState(337)
			p.Block()
		}
		{
			p.SetState(338)
			p.Match(WatParserEND)
		}
		p.SetState(340)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(339)
				p.Bind_var()
			}

		}

	case WatParserIF:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(342)
			p.Match(WatParserIF)
		}
		p.SetState(344)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(343)
				p.Bind_var()
			}

		}
		{
			p.SetState(346)
			p.Block()
		}
		p.SetState(352)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserELSE {
			{
				p.SetState(347)
				p.Match(WatParserELSE)
			}
			p.SetState(349)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)

			if _la == WatParserVAR {
				{
					p.SetState(348)
					p.Bind_var()
				}

			}
			{
				p.SetState(351)
				p.Instr_list()
			}

		}
		{
			p.SetState(354)
			p.Match(WatParserEND)
		}
		p.SetState(356)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(355)
				p.Bind_var()
			}

		}

	default:
		panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
	}

	return localctx
}

// IBlock_typeContext is an interface to support dynamic dispatch.
type IBlock_typeContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsBlock_typeContext differentiates from other interfaces.
	IsBlock_typeContext()
}

type Block_typeContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyBlock_typeContext() *Block_typeContext {
	var p = new(Block_typeContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_block_type
	return p
}

func (*Block_typeContext) IsBlock_typeContext() {}

func NewBlock_typeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Block_typeContext {
	var p = new(Block_typeContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_block_type

	return p
}

func (s *Block_typeContext) GetParser() antlr.Parser { return s.parser }

func (s *Block_typeContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *Block_typeContext) RESULT() antlr.TerminalNode {
	return s.GetToken(WatParserRESULT, 0)
}

func (s *Block_typeContext) Value_type() IValue_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IValue_typeContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IValue_typeContext)
}

func (s *Block_typeContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *Block_typeContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Block_typeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Block_typeContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterBlock_type(s)
	}
}

func (s *Block_typeContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitBlock_type(s)
	}
}

func (p *WatParser) Block_type() (localctx IBlock_typeContext) {
	this := p
	_ = this

	localctx = NewBlock_typeContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 42, WatParserRULE_block_type)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(360)
		p.Match(WatParserLPAR)
	}
	{
		p.SetState(361)
		p.Match(WatParserRESULT)
	}
	{
		p.SetState(362)
		p.Value_type()
	}
	{
		p.SetState(363)
		p.Match(WatParserRPAR)
	}

	return localctx
}

// IBlockContext is an interface to support dynamic dispatch.
type IBlockContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsBlockContext differentiates from other interfaces.
	IsBlockContext()
}

type BlockContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyBlockContext() *BlockContext {
	var p = new(BlockContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_block
	return p
}

func (*BlockContext) IsBlockContext() {}

func NewBlockContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *BlockContext {
	var p = new(BlockContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_block

	return p
}

func (s *BlockContext) GetParser() antlr.Parser { return s.parser }

func (s *BlockContext) Instr_list() IInstr_listContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IInstr_listContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IInstr_listContext)
}

func (s *BlockContext) Block_type() IBlock_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IBlock_typeContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IBlock_typeContext)
}

func (s *BlockContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *BlockContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *BlockContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterBlock(s)
	}
}

func (s *BlockContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitBlock(s)
	}
}

func (p *WatParser) Block() (localctx IBlockContext) {
	this := p
	_ = this

	localctx = NewBlockContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 44, WatParserRULE_block)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	p.SetState(366)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 31, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(365)
			p.Block_type()
		}

	}
	{
		p.SetState(368)
		p.Instr_list()
	}

	return localctx
}

// IExprContext is an interface to support dynamic dispatch.
type IExprContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsExprContext differentiates from other interfaces.
	IsExprContext()
}

type ExprContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyExprContext() *ExprContext {
	var p = new(ExprContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_expr
	return p
}

func (*ExprContext) IsExprContext() {}

func NewExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExprContext {
	var p = new(ExprContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_expr

	return p
}

func (s *ExprContext) GetParser() antlr.Parser { return s.parser }

func (s *ExprContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *ExprContext) Expr1() IExpr1Context {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpr1Context)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IExpr1Context)
}

func (s *ExprContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *ExprContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *ExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *ExprContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterExpr(s)
	}
}

func (s *ExprContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitExpr(s)
	}
}

func (p *WatParser) Expr() (localctx IExprContext) {
	this := p
	_ = this

	localctx = NewExprContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 46, WatParserRULE_expr)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(370)
		p.Match(WatParserLPAR)
	}
	{
		p.SetState(371)
		p.Expr1()
	}
	{
		p.SetState(372)
		p.Match(WatParserRPAR)
	}

	return localctx
}

// IExpr1Context is an interface to support dynamic dispatch.
type IExpr1Context interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsExpr1Context differentiates from other interfaces.
	IsExpr1Context()
}

type Expr1Context struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyExpr1Context() *Expr1Context {
	var p = new(Expr1Context)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_expr1
	return p
}

func (*Expr1Context) IsExpr1Context() {}

func NewExpr1Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Expr1Context {
	var p = new(Expr1Context)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_expr1

	return p
}

func (s *Expr1Context) GetParser() antlr.Parser { return s.parser }

func (s *Expr1Context) Plain_instr() IPlain_instrContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IPlain_instrContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IPlain_instrContext)
}

func (s *Expr1Context) AllExpr() []IExprContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IExprContext)(nil)).Elem())
	var tst = make([]IExprContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IExprContext)
		}
	}

	return tst
}

func (s *Expr1Context) Expr(i int) IExprContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IExprContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Expr1Context) CALL_INDIRECT() antlr.TerminalNode {
	return s.GetToken(WatParserCALL_INDIRECT, 0)
}

func (s *Expr1Context) Call_expr_type() ICall_expr_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ICall_expr_typeContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(ICall_expr_typeContext)
}

func (s *Expr1Context) BLOCK() antlr.TerminalNode {
	return s.GetToken(WatParserBLOCK, 0)
}

func (s *Expr1Context) Block() IBlockContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IBlockContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IBlockContext)
}

func (s *Expr1Context) Bind_var() IBind_varContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IBind_varContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IBind_varContext)
}

func (s *Expr1Context) LOOP() antlr.TerminalNode {
	return s.GetToken(WatParserLOOP, 0)
}

func (s *Expr1Context) IF() antlr.TerminalNode {
	return s.GetToken(WatParserIF, 0)
}

func (s *Expr1Context) If_block() IIf_blockContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IIf_blockContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IIf_blockContext)
}

func (s *Expr1Context) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Expr1Context) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Expr1Context) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterExpr1(s)
	}
}

func (s *Expr1Context) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitExpr1(s)
	}
}

func (p *WatParser) Expr1() (localctx IExpr1Context) {
	this := p
	_ = this

	localctx = NewExpr1Context(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 48, WatParserRULE_expr1)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(398)
	p.GetErrorHandler().Sync(p)

	switch p.GetTokenStream().LA(1) {
	case WatParserCONST, WatParserNOP, WatParserUNREACHABLE, WatParserDROP, WatParserBR, WatParserBR_IF, WatParserBR_TABLE, WatParserRETURN, WatParserSELECT, WatParserCALL, WatParserLOCAL_GET, WatParserLOCAL_SET, WatParserLOCAL_TEE, WatParserGLOBAL_GET, WatParserGLOBAL_SET, WatParserLOAD, WatParserSTORE, WatParserUNARY, WatParserBINARY, WatParserTEST, WatParserCOMPARE, WatParserCONVERT, WatParserMEMORY_SIZE, WatParserMEMORY_GROW:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(374)
			p.Plain_instr()
		}
		p.SetState(378)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		for _la == WatParserLPAR {
			{
				p.SetState(375)
				p.Expr()
			}

			p.SetState(380)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)
		}

	case WatParserCALL_INDIRECT:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(381)
			p.Match(WatParserCALL_INDIRECT)
		}
		{
			p.SetState(382)
			p.Call_expr_type()
		}

	case WatParserBLOCK:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(383)
			p.Match(WatParserBLOCK)
		}
		p.SetState(385)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(384)
				p.Bind_var()
			}

		}
		{
			p.SetState(387)
			p.Block()
		}

	case WatParserLOOP:
		p.EnterOuterAlt(localctx, 4)
		{
			p.SetState(388)
			p.Match(WatParserLOOP)
		}
		p.SetState(390)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(389)
				p.Bind_var()
			}

		}
		{
			p.SetState(392)
			p.Block()
		}

	case WatParserIF:
		p.EnterOuterAlt(localctx, 5)
		{
			p.SetState(393)
			p.Match(WatParserIF)
		}
		p.SetState(395)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(394)
				p.Bind_var()
			}

		}
		{
			p.SetState(397)
			p.If_block()
		}

	default:
		panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
	}

	return localctx
}

// ICall_expr_typeContext is an interface to support dynamic dispatch.
type ICall_expr_typeContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsCall_expr_typeContext differentiates from other interfaces.
	IsCall_expr_typeContext()
}

type Call_expr_typeContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCall_expr_typeContext() *Call_expr_typeContext {
	var p = new(Call_expr_typeContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_call_expr_type
	return p
}

func (*Call_expr_typeContext) IsCall_expr_typeContext() {}

func NewCall_expr_typeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Call_expr_typeContext {
	var p = new(Call_expr_typeContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_call_expr_type

	return p
}

func (s *Call_expr_typeContext) GetParser() antlr.Parser { return s.parser }

func (s *Call_expr_typeContext) Call_expr_params() ICall_expr_paramsContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ICall_expr_paramsContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(ICall_expr_paramsContext)
}

func (s *Call_expr_typeContext) Type_use() IType_useContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IType_useContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IType_useContext)
}

func (s *Call_expr_typeContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Call_expr_typeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Call_expr_typeContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterCall_expr_type(s)
	}
}

func (s *Call_expr_typeContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitCall_expr_type(s)
	}
}

func (p *WatParser) Call_expr_type() (localctx ICall_expr_typeContext) {
	this := p
	_ = this

	localctx = NewCall_expr_typeContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 50, WatParserRULE_call_expr_type)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	p.SetState(401)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 37, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(400)
			p.Type_use()
		}

	}
	{
		p.SetState(403)
		p.Call_expr_params()
	}

	return localctx
}

// ICall_expr_paramsContext is an interface to support dynamic dispatch.
type ICall_expr_paramsContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsCall_expr_paramsContext differentiates from other interfaces.
	IsCall_expr_paramsContext()
}

type Call_expr_paramsContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCall_expr_paramsContext() *Call_expr_paramsContext {
	var p = new(Call_expr_paramsContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_call_expr_params
	return p
}

func (*Call_expr_paramsContext) IsCall_expr_paramsContext() {}

func NewCall_expr_paramsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Call_expr_paramsContext {
	var p = new(Call_expr_paramsContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_call_expr_params

	return p
}

func (s *Call_expr_paramsContext) GetParser() antlr.Parser { return s.parser }

func (s *Call_expr_paramsContext) Call_expr_results() ICall_expr_resultsContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ICall_expr_resultsContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(ICall_expr_resultsContext)
}

func (s *Call_expr_paramsContext) AllLPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserLPAR)
}

func (s *Call_expr_paramsContext) LPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, i)
}

func (s *Call_expr_paramsContext) AllPARAM() []antlr.TerminalNode {
	return s.GetTokens(WatParserPARAM)
}

func (s *Call_expr_paramsContext) PARAM(i int) antlr.TerminalNode {
	return s.GetToken(WatParserPARAM, i)
}

func (s *Call_expr_paramsContext) AllRPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserRPAR)
}

func (s *Call_expr_paramsContext) RPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, i)
}

func (s *Call_expr_paramsContext) AllValue_type() []IValue_typeContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IValue_typeContext)(nil)).Elem())
	var tst = make([]IValue_typeContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IValue_typeContext)
		}
	}

	return tst
}

func (s *Call_expr_paramsContext) Value_type(i int) IValue_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IValue_typeContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IValue_typeContext)
}

func (s *Call_expr_paramsContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Call_expr_paramsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Call_expr_paramsContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterCall_expr_params(s)
	}
}

func (s *Call_expr_paramsContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitCall_expr_params(s)
	}
}

func (p *WatParser) Call_expr_params() (localctx ICall_expr_paramsContext) {
	this := p
	_ = this

	localctx = NewCall_expr_paramsContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 52, WatParserRULE_call_expr_params)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	var _alt int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(416)
	p.GetErrorHandler().Sync(p)
	_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 39, p.GetParserRuleContext())

	for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
		if _alt == 1 {
			{
				p.SetState(405)
				p.Match(WatParserLPAR)
			}
			{
				p.SetState(406)
				p.Match(WatParserPARAM)
			}
			p.SetState(410)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)

			for _la == WatParserVALUE_TYPE {
				{
					p.SetState(407)
					p.Value_type()
				}

				p.SetState(412)
				p.GetErrorHandler().Sync(p)
				_la = p.GetTokenStream().LA(1)
			}
			{
				p.SetState(413)
				p.Match(WatParserRPAR)
			}

		}
		p.SetState(418)
		p.GetErrorHandler().Sync(p)
		_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 39, p.GetParserRuleContext())
	}
	{
		p.SetState(419)
		p.Call_expr_results()
	}

	return localctx
}

// ICall_expr_resultsContext is an interface to support dynamic dispatch.
type ICall_expr_resultsContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsCall_expr_resultsContext differentiates from other interfaces.
	IsCall_expr_resultsContext()
}

type Call_expr_resultsContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCall_expr_resultsContext() *Call_expr_resultsContext {
	var p = new(Call_expr_resultsContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_call_expr_results
	return p
}

func (*Call_expr_resultsContext) IsCall_expr_resultsContext() {}

func NewCall_expr_resultsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Call_expr_resultsContext {
	var p = new(Call_expr_resultsContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_call_expr_results

	return p
}

func (s *Call_expr_resultsContext) GetParser() antlr.Parser { return s.parser }

func (s *Call_expr_resultsContext) AllLPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserLPAR)
}

func (s *Call_expr_resultsContext) LPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, i)
}

func (s *Call_expr_resultsContext) AllRESULT() []antlr.TerminalNode {
	return s.GetTokens(WatParserRESULT)
}

func (s *Call_expr_resultsContext) RESULT(i int) antlr.TerminalNode {
	return s.GetToken(WatParserRESULT, i)
}

func (s *Call_expr_resultsContext) AllRPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserRPAR)
}

func (s *Call_expr_resultsContext) RPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, i)
}

func (s *Call_expr_resultsContext) AllExpr() []IExprContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IExprContext)(nil)).Elem())
	var tst = make([]IExprContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IExprContext)
		}
	}

	return tst
}

func (s *Call_expr_resultsContext) Expr(i int) IExprContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IExprContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Call_expr_resultsContext) AllValue_type() []IValue_typeContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IValue_typeContext)(nil)).Elem())
	var tst = make([]IValue_typeContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IValue_typeContext)
		}
	}

	return tst
}

func (s *Call_expr_resultsContext) Value_type(i int) IValue_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IValue_typeContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IValue_typeContext)
}

func (s *Call_expr_resultsContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Call_expr_resultsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Call_expr_resultsContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterCall_expr_results(s)
	}
}

func (s *Call_expr_resultsContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitCall_expr_results(s)
	}
}

func (p *WatParser) Call_expr_results() (localctx ICall_expr_resultsContext) {
	this := p
	_ = this

	localctx = NewCall_expr_resultsContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 54, WatParserRULE_call_expr_results)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	var _alt int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(432)
	p.GetErrorHandler().Sync(p)
	_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 41, p.GetParserRuleContext())

	for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
		if _alt == 1 {
			{
				p.SetState(421)
				p.Match(WatParserLPAR)
			}
			{
				p.SetState(422)
				p.Match(WatParserRESULT)
			}
			p.SetState(426)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)

			for _la == WatParserVALUE_TYPE {
				{
					p.SetState(423)
					p.Value_type()
				}

				p.SetState(428)
				p.GetErrorHandler().Sync(p)
				_la = p.GetTokenStream().LA(1)
			}
			{
				p.SetState(429)
				p.Match(WatParserRPAR)
			}

		}
		p.SetState(434)
		p.GetErrorHandler().Sync(p)
		_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 41, p.GetParserRuleContext())
	}
	p.SetState(438)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	for _la == WatParserLPAR {
		{
			p.SetState(435)
			p.Expr()
		}

		p.SetState(440)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)
	}

	return localctx
}

// IIf_blockContext is an interface to support dynamic dispatch.
type IIf_blockContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsIf_blockContext differentiates from other interfaces.
	IsIf_blockContext()
}

type If_blockContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyIf_blockContext() *If_blockContext {
	var p = new(If_blockContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_if_block
	return p
}

func (*If_blockContext) IsIf_blockContext() {}

func NewIf_blockContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *If_blockContext {
	var p = new(If_blockContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_if_block

	return p
}

func (s *If_blockContext) GetParser() antlr.Parser { return s.parser }

func (s *If_blockContext) Block_type() IBlock_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IBlock_typeContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IBlock_typeContext)
}

func (s *If_blockContext) If_block() IIf_blockContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IIf_blockContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IIf_blockContext)
}

func (s *If_blockContext) AllLPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserLPAR)
}

func (s *If_blockContext) LPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, i)
}

func (s *If_blockContext) THEN() antlr.TerminalNode {
	return s.GetToken(WatParserTHEN, 0)
}

func (s *If_blockContext) AllInstr_list() []IInstr_listContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IInstr_listContext)(nil)).Elem())
	var tst = make([]IInstr_listContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IInstr_listContext)
		}
	}

	return tst
}

func (s *If_blockContext) Instr_list(i int) IInstr_listContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IInstr_listContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IInstr_listContext)
}

func (s *If_blockContext) AllRPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserRPAR)
}

func (s *If_blockContext) RPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, i)
}

func (s *If_blockContext) AllExpr() []IExprContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IExprContext)(nil)).Elem())
	var tst = make([]IExprContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IExprContext)
		}
	}

	return tst
}

func (s *If_blockContext) Expr(i int) IExprContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IExprContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *If_blockContext) ELSE() antlr.TerminalNode {
	return s.GetToken(WatParserELSE, 0)
}

func (s *If_blockContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *If_blockContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *If_blockContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterIf_block(s)
	}
}

func (s *If_blockContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitIf_block(s)
	}
}

func (p *WatParser) If_block() (localctx IIf_blockContext) {
	this := p
	_ = this

	localctx = NewIf_blockContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 56, WatParserRULE_if_block)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	var _alt int

	p.SetState(461)
	p.GetErrorHandler().Sync(p)
	switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 45, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(441)
			p.Block_type()
		}
		{
			p.SetState(442)
			p.If_block()
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		p.SetState(447)
		p.GetErrorHandler().Sync(p)
		_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 43, p.GetParserRuleContext())

		for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
			if _alt == 1 {
				{
					p.SetState(444)
					p.Expr()
				}

			}
			p.SetState(449)
			p.GetErrorHandler().Sync(p)
			_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 43, p.GetParserRuleContext())
		}
		{
			p.SetState(450)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(451)
			p.Match(WatParserTHEN)
		}
		{
			p.SetState(452)
			p.Instr_list()
		}
		{
			p.SetState(453)
			p.Match(WatParserRPAR)
		}
		p.SetState(459)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserLPAR {
			{
				p.SetState(454)
				p.Match(WatParserLPAR)
			}
			{
				p.SetState(455)
				p.Match(WatParserELSE)
			}
			{
				p.SetState(456)
				p.Instr_list()
			}
			{
				p.SetState(457)
				p.Match(WatParserRPAR)
			}

		}

	}

	return localctx
}

// IInstr_listContext is an interface to support dynamic dispatch.
type IInstr_listContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsInstr_listContext differentiates from other interfaces.
	IsInstr_listContext()
}

type Instr_listContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyInstr_listContext() *Instr_listContext {
	var p = new(Instr_listContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_instr_list
	return p
}

func (*Instr_listContext) IsInstr_listContext() {}

func NewInstr_listContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Instr_listContext {
	var p = new(Instr_listContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_instr_list

	return p
}

func (s *Instr_listContext) GetParser() antlr.Parser { return s.parser }

func (s *Instr_listContext) AllInstr() []IInstrContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IInstrContext)(nil)).Elem())
	var tst = make([]IInstrContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IInstrContext)
		}
	}

	return tst
}

func (s *Instr_listContext) Instr(i int) IInstrContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IInstrContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IInstrContext)
}

func (s *Instr_listContext) Call_instr() ICall_instrContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ICall_instrContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(ICall_instrContext)
}

func (s *Instr_listContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Instr_listContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Instr_listContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterInstr_list(s)
	}
}

func (s *Instr_listContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitInstr_list(s)
	}
}

func (p *WatParser) Instr_list() (localctx IInstr_listContext) {
	this := p
	_ = this

	localctx = NewInstr_listContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 58, WatParserRULE_instr_list)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	var _alt int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(466)
	p.GetErrorHandler().Sync(p)
	_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 46, p.GetParserRuleContext())

	for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
		if _alt == 1 {
			{
				p.SetState(463)
				p.Instr()
			}

		}
		p.SetState(468)
		p.GetErrorHandler().Sync(p)
		_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 46, p.GetParserRuleContext())
	}
	p.SetState(470)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	if _la == WatParserCALL_INDIRECT {
		{
			p.SetState(469)
			p.Call_instr()
		}

	}

	return localctx
}

// IConst_exprContext is an interface to support dynamic dispatch.
type IConst_exprContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsConst_exprContext differentiates from other interfaces.
	IsConst_exprContext()
}

type Const_exprContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyConst_exprContext() *Const_exprContext {
	var p = new(Const_exprContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_const_expr
	return p
}

func (*Const_exprContext) IsConst_exprContext() {}

func NewConst_exprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Const_exprContext {
	var p = new(Const_exprContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_const_expr

	return p
}

func (s *Const_exprContext) GetParser() antlr.Parser { return s.parser }

func (s *Const_exprContext) Instr_list() IInstr_listContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IInstr_listContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IInstr_listContext)
}

func (s *Const_exprContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Const_exprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Const_exprContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterConst_expr(s)
	}
}

func (s *Const_exprContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitConst_expr(s)
	}
}

func (p *WatParser) Const_expr() (localctx IConst_exprContext) {
	this := p
	_ = this

	localctx = NewConst_exprContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 60, WatParserRULE_const_expr)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(472)
		p.Instr_list()
	}

	return localctx
}

// IFunc_Context is an interface to support dynamic dispatch.
type IFunc_Context interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsFunc_Context differentiates from other interfaces.
	IsFunc_Context()
}

type Func_Context struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyFunc_Context() *Func_Context {
	var p = new(Func_Context)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_func_
	return p
}

func (*Func_Context) IsFunc_Context() {}

func NewFunc_Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Func_Context {
	var p = new(Func_Context)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_func_

	return p
}

func (s *Func_Context) GetParser() antlr.Parser { return s.parser }

func (s *Func_Context) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *Func_Context) FUNC() antlr.TerminalNode {
	return s.GetToken(WatParserFUNC, 0)
}

func (s *Func_Context) Func_fields() IFunc_fieldsContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunc_fieldsContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IFunc_fieldsContext)
}

func (s *Func_Context) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *Func_Context) Bind_var() IBind_varContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IBind_varContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IBind_varContext)
}

func (s *Func_Context) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Func_Context) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Func_Context) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterFunc_(s)
	}
}

func (s *Func_Context) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitFunc_(s)
	}
}

func (p *WatParser) Func_() (localctx IFunc_Context) {
	this := p
	_ = this

	localctx = NewFunc_Context(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 62, WatParserRULE_func_)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(474)
		p.Match(WatParserLPAR)
	}
	{
		p.SetState(475)
		p.Match(WatParserFUNC)
	}
	p.SetState(477)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	if _la == WatParserVAR {
		{
			p.SetState(476)
			p.Bind_var()
		}

	}
	{
		p.SetState(479)
		p.Func_fields()
	}
	{
		p.SetState(480)
		p.Match(WatParserRPAR)
	}

	return localctx
}

// IFunc_fieldsContext is an interface to support dynamic dispatch.
type IFunc_fieldsContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsFunc_fieldsContext differentiates from other interfaces.
	IsFunc_fieldsContext()
}

type Func_fieldsContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyFunc_fieldsContext() *Func_fieldsContext {
	var p = new(Func_fieldsContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_func_fields
	return p
}

func (*Func_fieldsContext) IsFunc_fieldsContext() {}

func NewFunc_fieldsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Func_fieldsContext {
	var p = new(Func_fieldsContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_func_fields

	return p
}

func (s *Func_fieldsContext) GetParser() antlr.Parser { return s.parser }

func (s *Func_fieldsContext) Func_fields_body() IFunc_fields_bodyContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunc_fields_bodyContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IFunc_fields_bodyContext)
}

func (s *Func_fieldsContext) Type_use() IType_useContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IType_useContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IType_useContext)
}

func (s *Func_fieldsContext) Inline_import() IInline_importContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IInline_importContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IInline_importContext)
}

func (s *Func_fieldsContext) Func_fields_import() IFunc_fields_importContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunc_fields_importContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IFunc_fields_importContext)
}

func (s *Func_fieldsContext) Inline_export() IInline_exportContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IInline_exportContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IInline_exportContext)
}

func (s *Func_fieldsContext) Func_fields() IFunc_fieldsContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunc_fieldsContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IFunc_fieldsContext)
}

func (s *Func_fieldsContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Func_fieldsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Func_fieldsContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterFunc_fields(s)
	}
}

func (s *Func_fieldsContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitFunc_fields(s)
	}
}

func (p *WatParser) Func_fields() (localctx IFunc_fieldsContext) {
	this := p
	_ = this

	localctx = NewFunc_fieldsContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 64, WatParserRULE_func_fields)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(495)
	p.GetErrorHandler().Sync(p)
	switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 51, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		p.SetState(483)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 49, p.GetParserRuleContext()) == 1 {
			{
				p.SetState(482)
				p.Type_use()
			}

		}
		{
			p.SetState(485)
			p.Func_fields_body()
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(486)
			p.Inline_import()
		}
		p.SetState(488)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 50, p.GetParserRuleContext()) == 1 {
			{
				p.SetState(487)
				p.Type_use()
			}

		}
		{
			p.SetState(490)
			p.Func_fields_import()
		}

	case 3:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(492)
			p.Inline_export()
		}
		{
			p.SetState(493)
			p.Func_fields()
		}

	}

	return localctx
}

// IFunc_fields_importContext is an interface to support dynamic dispatch.
type IFunc_fields_importContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsFunc_fields_importContext differentiates from other interfaces.
	IsFunc_fields_importContext()
}

type Func_fields_importContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyFunc_fields_importContext() *Func_fields_importContext {
	var p = new(Func_fields_importContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_func_fields_import
	return p
}

func (*Func_fields_importContext) IsFunc_fields_importContext() {}

func NewFunc_fields_importContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Func_fields_importContext {
	var p = new(Func_fields_importContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_func_fields_import

	return p
}

func (s *Func_fields_importContext) GetParser() antlr.Parser { return s.parser }

func (s *Func_fields_importContext) Func_fields_import_result() IFunc_fields_import_resultContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunc_fields_import_resultContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IFunc_fields_import_resultContext)
}

func (s *Func_fields_importContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *Func_fields_importContext) PARAM() antlr.TerminalNode {
	return s.GetToken(WatParserPARAM, 0)
}

func (s *Func_fields_importContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *Func_fields_importContext) Bind_var() IBind_varContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IBind_varContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IBind_varContext)
}

func (s *Func_fields_importContext) AllValue_type() []IValue_typeContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IValue_typeContext)(nil)).Elem())
	var tst = make([]IValue_typeContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IValue_typeContext)
		}
	}

	return tst
}

func (s *Func_fields_importContext) Value_type(i int) IValue_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IValue_typeContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IValue_typeContext)
}

func (s *Func_fields_importContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Func_fields_importContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Func_fields_importContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterFunc_fields_import(s)
	}
}

func (s *Func_fields_importContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitFunc_fields_import(s)
	}
}

func (p *WatParser) Func_fields_import() (localctx IFunc_fields_importContext) {
	this := p
	_ = this

	localctx = NewFunc_fields_importContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 66, WatParserRULE_func_fields_import)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	p.SetState(512)
	p.GetErrorHandler().Sync(p)
	switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 53, p.GetParserRuleContext()) {
	case 1:
		{
			p.SetState(497)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(498)
			p.Match(WatParserPARAM)
		}
		p.SetState(502)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		for _la == WatParserVALUE_TYPE {
			{
				p.SetState(499)
				p.Value_type()
			}

			p.SetState(504)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(505)
			p.Match(WatParserRPAR)
		}

	case 2:
		{
			p.SetState(506)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(507)
			p.Match(WatParserPARAM)
		}
		{
			p.SetState(508)
			p.Bind_var()
		}
		{
			p.SetState(509)
			p.Value_type()
		}
		{
			p.SetState(510)
			p.Match(WatParserRPAR)
		}

	}
	{
		p.SetState(514)
		p.Func_fields_import_result()
	}

	return localctx
}

// IFunc_fields_import_resultContext is an interface to support dynamic dispatch.
type IFunc_fields_import_resultContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsFunc_fields_import_resultContext differentiates from other interfaces.
	IsFunc_fields_import_resultContext()
}

type Func_fields_import_resultContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyFunc_fields_import_resultContext() *Func_fields_import_resultContext {
	var p = new(Func_fields_import_resultContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_func_fields_import_result
	return p
}

func (*Func_fields_import_resultContext) IsFunc_fields_import_resultContext() {}

func NewFunc_fields_import_resultContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Func_fields_import_resultContext {
	var p = new(Func_fields_import_resultContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_func_fields_import_result

	return p
}

func (s *Func_fields_import_resultContext) GetParser() antlr.Parser { return s.parser }

func (s *Func_fields_import_resultContext) AllLPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserLPAR)
}

func (s *Func_fields_import_resultContext) LPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, i)
}

func (s *Func_fields_import_resultContext) AllRESULT() []antlr.TerminalNode {
	return s.GetTokens(WatParserRESULT)
}

func (s *Func_fields_import_resultContext) RESULT(i int) antlr.TerminalNode {
	return s.GetToken(WatParserRESULT, i)
}

func (s *Func_fields_import_resultContext) AllRPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserRPAR)
}

func (s *Func_fields_import_resultContext) RPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, i)
}

func (s *Func_fields_import_resultContext) AllValue_type() []IValue_typeContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IValue_typeContext)(nil)).Elem())
	var tst = make([]IValue_typeContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IValue_typeContext)
		}
	}

	return tst
}

func (s *Func_fields_import_resultContext) Value_type(i int) IValue_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IValue_typeContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IValue_typeContext)
}

func (s *Func_fields_import_resultContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Func_fields_import_resultContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Func_fields_import_resultContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterFunc_fields_import_result(s)
	}
}

func (s *Func_fields_import_resultContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitFunc_fields_import_result(s)
	}
}

func (p *WatParser) Func_fields_import_result() (localctx IFunc_fields_import_resultContext) {
	this := p
	_ = this

	localctx = NewFunc_fields_import_resultContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 68, WatParserRULE_func_fields_import_result)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	p.SetState(527)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	for _la == WatParserLPAR {
		{
			p.SetState(516)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(517)
			p.Match(WatParserRESULT)
		}
		p.SetState(521)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		for _la == WatParserVALUE_TYPE {
			{
				p.SetState(518)
				p.Value_type()
			}

			p.SetState(523)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(524)
			p.Match(WatParserRPAR)
		}

		p.SetState(529)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)
	}

	return localctx
}

// IFunc_fields_bodyContext is an interface to support dynamic dispatch.
type IFunc_fields_bodyContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsFunc_fields_bodyContext differentiates from other interfaces.
	IsFunc_fields_bodyContext()
}

type Func_fields_bodyContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyFunc_fields_bodyContext() *Func_fields_bodyContext {
	var p = new(Func_fields_bodyContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_func_fields_body
	return p
}

func (*Func_fields_bodyContext) IsFunc_fields_bodyContext() {}

func NewFunc_fields_bodyContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Func_fields_bodyContext {
	var p = new(Func_fields_bodyContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_func_fields_body

	return p
}

func (s *Func_fields_bodyContext) GetParser() antlr.Parser { return s.parser }

func (s *Func_fields_bodyContext) Func_result_body() IFunc_result_bodyContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunc_result_bodyContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IFunc_result_bodyContext)
}

func (s *Func_fields_bodyContext) AllLPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserLPAR)
}

func (s *Func_fields_bodyContext) LPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, i)
}

func (s *Func_fields_bodyContext) AllPARAM() []antlr.TerminalNode {
	return s.GetTokens(WatParserPARAM)
}

func (s *Func_fields_bodyContext) PARAM(i int) antlr.TerminalNode {
	return s.GetToken(WatParserPARAM, i)
}

func (s *Func_fields_bodyContext) AllRPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserRPAR)
}

func (s *Func_fields_bodyContext) RPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, i)
}

func (s *Func_fields_bodyContext) AllBind_var() []IBind_varContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IBind_varContext)(nil)).Elem())
	var tst = make([]IBind_varContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IBind_varContext)
		}
	}

	return tst
}

func (s *Func_fields_bodyContext) Bind_var(i int) IBind_varContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IBind_varContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IBind_varContext)
}

func (s *Func_fields_bodyContext) AllValue_type() []IValue_typeContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IValue_typeContext)(nil)).Elem())
	var tst = make([]IValue_typeContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IValue_typeContext)
		}
	}

	return tst
}

func (s *Func_fields_bodyContext) Value_type(i int) IValue_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IValue_typeContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IValue_typeContext)
}

func (s *Func_fields_bodyContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Func_fields_bodyContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Func_fields_bodyContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterFunc_fields_body(s)
	}
}

func (s *Func_fields_bodyContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitFunc_fields_body(s)
	}
}

func (p *WatParser) Func_fields_body() (localctx IFunc_fields_bodyContext) {
	this := p
	_ = this

	localctx = NewFunc_fields_bodyContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 70, WatParserRULE_func_fields_body)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	var _alt int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(547)
	p.GetErrorHandler().Sync(p)
	_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 58, p.GetParserRuleContext())

	for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
		if _alt == 1 {
			p.SetState(545)
			p.GetErrorHandler().Sync(p)
			switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 57, p.GetParserRuleContext()) {
			case 1:
				{
					p.SetState(530)
					p.Match(WatParserLPAR)
				}
				{
					p.SetState(531)
					p.Match(WatParserPARAM)
				}
				p.SetState(535)
				p.GetErrorHandler().Sync(p)
				_la = p.GetTokenStream().LA(1)

				for _la == WatParserVALUE_TYPE {
					{
						p.SetState(532)
						p.Value_type()
					}

					p.SetState(537)
					p.GetErrorHandler().Sync(p)
					_la = p.GetTokenStream().LA(1)
				}
				{
					p.SetState(538)
					p.Match(WatParserRPAR)
				}

			case 2:
				{
					p.SetState(539)
					p.Match(WatParserLPAR)
				}
				{
					p.SetState(540)
					p.Match(WatParserPARAM)
				}
				{
					p.SetState(541)
					p.Bind_var()
				}
				{
					p.SetState(542)
					p.Value_type()
				}
				{
					p.SetState(543)
					p.Match(WatParserRPAR)
				}

			}

		}
		p.SetState(549)
		p.GetErrorHandler().Sync(p)
		_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 58, p.GetParserRuleContext())
	}
	{
		p.SetState(550)
		p.Func_result_body()
	}

	return localctx
}

// IFunc_result_bodyContext is an interface to support dynamic dispatch.
type IFunc_result_bodyContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsFunc_result_bodyContext differentiates from other interfaces.
	IsFunc_result_bodyContext()
}

type Func_result_bodyContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyFunc_result_bodyContext() *Func_result_bodyContext {
	var p = new(Func_result_bodyContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_func_result_body
	return p
}

func (*Func_result_bodyContext) IsFunc_result_bodyContext() {}

func NewFunc_result_bodyContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Func_result_bodyContext {
	var p = new(Func_result_bodyContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_func_result_body

	return p
}

func (s *Func_result_bodyContext) GetParser() antlr.Parser { return s.parser }

func (s *Func_result_bodyContext) Func_body() IFunc_bodyContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunc_bodyContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IFunc_bodyContext)
}

func (s *Func_result_bodyContext) AllLPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserLPAR)
}

func (s *Func_result_bodyContext) LPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, i)
}

func (s *Func_result_bodyContext) AllRESULT() []antlr.TerminalNode {
	return s.GetTokens(WatParserRESULT)
}

func (s *Func_result_bodyContext) RESULT(i int) antlr.TerminalNode {
	return s.GetToken(WatParserRESULT, i)
}

func (s *Func_result_bodyContext) AllRPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserRPAR)
}

func (s *Func_result_bodyContext) RPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, i)
}

func (s *Func_result_bodyContext) AllValue_type() []IValue_typeContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IValue_typeContext)(nil)).Elem())
	var tst = make([]IValue_typeContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IValue_typeContext)
		}
	}

	return tst
}

func (s *Func_result_bodyContext) Value_type(i int) IValue_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IValue_typeContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IValue_typeContext)
}

func (s *Func_result_bodyContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Func_result_bodyContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Func_result_bodyContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterFunc_result_body(s)
	}
}

func (s *Func_result_bodyContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitFunc_result_body(s)
	}
}

func (p *WatParser) Func_result_body() (localctx IFunc_result_bodyContext) {
	this := p
	_ = this

	localctx = NewFunc_result_bodyContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 72, WatParserRULE_func_result_body)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	var _alt int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(563)
	p.GetErrorHandler().Sync(p)
	_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 60, p.GetParserRuleContext())

	for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
		if _alt == 1 {
			{
				p.SetState(552)
				p.Match(WatParserLPAR)
			}
			{
				p.SetState(553)
				p.Match(WatParserRESULT)
			}
			p.SetState(557)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)

			for _la == WatParserVALUE_TYPE {
				{
					p.SetState(554)
					p.Value_type()
				}

				p.SetState(559)
				p.GetErrorHandler().Sync(p)
				_la = p.GetTokenStream().LA(1)
			}
			{
				p.SetState(560)
				p.Match(WatParserRPAR)
			}

		}
		p.SetState(565)
		p.GetErrorHandler().Sync(p)
		_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 60, p.GetParserRuleContext())
	}
	{
		p.SetState(566)
		p.Func_body()
	}

	return localctx
}

// IFunc_bodyContext is an interface to support dynamic dispatch.
type IFunc_bodyContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsFunc_bodyContext differentiates from other interfaces.
	IsFunc_bodyContext()
}

type Func_bodyContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyFunc_bodyContext() *Func_bodyContext {
	var p = new(Func_bodyContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_func_body
	return p
}

func (*Func_bodyContext) IsFunc_bodyContext() {}

func NewFunc_bodyContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Func_bodyContext {
	var p = new(Func_bodyContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_func_body

	return p
}

func (s *Func_bodyContext) GetParser() antlr.Parser { return s.parser }

func (s *Func_bodyContext) Instr_list() IInstr_listContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IInstr_listContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IInstr_listContext)
}

func (s *Func_bodyContext) AllLPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserLPAR)
}

func (s *Func_bodyContext) LPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, i)
}

func (s *Func_bodyContext) AllLOCAL() []antlr.TerminalNode {
	return s.GetTokens(WatParserLOCAL)
}

func (s *Func_bodyContext) LOCAL(i int) antlr.TerminalNode {
	return s.GetToken(WatParserLOCAL, i)
}

func (s *Func_bodyContext) AllRPAR() []antlr.TerminalNode {
	return s.GetTokens(WatParserRPAR)
}

func (s *Func_bodyContext) RPAR(i int) antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, i)
}

func (s *Func_bodyContext) AllBind_var() []IBind_varContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IBind_varContext)(nil)).Elem())
	var tst = make([]IBind_varContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IBind_varContext)
		}
	}

	return tst
}

func (s *Func_bodyContext) Bind_var(i int) IBind_varContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IBind_varContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IBind_varContext)
}

func (s *Func_bodyContext) AllValue_type() []IValue_typeContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IValue_typeContext)(nil)).Elem())
	var tst = make([]IValue_typeContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IValue_typeContext)
		}
	}

	return tst
}

func (s *Func_bodyContext) Value_type(i int) IValue_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IValue_typeContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IValue_typeContext)
}

func (s *Func_bodyContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Func_bodyContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Func_bodyContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterFunc_body(s)
	}
}

func (s *Func_bodyContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitFunc_body(s)
	}
}

func (p *WatParser) Func_body() (localctx IFunc_bodyContext) {
	this := p
	_ = this

	localctx = NewFunc_bodyContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 74, WatParserRULE_func_body)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	var _alt int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(585)
	p.GetErrorHandler().Sync(p)
	_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 63, p.GetParserRuleContext())

	for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
		if _alt == 1 {
			p.SetState(583)
			p.GetErrorHandler().Sync(p)
			switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 62, p.GetParserRuleContext()) {
			case 1:
				{
					p.SetState(568)
					p.Match(WatParserLPAR)
				}
				{
					p.SetState(569)
					p.Match(WatParserLOCAL)
				}
				p.SetState(573)
				p.GetErrorHandler().Sync(p)
				_la = p.GetTokenStream().LA(1)

				for _la == WatParserVALUE_TYPE {
					{
						p.SetState(570)
						p.Value_type()
					}

					p.SetState(575)
					p.GetErrorHandler().Sync(p)
					_la = p.GetTokenStream().LA(1)
				}
				{
					p.SetState(576)
					p.Match(WatParserRPAR)
				}

			case 2:
				{
					p.SetState(577)
					p.Match(WatParserLPAR)
				}
				{
					p.SetState(578)
					p.Match(WatParserLOCAL)
				}
				{
					p.SetState(579)
					p.Bind_var()
				}
				{
					p.SetState(580)
					p.Value_type()
				}
				{
					p.SetState(581)
					p.Match(WatParserRPAR)
				}

			}

		}
		p.SetState(587)
		p.GetErrorHandler().Sync(p)
		_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 63, p.GetParserRuleContext())
	}
	{
		p.SetState(588)
		p.Instr_list()
	}

	return localctx
}

// IOffsetContext is an interface to support dynamic dispatch.
type IOffsetContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsOffsetContext differentiates from other interfaces.
	IsOffsetContext()
}

type OffsetContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyOffsetContext() *OffsetContext {
	var p = new(OffsetContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_offset
	return p
}

func (*OffsetContext) IsOffsetContext() {}

func NewOffsetContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *OffsetContext {
	var p = new(OffsetContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_offset

	return p
}

func (s *OffsetContext) GetParser() antlr.Parser { return s.parser }

func (s *OffsetContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *OffsetContext) OFFSET() antlr.TerminalNode {
	return s.GetToken(WatParserOFFSET, 0)
}

func (s *OffsetContext) Const_expr() IConst_exprContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IConst_exprContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IConst_exprContext)
}

func (s *OffsetContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *OffsetContext) Expr() IExprContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IExprContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *OffsetContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *OffsetContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *OffsetContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterOffset(s)
	}
}

func (s *OffsetContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitOffset(s)
	}
}

func (p *WatParser) Offset() (localctx IOffsetContext) {
	this := p
	_ = this

	localctx = NewOffsetContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 76, WatParserRULE_offset)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(596)
	p.GetErrorHandler().Sync(p)
	switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 64, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(590)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(591)
			p.Match(WatParserOFFSET)
		}
		{
			p.SetState(592)
			p.Const_expr()
		}
		{
			p.SetState(593)
			p.Match(WatParserRPAR)
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(595)
			p.Expr()
		}

	}

	return localctx
}

// IElemContext is an interface to support dynamic dispatch.
type IElemContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsElemContext differentiates from other interfaces.
	IsElemContext()
}

type ElemContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyElemContext() *ElemContext {
	var p = new(ElemContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_elem
	return p
}

func (*ElemContext) IsElemContext() {}

func NewElemContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ElemContext {
	var p = new(ElemContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_elem

	return p
}

func (s *ElemContext) GetParser() antlr.Parser { return s.parser }

func (s *ElemContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *ElemContext) ELEM() antlr.TerminalNode {
	return s.GetToken(WatParserELEM, 0)
}

func (s *ElemContext) Offset() IOffsetContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IOffsetContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IOffsetContext)
}

func (s *ElemContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *ElemContext) AllVar_() []IVar_Context {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IVar_Context)(nil)).Elem())
	var tst = make([]IVar_Context, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IVar_Context)
		}
	}

	return tst
}

func (s *ElemContext) Var_(i int) IVar_Context {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IVar_Context)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IVar_Context)
}

func (s *ElemContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *ElemContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *ElemContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterElem(s)
	}
}

func (s *ElemContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitElem(s)
	}
}

func (p *WatParser) Elem() (localctx IElemContext) {
	this := p
	_ = this

	localctx = NewElemContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 78, WatParserRULE_elem)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(598)
		p.Match(WatParserLPAR)
	}
	{
		p.SetState(599)
		p.Match(WatParserELEM)
	}
	p.SetState(601)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	if _la == WatParserNAT || _la == WatParserVAR {
		{
			p.SetState(600)
			p.Var_()
		}

	}
	{
		p.SetState(603)
		p.Offset()
	}
	p.SetState(607)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	for _la == WatParserNAT || _la == WatParserVAR {
		{
			p.SetState(604)
			p.Var_()
		}

		p.SetState(609)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)
	}
	{
		p.SetState(610)
		p.Match(WatParserRPAR)
	}

	return localctx
}

// ITableContext is an interface to support dynamic dispatch.
type ITableContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsTableContext differentiates from other interfaces.
	IsTableContext()
}

type TableContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyTableContext() *TableContext {
	var p = new(TableContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_table
	return p
}

func (*TableContext) IsTableContext() {}

func NewTableContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TableContext {
	var p = new(TableContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_table

	return p
}

func (s *TableContext) GetParser() antlr.Parser { return s.parser }

func (s *TableContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *TableContext) TABLE() antlr.TerminalNode {
	return s.GetToken(WatParserTABLE, 0)
}

func (s *TableContext) Table_fields() ITable_fieldsContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ITable_fieldsContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(ITable_fieldsContext)
}

func (s *TableContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *TableContext) Bind_var() IBind_varContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IBind_varContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IBind_varContext)
}

func (s *TableContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *TableContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *TableContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterTable(s)
	}
}

func (s *TableContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitTable(s)
	}
}

func (p *WatParser) Table() (localctx ITableContext) {
	this := p
	_ = this

	localctx = NewTableContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 80, WatParserRULE_table)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(612)
		p.Match(WatParserLPAR)
	}
	{
		p.SetState(613)
		p.Match(WatParserTABLE)
	}
	p.SetState(615)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	if _la == WatParserVAR {
		{
			p.SetState(614)
			p.Bind_var()
		}

	}
	{
		p.SetState(617)
		p.Table_fields()
	}
	{
		p.SetState(618)
		p.Match(WatParserRPAR)
	}

	return localctx
}

// ITable_fieldsContext is an interface to support dynamic dispatch.
type ITable_fieldsContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsTable_fieldsContext differentiates from other interfaces.
	IsTable_fieldsContext()
}

type Table_fieldsContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyTable_fieldsContext() *Table_fieldsContext {
	var p = new(Table_fieldsContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_table_fields
	return p
}

func (*Table_fieldsContext) IsTable_fieldsContext() {}

func NewTable_fieldsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_fieldsContext {
	var p = new(Table_fieldsContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_table_fields

	return p
}

func (s *Table_fieldsContext) GetParser() antlr.Parser { return s.parser }

func (s *Table_fieldsContext) Table_type() ITable_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ITable_typeContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(ITable_typeContext)
}

func (s *Table_fieldsContext) Inline_import() IInline_importContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IInline_importContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IInline_importContext)
}

func (s *Table_fieldsContext) Inline_export() IInline_exportContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IInline_exportContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IInline_exportContext)
}

func (s *Table_fieldsContext) Table_fields() ITable_fieldsContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ITable_fieldsContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(ITable_fieldsContext)
}

func (s *Table_fieldsContext) Elem_type() IElem_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IElem_typeContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IElem_typeContext)
}

func (s *Table_fieldsContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *Table_fieldsContext) ELEM() antlr.TerminalNode {
	return s.GetToken(WatParserELEM, 0)
}

func (s *Table_fieldsContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *Table_fieldsContext) AllVar_() []IVar_Context {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IVar_Context)(nil)).Elem())
	var tst = make([]IVar_Context, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IVar_Context)
		}
	}

	return tst
}

func (s *Table_fieldsContext) Var_(i int) IVar_Context {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IVar_Context)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IVar_Context)
}

func (s *Table_fieldsContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Table_fieldsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Table_fieldsContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterTable_fields(s)
	}
}

func (s *Table_fieldsContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitTable_fields(s)
	}
}

func (p *WatParser) Table_fields() (localctx ITable_fieldsContext) {
	this := p
	_ = this

	localctx = NewTable_fieldsContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 82, WatParserRULE_table_fields)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(638)
	p.GetErrorHandler().Sync(p)
	switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 69, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(620)
			p.Table_type()
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(621)
			p.Inline_import()
		}
		{
			p.SetState(622)
			p.Table_type()
		}

	case 3:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(624)
			p.Inline_export()
		}
		{
			p.SetState(625)
			p.Table_fields()
		}

	case 4:
		p.EnterOuterAlt(localctx, 4)
		{
			p.SetState(627)
			p.Elem_type()
		}
		{
			p.SetState(628)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(629)
			p.Match(WatParserELEM)
		}
		p.SetState(633)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		for _la == WatParserNAT || _la == WatParserVAR {
			{
				p.SetState(630)
				p.Var_()
			}

			p.SetState(635)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(636)
			p.Match(WatParserRPAR)
		}

	}

	return localctx
}

// IDataContext is an interface to support dynamic dispatch.
type IDataContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsDataContext differentiates from other interfaces.
	IsDataContext()
}

type DataContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyDataContext() *DataContext {
	var p = new(DataContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_data
	return p
}

func (*DataContext) IsDataContext() {}

func NewDataContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *DataContext {
	var p = new(DataContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_data

	return p
}

func (s *DataContext) GetParser() antlr.Parser { return s.parser }

func (s *DataContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *DataContext) DATA() antlr.TerminalNode {
	return s.GetToken(WatParserDATA, 0)
}

func (s *DataContext) Offset() IOffsetContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IOffsetContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IOffsetContext)
}

func (s *DataContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *DataContext) Var_() IVar_Context {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IVar_Context)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IVar_Context)
}

func (s *DataContext) AllSTRING_() []antlr.TerminalNode {
	return s.GetTokens(WatParserSTRING_)
}

func (s *DataContext) STRING_(i int) antlr.TerminalNode {
	return s.GetToken(WatParserSTRING_, i)
}

func (s *DataContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *DataContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *DataContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterData(s)
	}
}

func (s *DataContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitData(s)
	}
}

func (p *WatParser) Data() (localctx IDataContext) {
	this := p
	_ = this

	localctx = NewDataContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 84, WatParserRULE_data)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(640)
		p.Match(WatParserLPAR)
	}
	{
		p.SetState(641)
		p.Match(WatParserDATA)
	}
	p.SetState(643)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	if _la == WatParserNAT || _la == WatParserVAR {
		{
			p.SetState(642)
			p.Var_()
		}

	}
	{
		p.SetState(645)
		p.Offset()
	}
	p.SetState(649)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	for _la == WatParserSTRING_ {
		{
			p.SetState(646)
			p.Match(WatParserSTRING_)
		}

		p.SetState(651)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)
	}
	{
		p.SetState(652)
		p.Match(WatParserRPAR)
	}

	return localctx
}

// IMemoryContext is an interface to support dynamic dispatch.
type IMemoryContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsMemoryContext differentiates from other interfaces.
	IsMemoryContext()
}

type MemoryContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyMemoryContext() *MemoryContext {
	var p = new(MemoryContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_memory
	return p
}

func (*MemoryContext) IsMemoryContext() {}

func NewMemoryContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MemoryContext {
	var p = new(MemoryContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_memory

	return p
}

func (s *MemoryContext) GetParser() antlr.Parser { return s.parser }

func (s *MemoryContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *MemoryContext) MEMORY() antlr.TerminalNode {
	return s.GetToken(WatParserMEMORY, 0)
}

func (s *MemoryContext) Memory_fields() IMemory_fieldsContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IMemory_fieldsContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IMemory_fieldsContext)
}

func (s *MemoryContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *MemoryContext) Bind_var() IBind_varContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IBind_varContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IBind_varContext)
}

func (s *MemoryContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *MemoryContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *MemoryContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterMemory(s)
	}
}

func (s *MemoryContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitMemory(s)
	}
}

func (p *WatParser) Memory() (localctx IMemoryContext) {
	this := p
	_ = this

	localctx = NewMemoryContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 86, WatParserRULE_memory)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(654)
		p.Match(WatParserLPAR)
	}
	{
		p.SetState(655)
		p.Match(WatParserMEMORY)
	}
	p.SetState(657)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	if _la == WatParserVAR {
		{
			p.SetState(656)
			p.Bind_var()
		}

	}
	{
		p.SetState(659)
		p.Memory_fields()
	}
	{
		p.SetState(660)
		p.Match(WatParserRPAR)
	}

	return localctx
}

// IMemory_fieldsContext is an interface to support dynamic dispatch.
type IMemory_fieldsContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsMemory_fieldsContext differentiates from other interfaces.
	IsMemory_fieldsContext()
}

type Memory_fieldsContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyMemory_fieldsContext() *Memory_fieldsContext {
	var p = new(Memory_fieldsContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_memory_fields
	return p
}

func (*Memory_fieldsContext) IsMemory_fieldsContext() {}

func NewMemory_fieldsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Memory_fieldsContext {
	var p = new(Memory_fieldsContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_memory_fields

	return p
}

func (s *Memory_fieldsContext) GetParser() antlr.Parser { return s.parser }

func (s *Memory_fieldsContext) Memory_type() IMemory_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IMemory_typeContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IMemory_typeContext)
}

func (s *Memory_fieldsContext) Inline_import() IInline_importContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IInline_importContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IInline_importContext)
}

func (s *Memory_fieldsContext) Inline_export() IInline_exportContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IInline_exportContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IInline_exportContext)
}

func (s *Memory_fieldsContext) Memory_fields() IMemory_fieldsContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IMemory_fieldsContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IMemory_fieldsContext)
}

func (s *Memory_fieldsContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *Memory_fieldsContext) DATA() antlr.TerminalNode {
	return s.GetToken(WatParserDATA, 0)
}

func (s *Memory_fieldsContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *Memory_fieldsContext) AllSTRING_() []antlr.TerminalNode {
	return s.GetTokens(WatParserSTRING_)
}

func (s *Memory_fieldsContext) STRING_(i int) antlr.TerminalNode {
	return s.GetToken(WatParserSTRING_, i)
}

func (s *Memory_fieldsContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Memory_fieldsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Memory_fieldsContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterMemory_fields(s)
	}
}

func (s *Memory_fieldsContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitMemory_fields(s)
	}
}

func (p *WatParser) Memory_fields() (localctx IMemory_fieldsContext) {
	this := p
	_ = this

	localctx = NewMemory_fieldsContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 88, WatParserRULE_memory_fields)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(678)
	p.GetErrorHandler().Sync(p)
	switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 74, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(662)
			p.Memory_type()
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(663)
			p.Inline_import()
		}
		{
			p.SetState(664)
			p.Memory_type()
		}

	case 3:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(666)
			p.Inline_export()
		}
		{
			p.SetState(667)
			p.Memory_fields()
		}

	case 4:
		p.EnterOuterAlt(localctx, 4)
		{
			p.SetState(669)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(670)
			p.Match(WatParserDATA)
		}
		p.SetState(674)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		for _la == WatParserSTRING_ {
			{
				p.SetState(671)
				p.Match(WatParserSTRING_)
			}

			p.SetState(676)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(677)
			p.Match(WatParserRPAR)
		}

	}

	return localctx
}

// ISglobalContext is an interface to support dynamic dispatch.
type ISglobalContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsSglobalContext differentiates from other interfaces.
	IsSglobalContext()
}

type SglobalContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptySglobalContext() *SglobalContext {
	var p = new(SglobalContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_sglobal
	return p
}

func (*SglobalContext) IsSglobalContext() {}

func NewSglobalContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SglobalContext {
	var p = new(SglobalContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_sglobal

	return p
}

func (s *SglobalContext) GetParser() antlr.Parser { return s.parser }

func (s *SglobalContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *SglobalContext) GLOBAL() antlr.TerminalNode {
	return s.GetToken(WatParserGLOBAL, 0)
}

func (s *SglobalContext) Global_fields() IGlobal_fieldsContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IGlobal_fieldsContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IGlobal_fieldsContext)
}

func (s *SglobalContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *SglobalContext) Bind_var() IBind_varContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IBind_varContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IBind_varContext)
}

func (s *SglobalContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *SglobalContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *SglobalContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterSglobal(s)
	}
}

func (s *SglobalContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitSglobal(s)
	}
}

func (p *WatParser) Sglobal() (localctx ISglobalContext) {
	this := p
	_ = this

	localctx = NewSglobalContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 90, WatParserRULE_sglobal)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(680)
		p.Match(WatParserLPAR)
	}
	{
		p.SetState(681)
		p.Match(WatParserGLOBAL)
	}
	p.SetState(683)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	if _la == WatParserVAR {
		{
			p.SetState(682)
			p.Bind_var()
		}

	}
	{
		p.SetState(685)
		p.Global_fields()
	}
	{
		p.SetState(686)
		p.Match(WatParserRPAR)
	}

	return localctx
}

// IGlobal_fieldsContext is an interface to support dynamic dispatch.
type IGlobal_fieldsContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsGlobal_fieldsContext differentiates from other interfaces.
	IsGlobal_fieldsContext()
}

type Global_fieldsContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyGlobal_fieldsContext() *Global_fieldsContext {
	var p = new(Global_fieldsContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_global_fields
	return p
}

func (*Global_fieldsContext) IsGlobal_fieldsContext() {}

func NewGlobal_fieldsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Global_fieldsContext {
	var p = new(Global_fieldsContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_global_fields

	return p
}

func (s *Global_fieldsContext) GetParser() antlr.Parser { return s.parser }

func (s *Global_fieldsContext) Global_type() IGlobal_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IGlobal_typeContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IGlobal_typeContext)
}

func (s *Global_fieldsContext) Const_expr() IConst_exprContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IConst_exprContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IConst_exprContext)
}

func (s *Global_fieldsContext) Inline_import() IInline_importContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IInline_importContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IInline_importContext)
}

func (s *Global_fieldsContext) Inline_export() IInline_exportContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IInline_exportContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IInline_exportContext)
}

func (s *Global_fieldsContext) Global_fields() IGlobal_fieldsContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IGlobal_fieldsContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IGlobal_fieldsContext)
}

func (s *Global_fieldsContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Global_fieldsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Global_fieldsContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterGlobal_fields(s)
	}
}

func (s *Global_fieldsContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitGlobal_fields(s)
	}
}

func (p *WatParser) Global_fields() (localctx IGlobal_fieldsContext) {
	this := p
	_ = this

	localctx = NewGlobal_fieldsContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 92, WatParserRULE_global_fields)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(697)
	p.GetErrorHandler().Sync(p)
	switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 76, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(688)
			p.Global_type()
		}
		{
			p.SetState(689)
			p.Const_expr()
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(691)
			p.Inline_import()
		}
		{
			p.SetState(692)
			p.Global_type()
		}

	case 3:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(694)
			p.Inline_export()
		}
		{
			p.SetState(695)
			p.Global_fields()
		}

	}

	return localctx
}

// IImport_descContext is an interface to support dynamic dispatch.
type IImport_descContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsImport_descContext differentiates from other interfaces.
	IsImport_descContext()
}

type Import_descContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyImport_descContext() *Import_descContext {
	var p = new(Import_descContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_import_desc
	return p
}

func (*Import_descContext) IsImport_descContext() {}

func NewImport_descContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Import_descContext {
	var p = new(Import_descContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_import_desc

	return p
}

func (s *Import_descContext) GetParser() antlr.Parser { return s.parser }

func (s *Import_descContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *Import_descContext) FUNC() antlr.TerminalNode {
	return s.GetToken(WatParserFUNC, 0)
}

func (s *Import_descContext) Type_use() IType_useContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IType_useContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IType_useContext)
}

func (s *Import_descContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *Import_descContext) Bind_var() IBind_varContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IBind_varContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IBind_varContext)
}

func (s *Import_descContext) Func_type() IFunc_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunc_typeContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IFunc_typeContext)
}

func (s *Import_descContext) TABLE() antlr.TerminalNode {
	return s.GetToken(WatParserTABLE, 0)
}

func (s *Import_descContext) Table_type() ITable_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ITable_typeContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(ITable_typeContext)
}

func (s *Import_descContext) MEMORY() antlr.TerminalNode {
	return s.GetToken(WatParserMEMORY, 0)
}

func (s *Import_descContext) Memory_type() IMemory_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IMemory_typeContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IMemory_typeContext)
}

func (s *Import_descContext) GLOBAL() antlr.TerminalNode {
	return s.GetToken(WatParserGLOBAL, 0)
}

func (s *Import_descContext) Global_type() IGlobal_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IGlobal_typeContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IGlobal_typeContext)
}

func (s *Import_descContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Import_descContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Import_descContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterImport_desc(s)
	}
}

func (s *Import_descContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitImport_desc(s)
	}
}

func (p *WatParser) Import_desc() (localctx IImport_descContext) {
	this := p
	_ = this

	localctx = NewImport_descContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 94, WatParserRULE_import_desc)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(739)
	p.GetErrorHandler().Sync(p)
	switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 82, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(699)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(700)
			p.Match(WatParserFUNC)
		}
		p.SetState(702)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(701)
				p.Bind_var()
			}

		}
		{
			p.SetState(704)
			p.Type_use()
		}
		{
			p.SetState(705)
			p.Match(WatParserRPAR)
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(707)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(708)
			p.Match(WatParserFUNC)
		}
		p.SetState(710)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(709)
				p.Bind_var()
			}

		}
		{
			p.SetState(712)
			p.Func_type()
		}
		{
			p.SetState(713)
			p.Match(WatParserRPAR)
		}

	case 3:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(715)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(716)
			p.Match(WatParserTABLE)
		}
		p.SetState(718)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(717)
				p.Bind_var()
			}

		}
		{
			p.SetState(720)
			p.Table_type()
		}
		{
			p.SetState(721)
			p.Match(WatParserRPAR)
		}

	case 4:
		p.EnterOuterAlt(localctx, 4)
		{
			p.SetState(723)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(724)
			p.Match(WatParserMEMORY)
		}
		p.SetState(726)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(725)
				p.Bind_var()
			}

		}
		{
			p.SetState(728)
			p.Memory_type()
		}
		{
			p.SetState(729)
			p.Match(WatParserRPAR)
		}

	case 5:
		p.EnterOuterAlt(localctx, 5)
		{
			p.SetState(731)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(732)
			p.Match(WatParserGLOBAL)
		}
		p.SetState(734)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(733)
				p.Bind_var()
			}

		}
		{
			p.SetState(736)
			p.Global_type()
		}
		{
			p.SetState(737)
			p.Match(WatParserRPAR)
		}

	}

	return localctx
}

// ISimportContext is an interface to support dynamic dispatch.
type ISimportContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsSimportContext differentiates from other interfaces.
	IsSimportContext()
}

type SimportContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptySimportContext() *SimportContext {
	var p = new(SimportContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_simport
	return p
}

func (*SimportContext) IsSimportContext() {}

func NewSimportContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SimportContext {
	var p = new(SimportContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_simport

	return p
}

func (s *SimportContext) GetParser() antlr.Parser { return s.parser }

func (s *SimportContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *SimportContext) IMPORT() antlr.TerminalNode {
	return s.GetToken(WatParserIMPORT, 0)
}

func (s *SimportContext) AllName() []INameContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*INameContext)(nil)).Elem())
	var tst = make([]INameContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(INameContext)
		}
	}

	return tst
}

func (s *SimportContext) Name(i int) INameContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*INameContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(INameContext)
}

func (s *SimportContext) Import_desc() IImport_descContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IImport_descContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IImport_descContext)
}

func (s *SimportContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *SimportContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *SimportContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *SimportContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterSimport(s)
	}
}

func (s *SimportContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitSimport(s)
	}
}

func (p *WatParser) Simport() (localctx ISimportContext) {
	this := p
	_ = this

	localctx = NewSimportContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 96, WatParserRULE_simport)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(741)
		p.Match(WatParserLPAR)
	}
	{
		p.SetState(742)
		p.Match(WatParserIMPORT)
	}
	{
		p.SetState(743)
		p.Name()
	}
	{
		p.SetState(744)
		p.Name()
	}
	{
		p.SetState(745)
		p.Import_desc()
	}
	{
		p.SetState(746)
		p.Match(WatParserRPAR)
	}

	return localctx
}

// IInline_importContext is an interface to support dynamic dispatch.
type IInline_importContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsInline_importContext differentiates from other interfaces.
	IsInline_importContext()
}

type Inline_importContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyInline_importContext() *Inline_importContext {
	var p = new(Inline_importContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_inline_import
	return p
}

func (*Inline_importContext) IsInline_importContext() {}

func NewInline_importContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Inline_importContext {
	var p = new(Inline_importContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_inline_import

	return p
}

func (s *Inline_importContext) GetParser() antlr.Parser { return s.parser }

func (s *Inline_importContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *Inline_importContext) IMPORT() antlr.TerminalNode {
	return s.GetToken(WatParserIMPORT, 0)
}

func (s *Inline_importContext) AllName() []INameContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*INameContext)(nil)).Elem())
	var tst = make([]INameContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(INameContext)
		}
	}

	return tst
}

func (s *Inline_importContext) Name(i int) INameContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*INameContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(INameContext)
}

func (s *Inline_importContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *Inline_importContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Inline_importContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Inline_importContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterInline_import(s)
	}
}

func (s *Inline_importContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitInline_import(s)
	}
}

func (p *WatParser) Inline_import() (localctx IInline_importContext) {
	this := p
	_ = this

	localctx = NewInline_importContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 98, WatParserRULE_inline_import)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(748)
		p.Match(WatParserLPAR)
	}
	{
		p.SetState(749)
		p.Match(WatParserIMPORT)
	}
	{
		p.SetState(750)
		p.Name()
	}
	{
		p.SetState(751)
		p.Name()
	}
	{
		p.SetState(752)
		p.Match(WatParserRPAR)
	}

	return localctx
}

// IExport_descContext is an interface to support dynamic dispatch.
type IExport_descContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsExport_descContext differentiates from other interfaces.
	IsExport_descContext()
}

type Export_descContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyExport_descContext() *Export_descContext {
	var p = new(Export_descContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_export_desc
	return p
}

func (*Export_descContext) IsExport_descContext() {}

func NewExport_descContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Export_descContext {
	var p = new(Export_descContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_export_desc

	return p
}

func (s *Export_descContext) GetParser() antlr.Parser { return s.parser }

func (s *Export_descContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *Export_descContext) FUNC() antlr.TerminalNode {
	return s.GetToken(WatParserFUNC, 0)
}

func (s *Export_descContext) Var_() IVar_Context {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IVar_Context)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IVar_Context)
}

func (s *Export_descContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *Export_descContext) TABLE() antlr.TerminalNode {
	return s.GetToken(WatParserTABLE, 0)
}

func (s *Export_descContext) MEMORY() antlr.TerminalNode {
	return s.GetToken(WatParserMEMORY, 0)
}

func (s *Export_descContext) GLOBAL() antlr.TerminalNode {
	return s.GetToken(WatParserGLOBAL, 0)
}

func (s *Export_descContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Export_descContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Export_descContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterExport_desc(s)
	}
}

func (s *Export_descContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitExport_desc(s)
	}
}

func (p *WatParser) Export_desc() (localctx IExport_descContext) {
	this := p
	_ = this

	localctx = NewExport_descContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 100, WatParserRULE_export_desc)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(774)
	p.GetErrorHandler().Sync(p)
	switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 83, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(754)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(755)
			p.Match(WatParserFUNC)
		}
		{
			p.SetState(756)
			p.Var_()
		}
		{
			p.SetState(757)
			p.Match(WatParserRPAR)
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(759)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(760)
			p.Match(WatParserTABLE)
		}
		{
			p.SetState(761)
			p.Var_()
		}
		{
			p.SetState(762)
			p.Match(WatParserRPAR)
		}

	case 3:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(764)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(765)
			p.Match(WatParserMEMORY)
		}
		{
			p.SetState(766)
			p.Var_()
		}
		{
			p.SetState(767)
			p.Match(WatParserRPAR)
		}

	case 4:
		p.EnterOuterAlt(localctx, 4)
		{
			p.SetState(769)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(770)
			p.Match(WatParserGLOBAL)
		}
		{
			p.SetState(771)
			p.Var_()
		}
		{
			p.SetState(772)
			p.Match(WatParserRPAR)
		}

	}

	return localctx
}

// IExport_Context is an interface to support dynamic dispatch.
type IExport_Context interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsExport_Context differentiates from other interfaces.
	IsExport_Context()
}

type Export_Context struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyExport_Context() *Export_Context {
	var p = new(Export_Context)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_export_
	return p
}

func (*Export_Context) IsExport_Context() {}

func NewExport_Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Export_Context {
	var p = new(Export_Context)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_export_

	return p
}

func (s *Export_Context) GetParser() antlr.Parser { return s.parser }

func (s *Export_Context) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *Export_Context) EXPORT() antlr.TerminalNode {
	return s.GetToken(WatParserEXPORT, 0)
}

func (s *Export_Context) Name() INameContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*INameContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(INameContext)
}

func (s *Export_Context) Export_desc() IExport_descContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IExport_descContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IExport_descContext)
}

func (s *Export_Context) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *Export_Context) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Export_Context) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Export_Context) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterExport_(s)
	}
}

func (s *Export_Context) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitExport_(s)
	}
}

func (p *WatParser) Export_() (localctx IExport_Context) {
	this := p
	_ = this

	localctx = NewExport_Context(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 102, WatParserRULE_export_)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(776)
		p.Match(WatParserLPAR)
	}
	{
		p.SetState(777)
		p.Match(WatParserEXPORT)
	}
	{
		p.SetState(778)
		p.Name()
	}
	{
		p.SetState(779)
		p.Export_desc()
	}
	{
		p.SetState(780)
		p.Match(WatParserRPAR)
	}

	return localctx
}

// IInline_exportContext is an interface to support dynamic dispatch.
type IInline_exportContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsInline_exportContext differentiates from other interfaces.
	IsInline_exportContext()
}

type Inline_exportContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyInline_exportContext() *Inline_exportContext {
	var p = new(Inline_exportContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_inline_export
	return p
}

func (*Inline_exportContext) IsInline_exportContext() {}

func NewInline_exportContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Inline_exportContext {
	var p = new(Inline_exportContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_inline_export

	return p
}

func (s *Inline_exportContext) GetParser() antlr.Parser { return s.parser }

func (s *Inline_exportContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *Inline_exportContext) EXPORT() antlr.TerminalNode {
	return s.GetToken(WatParserEXPORT, 0)
}

func (s *Inline_exportContext) Name() INameContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*INameContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(INameContext)
}

func (s *Inline_exportContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *Inline_exportContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Inline_exportContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Inline_exportContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterInline_export(s)
	}
}

func (s *Inline_exportContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitInline_export(s)
	}
}

func (p *WatParser) Inline_export() (localctx IInline_exportContext) {
	this := p
	_ = this

	localctx = NewInline_exportContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 104, WatParserRULE_inline_export)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(782)
		p.Match(WatParserLPAR)
	}
	{
		p.SetState(783)
		p.Match(WatParserEXPORT)
	}
	{
		p.SetState(784)
		p.Name()
	}
	{
		p.SetState(785)
		p.Match(WatParserRPAR)
	}

	return localctx
}

// IType_Context is an interface to support dynamic dispatch.
type IType_Context interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsType_Context differentiates from other interfaces.
	IsType_Context()
}

type Type_Context struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyType_Context() *Type_Context {
	var p = new(Type_Context)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_type_
	return p
}

func (*Type_Context) IsType_Context() {}

func NewType_Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Type_Context {
	var p = new(Type_Context)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_type_

	return p
}

func (s *Type_Context) GetParser() antlr.Parser { return s.parser }

func (s *Type_Context) Def_type() IDef_typeContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IDef_typeContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IDef_typeContext)
}

func (s *Type_Context) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Type_Context) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Type_Context) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterType_(s)
	}
}

func (s *Type_Context) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitType_(s)
	}
}

func (p *WatParser) Type_() (localctx IType_Context) {
	this := p
	_ = this

	localctx = NewType_Context(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 106, WatParserRULE_type_)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(787)
		p.Def_type()
	}

	return localctx
}

// IType_defContext is an interface to support dynamic dispatch.
type IType_defContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsType_defContext differentiates from other interfaces.
	IsType_defContext()
}

type Type_defContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyType_defContext() *Type_defContext {
	var p = new(Type_defContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_type_def
	return p
}

func (*Type_defContext) IsType_defContext() {}

func NewType_defContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Type_defContext {
	var p = new(Type_defContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_type_def

	return p
}

func (s *Type_defContext) GetParser() antlr.Parser { return s.parser }

func (s *Type_defContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *Type_defContext) TYPE() antlr.TerminalNode {
	return s.GetToken(WatParserTYPE, 0)
}

func (s *Type_defContext) Type_() IType_Context {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IType_Context)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IType_Context)
}

func (s *Type_defContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *Type_defContext) Bind_var() IBind_varContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IBind_varContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IBind_varContext)
}

func (s *Type_defContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Type_defContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Type_defContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterType_def(s)
	}
}

func (s *Type_defContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitType_def(s)
	}
}

func (p *WatParser) Type_def() (localctx IType_defContext) {
	this := p
	_ = this

	localctx = NewType_defContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 108, WatParserRULE_type_def)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(789)
		p.Match(WatParserLPAR)
	}
	{
		p.SetState(790)
		p.Match(WatParserTYPE)
	}
	p.SetState(792)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	if _la == WatParserVAR {
		{
			p.SetState(791)
			p.Bind_var()
		}

	}
	{
		p.SetState(794)
		p.Type_()
	}
	{
		p.SetState(795)
		p.Match(WatParserRPAR)
	}

	return localctx
}

// IStart_Context is an interface to support dynamic dispatch.
type IStart_Context interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsStart_Context differentiates from other interfaces.
	IsStart_Context()
}

type Start_Context struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyStart_Context() *Start_Context {
	var p = new(Start_Context)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_start_
	return p
}

func (*Start_Context) IsStart_Context() {}

func NewStart_Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Start_Context {
	var p = new(Start_Context)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_start_

	return p
}

func (s *Start_Context) GetParser() antlr.Parser { return s.parser }

func (s *Start_Context) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *Start_Context) START_() antlr.TerminalNode {
	return s.GetToken(WatParserSTART_, 0)
}

func (s *Start_Context) Var_() IVar_Context {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IVar_Context)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IVar_Context)
}

func (s *Start_Context) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *Start_Context) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Start_Context) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Start_Context) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterStart_(s)
	}
}

func (s *Start_Context) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitStart_(s)
	}
}

func (p *WatParser) Start_() (localctx IStart_Context) {
	this := p
	_ = this

	localctx = NewStart_Context(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 110, WatParserRULE_start_)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(797)
		p.Match(WatParserLPAR)
	}
	{
		p.SetState(798)
		p.Match(WatParserSTART_)
	}
	{
		p.SetState(799)
		p.Var_()
	}
	{
		p.SetState(800)
		p.Match(WatParserRPAR)
	}

	return localctx
}

// IModule_fieldContext is an interface to support dynamic dispatch.
type IModule_fieldContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsModule_fieldContext differentiates from other interfaces.
	IsModule_fieldContext()
}

type Module_fieldContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyModule_fieldContext() *Module_fieldContext {
	var p = new(Module_fieldContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_module_field
	return p
}

func (*Module_fieldContext) IsModule_fieldContext() {}

func NewModule_fieldContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Module_fieldContext {
	var p = new(Module_fieldContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_module_field

	return p
}

func (s *Module_fieldContext) GetParser() antlr.Parser { return s.parser }

func (s *Module_fieldContext) Type_def() IType_defContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IType_defContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IType_defContext)
}

func (s *Module_fieldContext) Sglobal() ISglobalContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ISglobalContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(ISglobalContext)
}

func (s *Module_fieldContext) Table() ITableContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ITableContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(ITableContext)
}

func (s *Module_fieldContext) Memory() IMemoryContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IMemoryContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IMemoryContext)
}

func (s *Module_fieldContext) Func_() IFunc_Context {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunc_Context)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IFunc_Context)
}

func (s *Module_fieldContext) Elem() IElemContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IElemContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IElemContext)
}

func (s *Module_fieldContext) Data() IDataContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IDataContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IDataContext)
}

func (s *Module_fieldContext) Start_() IStart_Context {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IStart_Context)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IStart_Context)
}

func (s *Module_fieldContext) Simport() ISimportContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ISimportContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(ISimportContext)
}

func (s *Module_fieldContext) Export_() IExport_Context {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IExport_Context)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IExport_Context)
}

func (s *Module_fieldContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Module_fieldContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Module_fieldContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterModule_field(s)
	}
}

func (s *Module_fieldContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitModule_field(s)
	}
}

func (p *WatParser) Module_field() (localctx IModule_fieldContext) {
	this := p
	_ = this

	localctx = NewModule_fieldContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 112, WatParserRULE_module_field)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(812)
	p.GetErrorHandler().Sync(p)
	switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 85, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(802)
			p.Type_def()
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(803)
			p.Sglobal()
		}

	case 3:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(804)
			p.Table()
		}

	case 4:
		p.EnterOuterAlt(localctx, 4)
		{
			p.SetState(805)
			p.Memory()
		}

	case 5:
		p.EnterOuterAlt(localctx, 5)
		{
			p.SetState(806)
			p.Func_()
		}

	case 6:
		p.EnterOuterAlt(localctx, 6)
		{
			p.SetState(807)
			p.Elem()
		}

	case 7:
		p.EnterOuterAlt(localctx, 7)
		{
			p.SetState(808)
			p.Data()
		}

	case 8:
		p.EnterOuterAlt(localctx, 8)
		{
			p.SetState(809)
			p.Start_()
		}

	case 9:
		p.EnterOuterAlt(localctx, 9)
		{
			p.SetState(810)
			p.Simport()
		}

	case 10:
		p.EnterOuterAlt(localctx, 10)
		{
			p.SetState(811)
			p.Export_()
		}

	}

	return localctx
}

// IModule_Context is an interface to support dynamic dispatch.
type IModule_Context interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsModule_Context differentiates from other interfaces.
	IsModule_Context()
}

type Module_Context struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyModule_Context() *Module_Context {
	var p = new(Module_Context)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_module_
	return p
}

func (*Module_Context) IsModule_Context() {}

func NewModule_Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Module_Context {
	var p = new(Module_Context)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_module_

	return p
}

func (s *Module_Context) GetParser() antlr.Parser { return s.parser }

func (s *Module_Context) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *Module_Context) MODULE() antlr.TerminalNode {
	return s.GetToken(WatParserMODULE, 0)
}

func (s *Module_Context) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *Module_Context) VAR() antlr.TerminalNode {
	return s.GetToken(WatParserVAR, 0)
}

func (s *Module_Context) AllModule_field() []IModule_fieldContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IModule_fieldContext)(nil)).Elem())
	var tst = make([]IModule_fieldContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IModule_fieldContext)
		}
	}

	return tst
}

func (s *Module_Context) Module_field(i int) IModule_fieldContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IModule_fieldContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IModule_fieldContext)
}

func (s *Module_Context) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Module_Context) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Module_Context) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterModule_(s)
	}
}

func (s *Module_Context) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitModule_(s)
	}
}

func (p *WatParser) Module_() (localctx IModule_Context) {
	this := p
	_ = this

	localctx = NewModule_Context(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 114, WatParserRULE_module_)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(814)
		p.Match(WatParserLPAR)
	}
	{
		p.SetState(815)
		p.Match(WatParserMODULE)
	}
	p.SetState(817)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	if _la == WatParserVAR {
		{
			p.SetState(816)
			p.Match(WatParserVAR)
		}

	}
	p.SetState(822)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	for _la == WatParserLPAR {
		{
			p.SetState(819)
			p.Module_field()
		}

		p.SetState(824)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)
	}
	{
		p.SetState(825)
		p.Match(WatParserRPAR)
	}

	return localctx
}

// IScript_moduleContext is an interface to support dynamic dispatch.
type IScript_moduleContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsScript_moduleContext differentiates from other interfaces.
	IsScript_moduleContext()
}

type Script_moduleContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyScript_moduleContext() *Script_moduleContext {
	var p = new(Script_moduleContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_script_module
	return p
}

func (*Script_moduleContext) IsScript_moduleContext() {}

func NewScript_moduleContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Script_moduleContext {
	var p = new(Script_moduleContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_script_module

	return p
}

func (s *Script_moduleContext) GetParser() antlr.Parser { return s.parser }

func (s *Script_moduleContext) Module_() IModule_Context {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IModule_Context)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IModule_Context)
}

func (s *Script_moduleContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *Script_moduleContext) MODULE() antlr.TerminalNode {
	return s.GetToken(WatParserMODULE, 0)
}

func (s *Script_moduleContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *Script_moduleContext) BIN() antlr.TerminalNode {
	return s.GetToken(WatParserBIN, 0)
}

func (s *Script_moduleContext) QUOTE() antlr.TerminalNode {
	return s.GetToken(WatParserQUOTE, 0)
}

func (s *Script_moduleContext) VAR() antlr.TerminalNode {
	return s.GetToken(WatParserVAR, 0)
}

func (s *Script_moduleContext) AllSTRING_() []antlr.TerminalNode {
	return s.GetTokens(WatParserSTRING_)
}

func (s *Script_moduleContext) STRING_(i int) antlr.TerminalNode {
	return s.GetToken(WatParserSTRING_, i)
}

func (s *Script_moduleContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Script_moduleContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Script_moduleContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterScript_module(s)
	}
}

func (s *Script_moduleContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitScript_module(s)
	}
}

func (p *WatParser) Script_module() (localctx IScript_moduleContext) {
	this := p
	_ = this

	localctx = NewScript_moduleContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 116, WatParserRULE_script_module)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(841)
	p.GetErrorHandler().Sync(p)
	switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 90, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(827)
			p.Module_()
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(828)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(829)
			p.Match(WatParserMODULE)
		}
		p.SetState(831)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(830)
				p.Match(WatParserVAR)
			}

		}
		{
			p.SetState(833)
			_la = p.GetTokenStream().LA(1)

			if !(_la == WatParserBIN || _la == WatParserQUOTE) {
				p.GetErrorHandler().RecoverInline(p)
			} else {
				p.GetErrorHandler().ReportMatch(p)
				p.Consume()
			}
		}
		p.SetState(837)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		for _la == WatParserSTRING_ {
			{
				p.SetState(834)
				p.Match(WatParserSTRING_)
			}

			p.SetState(839)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(840)
			p.Match(WatParserRPAR)
		}

	}

	return localctx
}

// IAction_Context is an interface to support dynamic dispatch.
type IAction_Context interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsAction_Context differentiates from other interfaces.
	IsAction_Context()
}

type Action_Context struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyAction_Context() *Action_Context {
	var p = new(Action_Context)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_action_
	return p
}

func (*Action_Context) IsAction_Context() {}

func NewAction_Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Action_Context {
	var p = new(Action_Context)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_action_

	return p
}

func (s *Action_Context) GetParser() antlr.Parser { return s.parser }

func (s *Action_Context) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *Action_Context) INVOKE() antlr.TerminalNode {
	return s.GetToken(WatParserINVOKE, 0)
}

func (s *Action_Context) Name() INameContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*INameContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(INameContext)
}

func (s *Action_Context) Const_list() IConst_listContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IConst_listContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IConst_listContext)
}

func (s *Action_Context) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *Action_Context) VAR() antlr.TerminalNode {
	return s.GetToken(WatParserVAR, 0)
}

func (s *Action_Context) GET() antlr.TerminalNode {
	return s.GetToken(WatParserGET, 0)
}

func (s *Action_Context) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Action_Context) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Action_Context) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterAction_(s)
	}
}

func (s *Action_Context) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitAction_(s)
	}
}

func (p *WatParser) Action_() (localctx IAction_Context) {
	this := p
	_ = this

	localctx = NewAction_Context(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 118, WatParserRULE_action_)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(860)
	p.GetErrorHandler().Sync(p)
	switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 93, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(843)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(844)
			p.Match(WatParserINVOKE)
		}
		p.SetState(846)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(845)
				p.Match(WatParserVAR)
			}

		}
		{
			p.SetState(848)
			p.Name()
		}
		{
			p.SetState(849)
			p.Const_list()
		}
		{
			p.SetState(850)
			p.Match(WatParserRPAR)
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(852)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(853)
			p.Match(WatParserGET)
		}
		p.SetState(855)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(854)
				p.Match(WatParserVAR)
			}

		}
		{
			p.SetState(857)
			p.Name()
		}
		{
			p.SetState(858)
			p.Match(WatParserRPAR)
		}

	}

	return localctx
}

// IAssertionContext is an interface to support dynamic dispatch.
type IAssertionContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsAssertionContext differentiates from other interfaces.
	IsAssertionContext()
}

type AssertionContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyAssertionContext() *AssertionContext {
	var p = new(AssertionContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_assertion
	return p
}

func (*AssertionContext) IsAssertionContext() {}

func NewAssertionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AssertionContext {
	var p = new(AssertionContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_assertion

	return p
}

func (s *AssertionContext) GetParser() antlr.Parser { return s.parser }

func (s *AssertionContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *AssertionContext) ASSERT_MALFORMED() antlr.TerminalNode {
	return s.GetToken(WatParserASSERT_MALFORMED, 0)
}

func (s *AssertionContext) Script_module() IScript_moduleContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IScript_moduleContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IScript_moduleContext)
}

func (s *AssertionContext) STRING_() antlr.TerminalNode {
	return s.GetToken(WatParserSTRING_, 0)
}

func (s *AssertionContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *AssertionContext) ASSERT_INVALID() antlr.TerminalNode {
	return s.GetToken(WatParserASSERT_INVALID, 0)
}

func (s *AssertionContext) ASSERT_UNLINKABLE() antlr.TerminalNode {
	return s.GetToken(WatParserASSERT_UNLINKABLE, 0)
}

func (s *AssertionContext) ASSERT_TRAP() antlr.TerminalNode {
	return s.GetToken(WatParserASSERT_TRAP, 0)
}

func (s *AssertionContext) ASSERT_RETURN() antlr.TerminalNode {
	return s.GetToken(WatParserASSERT_RETURN, 0)
}

func (s *AssertionContext) Action_() IAction_Context {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IAction_Context)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IAction_Context)
}

func (s *AssertionContext) Const_list() IConst_listContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IConst_listContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IConst_listContext)
}

func (s *AssertionContext) ASSERT_RETURN_CANONICAL_NAN() antlr.TerminalNode {
	return s.GetToken(WatParserASSERT_RETURN_CANONICAL_NAN, 0)
}

func (s *AssertionContext) ASSERT_RETURN_ARITHMETIC_NAN() antlr.TerminalNode {
	return s.GetToken(WatParserASSERT_RETURN_ARITHMETIC_NAN, 0)
}

func (s *AssertionContext) ASSERT_EXHAUSTION() antlr.TerminalNode {
	return s.GetToken(WatParserASSERT_EXHAUSTION, 0)
}

func (s *AssertionContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *AssertionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *AssertionContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterAssertion(s)
	}
}

func (s *AssertionContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitAssertion(s)
	}
}

func (p *WatParser) Assertion() (localctx IAssertionContext) {
	this := p
	_ = this

	localctx = NewAssertionContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 120, WatParserRULE_assertion)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(914)
	p.GetErrorHandler().Sync(p)
	switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 94, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(862)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(863)
			p.Match(WatParserASSERT_MALFORMED)
		}
		{
			p.SetState(864)
			p.Script_module()
		}
		{
			p.SetState(865)
			p.Match(WatParserSTRING_)
		}
		{
			p.SetState(866)
			p.Match(WatParserRPAR)
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(868)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(869)
			p.Match(WatParserASSERT_INVALID)
		}
		{
			p.SetState(870)
			p.Script_module()
		}
		{
			p.SetState(871)
			p.Match(WatParserSTRING_)
		}
		{
			p.SetState(872)
			p.Match(WatParserRPAR)
		}

	case 3:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(874)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(875)
			p.Match(WatParserASSERT_UNLINKABLE)
		}
		{
			p.SetState(876)
			p.Script_module()
		}
		{
			p.SetState(877)
			p.Match(WatParserSTRING_)
		}
		{
			p.SetState(878)
			p.Match(WatParserRPAR)
		}

	case 4:
		p.EnterOuterAlt(localctx, 4)
		{
			p.SetState(880)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(881)
			p.Match(WatParserASSERT_TRAP)
		}
		{
			p.SetState(882)
			p.Script_module()
		}
		{
			p.SetState(883)
			p.Match(WatParserSTRING_)
		}
		{
			p.SetState(884)
			p.Match(WatParserRPAR)
		}

	case 5:
		p.EnterOuterAlt(localctx, 5)
		{
			p.SetState(886)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(887)
			p.Match(WatParserASSERT_RETURN)
		}
		{
			p.SetState(888)
			p.Action_()
		}
		{
			p.SetState(889)
			p.Const_list()
		}
		{
			p.SetState(890)
			p.Match(WatParserRPAR)
		}

	case 6:
		p.EnterOuterAlt(localctx, 6)
		{
			p.SetState(892)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(893)
			p.Match(WatParserASSERT_RETURN_CANONICAL_NAN)
		}
		{
			p.SetState(894)
			p.Action_()
		}
		{
			p.SetState(895)
			p.Match(WatParserRPAR)
		}

	case 7:
		p.EnterOuterAlt(localctx, 7)
		{
			p.SetState(897)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(898)
			p.Match(WatParserASSERT_RETURN_ARITHMETIC_NAN)
		}
		{
			p.SetState(899)
			p.Action_()
		}
		{
			p.SetState(900)
			p.Match(WatParserRPAR)
		}

	case 8:
		p.EnterOuterAlt(localctx, 8)
		{
			p.SetState(902)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(903)
			p.Match(WatParserASSERT_TRAP)
		}
		{
			p.SetState(904)
			p.Action_()
		}
		{
			p.SetState(905)
			p.Match(WatParserSTRING_)
		}
		{
			p.SetState(906)
			p.Match(WatParserRPAR)
		}

	case 9:
		p.EnterOuterAlt(localctx, 9)
		{
			p.SetState(908)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(909)
			p.Match(WatParserASSERT_EXHAUSTION)
		}
		{
			p.SetState(910)
			p.Action_()
		}
		{
			p.SetState(911)
			p.Match(WatParserSTRING_)
		}
		{
			p.SetState(912)
			p.Match(WatParserRPAR)
		}

	}

	return localctx
}

// ICmdContext is an interface to support dynamic dispatch.
type ICmdContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsCmdContext differentiates from other interfaces.
	IsCmdContext()
}

type CmdContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCmdContext() *CmdContext {
	var p = new(CmdContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_cmd
	return p
}

func (*CmdContext) IsCmdContext() {}

func NewCmdContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CmdContext {
	var p = new(CmdContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_cmd

	return p
}

func (s *CmdContext) GetParser() antlr.Parser { return s.parser }

func (s *CmdContext) Action_() IAction_Context {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IAction_Context)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IAction_Context)
}

func (s *CmdContext) Assertion() IAssertionContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IAssertionContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IAssertionContext)
}

func (s *CmdContext) Script_module() IScript_moduleContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IScript_moduleContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IScript_moduleContext)
}

func (s *CmdContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *CmdContext) REGISTER() antlr.TerminalNode {
	return s.GetToken(WatParserREGISTER, 0)
}

func (s *CmdContext) Name() INameContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*INameContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(INameContext)
}

func (s *CmdContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *CmdContext) VAR() antlr.TerminalNode {
	return s.GetToken(WatParserVAR, 0)
}

func (s *CmdContext) Meta() IMetaContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IMetaContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IMetaContext)
}

func (s *CmdContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *CmdContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *CmdContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterCmd(s)
	}
}

func (s *CmdContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitCmd(s)
	}
}

func (p *WatParser) Cmd() (localctx ICmdContext) {
	this := p
	_ = this

	localctx = NewCmdContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 122, WatParserRULE_cmd)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(928)
	p.GetErrorHandler().Sync(p)
	switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 96, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(916)
			p.Action_()
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(917)
			p.Assertion()
		}

	case 3:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(918)
			p.Script_module()
		}

	case 4:
		p.EnterOuterAlt(localctx, 4)
		{
			p.SetState(919)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(920)
			p.Match(WatParserREGISTER)
		}
		{
			p.SetState(921)
			p.Name()
		}
		p.SetState(923)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(922)
				p.Match(WatParserVAR)
			}

		}
		{
			p.SetState(925)
			p.Match(WatParserRPAR)
		}

	case 5:
		p.EnterOuterAlt(localctx, 5)
		{
			p.SetState(927)
			p.Meta()
		}

	}

	return localctx
}

// IMetaContext is an interface to support dynamic dispatch.
type IMetaContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsMetaContext differentiates from other interfaces.
	IsMetaContext()
}

type MetaContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyMetaContext() *MetaContext {
	var p = new(MetaContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_meta
	return p
}

func (*MetaContext) IsMetaContext() {}

func NewMetaContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MetaContext {
	var p = new(MetaContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_meta

	return p
}

func (s *MetaContext) GetParser() antlr.Parser { return s.parser }

func (s *MetaContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *MetaContext) SCRIPT() antlr.TerminalNode {
	return s.GetToken(WatParserSCRIPT, 0)
}

func (s *MetaContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *MetaContext) VAR() antlr.TerminalNode {
	return s.GetToken(WatParserVAR, 0)
}

func (s *MetaContext) AllCmd() []ICmdContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*ICmdContext)(nil)).Elem())
	var tst = make([]ICmdContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(ICmdContext)
		}
	}

	return tst
}

func (s *MetaContext) Cmd(i int) ICmdContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ICmdContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(ICmdContext)
}

func (s *MetaContext) INPUT() antlr.TerminalNode {
	return s.GetToken(WatParserINPUT, 0)
}

func (s *MetaContext) STRING_() antlr.TerminalNode {
	return s.GetToken(WatParserSTRING_, 0)
}

func (s *MetaContext) OUTPUT() antlr.TerminalNode {
	return s.GetToken(WatParserOUTPUT, 0)
}

func (s *MetaContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *MetaContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *MetaContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterMeta(s)
	}
}

func (s *MetaContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitMeta(s)
	}
}

func (p *WatParser) Meta() (localctx IMetaContext) {
	this := p
	_ = this

	localctx = NewMetaContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 124, WatParserRULE_meta)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(962)
	p.GetErrorHandler().Sync(p)
	switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 102, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(930)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(931)
			p.Match(WatParserSCRIPT)
		}
		p.SetState(933)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(932)
				p.Match(WatParserVAR)
			}

		}
		p.SetState(938)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		for _la == WatParserLPAR {
			{
				p.SetState(935)
				p.Cmd()
			}

			p.SetState(940)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(941)
			p.Match(WatParserRPAR)
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(942)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(943)
			p.Match(WatParserINPUT)
		}
		p.SetState(945)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(944)
				p.Match(WatParserVAR)
			}

		}
		{
			p.SetState(947)
			p.Match(WatParserSTRING_)
		}
		{
			p.SetState(948)
			p.Match(WatParserRPAR)
		}

	case 3:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(949)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(950)
			p.Match(WatParserOUTPUT)
		}
		p.SetState(952)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(951)
				p.Match(WatParserVAR)
			}

		}
		{
			p.SetState(954)
			p.Match(WatParserSTRING_)
		}
		{
			p.SetState(955)
			p.Match(WatParserRPAR)
		}

	case 4:
		p.EnterOuterAlt(localctx, 4)
		{
			p.SetState(956)
			p.Match(WatParserLPAR)
		}
		{
			p.SetState(957)
			p.Match(WatParserOUTPUT)
		}
		p.SetState(959)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		if _la == WatParserVAR {
			{
				p.SetState(958)
				p.Match(WatParserVAR)
			}

		}
		{
			p.SetState(961)
			p.Match(WatParserRPAR)
		}

	}

	return localctx
}

// IWconstContext is an interface to support dynamic dispatch.
type IWconstContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsWconstContext differentiates from other interfaces.
	IsWconstContext()
}

type WconstContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyWconstContext() *WconstContext {
	var p = new(WconstContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_wconst
	return p
}

func (*WconstContext) IsWconstContext() {}

func NewWconstContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *WconstContext {
	var p = new(WconstContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_wconst

	return p
}

func (s *WconstContext) GetParser() antlr.Parser { return s.parser }

func (s *WconstContext) LPAR() antlr.TerminalNode {
	return s.GetToken(WatParserLPAR, 0)
}

func (s *WconstContext) CONST() antlr.TerminalNode {
	return s.GetToken(WatParserCONST, 0)
}

func (s *WconstContext) Literal() ILiteralContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ILiteralContext)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(ILiteralContext)
}

func (s *WconstContext) RPAR() antlr.TerminalNode {
	return s.GetToken(WatParserRPAR, 0)
}

func (s *WconstContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *WconstContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *WconstContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterWconst(s)
	}
}

func (s *WconstContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitWconst(s)
	}
}

func (p *WatParser) Wconst() (localctx IWconstContext) {
	this := p
	_ = this

	localctx = NewWconstContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 126, WatParserRULE_wconst)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(964)
		p.Match(WatParserLPAR)
	}
	{
		p.SetState(965)
		p.Match(WatParserCONST)
	}
	{
		p.SetState(966)
		p.Literal()
	}
	{
		p.SetState(967)
		p.Match(WatParserRPAR)
	}

	return localctx
}

// IConst_listContext is an interface to support dynamic dispatch.
type IConst_listContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsConst_listContext differentiates from other interfaces.
	IsConst_listContext()
}

type Const_listContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyConst_listContext() *Const_listContext {
	var p = new(Const_listContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_const_list
	return p
}

func (*Const_listContext) IsConst_listContext() {}

func NewConst_listContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Const_listContext {
	var p = new(Const_listContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_const_list

	return p
}

func (s *Const_listContext) GetParser() antlr.Parser { return s.parser }

func (s *Const_listContext) AllWconst() []IWconstContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IWconstContext)(nil)).Elem())
	var tst = make([]IWconstContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IWconstContext)
		}
	}

	return tst
}

func (s *Const_listContext) Wconst(i int) IWconstContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IWconstContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IWconstContext)
}

func (s *Const_listContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Const_listContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Const_listContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterConst_list(s)
	}
}

func (s *Const_listContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitConst_list(s)
	}
}

func (p *WatParser) Const_list() (localctx IConst_listContext) {
	this := p
	_ = this

	localctx = NewConst_listContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 128, WatParserRULE_const_list)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	p.SetState(972)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	for _la == WatParserLPAR {
		{
			p.SetState(969)
			p.Wconst()
		}

		p.SetState(974)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)
	}

	return localctx
}

// IScriptContext is an interface to support dynamic dispatch.
type IScriptContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsScriptContext differentiates from other interfaces.
	IsScriptContext()
}

type ScriptContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyScriptContext() *ScriptContext {
	var p = new(ScriptContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_script
	return p
}

func (*ScriptContext) IsScriptContext() {}

func NewScriptContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ScriptContext {
	var p = new(ScriptContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_script

	return p
}

func (s *ScriptContext) GetParser() antlr.Parser { return s.parser }

func (s *ScriptContext) EOF() antlr.TerminalNode {
	return s.GetToken(WatParserEOF, 0)
}

func (s *ScriptContext) AllCmd() []ICmdContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*ICmdContext)(nil)).Elem())
	var tst = make([]ICmdContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(ICmdContext)
		}
	}

	return tst
}

func (s *ScriptContext) Cmd(i int) ICmdContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*ICmdContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(ICmdContext)
}

func (s *ScriptContext) AllModule_field() []IModule_fieldContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IModule_fieldContext)(nil)).Elem())
	var tst = make([]IModule_fieldContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IModule_fieldContext)
		}
	}

	return tst
}

func (s *ScriptContext) Module_field(i int) IModule_fieldContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IModule_fieldContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IModule_fieldContext)
}

func (s *ScriptContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *ScriptContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *ScriptContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterScript(s)
	}
}

func (s *ScriptContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitScript(s)
	}
}

func (p *WatParser) Script() (localctx IScriptContext) {
	this := p
	_ = this

	localctx = NewScriptContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 130, WatParserRULE_script)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(989)
	p.GetErrorHandler().Sync(p)
	switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 106, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		p.SetState(978)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		for _la == WatParserLPAR {
			{
				p.SetState(975)
				p.Cmd()
			}

			p.SetState(980)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(981)
			p.Match(WatParserEOF)
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		p.SetState(983)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		for ok := true; ok; ok = _la == WatParserLPAR {
			{
				p.SetState(982)
				p.Module_field()
			}

			p.SetState(985)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(987)
			p.Match(WatParserEOF)
		}

	}

	return localctx
}

// IModuleContext is an interface to support dynamic dispatch.
type IModuleContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsModuleContext differentiates from other interfaces.
	IsModuleContext()
}

type ModuleContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyModuleContext() *ModuleContext {
	var p = new(ModuleContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = WatParserRULE_module
	return p
}

func (*ModuleContext) IsModuleContext() {}

func NewModuleContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ModuleContext {
	var p = new(ModuleContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = WatParserRULE_module

	return p
}

func (s *ModuleContext) GetParser() antlr.Parser { return s.parser }

func (s *ModuleContext) Module_() IModule_Context {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IModule_Context)(nil)).Elem(), 0)

	if t == nil {
		return nil
	}

	return t.(IModule_Context)
}

func (s *ModuleContext) EOF() antlr.TerminalNode {
	return s.GetToken(WatParserEOF, 0)
}

func (s *ModuleContext) AllModule_field() []IModule_fieldContext {
	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IModule_fieldContext)(nil)).Elem())
	var tst = make([]IModule_fieldContext, len(ts))

	for i, t := range ts {
		if t != nil {
			tst[i] = t.(IModule_fieldContext)
		}
	}

	return tst
}

func (s *ModuleContext) Module_field(i int) IModule_fieldContext {
	var t = s.GetTypedRuleContext(reflect.TypeOf((*IModule_fieldContext)(nil)).Elem(), i)

	if t == nil {
		return nil
	}

	return t.(IModule_fieldContext)
}

func (s *ModuleContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *ModuleContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *ModuleContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.EnterModule(s)
	}
}

func (s *ModuleContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(WatParserListener); ok {
		listenerT.ExitModule(s)
	}
}

func (p *WatParser) Module() (localctx IModuleContext) {
	this := p
	_ = this

	localctx = NewModuleContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 132, WatParserRULE_module)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.SetState(1001)
	p.GetErrorHandler().Sync(p)
	switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 108, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(991)
			p.Module_()
		}
		{
			p.SetState(992)
			p.Match(WatParserEOF)
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		p.SetState(997)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)

		for _la == WatParserLPAR {
			{
				p.SetState(994)
				p.Module_field()
			}

			p.SetState(999)
			p.GetErrorHandler().Sync(p)
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(1000)
			p.Match(WatParserEOF)
		}

	}

	return localctx
}
