# Generated from /Users/tom/Code/soda-core/soda/core/soda/sodacl/antlr/SodaCLAntlr.g4 by ANTLR 4.9.3
# 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\38")
        buf.write("\u0177\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\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36")
        buf.write("\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t")
        buf.write("&\4\'\t\'\4(\t(\3\2\3\2\3\2\3\2\3\2\5\2V\n\2\3\3\3\3\3")
        buf.write("\3\3\3\5\3\\\n\3\3\3\3\3\3\3\3\3\5\3b\n\3\3\3\3\3\3\4")
        buf.write("\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\6\3\6\3\6\3\7\3\7\3\7\3")
        buf.write("\7\3\7\5\7v\n\7\3\7\3\7\3\7\3\7\5\7|\n\7\3\7\3\7\3\b\3")
        buf.write("\b\5\b\u0082\n\b\3\b\3\b\3\b\3\b\5\b\u0088\n\b\5\b\u008a")
        buf.write("\n\b\3\b\3\b\3\t\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\5\n\u0097")
        buf.write("\n\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3")
        buf.write("\13\5\13\u00a4\n\13\3\f\3\f\3\r\3\r\3\16\3\16\5\16\u00ac")
        buf.write("\n\16\3\17\3\17\3\20\3\20\3\20\3\20\3\20\7\20\u00b5\n")
        buf.write("\20\f\20\16\20\u00b8\13\20\3\20\3\20\3\21\3\21\5\21\u00be")
        buf.write("\n\21\3\22\3\22\5\22\u00c2\n\22\3\23\3\23\5\23\u00c6\n")
        buf.write("\23\3\23\3\23\3\23\5\23\u00cb\n\23\3\23\3\23\3\23\3\23")
        buf.write("\3\23\3\23\5\23\u00d3\n\23\3\24\3\24\3\24\3\24\3\25\3")
        buf.write("\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\6\25\u00e2\n\25")
        buf.write("\r\25\16\25\u00e3\3\25\3\25\3\26\3\26\3\27\3\27\3\30\3")
        buf.write("\30\3\31\3\31\5\31\u00f0\n\31\3\31\5\31\u00f3\n\31\3\31")
        buf.write("\5\31\u00f6\n\31\3\32\3\32\3\32\6\32\u00fb\n\32\r\32\16")
        buf.write("\32\u00fc\3\32\5\32\u0100\n\32\3\33\3\33\3\33\3\33\3\33")
        buf.write("\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33")
        buf.write("\3\33\7\33\u0113\n\33\f\33\16\33\u0116\13\33\3\33\3\33")
        buf.write("\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\7\33\u0123")
        buf.write("\n\33\f\33\16\33\u0126\13\33\3\33\3\33\5\33\u012a\n\33")
        buf.write("\3\34\3\34\3\35\3\35\3\36\3\36\3\36\3\36\3\36\5\36\u0135")
        buf.write("\n\36\3\37\3\37\3\37\3\37\3\37\5\37\u013c\n\37\3\37\3")
        buf.write("\37\3 \3 \3 \3 \3!\3!\3!\3!\3!\3!\3!\3\"\3\"\3\"\3\"\3")
        buf.write("\"\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\5#\u015a\n#\3$\3$\3$")
        buf.write("\3$\3$\3%\5%\u0162\n%\3%\3%\3&\3&\3&\3&\5&\u016a\n&\3")
        buf.write("&\5&\u016d\n&\3&\3&\5&\u0171\n&\3\'\3\'\3(\3(\3(\2\2)")
        buf.write("\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62")
        buf.write("\64\668:<>@BDFHJLN\2\13\3\2 \"\4\2##\'\'\4\2$$((\3\2\33")
        buf.write("\35\4\2//\62\62\3\2-\63\3\2\n\f\3\2+,\4\2 \"\64\66\2\u0179")
        buf.write("\2U\3\2\2\2\4W\3\2\2\2\6e\3\2\2\2\bj\3\2\2\2\nm\3\2\2")
        buf.write("\2\fp\3\2\2\2\16\u0081\3\2\2\2\20\u008d\3\2\2\2\22\u0091")
        buf.write("\3\2\2\2\24\u00a3\3\2\2\2\26\u00a5\3\2\2\2\30\u00a7\3")
        buf.write("\2\2\2\32\u00a9\3\2\2\2\34\u00ad\3\2\2\2\36\u00af\3\2")
        buf.write("\2\2 \u00bd\3\2\2\2\"\u00c1\3\2\2\2$\u00c5\3\2\2\2&\u00d4")
        buf.write("\3\2\2\2(\u00e1\3\2\2\2*\u00e7\3\2\2\2,\u00e9\3\2\2\2")
        buf.write(".\u00eb\3\2\2\2\60\u00f5\3\2\2\2\62\u00fa\3\2\2\2\64\u0129")
        buf.write("\3\2\2\2\66\u012b\3\2\2\28\u012d\3\2\2\2:\u0134\3\2\2")
        buf.write("\2<\u0136\3\2\2\2>\u013f\3\2\2\2@\u0143\3\2\2\2B\u014a")
        buf.write("\3\2\2\2D\u0159\3\2\2\2F\u015b\3\2\2\2H\u0161\3\2\2\2")
        buf.write("J\u0170\3\2\2\2L\u0172\3\2\2\2N\u0174\3\2\2\2PV\5\n\6")
        buf.write("\2QV\5\f\7\2RV\5\16\b\2SV\5\64\33\2TV\5\4\3\2UP\3\2\2")
        buf.write("\2UQ\3\2\2\2UR\3\2\2\2US\3\2\2\2UT\3\2\2\2V\3\3\2\2\2")
        buf.write("WX\7\3\2\2XY\78\2\2Y[\5N(\2Z\\\5\6\4\2[Z\3\2\2\2[\\\3")
        buf.write("\2\2\2\\a\3\2\2\2]^\78\2\2^_\7\62\2\2_`\78\2\2`b\5\62")
        buf.write("\32\2a]\3\2\2\2ab\3\2\2\2bc\3\2\2\2cd\7\2\2\3d\5\3\2\2")
        buf.write("\2ef\78\2\2fg\7\4\2\2gh\78\2\2hi\5N(\2i\7\3\2\2\2jk\7")
        buf.write("8\2\2kl\7\33\2\2l\t\3\2\2\2mn\7\64\2\2no\7\2\2\3o\13\3")
        buf.write("\2\2\2pq\7\5\2\2qr\78\2\2ru\5N(\2st\78\2\2tv\5> \2us\3")
        buf.write("\2\2\2uv\3\2\2\2v{\3\2\2\2wx\78\2\2xy\7\32\2\2yz\78\2")
        buf.write("\2z|\5N(\2{w\3\2\2\2{|\3\2\2\2|}\3\2\2\2}~\7\2\2\3~\r")
        buf.write("\3\2\2\2\177\u0082\5\22\n\2\u0080\u0082\5\30\r\2\u0081")
        buf.write("\177\3\2\2\2\u0081\u0080\3\2\2\2\u0081\u0082\3\2\2\2\u0082")
        buf.write("\u0083\3\2\2\2\u0083\u0089\5\32\16\2\u0084\u0087\78\2")
        buf.write("\2\u0085\u0088\5\"\22\2\u0086\u0088\5\20\t\2\u0087\u0085")
        buf.write("\3\2\2\2\u0087\u0086\3\2\2\2\u0088\u008a\3\2\2\2\u0089")
        buf.write("\u0084\3\2\2\2\u0089\u008a\3\2\2\2\u008a\u008b\3\2\2\2")
        buf.write("\u008b\u008c\7\2\2\3\u008c\17\3\2\2\2\u008d\u008e\7\62")
        buf.write("\2\2\u008e\u008f\78\2\2\u008f\u0090\7\6\2\2\u0090\21\3")
        buf.write("\2\2\2\u0091\u0092\7\36\2\2\u0092\u0096\78\2\2\u0093\u0094")
        buf.write("\5\24\13\2\u0094\u0095\78\2\2\u0095\u0097\3\2\2\2\u0096")
        buf.write("\u0093\3\2\2\2\u0096\u0097\3\2\2\2\u0097\u0098\3\2\2\2")
        buf.write("\u0098\u0099\7\26\2\2\u0099\u009a\78\2\2\u009a\23\3\2")
        buf.write("\2\2\u009b\u009c\5\26\f\2\u009c\u009d\78\2\2\u009d\u009e")
        buf.write("\7\37\2\2\u009e\u009f\78\2\2\u009f\u00a0\5L\'\2\u00a0")
        buf.write("\u00a4\3\2\2\2\u00a1\u00a4\7\7\2\2\u00a2\u00a4\7\b\2\2")
        buf.write("\u00a3\u009b\3\2\2\2\u00a3\u00a1\3\2\2\2\u00a3\u00a2\3")
        buf.write("\2\2\2\u00a4\25\3\2\2\2\u00a5\u00a6\t\2\2\2\u00a6\27\3")
        buf.write("\2\2\2\u00a7\u00a8\7\t\2\2\u00a8\31\3\2\2\2\u00a9\u00ab")
        buf.write("\5\34\17\2\u00aa\u00ac\5\36\20\2\u00ab\u00aa\3\2\2\2\u00ab")
        buf.write("\u00ac\3\2\2\2\u00ac\33\3\2\2\2\u00ad\u00ae\5N(\2\u00ae")
        buf.write("\35\3\2\2\2\u00af\u00b0\7\'\2\2\u00b0\u00b6\5 \21\2\u00b1")
        buf.write("\u00b2\7)\2\2\u00b2\u00b3\78\2\2\u00b3\u00b5\5 \21\2\u00b4")
        buf.write("\u00b1\3\2\2\2\u00b5\u00b8\3\2\2\2\u00b6\u00b4\3\2\2\2")
        buf.write("\u00b6\u00b7\3\2\2\2\u00b7\u00b9\3\2\2\2\u00b8\u00b6\3")
        buf.write("\2\2\2\u00b9\u00ba\7(\2\2\u00ba\37\3\2\2\2\u00bb\u00be")
        buf.write("\5H%\2\u00bc\u00be\5N(\2\u00bd\u00bb\3\2\2\2\u00bd\u00bc")
        buf.write("\3\2\2\2\u00be!\3\2\2\2\u00bf\u00c2\5&\24\2\u00c0\u00c2")
        buf.write("\5$\23\2\u00c1\u00bf\3\2\2\2\u00c1\u00c0\3\2\2\2\u00c2")
        buf.write("#\3\2\2\2\u00c3\u00c4\7\31\2\2\u00c4\u00c6\78\2\2\u00c5")
        buf.write("\u00c3\3\2\2\2\u00c5\u00c6\3\2\2\2\u00c6\u00c7\3\2\2\2")
        buf.write("\u00c7\u00c8\7\30\2\2\u00c8\u00ca\78\2\2\u00c9\u00cb\t")
        buf.write("\3\2\2\u00ca\u00c9\3\2\2\2\u00ca\u00cb\3\2\2\2\u00cb\u00cc")
        buf.write("\3\2\2\2\u00cc\u00cd\5\60\31\2\u00cd\u00ce\78\2\2\u00ce")
        buf.write("\u00cf\7\27\2\2\u00cf\u00d0\78\2\2\u00d0\u00d2\5\60\31")
        buf.write("\2\u00d1\u00d3\t\4\2\2\u00d2\u00d1\3\2\2\2\u00d2\u00d3")
        buf.write("\3\2\2\2\u00d3%\3\2\2\2\u00d4\u00d5\5.\30\2\u00d5\u00d6")
        buf.write("\78\2\2\u00d6\u00d7\5\60\31\2\u00d7\'\3\2\2\2\u00d8\u00d9")
        buf.write("\5*\26\2\u00d9\u00da\78\2\2\u00da\u00db\5,\27\2\u00db")
        buf.write("\u00dc\78\2\2\u00dc\u00dd\5\60\31\2\u00dd\u00de\78\2\2")
        buf.write("\u00de\u00df\5,\27\2\u00df\u00e0\78\2\2\u00e0\u00e2\3")
        buf.write("\2\2\2\u00e1\u00d8\3\2\2\2\u00e2\u00e3\3\2\2\2\u00e3\u00e1")
        buf.write("\3\2\2\2\u00e3\u00e4\3\2\2\2\u00e4\u00e5\3\2\2\2\u00e5")
        buf.write("\u00e6\5*\26\2\u00e6)\3\2\2\2\u00e7\u00e8\t\5\2\2\u00e8")
        buf.write("+\3\2\2\2\u00e9\u00ea\t\6\2\2\u00ea-\3\2\2\2\u00eb\u00ec")
        buf.write("\t\7\2\2\u00ec/\3\2\2\2\u00ed\u00f2\5H%\2\u00ee\u00f0")
        buf.write("\78\2\2\u00ef\u00ee\3\2\2\2\u00ef\u00f0\3\2\2\2\u00f0")
        buf.write("\u00f1\3\2\2\2\u00f1\u00f3\7*\2\2\u00f2\u00ef\3\2\2\2")
        buf.write("\u00f2\u00f3\3\2\2\2\u00f3\u00f6\3\2\2\2\u00f4\u00f6\5")
        buf.write("\62\32\2\u00f5\u00ed\3\2\2\2\u00f5\u00f4\3\2\2\2\u00f6")
        buf.write("\61\3\2\2\2\u00f7\u00f8\5L\'\2\u00f8\u00f9\t\b\2\2\u00f9")
        buf.write("\u00fb\3\2\2\2\u00fa\u00f7\3\2\2\2\u00fb\u00fc\3\2\2\2")
        buf.write("\u00fc\u00fa\3\2\2\2\u00fc\u00fd\3\2\2\2\u00fd\u00ff\3")
        buf.write("\2\2\2\u00fe\u0100\5L\'\2\u00ff\u00fe\3\2\2\2\u00ff\u0100")
        buf.write("\3\2\2\2\u0100\63\3\2\2\2\u0101\u0102\7\r\2\2\u0102\u0103")
        buf.write("\78\2\2\u0103\u0104\5\66\34\2\u0104\u0105\78\2\2\u0105")
        buf.write("\u0106\7\16\2\2\u0106\u0107\78\2\2\u0107\u0108\5N(\2\u0108")
        buf.write("\u0109\78\2\2\u0109\u010a\58\35\2\u010a\u012a\3\2\2\2")
        buf.write("\u010b\u010c\7\r\2\2\u010c\u010d\78\2\2\u010d\u010e\7")
        buf.write("\'\2\2\u010e\u0114\5\66\34\2\u010f\u0110\7)\2\2\u0110")
        buf.write("\u0111\78\2\2\u0111\u0113\5\66\34\2\u0112\u010f\3\2\2")
        buf.write("\2\u0113\u0116\3\2\2\2\u0114\u0112\3\2\2\2\u0114\u0115")
        buf.write("\3\2\2\2\u0115\u0117\3\2\2\2\u0116\u0114\3\2\2\2\u0117")
        buf.write("\u0118\7(\2\2\u0118\u0119\78\2\2\u0119\u011a\7\16\2\2")
        buf.write("\u011a\u011b\78\2\2\u011b\u011c\5N(\2\u011c\u011d\78\2")
        buf.write("\2\u011d\u011e\7\'\2\2\u011e\u0124\58\35\2\u011f\u0120")
        buf.write("\7)\2\2\u0120\u0121\78\2\2\u0121\u0123\58\35\2\u0122\u011f")
        buf.write("\3\2\2\2\u0123\u0126\3\2\2\2\u0124\u0122\3\2\2\2\u0124")
        buf.write("\u0125\3\2\2\2\u0125\u0127\3\2\2\2\u0126\u0124\3\2\2\2")
        buf.write("\u0127\u0128\7(\2\2\u0128\u012a\3\2\2\2\u0129\u0101\3")
        buf.write("\2\2\2\u0129\u010b\3\2\2\2\u012a\65\3\2\2\2\u012b\u012c")
        buf.write("\5N(\2\u012c\67\3\2\2\2\u012d\u012e\5N(\2\u012e9\3\2\2")
        buf.write("\2\u012f\u0135\5<\37\2\u0130\u0135\5B\"\2\u0131\u0135")
        buf.write("\5@!\2\u0132\u0135\5D#\2\u0133\u0135\5F$\2\u0134\u012f")
        buf.write("\3\2\2\2\u0134\u0130\3\2\2\2\u0134\u0131\3\2\2\2\u0134")
        buf.write("\u0132\3\2\2\2\u0134\u0133\3\2\2\2\u0135;\3\2\2\2\u0136")
        buf.write("\u0137\7\17\2\2\u0137\u0138\78\2\2\u0138\u013b\5N(\2\u0139")
        buf.write("\u013a\78\2\2\u013a\u013c\5> \2\u013b\u0139\3\2\2\2\u013b")
        buf.write("\u013c\3\2\2\2\u013c\u013d\3\2\2\2\u013d\u013e\7\2\2\3")
        buf.write("\u013e=\3\2\2\2\u013f\u0140\7#\2\2\u0140\u0141\5N(\2\u0141")
        buf.write("\u0142\7$\2\2\u0142?\3\2\2\2\u0143\u0144\7\20\2\2\u0144")
        buf.write("\u0145\78\2\2\u0145\u0146\5N(\2\u0146\u0147\78\2\2\u0147")
        buf.write("\u0148\5> \2\u0148\u0149\7\2\2\3\u0149A\3\2\2\2\u014a")
        buf.write("\u014b\7\21\2\2\u014b\u014c\78\2\2\u014c\u014d\5N(\2\u014d")
        buf.write("\u014e\7\2\2\3\u014eC\3\2\2\2\u014f\u0150\7\22\2\2\u0150")
        buf.write("\u0151\78\2\2\u0151\u0152\5N(\2\u0152\u0153\7\2\2\3\u0153")
        buf.write("\u015a\3\2\2\2\u0154\u0155\7\23\2\2\u0155\u0156\78\2\2")
        buf.write("\u0156\u0157\5N(\2\u0157\u0158\7\2\2\3\u0158\u015a\3\2")
        buf.write("\2\2\u0159\u014f\3\2\2\2\u0159\u0154\3\2\2\2\u015aE\3")
        buf.write("\2\2\2\u015b\u015c\7\24\2\2\u015c\u015d\78\2\2\u015d\u015e")
        buf.write("\5N(\2\u015e\u015f\7\2\2\3\u015fG\3\2\2\2\u0160\u0162")
        buf.write("\t\t\2\2\u0161\u0160\3\2\2\2\u0161\u0162\3\2\2\2\u0162")
        buf.write("\u0163\3\2\2\2\u0163\u0164\5J&\2\u0164I\3\2\2\2\u0165")
        buf.write("\u0171\5L\'\2\u0166\u0167\7\67\2\2\u0167\u0169\7\25\2")
        buf.write("\2\u0168\u016a\7\67\2\2\u0169\u0168\3\2\2\2\u0169\u016a")
        buf.write("\3\2\2\2\u016a\u0171\3\2\2\2\u016b\u016d\7\67\2\2\u016c")
        buf.write("\u016b\3\2\2\2\u016c\u016d\3\2\2\2\u016d\u016e\3\2\2\2")
        buf.write("\u016e\u016f\7\25\2\2\u016f\u0171\7\67\2\2\u0170\u0165")
        buf.write("\3\2\2\2\u0170\u0166\3\2\2\2\u0170\u016c\3\2\2\2\u0171")
        buf.write("K\3\2\2\2\u0172\u0173\7\67\2\2\u0173M\3\2\2\2\u0174\u0175")
        buf.write("\t\n\2\2\u0175O\3\2\2\2#U[au{\u0081\u0087\u0089\u0096")
        buf.write("\u00a3\u00ab\u00b6\u00bd\u00c1\u00c5\u00ca\u00d2\u00e3")
        buf.write("\u00ef\u00f2\u00f5\u00fc\u00ff\u0114\u0124\u0129\u0134")
        buf.write("\u013b\u0159\u0161\u0169\u016c\u0170")
        return buf.getvalue()


