# Generated from decafJavier.g4 by ANTLR 4.9.2
# encoding: utf-8
from antlr4 import *
from io import StringIO
import sys
if sys.version_info[1] > 5:
	from typing import TextIO
else:
	from typing.io import TextIO


def serializedATN():
    with StringIO() as buf:
        buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3;")
        buf.write("\u0120\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7")
        buf.write("\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16")
        buf.write("\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23\t\23")
        buf.write("\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31")
        buf.write("\t\31\4\32\t\32\3\2\3\2\3\2\3\2\7\29\n\2\f\2\16\2<\13")
        buf.write("\2\3\2\7\2?\n\2\f\2\16\2B\13\2\3\2\3\2\3\3\3\3\3\3\3\3")
        buf.write("\3\3\3\3\3\3\7\3M\n\3\f\3\16\3P\13\3\3\3\3\3\3\4\3\4\3")
        buf.write("\4\3\4\7\4X\n\4\f\4\16\4[\13\4\3\4\3\4\3\5\3\5\3\5\3\5")
        buf.write("\3\5\3\6\3\6\5\6f\n\6\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\b")
        buf.write("\3\b\3\b\3\b\3\b\7\bt\n\b\f\b\16\bw\13\b\5\by\n\b\3\b")
        buf.write("\3\b\3\b\3\t\3\t\5\t\u0080\n\t\3\n\3\n\7\n\u0084\n\n\f")
        buf.write("\n\16\n\u0087\13\n\3\n\7\n\u008a\n\n\f\n\16\n\u008d\13")
        buf.write("\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13")
        buf.write("\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\5\13\u00a2\n")
        buf.write("\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13")
        buf.write("\3\13\3\13\3\13\5\13\u00b1\n\13\3\13\3\13\3\13\3\13\5")
        buf.write("\13\u00b7\n\13\3\13\5\13\u00ba\n\13\3\13\3\13\3\13\3\13")
        buf.write("\5\13\u00c0\n\13\3\f\3\f\3\f\3\f\3\f\7\f\u00c7\n\f\f\f")
        buf.write("\16\f\u00ca\13\f\5\f\u00cc\n\f\3\f\3\f\3\r\3\r\3\r\3\r")
        buf.write("\3\r\3\r\3\r\3\r\3\r\3\r\3\r\7\r\u00db\n\r\f\r\16\r\u00de")
        buf.write("\13\r\5\r\u00e0\n\r\3\r\3\r\5\r\u00e4\n\r\3\16\3\16\3")
        buf.write("\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\5\16")
        buf.write("\u00f2\n\16\3\16\3\16\3\16\3\16\7\16\u00f8\n\16\f\16\16")
        buf.write("\16\u00fb\13\16\3\17\3\17\5\17\u00ff\n\17\3\20\3\20\5")
        buf.write("\20\u0103\n\20\3\21\3\21\3\22\3\22\3\23\3\23\3\24\3\24")
        buf.write("\3\25\3\25\3\25\5\25\u0110\n\25\3\26\3\26\3\26\3\26\5")
        buf.write("\26\u0116\n\26\3\27\3\27\3\30\3\30\3\31\3\31\3\32\3\32")
        buf.write("\3\32\2\3\32\33\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36")
        buf.write(" \"$&(*,.\60\62\2\t\4\2\61\61\63\63\3\2%(\3\2,-\3\2\"")
        buf.write("#\3\2\35!\4\2\13\13\r\r\3\2)+\2\u012e\2\64\3\2\2\2\4E")
        buf.write("\3\2\2\2\6S\3\2\2\2\b^\3\2\2\2\ne\3\2\2\2\fg\3\2\2\2\16")
        buf.write("i\3\2\2\2\20\177\3\2\2\2\22\u0081\3\2\2\2\24\u00bf\3\2")
        buf.write("\2\2\26\u00c1\3\2\2\2\30\u00e3\3\2\2\2\32\u00f1\3\2\2")
        buf.write("\2\34\u00fe\3\2\2\2\36\u0102\3\2\2\2 \u0104\3\2\2\2\"")
        buf.write("\u0106\3\2\2\2$\u0108\3\2\2\2&\u010a\3\2\2\2(\u010f\3")
        buf.write("\2\2\2*\u0115\3\2\2\2,\u0117\3\2\2\2.\u0119\3\2\2\2\60")
        buf.write("\u011b\3\2\2\2\62\u011d\3\2\2\2\64\65\7\3\2\2\65\66\7")
        buf.write("\4\2\2\66:\7\24\2\2\679\5\6\4\28\67\3\2\2\29<\3\2\2\2")
        buf.write(":8\3\2\2\2:;\3\2\2\2;@\3\2\2\2<:\3\2\2\2=?\5\16\b\2>=")
        buf.write("\3\2\2\2?B\3\2\2\2@>\3\2\2\2@A\3\2\2\2AC\3\2\2\2B@\3\2")
        buf.write("\2\2CD\7\25\2\2D\3\3\2\2\2EF\5.\30\2FG\5\n\6\2GN\3\2\2")
        buf.write("\2HI\7\32\2\2IJ\5.\30\2JK\5\n\6\2KM\3\2\2\2LH\3\2\2\2")
        buf.write("MP\3\2\2\2NL\3\2\2\2NO\3\2\2\2OQ\3\2\2\2PN\3\2\2\2QR\7")
        buf.write("\23\2\2R\5\3\2\2\2ST\5.\30\2TY\5\n\6\2UV\7\32\2\2VX\5")
        buf.write("\n\6\2WU\3\2\2\2X[\3\2\2\2YW\3\2\2\2YZ\3\2\2\2Z\\\3\2")
        buf.write("\2\2[Y\3\2\2\2\\]\7\23\2\2]\7\3\2\2\2^_\7.\2\2_`\7\26")
        buf.write("\2\2`a\5 \21\2ab\7\27\2\2b\t\3\2\2\2cf\5\f\7\2df\5\b\5")
        buf.write("\2ec\3\2\2\2ed\3\2\2\2f\13\3\2\2\2gh\7.\2\2h\r\3\2\2\2")
        buf.write("ij\5\20\t\2jk\5\62\32\2kx\7\30\2\2lm\5.\30\2mn\5\f\7\2")
        buf.write("nu\3\2\2\2op\7\32\2\2pq\5.\30\2qr\5\f\7\2rt\3\2\2\2so")
        buf.write("\3\2\2\2tw\3\2\2\2us\3\2\2\2uv\3\2\2\2vy\3\2\2\2wu\3\2")
        buf.write("\2\2xl\3\2\2\2xy\3\2\2\2yz\3\2\2\2z{\7\31\2\2{|\5\22\n")
        buf.write("\2|\17\3\2\2\2}\u0080\5.\30\2~\u0080\7\21\2\2\177}\3\2")
        buf.write("\2\2\177~\3\2\2\2\u0080\21\3\2\2\2\u0081\u0085\7\24\2")
        buf.write("\2\u0082\u0084\5\4\3\2\u0083\u0082\3\2\2\2\u0084\u0087")
        buf.write("\3\2\2\2\u0085\u0083\3\2\2\2\u0085\u0086\3\2\2\2\u0086")
        buf.write("\u008b\3\2\2\2\u0087\u0085\3\2\2\2\u0088\u008a\5\24\13")
        buf.write("\2\u0089\u0088\3\2\2\2\u008a\u008d\3\2\2\2\u008b\u0089")
        buf.write("\3\2\2\2\u008b\u008c\3\2\2\2\u008c\u008e\3\2\2\2\u008d")
        buf.write("\u008b\3\2\2\2\u008e\u008f\7\25\2\2\u008f\23\3\2\2\2\u0090")
        buf.write("\u0091\5\34\17\2\u0091\u0092\5\60\31\2\u0092\u0093\5\32")
        buf.write("\16\2\u0093\u00c0\3\2\2\2\u0094\u0095\5\34\17\2\u0095")
        buf.write("\u0096\5\60\31\2\u0096\u0097\5\32\16\2\u0097\u0098\7\23")
        buf.write("\2\2\u0098\u00c0\3\2\2\2\u0099\u00c0\5\30\r\2\u009a\u009b")
        buf.write("\7\5\2\2\u009b\u009c\7\30\2\2\u009c\u009d\5\32\16\2\u009d")
        buf.write("\u009e\7\31\2\2\u009e\u00a1\5\22\n\2\u009f\u00a0\7\6\2")
        buf.write("\2\u00a0\u00a2\5\22\n\2\u00a1\u009f\3\2\2\2\u00a1\u00a2")
        buf.write("\3\2\2\2\u00a2\u00c0\3\2\2\2\u00a3\u00a4\5\f\7\2\u00a4")
        buf.write("\u00a5\7)\2\2\u00a5\u00a6\5\32\16\2\u00a6\u00a7\7\23\2")
        buf.write("\2\u00a7\u00c0\3\2\2\2\u00a8\u00a9\7\b\2\2\u00a9\u00aa")
        buf.write("\5\32\16\2\u00aa\u00ab\7\23\2\2\u00ab\u00c0\3\2\2\2\u00ac")
        buf.write("\u00ad\7\7\2\2\u00ad\u00b0\5\f\7\2\u00ae\u00af\7)\2\2")
        buf.write("\u00af\u00b1\5 \21\2\u00b0\u00ae\3\2\2\2\u00b0\u00b1\3")
        buf.write("\2\2\2\u00b1\u00b2\3\2\2\2\u00b2\u00b9\7\32\2\2\u00b3")
        buf.write("\u00b6\5\f\7\2\u00b4\u00b5\7)\2\2\u00b5\u00b7\5 \21\2")
        buf.write("\u00b6\u00b4\3\2\2\2\u00b6\u00b7\3\2\2\2\u00b7\u00ba\3")
        buf.write("\2\2\2\u00b8\u00ba\5 \21\2\u00b9\u00b3\3\2\2\2\u00b9\u00b8")
        buf.write("\3\2\2\2\u00ba\u00bb\3\2\2\2\u00bb\u00bc\5\22\n\2\u00bc")
        buf.write("\u00c0\3\2\2\2\u00bd\u00be\7\t\2\2\u00be\u00c0\7\23\2")
        buf.write("\2\u00bf\u0090\3\2\2\2\u00bf\u0094\3\2\2\2\u00bf\u0099")
        buf.write("\3\2\2\2\u00bf\u009a\3\2\2\2\u00bf\u00a3\3\2\2\2\u00bf")
        buf.write("\u00a8\3\2\2\2\u00bf\u00ac\3\2\2\2\u00bf\u00bd\3\2\2\2")
        buf.write("\u00c0\25\3\2\2\2\u00c1\u00c2\5\62\32\2\u00c2\u00cb\7")
        buf.write("\30\2\2\u00c3\u00c8\5\32\16\2\u00c4\u00c5\7\32\2\2\u00c5")
        buf.write("\u00c7\5\32\16\2\u00c6\u00c4\3\2\2\2\u00c7\u00ca\3\2\2")
        buf.write("\2\u00c8\u00c6\3\2\2\2\u00c8\u00c9\3\2\2\2\u00c9\u00cc")
        buf.write("\3\2\2\2\u00ca\u00c8\3\2\2\2\u00cb\u00c3\3\2\2\2\u00cb")
        buf.write("\u00cc\3\2\2\2\u00cc\u00cd\3\2\2\2\u00cd\u00ce\7\31\2")
        buf.write("\2\u00ce\27\3\2\2\2\u00cf\u00e4\5\26\f\2\u00d0\u00d1\5")
        buf.write("\26\f\2\u00d1\u00d2\7\23\2\2\u00d2\u00e4\3\2\2\2\u00d3")
        buf.write("\u00d4\7\22\2\2\u00d4\u00d5\7\30\2\2\u00d5\u00df\7\65")
        buf.write("\2\2\u00d6\u00d7\7\32\2\2\u00d7\u00dc\5\36\20\2\u00d8")
        buf.write("\u00d9\7\32\2\2\u00d9\u00db\5\36\20\2\u00da\u00d8\3\2")
        buf.write("\2\2\u00db\u00de\3\2\2\2\u00dc\u00da\3\2\2\2\u00dc\u00dd")
        buf.write("\3\2\2\2\u00dd\u00e0\3\2\2\2\u00de\u00dc\3\2\2\2\u00df")
        buf.write("\u00d6\3\2\2\2\u00df\u00e0\3\2\2\2\u00e0\u00e1\3\2\2\2")
        buf.write("\u00e1\u00e2\7\31\2\2\u00e2\u00e4\7\23\2\2\u00e3\u00cf")
        buf.write("\3\2\2\2\u00e3\u00d0\3\2\2\2\u00e3\u00d3\3\2\2\2\u00e4")
        buf.write("\31\3\2\2\2\u00e5\u00e6\b\16\1\2\u00e6\u00f2\5\34\17\2")
        buf.write("\u00e7\u00f2\5(\25\2\u00e8\u00e9\7\36\2\2\u00e9\u00f2")
        buf.write("\5\32\16\6\u00ea\u00f2\5\30\r\2\u00eb\u00ec\7$\2\2\u00ec")
        buf.write("\u00f2\5\32\16\4\u00ed\u00ee\7\30\2\2\u00ee\u00ef\5\32")
        buf.write("\16\2\u00ef\u00f0\7\31\2\2\u00f0\u00f2\3\2\2\2\u00f1\u00e5")
        buf.write("\3\2\2\2\u00f1\u00e7\3\2\2\2\u00f1\u00e8\3\2\2\2\u00f1")
        buf.write("\u00ea\3\2\2\2\u00f1\u00eb\3\2\2\2\u00f1\u00ed\3\2\2\2")
        buf.write("\u00f2\u00f9\3\2\2\2\u00f3\u00f4\f\7\2\2\u00f4\u00f5\5")
        buf.write("*\26\2\u00f5\u00f6\5\32\16\b\u00f6\u00f8\3\2\2\2\u00f7")
        buf.write("\u00f3\3\2\2\2\u00f8\u00fb\3\2\2\2\u00f9\u00f7\3\2\2\2")
        buf.write("\u00f9\u00fa\3\2\2\2\u00fa\33\3\2\2\2\u00fb\u00f9\3\2")
        buf.write("\2\2\u00fc\u00ff\5\f\7\2\u00fd\u00ff\5\b\5\2\u00fe\u00fc")
        buf.write("\3\2\2\2\u00fe\u00fd\3\2\2\2\u00ff\35\3\2\2\2\u0100\u0103")
        buf.write("\5\32\16\2\u0101\u0103\7\65\2\2\u0102\u0100\3\2\2\2\u0102")
        buf.write("\u0101\3\2\2\2\u0103\37\3\2\2\2\u0104\u0105\t\2\2\2\u0105")
        buf.write("!\3\2\2\2\u0106\u0107\t\3\2\2\u0107#\3\2\2\2\u0108\u0109")
        buf.write("\t\4\2\2\u0109%\3\2\2\2\u010a\u010b\t\5\2\2\u010b\'\3")
        buf.write("\2\2\2\u010c\u0110\5 \21\2\u010d\u0110\7\60\2\2\u010e")
        buf.write("\u0110\7\64\2\2\u010f\u010c\3\2\2\2\u010f\u010d\3\2\2")
        buf.write("\2\u010f\u010e\3\2\2\2\u0110)\3\2\2\2\u0111\u0116\5,\27")
        buf.write("\2\u0112\u0116\5\"\22\2\u0113\u0116\5$\23\2\u0114\u0116")
        buf.write("\5&\24\2\u0115\u0111\3\2\2\2\u0115\u0112\3\2\2\2\u0115")
        buf.write("\u0113\3\2\2\2\u0115\u0114\3\2\2\2\u0116+\3\2\2\2\u0117")
        buf.write("\u0118\t\6\2\2\u0118-\3\2\2\2\u0119\u011a\t\7\2\2\u011a")
        buf.write("/\3\2\2\2\u011b\u011c\t\b\2\2\u011c\61\3\2\2\2\u011d\u011e")
        buf.write("\7.\2\2\u011e\63\3\2\2\2\34:@NYeux\177\u0085\u008b\u00a1")
        buf.write("\u00b0\u00b6\u00b9\u00bf\u00c8\u00cb\u00dc\u00df\u00e3")
        buf.write("\u00f1\u00f9\u00fe\u0102\u010f\u0115")
        return buf.getvalue()


