瀏覽代碼

QL: regenerate parser due to ANTLR upgrade (#76970)

* QL: regenerate parser due to ANTLR upgrade

To avoid warnings and subtle change in behavior, regenerate the parser
classes using the upgraded ANTLR (4.9.2 vs 4.5.3).

Fix #76969
Costin Leau 4 年之前
父節點
當前提交
d349f25247

+ 169 - 152
x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/parser/EqlBaseLexer.java

@@ -11,7 +11,7 @@ import org.antlr.v4.runtime.misc.*;
 
 @SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
 class EqlBaseLexer extends Lexer {
-  static { RuntimeMetaData.checkVersion("4.5.3", RuntimeMetaData.VERSION); }
+  static { RuntimeMetaData.checkVersion("4.9.2", RuntimeMetaData.VERSION); }
 
   protected static final DFA[] _decisionToDFA;
   protected static final PredictionContextCache _sharedContextCache =
@@ -24,37 +24,51 @@ class EqlBaseLexer extends Lexer {
     SLASH=33, PERCENT=34, DOT=35, COMMA=36, LB=37, RB=38, LP=39, RP=40, PIPE=41, 
     STRING=42, INTEGER_VALUE=43, DECIMAL_VALUE=44, IDENTIFIER=45, QUOTED_IDENTIFIER=46, 
     TILDE_IDENTIFIER=47, LINE_COMMENT=48, BRACKETED_COMMENT=49, WS=50;
+  public static String[] channelNames = {
+    "DEFAULT_TOKEN_CHANNEL", "HIDDEN"
+  };
+
   public static String[] modeNames = {
     "DEFAULT_MODE"
   };
 
-  public static final String[] ruleNames = {
-    "AND", "ANY", "BY", "FALSE", "IN", "IN_INSENSITIVE", "JOIN", "LIKE", "LIKE_INSENSITIVE", 
-    "MAXSPAN", "NOT", "NULL", "OF", "OR", "REGEX", "REGEX_INSENSITIVE", "SEQUENCE", 
-    "TRUE", "UNTIL", "WHERE", "WITH", "SEQ", "ASGN", "EQ", "NEQ", "LT", "LTE", 
-    "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", "PERCENT", "DOT", "COMMA", 
-    "LB", "RB", "LP", "RP", "PIPE", "STRING_ESCAPE", "HEX_DIGIT", "UNICODE_ESCAPE", 
-    "UNESCAPED_CHARS", "STRING", "INTEGER_VALUE", "DECIMAL_VALUE", "IDENTIFIER", 
-    "QUOTED_IDENTIFIER", "TILDE_IDENTIFIER", "EXPONENT", "DIGIT", "LETTER", 
-    "LINE_COMMENT", "BRACKETED_COMMENT", "WS"
-  };
+  private static String[] makeRuleNames() {
+    return new String[] {
+      "AND", "ANY", "BY", "FALSE", "IN", "IN_INSENSITIVE", "JOIN", "LIKE", 
+      "LIKE_INSENSITIVE", "MAXSPAN", "NOT", "NULL", "OF", "OR", "REGEX", "REGEX_INSENSITIVE", 
+      "SEQUENCE", "TRUE", "UNTIL", "WHERE", "WITH", "SEQ", "ASGN", "EQ", "NEQ", 
+      "LT", "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", "PERCENT", 
+      "DOT", "COMMA", "LB", "RB", "LP", "RP", "PIPE", "STRING_ESCAPE", "HEX_DIGIT", 
+      "UNICODE_ESCAPE", "UNESCAPED_CHARS", "STRING", "INTEGER_VALUE", "DECIMAL_VALUE", 
+      "IDENTIFIER", "QUOTED_IDENTIFIER", "TILDE_IDENTIFIER", "EXPONENT", "DIGIT", 
+      "LETTER", "LINE_COMMENT", "BRACKETED_COMMENT", "WS"
+    };
+  }
+  public static final String[] ruleNames = makeRuleNames();
 
-  private static final String[] _LITERAL_NAMES = {
-    null, "'and'", "'any'", "'by'", "'false'", "'in'", "'in~'", "'join'", 
-    "'like'", "'like~'", "'maxspan'", "'not'", "'null'", "'of'", "'or'", "'regex'", 
-    "'regex~'", "'sequence'", "'true'", "'until'", "'where'", "'with'", "':'", 
-    "'='", "'=='", "'!='", "'<'", "'<='", "'>'", "'>='", "'+'", "'-'", "'*'", 
-    "'/'", "'%'", "'.'", "','", "'['", "']'", "'('", "')'", "'|'"
-  };
-  private static final String[] _SYMBOLIC_NAMES = {
-    null, "AND", "ANY", "BY", "FALSE", "IN", "IN_INSENSITIVE", "JOIN", "LIKE", 
-    "LIKE_INSENSITIVE", "MAXSPAN", "NOT", "NULL", "OF", "OR", "REGEX", "REGEX_INSENSITIVE", 
-    "SEQUENCE", "TRUE", "UNTIL", "WHERE", "WITH", "SEQ", "ASGN", "EQ", "NEQ", 
-    "LT", "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", "PERCENT", 
-    "DOT", "COMMA", "LB", "RB", "LP", "RP", "PIPE", "STRING", "INTEGER_VALUE", 
-    "DECIMAL_VALUE", "IDENTIFIER", "QUOTED_IDENTIFIER", "TILDE_IDENTIFIER", 
-    "LINE_COMMENT", "BRACKETED_COMMENT", "WS"
-  };
+  private static String[] makeLiteralNames() {
+    return new String[] {
+      null, "'and'", "'any'", "'by'", "'false'", "'in'", "'in~'", "'join'", 
+      "'like'", "'like~'", "'maxspan'", "'not'", "'null'", "'of'", "'or'", 
+      "'regex'", "'regex~'", "'sequence'", "'true'", "'until'", "'where'", 
+      "'with'", "':'", "'='", "'=='", "'!='", "'<'", "'<='", "'>'", "'>='", 
+      "'+'", "'-'", "'*'", "'/'", "'%'", "'.'", "','", "'['", "']'", "'('", 
+      "')'", "'|'"
+    };
+  }
+  private static final String[] _LITERAL_NAMES = makeLiteralNames();
+  private static String[] makeSymbolicNames() {
+    return new String[] {
+      null, "AND", "ANY", "BY", "FALSE", "IN", "IN_INSENSITIVE", "JOIN", "LIKE", 
+      "LIKE_INSENSITIVE", "MAXSPAN", "NOT", "NULL", "OF", "OR", "REGEX", "REGEX_INSENSITIVE", 
+      "SEQUENCE", "TRUE", "UNTIL", "WHERE", "WITH", "SEQ", "ASGN", "EQ", "NEQ", 
+      "LT", "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", "PERCENT", 
+      "DOT", "COMMA", "LB", "RB", "LP", "RP", "PIPE", "STRING", "INTEGER_VALUE", 
+      "DECIMAL_VALUE", "IDENTIFIER", "QUOTED_IDENTIFIER", "TILDE_IDENTIFIER", 
+      "LINE_COMMENT", "BRACKETED_COMMENT", "WS"
+    };
+  }
+  private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
   public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
 
   /**
@@ -103,6 +117,9 @@ class EqlBaseLexer extends Lexer {
   @Override
   public String getSerializedATN() { return _serializedATN; }
 
+  @Override
+  public String[] getChannelNames() { return channelNames; }
+
   @Override
   public String[] getModeNames() { return modeNames; }
 
@@ -110,7 +127,7 @@ class EqlBaseLexer extends Lexer {
   public ATN getATN() { return _ATN; }
 
   public static final String _serializedATN =
-    "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\64\u01e7\b\1\4\2"+
+    "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\64\u01e7\b\1\4\2"+
     "\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\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\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+
     "\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31"+
@@ -150,130 +167,130 @@ class EqlBaseLexer extends Lexer {
     "e\60g\61i\2k\2m\2o\62q\63s\64\3\2\20\n\2$$))^^ddhhppttvv\5\2\62;CHch\6"+
     "\2\f\f\17\17$$^^\4\2\f\f\17\17\6\2\f\f\17\17))^^\5\2\f\f\17\17$$\5\2\f"+
     "\f\17\17))\4\2BBaa\3\2bb\4\2GGgg\4\2--//\3\2\62;\4\2C\\c|\5\2\13\f\17"+
-    "\17\"\"\u020c\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2"+
-    "\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2"+
-    "\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2"+
-    "\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2"+
-    "\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3"+
-    "\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2"+
-    "\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2"+
-    "S\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3"+
-    "\2\2\2\2o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\3u\3\2\2\2\5y\3\2\2\2\7}\3\2\2"+
-    "\2\t\u0080\3\2\2\2\13\u0086\3\2\2\2\r\u0089\3\2\2\2\17\u008d\3\2\2\2\21"+
-    "\u0092\3\2\2\2\23\u0097\3\2\2\2\25\u009d\3\2\2\2\27\u00a5\3\2\2\2\31\u00a9"+
-    "\3\2\2\2\33\u00ae\3\2\2\2\35\u00b1\3\2\2\2\37\u00b4\3\2\2\2!\u00ba\3\2"+
-    "\2\2#\u00c1\3\2\2\2%\u00ca\3\2\2\2\'\u00cf\3\2\2\2)\u00d5\3\2\2\2+\u00db"+
-    "\3\2\2\2-\u00e0\3\2\2\2/\u00e2\3\2\2\2\61\u00e4\3\2\2\2\63\u00e7\3\2\2"+
-    "\2\65\u00ea\3\2\2\2\67\u00ec\3\2\2\29\u00ef\3\2\2\2;\u00f1\3\2\2\2=\u00f4"+
-    "\3\2\2\2?\u00f6\3\2\2\2A\u00f8\3\2\2\2C\u00fa\3\2\2\2E\u00fc\3\2\2\2G"+
-    "\u00fe\3\2\2\2I\u0100\3\2\2\2K\u0102\3\2\2\2M\u0104\3\2\2\2O\u0106\3\2"+
-    "\2\2Q\u0108\3\2\2\2S\u010a\3\2\2\2U\u010c\3\2\2\2W\u010f\3\2\2\2Y\u0111"+
-    "\3\2\2\2[\u011c\3\2\2\2]\u015e\3\2\2\2_\u0161\3\2\2\2a\u018f\3\2\2\2c"+
-    "\u0193\3\2\2\2e\u019d\3\2\2\2g\u01a8\3\2\2\2i\u01b3\3\2\2\2k\u01bc\3\2"+
-    "\2\2m\u01be\3\2\2\2o\u01c0\3\2\2\2q\u01d1\3\2\2\2s\u01e1\3\2\2\2uv\7c"+
-    "\2\2vw\7p\2\2wx\7f\2\2x\4\3\2\2\2yz\7c\2\2z{\7p\2\2{|\7{\2\2|\6\3\2\2"+
-    "\2}~\7d\2\2~\177\7{\2\2\177\b\3\2\2\2\u0080\u0081\7h\2\2\u0081\u0082\7"+
-    "c\2\2\u0082\u0083\7n\2\2\u0083\u0084\7u\2\2\u0084\u0085\7g\2\2\u0085\n"+
-    "\3\2\2\2\u0086\u0087\7k\2\2\u0087\u0088\7p\2\2\u0088\f\3\2\2\2\u0089\u008a"+
-    "\7k\2\2\u008a\u008b\7p\2\2\u008b\u008c\7\u0080\2\2\u008c\16\3\2\2\2\u008d"+
-    "\u008e\7l\2\2\u008e\u008f\7q\2\2\u008f\u0090\7k\2\2\u0090\u0091\7p\2\2"+
-    "\u0091\20\3\2\2\2\u0092\u0093\7n\2\2\u0093\u0094\7k\2\2\u0094\u0095\7"+
-    "m\2\2\u0095\u0096\7g\2\2\u0096\22\3\2\2\2\u0097\u0098\7n\2\2\u0098\u0099"+
-    "\7k\2\2\u0099\u009a\7m\2\2\u009a\u009b\7g\2\2\u009b\u009c\7\u0080\2\2"+
-    "\u009c\24\3\2\2\2\u009d\u009e\7o\2\2\u009e\u009f\7c\2\2\u009f\u00a0\7"+
-    "z\2\2\u00a0\u00a1\7u\2\2\u00a1\u00a2\7r\2\2\u00a2\u00a3\7c\2\2\u00a3\u00a4"+
-    "\7p\2\2\u00a4\26\3\2\2\2\u00a5\u00a6\7p\2\2\u00a6\u00a7\7q\2\2\u00a7\u00a8"+
-    "\7v\2\2\u00a8\30\3\2\2\2\u00a9\u00aa\7p\2\2\u00aa\u00ab\7w\2\2\u00ab\u00ac"+
-    "\7n\2\2\u00ac\u00ad\7n\2\2\u00ad\32\3\2\2\2\u00ae\u00af\7q\2\2\u00af\u00b0"+
-    "\7h\2\2\u00b0\34\3\2\2\2\u00b1\u00b2\7q\2\2\u00b2\u00b3\7t\2\2\u00b3\36"+
-    "\3\2\2\2\u00b4\u00b5\7t\2\2\u00b5\u00b6\7g\2\2\u00b6\u00b7\7i\2\2\u00b7"+
-    "\u00b8\7g\2\2\u00b8\u00b9\7z\2\2\u00b9 \3\2\2\2\u00ba\u00bb\7t\2\2\u00bb"+
-    "\u00bc\7g\2\2\u00bc\u00bd\7i\2\2\u00bd\u00be\7g\2\2\u00be\u00bf\7z\2\2"+
-    "\u00bf\u00c0\7\u0080\2\2\u00c0\"\3\2\2\2\u00c1\u00c2\7u\2\2\u00c2\u00c3"+
-    "\7g\2\2\u00c3\u00c4\7s\2\2\u00c4\u00c5\7w\2\2\u00c5\u00c6\7g\2\2\u00c6"+
-    "\u00c7\7p\2\2\u00c7\u00c8\7e\2\2\u00c8\u00c9\7g\2\2\u00c9$\3\2\2\2\u00ca"+
-    "\u00cb\7v\2\2\u00cb\u00cc\7t\2\2\u00cc\u00cd\7w\2\2\u00cd\u00ce\7g\2\2"+
-    "\u00ce&\3\2\2\2\u00cf\u00d0\7w\2\2\u00d0\u00d1\7p\2\2\u00d1\u00d2\7v\2"+
-    "\2\u00d2\u00d3\7k\2\2\u00d3\u00d4\7n\2\2\u00d4(\3\2\2\2\u00d5\u00d6\7"+
-    "y\2\2\u00d6\u00d7\7j\2\2\u00d7\u00d8\7g\2\2\u00d8\u00d9\7t\2\2\u00d9\u00da"+
-    "\7g\2\2\u00da*\3\2\2\2\u00db\u00dc\7y\2\2\u00dc\u00dd\7k\2\2\u00dd\u00de"+
-    "\7v\2\2\u00de\u00df\7j\2\2\u00df,\3\2\2\2\u00e0\u00e1\7<\2\2\u00e1.\3"+
-    "\2\2\2\u00e2\u00e3\7?\2\2\u00e3\60\3\2\2\2\u00e4\u00e5\7?\2\2\u00e5\u00e6"+
-    "\7?\2\2\u00e6\62\3\2\2\2\u00e7\u00e8\7#\2\2\u00e8\u00e9\7?\2\2\u00e9\64"+
-    "\3\2\2\2\u00ea\u00eb\7>\2\2\u00eb\66\3\2\2\2\u00ec\u00ed\7>\2\2\u00ed"+
-    "\u00ee\7?\2\2\u00ee8\3\2\2\2\u00ef\u00f0\7@\2\2\u00f0:\3\2\2\2\u00f1\u00f2"+
-    "\7@\2\2\u00f2\u00f3\7?\2\2\u00f3<\3\2\2\2\u00f4\u00f5\7-\2\2\u00f5>\3"+
-    "\2\2\2\u00f6\u00f7\7/\2\2\u00f7@\3\2\2\2\u00f8\u00f9\7,\2\2\u00f9B\3\2"+
-    "\2\2\u00fa\u00fb\7\61\2\2\u00fbD\3\2\2\2\u00fc\u00fd\7\'\2\2\u00fdF\3"+
-    "\2\2\2\u00fe\u00ff\7\60\2\2\u00ffH\3\2\2\2\u0100\u0101\7.\2\2\u0101J\3"+
-    "\2\2\2\u0102\u0103\7]\2\2\u0103L\3\2\2\2\u0104\u0105\7_\2\2\u0105N\3\2"+
-    "\2\2\u0106\u0107\7*\2\2\u0107P\3\2\2\2\u0108\u0109\7+\2\2\u0109R\3\2\2"+
-    "\2\u010a\u010b\7~\2\2\u010bT\3\2\2\2\u010c\u010d\7^\2\2\u010d\u010e\t"+
-    "\2\2\2\u010eV\3\2\2\2\u010f\u0110\t\3\2\2\u0110X\3\2\2\2\u0111\u0112\7"+
-    "^\2\2\u0112\u0113\7w\2\2\u0113\u0114\3\2\2\2\u0114\u0116\7}\2\2\u0115"+
-    "\u0117\5W,\2\u0116\u0115\3\2\2\2\u0117\u0118\3\2\2\2\u0118\u0116\3\2\2"+
-    "\2\u0118\u0119\3\2\2\2\u0119\u011a\3\2\2\2\u011a\u011b\7\177\2\2\u011b"+
-    "Z\3\2\2\2\u011c\u011d\n\4\2\2\u011d\\\3\2\2\2\u011e\u0124\7$\2\2\u011f"+
-    "\u0123\5U+\2\u0120\u0123\5Y-\2\u0121\u0123\5[.\2\u0122\u011f\3\2\2\2\u0122"+
-    "\u0120\3\2\2\2\u0122\u0121\3\2\2\2\u0123\u0126\3\2\2\2\u0124\u0122\3\2"+
-    "\2\2\u0124\u0125\3\2\2\2\u0125\u0127\3\2\2\2\u0126\u0124\3\2\2\2\u0127"+
-    "\u015f\7$\2\2\u0128\u0129\7$\2\2\u0129\u012a\7$\2\2\u012a\u012b\7$\2\2"+
-    "\u012b\u012f\3\2\2\2\u012c\u012e\n\5\2\2\u012d\u012c\3\2\2\2\u012e\u0131"+
-    "\3\2\2\2\u012f\u0130\3\2\2\2\u012f\u012d\3\2\2\2\u0130\u0132\3\2\2\2\u0131"+
-    "\u012f\3\2\2\2\u0132\u0133\7$\2\2\u0133\u0134\7$\2\2\u0134\u0135\7$\2"+
-    "\2\u0135\u0137\3\2\2\2\u0136\u0138\7$\2\2\u0137\u0136\3\2\2\2\u0137\u0138"+
-    "\3\2\2\2\u0138\u013a\3\2\2\2\u0139\u013b\7$\2\2\u013a\u0139\3\2\2\2\u013a"+
-    "\u013b\3\2\2\2\u013b\u015f\3\2\2\2\u013c\u0142\7)\2\2\u013d\u013e\7^\2"+
-    "\2\u013e\u0141\t\2\2\2\u013f\u0141\n\6\2\2\u0140\u013d\3\2\2\2\u0140\u013f"+
-    "\3\2\2\2\u0141\u0144\3\2\2\2\u0142\u0140\3\2\2\2\u0142\u0143\3\2\2\2\u0143"+
-    "\u0145\3\2\2\2\u0144\u0142\3\2\2\2\u0145\u015f\7)\2\2\u0146\u0147\7A\2"+
-    "\2\u0147\u0148\7$\2\2\u0148\u014e\3\2\2\2\u0149\u014a\7^\2\2\u014a\u014d"+
-    "\7$\2\2\u014b\u014d\n\7\2\2\u014c\u0149\3\2\2\2\u014c\u014b\3\2\2\2\u014d"+
-    "\u0150\3\2\2\2\u014e\u014c\3\2\2\2\u014e\u014f\3\2\2\2\u014f\u0151\3\2"+
-    "\2\2\u0150\u014e\3\2\2\2\u0151\u015f\7$\2\2\u0152\u0153\7A\2\2\u0153\u0154"+
-    "\7)\2\2\u0154\u015a\3\2\2\2\u0155\u0156\7^\2\2\u0156\u0159\7)\2\2\u0157"+
-    "\u0159\n\b\2\2\u0158\u0155\3\2\2\2\u0158\u0157\3\2\2\2\u0159\u015c\3\2"+
-    "\2\2\u015a\u0158\3\2\2\2\u015a\u015b\3\2\2\2\u015b\u015d\3\2\2\2\u015c"+
-    "\u015a\3\2\2\2\u015d\u015f\7)\2\2\u015e\u011e\3\2\2\2\u015e\u0128\3\2"+
-    "\2\2\u015e\u013c\3\2\2\2\u015e\u0146\3\2\2\2\u015e\u0152\3\2\2\2\u015f"+
-    "^\3\2\2\2\u0160\u0162\5k\66\2\u0161\u0160\3\2\2\2\u0162\u0163\3\2\2\2"+
-    "\u0163\u0161\3\2\2\2\u0163\u0164\3\2\2\2\u0164`\3\2\2\2\u0165\u0167\5"+
-    "k\66\2\u0166\u0165\3\2\2\2\u0167\u0168\3\2\2\2\u0168\u0166\3\2\2\2\u0168"+
-    "\u0169\3\2\2\2\u0169\u016a\3\2\2\2\u016a\u016e\5G$\2\u016b\u016d\5k\66"+
-    "\2\u016c\u016b\3\2\2\2\u016d\u0170\3\2\2\2\u016e\u016c\3\2\2\2\u016e\u016f"+
-    "\3\2\2\2\u016f\u0190\3\2\2\2\u0170\u016e\3\2\2\2\u0171\u0173\5G$\2\u0172"+
-    "\u0174\5k\66\2\u0173\u0172\3\2\2\2\u0174\u0175\3\2\2\2\u0175\u0173\3\2"+
-    "\2\2\u0175\u0176\3\2\2\2\u0176\u0190\3\2\2\2\u0177\u0179\5k\66\2\u0178"+
-    "\u0177\3\2\2\2\u0179\u017a\3\2\2\2\u017a\u0178\3\2\2\2\u017a\u017b\3\2"+
-    "\2\2\u017b\u0183\3\2\2\2\u017c\u0180\5G$\2\u017d\u017f\5k\66\2\u017e\u017d"+
-    "\3\2\2\2\u017f\u0182\3\2\2\2\u0180\u017e\3\2\2\2\u0180\u0181\3\2\2\2\u0181"+
-    "\u0184\3\2\2\2\u0182\u0180\3\2\2\2\u0183\u017c\3\2\2\2\u0183\u0184\3\2"+
-    "\2\2\u0184\u0185\3\2\2\2\u0185\u0186\5i\65\2\u0186\u0190\3\2\2\2\u0187"+
-    "\u0189\5G$\2\u0188\u018a\5k\66\2\u0189\u0188\3\2\2\2\u018a\u018b\3\2\2"+
-    "\2\u018b\u0189\3\2\2\2\u018b\u018c\3\2\2\2\u018c\u018d\3\2\2\2\u018d\u018e"+
-    "\5i\65\2\u018e\u0190\3\2\2\2\u018f\u0166\3\2\2\2\u018f\u0171\3\2\2\2\u018f"+
-    "\u0178\3\2\2\2\u018f\u0187\3\2\2\2\u0190b\3\2\2\2\u0191\u0194\5m\67\2"+
-    "\u0192\u0194\t\t\2\2\u0193\u0191\3\2\2\2\u0193\u0192\3\2\2\2\u0194\u019a"+
-    "\3\2\2\2\u0195\u0199\5m\67\2\u0196\u0199\5k\66\2\u0197\u0199\7a\2\2\u0198"+
-    "\u0195\3\2\2\2\u0198\u0196\3\2\2\2\u0198\u0197\3\2\2\2\u0199\u019c\3\2"+
-    "\2\2\u019a\u0198\3\2\2\2\u019a\u019b\3\2\2\2\u019bd\3\2\2\2\u019c\u019a"+
-    "\3\2\2\2\u019d\u01a3\7b\2\2\u019e\u01a2\n\n\2\2\u019f\u01a0\7b\2\2\u01a0"+
-    "\u01a2\7b\2\2\u01a1\u019e\3\2\2\2\u01a1\u019f\3\2\2\2\u01a2\u01a5\3\2"+
-    "\2\2\u01a3\u01a1\3\2\2\2\u01a3\u01a4\3\2\2\2\u01a4\u01a6\3\2\2\2\u01a5"+
-    "\u01a3\3\2\2\2\u01a6\u01a7\7b\2\2\u01a7f\3\2\2\2\u01a8\u01ae\5m\67\2\u01a9"+
-    "\u01ad\5m\67\2\u01aa\u01ad\5k\66\2\u01ab\u01ad\7a\2\2\u01ac\u01a9\3\2"+
-    "\2\2\u01ac\u01aa\3\2\2\2\u01ac\u01ab\3\2\2\2\u01ad\u01b0\3\2\2\2\u01ae"+
-    "\u01ac\3\2\2\2\u01ae\u01af\3\2\2\2\u01af\u01b1\3\2\2\2\u01b0\u01ae\3\2"+
-    "\2\2\u01b1\u01b2\7\u0080\2\2\u01b2h\3\2\2\2\u01b3\u01b5\t\13\2\2\u01b4"+
-    "\u01b6\t\f\2\2\u01b5\u01b4\3\2\2\2\u01b5\u01b6\3\2\2\2\u01b6\u01b8\3\2"+
-    "\2\2\u01b7\u01b9\5k\66\2\u01b8\u01b7\3\2\2\2\u01b9\u01ba\3\2\2\2\u01ba"+
-    "\u01b8\3\2\2\2\u01ba\u01bb\3\2\2\2\u01bbj\3\2\2\2\u01bc\u01bd\t\r\2\2"+
-    "\u01bdl\3\2\2\2\u01be\u01bf\t\16\2\2\u01bfn\3\2\2\2\u01c0\u01c1\7\61\2"+
-    "\2\u01c1\u01c2\7\61\2\2\u01c2\u01c6\3\2\2\2\u01c3\u01c5\n\5\2\2\u01c4"+
-    "\u01c3\3\2\2\2\u01c5\u01c8\3\2\2\2\u01c6\u01c4\3\2\2\2\u01c6\u01c7\3\2"+
-    "\2\2\u01c7\u01ca\3\2\2\2\u01c8\u01c6\3\2\2\2\u01c9\u01cb\7\17\2\2\u01ca"+
-    "\u01c9\3\2\2\2\u01ca\u01cb\3\2\2\2\u01cb\u01cd\3\2\2\2\u01cc\u01ce\7\f"+
-    "\2\2\u01cd\u01cc\3\2\2\2\u01cd\u01ce\3\2\2\2\u01ce\u01cf\3\2\2\2\u01cf"+
+    "\17\"\"\2\u020c\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3"+
+    "\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2"+
+    "\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3"+
+    "\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2"+
+    "\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\2"+
+    "9\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3"+
+    "\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2"+
+    "\2\2S\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2"+
+    "g\3\2\2\2\2o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\3u\3\2\2\2\5y\3\2\2\2\7}\3"+
+    "\2\2\2\t\u0080\3\2\2\2\13\u0086\3\2\2\2\r\u0089\3\2\2\2\17\u008d\3\2\2"+
+    "\2\21\u0092\3\2\2\2\23\u0097\3\2\2\2\25\u009d\3\2\2\2\27\u00a5\3\2\2\2"+
+    "\31\u00a9\3\2\2\2\33\u00ae\3\2\2\2\35\u00b1\3\2\2\2\37\u00b4\3\2\2\2!"+
+    "\u00ba\3\2\2\2#\u00c1\3\2\2\2%\u00ca\3\2\2\2\'\u00cf\3\2\2\2)\u00d5\3"+
+    "\2\2\2+\u00db\3\2\2\2-\u00e0\3\2\2\2/\u00e2\3\2\2\2\61\u00e4\3\2\2\2\63"+
+    "\u00e7\3\2\2\2\65\u00ea\3\2\2\2\67\u00ec\3\2\2\29\u00ef\3\2\2\2;\u00f1"+
+    "\3\2\2\2=\u00f4\3\2\2\2?\u00f6\3\2\2\2A\u00f8\3\2\2\2C\u00fa\3\2\2\2E"+
+    "\u00fc\3\2\2\2G\u00fe\3\2\2\2I\u0100\3\2\2\2K\u0102\3\2\2\2M\u0104\3\2"+
+    "\2\2O\u0106\3\2\2\2Q\u0108\3\2\2\2S\u010a\3\2\2\2U\u010c\3\2\2\2W\u010f"+
+    "\3\2\2\2Y\u0111\3\2\2\2[\u011c\3\2\2\2]\u015e\3\2\2\2_\u0161\3\2\2\2a"+
+    "\u018f\3\2\2\2c\u0193\3\2\2\2e\u019d\3\2\2\2g\u01a8\3\2\2\2i\u01b3\3\2"+
+    "\2\2k\u01bc\3\2\2\2m\u01be\3\2\2\2o\u01c0\3\2\2\2q\u01d1\3\2\2\2s\u01e1"+
+    "\3\2\2\2uv\7c\2\2vw\7p\2\2wx\7f\2\2x\4\3\2\2\2yz\7c\2\2z{\7p\2\2{|\7{"+
+    "\2\2|\6\3\2\2\2}~\7d\2\2~\177\7{\2\2\177\b\3\2\2\2\u0080\u0081\7h\2\2"+
+    "\u0081\u0082\7c\2\2\u0082\u0083\7n\2\2\u0083\u0084\7u\2\2\u0084\u0085"+
+    "\7g\2\2\u0085\n\3\2\2\2\u0086\u0087\7k\2\2\u0087\u0088\7p\2\2\u0088\f"+
+    "\3\2\2\2\u0089\u008a\7k\2\2\u008a\u008b\7p\2\2\u008b\u008c\7\u0080\2\2"+
+    "\u008c\16\3\2\2\2\u008d\u008e\7l\2\2\u008e\u008f\7q\2\2\u008f\u0090\7"+
+    "k\2\2\u0090\u0091\7p\2\2\u0091\20\3\2\2\2\u0092\u0093\7n\2\2\u0093\u0094"+
+    "\7k\2\2\u0094\u0095\7m\2\2\u0095\u0096\7g\2\2\u0096\22\3\2\2\2\u0097\u0098"+
+    "\7n\2\2\u0098\u0099\7k\2\2\u0099\u009a\7m\2\2\u009a\u009b\7g\2\2\u009b"+
+    "\u009c\7\u0080\2\2\u009c\24\3\2\2\2\u009d\u009e\7o\2\2\u009e\u009f\7c"+
+    "\2\2\u009f\u00a0\7z\2\2\u00a0\u00a1\7u\2\2\u00a1\u00a2\7r\2\2\u00a2\u00a3"+
+    "\7c\2\2\u00a3\u00a4\7p\2\2\u00a4\26\3\2\2\2\u00a5\u00a6\7p\2\2\u00a6\u00a7"+
+    "\7q\2\2\u00a7\u00a8\7v\2\2\u00a8\30\3\2\2\2\u00a9\u00aa\7p\2\2\u00aa\u00ab"+
+    "\7w\2\2\u00ab\u00ac\7n\2\2\u00ac\u00ad\7n\2\2\u00ad\32\3\2\2\2\u00ae\u00af"+
+    "\7q\2\2\u00af\u00b0\7h\2\2\u00b0\34\3\2\2\2\u00b1\u00b2\7q\2\2\u00b2\u00b3"+
+    "\7t\2\2\u00b3\36\3\2\2\2\u00b4\u00b5\7t\2\2\u00b5\u00b6\7g\2\2\u00b6\u00b7"+
+    "\7i\2\2\u00b7\u00b8\7g\2\2\u00b8\u00b9\7z\2\2\u00b9 \3\2\2\2\u00ba\u00bb"+
+    "\7t\2\2\u00bb\u00bc\7g\2\2\u00bc\u00bd\7i\2\2\u00bd\u00be\7g\2\2\u00be"+
+    "\u00bf\7z\2\2\u00bf\u00c0\7\u0080\2\2\u00c0\"\3\2\2\2\u00c1\u00c2\7u\2"+
+    "\2\u00c2\u00c3\7g\2\2\u00c3\u00c4\7s\2\2\u00c4\u00c5\7w\2\2\u00c5\u00c6"+
+    "\7g\2\2\u00c6\u00c7\7p\2\2\u00c7\u00c8\7e\2\2\u00c8\u00c9\7g\2\2\u00c9"+
+    "$\3\2\2\2\u00ca\u00cb\7v\2\2\u00cb\u00cc\7t\2\2\u00cc\u00cd\7w\2\2\u00cd"+
+    "\u00ce\7g\2\2\u00ce&\3\2\2\2\u00cf\u00d0\7w\2\2\u00d0\u00d1\7p\2\2\u00d1"+
+    "\u00d2\7v\2\2\u00d2\u00d3\7k\2\2\u00d3\u00d4\7n\2\2\u00d4(\3\2\2\2\u00d5"+
+    "\u00d6\7y\2\2\u00d6\u00d7\7j\2\2\u00d7\u00d8\7g\2\2\u00d8\u00d9\7t\2\2"+
+    "\u00d9\u00da\7g\2\2\u00da*\3\2\2\2\u00db\u00dc\7y\2\2\u00dc\u00dd\7k\2"+
+    "\2\u00dd\u00de\7v\2\2\u00de\u00df\7j\2\2\u00df,\3\2\2\2\u00e0\u00e1\7"+
+    "<\2\2\u00e1.\3\2\2\2\u00e2\u00e3\7?\2\2\u00e3\60\3\2\2\2\u00e4\u00e5\7"+
+    "?\2\2\u00e5\u00e6\7?\2\2\u00e6\62\3\2\2\2\u00e7\u00e8\7#\2\2\u00e8\u00e9"+
+    "\7?\2\2\u00e9\64\3\2\2\2\u00ea\u00eb\7>\2\2\u00eb\66\3\2\2\2\u00ec\u00ed"+
+    "\7>\2\2\u00ed\u00ee\7?\2\2\u00ee8\3\2\2\2\u00ef\u00f0\7@\2\2\u00f0:\3"+
+    "\2\2\2\u00f1\u00f2\7@\2\2\u00f2\u00f3\7?\2\2\u00f3<\3\2\2\2\u00f4\u00f5"+
+    "\7-\2\2\u00f5>\3\2\2\2\u00f6\u00f7\7/\2\2\u00f7@\3\2\2\2\u00f8\u00f9\7"+
+    ",\2\2\u00f9B\3\2\2\2\u00fa\u00fb\7\61\2\2\u00fbD\3\2\2\2\u00fc\u00fd\7"+
+    "\'\2\2\u00fdF\3\2\2\2\u00fe\u00ff\7\60\2\2\u00ffH\3\2\2\2\u0100\u0101"+
+    "\7.\2\2\u0101J\3\2\2\2\u0102\u0103\7]\2\2\u0103L\3\2\2\2\u0104\u0105\7"+
+    "_\2\2\u0105N\3\2\2\2\u0106\u0107\7*\2\2\u0107P\3\2\2\2\u0108\u0109\7+"+
+    "\2\2\u0109R\3\2\2\2\u010a\u010b\7~\2\2\u010bT\3\2\2\2\u010c\u010d\7^\2"+
+    "\2\u010d\u010e\t\2\2\2\u010eV\3\2\2\2\u010f\u0110\t\3\2\2\u0110X\3\2\2"+
+    "\2\u0111\u0112\7^\2\2\u0112\u0113\7w\2\2\u0113\u0114\3\2\2\2\u0114\u0116"+
+    "\7}\2\2\u0115\u0117\5W,\2\u0116\u0115\3\2\2\2\u0117\u0118\3\2\2\2\u0118"+
+    "\u0116\3\2\2\2\u0118\u0119\3\2\2\2\u0119\u011a\3\2\2\2\u011a\u011b\7\177"+
+    "\2\2\u011bZ\3\2\2\2\u011c\u011d\n\4\2\2\u011d\\\3\2\2\2\u011e\u0124\7"+
+    "$\2\2\u011f\u0123\5U+\2\u0120\u0123\5Y-\2\u0121\u0123\5[.\2\u0122\u011f"+
+    "\3\2\2\2\u0122\u0120\3\2\2\2\u0122\u0121\3\2\2\2\u0123\u0126\3\2\2\2\u0124"+
+    "\u0122\3\2\2\2\u0124\u0125\3\2\2\2\u0125\u0127\3\2\2\2\u0126\u0124\3\2"+
+    "\2\2\u0127\u015f\7$\2\2\u0128\u0129\7$\2\2\u0129\u012a\7$\2\2\u012a\u012b"+
+    "\7$\2\2\u012b\u012f\3\2\2\2\u012c\u012e\n\5\2\2\u012d\u012c\3\2\2\2\u012e"+
+    "\u0131\3\2\2\2\u012f\u0130\3\2\2\2\u012f\u012d\3\2\2\2\u0130\u0132\3\2"+
+    "\2\2\u0131\u012f\3\2\2\2\u0132\u0133\7$\2\2\u0133\u0134\7$\2\2\u0134\u0135"+
+    "\7$\2\2\u0135\u0137\3\2\2\2\u0136\u0138\7$\2\2\u0137\u0136\3\2\2\2\u0137"+
+    "\u0138\3\2\2\2\u0138\u013a\3\2\2\2\u0139\u013b\7$\2\2\u013a\u0139\3\2"+
+    "\2\2\u013a\u013b\3\2\2\2\u013b\u015f\3\2\2\2\u013c\u0142\7)\2\2\u013d"+
+    "\u013e\7^\2\2\u013e\u0141\t\2\2\2\u013f\u0141\n\6\2\2\u0140\u013d\3\2"+
+    "\2\2\u0140\u013f\3\2\2\2\u0141\u0144\3\2\2\2\u0142\u0140\3\2\2\2\u0142"+
+    "\u0143\3\2\2\2\u0143\u0145\3\2\2\2\u0144\u0142\3\2\2\2\u0145\u015f\7)"+
+    "\2\2\u0146\u0147\7A\2\2\u0147\u0148\7$\2\2\u0148\u014e\3\2\2\2\u0149\u014a"+
+    "\7^\2\2\u014a\u014d\7$\2\2\u014b\u014d\n\7\2\2\u014c\u0149\3\2\2\2\u014c"+
+    "\u014b\3\2\2\2\u014d\u0150\3\2\2\2\u014e\u014c\3\2\2\2\u014e\u014f\3\2"+
+    "\2\2\u014f\u0151\3\2\2\2\u0150\u014e\3\2\2\2\u0151\u015f\7$\2\2\u0152"+
+    "\u0153\7A\2\2\u0153\u0154\7)\2\2\u0154\u015a\3\2\2\2\u0155\u0156\7^\2"+
+    "\2\u0156\u0159\7)\2\2\u0157\u0159\n\b\2\2\u0158\u0155\3\2\2\2\u0158\u0157"+
+    "\3\2\2\2\u0159\u015c\3\2\2\2\u015a\u0158\3\2\2\2\u015a\u015b\3\2\2\2\u015b"+
+    "\u015d\3\2\2\2\u015c\u015a\3\2\2\2\u015d\u015f\7)\2\2\u015e\u011e\3\2"+
+    "\2\2\u015e\u0128\3\2\2\2\u015e\u013c\3\2\2\2\u015e\u0146\3\2\2\2\u015e"+
+    "\u0152\3\2\2\2\u015f^\3\2\2\2\u0160\u0162\5k\66\2\u0161\u0160\3\2\2\2"+
+    "\u0162\u0163\3\2\2\2\u0163\u0161\3\2\2\2\u0163\u0164\3\2\2\2\u0164`\3"+
+    "\2\2\2\u0165\u0167\5k\66\2\u0166\u0165\3\2\2\2\u0167\u0168\3\2\2\2\u0168"+
+    "\u0166\3\2\2\2\u0168\u0169\3\2\2\2\u0169\u016a\3\2\2\2\u016a\u016e\5G"+
+    "$\2\u016b\u016d\5k\66\2\u016c\u016b\3\2\2\2\u016d\u0170\3\2\2\2\u016e"+
+    "\u016c\3\2\2\2\u016e\u016f\3\2\2\2\u016f\u0190\3\2\2\2\u0170\u016e\3\2"+
+    "\2\2\u0171\u0173\5G$\2\u0172\u0174\5k\66\2\u0173\u0172\3\2\2\2\u0174\u0175"+
+    "\3\2\2\2\u0175\u0173\3\2\2\2\u0175\u0176\3\2\2\2\u0176\u0190\3\2\2\2\u0177"+
+    "\u0179\5k\66\2\u0178\u0177\3\2\2\2\u0179\u017a\3\2\2\2\u017a\u0178\3\2"+
+    "\2\2\u017a\u017b\3\2\2\2\u017b\u0183\3\2\2\2\u017c\u0180\5G$\2\u017d\u017f"+
+    "\5k\66\2\u017e\u017d\3\2\2\2\u017f\u0182\3\2\2\2\u0180\u017e\3\2\2\2\u0180"+
+    "\u0181\3\2\2\2\u0181\u0184\3\2\2\2\u0182\u0180\3\2\2\2\u0183\u017c\3\2"+
+    "\2\2\u0183\u0184\3\2\2\2\u0184\u0185\3\2\2\2\u0185\u0186\5i\65\2\u0186"+
+    "\u0190\3\2\2\2\u0187\u0189\5G$\2\u0188\u018a\5k\66\2\u0189\u0188\3\2\2"+
+    "\2\u018a\u018b\3\2\2\2\u018b\u0189\3\2\2\2\u018b\u018c\3\2\2\2\u018c\u018d"+
+    "\3\2\2\2\u018d\u018e\5i\65\2\u018e\u0190\3\2\2\2\u018f\u0166\3\2\2\2\u018f"+
+    "\u0171\3\2\2\2\u018f\u0178\3\2\2\2\u018f\u0187\3\2\2\2\u0190b\3\2\2\2"+
+    "\u0191\u0194\5m\67\2\u0192\u0194\t\t\2\2\u0193\u0191\3\2\2\2\u0193\u0192"+
+    "\3\2\2\2\u0194\u019a\3\2\2\2\u0195\u0199\5m\67\2\u0196\u0199\5k\66\2\u0197"+
+    "\u0199\7a\2\2\u0198\u0195\3\2\2\2\u0198\u0196\3\2\2\2\u0198\u0197\3\2"+
+    "\2\2\u0199\u019c\3\2\2\2\u019a\u0198\3\2\2\2\u019a\u019b\3\2\2\2\u019b"+
+    "d\3\2\2\2\u019c\u019a\3\2\2\2\u019d\u01a3\7b\2\2\u019e\u01a2\n\n\2\2\u019f"+
+    "\u01a0\7b\2\2\u01a0\u01a2\7b\2\2\u01a1\u019e\3\2\2\2\u01a1\u019f\3\2\2"+
+    "\2\u01a2\u01a5\3\2\2\2\u01a3\u01a1\3\2\2\2\u01a3\u01a4\3\2\2\2\u01a4\u01a6"+
+    "\3\2\2\2\u01a5\u01a3\3\2\2\2\u01a6\u01a7\7b\2\2\u01a7f\3\2\2\2\u01a8\u01ae"+
+    "\5m\67\2\u01a9\u01ad\5m\67\2\u01aa\u01ad\5k\66\2\u01ab\u01ad\7a\2\2\u01ac"+
+    "\u01a9\3\2\2\2\u01ac\u01aa\3\2\2\2\u01ac\u01ab\3\2\2\2\u01ad\u01b0\3\2"+
+    "\2\2\u01ae\u01ac\3\2\2\2\u01ae\u01af\3\2\2\2\u01af\u01b1\3\2\2\2\u01b0"+
+    "\u01ae\3\2\2\2\u01b1\u01b2\7\u0080\2\2\u01b2h\3\2\2\2\u01b3\u01b5\t\13"+
+    "\2\2\u01b4\u01b6\t\f\2\2\u01b5\u01b4\3\2\2\2\u01b5\u01b6\3\2\2\2\u01b6"+
+    "\u01b8\3\2\2\2\u01b7\u01b9\5k\66\2\u01b8\u01b7\3\2\2\2\u01b9\u01ba\3\2"+
+    "\2\2\u01ba\u01b8\3\2\2\2\u01ba\u01bb\3\2\2\2\u01bbj\3\2\2\2\u01bc\u01bd"+
+    "\t\r\2\2\u01bdl\3\2\2\2\u01be\u01bf\t\16\2\2\u01bfn\3\2\2\2\u01c0\u01c1"+
+    "\7\61\2\2\u01c1\u01c2\7\61\2\2\u01c2\u01c6\3\2\2\2\u01c3\u01c5\n\5\2\2"+
+    "\u01c4\u01c3\3\2\2\2\u01c5\u01c8\3\2\2\2\u01c6\u01c4\3\2\2\2\u01c6\u01c7"+
+    "\3\2\2\2\u01c7\u01ca\3\2\2\2\u01c8\u01c6\3\2\2\2\u01c9\u01cb\7\17\2\2"+
+    "\u01ca\u01c9\3\2\2\2\u01ca\u01cb\3\2\2\2\u01cb\u01cd\3\2\2\2\u01cc\u01ce"+
+    "\7\f\2\2\u01cd\u01cc\3\2\2\2\u01cd\u01ce\3\2\2\2\u01ce\u01cf\3\2\2\2\u01cf"+
     "\u01d0\b8\2\2\u01d0p\3\2\2\2\u01d1\u01d2\7\61\2\2\u01d2\u01d3\7,\2\2\u01d3"+
     "\u01d8\3\2\2\2\u01d4\u01d7\5q9\2\u01d5\u01d7\13\2\2\2\u01d6\u01d4\3\2"+
     "\2\2\u01d6\u01d5\3\2\2\2\u01d7\u01da\3\2\2\2\u01d8\u01d9\3\2\2\2\u01d8"+

+ 110 - 62
x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/parser/EqlBaseParser.java

@@ -1,31 +1,17 @@
 // ANTLR GENERATED CODE: DO NOT EDIT
 package org.elasticsearch.xpack.eql.parser;
-
-import org.antlr.v4.runtime.FailedPredicateException;
-import org.antlr.v4.runtime.NoViableAltException;
-import org.antlr.v4.runtime.Parser;
-import org.antlr.v4.runtime.ParserRuleContext;
-import org.antlr.v4.runtime.RecognitionException;
-import org.antlr.v4.runtime.RuleContext;
-import org.antlr.v4.runtime.RuntimeMetaData;
-import org.antlr.v4.runtime.Token;
-import org.antlr.v4.runtime.TokenStream;
-import org.antlr.v4.runtime.Vocabulary;
-import org.antlr.v4.runtime.VocabularyImpl;
-import org.antlr.v4.runtime.atn.ATN;
-import org.antlr.v4.runtime.atn.ATNDeserializer;
-import org.antlr.v4.runtime.atn.ParserATNSimulator;
-import org.antlr.v4.runtime.atn.PredictionContextCache;
+import org.antlr.v4.runtime.atn.*;
 import org.antlr.v4.runtime.dfa.DFA;
-import org.antlr.v4.runtime.tree.ParseTreeListener;
-import org.antlr.v4.runtime.tree.ParseTreeVisitor;
-import org.antlr.v4.runtime.tree.TerminalNode;
-
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.misc.*;
+import org.antlr.v4.runtime.tree.*;
 import java.util.List;
+import java.util.Iterator;
+import java.util.ArrayList;
 
 @SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
 class EqlBaseParser extends Parser {
-  static { RuntimeMetaData.checkVersion("4.5.3", RuntimeMetaData.VERSION); }
+  static { RuntimeMetaData.checkVersion("4.9.2", RuntimeMetaData.VERSION); }
 
   protected static final DFA[] _decisionToDFA;
   protected static final PredictionContextCache _sharedContextCache =
@@ -48,31 +34,41 @@ class EqlBaseParser extends Parser {
     RULE_functionName = 21, RULE_constant = 22, RULE_comparisonOperator = 23, 
     RULE_booleanValue = 24, RULE_qualifiedName = 25, RULE_identifier = 26, 
     RULE_timeUnit = 27, RULE_number = 28, RULE_string = 29, RULE_eventValue = 30;
-  public static final String[] ruleNames = {
-    "singleStatement", "singleExpression", "statement", "query", "sequenceParams", 
-    "sequence", "join", "pipe", "joinKeys", "joinTerm", "sequenceTerm", "subquery", 
-    "eventQuery", "eventFilter", "expression", "booleanExpression", "valueExpression", 
-    "operatorExpression", "predicate", "primaryExpression", "functionExpression", 
-    "functionName", "constant", "comparisonOperator", "booleanValue", "qualifiedName", 
-    "identifier", "timeUnit", "number", "string", "eventValue"
-  };
-
-  private static final String[] _LITERAL_NAMES = {
-    null, "'and'", "'any'", "'by'", "'false'", "'in'", "'in~'", "'join'", 
-    "'like'", "'like~'", "'maxspan'", "'not'", "'null'", "'of'", "'or'", "'regex'", 
-    "'regex~'", "'sequence'", "'true'", "'until'", "'where'", "'with'", "':'", 
-    "'='", "'=='", "'!='", "'<'", "'<='", "'>'", "'>='", "'+'", "'-'", "'*'", 
-    "'/'", "'%'", "'.'", "','", "'['", "']'", "'('", "')'", "'|'"
-  };
-  private static final String[] _SYMBOLIC_NAMES = {
-    null, "AND", "ANY", "BY", "FALSE", "IN", "IN_INSENSITIVE", "JOIN", "LIKE", 
-    "LIKE_INSENSITIVE", "MAXSPAN", "NOT", "NULL", "OF", "OR", "REGEX", "REGEX_INSENSITIVE", 
-    "SEQUENCE", "TRUE", "UNTIL", "WHERE", "WITH", "SEQ", "ASGN", "EQ", "NEQ", 
-    "LT", "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", "PERCENT", 
-    "DOT", "COMMA", "LB", "RB", "LP", "RP", "PIPE", "STRING", "INTEGER_VALUE", 
-    "DECIMAL_VALUE", "IDENTIFIER", "QUOTED_IDENTIFIER", "TILDE_IDENTIFIER", 
-    "LINE_COMMENT", "BRACKETED_COMMENT", "WS"
-  };
+  private static String[] makeRuleNames() {
+    return new String[] {
+      "singleStatement", "singleExpression", "statement", "query", "sequenceParams", 
+      "sequence", "join", "pipe", "joinKeys", "joinTerm", "sequenceTerm", "subquery", 
+      "eventQuery", "eventFilter", "expression", "booleanExpression", "valueExpression", 
+      "operatorExpression", "predicate", "primaryExpression", "functionExpression", 
+      "functionName", "constant", "comparisonOperator", "booleanValue", "qualifiedName", 
+      "identifier", "timeUnit", "number", "string", "eventValue"
+    };
+  }
+  public static final String[] ruleNames = makeRuleNames();
+
+  private static String[] makeLiteralNames() {
+    return new String[] {
+      null, "'and'", "'any'", "'by'", "'false'", "'in'", "'in~'", "'join'", 
+      "'like'", "'like~'", "'maxspan'", "'not'", "'null'", "'of'", "'or'", 
+      "'regex'", "'regex~'", "'sequence'", "'true'", "'until'", "'where'", 
+      "'with'", "':'", "'='", "'=='", "'!='", "'<'", "'<='", "'>'", "'>='", 
+      "'+'", "'-'", "'*'", "'/'", "'%'", "'.'", "','", "'['", "']'", "'('", 
+      "')'", "'|'"
+    };
+  }
+  private static final String[] _LITERAL_NAMES = makeLiteralNames();
+  private static String[] makeSymbolicNames() {
+    return new String[] {
+      null, "AND", "ANY", "BY", "FALSE", "IN", "IN_INSENSITIVE", "JOIN", "LIKE", 
+      "LIKE_INSENSITIVE", "MAXSPAN", "NOT", "NULL", "OF", "OR", "REGEX", "REGEX_INSENSITIVE", 
+      "SEQUENCE", "TRUE", "UNTIL", "WHERE", "WITH", "SEQ", "ASGN", "EQ", "NEQ", 
+      "LT", "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", "PERCENT", 
+      "DOT", "COMMA", "LB", "RB", "LP", "RP", "PIPE", "STRING", "INTEGER_VALUE", 
+      "DECIMAL_VALUE", "IDENTIFIER", "QUOTED_IDENTIFIER", "TILDE_IDENTIFIER", 
+      "LINE_COMMENT", "BRACKETED_COMMENT", "WS"
+    };
+  }
+  private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
   public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
 
   /**
@@ -122,6 +118,7 @@ class EqlBaseParser extends Parser {
     super(input);
     _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
   }
+
   public static class SingleStatementContext extends ParserRuleContext {
     public StatementContext statement() {
       return getRuleContext(StatementContext.class,0);
@@ -315,6 +312,7 @@ class EqlBaseParser extends Parser {
     enterRule(_localctx, 6, RULE_query);
     try {
       setState(78);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case SEQUENCE:
         enterOuterAlt(_localctx, 1);
@@ -456,12 +454,14 @@ class EqlBaseParser extends Parser {
       setState(85);
       match(SEQUENCE);
       setState(94);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case BY:
         {
         setState(86);
         ((SequenceContext)_localctx).by = joinKeys();
         setState(88);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==WITH) {
           {
@@ -477,6 +477,7 @@ class EqlBaseParser extends Parser {
         setState(90);
         sequenceParams();
         setState(92);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==BY) {
           {
@@ -490,7 +491,7 @@ class EqlBaseParser extends Parser {
       case LB:
         break;
       default:
-        throw new NoViableAltException(this);
+        break;
       }
       setState(96);
       sequenceTerm();
@@ -509,6 +510,7 @@ class EqlBaseParser extends Parser {
         _la = _input.LA(1);
       } while ( _la==LB );
       setState(104);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==UNTIL) {
         {
@@ -575,6 +577,7 @@ class EqlBaseParser extends Parser {
       setState(106);
       match(JOIN);
       setState(108);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==BY) {
         {
@@ -600,6 +603,7 @@ class EqlBaseParser extends Parser {
         _la = _input.LA(1);
       } while ( _la==LB );
       setState(118);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==UNTIL) {
         {
@@ -668,6 +672,7 @@ class EqlBaseParser extends Parser {
       setState(121);
       ((PipeContext)_localctx).kind = match(IDENTIFIER);
       setState(130);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << FALSE) | (1L << NOT) | (1L << NULL) | (1L << TRUE) | (1L << PLUS) | (1L << MINUS) | (1L << LP) | (1L << STRING) | (1L << INTEGER_VALUE) | (1L << DECIMAL_VALUE) | (1L << IDENTIFIER) | (1L << QUOTED_IDENTIFIER) | (1L << TILDE_IDENTIFIER))) != 0)) {
         {
@@ -813,6 +818,7 @@ class EqlBaseParser extends Parser {
       setState(141);
       subquery();
       setState(143);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==BY) {
         {
@@ -871,6 +877,7 @@ class EqlBaseParser extends Parser {
       setState(145);
       subquery();
       setState(147);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==BY) {
         {
@@ -1022,6 +1029,7 @@ class EqlBaseParser extends Parser {
       enterOuterAlt(_localctx, 1);
       {
       setState(157);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case ANY:
         {
@@ -1512,6 +1520,7 @@ class EqlBaseParser extends Parser {
       enterOuterAlt(_localctx, 1);
       {
       setState(198);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case FALSE:
       case NULL:
@@ -1553,7 +1562,10 @@ class EqlBaseParser extends Parser {
         _la = _input.LA(1);
         if ( !(_la==PLUS || _la==MINUS) ) {
           ((ArithmeticUnaryContext)_localctx).operator = (Token)_errHandler.recoverInline(this);
-        } else {
+        }
+        else {
+          if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+          _errHandler.reportMatch(this);
           consume();
         }
         setState(197);
@@ -1587,7 +1599,10 @@ class EqlBaseParser extends Parser {
             _la = _input.LA(1);
             if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ASTERISK) | (1L << SLASH) | (1L << PERCENT))) != 0)) ) {
               ((ArithmeticBinaryContext)_localctx).operator = (Token)_errHandler.recoverInline(this);
-            } else {
+            }
+            else {
+              if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+              _errHandler.reportMatch(this);
               consume();
             }
             setState(202);
@@ -1606,7 +1621,10 @@ class EqlBaseParser extends Parser {
             _la = _input.LA(1);
             if ( !(_la==PLUS || _la==MINUS) ) {
               ((ArithmeticBinaryContext)_localctx).operator = (Token)_errHandler.recoverInline(this);
-            } else {
+            }
+            else {
+              if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+              _errHandler.reportMatch(this);
               consume();
             }
             setState(205);
@@ -1692,6 +1710,7 @@ class EqlBaseParser extends Parser {
         enterOuterAlt(_localctx, 1);
         {
         setState(212);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==NOT) {
           {
@@ -1705,7 +1724,10 @@ class EqlBaseParser extends Parser {
         _la = _input.LA(1);
         if ( !(_la==IN || _la==IN_INSENSITIVE) ) {
           ((PredicateContext)_localctx).kind = (Token)_errHandler.recoverInline(this);
-        } else {
+        }
+        else {
+          if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+          _errHandler.reportMatch(this);
           consume();
         }
         setState(215);
@@ -1740,7 +1762,10 @@ class EqlBaseParser extends Parser {
         _la = _input.LA(1);
         if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LIKE) | (1L << LIKE_INSENSITIVE) | (1L << REGEX) | (1L << REGEX_INSENSITIVE) | (1L << SEQ))) != 0)) ) {
           ((PredicateContext)_localctx).kind = (Token)_errHandler.recoverInline(this);
-        } else {
+        }
+        else {
+          if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+          _errHandler.reportMatch(this);
           consume();
         }
         setState(227);
@@ -1755,7 +1780,10 @@ class EqlBaseParser extends Parser {
         _la = _input.LA(1);
         if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LIKE) | (1L << LIKE_INSENSITIVE) | (1L << REGEX) | (1L << REGEX_INSENSITIVE) | (1L << SEQ))) != 0)) ) {
           ((PredicateContext)_localctx).kind = (Token)_errHandler.recoverInline(this);
-        } else {
+        }
+        else {
+          if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+          _errHandler.reportMatch(this);
           consume();
         }
         setState(229);
@@ -1989,6 +2017,7 @@ class EqlBaseParser extends Parser {
       setState(252);
       match(LP);
       setState(261);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << FALSE) | (1L << NOT) | (1L << NULL) | (1L << TRUE) | (1L << PLUS) | (1L << MINUS) | (1L << LP) | (1L << STRING) | (1L << INTEGER_VALUE) | (1L << DECIMAL_VALUE) | (1L << IDENTIFIER) | (1L << QUOTED_IDENTIFIER) | (1L << TILDE_IDENTIFIER))) != 0)) {
         {
@@ -2061,7 +2090,10 @@ class EqlBaseParser extends Parser {
       _la = _input.LA(1);
       if ( !(_la==IDENTIFIER || _la==TILDE_IDENTIFIER) ) {
       _errHandler.recoverInline(this);
-      } else {
+      }
+      else {
+        if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+        _errHandler.reportMatch(this);
         consume();
       }
       }
@@ -2168,6 +2200,7 @@ class EqlBaseParser extends Parser {
     enterRule(_localctx, 44, RULE_constant);
     try {
       setState(271);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case NULL:
         _localctx = new NullLiteralContext(_localctx);
@@ -2255,7 +2288,10 @@ class EqlBaseParser extends Parser {
       _la = _input.LA(1);
       if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << EQ) | (1L << NEQ) | (1L << LT) | (1L << LTE) | (1L << GT) | (1L << GTE))) != 0)) ) {
       _errHandler.recoverInline(this);
-      } else {
+      }
+      else {
+        if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+        _errHandler.reportMatch(this);
         consume();
       }
       }
@@ -2304,7 +2340,10 @@ class EqlBaseParser extends Parser {
       _la = _input.LA(1);
       if ( !(_la==FALSE || _la==TRUE) ) {
       _errHandler.recoverInline(this);
-      } else {
+      }
+      else {
+        if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+        _errHandler.reportMatch(this);
         consume();
       }
       }
@@ -2379,6 +2418,7 @@ class EqlBaseParser extends Parser {
         if ( _alt==1 ) {
           {
           setState(287);
+          _errHandler.sync(this);
           switch (_input.LA(1)) {
           case DOT:
             {
@@ -2465,7 +2505,10 @@ class EqlBaseParser extends Parser {
       _la = _input.LA(1);
       if ( !(_la==IDENTIFIER || _la==QUOTED_IDENTIFIER) ) {
       _errHandler.recoverInline(this);
-      } else {
+      }
+      else {
+        if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+        _errHandler.reportMatch(this);
         consume();
       }
       }
@@ -2516,6 +2559,7 @@ class EqlBaseParser extends Parser {
       setState(294);
       number();
       setState(296);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==IDENTIFIER) {
         {
@@ -2588,6 +2632,7 @@ class EqlBaseParser extends Parser {
     enterRule(_localctx, 56, RULE_number);
     try {
       setState(300);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case DECIMAL_VALUE:
         _localctx = new DecimalLiteralContext(_localctx);
@@ -2695,7 +2740,10 @@ class EqlBaseParser extends Parser {
       _la = _input.LA(1);
       if ( !(_la==STRING || _la==IDENTIFIER) ) {
       _errHandler.recoverInline(this);
-      } else {
+      }
+      else {
+        if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+        _errHandler.reportMatch(this);
         consume();
       }
       }
@@ -2740,7 +2788,7 @@ class EqlBaseParser extends Parser {
   }
 
   public static final String _serializedATN =
-    "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\64\u0135\4\2\t\2"+
+    "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\64\u0135\4\2\t\2"+
     "\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\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\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
     "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+
@@ -2766,9 +2814,9 @@ class EqlBaseParser extends Parser {
     "\u0125\13\33\3\34\3\34\3\35\3\35\5\35\u012b\n\35\3\36\3\36\5\36\u012f"+
     "\n\36\3\37\3\37\3 \3 \3 \2\4 $!\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36"+
     " \"$&(*,.\60\62\64\668:<>\2\13\3\2 !\3\2\"$\3\2\7\b\5\2\n\13\21\22\30"+
-    "\30\4\2//\61\61\3\2\32\37\4\2\6\6\24\24\3\2/\60\4\2,,//\u0142\2@\3\2\2"+
-    "\2\4C\3\2\2\2\6F\3\2\2\2\bP\3\2\2\2\nR\3\2\2\2\fW\3\2\2\2\16l\3\2\2\2"+
-    "\20z\3\2\2\2\22\u0086\3\2\2\2\24\u008f\3\2\2\2\26\u0093\3\2\2\2\30\u0097"+
+    "\30\4\2//\61\61\3\2\32\37\4\2\6\6\24\24\3\2/\60\4\2,,//\2\u0142\2@\3\2"+
+    "\2\2\4C\3\2\2\2\6F\3\2\2\2\bP\3\2\2\2\nR\3\2\2\2\fW\3\2\2\2\16l\3\2\2"+
+    "\2\20z\3\2\2\2\22\u0086\3\2\2\2\24\u008f\3\2\2\2\26\u0093\3\2\2\2\30\u0097"+
     "\3\2\2\2\32\u009b\3\2\2\2\34\u009f\3\2\2\2\36\u00a4\3\2\2\2 \u00ad\3\2"+
     "\2\2\"\u00bf\3\2\2\2$\u00c8\3\2\2\2&\u00f2\3\2\2\2(\u00fb\3\2\2\2*\u00fd"+
     "\3\2\2\2,\u010b\3\2\2\2.\u0111\3\2\2\2\60\u0113\3\2\2\2\62\u0115\3\2\2"+

+ 2 - 1
x-pack/plugin/eql/src/test/java/org/elasticsearch/xpack/eql/analysis/VerifierTests.java

@@ -30,6 +30,7 @@ import java.util.TreeSet;
 import java.util.function.Function;
 
 import static java.util.Collections.emptyMap;
+import static org.hamcrest.Matchers.startsWith;
 
 public class VerifierTests extends ESTestCase {
 
@@ -94,7 +95,7 @@ public class VerifierTests extends ESTestCase {
     }
 
     public void testQueryStartsWithNumber() {
-        assertEquals("1:1: no viable alternative at input '42'", errorParsing("42 where true"));
+        assertThat(errorParsing("42 where true"), startsWith("1:1: mismatched input '42' expecting"));
     }
 
     public void testMissingColumn() {

+ 1 - 1
x-pack/plugin/eql/src/test/java/org/elasticsearch/xpack/eql/parser/ExpressionTests.java

@@ -380,7 +380,7 @@ public class ExpressionTests extends ESTestCase {
     public void testIdentifierForEventTypeDisallowed() {
         ParsingException e = expectThrows(ParsingException.class, "Expected syntax error",
                 () -> parser.createStatement("`identifier` where foo == true"));
-        assertEquals("line 1:1: no viable alternative at input '`identifier`'", e.getMessage());
+        assertThat(e.getMessage(), startsWith("line 1:1: mismatched input '`identifier`' expecting"));
     }
 
     public void testFunctions() {

+ 93 - 76
x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseLexer.java

@@ -11,7 +11,7 @@ import org.antlr.v4.runtime.misc.*;
 
 @SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
 class SqlBaseLexer extends Lexer {
-  static { RuntimeMetaData.checkVersion("4.5.3", RuntimeMetaData.VERSION); }
+  static { RuntimeMetaData.checkVersion("4.9.2", RuntimeMetaData.VERSION); }
 
   protected static final DFA[] _decisionToDFA;
   protected static final PredictionContextCache _sharedContextCache =
@@ -38,74 +38,88 @@ class SqlBaseLexer extends Lexer {
     DECIMAL_VALUE=129, IDENTIFIER=130, DIGIT_IDENTIFIER=131, TABLE_IDENTIFIER=132, 
     QUOTED_IDENTIFIER=133, BACKQUOTED_IDENTIFIER=134, SIMPLE_COMMENT=135, 
     BRACKETED_COMMENT=136, WS=137, UNRECOGNIZED=138;
+  public static String[] channelNames = {
+    "DEFAULT_TOKEN_CHANNEL", "HIDDEN"
+  };
+
   public static String[] modeNames = {
     "DEFAULT_MODE"
   };
 
-  public static final String[] ruleNames = {
-    "T__0", "T__1", "T__2", "T__3", "ALL", "ANALYZE", "ANALYZED", "AND", "ANY", 
-    "AS", "ASC", "BETWEEN", "BY", "CASE", "CAST", "CATALOG", "CATALOGS", "COLUMNS", 
-    "CONVERT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "DAY", 
-    "DAYS", "DEBUG", "DESC", "DESCRIBE", "DISTINCT", "ELSE", "END", "ESCAPE", 
-    "EXECUTABLE", "EXISTS", "EXPLAIN", "EXTRACT", "FALSE", "FIRST", "FOR", 
-    "FORMAT", "FROM", "FROZEN", "FULL", "FUNCTIONS", "GRAPHVIZ", "GROUP", 
-    "HAVING", "HOUR", "HOURS", "IN", "INCLUDE", "INNER", "INTERVAL", "IS", 
-    "JOIN", "LAST", "LEFT", "LIKE", "LIMIT", "MAPPED", "MATCH", "MINUTE", 
-    "MINUTES", "MONTH", "MONTHS", "NATURAL", "NOT", "NULL", "NULLS", "ON", 
-    "OPTIMIZED", "OR", "ORDER", "OUTER", "PARSED", "PHYSICAL", "PIVOT", "PLAN", 
-    "RIGHT", "RLIKE", "QUERY", "SCHEMAS", "SECOND", "SECONDS", "SELECT", "SHOW", 
-    "SYS", "TABLE", "TABLES", "TEXT", "THEN", "TRUE", "TO", "TOP", "TYPE", 
-    "TYPES", "USING", "VERIFY", "WHEN", "WHERE", "WITH", "YEAR", "YEARS", 
-    "ESCAPE_ESC", "FUNCTION_ESC", "LIMIT_ESC", "DATE_ESC", "TIME_ESC", "TIMESTAMP_ESC", 
-    "GUID_ESC", "ESC_START", "ESC_END", "EQ", "NULLEQ", "NEQ", "LT", "LTE", 
-    "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", "PERCENT", "CAST_OP", 
-    "DOT", "PARAM", "STRING", "INTEGER_VALUE", "DECIMAL_VALUE", "IDENTIFIER", 
-    "DIGIT_IDENTIFIER", "TABLE_IDENTIFIER", "QUOTED_IDENTIFIER", "BACKQUOTED_IDENTIFIER", 
-    "EXPONENT", "DIGIT", "LETTER", "SIMPLE_COMMENT", "BRACKETED_COMMENT", 
-    "WS", "UNRECOGNIZED"
-  };
+  private static String[] makeRuleNames() {
+    return new String[] {
+      "T__0", "T__1", "T__2", "T__3", "ALL", "ANALYZE", "ANALYZED", "AND", 
+      "ANY", "AS", "ASC", "BETWEEN", "BY", "CASE", "CAST", "CATALOG", "CATALOGS", 
+      "COLUMNS", "CONVERT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", 
+      "DAY", "DAYS", "DEBUG", "DESC", "DESCRIBE", "DISTINCT", "ELSE", "END", 
+      "ESCAPE", "EXECUTABLE", "EXISTS", "EXPLAIN", "EXTRACT", "FALSE", "FIRST", 
+      "FOR", "FORMAT", "FROM", "FROZEN", "FULL", "FUNCTIONS", "GRAPHVIZ", "GROUP", 
+      "HAVING", "HOUR", "HOURS", "IN", "INCLUDE", "INNER", "INTERVAL", "IS", 
+      "JOIN", "LAST", "LEFT", "LIKE", "LIMIT", "MAPPED", "MATCH", "MINUTE", 
+      "MINUTES", "MONTH", "MONTHS", "NATURAL", "NOT", "NULL", "NULLS", "ON", 
+      "OPTIMIZED", "OR", "ORDER", "OUTER", "PARSED", "PHYSICAL", "PIVOT", "PLAN", 
+      "RIGHT", "RLIKE", "QUERY", "SCHEMAS", "SECOND", "SECONDS", "SELECT", 
+      "SHOW", "SYS", "TABLE", "TABLES", "TEXT", "THEN", "TRUE", "TO", "TOP", 
+      "TYPE", "TYPES", "USING", "VERIFY", "WHEN", "WHERE", "WITH", "YEAR", 
+      "YEARS", "ESCAPE_ESC", "FUNCTION_ESC", "LIMIT_ESC", "DATE_ESC", "TIME_ESC", 
+      "TIMESTAMP_ESC", "GUID_ESC", "ESC_START", "ESC_END", "EQ", "NULLEQ", 
+      "NEQ", "LT", "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", 
+      "PERCENT", "CAST_OP", "DOT", "PARAM", "STRING", "INTEGER_VALUE", "DECIMAL_VALUE", 
+      "IDENTIFIER", "DIGIT_IDENTIFIER", "TABLE_IDENTIFIER", "QUOTED_IDENTIFIER", 
+      "BACKQUOTED_IDENTIFIER", "EXPONENT", "DIGIT", "LETTER", "SIMPLE_COMMENT", 
+      "BRACKETED_COMMENT", "WS", "UNRECOGNIZED"
+    };
+  }
+  public static final String[] ruleNames = makeRuleNames();
 
-  private static final String[] _LITERAL_NAMES = {
-    null, "'('", "')'", "','", "':'", "'ALL'", "'ANALYZE'", "'ANALYZED'", 
-    "'AND'", "'ANY'", "'AS'", "'ASC'", "'BETWEEN'", "'BY'", "'CASE'", "'CAST'", 
-    "'CATALOG'", "'CATALOGS'", "'COLUMNS'", "'CONVERT'", "'CURRENT_DATE'", 
-    "'CURRENT_TIME'", "'CURRENT_TIMESTAMP'", "'DAY'", "'DAYS'", "'DEBUG'", 
-    "'DESC'", "'DESCRIBE'", "'DISTINCT'", "'ELSE'", "'END'", "'ESCAPE'", "'EXECUTABLE'", 
-    "'EXISTS'", "'EXPLAIN'", "'EXTRACT'", "'FALSE'", "'FIRST'", "'FOR'", "'FORMAT'", 
-    "'FROM'", "'FROZEN'", "'FULL'", "'FUNCTIONS'", "'GRAPHVIZ'", "'GROUP'", 
-    "'HAVING'", "'HOUR'", "'HOURS'", "'IN'", "'INCLUDE'", "'INNER'", "'INTERVAL'", 
-    "'IS'", "'JOIN'", "'LAST'", "'LEFT'", "'LIKE'", "'LIMIT'", "'MAPPED'", 
-    "'MATCH'", "'MINUTE'", "'MINUTES'", "'MONTH'", "'MONTHS'", "'NATURAL'", 
-    "'NOT'", "'NULL'", "'NULLS'", "'ON'", "'OPTIMIZED'", "'OR'", "'ORDER'", 
-    "'OUTER'", "'PARSED'", "'PHYSICAL'", "'PIVOT'", "'PLAN'", "'RIGHT'", "'RLIKE'", 
-    "'QUERY'", "'SCHEMAS'", "'SECOND'", "'SECONDS'", "'SELECT'", "'SHOW'", 
-    "'SYS'", "'TABLE'", "'TABLES'", "'TEXT'", "'THEN'", "'TRUE'", "'TO'", 
-    "'TOP'", "'TYPE'", "'TYPES'", "'USING'", "'VERIFY'", "'WHEN'", "'WHERE'", 
-    "'WITH'", "'YEAR'", "'YEARS'", null, null, null, null, null, null, null, 
-    null, "'}'", "'='", "'<=>'", null, "'<'", "'<='", "'>'", "'>='", "'+'", 
-    "'-'", "'*'", "'/'", "'%'", "'::'", "'.'", "'?'"
-  };
-  private static final String[] _SYMBOLIC_NAMES = {
-    null, null, null, null, null, "ALL", "ANALYZE", "ANALYZED", "AND", "ANY", 
-    "AS", "ASC", "BETWEEN", "BY", "CASE", "CAST", "CATALOG", "CATALOGS", "COLUMNS", 
-    "CONVERT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "DAY", 
-    "DAYS", "DEBUG", "DESC", "DESCRIBE", "DISTINCT", "ELSE", "END", "ESCAPE", 
-    "EXECUTABLE", "EXISTS", "EXPLAIN", "EXTRACT", "FALSE", "FIRST", "FOR", 
-    "FORMAT", "FROM", "FROZEN", "FULL", "FUNCTIONS", "GRAPHVIZ", "GROUP", 
-    "HAVING", "HOUR", "HOURS", "IN", "INCLUDE", "INNER", "INTERVAL", "IS", 
-    "JOIN", "LAST", "LEFT", "LIKE", "LIMIT", "MAPPED", "MATCH", "MINUTE", 
-    "MINUTES", "MONTH", "MONTHS", "NATURAL", "NOT", "NULL", "NULLS", "ON", 
-    "OPTIMIZED", "OR", "ORDER", "OUTER", "PARSED", "PHYSICAL", "PIVOT", "PLAN", 
-    "RIGHT", "RLIKE", "QUERY", "SCHEMAS", "SECOND", "SECONDS", "SELECT", "SHOW", 
-    "SYS", "TABLE", "TABLES", "TEXT", "THEN", "TRUE", "TO", "TOP", "TYPE", 
-    "TYPES", "USING", "VERIFY", "WHEN", "WHERE", "WITH", "YEAR", "YEARS", 
-    "ESCAPE_ESC", "FUNCTION_ESC", "LIMIT_ESC", "DATE_ESC", "TIME_ESC", "TIMESTAMP_ESC", 
-    "GUID_ESC", "ESC_START", "ESC_END", "EQ", "NULLEQ", "NEQ", "LT", "LTE", 
-    "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", "PERCENT", "CAST_OP", 
-    "DOT", "PARAM", "STRING", "INTEGER_VALUE", "DECIMAL_VALUE", "IDENTIFIER", 
-    "DIGIT_IDENTIFIER", "TABLE_IDENTIFIER", "QUOTED_IDENTIFIER", "BACKQUOTED_IDENTIFIER", 
-    "SIMPLE_COMMENT", "BRACKETED_COMMENT", "WS", "UNRECOGNIZED"
-  };
+  private static String[] makeLiteralNames() {
+    return new String[] {
+      null, "'('", "')'", "','", "':'", "'ALL'", "'ANALYZE'", "'ANALYZED'", 
+      "'AND'", "'ANY'", "'AS'", "'ASC'", "'BETWEEN'", "'BY'", "'CASE'", "'CAST'", 
+      "'CATALOG'", "'CATALOGS'", "'COLUMNS'", "'CONVERT'", "'CURRENT_DATE'", 
+      "'CURRENT_TIME'", "'CURRENT_TIMESTAMP'", "'DAY'", "'DAYS'", "'DEBUG'", 
+      "'DESC'", "'DESCRIBE'", "'DISTINCT'", "'ELSE'", "'END'", "'ESCAPE'", 
+      "'EXECUTABLE'", "'EXISTS'", "'EXPLAIN'", "'EXTRACT'", "'FALSE'", "'FIRST'", 
+      "'FOR'", "'FORMAT'", "'FROM'", "'FROZEN'", "'FULL'", "'FUNCTIONS'", "'GRAPHVIZ'", 
+      "'GROUP'", "'HAVING'", "'HOUR'", "'HOURS'", "'IN'", "'INCLUDE'", "'INNER'", 
+      "'INTERVAL'", "'IS'", "'JOIN'", "'LAST'", "'LEFT'", "'LIKE'", "'LIMIT'", 
+      "'MAPPED'", "'MATCH'", "'MINUTE'", "'MINUTES'", "'MONTH'", "'MONTHS'", 
+      "'NATURAL'", "'NOT'", "'NULL'", "'NULLS'", "'ON'", "'OPTIMIZED'", "'OR'", 
+      "'ORDER'", "'OUTER'", "'PARSED'", "'PHYSICAL'", "'PIVOT'", "'PLAN'", 
+      "'RIGHT'", "'RLIKE'", "'QUERY'", "'SCHEMAS'", "'SECOND'", "'SECONDS'", 
+      "'SELECT'", "'SHOW'", "'SYS'", "'TABLE'", "'TABLES'", "'TEXT'", "'THEN'", 
+      "'TRUE'", "'TO'", "'TOP'", "'TYPE'", "'TYPES'", "'USING'", "'VERIFY'", 
+      "'WHEN'", "'WHERE'", "'WITH'", "'YEAR'", "'YEARS'", null, null, null, 
+      null, null, null, null, null, "'}'", "'='", "'<=>'", null, "'<'", "'<='", 
+      "'>'", "'>='", "'+'", "'-'", "'*'", "'/'", "'%'", "'::'", "'.'", "'?'"
+    };
+  }
+  private static final String[] _LITERAL_NAMES = makeLiteralNames();
+  private static String[] makeSymbolicNames() {
+    return new String[] {
+      null, null, null, null, null, "ALL", "ANALYZE", "ANALYZED", "AND", "ANY", 
+      "AS", "ASC", "BETWEEN", "BY", "CASE", "CAST", "CATALOG", "CATALOGS", 
+      "COLUMNS", "CONVERT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", 
+      "DAY", "DAYS", "DEBUG", "DESC", "DESCRIBE", "DISTINCT", "ELSE", "END", 
+      "ESCAPE", "EXECUTABLE", "EXISTS", "EXPLAIN", "EXTRACT", "FALSE", "FIRST", 
+      "FOR", "FORMAT", "FROM", "FROZEN", "FULL", "FUNCTIONS", "GRAPHVIZ", "GROUP", 
+      "HAVING", "HOUR", "HOURS", "IN", "INCLUDE", "INNER", "INTERVAL", "IS", 
+      "JOIN", "LAST", "LEFT", "LIKE", "LIMIT", "MAPPED", "MATCH", "MINUTE", 
+      "MINUTES", "MONTH", "MONTHS", "NATURAL", "NOT", "NULL", "NULLS", "ON", 
+      "OPTIMIZED", "OR", "ORDER", "OUTER", "PARSED", "PHYSICAL", "PIVOT", "PLAN", 
+      "RIGHT", "RLIKE", "QUERY", "SCHEMAS", "SECOND", "SECONDS", "SELECT", 
+      "SHOW", "SYS", "TABLE", "TABLES", "TEXT", "THEN", "TRUE", "TO", "TOP", 
+      "TYPE", "TYPES", "USING", "VERIFY", "WHEN", "WHERE", "WITH", "YEAR", 
+      "YEARS", "ESCAPE_ESC", "FUNCTION_ESC", "LIMIT_ESC", "DATE_ESC", "TIME_ESC", 
+      "TIMESTAMP_ESC", "GUID_ESC", "ESC_START", "ESC_END", "EQ", "NULLEQ", 
+      "NEQ", "LT", "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", 
+      "PERCENT", "CAST_OP", "DOT", "PARAM", "STRING", "INTEGER_VALUE", "DECIMAL_VALUE", 
+      "IDENTIFIER", "DIGIT_IDENTIFIER", "TABLE_IDENTIFIER", "QUOTED_IDENTIFIER", 
+      "BACKQUOTED_IDENTIFIER", "SIMPLE_COMMENT", "BRACKETED_COMMENT", "WS", 
+      "UNRECOGNIZED"
+    };
+  }
+  private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
   public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
 
   /**
@@ -154,6 +168,9 @@ class SqlBaseLexer extends Lexer {
   @Override
   public String getSerializedATN() { return _serializedATN; }
 
+  @Override
+  public String[] getChannelNames() { return channelNames; }
+
   @Override
   public String[] getModeNames() { return modeNames; }
 
@@ -161,7 +178,7 @@ class SqlBaseLexer extends Lexer {
   public ATN getATN() { return _ATN; }
 
   public static final String _serializedATN =
-    "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\u008c\u0489\b\1\4"+
+    "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\u008c\u0489\b\1\4"+
     "\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\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\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+
     "\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31"+
@@ -251,17 +268,17 @@ class SqlBaseLexer extends Lexer {
     "\u0081\u0101\u0082\u0103\u0083\u0105\u0084\u0107\u0085\u0109\u0086\u010b"+
     "\u0087\u010d\u0088\u010f\2\u0111\2\u0113\2\u0115\u0089\u0117\u008a\u0119"+
     "\u008b\u011b\u008c\3\2\13\3\2))\4\2BBaa\3\2$$\3\2bb\4\2--//\3\2\62;\3"+
-    "\2C\\\4\2\f\f\17\17\5\2\13\f\17\17\"\"\u04aa\2\3\3\2\2\2\2\5\3\2\2\2\2"+
-    "\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2"+
-    "\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2"+
-    "\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2"+
-    "\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2"+
-    "\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2"+
-    "\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2"+
-    "M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3"+
-    "\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2"+
-    "\2\2g\3\2\2\2\2i\3\2\2\2\2k\3\2\2\2\2m\3\2\2\2\2o\3\2\2\2\2q\3\2\2\2\2"+
-    "s\3\2\2\2\2u\3\2\2\2\2w\3\2\2\2\2y\3\2\2\2\2{\3\2\2\2\2}\3\2\2\2\2\177"+
+    "\2C\\\4\2\f\f\17\17\5\2\13\f\17\17\"\"\2\u04aa\2\3\3\2\2\2\2\5\3\2\2\2"+
+    "\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3"+
+    "\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2"+
+    "\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2"+
+    "\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2"+
+    "\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2"+
+    "\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2"+
+    "\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y"+
+    "\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2"+
+    "\2\2\2g\3\2\2\2\2i\3\2\2\2\2k\3\2\2\2\2m\3\2\2\2\2o\3\2\2\2\2q\3\2\2\2"+
+    "\2s\3\2\2\2\2u\3\2\2\2\2w\3\2\2\2\2y\3\2\2\2\2{\3\2\2\2\2}\3\2\2\2\2\177"+
     "\3\2\2\2\2\u0081\3\2\2\2\2\u0083\3\2\2\2\2\u0085\3\2\2\2\2\u0087\3\2\2"+
     "\2\2\u0089\3\2\2\2\2\u008b\3\2\2\2\2\u008d\3\2\2\2\2\u008f\3\2\2\2\2\u0091"+
     "\3\2\2\2\2\u0093\3\2\2\2\2\u0095\3\2\2\2\2\u0097\3\2\2\2\2\u0099\3\2\2"+

+ 232 - 87
x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseParser.java

@@ -11,7 +11,7 @@ import java.util.ArrayList;
 
 @SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
 class SqlBaseParser extends Parser {
-  static { RuntimeMetaData.checkVersion("4.5.3", RuntimeMetaData.VERSION); }
+  static { RuntimeMetaData.checkVersion("4.9.2", RuntimeMetaData.VERSION); }
 
   protected static final DFA[] _decisionToDFA;
   protected static final PredictionContextCache _sharedContextCache =
@@ -57,63 +57,73 @@ class SqlBaseParser extends Parser {
     RULE_qualifiedName = 51, RULE_identifier = 52, RULE_tableIdentifier = 53, 
     RULE_quoteIdentifier = 54, RULE_unquoteIdentifier = 55, RULE_number = 56, 
     RULE_string = 57, RULE_whenClause = 58, RULE_nonReserved = 59;
-  public static final String[] ruleNames = {
-    "singleStatement", "singleExpression", "statement", "query", "queryNoWith", 
-    "limitClause", "queryTerm", "orderBy", "querySpecification", "fromClause", 
-    "groupBy", "groupingElement", "groupingExpressions", "namedQuery", "topClause", 
-    "setQuantifier", "selectItems", "selectItem", "relation", "joinRelation", 
-    "joinType", "joinCriteria", "relationPrimary", "pivotClause", "pivotArgs", 
-    "namedValueExpression", "expression", "booleanExpression", "matchQueryOptions", 
-    "predicated", "predicate", "likePattern", "pattern", "patternEscape", 
-    "valueExpression", "primaryExpression", "builtinDateTimeFunction", "castExpression", 
-    "castTemplate", "convertTemplate", "extractExpression", "extractTemplate", 
-    "functionExpression", "functionTemplate", "functionName", "constant", 
-    "comparisonOperator", "booleanValue", "interval", "intervalField", "dataType", 
-    "qualifiedName", "identifier", "tableIdentifier", "quoteIdentifier", "unquoteIdentifier", 
-    "number", "string", "whenClause", "nonReserved"
-  };
-
-  private static final String[] _LITERAL_NAMES = {
-    null, "'('", "')'", "','", "':'", "'ALL'", "'ANALYZE'", "'ANALYZED'", 
-    "'AND'", "'ANY'", "'AS'", "'ASC'", "'BETWEEN'", "'BY'", "'CASE'", "'CAST'", 
-    "'CATALOG'", "'CATALOGS'", "'COLUMNS'", "'CONVERT'", "'CURRENT_DATE'", 
-    "'CURRENT_TIME'", "'CURRENT_TIMESTAMP'", "'DAY'", "'DAYS'", "'DEBUG'", 
-    "'DESC'", "'DESCRIBE'", "'DISTINCT'", "'ELSE'", "'END'", "'ESCAPE'", "'EXECUTABLE'", 
-    "'EXISTS'", "'EXPLAIN'", "'EXTRACT'", "'FALSE'", "'FIRST'", "'FOR'", "'FORMAT'", 
-    "'FROM'", "'FROZEN'", "'FULL'", "'FUNCTIONS'", "'GRAPHVIZ'", "'GROUP'", 
-    "'HAVING'", "'HOUR'", "'HOURS'", "'IN'", "'INCLUDE'", "'INNER'", "'INTERVAL'", 
-    "'IS'", "'JOIN'", "'LAST'", "'LEFT'", "'LIKE'", "'LIMIT'", "'MAPPED'", 
-    "'MATCH'", "'MINUTE'", "'MINUTES'", "'MONTH'", "'MONTHS'", "'NATURAL'", 
-    "'NOT'", "'NULL'", "'NULLS'", "'ON'", "'OPTIMIZED'", "'OR'", "'ORDER'", 
-    "'OUTER'", "'PARSED'", "'PHYSICAL'", "'PIVOT'", "'PLAN'", "'RIGHT'", "'RLIKE'", 
-    "'QUERY'", "'SCHEMAS'", "'SECOND'", "'SECONDS'", "'SELECT'", "'SHOW'", 
-    "'SYS'", "'TABLE'", "'TABLES'", "'TEXT'", "'THEN'", "'TRUE'", "'TO'", 
-    "'TOP'", "'TYPE'", "'TYPES'", "'USING'", "'VERIFY'", "'WHEN'", "'WHERE'", 
-    "'WITH'", "'YEAR'", "'YEARS'", null, null, null, null, null, null, null, 
-    null, "'}'", "'='", "'<=>'", null, "'<'", "'<='", "'>'", "'>='", "'+'", 
-    "'-'", "'*'", "'/'", "'%'", "'::'", "'.'", "'?'"
-  };
-  private static final String[] _SYMBOLIC_NAMES = {
-    null, null, null, null, null, "ALL", "ANALYZE", "ANALYZED", "AND", "ANY", 
-    "AS", "ASC", "BETWEEN", "BY", "CASE", "CAST", "CATALOG", "CATALOGS", "COLUMNS", 
-    "CONVERT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "DAY", 
-    "DAYS", "DEBUG", "DESC", "DESCRIBE", "DISTINCT", "ELSE", "END", "ESCAPE", 
-    "EXECUTABLE", "EXISTS", "EXPLAIN", "EXTRACT", "FALSE", "FIRST", "FOR", 
-    "FORMAT", "FROM", "FROZEN", "FULL", "FUNCTIONS", "GRAPHVIZ", "GROUP", 
-    "HAVING", "HOUR", "HOURS", "IN", "INCLUDE", "INNER", "INTERVAL", "IS", 
-    "JOIN", "LAST", "LEFT", "LIKE", "LIMIT", "MAPPED", "MATCH", "MINUTE", 
-    "MINUTES", "MONTH", "MONTHS", "NATURAL", "NOT", "NULL", "NULLS", "ON", 
-    "OPTIMIZED", "OR", "ORDER", "OUTER", "PARSED", "PHYSICAL", "PIVOT", "PLAN", 
-    "RIGHT", "RLIKE", "QUERY", "SCHEMAS", "SECOND", "SECONDS", "SELECT", "SHOW", 
-    "SYS", "TABLE", "TABLES", "TEXT", "THEN", "TRUE", "TO", "TOP", "TYPE", 
-    "TYPES", "USING", "VERIFY", "WHEN", "WHERE", "WITH", "YEAR", "YEARS", 
-    "ESCAPE_ESC", "FUNCTION_ESC", "LIMIT_ESC", "DATE_ESC", "TIME_ESC", "TIMESTAMP_ESC", 
-    "GUID_ESC", "ESC_START", "ESC_END", "EQ", "NULLEQ", "NEQ", "LT", "LTE", 
-    "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", "PERCENT", "CAST_OP", 
-    "DOT", "PARAM", "STRING", "INTEGER_VALUE", "DECIMAL_VALUE", "IDENTIFIER", 
-    "DIGIT_IDENTIFIER", "TABLE_IDENTIFIER", "QUOTED_IDENTIFIER", "BACKQUOTED_IDENTIFIER", 
-    "SIMPLE_COMMENT", "BRACKETED_COMMENT", "WS", "UNRECOGNIZED", "DELIMITER"
-  };
+  private static String[] makeRuleNames() {
+    return new String[] {
+      "singleStatement", "singleExpression", "statement", "query", "queryNoWith", 
+      "limitClause", "queryTerm", "orderBy", "querySpecification", "fromClause", 
+      "groupBy", "groupingElement", "groupingExpressions", "namedQuery", "topClause", 
+      "setQuantifier", "selectItems", "selectItem", "relation", "joinRelation", 
+      "joinType", "joinCriteria", "relationPrimary", "pivotClause", "pivotArgs", 
+      "namedValueExpression", "expression", "booleanExpression", "matchQueryOptions", 
+      "predicated", "predicate", "likePattern", "pattern", "patternEscape", 
+      "valueExpression", "primaryExpression", "builtinDateTimeFunction", "castExpression", 
+      "castTemplate", "convertTemplate", "extractExpression", "extractTemplate", 
+      "functionExpression", "functionTemplate", "functionName", "constant", 
+      "comparisonOperator", "booleanValue", "interval", "intervalField", "dataType", 
+      "qualifiedName", "identifier", "tableIdentifier", "quoteIdentifier", 
+      "unquoteIdentifier", "number", "string", "whenClause", "nonReserved"
+    };
+  }
+  public static final String[] ruleNames = makeRuleNames();
+
+  private static String[] makeLiteralNames() {
+    return new String[] {
+      null, "'('", "')'", "','", "':'", "'ALL'", "'ANALYZE'", "'ANALYZED'", 
+      "'AND'", "'ANY'", "'AS'", "'ASC'", "'BETWEEN'", "'BY'", "'CASE'", "'CAST'", 
+      "'CATALOG'", "'CATALOGS'", "'COLUMNS'", "'CONVERT'", "'CURRENT_DATE'", 
+      "'CURRENT_TIME'", "'CURRENT_TIMESTAMP'", "'DAY'", "'DAYS'", "'DEBUG'", 
+      "'DESC'", "'DESCRIBE'", "'DISTINCT'", "'ELSE'", "'END'", "'ESCAPE'", 
+      "'EXECUTABLE'", "'EXISTS'", "'EXPLAIN'", "'EXTRACT'", "'FALSE'", "'FIRST'", 
+      "'FOR'", "'FORMAT'", "'FROM'", "'FROZEN'", "'FULL'", "'FUNCTIONS'", "'GRAPHVIZ'", 
+      "'GROUP'", "'HAVING'", "'HOUR'", "'HOURS'", "'IN'", "'INCLUDE'", "'INNER'", 
+      "'INTERVAL'", "'IS'", "'JOIN'", "'LAST'", "'LEFT'", "'LIKE'", "'LIMIT'", 
+      "'MAPPED'", "'MATCH'", "'MINUTE'", "'MINUTES'", "'MONTH'", "'MONTHS'", 
+      "'NATURAL'", "'NOT'", "'NULL'", "'NULLS'", "'ON'", "'OPTIMIZED'", "'OR'", 
+      "'ORDER'", "'OUTER'", "'PARSED'", "'PHYSICAL'", "'PIVOT'", "'PLAN'", 
+      "'RIGHT'", "'RLIKE'", "'QUERY'", "'SCHEMAS'", "'SECOND'", "'SECONDS'", 
+      "'SELECT'", "'SHOW'", "'SYS'", "'TABLE'", "'TABLES'", "'TEXT'", "'THEN'", 
+      "'TRUE'", "'TO'", "'TOP'", "'TYPE'", "'TYPES'", "'USING'", "'VERIFY'", 
+      "'WHEN'", "'WHERE'", "'WITH'", "'YEAR'", "'YEARS'", null, null, null, 
+      null, null, null, null, null, "'}'", "'='", "'<=>'", null, "'<'", "'<='", 
+      "'>'", "'>='", "'+'", "'-'", "'*'", "'/'", "'%'", "'::'", "'.'", "'?'"
+    };
+  }
+  private static final String[] _LITERAL_NAMES = makeLiteralNames();
+  private static String[] makeSymbolicNames() {
+    return new String[] {
+      null, null, null, null, null, "ALL", "ANALYZE", "ANALYZED", "AND", "ANY", 
+      "AS", "ASC", "BETWEEN", "BY", "CASE", "CAST", "CATALOG", "CATALOGS", 
+      "COLUMNS", "CONVERT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", 
+      "DAY", "DAYS", "DEBUG", "DESC", "DESCRIBE", "DISTINCT", "ELSE", "END", 
+      "ESCAPE", "EXECUTABLE", "EXISTS", "EXPLAIN", "EXTRACT", "FALSE", "FIRST", 
+      "FOR", "FORMAT", "FROM", "FROZEN", "FULL", "FUNCTIONS", "GRAPHVIZ", "GROUP", 
+      "HAVING", "HOUR", "HOURS", "IN", "INCLUDE", "INNER", "INTERVAL", "IS", 
+      "JOIN", "LAST", "LEFT", "LIKE", "LIMIT", "MAPPED", "MATCH", "MINUTE", 
+      "MINUTES", "MONTH", "MONTHS", "NATURAL", "NOT", "NULL", "NULLS", "ON", 
+      "OPTIMIZED", "OR", "ORDER", "OUTER", "PARSED", "PHYSICAL", "PIVOT", "PLAN", 
+      "RIGHT", "RLIKE", "QUERY", "SCHEMAS", "SECOND", "SECONDS", "SELECT", 
+      "SHOW", "SYS", "TABLE", "TABLES", "TEXT", "THEN", "TRUE", "TO", "TOP", 
+      "TYPE", "TYPES", "USING", "VERIFY", "WHEN", "WHERE", "WITH", "YEAR", 
+      "YEARS", "ESCAPE_ESC", "FUNCTION_ESC", "LIMIT_ESC", "DATE_ESC", "TIME_ESC", 
+      "TIMESTAMP_ESC", "GUID_ESC", "ESC_START", "ESC_END", "EQ", "NULLEQ", 
+      "NEQ", "LT", "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", 
+      "PERCENT", "CAST_OP", "DOT", "PARAM", "STRING", "INTEGER_VALUE", "DECIMAL_VALUE", 
+      "IDENTIFIER", "DIGIT_IDENTIFIER", "TABLE_IDENTIFIER", "QUOTED_IDENTIFIER", 
+      "BACKQUOTED_IDENTIFIER", "SIMPLE_COMMENT", "BRACKETED_COMMENT", "WS", 
+      "UNRECOGNIZED", "DELIMITER"
+    };
+  }
+  private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
   public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
 
   /**
@@ -163,6 +173,7 @@ class SqlBaseParser extends Parser {
     super(input);
     _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
   }
+
   public static class SingleStatementContext extends ParserRuleContext {
     public StatementContext statement() {
       return getRuleContext(StatementContext.class,0);
@@ -639,6 +650,7 @@ class SqlBaseParser extends Parser {
           while (((((_la - 39)) & ~0x3f) == 0 && ((1L << (_la - 39)) & ((1L << (FORMAT - 39)) | (1L << (PLAN - 39)) | (1L << (VERIFY - 39)))) != 0)) {
             {
             setState(135);
+            _errHandler.sync(this);
             switch (_input.LA(1)) {
             case PLAN:
               {
@@ -649,7 +661,10 @@ class SqlBaseParser extends Parser {
               _la = _input.LA(1);
               if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ALL) | (1L << ANALYZED) | (1L << EXECUTABLE) | (1L << MAPPED))) != 0) || _la==OPTIMIZED || _la==PARSED) ) {
                 ((ExplainContext)_localctx).type = (Token)_errHandler.recoverInline(this);
-              } else {
+              }
+              else {
+                if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+                _errHandler.reportMatch(this);
                 consume();
               }
               }
@@ -663,7 +678,10 @@ class SqlBaseParser extends Parser {
               _la = _input.LA(1);
               if ( !(_la==GRAPHVIZ || _la==TEXT) ) {
                 ((ExplainContext)_localctx).format = (Token)_errHandler.recoverInline(this);
-              } else {
+              }
+              else {
+                if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+                _errHandler.reportMatch(this);
                 consume();
               }
               }
@@ -712,6 +730,7 @@ class SqlBaseParser extends Parser {
           while (_la==FORMAT || _la==PLAN) {
             {
             setState(150);
+            _errHandler.sync(this);
             switch (_input.LA(1)) {
             case PLAN:
               {
@@ -722,7 +741,10 @@ class SqlBaseParser extends Parser {
               _la = _input.LA(1);
               if ( !(_la==ANALYZED || _la==OPTIMIZED) ) {
                 ((DebugContext)_localctx).type = (Token)_errHandler.recoverInline(this);
-              } else {
+              }
+              else {
+                if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+                _errHandler.reportMatch(this);
                 consume();
               }
               }
@@ -736,7 +758,10 @@ class SqlBaseParser extends Parser {
               _la = _input.LA(1);
               if ( !(_la==GRAPHVIZ || _la==TEXT) ) {
                 ((DebugContext)_localctx).format = (Token)_errHandler.recoverInline(this);
-              } else {
+              }
+              else {
+                if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+                _errHandler.reportMatch(this);
                 consume();
               }
               }
@@ -767,6 +792,7 @@ class SqlBaseParser extends Parser {
         setState(160);
         match(TABLES);
         setState(163);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==INCLUDE) {
           {
@@ -778,6 +804,7 @@ class SqlBaseParser extends Parser {
         }
 
         setState(167);
+        _errHandler.sync(this);
         switch (_input.LA(1)) {
         case LIKE:
           {
@@ -839,7 +866,7 @@ class SqlBaseParser extends Parser {
         case EOF:
           break;
         default:
-          throw new NoViableAltException(this);
+          break;
         }
         }
         break;
@@ -852,6 +879,7 @@ class SqlBaseParser extends Parser {
         setState(170);
         match(COLUMNS);
         setState(173);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==INCLUDE) {
           {
@@ -866,10 +894,14 @@ class SqlBaseParser extends Parser {
         _la = _input.LA(1);
         if ( !(_la==FROM || _la==IN) ) {
         _errHandler.recoverInline(this);
-        } else {
+        }
+        else {
+          if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+          _errHandler.reportMatch(this);
           consume();
         }
         setState(178);
+        _errHandler.sync(this);
         switch (_input.LA(1)) {
         case LIKE:
           {
@@ -941,10 +973,14 @@ class SqlBaseParser extends Parser {
         _la = _input.LA(1);
         if ( !(_la==DESC || _la==DESCRIBE) ) {
         _errHandler.recoverInline(this);
-        } else {
+        }
+        else {
+          if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+          _errHandler.reportMatch(this);
           consume();
         }
         setState(183);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==INCLUDE) {
           {
@@ -956,6 +992,7 @@ class SqlBaseParser extends Parser {
         }
 
         setState(187);
+        _errHandler.sync(this);
         switch (_input.LA(1)) {
         case LIKE:
           {
@@ -1028,6 +1065,7 @@ class SqlBaseParser extends Parser {
         setState(190);
         match(FUNCTIONS);
         setState(192);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==LIKE) {
           {
@@ -1057,6 +1095,7 @@ class SqlBaseParser extends Parser {
         setState(197);
         match(TABLES);
         setState(200);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==CATALOG) {
           {
@@ -1084,6 +1123,7 @@ class SqlBaseParser extends Parser {
           break;
         }
         setState(215);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==TYPE) {
           {
@@ -1121,6 +1161,7 @@ class SqlBaseParser extends Parser {
         setState(218);
         match(COLUMNS);
         setState(221);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==CATALOG) {
           {
@@ -1132,6 +1173,7 @@ class SqlBaseParser extends Parser {
         }
 
         setState(226);
+        _errHandler.sync(this);
         switch (_input.LA(1)) {
         case TABLE:
           {
@@ -1196,9 +1238,10 @@ class SqlBaseParser extends Parser {
         case LIKE:
           break;
         default:
-          throw new NoViableAltException(this);
+          break;
         }
         setState(229);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==LIKE) {
           {
@@ -1218,10 +1261,12 @@ class SqlBaseParser extends Parser {
         setState(232);
         match(TYPES);
         setState(237);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (((((_la - 119)) & ~0x3f) == 0 && ((1L << (_la - 119)) & ((1L << (PLUS - 119)) | (1L << (MINUS - 119)) | (1L << (INTEGER_VALUE - 119)) | (1L << (DECIMAL_VALUE - 119)))) != 0)) {
           {
           setState(234);
+          _errHandler.sync(this);
           _la = _input.LA(1);
           if (_la==PLUS || _la==MINUS) {
             {
@@ -1229,7 +1274,10 @@ class SqlBaseParser extends Parser {
             _la = _input.LA(1);
             if ( !(_la==PLUS || _la==MINUS) ) {
             _errHandler.recoverInline(this);
-            } else {
+            }
+            else {
+              if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+              _errHandler.reportMatch(this);
               consume();
             }
             }
@@ -1293,6 +1341,7 @@ class SqlBaseParser extends Parser {
       enterOuterAlt(_localctx, 1);
       {
       setState(250);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==WITH) {
         {
@@ -1378,6 +1427,7 @@ class SqlBaseParser extends Parser {
       setState(254);
       queryTerm();
       setState(265);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==ORDER) {
         {
@@ -1407,6 +1457,7 @@ class SqlBaseParser extends Parser {
       }
 
       setState(268);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==LIMIT || _la==LIMIT_ESC) {
         {
@@ -1460,6 +1511,7 @@ class SqlBaseParser extends Parser {
     int _la;
     try {
       setState(275);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case LIMIT:
         enterOuterAlt(_localctx, 1);
@@ -1471,7 +1523,10 @@ class SqlBaseParser extends Parser {
         _la = _input.LA(1);
         if ( !(_la==ALL || _la==INTEGER_VALUE) ) {
           ((LimitClauseContext)_localctx).limit = (Token)_errHandler.recoverInline(this);
-        } else {
+        }
+        else {
+          if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+          _errHandler.reportMatch(this);
           consume();
         }
         }
@@ -1486,7 +1541,10 @@ class SqlBaseParser extends Parser {
         _la = _input.LA(1);
         if ( !(_la==ALL || _la==INTEGER_VALUE) ) {
           ((LimitClauseContext)_localctx).limit = (Token)_errHandler.recoverInline(this);
-        } else {
+        }
+        else {
+          if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+          _errHandler.reportMatch(this);
           consume();
         }
         setState(274);
@@ -1563,6 +1621,7 @@ class SqlBaseParser extends Parser {
     enterRule(_localctx, 12, RULE_queryTerm);
     try {
       setState(282);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case SELECT:
         _localctx = new QueryPrimaryDefaultContext(_localctx);
@@ -1639,6 +1698,7 @@ class SqlBaseParser extends Parser {
       setState(284);
       expression();
       setState(286);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==ASC || _la==DESC) {
         {
@@ -1647,13 +1707,17 @@ class SqlBaseParser extends Parser {
         _la = _input.LA(1);
         if ( !(_la==ASC || _la==DESC) ) {
           ((OrderByContext)_localctx).ordering = (Token)_errHandler.recoverInline(this);
-        } else {
+        }
+        else {
+          if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+          _errHandler.reportMatch(this);
           consume();
         }
         }
       }
 
       setState(290);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==NULLS) {
         {
@@ -1664,7 +1728,10 @@ class SqlBaseParser extends Parser {
         _la = _input.LA(1);
         if ( !(_la==FIRST || _la==LAST) ) {
           ((OrderByContext)_localctx).nullOrdering = (Token)_errHandler.recoverInline(this);
-        } else {
+        }
+        else {
+          if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+          _errHandler.reportMatch(this);
           consume();
         }
         }
@@ -1751,6 +1818,7 @@ class SqlBaseParser extends Parser {
         break;
       }
       setState(297);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==ALL || _la==DISTINCT) {
         {
@@ -1762,6 +1830,7 @@ class SqlBaseParser extends Parser {
       setState(299);
       selectItems();
       setState(301);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==FROM) {
         {
@@ -1771,6 +1840,7 @@ class SqlBaseParser extends Parser {
       }
 
       setState(305);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==WHERE) {
         {
@@ -1782,6 +1852,7 @@ class SqlBaseParser extends Parser {
       }
 
       setState(310);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==GROUP) {
         {
@@ -1795,6 +1866,7 @@ class SqlBaseParser extends Parser {
       }
 
       setState(314);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==HAVING) {
         {
@@ -1876,6 +1948,7 @@ class SqlBaseParser extends Parser {
         _la = _input.LA(1);
       }
       setState(326);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==PIVOT) {
         {
@@ -1934,6 +2007,7 @@ class SqlBaseParser extends Parser {
       enterOuterAlt(_localctx, 1);
       {
       setState(329);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==ALL || _la==DISTINCT) {
         {
@@ -2066,6 +2140,7 @@ class SqlBaseParser extends Parser {
         setState(341);
         match(T__0);
         setState(350);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << ANALYZE) | (1L << ANALYZED) | (1L << CASE) | (1L << CAST) | (1L << CATALOGS) | (1L << COLUMNS) | (1L << CONVERT) | (1L << CURRENT_DATE) | (1L << CURRENT_TIME) | (1L << CURRENT_TIMESTAMP) | (1L << DAY) | (1L << DEBUG) | (1L << EXECUTABLE) | (1L << EXISTS) | (1L << EXPLAIN) | (1L << EXTRACT) | (1L << FALSE) | (1L << FIRST) | (1L << FORMAT) | (1L << FULL) | (1L << FUNCTIONS) | (1L << GRAPHVIZ) | (1L << HOUR) | (1L << INTERVAL) | (1L << LAST) | (1L << LEFT) | (1L << LIMIT) | (1L << MAPPED) | (1L << MATCH) | (1L << MINUTE) | (1L << MONTH))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (NOT - 66)) | (1L << (NULL - 66)) | (1L << (OPTIMIZED - 66)) | (1L << (PARSED - 66)) | (1L << (PHYSICAL - 66)) | (1L << (PIVOT - 66)) | (1L << (PLAN - 66)) | (1L << (RIGHT - 66)) | (1L << (RLIKE - 66)) | (1L << (QUERY - 66)) | (1L << (SCHEMAS - 66)) | (1L << (SECOND - 66)) | (1L << (SHOW - 66)) | (1L << (SYS - 66)) | (1L << (TABLES - 66)) | (1L << (TEXT - 66)) | (1L << (TRUE - 66)) | (1L << (TOP - 66)) | (1L << (TYPE - 66)) | (1L << (TYPES - 66)) | (1L << (VERIFY - 66)) | (1L << (YEAR - 66)) | (1L << (FUNCTION_ESC - 66)) | (1L << (DATE_ESC - 66)) | (1L << (TIME_ESC - 66)) | (1L << (TIMESTAMP_ESC - 66)) | (1L << (GUID_ESC - 66)) | (1L << (PLUS - 66)) | (1L << (MINUS - 66)) | (1L << (ASTERISK - 66)) | (1L << (PARAM - 66)) | (1L << (STRING - 66)) | (1L << (INTEGER_VALUE - 66)) | (1L << (DECIMAL_VALUE - 66)))) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & ((1L << (IDENTIFIER - 130)) | (1L << (DIGIT_IDENTIFIER - 130)) | (1L << (QUOTED_IDENTIFIER - 130)) | (1L << (BACKQUOTED_IDENTIFIER - 130)))) != 0)) {
           {
@@ -2250,7 +2325,10 @@ class SqlBaseParser extends Parser {
       _la = _input.LA(1);
       if ( !(_la==ALL || _la==DISTINCT) ) {
       _errHandler.recoverInline(this);
-      } else {
+      }
+      else {
+        if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+        _errHandler.reportMatch(this);
         consume();
       }
       }
@@ -2381,6 +2459,7 @@ class SqlBaseParser extends Parser {
       case 1:
         {
         setState(377);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==AS) {
           {
@@ -2510,6 +2589,7 @@ class SqlBaseParser extends Parser {
     int _la;
     try {
       setState(400);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case FULL:
       case INNER:
@@ -2527,6 +2607,7 @@ class SqlBaseParser extends Parser {
         setState(391);
         ((JoinRelationContext)_localctx).right = relationPrimary();
         setState(393);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==ON || _la==USING) {
           {
@@ -2596,12 +2677,14 @@ class SqlBaseParser extends Parser {
     int _la;
     try {
       setState(417);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case INNER:
       case JOIN:
         enterOuterAlt(_localctx, 1);
         {
         setState(403);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==INNER) {
           {
@@ -2618,6 +2701,7 @@ class SqlBaseParser extends Parser {
         setState(405);
         match(LEFT);
         setState(407);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==OUTER) {
           {
@@ -2634,6 +2718,7 @@ class SqlBaseParser extends Parser {
         setState(409);
         match(RIGHT);
         setState(411);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==OUTER) {
           {
@@ -2650,6 +2735,7 @@ class SqlBaseParser extends Parser {
         setState(413);
         match(FULL);
         setState(415);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==OUTER) {
           {
@@ -2712,6 +2798,7 @@ class SqlBaseParser extends Parser {
     int _la;
     try {
       setState(433);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case ON:
         enterOuterAlt(_localctx, 1);
@@ -2861,6 +2948,7 @@ class SqlBaseParser extends Parser {
         enterOuterAlt(_localctx, 1);
         {
         setState(436);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==FROZEN) {
           {
@@ -2877,6 +2965,7 @@ class SqlBaseParser extends Parser {
         case 1:
           {
           setState(440);
+          _errHandler.sync(this);
           _la = _input.LA(1);
           if (_la==AS) {
             {
@@ -2908,6 +2997,7 @@ class SqlBaseParser extends Parser {
         case 1:
           {
           setState(449);
+          _errHandler.sync(this);
           _la = _input.LA(1);
           if (_la==AS) {
             {
@@ -2939,6 +3029,7 @@ class SqlBaseParser extends Parser {
         case 1:
           {
           setState(458);
+          _errHandler.sync(this);
           _la = _input.LA(1);
           if (_la==AS) {
             {
@@ -3142,10 +3233,12 @@ class SqlBaseParser extends Parser {
       setState(484);
       valueExpression(0);
       setState(489);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ANALYZE) | (1L << ANALYZED) | (1L << AS) | (1L << CATALOGS) | (1L << COLUMNS) | (1L << CURRENT_DATE) | (1L << CURRENT_TIME) | (1L << CURRENT_TIMESTAMP) | (1L << DAY) | (1L << DEBUG) | (1L << EXECUTABLE) | (1L << EXPLAIN) | (1L << FIRST) | (1L << FORMAT) | (1L << FULL) | (1L << FUNCTIONS) | (1L << GRAPHVIZ) | (1L << HOUR) | (1L << INTERVAL) | (1L << LAST) | (1L << LIMIT) | (1L << MAPPED) | (1L << MINUTE) | (1L << MONTH))) != 0) || ((((_la - 70)) & ~0x3f) == 0 && ((1L << (_la - 70)) & ((1L << (OPTIMIZED - 70)) | (1L << (PARSED - 70)) | (1L << (PHYSICAL - 70)) | (1L << (PIVOT - 70)) | (1L << (PLAN - 70)) | (1L << (RLIKE - 70)) | (1L << (QUERY - 70)) | (1L << (SCHEMAS - 70)) | (1L << (SECOND - 70)) | (1L << (SHOW - 70)) | (1L << (SYS - 70)) | (1L << (TABLES - 70)) | (1L << (TEXT - 70)) | (1L << (TOP - 70)) | (1L << (TYPE - 70)) | (1L << (TYPES - 70)) | (1L << (VERIFY - 70)) | (1L << (YEAR - 70)) | (1L << (IDENTIFIER - 70)) | (1L << (DIGIT_IDENTIFIER - 70)) | (1L << (QUOTED_IDENTIFIER - 70)))) != 0) || _la==BACKQUOTED_IDENTIFIER) {
         {
         setState(486);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==AS) {
           {
@@ -3744,6 +3837,7 @@ class SqlBaseParser extends Parser {
         enterOuterAlt(_localctx, 1);
         {
         setState(549);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==NOT) {
           {
@@ -3766,6 +3860,7 @@ class SqlBaseParser extends Parser {
         enterOuterAlt(_localctx, 2);
         {
         setState(557);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==NOT) {
           {
@@ -3804,6 +3899,7 @@ class SqlBaseParser extends Parser {
         enterOuterAlt(_localctx, 3);
         {
         setState(572);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==NOT) {
           {
@@ -3826,6 +3922,7 @@ class SqlBaseParser extends Parser {
         enterOuterAlt(_localctx, 4);
         {
         setState(580);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==NOT) {
           {
@@ -3844,6 +3941,7 @@ class SqlBaseParser extends Parser {
         enterOuterAlt(_localctx, 5);
         {
         setState(585);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==NOT) {
           {
@@ -3864,6 +3962,7 @@ class SqlBaseParser extends Parser {
         setState(589);
         match(IS);
         setState(591);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==NOT) {
           {
@@ -4026,6 +4125,7 @@ class SqlBaseParser extends Parser {
     enterRule(_localctx, 66, RULE_patternEscape);
     try {
       setState(609);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case ESCAPE:
         enterOuterAlt(_localctx, 1);
@@ -4189,6 +4289,7 @@ class SqlBaseParser extends Parser {
       enterOuterAlt(_localctx, 1);
       {
       setState(615);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case T__0:
       case ANALYZE:
@@ -4275,7 +4376,10 @@ class SqlBaseParser extends Parser {
         _la = _input.LA(1);
         if ( !(_la==PLUS || _la==MINUS) ) {
           ((ArithmeticUnaryContext)_localctx).operator = (Token)_errHandler.recoverInline(this);
-        } else {
+        }
+        else {
+          if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+          _errHandler.reportMatch(this);
           consume();
         }
         setState(614);
@@ -4309,7 +4413,10 @@ class SqlBaseParser extends Parser {
             _la = _input.LA(1);
             if ( !(((((_la - 121)) & ~0x3f) == 0 && ((1L << (_la - 121)) & ((1L << (ASTERISK - 121)) | (1L << (SLASH - 121)) | (1L << (PERCENT - 121)))) != 0)) ) {
               ((ArithmeticBinaryContext)_localctx).operator = (Token)_errHandler.recoverInline(this);
-            } else {
+            }
+            else {
+              if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+              _errHandler.reportMatch(this);
               consume();
             }
             setState(619);
@@ -4328,7 +4435,10 @@ class SqlBaseParser extends Parser {
             _la = _input.LA(1);
             if ( !(_la==PLUS || _la==MINUS) ) {
               ((ArithmeticBinaryContext)_localctx).operator = (Token)_errHandler.recoverInline(this);
-            } else {
+            }
+            else {
+              if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+              _errHandler.reportMatch(this);
               consume();
             }
             setState(622);
@@ -4671,6 +4781,7 @@ class SqlBaseParser extends Parser {
         _ctx = _localctx;
         _prevctx = _localctx;
         setState(640);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ANALYZE) | (1L << ANALYZED) | (1L << CATALOGS) | (1L << COLUMNS) | (1L << CURRENT_DATE) | (1L << CURRENT_TIME) | (1L << CURRENT_TIMESTAMP) | (1L << DAY) | (1L << DEBUG) | (1L << EXECUTABLE) | (1L << EXPLAIN) | (1L << FIRST) | (1L << FORMAT) | (1L << FULL) | (1L << FUNCTIONS) | (1L << GRAPHVIZ) | (1L << HOUR) | (1L << INTERVAL) | (1L << LAST) | (1L << LIMIT) | (1L << MAPPED) | (1L << MINUTE) | (1L << MONTH))) != 0) || ((((_la - 70)) & ~0x3f) == 0 && ((1L << (_la - 70)) & ((1L << (OPTIMIZED - 70)) | (1L << (PARSED - 70)) | (1L << (PHYSICAL - 70)) | (1L << (PIVOT - 70)) | (1L << (PLAN - 70)) | (1L << (RLIKE - 70)) | (1L << (QUERY - 70)) | (1L << (SCHEMAS - 70)) | (1L << (SECOND - 70)) | (1L << (SHOW - 70)) | (1L << (SYS - 70)) | (1L << (TABLES - 70)) | (1L << (TEXT - 70)) | (1L << (TOP - 70)) | (1L << (TYPE - 70)) | (1L << (TYPES - 70)) | (1L << (VERIFY - 70)) | (1L << (YEAR - 70)) | (1L << (IDENTIFIER - 70)) | (1L << (DIGIT_IDENTIFIER - 70)) | (1L << (QUOTED_IDENTIFIER - 70)))) != 0) || _la==BACKQUOTED_IDENTIFIER) {
           {
@@ -4737,6 +4848,7 @@ class SqlBaseParser extends Parser {
         setState(653);
         match(CASE);
         setState(655);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << ANALYZE) | (1L << ANALYZED) | (1L << CASE) | (1L << CAST) | (1L << CATALOGS) | (1L << COLUMNS) | (1L << CONVERT) | (1L << CURRENT_DATE) | (1L << CURRENT_TIME) | (1L << CURRENT_TIMESTAMP) | (1L << DAY) | (1L << DEBUG) | (1L << EXECUTABLE) | (1L << EXISTS) | (1L << EXPLAIN) | (1L << EXTRACT) | (1L << FALSE) | (1L << FIRST) | (1L << FORMAT) | (1L << FULL) | (1L << FUNCTIONS) | (1L << GRAPHVIZ) | (1L << HOUR) | (1L << INTERVAL) | (1L << LAST) | (1L << LEFT) | (1L << LIMIT) | (1L << MAPPED) | (1L << MATCH) | (1L << MINUTE) | (1L << MONTH))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (NOT - 66)) | (1L << (NULL - 66)) | (1L << (OPTIMIZED - 66)) | (1L << (PARSED - 66)) | (1L << (PHYSICAL - 66)) | (1L << (PIVOT - 66)) | (1L << (PLAN - 66)) | (1L << (RIGHT - 66)) | (1L << (RLIKE - 66)) | (1L << (QUERY - 66)) | (1L << (SCHEMAS - 66)) | (1L << (SECOND - 66)) | (1L << (SHOW - 66)) | (1L << (SYS - 66)) | (1L << (TABLES - 66)) | (1L << (TEXT - 66)) | (1L << (TRUE - 66)) | (1L << (TOP - 66)) | (1L << (TYPE - 66)) | (1L << (TYPES - 66)) | (1L << (VERIFY - 66)) | (1L << (YEAR - 66)) | (1L << (FUNCTION_ESC - 66)) | (1L << (DATE_ESC - 66)) | (1L << (TIME_ESC - 66)) | (1L << (TIMESTAMP_ESC - 66)) | (1L << (GUID_ESC - 66)) | (1L << (PLUS - 66)) | (1L << (MINUS - 66)) | (1L << (ASTERISK - 66)) | (1L << (PARAM - 66)) | (1L << (STRING - 66)) | (1L << (INTEGER_VALUE - 66)) | (1L << (DECIMAL_VALUE - 66)))) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & ((1L << (IDENTIFIER - 130)) | (1L << (DIGIT_IDENTIFIER - 130)) | (1L << (QUOTED_IDENTIFIER - 130)) | (1L << (BACKQUOTED_IDENTIFIER - 130)))) != 0)) {
           {
@@ -4760,6 +4872,7 @@ class SqlBaseParser extends Parser {
           _la = _input.LA(1);
         } while ( _la==WHEN );
         setState(664);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==ELSE) {
           {
@@ -4842,6 +4955,7 @@ class SqlBaseParser extends Parser {
     enterRule(_localctx, 72, RULE_builtinDateTimeFunction);
     try {
       setState(681);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case CURRENT_TIMESTAMP:
         enterOuterAlt(_localctx, 1);
@@ -5110,6 +5224,7 @@ class SqlBaseParser extends Parser {
     enterRule(_localctx, 80, RULE_extractExpression);
     try {
       setState(714);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case EXTRACT:
         enterOuterAlt(_localctx, 1);
@@ -5234,6 +5349,7 @@ class SqlBaseParser extends Parser {
     enterRule(_localctx, 84, RULE_functionExpression);
     try {
       setState(728);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case ANALYZE:
       case ANALYZED:
@@ -5358,10 +5474,12 @@ class SqlBaseParser extends Parser {
       setState(731);
       match(T__0);
       setState(743);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << ALL) | (1L << ANALYZE) | (1L << ANALYZED) | (1L << CASE) | (1L << CAST) | (1L << CATALOGS) | (1L << COLUMNS) | (1L << CONVERT) | (1L << CURRENT_DATE) | (1L << CURRENT_TIME) | (1L << CURRENT_TIMESTAMP) | (1L << DAY) | (1L << DEBUG) | (1L << DISTINCT) | (1L << EXECUTABLE) | (1L << EXISTS) | (1L << EXPLAIN) | (1L << EXTRACT) | (1L << FALSE) | (1L << FIRST) | (1L << FORMAT) | (1L << FULL) | (1L << FUNCTIONS) | (1L << GRAPHVIZ) | (1L << HOUR) | (1L << INTERVAL) | (1L << LAST) | (1L << LEFT) | (1L << LIMIT) | (1L << MAPPED) | (1L << MATCH) | (1L << MINUTE) | (1L << MONTH))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (NOT - 66)) | (1L << (NULL - 66)) | (1L << (OPTIMIZED - 66)) | (1L << (PARSED - 66)) | (1L << (PHYSICAL - 66)) | (1L << (PIVOT - 66)) | (1L << (PLAN - 66)) | (1L << (RIGHT - 66)) | (1L << (RLIKE - 66)) | (1L << (QUERY - 66)) | (1L << (SCHEMAS - 66)) | (1L << (SECOND - 66)) | (1L << (SHOW - 66)) | (1L << (SYS - 66)) | (1L << (TABLES - 66)) | (1L << (TEXT - 66)) | (1L << (TRUE - 66)) | (1L << (TOP - 66)) | (1L << (TYPE - 66)) | (1L << (TYPES - 66)) | (1L << (VERIFY - 66)) | (1L << (YEAR - 66)) | (1L << (FUNCTION_ESC - 66)) | (1L << (DATE_ESC - 66)) | (1L << (TIME_ESC - 66)) | (1L << (TIMESTAMP_ESC - 66)) | (1L << (GUID_ESC - 66)) | (1L << (PLUS - 66)) | (1L << (MINUS - 66)) | (1L << (ASTERISK - 66)) | (1L << (PARAM - 66)) | (1L << (STRING - 66)) | (1L << (INTEGER_VALUE - 66)) | (1L << (DECIMAL_VALUE - 66)))) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & ((1L << (IDENTIFIER - 130)) | (1L << (DIGIT_IDENTIFIER - 130)) | (1L << (QUOTED_IDENTIFIER - 130)) | (1L << (BACKQUOTED_IDENTIFIER - 130)))) != 0)) {
         {
         setState(733);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if (_la==ALL || _la==DISTINCT) {
           {
@@ -5436,6 +5554,7 @@ class SqlBaseParser extends Parser {
     enterRule(_localctx, 88, RULE_functionName);
     try {
       setState(750);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case LEFT:
         enterOuterAlt(_localctx, 1);
@@ -5730,6 +5849,7 @@ class SqlBaseParser extends Parser {
     try {
       int _alt;
       setState(778);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case NULL:
         _localctx = new NullLiteralContext(_localctx);
@@ -5900,7 +6020,10 @@ class SqlBaseParser extends Parser {
       _la = _input.LA(1);
       if ( !(((((_la - 112)) & ~0x3f) == 0 && ((1L << (_la - 112)) & ((1L << (EQ - 112)) | (1L << (NULLEQ - 112)) | (1L << (NEQ - 112)) | (1L << (LT - 112)) | (1L << (LTE - 112)) | (1L << (GT - 112)) | (1L << (GTE - 112)))) != 0)) ) {
       _errHandler.recoverInline(this);
-      } else {
+      }
+      else {
+        if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+        _errHandler.reportMatch(this);
         consume();
       }
       }
@@ -5949,7 +6072,10 @@ class SqlBaseParser extends Parser {
       _la = _input.LA(1);
       if ( !(_la==FALSE || _la==TRUE) ) {
       _errHandler.recoverInline(this);
-      } else {
+      }
+      else {
+        if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+        _errHandler.reportMatch(this);
         consume();
       }
       }
@@ -6016,6 +6142,7 @@ class SqlBaseParser extends Parser {
       setState(784);
       match(INTERVAL);
       setState(786);
+      _errHandler.sync(this);
       _la = _input.LA(1);
       if (_la==PLUS || _la==MINUS) {
         {
@@ -6024,13 +6151,17 @@ class SqlBaseParser extends Parser {
         _la = _input.LA(1);
         if ( !(_la==PLUS || _la==MINUS) ) {
           ((IntervalContext)_localctx).sign = (Token)_errHandler.recoverInline(this);
-        } else {
+        }
+        else {
+          if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+          _errHandler.reportMatch(this);
           consume();
         }
         }
       }
 
       setState(790);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case INTEGER_VALUE:
       case DECIMAL_VALUE:
@@ -6119,7 +6250,10 @@ class SqlBaseParser extends Parser {
       _la = _input.LA(1);
       if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << DAY) | (1L << DAYS) | (1L << HOUR) | (1L << HOURS) | (1L << MINUTE) | (1L << MINUTES) | (1L << MONTH))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (MONTHS - 64)) | (1L << (SECOND - 64)) | (1L << (SECONDS - 64)) | (1L << (YEAR - 64)) | (1L << (YEARS - 64)))) != 0)) ) {
       _errHandler.recoverInline(this);
-      } else {
+      }
+      else {
+        if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+        _errHandler.reportMatch(this);
         consume();
       }
       }
@@ -6289,6 +6423,7 @@ class SqlBaseParser extends Parser {
     enterRule(_localctx, 104, RULE_identifier);
     try {
       setState(813);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case QUOTED_IDENTIFIER:
       case BACKQUOTED_IDENTIFIER:
@@ -6403,6 +6538,7 @@ class SqlBaseParser extends Parser {
         enterOuterAlt(_localctx, 1);
         {
         setState(818);
+        _errHandler.sync(this);
         _la = _input.LA(1);
         if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ANALYZE) | (1L << ANALYZED) | (1L << CATALOGS) | (1L << COLUMNS) | (1L << CURRENT_DATE) | (1L << CURRENT_TIME) | (1L << CURRENT_TIMESTAMP) | (1L << DAY) | (1L << DEBUG) | (1L << EXECUTABLE) | (1L << EXPLAIN) | (1L << FIRST) | (1L << FORMAT) | (1L << FULL) | (1L << FUNCTIONS) | (1L << GRAPHVIZ) | (1L << HOUR) | (1L << INTERVAL) | (1L << LAST) | (1L << LIMIT) | (1L << MAPPED) | (1L << MINUTE) | (1L << MONTH))) != 0) || ((((_la - 70)) & ~0x3f) == 0 && ((1L << (_la - 70)) & ((1L << (OPTIMIZED - 70)) | (1L << (PARSED - 70)) | (1L << (PHYSICAL - 70)) | (1L << (PIVOT - 70)) | (1L << (PLAN - 70)) | (1L << (RLIKE - 70)) | (1L << (QUERY - 70)) | (1L << (SCHEMAS - 70)) | (1L << (SECOND - 70)) | (1L << (SHOW - 70)) | (1L << (SYS - 70)) | (1L << (TABLES - 70)) | (1L << (TEXT - 70)) | (1L << (TOP - 70)) | (1L << (TYPE - 70)) | (1L << (TYPES - 70)) | (1L << (VERIFY - 70)) | (1L << (YEAR - 70)) | (1L << (IDENTIFIER - 70)) | (1L << (DIGIT_IDENTIFIER - 70)) | (1L << (QUOTED_IDENTIFIER - 70)))) != 0) || _la==BACKQUOTED_IDENTIFIER) {
           {
@@ -6500,6 +6636,7 @@ class SqlBaseParser extends Parser {
     enterRule(_localctx, 108, RULE_quoteIdentifier);
     try {
       setState(831);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case QUOTED_IDENTIFIER:
         _localctx = new QuotedIdentifierContext(_localctx);
@@ -6586,6 +6723,7 @@ class SqlBaseParser extends Parser {
     enterRule(_localctx, 110, RULE_unquoteIdentifier);
     try {
       setState(836);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case IDENTIFIER:
         _localctx = new UnquotedIdentifierContext(_localctx);
@@ -6717,6 +6855,7 @@ class SqlBaseParser extends Parser {
     enterRule(_localctx, 112, RULE_number);
     try {
       setState(840);
+      _errHandler.sync(this);
       switch (_input.LA(1)) {
       case DECIMAL_VALUE:
         _localctx = new DecimalLiteralContext(_localctx);
@@ -6782,7 +6921,10 @@ class SqlBaseParser extends Parser {
       _la = _input.LA(1);
       if ( !(_la==PARAM || _la==STRING) ) {
       _errHandler.recoverInline(this);
-      } else {
+      }
+      else {
+        if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+        _errHandler.reportMatch(this);
         consume();
       }
       }
@@ -6927,7 +7069,10 @@ class SqlBaseParser extends Parser {
       _la = _input.LA(1);
       if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ANALYZE) | (1L << ANALYZED) | (1L << CATALOGS) | (1L << COLUMNS) | (1L << CURRENT_DATE) | (1L << CURRENT_TIME) | (1L << CURRENT_TIMESTAMP) | (1L << DAY) | (1L << DEBUG) | (1L << EXECUTABLE) | (1L << EXPLAIN) | (1L << FIRST) | (1L << FORMAT) | (1L << FULL) | (1L << FUNCTIONS) | (1L << GRAPHVIZ) | (1L << HOUR) | (1L << INTERVAL) | (1L << LAST) | (1L << LIMIT) | (1L << MAPPED) | (1L << MINUTE) | (1L << MONTH))) != 0) || ((((_la - 70)) & ~0x3f) == 0 && ((1L << (_la - 70)) & ((1L << (OPTIMIZED - 70)) | (1L << (PARSED - 70)) | (1L << (PHYSICAL - 70)) | (1L << (PIVOT - 70)) | (1L << (PLAN - 70)) | (1L << (RLIKE - 70)) | (1L << (QUERY - 70)) | (1L << (SCHEMAS - 70)) | (1L << (SECOND - 70)) | (1L << (SHOW - 70)) | (1L << (SYS - 70)) | (1L << (TABLES - 70)) | (1L << (TEXT - 70)) | (1L << (TOP - 70)) | (1L << (TYPE - 70)) | (1L << (TYPES - 70)) | (1L << (VERIFY - 70)) | (1L << (YEAR - 70)))) != 0)) ) {
       _errHandler.recoverInline(this);
-      } else {
+      }
+      else {
+        if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+        _errHandler.reportMatch(this);
         consume();
       }
       }
@@ -6983,7 +7128,7 @@ class SqlBaseParser extends Parser {
   }
 
   public static final String _serializedATN =
-    "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\u008d\u0356\4\2\t"+
+    "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\u008d\u0356\4\2\t"+
     "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\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\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
     "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+
@@ -7050,11 +7195,11 @@ class SqlBaseParser extends Parser {
     "\2**\63\63\3\2\34\35\3\2yz\4\2\7\7\u0082\u0082\4\2\r\r\34\34\4\2\'\'9"+
     "9\4\2\7\7\36\36\3\2{}\3\2rx\4\2&&]]\7\2\31\32\61\62?BTUgh\3\2\u0080\u0081"+
     "\31\2\b\t\23\24\26\31\33\33\"\"$$\'\')),.\61\61\66\6699<=??AAHHLOQTWX"+
-    "Z[_accgg\u03b9\2z\3\2\2\2\4}\3\2\2\2\6\u00f1\3\2\2\2\b\u00fc\3\2\2\2\n"+
-    "\u0100\3\2\2\2\f\u0115\3\2\2\2\16\u011c\3\2\2\2\20\u011e\3\2\2\2\22\u0126"+
-    "\3\2\2\2\24\u013e\3\2\2\2\26\u014b\3\2\2\2\30\u0155\3\2\2\2\32\u0164\3"+
-    "\2\2\2\34\u0166\3\2\2\2\36\u016c\3\2\2\2 \u016f\3\2\2\2\"\u0171\3\2\2"+
-    "\2$\u0179\3\2\2\2&\u0180\3\2\2\2(\u0192\3\2\2\2*\u01a3\3\2\2\2,\u01b3"+
+    "Z[_accgg\2\u03b9\2z\3\2\2\2\4}\3\2\2\2\6\u00f1\3\2\2\2\b\u00fc\3\2\2\2"+
+    "\n\u0100\3\2\2\2\f\u0115\3\2\2\2\16\u011c\3\2\2\2\20\u011e\3\2\2\2\22"+
+    "\u0126\3\2\2\2\24\u013e\3\2\2\2\26\u014b\3\2\2\2\30\u0155\3\2\2\2\32\u0164"+
+    "\3\2\2\2\34\u0166\3\2\2\2\36\u016c\3\2\2\2 \u016f\3\2\2\2\"\u0171\3\2"+
+    "\2\2$\u0179\3\2\2\2&\u0180\3\2\2\2(\u0192\3\2\2\2*\u01a3\3\2\2\2,\u01b3"+
     "\3\2\2\2.\u01d1\3\2\2\2\60\u01d3\3\2\2\2\62\u01de\3\2\2\2\64\u01e6\3\2"+
     "\2\2\66\u01ed\3\2\2\28\u020e\3\2\2\2:\u021f\3\2\2\2<\u0222\3\2\2\2>\u0254"+
     "\3\2\2\2@\u0256\3\2\2\2B\u0259\3\2\2\2D\u0263\3\2\2\2F\u0269\3\2\2\2H"+