| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| # Generated from Agtype.g4 by ANTLR 4.9.2 |
| from antlr4 import * |
| from io import StringIO |
| import sys |
| if sys.version_info[1] > 5: |
| from typing import TextIO |
| else: |
| from typing.io import TextIO |
| |
| |
| |
| def serializedATN(): |
| with StringIO() as buf: |
| buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\25") |
| buf.write("\u00b9\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7") |
| buf.write("\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") |
| buf.write("\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23") |
| buf.write("\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30") |
| buf.write("\4\31\t\31\4\32\t\32\4\33\t\33\3\2\3\2\3\2\3\2\3\2\3\3") |
| buf.write("\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\6\3") |
| buf.write("\6\3\7\3\7\3\b\3\b\3\t\3\t\3\n\3\n\3\13\3\13\3\13\3\f") |
| buf.write("\3\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\16\3\16\3\16") |
| buf.write("\3\16\3\17\3\17\7\17h\n\17\f\17\16\17k\13\17\3\20\3\20") |
| buf.write("\3\20\7\20p\n\20\f\20\16\20s\13\20\3\20\3\20\3\21\3\21") |
| buf.write("\3\21\5\21z\n\21\3\22\3\22\3\22\3\22\3\22\3\22\3\23\3") |
| buf.write("\23\3\24\3\24\3\25\5\25\u0087\n\25\3\25\3\25\3\26\3\26") |
| buf.write("\3\26\7\26\u008e\n\26\f\26\16\26\u0091\13\26\5\26\u0093") |
| buf.write("\n\26\3\27\5\27\u0096\n\27\3\27\3\27\3\27\3\30\5\30\u009c") |
| buf.write("\n\30\3\30\3\30\5\30\u00a0\n\30\3\30\3\30\3\31\3\31\6") |
| buf.write("\31\u00a6\n\31\r\31\16\31\u00a7\3\32\3\32\5\32\u00ac\n") |
| buf.write("\32\3\32\6\32\u00af\n\32\r\32\16\32\u00b0\3\33\6\33\u00b4") |
| buf.write("\n\33\r\33\16\33\u00b5\3\33\3\33\2\2\34\3\3\5\4\7\5\t") |
| buf.write("\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20") |
| buf.write("\37\21!\2#\2%\2\'\2)\22+\2-\23/\24\61\2\63\2\65\25\3\2") |
| buf.write("\f\5\2C\\aac|\7\2&&\62;C\\aac|\n\2$$\61\61^^ddhhppttv") |
| buf.write("v\5\2\62;CHch\5\2\2!$$^^\3\2\63;\3\2\62;\4\2GGgg\4\2-") |
| buf.write("-//\5\2\13\f\17\17\"\"\2\u00bf\2\3\3\2\2\2\2\5\3\2\2\2") |
| buf.write("\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") |
| buf.write("\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") |
| buf.write("\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") |
| buf.write("\2\2\2)\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\65\3\2\2\2\3\67") |
| buf.write("\3\2\2\2\5<\3\2\2\2\7B\3\2\2\2\tG\3\2\2\2\13I\3\2\2\2") |
| buf.write("\rK\3\2\2\2\17M\3\2\2\2\21O\3\2\2\2\23Q\3\2\2\2\25S\3") |
| buf.write("\2\2\2\27V\3\2\2\2\31X\3\2\2\2\33a\3\2\2\2\35e\3\2\2\2") |
| buf.write("\37l\3\2\2\2!v\3\2\2\2#{\3\2\2\2%\u0081\3\2\2\2\'\u0083") |
| buf.write("\3\2\2\2)\u0086\3\2\2\2+\u0092\3\2\2\2-\u0095\3\2\2\2") |
| buf.write("/\u009b\3\2\2\2\61\u00a3\3\2\2\2\63\u00a9\3\2\2\2\65\u00b3") |
| buf.write("\3\2\2\2\678\7v\2\289\7t\2\29:\7w\2\2:;\7g\2\2;\4\3\2") |
| buf.write("\2\2<=\7h\2\2=>\7c\2\2>?\7n\2\2?@\7u\2\2@A\7g\2\2A\6\3") |
| buf.write("\2\2\2BC\7p\2\2CD\7w\2\2DE\7n\2\2EF\7n\2\2F\b\3\2\2\2") |
| buf.write("GH\7}\2\2H\n\3\2\2\2IJ\7.\2\2J\f\3\2\2\2KL\7\177\2\2L") |
| buf.write("\16\3\2\2\2MN\7<\2\2N\20\3\2\2\2OP\7]\2\2P\22\3\2\2\2") |
| buf.write("QR\7_\2\2R\24\3\2\2\2ST\7<\2\2TU\7<\2\2U\26\3\2\2\2VW") |
| buf.write("\7/\2\2W\30\3\2\2\2XY\7K\2\2YZ\7p\2\2Z[\7h\2\2[\\\7k\2") |
| buf.write("\2\\]\7p\2\2]^\7k\2\2^_\7v\2\2_`\7{\2\2`\32\3\2\2\2ab") |
| buf.write("\7P\2\2bc\7c\2\2cd\7P\2\2d\34\3\2\2\2ei\t\2\2\2fh\t\3") |
| buf.write("\2\2gf\3\2\2\2hk\3\2\2\2ig\3\2\2\2ij\3\2\2\2j\36\3\2\2") |
| buf.write("\2ki\3\2\2\2lq\7$\2\2mp\5!\21\2np\5\'\24\2om\3\2\2\2o") |
| buf.write("n\3\2\2\2ps\3\2\2\2qo\3\2\2\2qr\3\2\2\2rt\3\2\2\2sq\3") |
| buf.write("\2\2\2tu\7$\2\2u \3\2\2\2vy\7^\2\2wz\t\4\2\2xz\5#\22\2") |
| buf.write("yw\3\2\2\2yx\3\2\2\2z\"\3\2\2\2{|\7w\2\2|}\5%\23\2}~\5") |
| buf.write("%\23\2~\177\5%\23\2\177\u0080\5%\23\2\u0080$\3\2\2\2\u0081") |
| buf.write("\u0082\t\5\2\2\u0082&\3\2\2\2\u0083\u0084\n\6\2\2\u0084") |
| buf.write("(\3\2\2\2\u0085\u0087\7/\2\2\u0086\u0085\3\2\2\2\u0086") |
| buf.write("\u0087\3\2\2\2\u0087\u0088\3\2\2\2\u0088\u0089\5+\26\2") |
| buf.write("\u0089*\3\2\2\2\u008a\u0093\7\62\2\2\u008b\u008f\t\7\2") |
| buf.write("\2\u008c\u008e\t\b\2\2\u008d\u008c\3\2\2\2\u008e\u0091") |
| buf.write("\3\2\2\2\u008f\u008d\3\2\2\2\u008f\u0090\3\2\2\2\u0090") |
| buf.write("\u0093\3\2\2\2\u0091\u008f\3\2\2\2\u0092\u008a\3\2\2\2") |
| buf.write("\u0092\u008b\3\2\2\2\u0093,\3\2\2\2\u0094\u0096\7/\2\2") |
| buf.write("\u0095\u0094\3\2\2\2\u0095\u0096\3\2\2\2\u0096\u0097\3") |
| buf.write("\2\2\2\u0097\u0098\5+\26\2\u0098\u0099\5\61\31\2\u0099") |
| buf.write(".\3\2\2\2\u009a\u009c\7/\2\2\u009b\u009a\3\2\2\2\u009b") |
| buf.write("\u009c\3\2\2\2\u009c\u009d\3\2\2\2\u009d\u009f\5+\26\2") |
| buf.write("\u009e\u00a0\5\61\31\2\u009f\u009e\3\2\2\2\u009f\u00a0") |
| buf.write("\3\2\2\2\u00a0\u00a1\3\2\2\2\u00a1\u00a2\5\63\32\2\u00a2") |
| buf.write("\60\3\2\2\2\u00a3\u00a5\7\60\2\2\u00a4\u00a6\t\b\2\2\u00a5") |
| buf.write("\u00a4\3\2\2\2\u00a6\u00a7\3\2\2\2\u00a7\u00a5\3\2\2\2") |
| buf.write("\u00a7\u00a8\3\2\2\2\u00a8\62\3\2\2\2\u00a9\u00ab\t\t") |
| buf.write("\2\2\u00aa\u00ac\t\n\2\2\u00ab\u00aa\3\2\2\2\u00ab\u00ac") |
| buf.write("\3\2\2\2\u00ac\u00ae\3\2\2\2\u00ad\u00af\t\b\2\2\u00ae") |
| buf.write("\u00ad\3\2\2\2\u00af\u00b0\3\2\2\2\u00b0\u00ae\3\2\2\2") |
| buf.write("\u00b0\u00b1\3\2\2\2\u00b1\64\3\2\2\2\u00b2\u00b4\t\13") |
| buf.write("\2\2\u00b3\u00b2\3\2\2\2\u00b4\u00b5\3\2\2\2\u00b5\u00b3") |
| buf.write("\3\2\2\2\u00b5\u00b6\3\2\2\2\u00b6\u00b7\3\2\2\2\u00b7") |
| buf.write("\u00b8\b\33\2\2\u00b8\66\3\2\2\2\21\2ioqy\u0086\u008f") |
| buf.write("\u0092\u0095\u009b\u009f\u00a7\u00ab\u00b0\u00b5\3\b\2") |
| buf.write("\2") |
| return buf.getvalue() |
| |
| |
| class AgtypeLexer(Lexer): |
| |
| atn = ATNDeserializer().deserialize(serializedATN()) |
| |
| decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ] |
| |
| T__0 = 1 |
| T__1 = 2 |
| T__2 = 3 |
| T__3 = 4 |
| T__4 = 5 |
| T__5 = 6 |
| T__6 = 7 |
| T__7 = 8 |
| T__8 = 9 |
| T__9 = 10 |
| T__10 = 11 |
| T__11 = 12 |
| T__12 = 13 |
| IDENT = 14 |
| STRING = 15 |
| INTEGER = 16 |
| RegularFloat = 17 |
| ExponentFloat = 18 |
| WS = 19 |
| |
| channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ] |
| |
| modeNames = [ "DEFAULT_MODE" ] |
| |
| literalNames = [ "<INVALID>", |
| "'true'", "'false'", "'null'", "'{'", "','", "'}'", "':'", "'['", |
| "']'", "'::'", "'-'", "'Infinity'", "'NaN'" ] |
| |
| symbolicNames = [ "<INVALID>", |
| "IDENT", "STRING", "INTEGER", "RegularFloat", "ExponentFloat", |
| "WS" ] |
| |
| ruleNames = [ "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", |
| "T__7", "T__8", "T__9", "T__10", "T__11", "T__12", "IDENT", |
| "STRING", "ESC", "UNICODE", "HEX", "SAFECODEPOINT", "INTEGER", |
| "INT", "RegularFloat", "ExponentFloat", "DECIMAL", "SCIENTIFIC", |
| "WS" ] |
| |
| grammarFileName = "Agtype.g4" |
| |
| def __init__(self, input=None, output:TextIO = sys.stdout): |
| super().__init__(input, output) |
| self.checkVersion("4.9.2") |
| self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache()) |
| self._actions = None |
| self._predicates = None |
| |
| |