class decafJavierParser ( Parser ):

    grammarFileName = "decafJavier.g4"

    atn = ATNDeserializer().deserialize(serializedATN())

    decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ]

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "'class'", "'Program'", "'if'", "'else'", 
                     "'for'", "'return'", "'break'", "'continue'", "'boolean'", 
                     "'char'", "'int'", "'string'", "'True'", "'False'", 
                     "'void'", "'callout'", "';'", "'{'", "'}'", "'['", 
                     "']'", "'('", "')'", "','", "'\"'", "'''", "'+'", "'-'", 
                     "'*'", "'/'", "'%'", "'&&'", "'||'", "'!'", "'>'", 
                     "'<'", "'>='", "'<='", "'='", "'+='", "'-='", "'=='", 
                     "'!='" ]

    symbolicNames = [ "<INVALID>", "CLASS", "PROGRAM", "IF", "ELSE", "FOR", 
                      "RETURN", "BREAK", "CONTINUE", "BOOLEAN", "CHAR", 
                      "INT", "STRING", "TRUE", "FALSE", "VOID", "CALLOUT", 
                      "SEMICOLON", "LCURLY", "RCURLY", "LSQUARE", "RSQUARE", 
                      "LROUND", "RROUND", "COMMA", "QUOTES", "APOSTROPHE", 
                      "ADD", "SUB", "MULTIPLY", "DIVIDE", "REMINDER", "AND", 
                      "OR", "NOT", "GREATER_OP", "LESS_OP", "GREATER_eq_op", 
                      "LESS_eq_op", "EQUAL_OP", "ADD_eq_op", "SUB_eq_op", 
                      "EQUALITY_OP", "UNEQUALITY_OP", "ID", "ALPHA", "CHAR_LITERAL", 
                      "DECIMAL_LITERAL", "DIGIT", "HEX_LITERAL", "BOOL_LITERAL", 
                      "STRING_LITERAL", "ALPHA_NUM", "HEX_DIGIT", "LINE_COMMENT", 
                      "COMMENT", "NEWLINE", "WHITESPACE" ]

    RULE_program = 0
    RULE_vardeclr = 1
    RULE_field_declr = 2
    RULE_array_id = 3
    RULE_field_var = 4
    RULE_var_id = 5
    RULE_method_declr = 6
    RULE_return_type = 7
    RULE_block = 8
    RULE_statement = 9
    RULE_method_call_inter = 10
    RULE_method_call = 11
    RULE_expr = 12
    RULE_location = 13
    RULE_callout_arg = 14
    RULE_int_literal = 15
    RULE_rel_op = 16
    RULE_eq_op = 17
    RULE_cond_op = 18
    RULE_literal = 19
    RULE_bin_op = 20
    RULE_arith_op = 21
    RULE_var_type = 22
    RULE_assign_op = 23
    RULE_method_name = 24

    ruleNames =  [ "program", "vardeclr", "field_declr", "array_id", "field_var", 
                   "var_id", "method_declr", "return_type", "block", "statement", 
                   "method_call_inter", "method_call", "expr", "location", 
                   "callout_arg", "int_literal", "rel_op", "eq_op", "cond_op", 
                   "literal", "bin_op", "arith_op", "var_type", "assign_op", 
                   "method_name" ]

    EOF = Token.EOF
    CLASS=1
    PROGRAM=2
    IF=3
    ELSE=4
    FOR=5
    RETURN=6
    BREAK=7
    CONTINUE=8
    BOOLEAN=9
    CHAR=10
    INT=11
    STRING=12
    TRUE=13
    FALSE=14
    VOID=15
    CALLOUT=16
    SEMICOLON=17
    LCURLY=18
    RCURLY=19
    LSQUARE=20
    RSQUARE=21
    LROUND=22
    RROUND=23
    COMMA=24
    QUOTES=25
    APOSTROPHE=26
    ADD=27
    SUB=28
    MULTIPLY=29
    DIVIDE=30
    REMINDER=31
    AND=32
    OR=33
    NOT=34
    GREATER_OP=35
    LESS_OP=36
    GREATER_eq_op=37
    LESS_eq_op=38
    EQUAL_OP=39
    ADD_eq_op=40
    SUB_eq_op=41
    EQUALITY_OP=42
    UNEQUALITY_OP=43
    ID=44
    ALPHA=45
    CHAR_LITERAL=46
    DECIMAL_LITERAL=47
    DIGIT=48
    HEX_LITERAL=49
    BOOL_LITERAL=50
    STRING_LITERAL=51
    ALPHA_NUM=52
    HEX_DIGIT=53
    LINE_COMMENT=54
    COMMENT=55
    NEWLINE=56
    WHITESPACE=57

    def __init__(self, input:TokenStream, output:TextIO = sys.stdout):
        super().__init__(input, output)
        self.checkVersion("4.9.2")
        self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache)
        self._predicates = None




    class ProgramContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def CLASS(self):
            return self.getToken(decafJavierParser.CLASS, 0)

        def PROGRAM(self):
            return self.getToken(decafJavierParser.PROGRAM, 0)

        def LCURLY(self):
            return self.getToken(decafJavierParser.LCURLY, 0)

        def RCURLY(self):
            return self.getToken(decafJavierParser.RCURLY, 0)

        def field_declr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(decafJavierParser.Field_declrContext)
            else:
                return self.getTypedRuleContext(decafJavierParser.Field_declrContext,i)


        def method_declr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(decafJavierParser.Method_declrContext)
            else:
                return self.getTypedRuleContext(decafJavierParser.Method_declrContext,i)


        def getRuleIndex(self):
            return decafJavierParser.RULE_program

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterProgram" ):
                listener.enterProgram(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitProgram" ):
                listener.exitProgram(self)




    def program(self):

        localctx = decafJavierParser.ProgramContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_program)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 50
            self.match(decafJavierParser.CLASS)
            self.state = 51
            self.match(decafJavierParser.PROGRAM)
            self.state = 52
            self.match(decafJavierParser.LCURLY)
            self.state = 56
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,0,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 53
                    self.field_declr() 
                self.state = 58
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,0,self._ctx)

            self.state = 62
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << decafJavierParser.BOOLEAN) | (1 << decafJavierParser.INT) | (1 << decafJavierParser.VOID))) != 0):
                self.state = 59
                self.method_declr()
                self.state = 64
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 65
            self.match(decafJavierParser.RCURLY)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class VardeclrContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def SEMICOLON(self):
            return self.getToken(decafJavierParser.SEMICOLON, 0)

        def var_type(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(decafJavierParser.Var_typeContext)
            else:
                return self.getTypedRuleContext(decafJavierParser.Var_typeContext,i)


        def field_var(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(decafJavierParser.Field_varContext)
            else:
                return self.getTypedRuleContext(decafJavierParser.Field_varContext,i)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(decafJavierParser.COMMA)
            else:
                return self.getToken(decafJavierParser.COMMA, i)

        def getRuleIndex(self):
            return decafJavierParser.RULE_vardeclr

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVardeclr" ):
                listener.enterVardeclr(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVardeclr" ):
                listener.exitVardeclr(self)




    def vardeclr(self):

        localctx = decafJavierParser.VardeclrContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_vardeclr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 67
            self.var_type()
            self.state = 68
            self.field_var()
            self.state = 76
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==decafJavierParser.COMMA:
                self.state = 70
                self.match(decafJavierParser.COMMA)
                self.state = 71
                self.var_type()
                self.state = 72
                self.field_var()
                self.state = 78
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 79
            self.match(decafJavierParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Field_declrContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def var_type(self):
            return self.getTypedRuleContext(decafJavierParser.Var_typeContext,0)


        def field_var(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(decafJavierParser.Field_varContext)
            else:
                return self.getTypedRuleContext(decafJavierParser.Field_varContext,i)


        def SEMICOLON(self):
            return self.getToken(decafJavierParser.SEMICOLON, 0)

        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(decafJavierParser.COMMA)
            else:
                return self.getToken(decafJavierParser.COMMA, i)

        def getRuleIndex(self):
            return decafJavierParser.RULE_field_declr

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterField_declr" ):
                listener.enterField_declr(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitField_declr" ):
                listener.exitField_declr(self)




    def field_declr(self):

        localctx = decafJavierParser.Field_declrContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_field_declr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 81
            self.var_type()
            self.state = 82
            self.field_var()
            self.state = 87
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==decafJavierParser.COMMA:
                self.state = 83
                self.match(decafJavierParser.COMMA)
                self.state = 84
                self.field_var()
                self.state = 89
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 90
            self.match(decafJavierParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Array_idContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ID(self):
            return self.getToken(decafJavierParser.ID, 0)

        def LSQUARE(self):
            return self.getToken(decafJavierParser.LSQUARE, 0)

        def int_literal(self):
            return self.getTypedRuleContext(decafJavierParser.Int_literalContext,0)


        def RSQUARE(self):
            return self.getToken(decafJavierParser.RSQUARE, 0)

        def getRuleIndex(self):
            return decafJavierParser.RULE_array_id

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterArray_id" ):
                listener.enterArray_id(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitArray_id" ):
                listener.exitArray_id(self)




    def array_id(self):

        localctx = decafJavierParser.Array_idContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_array_id)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 92
            self.match(decafJavierParser.ID)
            self.state = 93
            self.match(decafJavierParser.LSQUARE)
            self.state = 94
            self.int_literal()
            self.state = 95
            self.match(decafJavierParser.RSQUARE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Field_varContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def var_id(self):
            return self.getTypedRuleContext(decafJavierParser.Var_idContext,0)


        def array_id(self):
            return self.getTypedRuleContext(decafJavierParser.Array_idContext,0)


        def getRuleIndex(self):
            return decafJavierParser.RULE_field_var

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterField_var" ):
                listener.enterField_var(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitField_var" ):
                listener.exitField_var(self)




    def field_var(self):

        localctx = decafJavierParser.Field_varContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_field_var)
        try:
            self.state = 99
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,4,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 97
                self.var_id()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 98
                self.array_id()
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_idContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ID(self):
            return self.getToken(decafJavierParser.ID, 0)

        def getRuleIndex(self):
            return decafJavierParser.RULE_var_id

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVar_id" ):
                listener.enterVar_id(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVar_id" ):
                listener.exitVar_id(self)




    def var_id(self):

        localctx = decafJavierParser.Var_idContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_var_id)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 101
            self.match(decafJavierParser.ID)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Method_declrContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def return_type(self):
            return self.getTypedRuleContext(decafJavierParser.Return_typeContext,0)


        def method_name(self):
            return self.getTypedRuleContext(decafJavierParser.Method_nameContext,0)


        def LROUND(self):
            return self.getToken(decafJavierParser.LROUND, 0)

        def RROUND(self):
            return self.getToken(decafJavierParser.RROUND, 0)

        def block(self):
            return self.getTypedRuleContext(decafJavierParser.BlockContext,0)


        def var_type(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(decafJavierParser.Var_typeContext)
            else:
                return self.getTypedRuleContext(decafJavierParser.Var_typeContext,i)


        def var_id(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(decafJavierParser.Var_idContext)
            else:
                return self.getTypedRuleContext(decafJavierParser.Var_idContext,i)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(decafJavierParser.COMMA)
            else:
                return self.getToken(decafJavierParser.COMMA, i)

        def getRuleIndex(self):
            return decafJavierParser.RULE_method_declr

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterMethod_declr" ):
                listener.enterMethod_declr(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitMethod_declr" ):
                listener.exitMethod_declr(self)




    def method_declr(self):

        localctx = decafJavierParser.Method_declrContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_method_declr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 103
            self.return_type()
            self.state = 104
            self.method_name()
            self.state = 105
            self.match(decafJavierParser.LROUND)
            self.state = 118
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==decafJavierParser.BOOLEAN or _la==decafJavierParser.INT:
                self.state = 106
                self.var_type()
                self.state = 107
                self.var_id()
                self.state = 115
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==decafJavierParser.COMMA:
                    self.state = 109
                    self.match(decafJavierParser.COMMA)
                    self.state = 110
                    self.var_type()
                    self.state = 111
                    self.var_id()
                    self.state = 117
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 120
            self.match(decafJavierParser.RROUND)
            self.state = 121
            self.block()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Return_typeContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def var_type(self):
            return self.getTypedRuleContext(decafJavierParser.Var_typeContext,0)


        def VOID(self):
            return self.getToken(decafJavierParser.VOID, 0)

        def getRuleIndex(self):
            return decafJavierParser.RULE_return_type

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterReturn_type" ):
                listener.enterReturn_type(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitReturn_type" ):
                listener.exitReturn_type(self)




    def return_type(self):

        localctx = decafJavierParser.Return_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_return_type)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 125
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [decafJavierParser.BOOLEAN, decafJavierParser.INT]:
                self.state = 123
                self.var_type()
                pass
            elif token in [decafJavierParser.VOID]:
                self.state = 124
                self.match(decafJavierParser.VOID)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class BlockContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def LCURLY(self):
            return self.getToken(decafJavierParser.LCURLY, 0)

        def RCURLY(self):
            return self.getToken(decafJavierParser.RCURLY, 0)

        def vardeclr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(decafJavierParser.VardeclrContext)
            else:
                return self.getTypedRuleContext(decafJavierParser.VardeclrContext,i)


        def statement(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(decafJavierParser.StatementContext)
            else:
                return self.getTypedRuleContext(decafJavierParser.StatementContext,i)


        def getRuleIndex(self):
            return decafJavierParser.RULE_block

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterBlock" ):
                listener.enterBlock(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitBlock" ):
                listener.exitBlock(self)




    def block(self):

        localctx = decafJavierParser.BlockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 127
            self.match(decafJavierParser.LCURLY)
            self.state = 131
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==decafJavierParser.BOOLEAN or _la==decafJavierParser.INT:
                self.state = 128
                self.vardeclr()
                self.state = 133
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 137
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << decafJavierParser.IF) | (1 << decafJavierParser.FOR) | (1 << decafJavierParser.RETURN) | (1 << decafJavierParser.BREAK) | (1 << decafJavierParser.CALLOUT) | (1 << decafJavierParser.ID))) != 0):
                self.state = 134
                self.statement()
                self.state = 139
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 140
            self.match(decafJavierParser.RCURLY)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class StatementContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def location(self):
            return self.getTypedRuleContext(decafJavierParser.LocationContext,0)


        def assign_op(self):
            return self.getTypedRuleContext(decafJavierParser.Assign_opContext,0)


        def expr(self):
            return self.getTypedRuleContext(decafJavierParser.ExprContext,0)


        def SEMICOLON(self):
            return self.getToken(decafJavierParser.SEMICOLON, 0)

        def method_call(self):
            return self.getTypedRuleContext(decafJavierParser.Method_callContext,0)


        def IF(self):
            return self.getToken(decafJavierParser.IF, 0)

        def LROUND(self):
            return self.getToken(decafJavierParser.LROUND, 0)

        def RROUND(self):
            return self.getToken(decafJavierParser.RROUND, 0)

        def block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(decafJavierParser.BlockContext)
            else:
                return self.getTypedRuleContext(decafJavierParser.BlockContext,i)


        def ELSE(self):
            return self.getToken(decafJavierParser.ELSE, 0)

        def var_id(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(decafJavierParser.Var_idContext)
            else:
                return self.getTypedRuleContext(decafJavierParser.Var_idContext,i)


        def EQUAL_OP(self, i:int=None):
            if i is None:
                return self.getTokens(decafJavierParser.EQUAL_OP)
            else:
                return self.getToken(decafJavierParser.EQUAL_OP, i)

        def RETURN(self):
            return self.getToken(decafJavierParser.RETURN, 0)

        def FOR(self):
            return self.getToken(decafJavierParser.FOR, 0)

        def COMMA(self):
            return self.getToken(decafJavierParser.COMMA, 0)

        def int_literal(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(decafJavierParser.Int_literalContext)
            else:
                return self.getTypedRuleContext(decafJavierParser.Int_literalContext,i)


        def BREAK(self):
            return self.getToken(decafJavierParser.BREAK, 0)

        def getRuleIndex(self):
            return decafJavierParser.RULE_statement

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterStatement" ):
                listener.enterStatement(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitStatement" ):
                listener.exitStatement(self)




    def statement(self):

        localctx = decafJavierParser.StatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_statement)
        self._la = 0 # Token type
        try:
            self.state = 189
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,14,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 142
                self.location()
                self.state = 143
                self.assign_op()
                self.state = 144
                self.expr(0)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 146
                self.location()
                self.state = 147
                self.assign_op()
                self.state = 148
                self.expr(0)
                self.state = 149
                self.match(decafJavierParser.SEMICOLON)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 151
                self.method_call()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 152
                self.match(decafJavierParser.IF)
                self.state = 153
                self.match(decafJavierParser.LROUND)
                self.state = 154
                self.expr(0)
                self.state = 155
                self.match(decafJavierParser.RROUND)
                self.state = 156
                self.block()
                self.state = 159
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==decafJavierParser.ELSE:
                    self.state = 157
                    self.match(decafJavierParser.ELSE)
                    self.state = 158
                    self.block()


                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 161
                self.var_id()
                self.state = 162
                self.match(decafJavierParser.EQUAL_OP)
                self.state = 163
                self.expr(0)
                self.state = 164
                self.match(decafJavierParser.SEMICOLON)
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 166
                self.match(decafJavierParser.RETURN)
                self.state = 167
                self.expr(0)
                self.state = 168
                self.match(decafJavierParser.SEMICOLON)
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 170
                self.match(decafJavierParser.FOR)
                self.state = 171
                self.var_id()
                self.state = 174
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==decafJavierParser.EQUAL_OP:
                    self.state = 172
                    self.match(decafJavierParser.EQUAL_OP)
                    self.state = 173
                    self.int_literal()


                self.state = 176
                self.match(decafJavierParser.COMMA)
                self.state = 183
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [decafJavierParser.ID]:
                    self.state = 177
                    self.var_id()
                    self.state = 180
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==decafJavierParser.EQUAL_OP:
                        self.state = 178
                        self.match(decafJavierParser.EQUAL_OP)
                        self.state = 179
                        self.int_literal()


                    pass
                elif token in [decafJavierParser.DECIMAL_LITERAL, decafJavierParser.HEX_LITERAL]:
                    self.state = 182
                    self.int_literal()
                    pass
                else:
                    raise NoViableAltException(self)

                self.state = 185
                self.block()
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 187
                self.match(decafJavierParser.BREAK)
                self.state = 188
                self.match(decafJavierParser.SEMICOLON)
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Method_call_interContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def method_name(self):
            return self.getTypedRuleContext(decafJavierParser.Method_nameContext,0)


        def LROUND(self):
            return self.getToken(decafJavierParser.LROUND, 0)

        def RROUND(self):
            return self.getToken(decafJavierParser.RROUND, 0)

        def expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(decafJavierParser.ExprContext)
            else:
                return self.getTypedRuleContext(decafJavierParser.ExprContext,i)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(decafJavierParser.COMMA)
            else:
                return self.getToken(decafJavierParser.COMMA, i)

        def getRuleIndex(self):
            return decafJavierParser.RULE_method_call_inter

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterMethod_call_inter" ):
                listener.enterMethod_call_inter(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitMethod_call_inter" ):
                listener.exitMethod_call_inter(self)




    def method_call_inter(self):

        localctx = decafJavierParser.Method_call_interContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_method_call_inter)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 191
            self.method_name()
            self.state = 192
            self.match(decafJavierParser.LROUND)
            self.state = 201
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << decafJavierParser.CALLOUT) | (1 << decafJavierParser.LROUND) | (1 << decafJavierParser.SUB) | (1 << decafJavierParser.NOT) | (1 << decafJavierParser.ID) | (1 << decafJavierParser.CHAR_LITERAL) | (1 << decafJavierParser.DECIMAL_LITERAL) | (1 << decafJavierParser.HEX_LITERAL) | (1 << decafJavierParser.BOOL_LITERAL))) != 0):
                self.state = 193
                self.expr(0)
                self.state = 198
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==decafJavierParser.COMMA:
                    self.state = 194
                    self.match(decafJavierParser.COMMA)
                    self.state = 195
                    self.expr(0)
                    self.state = 200
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)



            self.state = 203
            self.match(decafJavierParser.RROUND)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Method_callContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def method_call_inter(self):
            return self.getTypedRuleContext(decafJavierParser.Method_call_interContext,0)


        def SEMICOLON(self):
            return self.getToken(decafJavierParser.SEMICOLON, 0)

        def CALLOUT(self):
            return self.getToken(decafJavierParser.CALLOUT, 0)

        def LROUND(self):
            return self.getToken(decafJavierParser.LROUND, 0)

        def STRING_LITERAL(self):
            return self.getToken(decafJavierParser.STRING_LITERAL, 0)

        def RROUND(self):
            return self.getToken(decafJavierParser.RROUND, 0)

        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(decafJavierParser.COMMA)
            else:
                return self.getToken(decafJavierParser.COMMA, i)

        def callout_arg(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(decafJavierParser.Callout_argContext)
            else:
                return self.getTypedRuleContext(decafJavierParser.Callout_argContext,i)


        def getRuleIndex(self):
            return decafJavierParser.RULE_method_call

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterMethod_call" ):
                listener.enterMethod_call(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitMethod_call" ):
                listener.exitMethod_call(self)




    def method_call(self):

        localctx = decafJavierParser.Method_callContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_method_call)
        self._la = 0 # Token type
        try:
            self.state = 225
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,19,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 205
                self.method_call_inter()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 206
                self.method_call_inter()
                self.state = 207
                self.match(decafJavierParser.SEMICOLON)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 209
                self.match(decafJavierParser.CALLOUT)
                self.state = 210
                self.match(decafJavierParser.LROUND)
                self.state = 211
                self.match(decafJavierParser.STRING_LITERAL)
                self.state = 221
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==decafJavierParser.COMMA:
                    self.state = 212
                    self.match(decafJavierParser.COMMA)
                    self.state = 213
                    self.callout_arg()
                    self.state = 218
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    while _la==decafJavierParser.COMMA:
                        self.state = 214
                        self.match(decafJavierParser.COMMA)
                        self.state = 215
                        self.callout_arg()
                        self.state = 220
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)



                self.state = 223
                self.match(decafJavierParser.RROUND)
                self.state = 224
                self.match(decafJavierParser.SEMICOLON)
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def location(self):
            return self.getTypedRuleContext(decafJavierParser.LocationContext,0)


        def literal(self):
            return self.getTypedRuleContext(decafJavierParser.LiteralContext,0)


        def SUB(self):
            return self.getToken(decafJavierParser.SUB, 0)

        def expr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(decafJavierParser.ExprContext)
            else:
                return self.getTypedRuleContext(decafJavierParser.ExprContext,i)


        def method_call(self):
            return self.getTypedRuleContext(decafJavierParser.Method_callContext,0)


        def NOT(self):
            return self.getToken(decafJavierParser.NOT, 0)

        def LROUND(self):
            return self.getToken(decafJavierParser.LROUND, 0)

        def RROUND(self):
            return self.getToken(decafJavierParser.RROUND, 0)

        def bin_op(self):
            return self.getTypedRuleContext(decafJavierParser.Bin_opContext,0)


        def getRuleIndex(self):
            return decafJavierParser.RULE_expr

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterExpr" ):
                listener.enterExpr(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitExpr" ):
                listener.exitExpr(self)



    def expr(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = decafJavierParser.ExprContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 24
        self.enterRecursionRule(localctx, 24, self.RULE_expr, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 239
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,20,self._ctx)
            if la_ == 1:
                self.state = 228
                self.location()
                pass

            elif la_ == 2:
                self.state = 229
                self.literal()
                pass

            elif la_ == 3:
                self.state = 230
                self.match(decafJavierParser.SUB)
                self.state = 231
                self.expr(4)
                pass

            elif la_ == 4:
                self.state = 232
                self.method_call()
                pass

            elif la_ == 5:
                self.state = 233
                self.match(decafJavierParser.NOT)
                self.state = 234
                self.expr(2)
                pass

            elif la_ == 6:
                self.state = 235
                self.match(decafJavierParser.LROUND)
                self.state = 236
                self.expr(0)
                self.state = 237
                self.match(decafJavierParser.RROUND)
                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 247
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,21,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = decafJavierParser.ExprContext(self, _parentctx, _parentState)
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_expr)
                    self.state = 241
                    if not self.precpred(self._ctx, 5):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 5)")
                    self.state = 242
                    self.bin_op()
                    self.state = 243
                    self.expr(6) 
                self.state = 249
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,21,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx


    class LocationContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def var_id(self):
            return self.getTypedRuleContext(decafJavierParser.Var_idContext,0)


        def array_id(self):
            return self.getTypedRuleContext(decafJavierParser.Array_idContext,0)


        def getRuleIndex(self):
            return decafJavierParser.RULE_location

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterLocation" ):
                listener.enterLocation(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitLocation" ):
                listener.exitLocation(self)




    def location(self):

        localctx = decafJavierParser.LocationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_location)
        try:
            self.state = 252
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,22,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 250
                self.var_id()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 251
                self.array_id()
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Callout_argContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def expr(self):
            return self.getTypedRuleContext(decafJavierParser.ExprContext,0)


        def STRING_LITERAL(self):
            return self.getToken(decafJavierParser.STRING_LITERAL, 0)

        def getRuleIndex(self):
            return decafJavierParser.RULE_callout_arg

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterCallout_arg" ):
                listener.enterCallout_arg(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitCallout_arg" ):
                listener.exitCallout_arg(self)




    def callout_arg(self):

        localctx = decafJavierParser.Callout_argContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_callout_arg)
        try:
            self.state = 256
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [decafJavierParser.CALLOUT, decafJavierParser.LROUND, decafJavierParser.SUB, decafJavierParser.NOT, decafJavierParser.ID, decafJavierParser.CHAR_LITERAL, decafJavierParser.DECIMAL_LITERAL, decafJavierParser.HEX_LITERAL, decafJavierParser.BOOL_LITERAL]:
                self.enterOuterAlt(localctx, 1)
                self.state = 254
                self.expr(0)
                pass
            elif token in [decafJavierParser.STRING_LITERAL]:
                self.enterOuterAlt(localctx, 2)
                self.state = 255
                self.match(decafJavierParser.STRING_LITERAL)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Int_literalContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def DECIMAL_LITERAL(self):
            return self.getToken(decafJavierParser.DECIMAL_LITERAL, 0)

        def HEX_LITERAL(self):
            return self.getToken(decafJavierParser.HEX_LITERAL, 0)

        def getRuleIndex(self):
            return decafJavierParser.RULE_int_literal

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterInt_literal" ):
                listener.enterInt_literal(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitInt_literal" ):
                listener.exitInt_literal(self)




    def int_literal(self):

        localctx = decafJavierParser.Int_literalContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_int_literal)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 258
            _la = self._input.LA(1)
            if not(_la==decafJavierParser.DECIMAL_LITERAL or _la==decafJavierParser.HEX_LITERAL):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Rel_opContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def GREATER_OP(self):
            return self.getToken(decafJavierParser.GREATER_OP, 0)

        def LESS_OP(self):
            return self.getToken(decafJavierParser.LESS_OP, 0)

        def LESS_eq_op(self):
            return self.getToken(decafJavierParser.LESS_eq_op, 0)

        def GREATER_eq_op(self):
            return self.getToken(decafJavierParser.GREATER_eq_op, 0)

        def getRuleIndex(self):
            return decafJavierParser.RULE_rel_op

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterRel_op" ):
                listener.enterRel_op(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitRel_op" ):
                listener.exitRel_op(self)




    def rel_op(self):

        localctx = decafJavierParser.Rel_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_rel_op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 260
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << decafJavierParser.GREATER_OP) | (1 << decafJavierParser.LESS_OP) | (1 << decafJavierParser.GREATER_eq_op) | (1 << decafJavierParser.LESS_eq_op))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Eq_opContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def EQUALITY_OP(self):
            return self.getToken(decafJavierParser.EQUALITY_OP, 0)

        def UNEQUALITY_OP(self):
            return self.getToken(decafJavierParser.UNEQUALITY_OP, 0)

        def getRuleIndex(self):
            return decafJavierParser.RULE_eq_op

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterEq_op" ):
                listener.enterEq_op(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitEq_op" ):
                listener.exitEq_op(self)




    def eq_op(self):

        localctx = decafJavierParser.Eq_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_eq_op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 262
            _la = self._input.LA(1)
            if not(_la==decafJavierParser.EQUALITY_OP or _la==decafJavierParser.UNEQUALITY_OP):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Cond_opContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def AND(self):
            return self.getToken(decafJavierParser.AND, 0)

        def OR(self):
            return self.getToken(decafJavierParser.OR, 0)

        def getRuleIndex(self):
            return decafJavierParser.RULE_cond_op

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterCond_op" ):
                listener.enterCond_op(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitCond_op" ):
                listener.exitCond_op(self)




    def cond_op(self):

        localctx = decafJavierParser.Cond_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_cond_op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 264
            _la = self._input.LA(1)
            if not(_la==decafJavierParser.AND or _la==decafJavierParser.OR):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class LiteralContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def int_literal(self):
            return self.getTypedRuleContext(decafJavierParser.Int_literalContext,0)


        def CHAR_LITERAL(self):
            return self.getToken(decafJavierParser.CHAR_LITERAL, 0)

        def BOOL_LITERAL(self):
            return self.getToken(decafJavierParser.BOOL_LITERAL, 0)

        def getRuleIndex(self):
            return decafJavierParser.RULE_literal

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterLiteral" ):
                listener.enterLiteral(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitLiteral" ):
                listener.exitLiteral(self)




    def literal(self):

        localctx = decafJavierParser.LiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_literal)
        try:
            self.state = 269
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [decafJavierParser.DECIMAL_LITERAL, decafJavierParser.HEX_LITERAL]:
                self.enterOuterAlt(localctx, 1)
                self.state = 266
                self.int_literal()
                pass
            elif token in [decafJavierParser.CHAR_LITERAL]:
                self.enterOuterAlt(localctx, 2)
                self.state = 267
                self.match(decafJavierParser.CHAR_LITERAL)
                pass
            elif token in [decafJavierParser.BOOL_LITERAL]:
                self.enterOuterAlt(localctx, 3)
                self.state = 268
                self.match(decafJavierParser.BOOL_LITERAL)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Bin_opContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def arith_op(self):
            return self.getTypedRuleContext(decafJavierParser.Arith_opContext,0)


        def rel_op(self):
            return self.getTypedRuleContext(decafJavierParser.Rel_opContext,0)


        def eq_op(self):
            return self.getTypedRuleContext(decafJavierParser.Eq_opContext,0)


        def cond_op(self):
            return self.getTypedRuleContext(decafJavierParser.Cond_opContext,0)


        def getRuleIndex(self):
            return decafJavierParser.RULE_bin_op

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterBin_op" ):
                listener.enterBin_op(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitBin_op" ):
                listener.exitBin_op(self)




    def bin_op(self):

        localctx = decafJavierParser.Bin_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_bin_op)
        try:
            self.state = 275
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [decafJavierParser.ADD, decafJavierParser.SUB, decafJavierParser.MULTIPLY, decafJavierParser.DIVIDE, decafJavierParser.REMINDER]:
                self.enterOuterAlt(localctx, 1)
                self.state = 271
                self.arith_op()
                pass
            elif token in [decafJavierParser.GREATER_OP, decafJavierParser.LESS_OP, decafJavierParser.GREATER_eq_op, decafJavierParser.LESS_eq_op]:
                self.enterOuterAlt(localctx, 2)
                self.state = 272
                self.rel_op()
                pass
            elif token in [decafJavierParser.EQUALITY_OP, decafJavierParser.UNEQUALITY_OP]:
                self.enterOuterAlt(localctx, 3)
                self.state = 273
                self.eq_op()
                pass
            elif token in [decafJavierParser.AND, decafJavierParser.OR]:
                self.enterOuterAlt(localctx, 4)
                self.state = 274
                self.cond_op()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Arith_opContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ADD(self):
            return self.getToken(decafJavierParser.ADD, 0)

        def SUB(self):
            return self.getToken(decafJavierParser.SUB, 0)

        def MULTIPLY(self):
            return self.getToken(decafJavierParser.MULTIPLY, 0)

        def DIVIDE(self):
            return self.getToken(decafJavierParser.DIVIDE, 0)

        def REMINDER(self):
            return self.getToken(decafJavierParser.REMINDER, 0)

        def getRuleIndex(self):
            return decafJavierParser.RULE_arith_op

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterArith_op" ):
                listener.enterArith_op(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitArith_op" ):
                listener.exitArith_op(self)




    def arith_op(self):

        localctx = decafJavierParser.Arith_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_arith_op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 277
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << decafJavierParser.ADD) | (1 << decafJavierParser.SUB) | (1 << decafJavierParser.MULTIPLY) | (1 << decafJavierParser.DIVIDE) | (1 << decafJavierParser.REMINDER))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Var_typeContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def INT(self):
            return self.getToken(decafJavierParser.INT, 0)

        def BOOLEAN(self):
            return self.getToken(decafJavierParser.BOOLEAN, 0)

        def getRuleIndex(self):
            return decafJavierParser.RULE_var_type

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVar_type" ):
                listener.enterVar_type(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVar_type" ):
                listener.exitVar_type(self)




    def var_type(self):

        localctx = decafJavierParser.Var_typeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_var_type)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 279
            _la = self._input.LA(1)
            if not(_la==decafJavierParser.BOOLEAN or _la==decafJavierParser.INT):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Assign_opContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def EQUAL_OP(self):
            return self.getToken(decafJavierParser.EQUAL_OP, 0)

        def ADD_eq_op(self):
            return self.getToken(decafJavierParser.ADD_eq_op, 0)

        def SUB_eq_op(self):
            return self.getToken(decafJavierParser.SUB_eq_op, 0)

        def getRuleIndex(self):
            return decafJavierParser.RULE_assign_op

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterAssign_op" ):
                listener.enterAssign_op(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitAssign_op" ):
                listener.exitAssign_op(self)




    def assign_op(self):

        localctx = decafJavierParser.Assign_opContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_assign_op)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 281
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << decafJavierParser.EQUAL_OP) | (1 << decafJavierParser.ADD_eq_op) | (1 << decafJavierParser.SUB_eq_op))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Method_nameContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ID(self):
            return self.getToken(decafJavierParser.ID, 0)

        def getRuleIndex(self):
            return decafJavierParser.RULE_method_name

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterMethod_name" ):
                listener.enterMethod_name(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitMethod_name" ):
                listener.exitMethod_name(self)




    def method_name(self):

        localctx = decafJavierParser.Method_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_method_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 283
            self.match(decafJavierParser.ID)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx



    def sempred(self, localctx:RuleContext, ruleIndex:int, predIndex:int):
        if self._predicates == None:
            self._predicates = dict()
        self._predicates[12] = self.expr_sempred
        pred = self._predicates.get(ruleIndex, None)
        if pred is None:
            raise Exception("No predicate with index:" + str(ruleIndex))
        else:
            return pred(localctx, predIndex)

    def expr_sempred(self, localctx:ExprContext, predIndex:int):
            if predIndex == 0:
                return self.precpred(self._ctx, 5)
         




