diff --git a/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/AutoscaleConditionLexer.py b/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/AutoscaleConditionLexer.py index 916d9ef4305..62e7a4a0f0c 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/AutoscaleConditionLexer.py +++ b/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/AutoscaleConditionLexer.py @@ -2,115 +2,117 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -# Generated from AutoscaleCondition.g4 by ANTLR 4.7.2 +# Generated from AutoscaleCondition.g4 by ANTLR 4.9.3 # encoding: utf-8 # pylint: disable=all 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(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2") - buf.write(u"\34\u00eb\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6") - buf.write(u"\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") - buf.write(u"\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t") - buf.write(u"\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27") - buf.write(u"\4\30\t\30\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4") - buf.write(u"\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t") - buf.write(u"#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4") - buf.write(u",\t,\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5\3\6\3\6\3\7\3\7") - buf.write(u"\3\b\3\b\3\t\3\t\3\n\3\n\3\13\3\13\3\f\3\f\3\r\3\r\3") - buf.write(u"\16\3\16\3\16\3\17\3\17\3\17\3\20\3\20\3\21\3\21\3\22") - buf.write(u"\3\22\3\23\3\23\3\24\3\24\3\25\3\25\3\26\3\26\3\27\3") - buf.write(u"\27\3\30\3\30\3\31\3\31\3\32\3\32\3\33\3\33\3\34\3\34") - buf.write(u"\3\35\3\35\3\36\3\36\3\37\3\37\3 \3 \3!\3!\3\"\3\"\3") - buf.write(u"\"\3\"\3\"\3\"\3#\3#\3#\3#\3$\3$\3$\3$\3$\3$\3$\3$\3") - buf.write(u"$\3%\3%\3%\3%\3%\3%\3%\3%\3%\3&\3&\3&\3\'\3\'\3\'\3\'") - buf.write(u"\3\'\3\'\3\'\3\'\3\'\3\'\5\'\u00c5\n\'\3(\6(\u00c8\n") - buf.write(u"(\r(\16(\u00c9\3(\3(\6(\u00ce\n(\r(\16(\u00cf\5(\u00d2") - buf.write(u"\n(\3)\3)\3*\6*\u00d7\n*\r*\16*\u00d8\3+\5+\u00dc\n+") - buf.write(u"\3+\3+\6+\u00e0\n+\r+\16+\u00e1\3,\3,\3,\3,\6,\u00e8") - buf.write(u"\n,\r,\16,\u00e9\2\2-\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21") - buf.write(u"\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\2#\2%\2\'") - buf.write(u"\2)\2+\2-\2/\2\61\2\63\2\65\2\67\29\2;\2=\2?\2A\2C\22") - buf.write(u"E\23G\24I\25K\26M\27O\30Q\31S\32U\33W\34\3\2\26\4\2C") - buf.write(u"Ccc\4\2EEee\4\2FFff\4\2GGgg\4\2JJjj\4\2KKkk\4\2NNnn\4") - buf.write(u"\2PPpp\4\2QQqq\4\2TTtt\4\2UUuu\4\2WWww\4\2YYyy\4\2ZZ") - buf.write(u"zz\3\2\62;\3\2c|\3\2C\\\4\2..\60\60\4\2$$))\4\2\13\13") - buf.write(u"\"\"\2\u00e9\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t") - buf.write(u"\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") - buf.write(u"\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3") - buf.write(u"\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2C\3\2") - buf.write(u"\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3") - buf.write(u"\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2") - buf.write(u"W\3\2\2\2\3Y\3\2\2\2\5[\3\2\2\2\7]\3\2\2\2\t_\3\2\2\2") - buf.write(u"\13a\3\2\2\2\rc\3\2\2\2\17e\3\2\2\2\21g\3\2\2\2\23i\3") - buf.write(u"\2\2\2\25k\3\2\2\2\27m\3\2\2\2\31o\3\2\2\2\33q\3\2\2") - buf.write(u"\2\35t\3\2\2\2\37w\3\2\2\2!y\3\2\2\2#{\3\2\2\2%}\3\2") - buf.write(u"\2\2\'\177\3\2\2\2)\u0081\3\2\2\2+\u0083\3\2\2\2-\u0085") - buf.write(u"\3\2\2\2/\u0087\3\2\2\2\61\u0089\3\2\2\2\63\u008b\3\2") - buf.write(u"\2\2\65\u008d\3\2\2\2\67\u008f\3\2\2\29\u0091\3\2\2\2") - buf.write(u";\u0093\3\2\2\2=\u0095\3\2\2\2?\u0097\3\2\2\2A\u0099") - buf.write(u"\3\2\2\2C\u009b\3\2\2\2E\u00a1\3\2\2\2G\u00a5\3\2\2\2") - buf.write(u"I\u00ae\3\2\2\2K\u00b7\3\2\2\2M\u00c4\3\2\2\2O\u00c7") - buf.write(u"\3\2\2\2Q\u00d3\3\2\2\2S\u00d6\3\2\2\2U\u00df\3\2\2\2") - buf.write(u"W\u00e7\3\2\2\2YZ\7\61\2\2Z\4\3\2\2\2[\\\7\60\2\2\\\6") - buf.write(u"\3\2\2\2]^\7,\2\2^\b\3\2\2\2_`\7/\2\2`\n\3\2\2\2ab\7") - buf.write(u"a\2\2b\f\3\2\2\2cd\7<\2\2d\16\3\2\2\2ef\7\'\2\2f\20\3") - buf.write(u"\2\2\2gh\7%\2\2h\22\3\2\2\2ij\7B\2\2j\24\3\2\2\2kl\7") - buf.write(u"^\2\2l\26\3\2\2\2mn\7.\2\2n\30\3\2\2\2op\7~\2\2p\32\3") - buf.write(u"\2\2\2qr\7?\2\2rs\7?\2\2s\34\3\2\2\2tu\7#\2\2uv\7?\2") - buf.write(u"\2v\36\3\2\2\2wx\7\u0080\2\2x \3\2\2\2yz\t\2\2\2z\"\3") - buf.write(u"\2\2\2{|\t\3\2\2|$\3\2\2\2}~\t\4\2\2~&\3\2\2\2\177\u0080") - buf.write(u"\t\5\2\2\u0080(\3\2\2\2\u0081\u0082\t\6\2\2\u0082*\3") - buf.write(u"\2\2\2\u0083\u0084\t\7\2\2\u0084,\3\2\2\2\u0085\u0086") - buf.write(u"\t\b\2\2\u0086.\3\2\2\2\u0087\u0088\t\t\2\2\u0088\60") - buf.write(u"\3\2\2\2\u0089\u008a\t\n\2\2\u008a\62\3\2\2\2\u008b\u008c") - buf.write(u"\t\13\2\2\u008c\64\3\2\2\2\u008d\u008e\t\f\2\2\u008e") - buf.write(u"\66\3\2\2\2\u008f\u0090\t\r\2\2\u00908\3\2\2\2\u0091") - buf.write(u"\u0092\t\16\2\2\u0092:\3\2\2\2\u0093\u0094\t\17\2\2\u0094") - buf.write(u"<\3\2\2\2\u0095\u0096\t\20\2\2\u0096>\3\2\2\2\u0097\u0098") - buf.write(u"\t\21\2\2\u0098@\3\2\2\2\u0099\u009a\t\22\2\2\u009aB") - buf.write(u"\3\2\2\2\u009b\u009c\59\35\2\u009c\u009d\5)\25\2\u009d") - buf.write(u"\u009e\5\'\24\2\u009e\u009f\5\63\32\2\u009f\u00a0\5\'") - buf.write(u"\24\2\u00a0D\3\2\2\2\u00a1\u00a2\5!\21\2\u00a2\u00a3") - buf.write(u"\5/\30\2\u00a3\u00a4\5%\23\2\u00a4F\3\2\2\2\u00a5\u00a6") - buf.write(u"\5+\26\2\u00a6\u00a7\5/\30\2\u00a7\u00a8\5#\22\2\u00a8") - buf.write(u"\u00a9\5-\27\2\u00a9\u00aa\5\67\34\2\u00aa\u00ab\5%\23") - buf.write(u"\2\u00ab\u00ac\5\'\24\2\u00ac\u00ad\5\65\33\2\u00adH") - buf.write(u"\3\2\2\2\u00ae\u00af\5\'\24\2\u00af\u00b0\5;\36\2\u00b0") - buf.write(u"\u00b1\5#\22\2\u00b1\u00b2\5-\27\2\u00b2\u00b3\5\67\34") - buf.write(u"\2\u00b3\u00b4\5%\23\2\u00b4\u00b5\5\'\24\2\u00b5\u00b6") - buf.write(u"\5\65\33\2\u00b6J\3\2\2\2\u00b7\u00b8\5\61\31\2\u00b8") - buf.write(u"\u00b9\5\63\32\2\u00b9L\3\2\2\2\u00ba\u00c5\7>\2\2\u00bb") - buf.write(u"\u00bc\7>\2\2\u00bc\u00c5\7?\2\2\u00bd\u00be\7?\2\2\u00be") - buf.write(u"\u00c5\7?\2\2\u00bf\u00c0\7@\2\2\u00c0\u00c5\7?\2\2\u00c1") - buf.write(u"\u00c5\7@\2\2\u00c2\u00c3\7#\2\2\u00c3\u00c5\7?\2\2\u00c4") - buf.write(u"\u00ba\3\2\2\2\u00c4\u00bb\3\2\2\2\u00c4\u00bd\3\2\2") - buf.write(u"\2\u00c4\u00bf\3\2\2\2\u00c4\u00c1\3\2\2\2\u00c4\u00c2") - buf.write(u"\3\2\2\2\u00c5N\3\2\2\2\u00c6\u00c8\5=\37\2\u00c7\u00c6") - buf.write(u"\3\2\2\2\u00c8\u00c9\3\2\2\2\u00c9\u00c7\3\2\2\2\u00c9") - buf.write(u"\u00ca\3\2\2\2\u00ca\u00d1\3\2\2\2\u00cb\u00cd\t\23\2") - buf.write(u"\2\u00cc\u00ce\5=\37\2\u00cd\u00cc\3\2\2\2\u00ce\u00cf") - buf.write(u"\3\2\2\2\u00cf\u00cd\3\2\2\2\u00cf\u00d0\3\2\2\2\u00d0") - buf.write(u"\u00d2\3\2\2\2\u00d1\u00cb\3\2\2\2\u00d1\u00d2\3\2\2") - buf.write(u"\2\u00d2P\3\2\2\2\u00d3\u00d4\t\24\2\2\u00d4R\3\2\2\2") - buf.write(u"\u00d5\u00d7\t\25\2\2\u00d6\u00d5\3\2\2\2\u00d7\u00d8") - buf.write(u"\3\2\2\2\u00d8\u00d6\3\2\2\2\u00d8\u00d9\3\2\2\2\u00d9") - buf.write(u"T\3\2\2\2\u00da\u00dc\7\17\2\2\u00db\u00da\3\2\2\2\u00db") - buf.write(u"\u00dc\3\2\2\2\u00dc\u00dd\3\2\2\2\u00dd\u00e0\7\f\2") - buf.write(u"\2\u00de\u00e0\7\17\2\2\u00df\u00db\3\2\2\2\u00df\u00de") - buf.write(u"\3\2\2\2\u00e0\u00e1\3\2\2\2\u00e1\u00df\3\2\2\2\u00e1") - buf.write(u"\u00e2\3\2\2\2\u00e2V\3\2\2\2\u00e3\u00e8\5? \2\u00e4") - buf.write(u"\u00e8\5A!\2\u00e5\u00e8\5=\37\2\u00e6\u00e8\7a\2\2\u00e7") - buf.write(u"\u00e3\3\2\2\2\u00e7\u00e4\3\2\2\2\u00e7\u00e5\3\2\2") - buf.write(u"\2\u00e7\u00e6\3\2\2\2\u00e8\u00e9\3\2\2\2\u00e9\u00e7") - buf.write(u"\3\2\2\2\u00e9\u00ea\3\2\2\2\u00eaX\3\2\2\2\r\2\u00c4") - buf.write(u"\u00c9\u00cf\u00d1\u00d8\u00db\u00df\u00e1\u00e7\u00e9") - buf.write(u"\2") + buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\34") + buf.write("\u00eb\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\4\34\t\34\4\35\t\35\4\36") + buf.write("\t\36\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%") + buf.write("\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4,\t,\3\2\3\2\3") + buf.write("\3\3\3\3\4\3\4\3\5\3\5\3\6\3\6\3\7\3\7\3\b\3\b\3\t\3\t") + buf.write("\3\n\3\n\3\13\3\13\3\f\3\f\3\r\3\r\3\16\3\16\3\16\3\17") + buf.write("\3\17\3\17\3\20\3\20\3\21\3\21\3\22\3\22\3\23\3\23\3\24") + buf.write("\3\24\3\25\3\25\3\26\3\26\3\27\3\27\3\30\3\30\3\31\3\31") + buf.write("\3\32\3\32\3\33\3\33\3\34\3\34\3\35\3\35\3\36\3\36\3\37") + buf.write("\3\37\3 \3 \3!\3!\3\"\3\"\3\"\3\"\3\"\3\"\3#\3#\3#\3#") + buf.write("\3$\3$\3$\3$\3$\3$\3$\3$\3$\3%\3%\3%\3%\3%\3%\3%\3%\3") + buf.write("%\3&\3&\3&\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\5\'") + buf.write("\u00c5\n\'\3(\6(\u00c8\n(\r(\16(\u00c9\3(\3(\6(\u00ce") + buf.write("\n(\r(\16(\u00cf\5(\u00d2\n(\3)\3)\3*\6*\u00d7\n*\r*\16") + buf.write("*\u00d8\3+\5+\u00dc\n+\3+\3+\6+\u00e0\n+\r+\16+\u00e1") + buf.write("\3,\3,\3,\3,\6,\u00e8\n,\r,\16,\u00e9\2\2-\3\3\5\4\7\5") + buf.write("\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35") + buf.write("\20\37\21!\2#\2%\2\'\2)\2+\2-\2/\2\61\2\63\2\65\2\67\2") + buf.write("9\2;\2=\2?\2A\2C\22E\23G\24I\25K\26M\27O\30Q\31S\32U\33") + buf.write("W\34\3\2\26\4\2CCcc\4\2EEee\4\2FFff\4\2GGgg\4\2JJjj\4") + buf.write("\2KKkk\4\2NNnn\4\2PPpp\4\2QQqq\4\2TTtt\4\2UUuu\4\2WWw") + buf.write("w\4\2YYyy\4\2ZZzz\3\2\62;\3\2c|\3\2C\\\4\2..\60\60\4\2") + buf.write("$$))\4\2\13\13\"\"\2\u00e9\2\3\3\2\2\2\2\5\3\2\2\2\2\7") + buf.write("\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") + buf.write("\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") + buf.write("\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") + buf.write("\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2") + buf.write("\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2") + buf.write("\2\2\2W\3\2\2\2\3Y\3\2\2\2\5[\3\2\2\2\7]\3\2\2\2\t_\3") + buf.write("\2\2\2\13a\3\2\2\2\rc\3\2\2\2\17e\3\2\2\2\21g\3\2\2\2") + buf.write("\23i\3\2\2\2\25k\3\2\2\2\27m\3\2\2\2\31o\3\2\2\2\33q\3") + buf.write("\2\2\2\35t\3\2\2\2\37w\3\2\2\2!y\3\2\2\2#{\3\2\2\2%}\3") + buf.write("\2\2\2\'\177\3\2\2\2)\u0081\3\2\2\2+\u0083\3\2\2\2-\u0085") + buf.write("\3\2\2\2/\u0087\3\2\2\2\61\u0089\3\2\2\2\63\u008b\3\2") + buf.write("\2\2\65\u008d\3\2\2\2\67\u008f\3\2\2\29\u0091\3\2\2\2") + buf.write(";\u0093\3\2\2\2=\u0095\3\2\2\2?\u0097\3\2\2\2A\u0099\3") + buf.write("\2\2\2C\u009b\3\2\2\2E\u00a1\3\2\2\2G\u00a5\3\2\2\2I\u00ae") + buf.write("\3\2\2\2K\u00b7\3\2\2\2M\u00c4\3\2\2\2O\u00c7\3\2\2\2") + buf.write("Q\u00d3\3\2\2\2S\u00d6\3\2\2\2U\u00df\3\2\2\2W\u00e7\3") + buf.write("\2\2\2YZ\7\61\2\2Z\4\3\2\2\2[\\\7\60\2\2\\\6\3\2\2\2]") + buf.write("^\7,\2\2^\b\3\2\2\2_`\7/\2\2`\n\3\2\2\2ab\7a\2\2b\f\3") + buf.write("\2\2\2cd\7<\2\2d\16\3\2\2\2ef\7\'\2\2f\20\3\2\2\2gh\7") + buf.write("%\2\2h\22\3\2\2\2ij\7B\2\2j\24\3\2\2\2kl\7^\2\2l\26\3") + buf.write("\2\2\2mn\7.\2\2n\30\3\2\2\2op\7~\2\2p\32\3\2\2\2qr\7?") + buf.write("\2\2rs\7?\2\2s\34\3\2\2\2tu\7#\2\2uv\7?\2\2v\36\3\2\2") + buf.write("\2wx\7\u0080\2\2x \3\2\2\2yz\t\2\2\2z\"\3\2\2\2{|\t\3") + buf.write("\2\2|$\3\2\2\2}~\t\4\2\2~&\3\2\2\2\177\u0080\t\5\2\2\u0080") + buf.write("(\3\2\2\2\u0081\u0082\t\6\2\2\u0082*\3\2\2\2\u0083\u0084") + buf.write("\t\7\2\2\u0084,\3\2\2\2\u0085\u0086\t\b\2\2\u0086.\3\2") + buf.write("\2\2\u0087\u0088\t\t\2\2\u0088\60\3\2\2\2\u0089\u008a") + buf.write("\t\n\2\2\u008a\62\3\2\2\2\u008b\u008c\t\13\2\2\u008c\64") + buf.write("\3\2\2\2\u008d\u008e\t\f\2\2\u008e\66\3\2\2\2\u008f\u0090") + buf.write("\t\r\2\2\u00908\3\2\2\2\u0091\u0092\t\16\2\2\u0092:\3") + buf.write("\2\2\2\u0093\u0094\t\17\2\2\u0094<\3\2\2\2\u0095\u0096") + buf.write("\t\20\2\2\u0096>\3\2\2\2\u0097\u0098\t\21\2\2\u0098@\3") + buf.write("\2\2\2\u0099\u009a\t\22\2\2\u009aB\3\2\2\2\u009b\u009c") + buf.write("\59\35\2\u009c\u009d\5)\25\2\u009d\u009e\5\'\24\2\u009e") + buf.write("\u009f\5\63\32\2\u009f\u00a0\5\'\24\2\u00a0D\3\2\2\2\u00a1") + buf.write("\u00a2\5!\21\2\u00a2\u00a3\5/\30\2\u00a3\u00a4\5%\23\2") + buf.write("\u00a4F\3\2\2\2\u00a5\u00a6\5+\26\2\u00a6\u00a7\5/\30") + buf.write("\2\u00a7\u00a8\5#\22\2\u00a8\u00a9\5-\27\2\u00a9\u00aa") + buf.write("\5\67\34\2\u00aa\u00ab\5%\23\2\u00ab\u00ac\5\'\24\2\u00ac") + buf.write("\u00ad\5\65\33\2\u00adH\3\2\2\2\u00ae\u00af\5\'\24\2\u00af") + buf.write("\u00b0\5;\36\2\u00b0\u00b1\5#\22\2\u00b1\u00b2\5-\27\2") + buf.write("\u00b2\u00b3\5\67\34\2\u00b3\u00b4\5%\23\2\u00b4\u00b5") + buf.write("\5\'\24\2\u00b5\u00b6\5\65\33\2\u00b6J\3\2\2\2\u00b7\u00b8") + buf.write("\5\61\31\2\u00b8\u00b9\5\63\32\2\u00b9L\3\2\2\2\u00ba") + buf.write("\u00c5\7>\2\2\u00bb\u00bc\7>\2\2\u00bc\u00c5\7?\2\2\u00bd") + buf.write("\u00be\7?\2\2\u00be\u00c5\7?\2\2\u00bf\u00c0\7@\2\2\u00c0") + buf.write("\u00c5\7?\2\2\u00c1\u00c5\7@\2\2\u00c2\u00c3\7#\2\2\u00c3") + buf.write("\u00c5\7?\2\2\u00c4\u00ba\3\2\2\2\u00c4\u00bb\3\2\2\2") + buf.write("\u00c4\u00bd\3\2\2\2\u00c4\u00bf\3\2\2\2\u00c4\u00c1\3") + buf.write("\2\2\2\u00c4\u00c2\3\2\2\2\u00c5N\3\2\2\2\u00c6\u00c8") + buf.write("\5=\37\2\u00c7\u00c6\3\2\2\2\u00c8\u00c9\3\2\2\2\u00c9") + buf.write("\u00c7\3\2\2\2\u00c9\u00ca\3\2\2\2\u00ca\u00d1\3\2\2\2") + buf.write("\u00cb\u00cd\t\23\2\2\u00cc\u00ce\5=\37\2\u00cd\u00cc") + buf.write("\3\2\2\2\u00ce\u00cf\3\2\2\2\u00cf\u00cd\3\2\2\2\u00cf") + buf.write("\u00d0\3\2\2\2\u00d0\u00d2\3\2\2\2\u00d1\u00cb\3\2\2\2") + buf.write("\u00d1\u00d2\3\2\2\2\u00d2P\3\2\2\2\u00d3\u00d4\t\24\2") + buf.write("\2\u00d4R\3\2\2\2\u00d5\u00d7\t\25\2\2\u00d6\u00d5\3\2") + buf.write("\2\2\u00d7\u00d8\3\2\2\2\u00d8\u00d6\3\2\2\2\u00d8\u00d9") + buf.write("\3\2\2\2\u00d9T\3\2\2\2\u00da\u00dc\7\17\2\2\u00db\u00da") + buf.write("\3\2\2\2\u00db\u00dc\3\2\2\2\u00dc\u00dd\3\2\2\2\u00dd") + buf.write("\u00e0\7\f\2\2\u00de\u00e0\7\17\2\2\u00df\u00db\3\2\2") + buf.write("\2\u00df\u00de\3\2\2\2\u00e0\u00e1\3\2\2\2\u00e1\u00df") + buf.write("\3\2\2\2\u00e1\u00e2\3\2\2\2\u00e2V\3\2\2\2\u00e3\u00e8") + buf.write("\5? \2\u00e4\u00e8\5A!\2\u00e5\u00e8\5=\37\2\u00e6\u00e8") + buf.write("\7a\2\2\u00e7\u00e3\3\2\2\2\u00e7\u00e4\3\2\2\2\u00e7") + buf.write("\u00e5\3\2\2\2\u00e7\u00e6\3\2\2\2\u00e8\u00e9\3\2\2\2") + buf.write("\u00e9\u00e7\3\2\2\2\u00e9\u00ea\3\2\2\2\u00eaX\3\2\2") + buf.write("\2\r\2\u00c4\u00c9\u00cf\u00d1\u00d8\u00db\u00df\u00e1") + buf.write("\u00e7\u00e9\2") return buf.getvalue() @@ -149,29 +151,28 @@ class AutoscaleConditionLexer(Lexer): channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ] - modeNames = [ u"DEFAULT_MODE" ] + modeNames = [ "DEFAULT_MODE" ] - literalNames = [ u"", - u"'/'", u"'.'", u"'*'", u"'-'", u"'_'", u"':'", u"'%'", u"'#'", - u"'@'", u"'\\'", u"','", u"'|'", u"'=='", u"'!='", u"'~'" ] + literalNames = [ "", + "'/'", "'.'", "'*'", "'-'", "'_'", "':'", "'%'", "'#'", "'@'", + "'\\'", "','", "'|'", "'=='", "'!='", "'~'" ] - symbolicNames = [ u"", - u"WHERE", u"AND", u"INCLUDES", u"EXCLUDES", u"OR", u"OPERATOR", - u"NUMBER", u"QUOTE", u"WHITESPACE", u"NEWLINE", u"WORD" ] + symbolicNames = [ "", + "WHERE", "AND", "INCLUDES", "EXCLUDES", "OR", "OPERATOR", "NUMBER", + "QUOTE", "WHITESPACE", "NEWLINE", "WORD" ] - ruleNames = [ u"T__0", u"T__1", u"T__2", u"T__3", u"T__4", u"T__5", - u"T__6", u"T__7", u"T__8", u"T__9", u"T__10", u"T__11", - u"T__12", u"T__13", u"T__14", u"A", u"C", u"D", u"E", - u"H", u"I", u"L", u"N", u"O", u"R", u"S", u"U", u"W", - u"X", u"DIGIT", u"LOWERCASE", u"UPPERCASE", u"WHERE", - u"AND", u"INCLUDES", u"EXCLUDES", u"OR", u"OPERATOR", - u"NUMBER", u"QUOTE", u"WHITESPACE", u"NEWLINE", u"WORD" ] + 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", "T__13", + "T__14", "A", "C", "D", "E", "H", "I", "L", "N", "O", + "R", "S", "U", "W", "X", "DIGIT", "LOWERCASE", "UPPERCASE", + "WHERE", "AND", "INCLUDES", "EXCLUDES", "OR", "OPERATOR", + "NUMBER", "QUOTE", "WHITESPACE", "NEWLINE", "WORD" ] - grammarFileName = u"AutoscaleCondition.g4" + grammarFileName = "AutoscaleCondition.g4" - def __init__(self, input=None, output=sys.stdout): - super(AutoscaleConditionLexer, self).__init__(input, output=output) - self.checkVersion("4.7.2") + def __init__(self, input=None, output:TextIO = sys.stdout): + super().__init__(input, output) + self.checkVersion("4.9.3") self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache()) self._actions = None self._predicates = None diff --git a/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/AutoscaleConditionListener.py b/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/AutoscaleConditionListener.py index a706180e2aa..7862a83888d 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/AutoscaleConditionListener.py +++ b/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/AutoscaleConditionListener.py @@ -2,154 +2,160 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -# Generated from AutoscaleCondition.g4 by ANTLR 4.7.2 +# Generated from AutoscaleCondition.g4 by ANTLR 4.9.3 # pylint: disable=all from antlr4 import * +if __name__ is not None and "." in __name__: + from .AutoscaleConditionParser import AutoscaleConditionParser +else: + from AutoscaleConditionParser import AutoscaleConditionParser # This class defines a complete listener for a parse tree produced by AutoscaleConditionParser. class AutoscaleConditionListener(ParseTreeListener): # Enter a parse tree produced by AutoscaleConditionParser#expression. - def enterExpression(self, ctx): + def enterExpression(self, ctx:AutoscaleConditionParser.ExpressionContext): pass # Exit a parse tree produced by AutoscaleConditionParser#expression. - def exitExpression(self, ctx): + def exitExpression(self, ctx:AutoscaleConditionParser.ExpressionContext): pass # Enter a parse tree produced by AutoscaleConditionParser#aggregation. - def enterAggregation(self, ctx): + def enterAggregation(self, ctx:AutoscaleConditionParser.AggregationContext): pass # Exit a parse tree produced by AutoscaleConditionParser#aggregation. - def exitAggregation(self, ctx): + def exitAggregation(self, ctx:AutoscaleConditionParser.AggregationContext): pass # Enter a parse tree produced by AutoscaleConditionParser#namespace. - def enterNamespace(self, ctx): + def enterNamespace(self, ctx:AutoscaleConditionParser.NamespaceContext): pass # Exit a parse tree produced by AutoscaleConditionParser#namespace. - def exitNamespace(self, ctx): + def exitNamespace(self, ctx:AutoscaleConditionParser.NamespaceContext): pass # Enter a parse tree produced by AutoscaleConditionParser#metric. - def enterMetric(self, ctx): + def enterMetric(self, ctx:AutoscaleConditionParser.MetricContext): pass # Exit a parse tree produced by AutoscaleConditionParser#metric. - def exitMetric(self, ctx): + def exitMetric(self, ctx:AutoscaleConditionParser.MetricContext): pass # Enter a parse tree produced by AutoscaleConditionParser#operator. - def enterOperator(self, ctx): + def enterOperator(self, ctx:AutoscaleConditionParser.OperatorContext): pass # Exit a parse tree produced by AutoscaleConditionParser#operator. - def exitOperator(self, ctx): + def exitOperator(self, ctx:AutoscaleConditionParser.OperatorContext): pass # Enter a parse tree produced by AutoscaleConditionParser#threshold. - def enterThreshold(self, ctx): + def enterThreshold(self, ctx:AutoscaleConditionParser.ThresholdContext): pass # Exit a parse tree produced by AutoscaleConditionParser#threshold. - def exitThreshold(self, ctx): + def exitThreshold(self, ctx:AutoscaleConditionParser.ThresholdContext): pass # Enter a parse tree produced by AutoscaleConditionParser#period. - def enterPeriod(self, ctx): + def enterPeriod(self, ctx:AutoscaleConditionParser.PeriodContext): pass # Exit a parse tree produced by AutoscaleConditionParser#period. - def exitPeriod(self, ctx): + def exitPeriod(self, ctx:AutoscaleConditionParser.PeriodContext): pass # Enter a parse tree produced by AutoscaleConditionParser#where. - def enterWhere(self, ctx): + def enterWhere(self, ctx:AutoscaleConditionParser.WhereContext): pass # Exit a parse tree produced by AutoscaleConditionParser#where. - def exitWhere(self, ctx): + def exitWhere(self, ctx:AutoscaleConditionParser.WhereContext): pass # Enter a parse tree produced by AutoscaleConditionParser#dimensions. - def enterDimensions(self, ctx): + def enterDimensions(self, ctx:AutoscaleConditionParser.DimensionsContext): pass # Exit a parse tree produced by AutoscaleConditionParser#dimensions. - def exitDimensions(self, ctx): + def exitDimensions(self, ctx:AutoscaleConditionParser.DimensionsContext): pass # Enter a parse tree produced by AutoscaleConditionParser#dimension. - def enterDimension(self, ctx): + def enterDimension(self, ctx:AutoscaleConditionParser.DimensionContext): pass # Exit a parse tree produced by AutoscaleConditionParser#dimension. - def exitDimension(self, ctx): + def exitDimension(self, ctx:AutoscaleConditionParser.DimensionContext): pass # Enter a parse tree produced by AutoscaleConditionParser#dim_separator. - def enterDim_separator(self, ctx): + def enterDim_separator(self, ctx:AutoscaleConditionParser.Dim_separatorContext): pass # Exit a parse tree produced by AutoscaleConditionParser#dim_separator. - def exitDim_separator(self, ctx): + def exitDim_separator(self, ctx:AutoscaleConditionParser.Dim_separatorContext): pass # Enter a parse tree produced by AutoscaleConditionParser#dim_operator. - def enterDim_operator(self, ctx): + def enterDim_operator(self, ctx:AutoscaleConditionParser.Dim_operatorContext): pass # Exit a parse tree produced by AutoscaleConditionParser#dim_operator. - def exitDim_operator(self, ctx): + def exitDim_operator(self, ctx:AutoscaleConditionParser.Dim_operatorContext): pass # Enter a parse tree produced by AutoscaleConditionParser#dim_val_separator. - def enterDim_val_separator(self, ctx): + def enterDim_val_separator(self, ctx:AutoscaleConditionParser.Dim_val_separatorContext): pass # Exit a parse tree produced by AutoscaleConditionParser#dim_val_separator. - def exitDim_val_separator(self, ctx): + def exitDim_val_separator(self, ctx:AutoscaleConditionParser.Dim_val_separatorContext): pass # Enter a parse tree produced by AutoscaleConditionParser#dim_name. - def enterDim_name(self, ctx): + def enterDim_name(self, ctx:AutoscaleConditionParser.Dim_nameContext): pass # Exit a parse tree produced by AutoscaleConditionParser#dim_name. - def exitDim_name(self, ctx): + def exitDim_name(self, ctx:AutoscaleConditionParser.Dim_nameContext): pass # Enter a parse tree produced by AutoscaleConditionParser#dim_values. - def enterDim_values(self, ctx): + def enterDim_values(self, ctx:AutoscaleConditionParser.Dim_valuesContext): pass # Exit a parse tree produced by AutoscaleConditionParser#dim_values. - def exitDim_values(self, ctx): + def exitDim_values(self, ctx:AutoscaleConditionParser.Dim_valuesContext): pass # Enter a parse tree produced by AutoscaleConditionParser#dim_value. - def enterDim_value(self, ctx): + def enterDim_value(self, ctx:AutoscaleConditionParser.Dim_valueContext): pass # Exit a parse tree produced by AutoscaleConditionParser#dim_value. - def exitDim_value(self, ctx): + def exitDim_value(self, ctx:AutoscaleConditionParser.Dim_valueContext): pass + +del AutoscaleConditionParser \ No newline at end of file diff --git a/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/AutoscaleConditionParser.py b/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/AutoscaleConditionParser.py index 7a56610ec39..fd2ddc9ed2f 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/AutoscaleConditionParser.py +++ b/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/AutoscaleConditionParser.py @@ -2,57 +2,60 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -# Generated from AutoscaleCondition.g4 by ANTLR 4.7.2 +# Generated from AutoscaleCondition.g4 by ANTLR 4.9.3 # encoding: utf-8 # pylint: disable=all 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(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3") - buf.write(u"\34\u0081\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7") - buf.write(u"\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") - buf.write(u"\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\3\2\3\2\3") - buf.write(u"\2\3\2\3\2\7\2(\n\2\f\2\16\2+\13\2\3\2\3\2\3\2\3\2\3") - buf.write(u"\2\3\2\3\2\3\2\3\2\7\2\66\n\2\f\2\16\29\13\2\3\2\7\2") - buf.write(u"<\n\2\f\2\16\2?\13\2\3\3\3\3\3\3\3\4\6\4E\n\4\r\4\16") - buf.write(u"\4F\3\5\6\5J\n\5\r\5\16\5K\3\6\3\6\3\6\3\7\3\7\3\7\3") - buf.write(u"\b\3\b\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\7\n^\n\n\f\n\16") - buf.write(u"\na\13\n\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\r\3\r\3\r") - buf.write(u"\3\16\3\16\3\16\3\17\3\17\3\17\3\20\3\20\3\20\3\20\7") - buf.write(u"\20w\n\20\f\20\16\20z\13\20\3\21\6\21}\n\21\r\21\16\21") - buf.write(u"~\3\21\2\2\22\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36") - buf.write(u" \2\b\5\2\3\13\32\32\34\34\7\2\3\4\6\t\f\16\32\32\34") - buf.write(u"\34\4\2\r\r\23\23\3\2\17\20\4\2\r\r\26\26\b\2\4\6\b\b") - buf.write(u"\21\21\30\30\32\32\34\34\2x\2)\3\2\2\2\4@\3\2\2\2\6D") - buf.write(u"\3\2\2\2\bI\3\2\2\2\nM\3\2\2\2\fP\3\2\2\2\16S\3\2\2\2") - buf.write(u"\20U\3\2\2\2\22X\3\2\2\2\24b\3\2\2\2\26f\3\2\2\2\30i") - buf.write(u"\3\2\2\2\32l\3\2\2\2\34o\3\2\2\2\36r\3\2\2\2 |\3\2\2") - buf.write(u"\2\"#\7\31\2\2#$\5\6\4\2$%\7\31\2\2%&\7\32\2\2&(\3\2") - buf.write(u"\2\2\'\"\3\2\2\2(+\3\2\2\2)\'\3\2\2\2)*\3\2\2\2*,\3\2") - buf.write(u"\2\2+)\3\2\2\2,-\5\b\5\2-.\7\32\2\2./\3\2\2\2/\60\5\n") - buf.write(u"\6\2\60\61\5\f\7\2\61\62\5\4\3\2\62\67\5\16\b\2\63\64") - buf.write(u"\7\32\2\2\64\66\5\22\n\2\65\63\3\2\2\2\669\3\2\2\2\67") - buf.write(u"\65\3\2\2\2\678\3\2\2\28=\3\2\2\29\67\3\2\2\2:<\7\33") - buf.write(u"\2\2;:\3\2\2\2\3\2\2\2>\3\3\2\2") - buf.write(u"\2?=\3\2\2\2@A\7\34\2\2AB\7\32\2\2B\5\3\2\2\2CE\t\2\2") - buf.write(u"\2DC\3\2\2\2EF\3\2\2\2FD\3\2\2\2FG\3\2\2\2G\7\3\2\2\2") - buf.write(u"HJ\t\3\2\2IH\3\2\2\2JK\3\2\2\2KI\3\2\2\2KL\3\2\2\2L\t") - buf.write(u"\3\2\2\2MN\7\27\2\2NO\7\32\2\2O\13\3\2\2\2PQ\7\30\2\2") - buf.write(u"QR\7\32\2\2R\r\3\2\2\2ST\7\34\2\2T\17\3\2\2\2UV\7\22") - buf.write(u"\2\2VW\7\32\2\2W\21\3\2\2\2XY\5\20\t\2Y_\5\24\13\2Z[") - buf.write(u"\5\26\f\2[\\\5\24\13\2\\^\3\2\2\2]Z\3\2\2\2^a\3\2\2\2") - buf.write(u"_]\3\2\2\2_`\3\2\2\2`\23\3\2\2\2a_\3\2\2\2bc\5\34\17") - buf.write(u"\2cd\5\30\r\2de\5\36\20\2e\25\3\2\2\2fg\t\4\2\2gh\7\32") - buf.write(u"\2\2h\27\3\2\2\2ij\t\5\2\2jk\7\32\2\2k\31\3\2\2\2lm\t") - buf.write(u"\6\2\2mn\7\32\2\2n\33\3\2\2\2op\7\34\2\2pq\7\32\2\2q") - buf.write(u"\35\3\2\2\2rx\5 \21\2st\5\32\16\2tu\5 \21\2uw\3\2\2\2") - buf.write(u"vs\3\2\2\2wz\3\2\2\2xv\3\2\2\2xy\3\2\2\2y\37\3\2\2\2") - buf.write(u"zx\3\2\2\2{}\t\7\2\2|{\3\2\2\2}~\3\2\2\2~|\3\2\2\2~\177") - buf.write(u"\3\2\2\2\177!\3\2\2\2\n)\67=FK_x~") + buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\34") + buf.write("\u0081\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7") + buf.write("\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16") + buf.write("\t\16\4\17\t\17\4\20\t\20\4\21\t\21\3\2\3\2\3\2\3\2\3") + buf.write("\2\7\2(\n\2\f\2\16\2+\13\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2") + buf.write("\3\2\3\2\7\2\66\n\2\f\2\16\29\13\2\3\2\7\2<\n\2\f\2\16") + buf.write("\2?\13\2\3\3\3\3\3\3\3\4\6\4E\n\4\r\4\16\4F\3\5\6\5J\n") + buf.write("\5\r\5\16\5K\3\6\3\6\3\6\3\7\3\7\3\7\3\b\3\b\3\t\3\t\3") + buf.write("\t\3\n\3\n\3\n\3\n\3\n\7\n^\n\n\f\n\16\na\13\n\3\13\3") + buf.write("\13\3\13\3\13\3\f\3\f\3\f\3\r\3\r\3\r\3\16\3\16\3\16\3") + buf.write("\17\3\17\3\17\3\20\3\20\3\20\3\20\7\20w\n\20\f\20\16\20") + buf.write("z\13\20\3\21\6\21}\n\21\r\21\16\21~\3\21\2\2\22\2\4\6") + buf.write("\b\n\f\16\20\22\24\26\30\32\34\36 \2\b\5\2\3\13\32\32") + buf.write("\34\34\7\2\3\4\6\t\f\16\32\32\34\34\4\2\r\r\23\23\3\2") + buf.write("\17\20\4\2\r\r\26\26\b\2\4\6\b\b\21\21\30\30\32\32\34") + buf.write("\34\2x\2)\3\2\2\2\4@\3\2\2\2\6D\3\2\2\2\bI\3\2\2\2\nM") + buf.write("\3\2\2\2\fP\3\2\2\2\16S\3\2\2\2\20U\3\2\2\2\22X\3\2\2") + buf.write("\2\24b\3\2\2\2\26f\3\2\2\2\30i\3\2\2\2\32l\3\2\2\2\34") + buf.write("o\3\2\2\2\36r\3\2\2\2 |\3\2\2\2\"#\7\31\2\2#$\5\6\4\2") + buf.write("$%\7\31\2\2%&\7\32\2\2&(\3\2\2\2\'\"\3\2\2\2(+\3\2\2\2") + buf.write(")\'\3\2\2\2)*\3\2\2\2*,\3\2\2\2+)\3\2\2\2,-\5\b\5\2-.") + buf.write("\7\32\2\2./\3\2\2\2/\60\5\n\6\2\60\61\5\f\7\2\61\62\5") + buf.write("\4\3\2\62\67\5\16\b\2\63\64\7\32\2\2\64\66\5\22\n\2\65") + buf.write("\63\3\2\2\2\669\3\2\2\2\67\65\3\2\2\2\678\3\2\2\28=\3") + buf.write("\2\2\29\67\3\2\2\2:<\7\33\2\2;:\3\2\2\2\3\2\2\2>\3\3\2\2\2?=\3\2\2\2@A\7\34\2\2AB\7\32") + buf.write("\2\2B\5\3\2\2\2CE\t\2\2\2DC\3\2\2\2EF\3\2\2\2FD\3\2\2") + buf.write("\2FG\3\2\2\2G\7\3\2\2\2HJ\t\3\2\2IH\3\2\2\2JK\3\2\2\2") + buf.write("KI\3\2\2\2KL\3\2\2\2L\t\3\2\2\2MN\7\27\2\2NO\7\32\2\2") + buf.write("O\13\3\2\2\2PQ\7\30\2\2QR\7\32\2\2R\r\3\2\2\2ST\7\34\2") + buf.write("\2T\17\3\2\2\2UV\7\22\2\2VW\7\32\2\2W\21\3\2\2\2XY\5\20") + buf.write("\t\2Y_\5\24\13\2Z[\5\26\f\2[\\\5\24\13\2\\^\3\2\2\2]Z") + buf.write("\3\2\2\2^a\3\2\2\2_]\3\2\2\2_`\3\2\2\2`\23\3\2\2\2a_\3") + buf.write("\2\2\2bc\5\34\17\2cd\5\30\r\2de\5\36\20\2e\25\3\2\2\2") + buf.write("fg\t\4\2\2gh\7\32\2\2h\27\3\2\2\2ij\t\5\2\2jk\7\32\2\2") + buf.write("k\31\3\2\2\2lm\t\6\2\2mn\7\32\2\2n\33\3\2\2\2op\7\34\2") + buf.write("\2pq\7\32\2\2q\35\3\2\2\2rx\5 \21\2st\5\32\16\2tu\5 \21") + buf.write("\2uw\3\2\2\2vs\3\2\2\2wz\3\2\2\2xv\3\2\2\2xy\3\2\2\2y") + buf.write("\37\3\2\2\2zx\3\2\2\2{}\t\7\2\2|{\3\2\2\2}~\3\2\2\2~|") + buf.write("\3\2\2\2~\177\3\2\2\2\177!\3\2\2\2\n)\67=FK_x~") return buf.getvalue() @@ -66,17 +69,16 @@ class AutoscaleConditionParser ( Parser ): sharedContextCache = PredictionContextCache() - literalNames = [ u"", u"'/'", u"'.'", u"'*'", u"'-'", u"'_'", - u"':'", u"'%'", u"'#'", u"'@'", u"'\\'", u"','", u"'|'", - u"'=='", u"'!='", u"'~'" ] + literalNames = [ "", "'/'", "'.'", "'*'", "'-'", "'_'", "':'", + "'%'", "'#'", "'@'", "'\\'", "','", "'|'", "'=='", + "'!='", "'~'" ] - symbolicNames = [ u"", u"", u"", u"", - u"", u"", u"", u"", - u"", u"", u"", u"", - u"", u"", u"", u"", - u"WHERE", u"AND", u"INCLUDES", u"EXCLUDES", u"OR", - u"OPERATOR", u"NUMBER", u"QUOTE", u"WHITESPACE", u"NEWLINE", - u"WORD" ] + symbolicNames = [ "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "", "", "", + "WHERE", "AND", "INCLUDES", "EXCLUDES", "OR", "OPERATOR", + "NUMBER", "QUOTE", "WHITESPACE", "NEWLINE", "WORD" ] RULE_expression = 0 RULE_aggregation = 1 @@ -95,10 +97,10 @@ class AutoscaleConditionParser ( Parser ): RULE_dim_values = 14 RULE_dim_value = 15 - ruleNames = [ u"expression", u"aggregation", u"namespace", u"metric", - u"operator", u"threshold", u"period", u"where", u"dimensions", - u"dimension", u"dim_separator", u"dim_operator", u"dim_val_separator", - u"dim_name", u"dim_values", u"dim_value" ] + ruleNames = [ "expression", "aggregation", "namespace", "metric", "operator", + "threshold", "period", "where", "dimensions", "dimension", + "dim_separator", "dim_operator", "dim_val_separator", + "dim_name", "dim_values", "dim_value" ] EOF = Token.EOF T__0=1 @@ -128,9 +130,9 @@ class AutoscaleConditionParser ( Parser ): NEWLINE=25 WORD=26 - def __init__(self, input, output=sys.stdout): - super(AutoscaleConditionParser, self).__init__(input, output=output) - self.checkVersion("4.7.2") + def __init__(self, input:TokenStream, output:TextIO = sys.stdout): + super().__init__(input, output) + self.checkVersion("4.9.3") self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache) self._predicates = None @@ -138,9 +140,10 @@ def __init__(self, input, output=sys.stdout): class ExpressionContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(AutoscaleConditionParser.ExpressionContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def operator(self): @@ -163,33 +166,33 @@ def metric(self): return self.getTypedRuleContext(AutoscaleConditionParser.MetricContext,0) - def WHITESPACE(self, i=None): + def WHITESPACE(self, i:int=None): if i is None: return self.getTokens(AutoscaleConditionParser.WHITESPACE) else: return self.getToken(AutoscaleConditionParser.WHITESPACE, i) - def QUOTE(self, i=None): + def QUOTE(self, i:int=None): if i is None: return self.getTokens(AutoscaleConditionParser.QUOTE) else: return self.getToken(AutoscaleConditionParser.QUOTE, i) - def namespace(self, i=None): + def namespace(self, i:int=None): if i is None: return self.getTypedRuleContexts(AutoscaleConditionParser.NamespaceContext) else: return self.getTypedRuleContext(AutoscaleConditionParser.NamespaceContext,i) - def dimensions(self, i=None): + def dimensions(self, i:int=None): if i is None: return self.getTypedRuleContexts(AutoscaleConditionParser.DimensionsContext) else: return self.getTypedRuleContext(AutoscaleConditionParser.DimensionsContext,i) - def NEWLINE(self, i=None): + def NEWLINE(self, i:int=None): if i is None: return self.getTokens(AutoscaleConditionParser.NEWLINE) else: @@ -198,12 +201,12 @@ def NEWLINE(self, i=None): def getRuleIndex(self): return AutoscaleConditionParser.RULE_expression - def enterRule(self, listener): - if hasattr(listener, "enterExpression"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExpression" ): listener.enterExpression(self) - def exitRule(self, listener): - if hasattr(listener, "exitExpression"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExpression" ): listener.exitExpression(self) @@ -276,9 +279,10 @@ def expression(self): class AggregationContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(AutoscaleConditionParser.AggregationContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def WORD(self): @@ -290,12 +294,12 @@ def WHITESPACE(self): def getRuleIndex(self): return AutoscaleConditionParser.RULE_aggregation - def enterRule(self, listener): - if hasattr(listener, "enterAggregation"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAggregation" ): listener.enterAggregation(self) - def exitRule(self, listener): - if hasattr(listener, "exitAggregation"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAggregation" ): listener.exitAggregation(self) @@ -321,18 +325,19 @@ def aggregation(self): class NamespaceContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(AutoscaleConditionParser.NamespaceContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser - def WORD(self, i=None): + def WORD(self, i:int=None): if i is None: return self.getTokens(AutoscaleConditionParser.WORD) else: return self.getToken(AutoscaleConditionParser.WORD, i) - def WHITESPACE(self, i=None): + def WHITESPACE(self, i:int=None): if i is None: return self.getTokens(AutoscaleConditionParser.WHITESPACE) else: @@ -341,12 +346,12 @@ def WHITESPACE(self, i=None): def getRuleIndex(self): return AutoscaleConditionParser.RULE_namespace - def enterRule(self, listener): - if hasattr(listener, "enterNamespace"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNamespace" ): listener.enterNamespace(self) - def exitRule(self, listener): - if hasattr(listener, "exitNamespace"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNamespace" ): listener.exitNamespace(self) @@ -386,18 +391,19 @@ def namespace(self): class MetricContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(AutoscaleConditionParser.MetricContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser - def WORD(self, i=None): + def WORD(self, i:int=None): if i is None: return self.getTokens(AutoscaleConditionParser.WORD) else: return self.getToken(AutoscaleConditionParser.WORD, i) - def WHITESPACE(self, i=None): + def WHITESPACE(self, i:int=None): if i is None: return self.getTokens(AutoscaleConditionParser.WHITESPACE) else: @@ -406,12 +412,12 @@ def WHITESPACE(self, i=None): def getRuleIndex(self): return AutoscaleConditionParser.RULE_metric - def enterRule(self, listener): - if hasattr(listener, "enterMetric"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMetric" ): listener.enterMetric(self) - def exitRule(self, listener): - if hasattr(listener, "exitMetric"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMetric" ): listener.exitMetric(self) @@ -453,9 +459,10 @@ def metric(self): class OperatorContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(AutoscaleConditionParser.OperatorContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def OPERATOR(self): @@ -467,12 +474,12 @@ def WHITESPACE(self): def getRuleIndex(self): return AutoscaleConditionParser.RULE_operator - def enterRule(self, listener): - if hasattr(listener, "enterOperator"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterOperator" ): listener.enterOperator(self) - def exitRule(self, listener): - if hasattr(listener, "exitOperator"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitOperator" ): listener.exitOperator(self) @@ -498,9 +505,10 @@ def operator(self): class ThresholdContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(AutoscaleConditionParser.ThresholdContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def NUMBER(self): @@ -512,12 +520,12 @@ def WHITESPACE(self): def getRuleIndex(self): return AutoscaleConditionParser.RULE_threshold - def enterRule(self, listener): - if hasattr(listener, "enterThreshold"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterThreshold" ): listener.enterThreshold(self) - def exitRule(self, listener): - if hasattr(listener, "exitThreshold"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitThreshold" ): listener.exitThreshold(self) @@ -543,9 +551,10 @@ def threshold(self): class PeriodContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(AutoscaleConditionParser.PeriodContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def WORD(self): @@ -554,12 +563,12 @@ def WORD(self): def getRuleIndex(self): return AutoscaleConditionParser.RULE_period - def enterRule(self, listener): - if hasattr(listener, "enterPeriod"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPeriod" ): listener.enterPeriod(self) - def exitRule(self, listener): - if hasattr(listener, "exitPeriod"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPeriod" ): listener.exitPeriod(self) @@ -583,9 +592,10 @@ def period(self): class WhereContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(AutoscaleConditionParser.WhereContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def WHERE(self): @@ -597,12 +607,12 @@ def WHITESPACE(self): def getRuleIndex(self): return AutoscaleConditionParser.RULE_where - def enterRule(self, listener): - if hasattr(listener, "enterWhere"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterWhere" ): listener.enterWhere(self) - def exitRule(self, listener): - if hasattr(listener, "exitWhere"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitWhere" ): listener.exitWhere(self) @@ -628,23 +638,24 @@ def where(self): class DimensionsContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(AutoscaleConditionParser.DimensionsContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def where(self): return self.getTypedRuleContext(AutoscaleConditionParser.WhereContext,0) - def dimension(self, i=None): + def dimension(self, i:int=None): if i is None: return self.getTypedRuleContexts(AutoscaleConditionParser.DimensionContext) else: return self.getTypedRuleContext(AutoscaleConditionParser.DimensionContext,i) - def dim_separator(self, i=None): + def dim_separator(self, i:int=None): if i is None: return self.getTypedRuleContexts(AutoscaleConditionParser.Dim_separatorContext) else: @@ -654,12 +665,12 @@ def dim_separator(self, i=None): def getRuleIndex(self): return AutoscaleConditionParser.RULE_dimensions - def enterRule(self, listener): - if hasattr(listener, "enterDimensions"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDimensions" ): listener.enterDimensions(self) - def exitRule(self, listener): - if hasattr(listener, "exitDimensions"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDimensions" ): listener.exitDimensions(self) @@ -698,9 +709,10 @@ def dimensions(self): class DimensionContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(AutoscaleConditionParser.DimensionContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def dim_name(self): @@ -718,12 +730,12 @@ def dim_values(self): def getRuleIndex(self): return AutoscaleConditionParser.RULE_dimension - def enterRule(self, listener): - if hasattr(listener, "enterDimension"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDimension" ): listener.enterDimension(self) - def exitRule(self, listener): - if hasattr(listener, "exitDimension"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDimension" ): listener.exitDimension(self) @@ -751,9 +763,10 @@ def dimension(self): class Dim_separatorContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(AutoscaleConditionParser.Dim_separatorContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def WHITESPACE(self): @@ -765,12 +778,12 @@ def AND(self): def getRuleIndex(self): return AutoscaleConditionParser.RULE_dim_separator - def enterRule(self, listener): - if hasattr(listener, "enterDim_separator"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDim_separator" ): listener.enterDim_separator(self) - def exitRule(self, listener): - if hasattr(listener, "exitDim_separator"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDim_separator" ): listener.exitDim_separator(self) @@ -802,9 +815,10 @@ def dim_separator(self): class Dim_operatorContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(AutoscaleConditionParser.Dim_operatorContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def WHITESPACE(self): @@ -813,12 +827,12 @@ def WHITESPACE(self): def getRuleIndex(self): return AutoscaleConditionParser.RULE_dim_operator - def enterRule(self, listener): - if hasattr(listener, "enterDim_operator"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDim_operator" ): listener.enterDim_operator(self) - def exitRule(self, listener): - if hasattr(listener, "exitDim_operator"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDim_operator" ): listener.exitDim_operator(self) @@ -850,9 +864,10 @@ def dim_operator(self): class Dim_val_separatorContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(AutoscaleConditionParser.Dim_val_separatorContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def WHITESPACE(self): @@ -864,12 +879,12 @@ def OR(self): def getRuleIndex(self): return AutoscaleConditionParser.RULE_dim_val_separator - def enterRule(self, listener): - if hasattr(listener, "enterDim_val_separator"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDim_val_separator" ): listener.enterDim_val_separator(self) - def exitRule(self, listener): - if hasattr(listener, "exitDim_val_separator"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDim_val_separator" ): listener.exitDim_val_separator(self) @@ -901,9 +916,10 @@ def dim_val_separator(self): class Dim_nameContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(AutoscaleConditionParser.Dim_nameContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def WORD(self): @@ -915,12 +931,12 @@ def WHITESPACE(self): def getRuleIndex(self): return AutoscaleConditionParser.RULE_dim_name - def enterRule(self, listener): - if hasattr(listener, "enterDim_name"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDim_name" ): listener.enterDim_name(self) - def exitRule(self, listener): - if hasattr(listener, "exitDim_name"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDim_name" ): listener.exitDim_name(self) @@ -946,19 +962,20 @@ def dim_name(self): class Dim_valuesContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(AutoscaleConditionParser.Dim_valuesContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser - def dim_value(self, i=None): + def dim_value(self, i:int=None): if i is None: return self.getTypedRuleContexts(AutoscaleConditionParser.Dim_valueContext) else: return self.getTypedRuleContext(AutoscaleConditionParser.Dim_valueContext,i) - def dim_val_separator(self, i=None): + def dim_val_separator(self, i:int=None): if i is None: return self.getTypedRuleContexts(AutoscaleConditionParser.Dim_val_separatorContext) else: @@ -968,12 +985,12 @@ def dim_val_separator(self, i=None): def getRuleIndex(self): return AutoscaleConditionParser.RULE_dim_values - def enterRule(self, listener): - if hasattr(listener, "enterDim_values"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDim_values" ): listener.enterDim_values(self) - def exitRule(self, listener): - if hasattr(listener, "exitDim_values"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDim_values" ): listener.exitDim_values(self) @@ -1010,24 +1027,25 @@ def dim_values(self): class Dim_valueContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(AutoscaleConditionParser.Dim_valueContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser - def NUMBER(self, i=None): + def NUMBER(self, i:int=None): if i is None: return self.getTokens(AutoscaleConditionParser.NUMBER) else: return self.getToken(AutoscaleConditionParser.NUMBER, i) - def WORD(self, i=None): + def WORD(self, i:int=None): if i is None: return self.getTokens(AutoscaleConditionParser.WORD) else: return self.getToken(AutoscaleConditionParser.WORD, i) - def WHITESPACE(self, i=None): + def WHITESPACE(self, i:int=None): if i is None: return self.getTokens(AutoscaleConditionParser.WHITESPACE) else: @@ -1036,12 +1054,12 @@ def WHITESPACE(self, i=None): def getRuleIndex(self): return AutoscaleConditionParser.RULE_dim_value - def enterRule(self, listener): - if hasattr(listener, "enterDim_value"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDim_value" ): listener.enterDim_value(self) - def exitRule(self, listener): - if hasattr(listener, "exitDim_value"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDim_value" ): listener.exitDim_value(self) diff --git a/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/README.md b/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/README.md index 84a6213324d..95d49afddd9 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/README.md +++ b/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/README.md @@ -8,11 +8,11 @@ To set up your system to be able to alter and regenerate the grammar code, see t The steps for Windows are replicated here: ``` -Download https://www.antlr.org/download/antlr-4.7.2-complete.jar. +Download https://www.antlr.org/download/antlr-4.9.3-complete.jar. Add antlr4-complete.jar to CLASSPATH, either: Permanently: Using System Properties dialog > Environment variables > Create or append to CLASSPATH variable Temporarily, at command line: -SET CLASSPATH=.;C:\Javalib\antlr4-complete.jar;%CLASSPATH% +SET CLASSPATH=.;C:\Javalib\antlr-4.9.3-complete.jar;%CLASSPATH% ``` You will likely also need to add the path to your JDK bin directory to your PATH. diff --git a/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/build_python.bat b/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/build_python.bat index 34a720ef9e9..e70e4c9ce67 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/build_python.bat +++ b/src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/build_python.bat @@ -1,3 +1,3 @@ echo off echo Building AutoscaleCondition -call antlr -Dlanguage=Python2 AutoscaleCondition.g4 +call antlr -Dlanguage=Python3 AutoscaleCondition.g4 diff --git a/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/MetricAlertConditionLexer.py b/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/MetricAlertConditionLexer.py index ed6fd8d86d4..539a4faa9a3 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/MetricAlertConditionLexer.py +++ b/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/MetricAlertConditionLexer.py @@ -2,147 +2,149 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -# Generated from MetricAlertCondition.g4 by ANTLR 4.7.2 +# Generated from AutoscaleCondition.g4 by ANTLR 4.9.3 # encoding: utf-8 # pylint: disable=all 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(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2") - buf.write(u"\36\u012f\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6") - buf.write(u"\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") - buf.write(u"\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t") - buf.write(u"\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27") - buf.write(u"\4\30\t\30\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4") - buf.write(u"\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t") - buf.write(u"#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4") - buf.write(u",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62") - buf.write(u"\4\63\t\63\4\64\t\64\4\65\t\65\3\2\3\2\3\3\3\3\3\4\3") - buf.write(u"\4\3\5\3\5\3\6\3\6\3\7\3\7\3\b\3\b\3\t\3\t\3\n\3\n\3") - buf.write(u"\13\3\13\3\f\3\f\3\r\3\r\3\16\3\16\3\17\3\17\3\20\3\20") - buf.write(u"\3\21\3\21\3\22\3\22\3\23\3\23\3\24\3\24\3\25\3\25\3") - buf.write(u"\26\3\26\3\27\3\27\3\30\3\30\3\31\3\31\3\32\3\32\3\33") - buf.write(u"\3\33\3\34\3\34\3\35\3\35\3\36\3\36\3\37\3\37\3 \3 \3") - buf.write(u"!\3!\3\"\3\"\3#\3#\3$\3$\3%\3%\3&\3&\3&\3&\3&\3&\3\'") - buf.write(u"\3\'\3\'\3\'\3(\3(\3(\3(\3(\3(\3(\3(\3(\3)\3)\3)\3)\3") - buf.write(u")\3)\3)\3)\3)\3*\3*\3*\3+\3+\3+\3+\3+\3+\3+\3+\3,\3,") - buf.write(u"\3,\3-\3-\3-\3-\3-\3-\3.\3.\3.\3.\3.\3/\3/\3/\3/\3/\3") - buf.write(u"/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3\60\3") - buf.write(u"\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\5\60") - buf.write(u"\u0109\n\60\3\61\6\61\u010c\n\61\r\61\16\61\u010d\3\61") - buf.write(u"\3\61\6\61\u0112\n\61\r\61\16\61\u0113\5\61\u0116\n\61") - buf.write(u"\3\62\3\62\3\63\6\63\u011b\n\63\r\63\16\63\u011c\3\64") - buf.write(u"\5\64\u0120\n\64\3\64\3\64\6\64\u0124\n\64\r\64\16\64") - buf.write(u"\u0125\3\65\3\65\3\65\3\65\6\65\u012c\n\65\r\65\16\65") - buf.write(u"\u012d\2\2\66\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13") - buf.write(u"\25\f\27\r\31\16\33\2\35\2\37\2!\2#\2%\2\'\2)\2+\2-\2") - buf.write(u"/\2\61\2\63\2\65\2\67\29\2;\2=\2?\2A\2C\2E\2G\2I\2K\17") - buf.write(u"M\20O\21Q\22S\23U\24W\25Y\26[\27]\30_\31a\32c\33e\34") - buf.write(u"g\35i\36\3\2\35\4\2CCcc\4\2EEee\4\2FFff\4\2GGgg\4\2H") - buf.write(u"Hhh\4\2JJjj\4\2KKkk\4\2MMmm\4\2NNnn\4\2OOoo\4\2PPpp\4") - buf.write(u"\2QQqq\4\2RRrr\4\2TTtt\4\2UUuu\4\2VVvv\4\2WWww\4\2XX") - buf.write(u"xx\4\2YYyy\4\2ZZzz\4\2[[{{\3\2\62;\3\2c|\3\2C\\\4\2.") - buf.write(u".\60\60\4\2$$))\4\2\13\13\"\"\2\u0127\2\3\3\2\2\2\2\5") - buf.write(u"\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") - buf.write(u"\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2") - buf.write(u"\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2") - buf.write(u"\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2") - buf.write(u"\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2") - buf.write(u"\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2\3k\3") - buf.write(u"\2\2\2\5m\3\2\2\2\7o\3\2\2\2\tq\3\2\2\2\13s\3\2\2\2\r") - buf.write(u"u\3\2\2\2\17w\3\2\2\2\21y\3\2\2\2\23{\3\2\2\2\25}\3\2") - buf.write(u"\2\2\27\177\3\2\2\2\31\u0081\3\2\2\2\33\u0083\3\2\2\2") - buf.write(u"\35\u0085\3\2\2\2\37\u0087\3\2\2\2!\u0089\3\2\2\2#\u008b") - buf.write(u"\3\2\2\2%\u008d\3\2\2\2\'\u008f\3\2\2\2)\u0091\3\2\2") - buf.write(u"\2+\u0093\3\2\2\2-\u0095\3\2\2\2/\u0097\3\2\2\2\61\u0099") - buf.write(u"\3\2\2\2\63\u009b\3\2\2\2\65\u009d\3\2\2\2\67\u009f\3") - buf.write(u"\2\2\29\u00a1\3\2\2\2;\u00a3\3\2\2\2=\u00a5\3\2\2\2?") - buf.write(u"\u00a7\3\2\2\2A\u00a9\3\2\2\2C\u00ab\3\2\2\2E\u00ad\3") - buf.write(u"\2\2\2G\u00af\3\2\2\2I\u00b1\3\2\2\2K\u00b3\3\2\2\2M") - buf.write(u"\u00b9\3\2\2\2O\u00bd\3\2\2\2Q\u00c6\3\2\2\2S\u00cf\3") - buf.write(u"\2\2\2U\u00d2\3\2\2\2W\u00da\3\2\2\2Y\u00dd\3\2\2\2[") - buf.write(u"\u00e3\3\2\2\2]\u00e8\3\2\2\2_\u0108\3\2\2\2a\u010b\3") - buf.write(u"\2\2\2c\u0117\3\2\2\2e\u011a\3\2\2\2g\u0123\3\2\2\2i") - buf.write(u"\u012b\3\2\2\2kl\7\60\2\2l\4\3\2\2\2mn\7\61\2\2n\6\3") - buf.write(u"\2\2\2op\7a\2\2p\b\3\2\2\2qr\7^\2\2r\n\3\2\2\2st\7<\2") - buf.write(u"\2t\f\3\2\2\2uv\7\'\2\2v\16\3\2\2\2wx\7/\2\2x\20\3\2") - buf.write(u"\2\2yz\7.\2\2z\22\3\2\2\2{|\7~\2\2|\24\3\2\2\2}~\7-\2") - buf.write(u"\2~\26\3\2\2\2\177\u0080\7,\2\2\u0080\30\3\2\2\2\u0081") - buf.write(u"\u0082\7\u0080\2\2\u0082\32\3\2\2\2\u0083\u0084\t\2\2") - buf.write(u"\2\u0084\34\3\2\2\2\u0085\u0086\t\3\2\2\u0086\36\3\2") - buf.write(u"\2\2\u0087\u0088\t\4\2\2\u0088 \3\2\2\2\u0089\u008a\t") - buf.write(u"\5\2\2\u008a\"\3\2\2\2\u008b\u008c\t\6\2\2\u008c$\3\2") - buf.write(u"\2\2\u008d\u008e\t\7\2\2\u008e&\3\2\2\2\u008f\u0090\t") - buf.write(u"\b\2\2\u0090(\3\2\2\2\u0091\u0092\t\t\2\2\u0092*\3\2") - buf.write(u"\2\2\u0093\u0094\t\n\2\2\u0094,\3\2\2\2\u0095\u0096\t") - buf.write(u"\13\2\2\u0096.\3\2\2\2\u0097\u0098\t\f\2\2\u0098\60\3") - buf.write(u"\2\2\2\u0099\u009a\t\r\2\2\u009a\62\3\2\2\2\u009b\u009c") - buf.write(u"\t\16\2\2\u009c\64\3\2\2\2\u009d\u009e\t\17\2\2\u009e") - buf.write(u"\66\3\2\2\2\u009f\u00a0\t\20\2\2\u00a08\3\2\2\2\u00a1") - buf.write(u"\u00a2\t\21\2\2\u00a2:\3\2\2\2\u00a3\u00a4\t\22\2\2\u00a4") - buf.write(u"<\3\2\2\2\u00a5\u00a6\t\23\2\2\u00a6>\3\2\2\2\u00a7\u00a8") - buf.write(u"\t\24\2\2\u00a8@\3\2\2\2\u00a9\u00aa\t\25\2\2\u00aaB") - buf.write(u"\3\2\2\2\u00ab\u00ac\t\26\2\2\u00acD\3\2\2\2\u00ad\u00ae") - buf.write(u"\t\27\2\2\u00aeF\3\2\2\2\u00af\u00b0\t\30\2\2\u00b0H") - buf.write(u"\3\2\2\2\u00b1\u00b2\t\31\2\2\u00b2J\3\2\2\2\u00b3\u00b4") - buf.write(u"\5? \2\u00b4\u00b5\5%\23\2\u00b5\u00b6\5!\21\2\u00b6") - buf.write(u"\u00b7\5\65\33\2\u00b7\u00b8\5!\21\2\u00b8L\3\2\2\2\u00b9") - buf.write(u"\u00ba\5\33\16\2\u00ba\u00bb\5/\30\2\u00bb\u00bc\5\37") - buf.write(u"\20\2\u00bcN\3\2\2\2\u00bd\u00be\5\'\24\2\u00be\u00bf") - buf.write(u"\5/\30\2\u00bf\u00c0\5\35\17\2\u00c0\u00c1\5+\26\2\u00c1") - buf.write(u"\u00c2\5;\36\2\u00c2\u00c3\5\37\20\2\u00c3\u00c4\5!\21") - buf.write(u"\2\u00c4\u00c5\5\67\34\2\u00c5P\3\2\2\2\u00c6\u00c7\5") - buf.write(u"!\21\2\u00c7\u00c8\5A!\2\u00c8\u00c9\5\35\17\2\u00c9") - buf.write(u"\u00ca\5+\26\2\u00ca\u00cb\5;\36\2\u00cb\u00cc\5\37\20") - buf.write(u"\2\u00cc\u00cd\5!\21\2\u00cd\u00ce\5\67\34\2\u00ceR\3") - buf.write(u"\2\2\2\u00cf\u00d0\5\61\31\2\u00d0\u00d1\5\65\33\2\u00d1") - buf.write(u"T\3\2\2\2\u00d2\u00d3\5\37\20\2\u00d3\u00d4\5C\"\2\u00d4") - buf.write(u"\u00d5\5/\30\2\u00d5\u00d6\5\33\16\2\u00d6\u00d7\5-\27") - buf.write(u"\2\u00d7\u00d8\5\'\24\2\u00d8\u00d9\5\35\17\2\u00d9V") - buf.write(u"\3\2\2\2\u00da\u00db\5\61\31\2\u00db\u00dc\5#\22\2\u00dc") - buf.write(u"X\3\2\2\2\u00dd\u00de\5\67\34\2\u00de\u00df\5\'\24\2") - buf.write(u"\u00df\u00e0\5/\30\2\u00e0\u00e1\5\35\17\2\u00e1\u00e2") - buf.write(u"\5!\21\2\u00e2Z\3\2\2\2\u00e3\u00e4\5? \2\u00e4\u00e5") - buf.write(u"\5\'\24\2\u00e5\u00e6\59\35\2\u00e6\u00e7\5%\23\2\u00e7") - buf.write(u"\\\3\2\2\2\u00e8\u00e9\5\67\34\2\u00e9\u00ea\5)\25\2") - buf.write(u"\u00ea\u00eb\5\'\24\2\u00eb\u00ec\5\63\32\2\u00ec\u00ed") - buf.write(u"\5-\27\2\u00ed\u00ee\5!\21\2\u00ee\u00ef\59\35\2\u00ef") - buf.write(u"\u00f0\5\65\33\2\u00f0\u00f1\5\'\24\2\u00f1\u00f2\5\35") - buf.write(u"\17\2\u00f2\u00f3\5=\37\2\u00f3\u00f4\5\33\16\2\u00f4") - buf.write(u"\u00f5\5+\26\2\u00f5\u00f6\5\'\24\2\u00f6\u00f7\5\37") - buf.write(u"\20\2\u00f7\u00f8\5\33\16\2\u00f8\u00f9\59\35\2\u00f9") - buf.write(u"\u00fa\5\'\24\2\u00fa\u00fb\5\61\31\2\u00fb\u00fc\5/") - buf.write(u"\30\2\u00fc^\3\2\2\2\u00fd\u0109\7>\2\2\u00fe\u00ff\7") - buf.write(u">\2\2\u00ff\u0109\7?\2\2\u0100\u0109\7?\2\2\u0101\u0102") - buf.write(u"\7@\2\2\u0102\u0109\7?\2\2\u0103\u0109\7@\2\2\u0104\u0105") - buf.write(u"\7#\2\2\u0105\u0109\7?\2\2\u0106\u0107\7@\2\2\u0107\u0109") - buf.write(u"\7>\2\2\u0108\u00fd\3\2\2\2\u0108\u00fe\3\2\2\2\u0108") - buf.write(u"\u0100\3\2\2\2\u0108\u0101\3\2\2\2\u0108\u0103\3\2\2") - buf.write(u"\2\u0108\u0104\3\2\2\2\u0108\u0106\3\2\2\2\u0109`\3\2") - buf.write(u"\2\2\u010a\u010c\5E#\2\u010b\u010a\3\2\2\2\u010c\u010d") - buf.write(u"\3\2\2\2\u010d\u010b\3\2\2\2\u010d\u010e\3\2\2\2\u010e") - buf.write(u"\u0115\3\2\2\2\u010f\u0111\t\32\2\2\u0110\u0112\5E#\2") - buf.write(u"\u0111\u0110\3\2\2\2\u0112\u0113\3\2\2\2\u0113\u0111") - buf.write(u"\3\2\2\2\u0113\u0114\3\2\2\2\u0114\u0116\3\2\2\2\u0115") - buf.write(u"\u010f\3\2\2\2\u0115\u0116\3\2\2\2\u0116b\3\2\2\2\u0117") - buf.write(u"\u0118\t\33\2\2\u0118d\3\2\2\2\u0119\u011b\t\34\2\2\u011a") - buf.write(u"\u0119\3\2\2\2\u011b\u011c\3\2\2\2\u011c\u011a\3\2\2") - buf.write(u"\2\u011c\u011d\3\2\2\2\u011df\3\2\2\2\u011e\u0120\7\17") - buf.write(u"\2\2\u011f\u011e\3\2\2\2\u011f\u0120\3\2\2\2\u0120\u0121") - buf.write(u"\3\2\2\2\u0121\u0124\7\f\2\2\u0122\u0124\7\17\2\2\u0123") - buf.write(u"\u011f\3\2\2\2\u0123\u0122\3\2\2\2\u0124\u0125\3\2\2") - buf.write(u"\2\u0125\u0123\3\2\2\2\u0125\u0126\3\2\2\2\u0126h\3\2") - buf.write(u"\2\2\u0127\u012c\5G$\2\u0128\u012c\5I%\2\u0129\u012c") - buf.write(u"\5E#\2\u012a\u012c\7a\2\2\u012b\u0127\3\2\2\2\u012b\u0128") - buf.write(u"\3\2\2\2\u012b\u0129\3\2\2\2\u012b\u012a\3\2\2\2\u012c") - buf.write(u"\u012d\3\2\2\2\u012d\u012b\3\2\2\2\u012d\u012e\3\2\2") - buf.write(u"\2\u012ej\3\2\2\2\r\2\u0108\u010d\u0113\u0115\u011c\u011f") - buf.write(u"\u0123\u0125\u012b\u012d\2") + buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\36") + buf.write("\u012f\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\4\34\t\34\4\35\t\35\4\36") + buf.write("\t\36\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%") + buf.write("\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4,\t,\4-\t-\4.") + buf.write("\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64") + buf.write("\t\64\4\65\t\65\3\2\3\2\3\3\3\3\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\f\3\f\3") + buf.write("\r\3\r\3\16\3\16\3\17\3\17\3\20\3\20\3\21\3\21\3\22\3") + buf.write("\22\3\23\3\23\3\24\3\24\3\25\3\25\3\26\3\26\3\27\3\27") + buf.write("\3\30\3\30\3\31\3\31\3\32\3\32\3\33\3\33\3\34\3\34\3\35") + buf.write("\3\35\3\36\3\36\3\37\3\37\3 \3 \3!\3!\3\"\3\"\3#\3#\3") + buf.write("$\3$\3%\3%\3&\3&\3&\3&\3&\3&\3\'\3\'\3\'\3\'\3(\3(\3(") + buf.write("\3(\3(\3(\3(\3(\3(\3)\3)\3)\3)\3)\3)\3)\3)\3)\3*\3*\3") + buf.write("*\3+\3+\3+\3+\3+\3+\3+\3+\3,\3,\3,\3-\3-\3-\3-\3-\3-\3") + buf.write(".\3.\3.\3.\3.\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3") + buf.write("/\3/\3/\3/\3/\3/\3/\3/\3\60\3\60\3\60\3\60\3\60\3\60\3") + buf.write("\60\3\60\3\60\3\60\3\60\5\60\u0109\n\60\3\61\6\61\u010c") + buf.write("\n\61\r\61\16\61\u010d\3\61\3\61\6\61\u0112\n\61\r\61") + buf.write("\16\61\u0113\5\61\u0116\n\61\3\62\3\62\3\63\6\63\u011b") + buf.write("\n\63\r\63\16\63\u011c\3\64\5\64\u0120\n\64\3\64\3\64") + buf.write("\6\64\u0124\n\64\r\64\16\64\u0125\3\65\3\65\3\65\3\65") + buf.write("\6\65\u012c\n\65\r\65\16\65\u012d\2\2\66\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\2\35\2") + buf.write("\37\2!\2#\2%\2\'\2)\2+\2-\2/\2\61\2\63\2\65\2\67\29\2") + buf.write(";\2=\2?\2A\2C\2E\2G\2I\2K\17M\20O\21Q\22S\23U\24W\25Y") + buf.write("\26[\27]\30_\31a\32c\33e\34g\35i\36\3\2\35\4\2CCcc\4\2") + buf.write("EEee\4\2FFff\4\2GGgg\4\2HHhh\4\2JJjj\4\2KKkk\4\2MMmm\4") + buf.write("\2NNnn\4\2OOoo\4\2PPpp\4\2QQqq\4\2RRrr\4\2TTtt\4\2UUu") + buf.write("u\4\2VVvv\4\2WWww\4\2XXxx\4\2YYyy\4\2ZZzz\4\2[[{{\3\2") + buf.write("\62;\3\2c|\3\2C\\\4\2..\60\60\4\2$$))\4\2\13\13\"\"\2") + buf.write("\u0127\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2") + buf.write("\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") + buf.write("\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2K") + buf.write("\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") + buf.write("U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2") + buf.write("\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2") + buf.write("\2\2i\3\2\2\2\3k\3\2\2\2\5m\3\2\2\2\7o\3\2\2\2\tq\3\2") + buf.write("\2\2\13s\3\2\2\2\ru\3\2\2\2\17w\3\2\2\2\21y\3\2\2\2\23") + buf.write("{\3\2\2\2\25}\3\2\2\2\27\177\3\2\2\2\31\u0081\3\2\2\2") + buf.write("\33\u0083\3\2\2\2\35\u0085\3\2\2\2\37\u0087\3\2\2\2!\u0089") + buf.write("\3\2\2\2#\u008b\3\2\2\2%\u008d\3\2\2\2\'\u008f\3\2\2\2") + buf.write(")\u0091\3\2\2\2+\u0093\3\2\2\2-\u0095\3\2\2\2/\u0097\3") + buf.write("\2\2\2\61\u0099\3\2\2\2\63\u009b\3\2\2\2\65\u009d\3\2") + buf.write("\2\2\67\u009f\3\2\2\29\u00a1\3\2\2\2;\u00a3\3\2\2\2=\u00a5") + buf.write("\3\2\2\2?\u00a7\3\2\2\2A\u00a9\3\2\2\2C\u00ab\3\2\2\2") + buf.write("E\u00ad\3\2\2\2G\u00af\3\2\2\2I\u00b1\3\2\2\2K\u00b3\3") + buf.write("\2\2\2M\u00b9\3\2\2\2O\u00bd\3\2\2\2Q\u00c6\3\2\2\2S\u00cf") + buf.write("\3\2\2\2U\u00d2\3\2\2\2W\u00da\3\2\2\2Y\u00dd\3\2\2\2") + buf.write("[\u00e3\3\2\2\2]\u00e8\3\2\2\2_\u0108\3\2\2\2a\u010b\3") + buf.write("\2\2\2c\u0117\3\2\2\2e\u011a\3\2\2\2g\u0123\3\2\2\2i\u012b") + buf.write("\3\2\2\2kl\7\60\2\2l\4\3\2\2\2mn\7\61\2\2n\6\3\2\2\2o") + buf.write("p\7a\2\2p\b\3\2\2\2qr\7^\2\2r\n\3\2\2\2st\7<\2\2t\f\3") + buf.write("\2\2\2uv\7\'\2\2v\16\3\2\2\2wx\7/\2\2x\20\3\2\2\2yz\7") + buf.write(".\2\2z\22\3\2\2\2{|\7~\2\2|\24\3\2\2\2}~\7-\2\2~\26\3") + buf.write("\2\2\2\177\u0080\7,\2\2\u0080\30\3\2\2\2\u0081\u0082\7") + buf.write("\u0080\2\2\u0082\32\3\2\2\2\u0083\u0084\t\2\2\2\u0084") + buf.write("\34\3\2\2\2\u0085\u0086\t\3\2\2\u0086\36\3\2\2\2\u0087") + buf.write("\u0088\t\4\2\2\u0088 \3\2\2\2\u0089\u008a\t\5\2\2\u008a") + buf.write("\"\3\2\2\2\u008b\u008c\t\6\2\2\u008c$\3\2\2\2\u008d\u008e") + buf.write("\t\7\2\2\u008e&\3\2\2\2\u008f\u0090\t\b\2\2\u0090(\3\2") + buf.write("\2\2\u0091\u0092\t\t\2\2\u0092*\3\2\2\2\u0093\u0094\t") + buf.write("\n\2\2\u0094,\3\2\2\2\u0095\u0096\t\13\2\2\u0096.\3\2") + buf.write("\2\2\u0097\u0098\t\f\2\2\u0098\60\3\2\2\2\u0099\u009a") + buf.write("\t\r\2\2\u009a\62\3\2\2\2\u009b\u009c\t\16\2\2\u009c\64") + buf.write("\3\2\2\2\u009d\u009e\t\17\2\2\u009e\66\3\2\2\2\u009f\u00a0") + buf.write("\t\20\2\2\u00a08\3\2\2\2\u00a1\u00a2\t\21\2\2\u00a2:\3") + buf.write("\2\2\2\u00a3\u00a4\t\22\2\2\u00a4<\3\2\2\2\u00a5\u00a6") + buf.write("\t\23\2\2\u00a6>\3\2\2\2\u00a7\u00a8\t\24\2\2\u00a8@\3") + buf.write("\2\2\2\u00a9\u00aa\t\25\2\2\u00aaB\3\2\2\2\u00ab\u00ac") + buf.write("\t\26\2\2\u00acD\3\2\2\2\u00ad\u00ae\t\27\2\2\u00aeF\3") + buf.write("\2\2\2\u00af\u00b0\t\30\2\2\u00b0H\3\2\2\2\u00b1\u00b2") + buf.write("\t\31\2\2\u00b2J\3\2\2\2\u00b3\u00b4\5? \2\u00b4\u00b5") + buf.write("\5%\23\2\u00b5\u00b6\5!\21\2\u00b6\u00b7\5\65\33\2\u00b7") + buf.write("\u00b8\5!\21\2\u00b8L\3\2\2\2\u00b9\u00ba\5\33\16\2\u00ba") + buf.write("\u00bb\5/\30\2\u00bb\u00bc\5\37\20\2\u00bcN\3\2\2\2\u00bd") + buf.write("\u00be\5\'\24\2\u00be\u00bf\5/\30\2\u00bf\u00c0\5\35\17") + buf.write("\2\u00c0\u00c1\5+\26\2\u00c1\u00c2\5;\36\2\u00c2\u00c3") + buf.write("\5\37\20\2\u00c3\u00c4\5!\21\2\u00c4\u00c5\5\67\34\2\u00c5") + buf.write("P\3\2\2\2\u00c6\u00c7\5!\21\2\u00c7\u00c8\5A!\2\u00c8") + buf.write("\u00c9\5\35\17\2\u00c9\u00ca\5+\26\2\u00ca\u00cb\5;\36") + buf.write("\2\u00cb\u00cc\5\37\20\2\u00cc\u00cd\5!\21\2\u00cd\u00ce") + buf.write("\5\67\34\2\u00ceR\3\2\2\2\u00cf\u00d0\5\61\31\2\u00d0") + buf.write("\u00d1\5\65\33\2\u00d1T\3\2\2\2\u00d2\u00d3\5\37\20\2") + buf.write("\u00d3\u00d4\5C\"\2\u00d4\u00d5\5/\30\2\u00d5\u00d6\5") + buf.write("\33\16\2\u00d6\u00d7\5-\27\2\u00d7\u00d8\5\'\24\2\u00d8") + buf.write("\u00d9\5\35\17\2\u00d9V\3\2\2\2\u00da\u00db\5\61\31\2") + buf.write("\u00db\u00dc\5#\22\2\u00dcX\3\2\2\2\u00dd\u00de\5\67\34") + buf.write("\2\u00de\u00df\5\'\24\2\u00df\u00e0\5/\30\2\u00e0\u00e1") + buf.write("\5\35\17\2\u00e1\u00e2\5!\21\2\u00e2Z\3\2\2\2\u00e3\u00e4") + buf.write("\5? \2\u00e4\u00e5\5\'\24\2\u00e5\u00e6\59\35\2\u00e6") + buf.write("\u00e7\5%\23\2\u00e7\\\3\2\2\2\u00e8\u00e9\5\67\34\2\u00e9") + buf.write("\u00ea\5)\25\2\u00ea\u00eb\5\'\24\2\u00eb\u00ec\5\63\32") + buf.write("\2\u00ec\u00ed\5-\27\2\u00ed\u00ee\5!\21\2\u00ee\u00ef") + buf.write("\59\35\2\u00ef\u00f0\5\65\33\2\u00f0\u00f1\5\'\24\2\u00f1") + buf.write("\u00f2\5\35\17\2\u00f2\u00f3\5=\37\2\u00f3\u00f4\5\33") + buf.write("\16\2\u00f4\u00f5\5+\26\2\u00f5\u00f6\5\'\24\2\u00f6\u00f7") + buf.write("\5\37\20\2\u00f7\u00f8\5\33\16\2\u00f8\u00f9\59\35\2\u00f9") + buf.write("\u00fa\5\'\24\2\u00fa\u00fb\5\61\31\2\u00fb\u00fc\5/\30") + buf.write("\2\u00fc^\3\2\2\2\u00fd\u0109\7>\2\2\u00fe\u00ff\7>\2") + buf.write("\2\u00ff\u0109\7?\2\2\u0100\u0109\7?\2\2\u0101\u0102\7") + buf.write("@\2\2\u0102\u0109\7?\2\2\u0103\u0109\7@\2\2\u0104\u0105") + buf.write("\7#\2\2\u0105\u0109\7?\2\2\u0106\u0107\7@\2\2\u0107\u0109") + buf.write("\7>\2\2\u0108\u00fd\3\2\2\2\u0108\u00fe\3\2\2\2\u0108") + buf.write("\u0100\3\2\2\2\u0108\u0101\3\2\2\2\u0108\u0103\3\2\2\2") + buf.write("\u0108\u0104\3\2\2\2\u0108\u0106\3\2\2\2\u0109`\3\2\2") + buf.write("\2\u010a\u010c\5E#\2\u010b\u010a\3\2\2\2\u010c\u010d\3") + buf.write("\2\2\2\u010d\u010b\3\2\2\2\u010d\u010e\3\2\2\2\u010e\u0115") + buf.write("\3\2\2\2\u010f\u0111\t\32\2\2\u0110\u0112\5E#\2\u0111") + buf.write("\u0110\3\2\2\2\u0112\u0113\3\2\2\2\u0113\u0111\3\2\2\2") + buf.write("\u0113\u0114\3\2\2\2\u0114\u0116\3\2\2\2\u0115\u010f\3") + buf.write("\2\2\2\u0115\u0116\3\2\2\2\u0116b\3\2\2\2\u0117\u0118") + buf.write("\t\33\2\2\u0118d\3\2\2\2\u0119\u011b\t\34\2\2\u011a\u0119") + buf.write("\3\2\2\2\u011b\u011c\3\2\2\2\u011c\u011a\3\2\2\2\u011c") + buf.write("\u011d\3\2\2\2\u011df\3\2\2\2\u011e\u0120\7\17\2\2\u011f") + buf.write("\u011e\3\2\2\2\u011f\u0120\3\2\2\2\u0120\u0121\3\2\2\2") + buf.write("\u0121\u0124\7\f\2\2\u0122\u0124\7\17\2\2\u0123\u011f") + buf.write("\3\2\2\2\u0123\u0122\3\2\2\2\u0124\u0125\3\2\2\2\u0125") + buf.write("\u0123\3\2\2\2\u0125\u0126\3\2\2\2\u0126h\3\2\2\2\u0127") + buf.write("\u012c\5G$\2\u0128\u012c\5I%\2\u0129\u012c\5E#\2\u012a") + buf.write("\u012c\7a\2\2\u012b\u0127\3\2\2\2\u012b\u0128\3\2\2\2") + buf.write("\u012b\u0129\3\2\2\2\u012b\u012a\3\2\2\2\u012c\u012d\3") + buf.write("\2\2\2\u012d\u012b\3\2\2\2\u012d\u012e\3\2\2\2\u012ej") + buf.write("\3\2\2\2\r\2\u0108\u010d\u0113\u0115\u011c\u011f\u0123") + buf.write("\u0125\u012b\u012d\2") return buf.getvalue() @@ -183,31 +185,31 @@ class MetricAlertConditionLexer(Lexer): channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ] - modeNames = [ u"DEFAULT_MODE" ] + modeNames = [ "DEFAULT_MODE" ] - literalNames = [ u"", - u"'.'", u"'/'", u"'_'", u"'\\'", u"':'", u"'%'", u"'-'", u"','", - u"'|'", u"'+'", u"'*'", u"'~'" ] + literalNames = [ "", + "'.'", "'/'", "'_'", "'\\'", "':'", "'%'", "'-'", "','", "'|'", + "'+'", "'*'", "'~'" ] - symbolicNames = [ u"", - u"WHERE", u"AND", u"INCLUDES", u"EXCLUDES", u"OR", u"DYNAMIC", - u"OF", u"SINCE", u"WITH", u"SKIPMETRICVALIDATION", u"OPERATOR", - u"NUMBER", u"QUOTE", u"WHITESPACE", u"NEWLINE", u"WORD" ] + symbolicNames = [ "", + "WHERE", "AND", "INCLUDES", "EXCLUDES", "OR", "DYNAMIC", "OF", + "SINCE", "WITH", "SKIPMETRICVALIDATION", "OPERATOR", "NUMBER", + "QUOTE", "WHITESPACE", "NEWLINE", "WORD" ] - ruleNames = [ u"T__0", u"T__1", u"T__2", u"T__3", u"T__4", u"T__5", - u"T__6", u"T__7", u"T__8", u"T__9", u"T__10", u"T__11", - u"A", u"C", u"D", u"E", u"F", u"H", u"I", u"K", u"L", - u"M", u"N", u"O", u"P", u"R", u"S", u"T", u"U", u"V", - u"W", u"X", u"Y", u"DIGIT", u"LOWERCASE", u"UPPERCASE", - u"WHERE", u"AND", u"INCLUDES", u"EXCLUDES", u"OR", u"DYNAMIC", - u"OF", u"SINCE", u"WITH", u"SKIPMETRICVALIDATION", u"OPERATOR", - u"NUMBER", u"QUOTE", u"WHITESPACE", u"NEWLINE", u"WORD" ] + 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", "A", "C", "D", + "E", "F", "H", "I", "K", "L", "M", "N", "O", "P", "R", + "S", "T", "U", "V", "W", "X", "Y", "DIGIT", "LOWERCASE", + "UPPERCASE", "WHERE", "AND", "INCLUDES", "EXCLUDES", "OR", + "DYNAMIC", "OF", "SINCE", "WITH", "SKIPMETRICVALIDATION", + "OPERATOR", "NUMBER", "QUOTE", "WHITESPACE", "NEWLINE", + "WORD" ] - grammarFileName = u"MetricAlertCondition.g4" + grammarFileName = "MetricAlertCondition.g4" - def __init__(self, input=None, output=sys.stdout): - super(MetricAlertConditionLexer, self).__init__(input, output=output) - self.checkVersion("4.7.2") + def __init__(self, input=None, output:TextIO = sys.stdout): + super().__init__(input, output) + self.checkVersion("4.9.3") self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache()) self._actions = None self._predicates = None diff --git a/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/MetricAlertConditionListener.py b/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/MetricAlertConditionListener.py index ede7431cf48..2f2d1c1bf54 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/MetricAlertConditionListener.py +++ b/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/MetricAlertConditionListener.py @@ -2,245 +2,251 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -# Generated from MetricAlertCondition.g4 by ANTLR 4.7.2 +# Generated from AutoscaleCondition.g4 by ANTLR 4.9.3 # encoding: utf-8 # pylint: disable=all from antlr4 import * +if __name__ is not None and "." in __name__: + from .MetricAlertConditionParser import MetricAlertConditionParser +else: + from MetricAlertConditionParser import MetricAlertConditionParser # This class defines a complete listener for a parse tree produced by MetricAlertConditionParser. class MetricAlertConditionListener(ParseTreeListener): # Enter a parse tree produced by MetricAlertConditionParser#expression. - def enterExpression(self, ctx): + def enterExpression(self, ctx:MetricAlertConditionParser.ExpressionContext): pass # Exit a parse tree produced by MetricAlertConditionParser#expression. - def exitExpression(self, ctx): + def exitExpression(self, ctx:MetricAlertConditionParser.ExpressionContext): pass # Enter a parse tree produced by MetricAlertConditionParser#aggregation. - def enterAggregation(self, ctx): + def enterAggregation(self, ctx:MetricAlertConditionParser.AggregationContext): pass # Exit a parse tree produced by MetricAlertConditionParser#aggregation. - def exitAggregation(self, ctx): + def exitAggregation(self, ctx:MetricAlertConditionParser.AggregationContext): pass # Enter a parse tree produced by MetricAlertConditionParser#namespace. - def enterNamespace(self, ctx): + def enterNamespace(self, ctx:MetricAlertConditionParser.NamespaceContext): pass # Exit a parse tree produced by MetricAlertConditionParser#namespace. - def exitNamespace(self, ctx): + def exitNamespace(self, ctx:MetricAlertConditionParser.NamespaceContext): pass # Enter a parse tree produced by MetricAlertConditionParser#metric. - def enterMetric(self, ctx): + def enterMetric(self, ctx:MetricAlertConditionParser.MetricContext): pass # Exit a parse tree produced by MetricAlertConditionParser#metric. - def exitMetric(self, ctx): + def exitMetric(self, ctx:MetricAlertConditionParser.MetricContext): pass # Enter a parse tree produced by MetricAlertConditionParser#operator. - def enterOperator(self, ctx): + def enterOperator(self, ctx:MetricAlertConditionParser.OperatorContext): pass # Exit a parse tree produced by MetricAlertConditionParser#operator. - def exitOperator(self, ctx): + def exitOperator(self, ctx:MetricAlertConditionParser.OperatorContext): pass # Enter a parse tree produced by MetricAlertConditionParser#threshold. - def enterThreshold(self, ctx): + def enterThreshold(self, ctx:MetricAlertConditionParser.ThresholdContext): pass # Exit a parse tree produced by MetricAlertConditionParser#threshold. - def exitThreshold(self, ctx): + def exitThreshold(self, ctx:MetricAlertConditionParser.ThresholdContext): pass # Enter a parse tree produced by MetricAlertConditionParser#dynamic. - def enterDynamic(self, ctx): + def enterDynamic(self, ctx:MetricAlertConditionParser.DynamicContext): pass # Exit a parse tree produced by MetricAlertConditionParser#dynamic. - def exitDynamic(self, ctx): + def exitDynamic(self, ctx:MetricAlertConditionParser.DynamicContext): pass # Enter a parse tree produced by MetricAlertConditionParser#dynamics. - def enterDynamics(self, ctx): + def enterDynamics(self, ctx:MetricAlertConditionParser.DynamicsContext): pass # Exit a parse tree produced by MetricAlertConditionParser#dynamics. - def exitDynamics(self, ctx): + def exitDynamics(self, ctx:MetricAlertConditionParser.DynamicsContext): pass # Enter a parse tree produced by MetricAlertConditionParser#dyn_sensitivity. - def enterDyn_sensitivity(self, ctx): + def enterDyn_sensitivity(self, ctx:MetricAlertConditionParser.Dyn_sensitivityContext): pass # Exit a parse tree produced by MetricAlertConditionParser#dyn_sensitivity. - def exitDyn_sensitivity(self, ctx): + def exitDyn_sensitivity(self, ctx:MetricAlertConditionParser.Dyn_sensitivityContext): pass # Enter a parse tree produced by MetricAlertConditionParser#dyn_violations. - def enterDyn_violations(self, ctx): + def enterDyn_violations(self, ctx:MetricAlertConditionParser.Dyn_violationsContext): pass # Exit a parse tree produced by MetricAlertConditionParser#dyn_violations. - def exitDyn_violations(self, ctx): + def exitDyn_violations(self, ctx:MetricAlertConditionParser.Dyn_violationsContext): pass # Enter a parse tree produced by MetricAlertConditionParser#dyn_of_separator. - def enterDyn_of_separator(self, ctx): + def enterDyn_of_separator(self, ctx:MetricAlertConditionParser.Dyn_of_separatorContext): pass # Exit a parse tree produced by MetricAlertConditionParser#dyn_of_separator. - def exitDyn_of_separator(self, ctx): + def exitDyn_of_separator(self, ctx:MetricAlertConditionParser.Dyn_of_separatorContext): pass # Enter a parse tree produced by MetricAlertConditionParser#dyn_windows. - def enterDyn_windows(self, ctx): + def enterDyn_windows(self, ctx:MetricAlertConditionParser.Dyn_windowsContext): pass # Exit a parse tree produced by MetricAlertConditionParser#dyn_windows. - def exitDyn_windows(self, ctx): + def exitDyn_windows(self, ctx:MetricAlertConditionParser.Dyn_windowsContext): pass # Enter a parse tree produced by MetricAlertConditionParser#dyn_since_seperator. - def enterDyn_since_seperator(self, ctx): + def enterDyn_since_seperator(self, ctx:MetricAlertConditionParser.Dyn_since_seperatorContext): pass # Exit a parse tree produced by MetricAlertConditionParser#dyn_since_seperator. - def exitDyn_since_seperator(self, ctx): + def exitDyn_since_seperator(self, ctx:MetricAlertConditionParser.Dyn_since_seperatorContext): pass # Enter a parse tree produced by MetricAlertConditionParser#dyn_datetime. - def enterDyn_datetime(self, ctx): + def enterDyn_datetime(self, ctx:MetricAlertConditionParser.Dyn_datetimeContext): pass # Exit a parse tree produced by MetricAlertConditionParser#dyn_datetime. - def exitDyn_datetime(self, ctx): + def exitDyn_datetime(self, ctx:MetricAlertConditionParser.Dyn_datetimeContext): pass # Enter a parse tree produced by MetricAlertConditionParser#where. - def enterWhere(self, ctx): + def enterWhere(self, ctx:MetricAlertConditionParser.WhereContext): pass # Exit a parse tree produced by MetricAlertConditionParser#where. - def exitWhere(self, ctx): + def exitWhere(self, ctx:MetricAlertConditionParser.WhereContext): pass # Enter a parse tree produced by MetricAlertConditionParser#dimensions. - def enterDimensions(self, ctx): + def enterDimensions(self, ctx:MetricAlertConditionParser.DimensionsContext): pass # Exit a parse tree produced by MetricAlertConditionParser#dimensions. - def exitDimensions(self, ctx): + def exitDimensions(self, ctx:MetricAlertConditionParser.DimensionsContext): pass # Enter a parse tree produced by MetricAlertConditionParser#dimension. - def enterDimension(self, ctx): + def enterDimension(self, ctx:MetricAlertConditionParser.DimensionContext): pass # Exit a parse tree produced by MetricAlertConditionParser#dimension. - def exitDimension(self, ctx): + def exitDimension(self, ctx:MetricAlertConditionParser.DimensionContext): pass # Enter a parse tree produced by MetricAlertConditionParser#dim_separator. - def enterDim_separator(self, ctx): + def enterDim_separator(self, ctx:MetricAlertConditionParser.Dim_separatorContext): pass # Exit a parse tree produced by MetricAlertConditionParser#dim_separator. - def exitDim_separator(self, ctx): + def exitDim_separator(self, ctx:MetricAlertConditionParser.Dim_separatorContext): pass # Enter a parse tree produced by MetricAlertConditionParser#dim_operator. - def enterDim_operator(self, ctx): + def enterDim_operator(self, ctx:MetricAlertConditionParser.Dim_operatorContext): pass # Exit a parse tree produced by MetricAlertConditionParser#dim_operator. - def exitDim_operator(self, ctx): + def exitDim_operator(self, ctx:MetricAlertConditionParser.Dim_operatorContext): pass # Enter a parse tree produced by MetricAlertConditionParser#dim_val_separator. - def enterDim_val_separator(self, ctx): + def enterDim_val_separator(self, ctx:MetricAlertConditionParser.Dim_val_separatorContext): pass # Exit a parse tree produced by MetricAlertConditionParser#dim_val_separator. - def exitDim_val_separator(self, ctx): + def exitDim_val_separator(self, ctx:MetricAlertConditionParser.Dim_val_separatorContext): pass # Enter a parse tree produced by MetricAlertConditionParser#dim_name. - def enterDim_name(self, ctx): + def enterDim_name(self, ctx:MetricAlertConditionParser.Dim_nameContext): pass # Exit a parse tree produced by MetricAlertConditionParser#dim_name. - def exitDim_name(self, ctx): + def exitDim_name(self, ctx:MetricAlertConditionParser.Dim_nameContext): pass # Enter a parse tree produced by MetricAlertConditionParser#dim_values. - def enterDim_values(self, ctx): + def enterDim_values(self, ctx:MetricAlertConditionParser.Dim_valuesContext): pass # Exit a parse tree produced by MetricAlertConditionParser#dim_values. - def exitDim_values(self, ctx): + def exitDim_values(self, ctx:MetricAlertConditionParser.Dim_valuesContext): pass # Enter a parse tree produced by MetricAlertConditionParser#dim_value. - def enterDim_value(self, ctx): + def enterDim_value(self, ctx:MetricAlertConditionParser.Dim_valueContext): pass # Exit a parse tree produced by MetricAlertConditionParser#dim_value. - def exitDim_value(self, ctx): + def exitDim_value(self, ctx:MetricAlertConditionParser.Dim_valueContext): pass # Enter a parse tree produced by MetricAlertConditionParser#options_. - def enterOptions_(self, ctx): + def enterOptions_(self, ctx:MetricAlertConditionParser.Options_Context): pass # Exit a parse tree produced by MetricAlertConditionParser#options_. - def exitOptions_(self, ctx): + def exitOptions_(self, ctx:MetricAlertConditionParser.Options_Context): pass # Enter a parse tree produced by MetricAlertConditionParser#with_. - def enterWith_(self, ctx): + def enterWith_(self, ctx:MetricAlertConditionParser.With_Context): pass # Exit a parse tree produced by MetricAlertConditionParser#with_. - def exitWith_(self, ctx): + def exitWith_(self, ctx:MetricAlertConditionParser.With_Context): pass # Enter a parse tree produced by MetricAlertConditionParser#option. - def enterOption(self, ctx): + def enterOption(self, ctx:MetricAlertConditionParser.OptionContext): pass # Exit a parse tree produced by MetricAlertConditionParser#option. - def exitOption(self, ctx): + def exitOption(self, ctx:MetricAlertConditionParser.OptionContext): pass + +del MetricAlertConditionParser \ No newline at end of file diff --git a/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/MetricAlertConditionParser.py b/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/MetricAlertConditionParser.py index e03f2668aca..dff8dc70634 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/MetricAlertConditionParser.py +++ b/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/MetricAlertConditionParser.py @@ -2,92 +2,94 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -# Generated from MetricAlertCondition.g4 by ANTLR 4.7.2 +# Generated from AutoscaleCondition.g4 by ANTLR 4.9.3 # encoding: utf-8 # pylint: disable=all 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(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3") - buf.write(u"\36\u00c7\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7") - buf.write(u"\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") - buf.write(u"\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22") - buf.write(u"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4") - buf.write(u"\30\t\30\4\31\t\31\4\32\t\32\4\33\t\33\3\2\3\2\3\2\3") - buf.write(u"\2\7\2;\n\2\f\2\16\2>\13\2\3\2\3\2\3\2\3\2\3\2\3\2\5") - buf.write(u"\2F\n\2\3\2\3\2\3\2\5\2K\n\2\3\2\3\2\7\2O\n\2\f\2\16") - buf.write(u"\2R\13\2\3\2\3\2\5\2V\n\2\3\2\7\2Y\n\2\f\2\16\2\\\13") - buf.write(u"\2\3\3\3\3\3\3\3\4\6\4b\n\4\r\4\16\4c\3\5\6\5g\n\5\r") - buf.write(u"\5\16\5h\3\6\3\6\3\6\3\7\3\7\3\b\3\b\3\b\3\t\3\t\3\t") - buf.write(u"\3\t\3\t\3\t\3\t\3\t\3\t\7\t|\n\t\f\t\16\t\177\13\t\3") - buf.write(u"\n\3\n\3\n\3\13\3\13\3\13\3\f\3\f\3\f\3\r\3\r\3\16\3") - buf.write(u"\16\3\16\3\17\6\17\u0090\n\17\r\17\16\17\u0091\3\20\3") - buf.write(u"\20\3\20\3\21\3\21\3\21\3\21\3\21\7\21\u009c\n\21\f\21") - buf.write(u"\16\21\u009f\13\21\3\22\3\22\3\22\3\22\3\23\3\23\3\23") - buf.write(u"\3\24\3\24\3\24\3\25\3\25\3\25\3\26\3\26\3\26\3\27\3") - buf.write(u"\27\3\27\3\27\7\27\u00b5\n\27\f\27\16\27\u00b8\13\27") - buf.write(u"\3\30\6\30\u00bb\n\30\r\30\16\30\u00bc\3\31\3\31\3\31") - buf.write(u"\3\32\3\32\3\32\3\33\3\33\3\33\2\2\34\2\4\6\b\n\f\16") - buf.write(u"\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\2\t\5\2\3") - buf.write(u"\4\32\32\36\36\6\2\3\13\32\32\34\34\36\36\b\2\3\3\7\7") - buf.write(u"\t\t\f\f\32\32\36\36\4\2\n\n\20\20\3\2\21\22\4\2\n\n") - buf.write(u"\23\23\t\2\3\3\5\5\7\13\r\16\32\32\34\34\36\36\2\u00b9") - buf.write(u"\2\66\3\2\2\2\4]\3\2\2\2\6a\3\2\2\2\bf\3\2\2\2\nj\3\2") - buf.write(u"\2\2\fm\3\2\2\2\16o\3\2\2\2\20r\3\2\2\2\22\u0080\3\2") - buf.write(u"\2\2\24\u0083\3\2\2\2\26\u0086\3\2\2\2\30\u0089\3\2\2") - buf.write(u"\2\32\u008b\3\2\2\2\34\u008f\3\2\2\2\36\u0093\3\2\2\2") - buf.write(u" \u0096\3\2\2\2\"\u00a0\3\2\2\2$\u00a4\3\2\2\2&\u00a7") - buf.write(u"\3\2\2\2(\u00aa\3\2\2\2*\u00ad\3\2\2\2,\u00b0\3\2\2\2") - buf.write(u".\u00ba\3\2\2\2\60\u00be\3\2\2\2\62\u00c1\3\2\2\2\64") - buf.write(u"\u00c4\3\2\2\2\66<\5\4\3\2\678\5\6\4\289\7\3\2\29;\3") - buf.write(u"\2\2\2:\67\3\2\2\2;>\3\2\2\2<:\3\2\2\2<=\3\2\2\2=E\3") - buf.write(u"\2\2\2><\3\2\2\2?@\7\33\2\2@A\5\b\5\2AB\7\33\2\2BC\7") - buf.write(u"\34\2\2CF\3\2\2\2DF\5\b\5\2E?\3\2\2\2ED\3\2\2\2FG\3\2") - buf.write(u"\2\2GJ\5\n\6\2HK\5\f\7\2IK\5\20\t\2JH\3\2\2\2JI\3\2\2") - buf.write(u"\2KP\3\2\2\2LM\7\34\2\2MO\5 \21\2NL\3\2\2\2OR\3\2\2\2") - buf.write(u"PN\3\2\2\2PQ\3\2\2\2QU\3\2\2\2RP\3\2\2\2ST\7\34\2\2T") - buf.write(u"V\5\60\31\2US\3\2\2\2UV\3\2\2\2VZ\3\2\2\2WY\7\35\2\2") - buf.write(u"XW\3\2\2\2Y\\\3\2\2\2ZX\3\2\2\2Z[\3\2\2\2[\3\3\2\2\2") - buf.write(u"\\Z\3\2\2\2]^\7\36\2\2^_\7\34\2\2_\5\3\2\2\2`b\t\2\2") - buf.write(u"\2a`\3\2\2\2bc\3\2\2\2ca\3\2\2\2cd\3\2\2\2d\7\3\2\2\2") - buf.write(u"eg\t\3\2\2fe\3\2\2\2gh\3\2\2\2hf\3\2\2\2hi\3\2\2\2i\t") - buf.write(u"\3\2\2\2jk\7\31\2\2kl\7\34\2\2l\13\3\2\2\2mn\7\32\2\2") - buf.write(u"n\r\3\2\2\2op\7\24\2\2pq\7\34\2\2q\17\3\2\2\2rs\5\16") - buf.write(u"\b\2st\5\22\n\2tu\5\24\13\2uv\5\26\f\2v}\5\30\r\2wx\7") - buf.write(u"\34\2\2xy\5\32\16\2yz\5\34\17\2z|\3\2\2\2{w\3\2\2\2|") - buf.write(u"\177\3\2\2\2}{\3\2\2\2}~\3\2\2\2~\21\3\2\2\2\177}\3\2") - buf.write(u"\2\2\u0080\u0081\7\36\2\2\u0081\u0082\7\34\2\2\u0082") - buf.write(u"\23\3\2\2\2\u0083\u0084\7\32\2\2\u0084\u0085\7\34\2\2") - buf.write(u"\u0085\25\3\2\2\2\u0086\u0087\7\25\2\2\u0087\u0088\7") - buf.write(u"\34\2\2\u0088\27\3\2\2\2\u0089\u008a\7\32\2\2\u008a\31") - buf.write(u"\3\2\2\2\u008b\u008c\7\26\2\2\u008c\u008d\7\34\2\2\u008d") - buf.write(u"\33\3\2\2\2\u008e\u0090\t\4\2\2\u008f\u008e\3\2\2\2\u0090") - buf.write(u"\u0091\3\2\2\2\u0091\u008f\3\2\2\2\u0091\u0092\3\2\2") - buf.write(u"\2\u0092\35\3\2\2\2\u0093\u0094\7\17\2\2\u0094\u0095") - buf.write(u"\7\34\2\2\u0095\37\3\2\2\2\u0096\u0097\5\36\20\2\u0097") - buf.write(u"\u009d\5\"\22\2\u0098\u0099\5$\23\2\u0099\u009a\5\"\22") - buf.write(u"\2\u009a\u009c\3\2\2\2\u009b\u0098\3\2\2\2\u009c\u009f") - buf.write(u"\3\2\2\2\u009d\u009b\3\2\2\2\u009d\u009e\3\2\2\2\u009e") - buf.write(u"!\3\2\2\2\u009f\u009d\3\2\2\2\u00a0\u00a1\5*\26\2\u00a1") - buf.write(u"\u00a2\5&\24\2\u00a2\u00a3\5,\27\2\u00a3#\3\2\2\2\u00a4") - buf.write(u"\u00a5\t\5\2\2\u00a5\u00a6\7\34\2\2\u00a6%\3\2\2\2\u00a7") - buf.write(u"\u00a8\t\6\2\2\u00a8\u00a9\7\34\2\2\u00a9\'\3\2\2\2\u00aa") - buf.write(u"\u00ab\t\7\2\2\u00ab\u00ac\7\34\2\2\u00ac)\3\2\2\2\u00ad") - buf.write(u"\u00ae\7\36\2\2\u00ae\u00af\7\34\2\2\u00af+\3\2\2\2\u00b0") - buf.write(u"\u00b6\5.\30\2\u00b1\u00b2\5(\25\2\u00b2\u00b3\5.\30") - buf.write(u"\2\u00b3\u00b5\3\2\2\2\u00b4\u00b1\3\2\2\2\u00b5\u00b8") - buf.write(u"\3\2\2\2\u00b6\u00b4\3\2\2\2\u00b6\u00b7\3\2\2\2\u00b7") - buf.write(u"-\3\2\2\2\u00b8\u00b6\3\2\2\2\u00b9\u00bb\t\b\2\2\u00ba") - buf.write(u"\u00b9\3\2\2\2\u00bb\u00bc\3\2\2\2\u00bc\u00ba\3\2\2") - buf.write(u"\2\u00bc\u00bd\3\2\2\2\u00bd/\3\2\2\2\u00be\u00bf\5\62") - buf.write(u"\32\2\u00bf\u00c0\5\64\33\2\u00c0\61\3\2\2\2\u00c1\u00c2") - buf.write(u"\7\27\2\2\u00c2\u00c3\7\34\2\2\u00c3\63\3\2\2\2\u00c4") - buf.write(u"\u00c5\7\30\2\2\u00c5\65\3\2\2\2\17\13\2\3\2\3\2\3\2\3\2\3\2\3\2\5\2F\n\2\3\2\3\2\3") + buf.write("\2\5\2K\n\2\3\2\3\2\7\2O\n\2\f\2\16\2R\13\2\3\2\3\2\5") + buf.write("\2V\n\2\3\2\7\2Y\n\2\f\2\16\2\\\13\2\3\3\3\3\3\3\3\4\6") + buf.write("\4b\n\4\r\4\16\4c\3\5\6\5g\n\5\r\5\16\5h\3\6\3\6\3\6\3") + buf.write("\7\3\7\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t") + buf.write("\7\t|\n\t\f\t\16\t\177\13\t\3\n\3\n\3\n\3\13\3\13\3\13") + buf.write("\3\f\3\f\3\f\3\r\3\r\3\16\3\16\3\16\3\17\6\17\u0090\n") + buf.write("\17\r\17\16\17\u0091\3\20\3\20\3\20\3\21\3\21\3\21\3\21") + buf.write("\3\21\7\21\u009c\n\21\f\21\16\21\u009f\13\21\3\22\3\22") + buf.write("\3\22\3\22\3\23\3\23\3\23\3\24\3\24\3\24\3\25\3\25\3\25") + buf.write("\3\26\3\26\3\26\3\27\3\27\3\27\3\27\7\27\u00b5\n\27\f") + buf.write("\27\16\27\u00b8\13\27\3\30\6\30\u00bb\n\30\r\30\16\30") + buf.write("\u00bc\3\31\3\31\3\31\3\32\3\32\3\32\3\33\3\33\3\33\2") + buf.write("\2\34\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.") + buf.write("\60\62\64\2\t\5\2\3\4\32\32\36\36\6\2\3\13\32\32\34\34") + buf.write("\36\36\b\2\3\3\7\7\t\t\f\f\32\32\36\36\4\2\n\n\20\20\3") + buf.write("\2\21\22\4\2\n\n\23\23\t\2\3\3\5\5\7\13\r\16\32\32\34") + buf.write("\34\36\36\2\u00b9\2\66\3\2\2\2\4]\3\2\2\2\6a\3\2\2\2\b") + buf.write("f\3\2\2\2\nj\3\2\2\2\fm\3\2\2\2\16o\3\2\2\2\20r\3\2\2") + buf.write("\2\22\u0080\3\2\2\2\24\u0083\3\2\2\2\26\u0086\3\2\2\2") + buf.write("\30\u0089\3\2\2\2\32\u008b\3\2\2\2\34\u008f\3\2\2\2\36") + buf.write("\u0093\3\2\2\2 \u0096\3\2\2\2\"\u00a0\3\2\2\2$\u00a4\3") + buf.write("\2\2\2&\u00a7\3\2\2\2(\u00aa\3\2\2\2*\u00ad\3\2\2\2,\u00b0") + buf.write("\3\2\2\2.\u00ba\3\2\2\2\60\u00be\3\2\2\2\62\u00c1\3\2") + buf.write("\2\2\64\u00c4\3\2\2\2\66<\5\4\3\2\678\5\6\4\289\7\3\2") + buf.write("\29;\3\2\2\2:\67\3\2\2\2;>\3\2\2\2<:\3\2\2\2<=\3\2\2\2") + buf.write("=E\3\2\2\2><\3\2\2\2?@\7\33\2\2@A\5\b\5\2AB\7\33\2\2B") + buf.write("C\7\34\2\2CF\3\2\2\2DF\5\b\5\2E?\3\2\2\2ED\3\2\2\2FG\3") + buf.write("\2\2\2GJ\5\n\6\2HK\5\f\7\2IK\5\20\t\2JH\3\2\2\2JI\3\2") + buf.write("\2\2KP\3\2\2\2LM\7\34\2\2MO\5 \21\2NL\3\2\2\2OR\3\2\2") + buf.write("\2PN\3\2\2\2PQ\3\2\2\2QU\3\2\2\2RP\3\2\2\2ST\7\34\2\2") + buf.write("TV\5\60\31\2US\3\2\2\2UV\3\2\2\2VZ\3\2\2\2WY\7\35\2\2") + buf.write("XW\3\2\2\2Y\\\3\2\2\2ZX\3\2\2\2Z[\3\2\2\2[\3\3\2\2\2\\") + buf.write("Z\3\2\2\2]^\7\36\2\2^_\7\34\2\2_\5\3\2\2\2`b\t\2\2\2a") + buf.write("`\3\2\2\2bc\3\2\2\2ca\3\2\2\2cd\3\2\2\2d\7\3\2\2\2eg\t") + buf.write("\3\2\2fe\3\2\2\2gh\3\2\2\2hf\3\2\2\2hi\3\2\2\2i\t\3\2") + buf.write("\2\2jk\7\31\2\2kl\7\34\2\2l\13\3\2\2\2mn\7\32\2\2n\r\3") + buf.write("\2\2\2op\7\24\2\2pq\7\34\2\2q\17\3\2\2\2rs\5\16\b\2st") + buf.write("\5\22\n\2tu\5\24\13\2uv\5\26\f\2v}\5\30\r\2wx\7\34\2\2") + buf.write("xy\5\32\16\2yz\5\34\17\2z|\3\2\2\2{w\3\2\2\2|\177\3\2") + buf.write("\2\2}{\3\2\2\2}~\3\2\2\2~\21\3\2\2\2\177}\3\2\2\2\u0080") + buf.write("\u0081\7\36\2\2\u0081\u0082\7\34\2\2\u0082\23\3\2\2\2") + buf.write("\u0083\u0084\7\32\2\2\u0084\u0085\7\34\2\2\u0085\25\3") + buf.write("\2\2\2\u0086\u0087\7\25\2\2\u0087\u0088\7\34\2\2\u0088") + buf.write("\27\3\2\2\2\u0089\u008a\7\32\2\2\u008a\31\3\2\2\2\u008b") + buf.write("\u008c\7\26\2\2\u008c\u008d\7\34\2\2\u008d\33\3\2\2\2") + buf.write("\u008e\u0090\t\4\2\2\u008f\u008e\3\2\2\2\u0090\u0091\3") + buf.write("\2\2\2\u0091\u008f\3\2\2\2\u0091\u0092\3\2\2\2\u0092\35") + buf.write("\3\2\2\2\u0093\u0094\7\17\2\2\u0094\u0095\7\34\2\2\u0095") + buf.write("\37\3\2\2\2\u0096\u0097\5\36\20\2\u0097\u009d\5\"\22\2") + buf.write("\u0098\u0099\5$\23\2\u0099\u009a\5\"\22\2\u009a\u009c") + buf.write("\3\2\2\2\u009b\u0098\3\2\2\2\u009c\u009f\3\2\2\2\u009d") + buf.write("\u009b\3\2\2\2\u009d\u009e\3\2\2\2\u009e!\3\2\2\2\u009f") + buf.write("\u009d\3\2\2\2\u00a0\u00a1\5*\26\2\u00a1\u00a2\5&\24\2") + buf.write("\u00a2\u00a3\5,\27\2\u00a3#\3\2\2\2\u00a4\u00a5\t\5\2") + buf.write("\2\u00a5\u00a6\7\34\2\2\u00a6%\3\2\2\2\u00a7\u00a8\t\6") + buf.write("\2\2\u00a8\u00a9\7\34\2\2\u00a9\'\3\2\2\2\u00aa\u00ab") + buf.write("\t\7\2\2\u00ab\u00ac\7\34\2\2\u00ac)\3\2\2\2\u00ad\u00ae") + buf.write("\7\36\2\2\u00ae\u00af\7\34\2\2\u00af+\3\2\2\2\u00b0\u00b6") + buf.write("\5.\30\2\u00b1\u00b2\5(\25\2\u00b2\u00b3\5.\30\2\u00b3") + buf.write("\u00b5\3\2\2\2\u00b4\u00b1\3\2\2\2\u00b5\u00b8\3\2\2\2") + buf.write("\u00b6\u00b4\3\2\2\2\u00b6\u00b7\3\2\2\2\u00b7-\3\2\2") + buf.write("\2\u00b8\u00b6\3\2\2\2\u00b9\u00bb\t\b\2\2\u00ba\u00b9") + buf.write("\3\2\2\2\u00bb\u00bc\3\2\2\2\u00bc\u00ba\3\2\2\2\u00bc") + buf.write("\u00bd\3\2\2\2\u00bd/\3\2\2\2\u00be\u00bf\5\62\32\2\u00bf") + buf.write("\u00c0\5\64\33\2\u00c0\61\3\2\2\2\u00c1\u00c2\7\27\2\2") + buf.write("\u00c2\u00c3\7\34\2\2\u00c3\63\3\2\2\2\u00c4\u00c5\7\30") + buf.write("\2\2\u00c5\65\3\2\2\2\17", u"'.'", u"'/'", u"'_'", u"'\\'", u"':'", - u"'%'", u"'-'", u"','", u"'|'", u"'+'", u"'*'", u"'~'" ] + literalNames = [ "", "'.'", "'/'", "'_'", "'\\'", "':'", "'%'", + "'-'", "','", "'|'", "'+'", "'*'", "'~'" ] - symbolicNames = [ u"", u"", u"", u"", - u"", u"", u"", u"", - u"", u"", u"", u"", - u"", u"WHERE", u"AND", u"INCLUDES", u"EXCLUDES", - u"OR", u"DYNAMIC", u"OF", u"SINCE", u"WITH", u"SKIPMETRICVALIDATION", - u"OPERATOR", u"NUMBER", u"QUOTE", u"WHITESPACE", u"NEWLINE", - u"WORD" ] + symbolicNames = [ "", "", "", "", + "", "", "", "", + "", "", "", "", + "", "WHERE", "AND", "INCLUDES", "EXCLUDES", + "OR", "DYNAMIC", "OF", "SINCE", "WITH", "SKIPMETRICVALIDATION", + "OPERATOR", "NUMBER", "QUOTE", "WHITESPACE", "NEWLINE", + "WORD" ] RULE_expression = 0 RULE_aggregation = 1 @@ -139,13 +141,13 @@ class MetricAlertConditionParser ( Parser ): RULE_with_ = 24 RULE_option = 25 - ruleNames = [ u"expression", u"aggregation", u"namespace", u"metric", - u"operator", u"threshold", u"dynamic", u"dynamics", u"dyn_sensitivity", - u"dyn_violations", u"dyn_of_separator", u"dyn_windows", - u"dyn_since_seperator", u"dyn_datetime", u"where", u"dimensions", - u"dimension", u"dim_separator", u"dim_operator", u"dim_val_separator", - u"dim_name", u"dim_values", u"dim_value", u"options_", - u"with_", u"option" ] + ruleNames = [ "expression", "aggregation", "namespace", "metric", "operator", + "threshold", "dynamic", "dynamics", "dyn_sensitivity", + "dyn_violations", "dyn_of_separator", "dyn_windows", + "dyn_since_seperator", "dyn_datetime", "where", "dimensions", + "dimension", "dim_separator", "dim_operator", "dim_val_separator", + "dim_name", "dim_values", "dim_value", "options_", "with_", + "option" ] EOF = Token.EOF T__0=1 @@ -177,9 +179,9 @@ class MetricAlertConditionParser ( Parser ): NEWLINE=27 WORD=28 - def __init__(self, input, output=sys.stdout): - super(MetricAlertConditionParser, self).__init__(input, output=output) - self.checkVersion("4.7.2") + def __init__(self, input:TokenStream, output:TextIO = sys.stdout): + super().__init__(input, output) + self.checkVersion("4.9.3") self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache) self._predicates = None @@ -187,9 +189,10 @@ def __init__(self, input, output=sys.stdout): class ExpressionContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.ExpressionContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def aggregation(self): @@ -200,7 +203,7 @@ def operator(self): return self.getTypedRuleContext(MetricAlertConditionParser.OperatorContext,0) - def QUOTE(self, i=None): + def QUOTE(self, i:int=None): if i is None: return self.getTokens(MetricAlertConditionParser.QUOTE) else: @@ -210,7 +213,7 @@ def metric(self): return self.getTypedRuleContext(MetricAlertConditionParser.MetricContext,0) - def WHITESPACE(self, i=None): + def WHITESPACE(self, i:int=None): if i is None: return self.getTokens(MetricAlertConditionParser.WHITESPACE) else: @@ -224,14 +227,14 @@ def dynamics(self): return self.getTypedRuleContext(MetricAlertConditionParser.DynamicsContext,0) - def namespace(self, i=None): + def namespace(self, i:int=None): if i is None: return self.getTypedRuleContexts(MetricAlertConditionParser.NamespaceContext) else: return self.getTypedRuleContext(MetricAlertConditionParser.NamespaceContext,i) - def dimensions(self, i=None): + def dimensions(self, i:int=None): if i is None: return self.getTypedRuleContexts(MetricAlertConditionParser.DimensionsContext) else: @@ -242,7 +245,7 @@ def options_(self): return self.getTypedRuleContext(MetricAlertConditionParser.Options_Context,0) - def NEWLINE(self, i=None): + def NEWLINE(self, i:int=None): if i is None: return self.getTokens(MetricAlertConditionParser.NEWLINE) else: @@ -251,12 +254,12 @@ def NEWLINE(self, i=None): def getRuleIndex(self): return MetricAlertConditionParser.RULE_expression - def enterRule(self, listener): - if hasattr(listener, "enterExpression"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExpression" ): listener.enterExpression(self) - def exitRule(self, listener): - if hasattr(listener, "exitExpression"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExpression" ): listener.exitExpression(self) @@ -363,9 +366,10 @@ def expression(self): class AggregationContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.AggregationContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def WORD(self): @@ -377,12 +381,12 @@ def WHITESPACE(self): def getRuleIndex(self): return MetricAlertConditionParser.RULE_aggregation - def enterRule(self, listener): - if hasattr(listener, "enterAggregation"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAggregation" ): listener.enterAggregation(self) - def exitRule(self, listener): - if hasattr(listener, "exitAggregation"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAggregation" ): listener.exitAggregation(self) @@ -408,18 +412,19 @@ def aggregation(self): class NamespaceContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.NamespaceContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser - def NUMBER(self, i=None): + def NUMBER(self, i:int=None): if i is None: return self.getTokens(MetricAlertConditionParser.NUMBER) else: return self.getToken(MetricAlertConditionParser.NUMBER, i) - def WORD(self, i=None): + def WORD(self, i:int=None): if i is None: return self.getTokens(MetricAlertConditionParser.WORD) else: @@ -428,12 +433,12 @@ def WORD(self, i=None): def getRuleIndex(self): return MetricAlertConditionParser.RULE_namespace - def enterRule(self, listener): - if hasattr(listener, "enterNamespace"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNamespace" ): listener.enterNamespace(self) - def exitRule(self, listener): - if hasattr(listener, "exitNamespace"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNamespace" ): listener.exitNamespace(self) @@ -475,24 +480,25 @@ def namespace(self): class MetricContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.MetricContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser - def NUMBER(self, i=None): + def NUMBER(self, i:int=None): if i is None: return self.getTokens(MetricAlertConditionParser.NUMBER) else: return self.getToken(MetricAlertConditionParser.NUMBER, i) - def WORD(self, i=None): + def WORD(self, i:int=None): if i is None: return self.getTokens(MetricAlertConditionParser.WORD) else: return self.getToken(MetricAlertConditionParser.WORD, i) - def WHITESPACE(self, i=None): + def WHITESPACE(self, i:int=None): if i is None: return self.getTokens(MetricAlertConditionParser.WHITESPACE) else: @@ -501,12 +507,12 @@ def WHITESPACE(self, i=None): def getRuleIndex(self): return MetricAlertConditionParser.RULE_metric - def enterRule(self, listener): - if hasattr(listener, "enterMetric"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMetric" ): listener.enterMetric(self) - def exitRule(self, listener): - if hasattr(listener, "exitMetric"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMetric" ): listener.exitMetric(self) @@ -546,9 +552,10 @@ def metric(self): class OperatorContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.OperatorContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def OPERATOR(self): @@ -560,12 +567,12 @@ def WHITESPACE(self): def getRuleIndex(self): return MetricAlertConditionParser.RULE_operator - def enterRule(self, listener): - if hasattr(listener, "enterOperator"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterOperator" ): listener.enterOperator(self) - def exitRule(self, listener): - if hasattr(listener, "exitOperator"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitOperator" ): listener.exitOperator(self) @@ -591,9 +598,10 @@ def operator(self): class ThresholdContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.ThresholdContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def NUMBER(self): @@ -602,12 +610,12 @@ def NUMBER(self): def getRuleIndex(self): return MetricAlertConditionParser.RULE_threshold - def enterRule(self, listener): - if hasattr(listener, "enterThreshold"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterThreshold" ): listener.enterThreshold(self) - def exitRule(self, listener): - if hasattr(listener, "exitThreshold"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitThreshold" ): listener.exitThreshold(self) @@ -631,9 +639,10 @@ def threshold(self): class DynamicContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.DynamicContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def DYNAMIC(self): @@ -645,12 +654,12 @@ def WHITESPACE(self): def getRuleIndex(self): return MetricAlertConditionParser.RULE_dynamic - def enterRule(self, listener): - if hasattr(listener, "enterDynamic"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDynamic" ): listener.enterDynamic(self) - def exitRule(self, listener): - if hasattr(listener, "exitDynamic"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDynamic" ): listener.exitDynamic(self) @@ -676,9 +685,10 @@ def dynamic(self): class DynamicsContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.DynamicsContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def dynamic(self): @@ -701,20 +711,20 @@ def dyn_windows(self): return self.getTypedRuleContext(MetricAlertConditionParser.Dyn_windowsContext,0) - def WHITESPACE(self, i=None): + def WHITESPACE(self, i:int=None): if i is None: return self.getTokens(MetricAlertConditionParser.WHITESPACE) else: return self.getToken(MetricAlertConditionParser.WHITESPACE, i) - def dyn_since_seperator(self, i=None): + def dyn_since_seperator(self, i:int=None): if i is None: return self.getTypedRuleContexts(MetricAlertConditionParser.Dyn_since_seperatorContext) else: return self.getTypedRuleContext(MetricAlertConditionParser.Dyn_since_seperatorContext,i) - def dyn_datetime(self, i=None): + def dyn_datetime(self, i:int=None): if i is None: return self.getTypedRuleContexts(MetricAlertConditionParser.Dyn_datetimeContext) else: @@ -724,12 +734,12 @@ def dyn_datetime(self, i=None): def getRuleIndex(self): return MetricAlertConditionParser.RULE_dynamics - def enterRule(self, listener): - if hasattr(listener, "enterDynamics"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDynamics" ): listener.enterDynamics(self) - def exitRule(self, listener): - if hasattr(listener, "exitDynamics"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDynamics" ): listener.exitDynamics(self) @@ -776,9 +786,10 @@ def dynamics(self): class Dyn_sensitivityContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.Dyn_sensitivityContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def WORD(self): @@ -790,12 +801,12 @@ def WHITESPACE(self): def getRuleIndex(self): return MetricAlertConditionParser.RULE_dyn_sensitivity - def enterRule(self, listener): - if hasattr(listener, "enterDyn_sensitivity"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDyn_sensitivity" ): listener.enterDyn_sensitivity(self) - def exitRule(self, listener): - if hasattr(listener, "exitDyn_sensitivity"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDyn_sensitivity" ): listener.exitDyn_sensitivity(self) @@ -821,9 +832,10 @@ def dyn_sensitivity(self): class Dyn_violationsContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.Dyn_violationsContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def NUMBER(self): @@ -835,12 +847,12 @@ def WHITESPACE(self): def getRuleIndex(self): return MetricAlertConditionParser.RULE_dyn_violations - def enterRule(self, listener): - if hasattr(listener, "enterDyn_violations"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDyn_violations" ): listener.enterDyn_violations(self) - def exitRule(self, listener): - if hasattr(listener, "exitDyn_violations"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDyn_violations" ): listener.exitDyn_violations(self) @@ -866,9 +878,10 @@ def dyn_violations(self): class Dyn_of_separatorContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.Dyn_of_separatorContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def OF(self): @@ -880,12 +893,12 @@ def WHITESPACE(self): def getRuleIndex(self): return MetricAlertConditionParser.RULE_dyn_of_separator - def enterRule(self, listener): - if hasattr(listener, "enterDyn_of_separator"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDyn_of_separator" ): listener.enterDyn_of_separator(self) - def exitRule(self, listener): - if hasattr(listener, "exitDyn_of_separator"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDyn_of_separator" ): listener.exitDyn_of_separator(self) @@ -911,9 +924,10 @@ def dyn_of_separator(self): class Dyn_windowsContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.Dyn_windowsContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def NUMBER(self): @@ -922,12 +936,12 @@ def NUMBER(self): def getRuleIndex(self): return MetricAlertConditionParser.RULE_dyn_windows - def enterRule(self, listener): - if hasattr(listener, "enterDyn_windows"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDyn_windows" ): listener.enterDyn_windows(self) - def exitRule(self, listener): - if hasattr(listener, "exitDyn_windows"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDyn_windows" ): listener.exitDyn_windows(self) @@ -951,9 +965,10 @@ def dyn_windows(self): class Dyn_since_seperatorContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.Dyn_since_seperatorContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def SINCE(self): @@ -965,12 +980,12 @@ def WHITESPACE(self): def getRuleIndex(self): return MetricAlertConditionParser.RULE_dyn_since_seperator - def enterRule(self, listener): - if hasattr(listener, "enterDyn_since_seperator"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDyn_since_seperator" ): listener.enterDyn_since_seperator(self) - def exitRule(self, listener): - if hasattr(listener, "exitDyn_since_seperator"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDyn_since_seperator" ): listener.exitDyn_since_seperator(self) @@ -996,18 +1011,19 @@ def dyn_since_seperator(self): class Dyn_datetimeContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.Dyn_datetimeContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser - def NUMBER(self, i=None): + def NUMBER(self, i:int=None): if i is None: return self.getTokens(MetricAlertConditionParser.NUMBER) else: return self.getToken(MetricAlertConditionParser.NUMBER, i) - def WORD(self, i=None): + def WORD(self, i:int=None): if i is None: return self.getTokens(MetricAlertConditionParser.WORD) else: @@ -1016,12 +1032,12 @@ def WORD(self, i=None): def getRuleIndex(self): return MetricAlertConditionParser.RULE_dyn_datetime - def enterRule(self, listener): - if hasattr(listener, "enterDyn_datetime"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDyn_datetime" ): listener.enterDyn_datetime(self) - def exitRule(self, listener): - if hasattr(listener, "exitDyn_datetime"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDyn_datetime" ): listener.exitDyn_datetime(self) @@ -1061,9 +1077,10 @@ def dyn_datetime(self): class WhereContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.WhereContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def WHERE(self): @@ -1075,12 +1092,12 @@ def WHITESPACE(self): def getRuleIndex(self): return MetricAlertConditionParser.RULE_where - def enterRule(self, listener): - if hasattr(listener, "enterWhere"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterWhere" ): listener.enterWhere(self) - def exitRule(self, listener): - if hasattr(listener, "exitWhere"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitWhere" ): listener.exitWhere(self) @@ -1106,23 +1123,24 @@ def where(self): class DimensionsContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.DimensionsContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def where(self): return self.getTypedRuleContext(MetricAlertConditionParser.WhereContext,0) - def dimension(self, i=None): + def dimension(self, i:int=None): if i is None: return self.getTypedRuleContexts(MetricAlertConditionParser.DimensionContext) else: return self.getTypedRuleContext(MetricAlertConditionParser.DimensionContext,i) - def dim_separator(self, i=None): + def dim_separator(self, i:int=None): if i is None: return self.getTypedRuleContexts(MetricAlertConditionParser.Dim_separatorContext) else: @@ -1132,12 +1150,12 @@ def dim_separator(self, i=None): def getRuleIndex(self): return MetricAlertConditionParser.RULE_dimensions - def enterRule(self, listener): - if hasattr(listener, "enterDimensions"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDimensions" ): listener.enterDimensions(self) - def exitRule(self, listener): - if hasattr(listener, "exitDimensions"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDimensions" ): listener.exitDimensions(self) @@ -1176,9 +1194,10 @@ def dimensions(self): class DimensionContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.DimensionContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def dim_name(self): @@ -1196,12 +1215,12 @@ def dim_values(self): def getRuleIndex(self): return MetricAlertConditionParser.RULE_dimension - def enterRule(self, listener): - if hasattr(listener, "enterDimension"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDimension" ): listener.enterDimension(self) - def exitRule(self, listener): - if hasattr(listener, "exitDimension"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDimension" ): listener.exitDimension(self) @@ -1229,9 +1248,10 @@ def dimension(self): class Dim_separatorContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.Dim_separatorContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def WHITESPACE(self): @@ -1243,12 +1263,12 @@ def AND(self): def getRuleIndex(self): return MetricAlertConditionParser.RULE_dim_separator - def enterRule(self, listener): - if hasattr(listener, "enterDim_separator"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDim_separator" ): listener.enterDim_separator(self) - def exitRule(self, listener): - if hasattr(listener, "exitDim_separator"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDim_separator" ): listener.exitDim_separator(self) @@ -1280,9 +1300,10 @@ def dim_separator(self): class Dim_operatorContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.Dim_operatorContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def WHITESPACE(self): @@ -1297,12 +1318,12 @@ def EXCLUDES(self): def getRuleIndex(self): return MetricAlertConditionParser.RULE_dim_operator - def enterRule(self, listener): - if hasattr(listener, "enterDim_operator"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDim_operator" ): listener.enterDim_operator(self) - def exitRule(self, listener): - if hasattr(listener, "exitDim_operator"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDim_operator" ): listener.exitDim_operator(self) @@ -1334,9 +1355,10 @@ def dim_operator(self): class Dim_val_separatorContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.Dim_val_separatorContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def WHITESPACE(self): @@ -1348,12 +1370,12 @@ def OR(self): def getRuleIndex(self): return MetricAlertConditionParser.RULE_dim_val_separator - def enterRule(self, listener): - if hasattr(listener, "enterDim_val_separator"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDim_val_separator" ): listener.enterDim_val_separator(self) - def exitRule(self, listener): - if hasattr(listener, "exitDim_val_separator"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDim_val_separator" ): listener.exitDim_val_separator(self) @@ -1385,9 +1407,10 @@ def dim_val_separator(self): class Dim_nameContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.Dim_nameContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def WORD(self): @@ -1399,12 +1422,12 @@ def WHITESPACE(self): def getRuleIndex(self): return MetricAlertConditionParser.RULE_dim_name - def enterRule(self, listener): - if hasattr(listener, "enterDim_name"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDim_name" ): listener.enterDim_name(self) - def exitRule(self, listener): - if hasattr(listener, "exitDim_name"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDim_name" ): listener.exitDim_name(self) @@ -1430,19 +1453,20 @@ def dim_name(self): class Dim_valuesContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.Dim_valuesContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser - def dim_value(self, i=None): + def dim_value(self, i:int=None): if i is None: return self.getTypedRuleContexts(MetricAlertConditionParser.Dim_valueContext) else: return self.getTypedRuleContext(MetricAlertConditionParser.Dim_valueContext,i) - def dim_val_separator(self, i=None): + def dim_val_separator(self, i:int=None): if i is None: return self.getTypedRuleContexts(MetricAlertConditionParser.Dim_val_separatorContext) else: @@ -1452,12 +1476,12 @@ def dim_val_separator(self, i=None): def getRuleIndex(self): return MetricAlertConditionParser.RULE_dim_values - def enterRule(self, listener): - if hasattr(listener, "enterDim_values"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDim_values" ): listener.enterDim_values(self) - def exitRule(self, listener): - if hasattr(listener, "exitDim_values"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDim_values" ): listener.exitDim_values(self) @@ -1494,24 +1518,25 @@ def dim_values(self): class Dim_valueContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.Dim_valueContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser - def NUMBER(self, i=None): + def NUMBER(self, i:int=None): if i is None: return self.getTokens(MetricAlertConditionParser.NUMBER) else: return self.getToken(MetricAlertConditionParser.NUMBER, i) - def WORD(self, i=None): + def WORD(self, i:int=None): if i is None: return self.getTokens(MetricAlertConditionParser.WORD) else: return self.getToken(MetricAlertConditionParser.WORD, i) - def WHITESPACE(self, i=None): + def WHITESPACE(self, i:int=None): if i is None: return self.getTokens(MetricAlertConditionParser.WHITESPACE) else: @@ -1520,12 +1545,12 @@ def WHITESPACE(self, i=None): def getRuleIndex(self): return MetricAlertConditionParser.RULE_dim_value - def enterRule(self, listener): - if hasattr(listener, "enterDim_value"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDim_value" ): listener.enterDim_value(self) - def exitRule(self, listener): - if hasattr(listener, "exitDim_value"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDim_value" ): listener.exitDim_value(self) @@ -1567,9 +1592,10 @@ def dim_value(self): class Options_Context(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.Options_Context, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def with_(self): @@ -1583,12 +1609,12 @@ def option(self): def getRuleIndex(self): return MetricAlertConditionParser.RULE_options_ - def enterRule(self, listener): - if hasattr(listener, "enterOptions_"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterOptions_" ): listener.enterOptions_(self) - def exitRule(self, listener): - if hasattr(listener, "exitOptions_"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitOptions_" ): listener.exitOptions_(self) @@ -1614,9 +1640,10 @@ def options_(self): class With_Context(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.With_Context, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def WITH(self): @@ -1628,12 +1655,12 @@ def WHITESPACE(self): def getRuleIndex(self): return MetricAlertConditionParser.RULE_with_ - def enterRule(self, listener): - if hasattr(listener, "enterWith_"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterWith_" ): listener.enterWith_(self) - def exitRule(self, listener): - if hasattr(listener, "exitWith_"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitWith_" ): listener.exitWith_(self) @@ -1659,9 +1686,10 @@ def with_(self): class OptionContext(ParserRuleContext): + __slots__ = 'parser' - def __init__(self, parser, parent=None, invokingState=-1): - super(MetricAlertConditionParser.OptionContext, self).__init__(parent, invokingState) + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) self.parser = parser def SKIPMETRICVALIDATION(self): @@ -1670,12 +1698,12 @@ def SKIPMETRICVALIDATION(self): def getRuleIndex(self): return MetricAlertConditionParser.RULE_option - def enterRule(self, listener): - if hasattr(listener, "enterOption"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterOption" ): listener.enterOption(self) - def exitRule(self, listener): - if hasattr(listener, "exitOption"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitOption" ): listener.exitOption(self) diff --git a/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/README.md b/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/README.md index 891096dca4a..595e6a73626 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/README.md +++ b/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/README.md @@ -8,11 +8,11 @@ To set up your system to be able to alter and regenerate the grammar code, see t The steps for Windows are replicated here: ``` -Download https://www.antlr.org/download/antlr-4.7.2-complete.jar. +Download https://www.antlr.org/download/antlr-4.9.3-complete.jar. Add antlr4-complete.jar to CLASSPATH, either: Permanently: Using System Properties dialog > Environment variables > Create or append to CLASSPATH variable Temporarily, at command line: -SET CLASSPATH=.;C:\Javalib\antlr4-complete.jar;%CLASSPATH% +SET CLASSPATH=.;C:\Javalib\antlr-4.9.3-complete.jar;%CLASSPATH% ``` You will likely also need to add the path to your JDK bin directory to your PATH. diff --git a/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/build_python.bat b/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/build_python.bat index a0c68702d18..f5ee69cdc77 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/build_python.bat +++ b/src/azure-cli/azure/cli/command_modules/monitor/grammar/metric_alert/build_python.bat @@ -1,3 +1,3 @@ echo off echo Building MetricAlertCondition -call antlr -Dlanguage=Python2 MetricAlertCondition.g4 +call antlr -Dlanguage=Python3 MetricAlertCondition.g4