class SodaCLAntlrParser ( Parser ):

    grammarFileName = "SodaCLAntlr.g4"

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

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

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "'freshness using'", "'with'", "'row_count same as'", 
                     "'default'", "'same day last week'", "'same day last month'", 
                     "'anomaly score for '", "'d'", "'h'", "'m'", "'values in'", 
                     "'must exist in'", "'checks for'", "'filter'", "'configurations for'", 
                     "'for each dataset'", "'for each table'", "'for each column'", 
                     "'.'", "'for'", "'and'", "'between'", "'not'", "'in'", 
                     "'warn'", "'fail'", "'pass'", "'change'", "'last'", 
                     "'avg'", "'min'", "'max'", "'['", "']'", "'{'", "'}'", 
                     "'('", "')'", "','", "'%'", "'+'", "'-'", "'!='", "'<>'", 
                     "'<='", "'>='", "'='", "'<'", "'>'", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "' '" ]

    symbolicNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "FOR", "AND", "BETWEEN", "NOT", "IN", "WARN", "FAIL", 
                      "PASS", "CHANGE", "LAST", "AVG", "MIN", "MAX", "SQUARE_LEFT", 
                      "SQUARE_RIGHT", "CURLY_LEFT", "CURLY_RIGHT", "ROUND_LEFT", 
                      "ROUND_RIGHT", "COMMA", "PERCENT", "PLUS", "MINUS", 
                      "NOT_EQUAL", "NOT_EQUAL_SQL", "LTE", "GTE", "EQUAL", 
                      "LT", "GT", "IDENTIFIER_DOUBLE_QUOTE", "IDENTIFIER_BACKTICK", 
                      "IDENTIFIER_UNQUOTED", "DIGITS", "S" ]

    RULE_check = 0
    RULE_freshness_check = 1
    RULE_freshness_variable = 2
    RULE_warn_qualifier = 3
    RULE_failed_rows_check = 4
    RULE_row_count_comparison_check = 5
    RULE_metric_check = 6
    RULE_default_anomaly_threshold = 7
    RULE_change_over_time = 8
    RULE_change_over_time_config = 9
    RULE_change_aggregation = 10
    RULE_anomaly_score = 11
    RULE_metric = 12
    RULE_metric_name = 13
    RULE_metric_args = 14
    RULE_metric_arg = 15
    RULE_threshold = 16
    RULE_between_threshold = 17
    RULE_comparator_threshold = 18
    RULE_zones_threshold = 19
    RULE_outcome = 20
    RULE_zone_comparator = 21
    RULE_comparator = 22
    RULE_threshold_value = 23
    RULE_freshness_threshold_value = 24
    RULE_reference_check = 25
    RULE_source_column_name = 26
    RULE_target_column_name = 27
    RULE_section_header = 28
    RULE_table_checks_header = 29
    RULE_partition_name = 30
    RULE_table_filter_header = 31
    RULE_column_configurations_header = 32
    RULE_checks_for_each_dataset_header = 33
    RULE_checks_for_each_column_header = 34
    RULE_signed_number = 35
    RULE_number = 36
    RULE_integer = 37
    RULE_identifier = 38

    ruleNames =  [ "check", "freshness_check", "freshness_variable", "warn_qualifier", 
                   "failed_rows_check", "row_count_comparison_check", "metric_check", 
                   "default_anomaly_threshold", "change_over_time", "change_over_time_config", 
                   "change_aggregation", "anomaly_score", "metric", "metric_name", 
                   "metric_args", "metric_arg", "threshold", "between_threshold", 
                   "comparator_threshold", "zones_threshold", "outcome", 
                   "zone_comparator", "comparator", "threshold_value", "freshness_threshold_value", 
                   "reference_check", "source_column_name", "target_column_name", 
                   "section_header", "table_checks_header", "partition_name", 
                   "table_filter_header", "column_configurations_header", 
                   "checks_for_each_dataset_header", "checks_for_each_column_header", 
                   "signed_number", "number", "integer", "identifier" ]

    EOF = Token.EOF
    T__0=1
    T__1=2
    T__2=3
    T__3=4
    T__4=5
    T__5=6
    T__6=7
    T__7=8
    T__8=9
    T__9=10
    T__10=11
    T__11=12
    T__12=13
    T__13=14
    T__14=15
    T__15=16
    T__16=17
    T__17=18
    T__18=19
    FOR=20
    AND=21
    BETWEEN=22
    NOT=23
    IN=24
    WARN=25
    FAIL=26
    PASS=27
    CHANGE=28
    LAST=29
    AVG=30
    MIN=31
    MAX=32
    SQUARE_LEFT=33
    SQUARE_RIGHT=34
    CURLY_LEFT=35
    CURLY_RIGHT=36
    ROUND_LEFT=37
    ROUND_RIGHT=38
    COMMA=39
    PERCENT=40
    PLUS=41
    MINUS=42
    NOT_EQUAL=43
    NOT_EQUAL_SQL=44
    LTE=45
    GTE=46
    EQUAL=47
    LT=48
    GT=49
    IDENTIFIER_DOUBLE_QUOTE=50
    IDENTIFIER_BACKTICK=51
    IDENTIFIER_UNQUOTED=52
    DIGITS=53
    S=54

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




    class CheckContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def failed_rows_check(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Failed_rows_checkContext,0)


        def row_count_comparison_check(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Row_count_comparison_checkContext,0)


        def metric_check(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Metric_checkContext,0)


        def reference_check(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Reference_checkContext,0)


        def freshness_check(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Freshness_checkContext,0)


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_check

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitCheck" ):
                return visitor.visitCheck(self)
            else:
                return visitor.visitChildren(self)




    def check(self):

        localctx = SodaCLAntlrParser.CheckContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_check)
        try:
            self.state = 83
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,0,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 78
                self.failed_rows_check()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 79
                self.row_count_comparison_check()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 80
                self.metric_check()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 81
                self.reference_check()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 82
                self.freshness_check()
                pass


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


    class Freshness_checkContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def identifier(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.IdentifierContext,0)


        def EOF(self):
            return self.getToken(SodaCLAntlrParser.EOF, 0)

        def freshness_variable(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Freshness_variableContext,0)


        def LT(self):
            return self.getToken(SodaCLAntlrParser.LT, 0)

        def freshness_threshold_value(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Freshness_threshold_valueContext,0)


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_freshness_check

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFreshness_check" ):
                return visitor.visitFreshness_check(self)
            else:
                return visitor.visitChildren(self)




    def freshness_check(self):

        localctx = SodaCLAntlrParser.Freshness_checkContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_freshness_check)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 85
            self.match(SodaCLAntlrParser.T__0)
            self.state = 86
            self.match(SodaCLAntlrParser.S)
            self.state = 87
            self.identifier()
            self.state = 89
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,1,self._ctx)
            if la_ == 1:
                self.state = 88
                self.freshness_variable()


            self.state = 95
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SodaCLAntlrParser.S:
                self.state = 91
                self.match(SodaCLAntlrParser.S)
                self.state = 92
                self.match(SodaCLAntlrParser.LT)
                self.state = 93
                self.match(SodaCLAntlrParser.S)
                self.state = 94
                self.freshness_threshold_value()


            self.state = 97
            self.match(SodaCLAntlrParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Freshness_variableContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def identifier(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.IdentifierContext,0)


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_freshness_variable

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFreshness_variable" ):
                return visitor.visitFreshness_variable(self)
            else:
                return visitor.visitChildren(self)




    def freshness_variable(self):

        localctx = SodaCLAntlrParser.Freshness_variableContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_freshness_variable)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 99
            self.match(SodaCLAntlrParser.S)
            self.state = 100
            self.match(SodaCLAntlrParser.T__1)
            self.state = 101
            self.match(SodaCLAntlrParser.S)
            self.state = 102
            self.identifier()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Warn_qualifierContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def S(self):
            return self.getToken(SodaCLAntlrParser.S, 0)

        def WARN(self):
            return self.getToken(SodaCLAntlrParser.WARN, 0)

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_warn_qualifier

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWarn_qualifier" ):
                return visitor.visitWarn_qualifier(self)
            else:
                return visitor.visitChildren(self)




    def warn_qualifier(self):

        localctx = SodaCLAntlrParser.Warn_qualifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_warn_qualifier)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 104
            self.match(SodaCLAntlrParser.S)
            self.state = 105
            self.match(SodaCLAntlrParser.WARN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Failed_rows_checkContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IDENTIFIER_DOUBLE_QUOTE(self):
            return self.getToken(SodaCLAntlrParser.IDENTIFIER_DOUBLE_QUOTE, 0)

        def EOF(self):
            return self.getToken(SodaCLAntlrParser.EOF, 0)

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_failed_rows_check

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFailed_rows_check" ):
                return visitor.visitFailed_rows_check(self)
            else:
                return visitor.visitChildren(self)




    def failed_rows_check(self):

        localctx = SodaCLAntlrParser.Failed_rows_checkContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_failed_rows_check)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 107
            self.match(SodaCLAntlrParser.IDENTIFIER_DOUBLE_QUOTE)
            self.state = 108
            self.match(SodaCLAntlrParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Row_count_comparison_checkContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SodaCLAntlrParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(SodaCLAntlrParser.IdentifierContext,i)


        def EOF(self):
            return self.getToken(SodaCLAntlrParser.EOF, 0)

        def partition_name(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Partition_nameContext,0)


        def IN(self):
            return self.getToken(SodaCLAntlrParser.IN, 0)

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_row_count_comparison_check

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitRow_count_comparison_check" ):
                return visitor.visitRow_count_comparison_check(self)
            else:
                return visitor.visitChildren(self)




    def row_count_comparison_check(self):

        localctx = SodaCLAntlrParser.Row_count_comparison_checkContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_row_count_comparison_check)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 110
            self.match(SodaCLAntlrParser.T__2)
            self.state = 111
            self.match(SodaCLAntlrParser.S)
            self.state = 112
            self.identifier()
            self.state = 115
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,3,self._ctx)
            if la_ == 1:
                self.state = 113
                self.match(SodaCLAntlrParser.S)
                self.state = 114
                self.partition_name()


            self.state = 121
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SodaCLAntlrParser.S:
                self.state = 117
                self.match(SodaCLAntlrParser.S)
                self.state = 118
                self.match(SodaCLAntlrParser.IN)
                self.state = 119
                self.match(SodaCLAntlrParser.S)
                self.state = 120
                self.identifier()


            self.state = 123
            self.match(SodaCLAntlrParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Metric_checkContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def metric(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.MetricContext,0)


        def EOF(self):
            return self.getToken(SodaCLAntlrParser.EOF, 0)

        def change_over_time(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Change_over_timeContext,0)


        def anomaly_score(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Anomaly_scoreContext,0)


        def S(self):
            return self.getToken(SodaCLAntlrParser.S, 0)

        def threshold(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.ThresholdContext,0)


        def default_anomaly_threshold(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Default_anomaly_thresholdContext,0)


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_metric_check

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitMetric_check" ):
                return visitor.visitMetric_check(self)
            else:
                return visitor.visitChildren(self)




    def metric_check(self):

        localctx = SodaCLAntlrParser.Metric_checkContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_metric_check)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 127
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SodaCLAntlrParser.CHANGE]:
                self.state = 125
                self.change_over_time()
                pass
            elif token in [SodaCLAntlrParser.T__6]:
                self.state = 126
                self.anomaly_score()
                pass
            elif token in [SodaCLAntlrParser.AVG, SodaCLAntlrParser.MIN, SodaCLAntlrParser.MAX, SodaCLAntlrParser.IDENTIFIER_DOUBLE_QUOTE, SodaCLAntlrParser.IDENTIFIER_BACKTICK, SodaCLAntlrParser.IDENTIFIER_UNQUOTED]:
                pass
            else:
                pass
            self.state = 129
            self.metric()
            self.state = 135
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SodaCLAntlrParser.S:
                self.state = 130
                self.match(SodaCLAntlrParser.S)
                self.state = 133
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,6,self._ctx)
                if la_ == 1:
                    self.state = 131
                    self.threshold()
                    pass

                elif la_ == 2:
                    self.state = 132
                    self.default_anomaly_threshold()
                    pass




            self.state = 137
            self.match(SodaCLAntlrParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Default_anomaly_thresholdContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LT(self):
            return self.getToken(SodaCLAntlrParser.LT, 0)

        def S(self):
            return self.getToken(SodaCLAntlrParser.S, 0)

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_default_anomaly_threshold

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitDefault_anomaly_threshold" ):
                return visitor.visitDefault_anomaly_threshold(self)
            else:
                return visitor.visitChildren(self)




    def default_anomaly_threshold(self):

        localctx = SodaCLAntlrParser.Default_anomaly_thresholdContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_default_anomaly_threshold)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 139
            self.match(SodaCLAntlrParser.LT)
            self.state = 140
            self.match(SodaCLAntlrParser.S)
            self.state = 141
            self.match(SodaCLAntlrParser.T__3)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Change_over_timeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def CHANGE(self):
            return self.getToken(SodaCLAntlrParser.CHANGE, 0)

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

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

        def change_over_time_config(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Change_over_time_configContext,0)


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_change_over_time

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitChange_over_time" ):
                return visitor.visitChange_over_time(self)
            else:
                return visitor.visitChildren(self)




    def change_over_time(self):

        localctx = SodaCLAntlrParser.Change_over_timeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_change_over_time)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 143
            self.match(SodaCLAntlrParser.CHANGE)
            self.state = 144
            self.match(SodaCLAntlrParser.S)
            self.state = 148
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << SodaCLAntlrParser.T__4) | (1 << SodaCLAntlrParser.T__5) | (1 << SodaCLAntlrParser.AVG) | (1 << SodaCLAntlrParser.MIN) | (1 << SodaCLAntlrParser.MAX))) != 0):
                self.state = 145
                self.change_over_time_config()
                self.state = 146
                self.match(SodaCLAntlrParser.S)


            self.state = 150
            self.match(SodaCLAntlrParser.FOR)
            self.state = 151
            self.match(SodaCLAntlrParser.S)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Change_over_time_configContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def change_aggregation(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Change_aggregationContext,0)


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

        def LAST(self):
            return self.getToken(SodaCLAntlrParser.LAST, 0)

        def integer(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.IntegerContext,0)


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_change_over_time_config

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitChange_over_time_config" ):
                return visitor.visitChange_over_time_config(self)
            else:
                return visitor.visitChildren(self)




    def change_over_time_config(self):

        localctx = SodaCLAntlrParser.Change_over_time_configContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_change_over_time_config)
        try:
            self.state = 161
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SodaCLAntlrParser.AVG, SodaCLAntlrParser.MIN, SodaCLAntlrParser.MAX]:
                self.enterOuterAlt(localctx, 1)
                self.state = 153
                self.change_aggregation()
                self.state = 154
                self.match(SodaCLAntlrParser.S)
                self.state = 155
                self.match(SodaCLAntlrParser.LAST)
                self.state = 156
                self.match(SodaCLAntlrParser.S)
                self.state = 157
                self.integer()
                pass
            elif token in [SodaCLAntlrParser.T__4]:
                self.enterOuterAlt(localctx, 2)
                self.state = 159
                self.match(SodaCLAntlrParser.T__4)
                pass
            elif token in [SodaCLAntlrParser.T__5]:
                self.enterOuterAlt(localctx, 3)
                self.state = 160
                self.match(SodaCLAntlrParser.T__5)
                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 Change_aggregationContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def AVG(self):
            return self.getToken(SodaCLAntlrParser.AVG, 0)

        def MIN(self):
            return self.getToken(SodaCLAntlrParser.MIN, 0)

        def MAX(self):
            return self.getToken(SodaCLAntlrParser.MAX, 0)

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_change_aggregation

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitChange_aggregation" ):
                return visitor.visitChange_aggregation(self)
            else:
                return visitor.visitChildren(self)




    def change_aggregation(self):

        localctx = SodaCLAntlrParser.Change_aggregationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_change_aggregation)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 163
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << SodaCLAntlrParser.AVG) | (1 << SodaCLAntlrParser.MIN) | (1 << SodaCLAntlrParser.MAX))) != 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 Anomaly_scoreContext(ParserRuleContext):
        __slots__ = 'parser'

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


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_anomaly_score

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitAnomaly_score" ):
                return visitor.visitAnomaly_score(self)
            else:
                return visitor.visitChildren(self)




    def anomaly_score(self):

        localctx = SodaCLAntlrParser.Anomaly_scoreContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_anomaly_score)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 165
            self.match(SodaCLAntlrParser.T__6)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class MetricContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def metric_name(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Metric_nameContext,0)


        def metric_args(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Metric_argsContext,0)


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_metric

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitMetric" ):
                return visitor.visitMetric(self)
            else:
                return visitor.visitChildren(self)




    def metric(self):

        localctx = SodaCLAntlrParser.MetricContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_metric)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 167
            self.metric_name()
            self.state = 169
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SodaCLAntlrParser.ROUND_LEFT:
                self.state = 168
                self.metric_args()


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


    class Metric_nameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def identifier(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.IdentifierContext,0)


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_metric_name

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitMetric_name" ):
                return visitor.visitMetric_name(self)
            else:
                return visitor.visitChildren(self)




    def metric_name(self):

        localctx = SodaCLAntlrParser.Metric_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_metric_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 171
            self.identifier()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Metric_argsContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def ROUND_LEFT(self):
            return self.getToken(SodaCLAntlrParser.ROUND_LEFT, 0)

        def metric_arg(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SodaCLAntlrParser.Metric_argContext)
            else:
                return self.getTypedRuleContext(SodaCLAntlrParser.Metric_argContext,i)


        def ROUND_RIGHT(self):
            return self.getToken(SodaCLAntlrParser.ROUND_RIGHT, 0)

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

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

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_metric_args

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitMetric_args" ):
                return visitor.visitMetric_args(self)
            else:
                return visitor.visitChildren(self)




    def metric_args(self):

        localctx = SodaCLAntlrParser.Metric_argsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_metric_args)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 173
            self.match(SodaCLAntlrParser.ROUND_LEFT)
            self.state = 174
            self.metric_arg()
            self.state = 180
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==SodaCLAntlrParser.COMMA:
                self.state = 175
                self.match(SodaCLAntlrParser.COMMA)
                self.state = 176
                self.match(SodaCLAntlrParser.S)
                self.state = 177
                self.metric_arg()
                self.state = 182
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 183
            self.match(SodaCLAntlrParser.ROUND_RIGHT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Metric_argContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def signed_number(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Signed_numberContext,0)


        def identifier(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.IdentifierContext,0)


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_metric_arg

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitMetric_arg" ):
                return visitor.visitMetric_arg(self)
            else:
                return visitor.visitChildren(self)




    def metric_arg(self):

        localctx = SodaCLAntlrParser.Metric_argContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_metric_arg)
        try:
            self.state = 187
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SodaCLAntlrParser.T__18, SodaCLAntlrParser.PLUS, SodaCLAntlrParser.MINUS, SodaCLAntlrParser.DIGITS]:
                self.enterOuterAlt(localctx, 1)
                self.state = 185
                self.signed_number()
                pass
            elif token in [SodaCLAntlrParser.AVG, SodaCLAntlrParser.MIN, SodaCLAntlrParser.MAX, SodaCLAntlrParser.IDENTIFIER_DOUBLE_QUOTE, SodaCLAntlrParser.IDENTIFIER_BACKTICK, SodaCLAntlrParser.IDENTIFIER_UNQUOTED]:
                self.enterOuterAlt(localctx, 2)
                self.state = 186
                self.identifier()
                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 ThresholdContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def comparator_threshold(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Comparator_thresholdContext,0)


        def between_threshold(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Between_thresholdContext,0)


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_threshold

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitThreshold" ):
                return visitor.visitThreshold(self)
            else:
                return visitor.visitChildren(self)




    def threshold(self):

        localctx = SodaCLAntlrParser.ThresholdContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_threshold)
        try:
            self.state = 191
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SodaCLAntlrParser.NOT_EQUAL, SodaCLAntlrParser.NOT_EQUAL_SQL, SodaCLAntlrParser.LTE, SodaCLAntlrParser.GTE, SodaCLAntlrParser.EQUAL, SodaCLAntlrParser.LT, SodaCLAntlrParser.GT]:
                self.enterOuterAlt(localctx, 1)
                self.state = 189
                self.comparator_threshold()
                pass
            elif token in [SodaCLAntlrParser.BETWEEN, SodaCLAntlrParser.NOT]:
                self.enterOuterAlt(localctx, 2)
                self.state = 190
                self.between_threshold()
                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 Between_thresholdContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def BETWEEN(self):
            return self.getToken(SodaCLAntlrParser.BETWEEN, 0)

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

        def threshold_value(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SodaCLAntlrParser.Threshold_valueContext)
            else:
                return self.getTypedRuleContext(SodaCLAntlrParser.Threshold_valueContext,i)


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

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

        def SQUARE_LEFT(self):
            return self.getToken(SodaCLAntlrParser.SQUARE_LEFT, 0)

        def ROUND_LEFT(self):
            return self.getToken(SodaCLAntlrParser.ROUND_LEFT, 0)

        def SQUARE_RIGHT(self):
            return self.getToken(SodaCLAntlrParser.SQUARE_RIGHT, 0)

        def ROUND_RIGHT(self):
            return self.getToken(SodaCLAntlrParser.ROUND_RIGHT, 0)

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_between_threshold

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitBetween_threshold" ):
                return visitor.visitBetween_threshold(self)
            else:
                return visitor.visitChildren(self)




    def between_threshold(self):

        localctx = SodaCLAntlrParser.Between_thresholdContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_between_threshold)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 195
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SodaCLAntlrParser.NOT:
                self.state = 193
                self.match(SodaCLAntlrParser.NOT)
                self.state = 194
                self.match(SodaCLAntlrParser.S)


            self.state = 197
            self.match(SodaCLAntlrParser.BETWEEN)
            self.state = 198
            self.match(SodaCLAntlrParser.S)
            self.state = 200
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SodaCLAntlrParser.SQUARE_LEFT or _la==SodaCLAntlrParser.ROUND_LEFT:
                self.state = 199
                _la = self._input.LA(1)
                if not(_la==SodaCLAntlrParser.SQUARE_LEFT or _la==SodaCLAntlrParser.ROUND_LEFT):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 202
            self.threshold_value()
            self.state = 203
            self.match(SodaCLAntlrParser.S)
            self.state = 204
            self.match(SodaCLAntlrParser.AND)
            self.state = 205
            self.match(SodaCLAntlrParser.S)
            self.state = 206
            self.threshold_value()
            self.state = 208
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SodaCLAntlrParser.SQUARE_RIGHT or _la==SodaCLAntlrParser.ROUND_RIGHT:
                self.state = 207
                _la = self._input.LA(1)
                if not(_la==SodaCLAntlrParser.SQUARE_RIGHT or _la==SodaCLAntlrParser.ROUND_RIGHT):
                    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 Comparator_thresholdContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def comparator(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.ComparatorContext,0)


        def S(self):
            return self.getToken(SodaCLAntlrParser.S, 0)

        def threshold_value(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Threshold_valueContext,0)


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_comparator_threshold

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitComparator_threshold" ):
                return visitor.visitComparator_threshold(self)
            else:
                return visitor.visitChildren(self)




    def comparator_threshold(self):

        localctx = SodaCLAntlrParser.Comparator_thresholdContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_comparator_threshold)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 210
            self.comparator()
            self.state = 211
            self.match(SodaCLAntlrParser.S)
            self.state = 212
            self.threshold_value()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Zones_thresholdContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def outcome(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SodaCLAntlrParser.OutcomeContext)
            else:
                return self.getTypedRuleContext(SodaCLAntlrParser.OutcomeContext,i)


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

        def zone_comparator(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SodaCLAntlrParser.Zone_comparatorContext)
            else:
                return self.getTypedRuleContext(SodaCLAntlrParser.Zone_comparatorContext,i)


        def threshold_value(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SodaCLAntlrParser.Threshold_valueContext)
            else:
                return self.getTypedRuleContext(SodaCLAntlrParser.Threshold_valueContext,i)


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_zones_threshold

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitZones_threshold" ):
                return visitor.visitZones_threshold(self)
            else:
                return visitor.visitChildren(self)




    def zones_threshold(self):

        localctx = SodaCLAntlrParser.Zones_thresholdContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_zones_threshold)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 223 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 214
                    self.outcome()
                    self.state = 215
                    self.match(SodaCLAntlrParser.S)
                    self.state = 216
                    self.zone_comparator()
                    self.state = 217
                    self.match(SodaCLAntlrParser.S)
                    self.state = 218
                    self.threshold_value()
                    self.state = 219
                    self.match(SodaCLAntlrParser.S)
                    self.state = 220
                    self.zone_comparator()
                    self.state = 221
                    self.match(SodaCLAntlrParser.S)

                else:
                    raise NoViableAltException(self)
                self.state = 225 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,17,self._ctx)

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


    class OutcomeContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def WARN(self):
            return self.getToken(SodaCLAntlrParser.WARN, 0)

        def FAIL(self):
            return self.getToken(SodaCLAntlrParser.FAIL, 0)

        def PASS(self):
            return self.getToken(SodaCLAntlrParser.PASS, 0)

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_outcome

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOutcome" ):
                return visitor.visitOutcome(self)
            else:
                return visitor.visitChildren(self)




    def outcome(self):

        localctx = SodaCLAntlrParser.OutcomeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_outcome)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 229
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << SodaCLAntlrParser.WARN) | (1 << SodaCLAntlrParser.FAIL) | (1 << SodaCLAntlrParser.PASS))) != 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 Zone_comparatorContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LT(self):
            return self.getToken(SodaCLAntlrParser.LT, 0)

        def LTE(self):
            return self.getToken(SodaCLAntlrParser.LTE, 0)

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_zone_comparator

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitZone_comparator" ):
                return visitor.visitZone_comparator(self)
            else:
                return visitor.visitChildren(self)




    def zone_comparator(self):

        localctx = SodaCLAntlrParser.Zone_comparatorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_zone_comparator)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 231
            _la = self._input.LA(1)
            if not(_la==SodaCLAntlrParser.LTE or _la==SodaCLAntlrParser.LT):
                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 ComparatorContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def LT(self):
            return self.getToken(SodaCLAntlrParser.LT, 0)

        def LTE(self):
            return self.getToken(SodaCLAntlrParser.LTE, 0)

        def EQUAL(self):
            return self.getToken(SodaCLAntlrParser.EQUAL, 0)

        def GTE(self):
            return self.getToken(SodaCLAntlrParser.GTE, 0)

        def GT(self):
            return self.getToken(SodaCLAntlrParser.GT, 0)

        def NOT_EQUAL(self):
            return self.getToken(SodaCLAntlrParser.NOT_EQUAL, 0)

        def NOT_EQUAL_SQL(self):
            return self.getToken(SodaCLAntlrParser.NOT_EQUAL_SQL, 0)

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_comparator

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitComparator" ):
                return visitor.visitComparator(self)
            else:
                return visitor.visitChildren(self)




    def comparator(self):

        localctx = SodaCLAntlrParser.ComparatorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_comparator)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 233
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << SodaCLAntlrParser.NOT_EQUAL) | (1 << SodaCLAntlrParser.NOT_EQUAL_SQL) | (1 << SodaCLAntlrParser.LTE) | (1 << SodaCLAntlrParser.GTE) | (1 << SodaCLAntlrParser.EQUAL) | (1 << SodaCLAntlrParser.LT) | (1 << SodaCLAntlrParser.GT))) != 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 Threshold_valueContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def signed_number(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Signed_numberContext,0)


        def PERCENT(self):
            return self.getToken(SodaCLAntlrParser.PERCENT, 0)

        def S(self):
            return self.getToken(SodaCLAntlrParser.S, 0)

        def freshness_threshold_value(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Freshness_threshold_valueContext,0)


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_threshold_value

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitThreshold_value" ):
                return visitor.visitThreshold_value(self)
            else:
                return visitor.visitChildren(self)




    def threshold_value(self):

        localctx = SodaCLAntlrParser.Threshold_valueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_threshold_value)
        self._la = 0 # Token type
        try:
            self.state = 243
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,20,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 235
                self.signed_number()
                self.state = 240
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,19,self._ctx)
                if la_ == 1:
                    self.state = 237
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==SodaCLAntlrParser.S:
                        self.state = 236
                        self.match(SodaCLAntlrParser.S)


                    self.state = 239
                    self.match(SodaCLAntlrParser.PERCENT)


                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 242
                self.freshness_threshold_value()
                pass


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


    class Freshness_threshold_valueContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def integer(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SodaCLAntlrParser.IntegerContext)
            else:
                return self.getTypedRuleContext(SodaCLAntlrParser.IntegerContext,i)


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_freshness_threshold_value

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFreshness_threshold_value" ):
                return visitor.visitFreshness_threshold_value(self)
            else:
                return visitor.visitChildren(self)




    def freshness_threshold_value(self):

        localctx = SodaCLAntlrParser.Freshness_threshold_valueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_freshness_threshold_value)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 248 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 245
                    self.integer()
                    self.state = 246
                    _la = self._input.LA(1)
                    if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << SodaCLAntlrParser.T__7) | (1 << SodaCLAntlrParser.T__8) | (1 << SodaCLAntlrParser.T__9))) != 0)):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()

                else:
                    raise NoViableAltException(self)
                self.state = 250 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,21,self._ctx)

            self.state = 253
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SodaCLAntlrParser.DIGITS:
                self.state = 252
                self.integer()


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


    class Reference_checkContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def source_column_name(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SodaCLAntlrParser.Source_column_nameContext)
            else:
                return self.getTypedRuleContext(SodaCLAntlrParser.Source_column_nameContext,i)


        def identifier(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.IdentifierContext,0)


        def target_column_name(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(SodaCLAntlrParser.Target_column_nameContext)
            else:
                return self.getTypedRuleContext(SodaCLAntlrParser.Target_column_nameContext,i)


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

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

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

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_reference_check

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitReference_check" ):
                return visitor.visitReference_check(self)
            else:
                return visitor.visitChildren(self)




    def reference_check(self):

        localctx = SodaCLAntlrParser.Reference_checkContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_reference_check)
        self._la = 0 # Token type
        try:
            self.state = 295
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,25,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 255
                self.match(SodaCLAntlrParser.T__10)
                self.state = 256
                self.match(SodaCLAntlrParser.S)
                self.state = 257
                self.source_column_name()
                self.state = 258
                self.match(SodaCLAntlrParser.S)
                self.state = 259
                self.match(SodaCLAntlrParser.T__11)
                self.state = 260
                self.match(SodaCLAntlrParser.S)
                self.state = 261
                self.identifier()
                self.state = 262
                self.match(SodaCLAntlrParser.S)
                self.state = 263
                self.target_column_name()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 265
                self.match(SodaCLAntlrParser.T__10)
                self.state = 266
                self.match(SodaCLAntlrParser.S)
                self.state = 267
                self.match(SodaCLAntlrParser.ROUND_LEFT)
                self.state = 268
                self.source_column_name()
                self.state = 274
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==SodaCLAntlrParser.COMMA:
                    self.state = 269
                    self.match(SodaCLAntlrParser.COMMA)
                    self.state = 270
                    self.match(SodaCLAntlrParser.S)
                    self.state = 271
                    self.source_column_name()
                    self.state = 276
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 277
                self.match(SodaCLAntlrParser.ROUND_RIGHT)
                self.state = 278
                self.match(SodaCLAntlrParser.S)
                self.state = 279
                self.match(SodaCLAntlrParser.T__11)
                self.state = 280
                self.match(SodaCLAntlrParser.S)
                self.state = 281
                self.identifier()
                self.state = 282
                self.match(SodaCLAntlrParser.S)
                self.state = 283
                self.match(SodaCLAntlrParser.ROUND_LEFT)
                self.state = 284
                self.target_column_name()
                self.state = 290
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==SodaCLAntlrParser.COMMA:
                    self.state = 285
                    self.match(SodaCLAntlrParser.COMMA)
                    self.state = 286
                    self.match(SodaCLAntlrParser.S)
                    self.state = 287
                    self.target_column_name()
                    self.state = 292
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 293
                self.match(SodaCLAntlrParser.ROUND_RIGHT)
                pass


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


    class Source_column_nameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def identifier(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.IdentifierContext,0)


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_source_column_name

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSource_column_name" ):
                return visitor.visitSource_column_name(self)
            else:
                return visitor.visitChildren(self)




    def source_column_name(self):

        localctx = SodaCLAntlrParser.Source_column_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_source_column_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 297
            self.identifier()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Target_column_nameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def identifier(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.IdentifierContext,0)


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_target_column_name

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTarget_column_name" ):
                return visitor.visitTarget_column_name(self)
            else:
                return visitor.visitChildren(self)




    def target_column_name(self):

        localctx = SodaCLAntlrParser.Target_column_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_target_column_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 299
            self.identifier()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Section_headerContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def table_checks_header(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Table_checks_headerContext,0)


        def column_configurations_header(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Column_configurations_headerContext,0)


        def table_filter_header(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Table_filter_headerContext,0)


        def checks_for_each_dataset_header(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Checks_for_each_dataset_headerContext,0)


        def checks_for_each_column_header(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Checks_for_each_column_headerContext,0)


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_section_header

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSection_header" ):
                return visitor.visitSection_header(self)
            else:
                return visitor.visitChildren(self)




    def section_header(self):

        localctx = SodaCLAntlrParser.Section_headerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_section_header)
        try:
            self.state = 306
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SodaCLAntlrParser.T__12]:
                self.enterOuterAlt(localctx, 1)
                self.state = 301
                self.table_checks_header()
                pass
            elif token in [SodaCLAntlrParser.T__14]:
                self.enterOuterAlt(localctx, 2)
                self.state = 302
                self.column_configurations_header()
                pass
            elif token in [SodaCLAntlrParser.T__13]:
                self.enterOuterAlt(localctx, 3)
                self.state = 303
                self.table_filter_header()
                pass
            elif token in [SodaCLAntlrParser.T__15, SodaCLAntlrParser.T__16]:
                self.enterOuterAlt(localctx, 4)
                self.state = 304
                self.checks_for_each_dataset_header()
                pass
            elif token in [SodaCLAntlrParser.T__17]:
                self.enterOuterAlt(localctx, 5)
                self.state = 305
                self.checks_for_each_column_header()
                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 Table_checks_headerContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def identifier(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.IdentifierContext,0)


        def EOF(self):
            return self.getToken(SodaCLAntlrParser.EOF, 0)

        def partition_name(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Partition_nameContext,0)


        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_table_checks_header

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTable_checks_header" ):
                return visitor.visitTable_checks_header(self)
            else:
                return visitor.visitChildren(self)




    def table_checks_header(self):

        localctx = SodaCLAntlrParser.Table_checks_headerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_table_checks_header)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 308
            self.match(SodaCLAntlrParser.T__12)
            self.state = 309
            self.match(SodaCLAntlrParser.S)
            self.state = 310
            self.identifier()
            self.state = 313
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SodaCLAntlrParser.S:
                self.state = 311
                self.match(SodaCLAntlrParser.S)
                self.state = 312
                self.partition_name()


            self.state = 315
            self.match(SodaCLAntlrParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Partition_nameContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def SQUARE_LEFT(self):
            return self.getToken(SodaCLAntlrParser.SQUARE_LEFT, 0)

        def identifier(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.IdentifierContext,0)


        def SQUARE_RIGHT(self):
            return self.getToken(SodaCLAntlrParser.SQUARE_RIGHT, 0)

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_partition_name

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitPartition_name" ):
                return visitor.visitPartition_name(self)
            else:
                return visitor.visitChildren(self)




    def partition_name(self):

        localctx = SodaCLAntlrParser.Partition_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_partition_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 317
            self.match(SodaCLAntlrParser.SQUARE_LEFT)
            self.state = 318
            self.identifier()
            self.state = 319
            self.match(SodaCLAntlrParser.SQUARE_RIGHT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Table_filter_headerContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

        def identifier(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.IdentifierContext,0)


        def partition_name(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.Partition_nameContext,0)


        def EOF(self):
            return self.getToken(SodaCLAntlrParser.EOF, 0)

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_table_filter_header

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTable_filter_header" ):
                return visitor.visitTable_filter_header(self)
            else:
                return visitor.visitChildren(self)




    def table_filter_header(self):

        localctx = SodaCLAntlrParser.Table_filter_headerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_table_filter_header)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 321
            self.match(SodaCLAntlrParser.T__13)
            self.state = 322
            self.match(SodaCLAntlrParser.S)
            self.state = 323
            self.identifier()
            self.state = 324
            self.match(SodaCLAntlrParser.S)
            self.state = 325
            self.partition_name()
            self.state = 326
            self.match(SodaCLAntlrParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Column_configurations_headerContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def S(self):
            return self.getToken(SodaCLAntlrParser.S, 0)

        def identifier(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.IdentifierContext,0)


        def EOF(self):
            return self.getToken(SodaCLAntlrParser.EOF, 0)

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_column_configurations_header

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumn_configurations_header" ):
                return visitor.visitColumn_configurations_header(self)
            else:
                return visitor.visitChildren(self)




    def column_configurations_header(self):

        localctx = SodaCLAntlrParser.Column_configurations_headerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_column_configurations_header)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 328
            self.match(SodaCLAntlrParser.T__14)
            self.state = 329
            self.match(SodaCLAntlrParser.S)
            self.state = 330
            self.identifier()
            self.state = 331
            self.match(SodaCLAntlrParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Checks_for_each_dataset_headerContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def S(self):
            return self.getToken(SodaCLAntlrParser.S, 0)

        def identifier(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.IdentifierContext,0)


        def EOF(self):
            return self.getToken(SodaCLAntlrParser.EOF, 0)

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_checks_for_each_dataset_header

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitChecks_for_each_dataset_header" ):
                return visitor.visitChecks_for_each_dataset_header(self)
            else:
                return visitor.visitChildren(self)




    def checks_for_each_dataset_header(self):

        localctx = SodaCLAntlrParser.Checks_for_each_dataset_headerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_checks_for_each_dataset_header)
        try:
            self.state = 343
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [SodaCLAntlrParser.T__15]:
                self.enterOuterAlt(localctx, 1)
                self.state = 333
                self.match(SodaCLAntlrParser.T__15)
                self.state = 334
                self.match(SodaCLAntlrParser.S)
                self.state = 335
                self.identifier()
                self.state = 336
                self.match(SodaCLAntlrParser.EOF)
                pass
            elif token in [SodaCLAntlrParser.T__16]:
                self.enterOuterAlt(localctx, 2)
                self.state = 338
                self.match(SodaCLAntlrParser.T__16)
                self.state = 339
                self.match(SodaCLAntlrParser.S)
                self.state = 340
                self.identifier()
                self.state = 341
                self.match(SodaCLAntlrParser.EOF)
                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 Checks_for_each_column_headerContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def S(self):
            return self.getToken(SodaCLAntlrParser.S, 0)

        def identifier(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.IdentifierContext,0)


        def EOF(self):
            return self.getToken(SodaCLAntlrParser.EOF, 0)

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_checks_for_each_column_header

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitChecks_for_each_column_header" ):
                return visitor.visitChecks_for_each_column_header(self)
            else:
                return visitor.visitChildren(self)




    def checks_for_each_column_header(self):

        localctx = SodaCLAntlrParser.Checks_for_each_column_headerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_checks_for_each_column_header)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 345
            self.match(SodaCLAntlrParser.T__17)
            self.state = 346
            self.match(SodaCLAntlrParser.S)
            self.state = 347
            self.identifier()
            self.state = 348
            self.match(SodaCLAntlrParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Signed_numberContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def number(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.NumberContext,0)


        def PLUS(self):
            return self.getToken(SodaCLAntlrParser.PLUS, 0)

        def MINUS(self):
            return self.getToken(SodaCLAntlrParser.MINUS, 0)

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_signed_number

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSigned_number" ):
                return visitor.visitSigned_number(self)
            else:
                return visitor.visitChildren(self)




    def signed_number(self):

        localctx = SodaCLAntlrParser.Signed_numberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_signed_number)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 351
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==SodaCLAntlrParser.PLUS or _la==SodaCLAntlrParser.MINUS:
                self.state = 350
                _la = self._input.LA(1)
                if not(_la==SodaCLAntlrParser.PLUS or _la==SodaCLAntlrParser.MINUS):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


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


    class NumberContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def integer(self):
            return self.getTypedRuleContext(SodaCLAntlrParser.IntegerContext,0)


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

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_number

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitNumber" ):
                return visitor.visitNumber(self)
            else:
                return visitor.visitChildren(self)




    def number(self):

        localctx = SodaCLAntlrParser.NumberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_number)
        self._la = 0 # Token type
        try:
            self.state = 366
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,32,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 355
                self.integer()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 356
                self.match(SodaCLAntlrParser.DIGITS)
                self.state = 357
                self.match(SodaCLAntlrParser.T__18)
                self.state = 359
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SodaCLAntlrParser.DIGITS:
                    self.state = 358
                    self.match(SodaCLAntlrParser.DIGITS)


                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 362
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==SodaCLAntlrParser.DIGITS:
                    self.state = 361
                    self.match(SodaCLAntlrParser.DIGITS)


                self.state = 364
                self.match(SodaCLAntlrParser.T__18)
                self.state = 365
                self.match(SodaCLAntlrParser.DIGITS)
                pass


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


    class IntegerContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def DIGITS(self):
            return self.getToken(SodaCLAntlrParser.DIGITS, 0)

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_integer

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitInteger" ):
                return visitor.visitInteger(self)
            else:
                return visitor.visitChildren(self)




    def integer(self):

        localctx = SodaCLAntlrParser.IntegerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_integer)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 368
            self.match(SodaCLAntlrParser.DIGITS)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class IdentifierContext(ParserRuleContext):
        __slots__ = 'parser'

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

        def IDENTIFIER_UNQUOTED(self):
            return self.getToken(SodaCLAntlrParser.IDENTIFIER_UNQUOTED, 0)

        def IDENTIFIER_DOUBLE_QUOTE(self):
            return self.getToken(SodaCLAntlrParser.IDENTIFIER_DOUBLE_QUOTE, 0)

        def IDENTIFIER_BACKTICK(self):
            return self.getToken(SodaCLAntlrParser.IDENTIFIER_BACKTICK, 0)

        def MIN(self):
            return self.getToken(SodaCLAntlrParser.MIN, 0)

        def MAX(self):
            return self.getToken(SodaCLAntlrParser.MAX, 0)

        def AVG(self):
            return self.getToken(SodaCLAntlrParser.AVG, 0)

        def getRuleIndex(self):
            return SodaCLAntlrParser.RULE_identifier

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

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

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitIdentifier" ):
                return visitor.visitIdentifier(self)
            else:
                return visitor.visitChildren(self)




    def identifier(self):

        localctx = SodaCLAntlrParser.IdentifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_identifier)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 370
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << SodaCLAntlrParser.AVG) | (1 << SodaCLAntlrParser.MIN) | (1 << SodaCLAntlrParser.MAX) | (1 << SodaCLAntlrParser.IDENTIFIER_DOUBLE_QUOTE) | (1 << SodaCLAntlrParser.IDENTIFIER_BACKTICK) | (1 << SodaCLAntlrParser.IDENTIFIER_UNQUOTED))) != 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





