From 2a089a5608993fe3e2d0a35fafedf9a662a85097 Mon Sep 17 00:00:00 2001 From: Marlon Bucciarelli <65083942+marlon-luca-bu@users.noreply.github.com> Date: Tue, 11 Jun 2024 18:08:47 +0200 Subject: [PATCH] Programming/AP-TED: Add AP-TED Algorithm and Code to AST Converter (#275) --- .prospector.yaml | 1 + athena/athena/programming.py | 2 +- .../module_programming_ast/__main__.py | 79 +- .../convert_code_to_ast/__init__.py | 0 .../extract_method_and_ast.py | 87 + .../get_feedback_methods.py | 27 + .../convert_code_to_ast/languages/__init__.py | 0 .../languages/java/JavaLexer.py | 656 + .../java/JavaMethodParserListener.py | 73 + .../languages/java/JavaParser.py | 12187 ++++++++++++++++ .../languages/java/__init__.py | 0 .../languages/python/Python3Lexer.py | 791 + .../languages/python/Python3LexerBase.py | 101 + .../python/Python3MethodParserListener.py | 52 + .../languages/python/Python3Parser.py | 10334 +++++++++++++ .../languages/python/Python3ParserBase.py | 9 + .../languages/python/Python3ParserListener.py | 1083 ++ .../convert_code_to_ast/method_node.py | 15 + .../feedback_suggestions/__init__.py | 0 .../feedback_suggestions/ap_ted_computer.py | 105 + .../feedback_suggestions/batch.py | 14 + .../feedback_suggestions.py | 138 + .../test_files/output_ast.txt | 203 + .../test_files/test.java | 56 + .../test_files/test2.java | 11 + .../test_files/test3.java | 11 + .../test_files/test_java_1.java | 10 + .../test_files/test_java_2.java | 10 + .../test_files/test_python_1.py | 11 + .../test_files/test_python_2.py | 11 + .../test_files/test_swift_1.swift | 6 + .../test_files/test_swift_2.swift | 6 + module_programming_ast/poetry.lock | 53 +- module_programming_ast/pyproject.toml | 3 + 34 files changed, 26128 insertions(+), 17 deletions(-) create mode 100644 module_programming_ast/module_programming_ast/convert_code_to_ast/__init__.py create mode 100644 module_programming_ast/module_programming_ast/convert_code_to_ast/extract_method_and_ast.py create mode 100644 module_programming_ast/module_programming_ast/convert_code_to_ast/get_feedback_methods.py create mode 100644 module_programming_ast/module_programming_ast/convert_code_to_ast/languages/__init__.py create mode 100644 module_programming_ast/module_programming_ast/convert_code_to_ast/languages/java/JavaLexer.py create mode 100644 module_programming_ast/module_programming_ast/convert_code_to_ast/languages/java/JavaMethodParserListener.py create mode 100644 module_programming_ast/module_programming_ast/convert_code_to_ast/languages/java/JavaParser.py create mode 100644 module_programming_ast/module_programming_ast/convert_code_to_ast/languages/java/__init__.py create mode 100644 module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3Lexer.py create mode 100644 module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3LexerBase.py create mode 100644 module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3MethodParserListener.py create mode 100644 module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3Parser.py create mode 100644 module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3ParserBase.py create mode 100644 module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3ParserListener.py create mode 100644 module_programming_ast/module_programming_ast/convert_code_to_ast/method_node.py create mode 100644 module_programming_ast/module_programming_ast/feedback_suggestions/__init__.py create mode 100644 module_programming_ast/module_programming_ast/feedback_suggestions/ap_ted_computer.py create mode 100644 module_programming_ast/module_programming_ast/feedback_suggestions/batch.py create mode 100644 module_programming_ast/module_programming_ast/feedback_suggestions/feedback_suggestions.py create mode 100644 module_programming_ast/module_programming_ast/test_files/output_ast.txt create mode 100644 module_programming_ast/module_programming_ast/test_files/test.java create mode 100644 module_programming_ast/module_programming_ast/test_files/test2.java create mode 100644 module_programming_ast/module_programming_ast/test_files/test3.java create mode 100644 module_programming_ast/module_programming_ast/test_files/test_java_1.java create mode 100644 module_programming_ast/module_programming_ast/test_files/test_java_2.java create mode 100644 module_programming_ast/module_programming_ast/test_files/test_python_1.py create mode 100644 module_programming_ast/module_programming_ast/test_files/test_python_2.py create mode 100644 module_programming_ast/module_programming_ast/test_files/test_swift_1.swift create mode 100644 module_programming_ast/module_programming_ast/test_files/test_swift_2.swift diff --git a/.prospector.yaml b/.prospector.yaml index b15e340c6..0af3aa98c 100644 --- a/.prospector.yaml +++ b/.prospector.yaml @@ -7,6 +7,7 @@ ignore-paths: - module_text_cofee/module_text_cofee/protobuf - module_programming_themisml/module_programming_themisml/extract_methods/languages - module_programming_themisml/module_programming_themisml/extract_methods/method_parser_listener.py + - module_programming_ast/module_programming_ast/convert_code_to_ast/languages mypy: run: true diff --git a/athena/athena/programming.py b/athena/athena/programming.py index 0b127edbb..f8060128f 100644 --- a/athena/athena/programming.py +++ b/athena/athena/programming.py @@ -24,5 +24,5 @@ __all__ = [ "Exercise", "Submission", "Feedback", - "get_stored_exercises", "get_stored_submissions", "get_stored_feedback", "get_stored_feedback_suggestions" + "get_stored_exercises", "get_stored_submissions", "get_stored_feedback", "get_stored_feedback_suggestions", "count_stored_submissions" ] diff --git a/module_programming_ast/module_programming_ast/__main__.py b/module_programming_ast/module_programming_ast/__main__.py index a6614a791..c9ad9656e 100644 --- a/module_programming_ast/module_programming_ast/__main__.py +++ b/module_programming_ast/module_programming_ast/__main__.py @@ -4,11 +4,14 @@ import random from typing import List, Any, cast from pydantic import BaseModel, Field - -from athena import app, config_schema_provider, submissions_consumer, submission_selector, feedback_consumer, feedback_provider, evaluation_provider, emit_meta +from module_programming_ast.convert_code_to_ast.get_feedback_methods import get_feedback_method +from module_programming_ast.feedback_suggestions.feedback_suggestions import create_feedback_suggestions +from athena import (app, config_schema_provider, submissions_consumer, submission_selector, feedback_consumer, + feedback_provider, evaluation_provider, emit_meta) from athena.logger import logger -from athena.storage import store_exercise, store_submissions, store_feedback -from athena.programming import Exercise, Submission, Feedback, get_stored_feedback_suggestions, count_stored_submissions +from athena.storage import store_exercise, store_submissions, store_feedback, store_feedback_suggestions +from athena.programming import (Exercise, Submission, Feedback, get_stored_feedback_suggestions, + count_stored_submissions, get_stored_submissions) from module_programming_ast.remove_overlapping import filter_overlapping_suggestions from module_programming_ast.remove_suspicious import filter_suspicious @@ -62,18 +65,65 @@ def select_submission(exercise: Exercise, submissions: List[Submission]) -> Subm @feedback_consumer def process_incoming_feedback(exercise: Exercise, submission: Submission, feedbacks: List[Feedback]): - logger.info("process_feedback: Received feedbacks for submission %d of exercise %d", submission.id, exercise.id) + logger.info("process_feedback: Received %d feedbacks for submission %d of exercise %d", len(feedbacks), + submission.id, exercise.id) logger.info("process_feedback: Feedbacks: %s", feedbacks) - # Do something with the feedback - # Add data to feedback + + programming_language = exercise.programming_language.lower() + # Currently only works with Java and Python - can be extended with more languages if the grammar is available + if programming_language not in ["java", "python"]: + logger.info("AP-TED currently only works with Java and Python. Not consuming feedback.") + return + + # Remove unreferenced feedbacks + feedbacks = list(filter(lambda f: f.file_path is not None and f.line_start is not None, feedbacks)) + + # Add method metadata to feedbacks + feedbacks_with_method = [] + for feedback in feedbacks: + feedback_method = get_feedback_method(submission, feedback, programming_language) + if feedback_method is None: + # don't consider feedback without a method + continue + logger.debug("Feedback #%d: Found method %s", feedback.id, feedback_method.name) + feedback.meta["method_name"] = feedback_method.name + feedback.meta["method_code"] = feedback_method.source_code + feedback.meta["method_line_start"] = feedback_method.line_start + feedback.meta["method_line_end"] = feedback_method.line_end + feedback.meta["method_ast"] = feedback_method.ast + feedbacks_with_method.append(feedback) + feedbacks = feedbacks_with_method + + # find all submissions for this exercise + exercise_submissions = cast(List[Submission], list(get_stored_submissions(exercise.id))) + + # create feedback suggestions + logger.info("Creating feedback suggestions for %d feedbacks", len(feedbacks)) + feedback_suggestions = create_feedback_suggestions(exercise_submissions, feedbacks, programming_language) + + # additionally, store metadata about how impactful each feedback was, i.e. how many suggestions were given based on it + for feedback in feedbacks: + # count how many suggestions were given based on this feedback + feedback.meta["n_feedback_suggestions"] = len( + [f for f in feedback_suggestions if f.meta["original_feedback_id"] == feedback.id]) + # store the information on the suggestions as well for quicker access later + for suggestion in feedback_suggestions: + if suggestion.meta["original_feedback_id"] == feedback.id: + suggestion.meta["n_feedback_suggestions"] = feedback.meta["n_feedback_suggestions"] + + # save to database + # type: ignore + store_feedback_suggestions(feedback_suggestions) for feedback in feedbacks: - feedback.meta["some_data"] = "some_value" store_feedback(feedback) + logger.debug("Feedbacks processed") + @feedback_provider -def suggest_feedback(exercise: Exercise, submission: Submission, module_config: Configuration) -> List[Feedback]: - logger.info("suggest_feedback: Suggestions for submission %d of exercise %d were requested", submission.id, exercise.id) +def suggest_feedback(exercise: Exercise, submission: Submission) -> List[Feedback]: + logger.info("suggest_feedback: Suggestions for submission %d of exercise %d were requested", submission.id, + exercise.id) # Do something with the submission and return a list of feedback # ThemisML currently only works with Java if exercise.programming_language.lower() != "java" or exercise.programming_language.lower() != "python": @@ -92,20 +142,19 @@ def suggest_feedback(exercise: Exercise, submission: Submission, module_config: return suggested_feedbacks - - # Only if it makes sense for a module (Optional) @evaluation_provider -def evaluate_feedback(exercise: Exercise, submission: Submission, true_feedbacks: List[Feedback], predicted_feedbacks: List[Feedback]) -> Any: +def evaluate_feedback(exercise: Exercise, submission: Submission, true_feedbacks: List[Feedback], + predicted_feedbacks: List[Feedback]) -> Any: logger.info( - "evaluate_feedback: Evaluation for submission %d of exercise %d was requested with %d true and %d predicted feedbacks", + "evaluate_feedback: Evaluation for submission %d of exercise %d was requested with %d true and %d predicted feedbacks", submission.id, exercise.id, len(true_feedbacks), len(predicted_feedbacks) ) # Do something with the true and predicted feedback and return the evaluation result # Generate some example evaluation result evaluation_results = [] - true_feedback_embeddings = [random.random() for _ in true_feedbacks] + true_feedback_embeddings = [random.random() for _ in true_feedbacks] predicted_feedback_embeddings = [random.random() for _ in predicted_feedbacks] for feedback, embedding in zip(predicted_feedbacks, predicted_feedback_embeddings): feedback_evaluation = { diff --git a/module_programming_ast/module_programming_ast/convert_code_to_ast/__init__.py b/module_programming_ast/module_programming_ast/convert_code_to_ast/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/module_programming_ast/module_programming_ast/convert_code_to_ast/extract_method_and_ast.py b/module_programming_ast/module_programming_ast/convert_code_to_ast/extract_method_and_ast.py new file mode 100644 index 000000000..bb34fb5f5 --- /dev/null +++ b/module_programming_ast/module_programming_ast/convert_code_to_ast/extract_method_and_ast.py @@ -0,0 +1,87 @@ +from antlr4 import CommonTokenStream, InputStream +from antlr4.tree.Tree import ParseTreeWalker +from module_programming_ast.convert_code_to_ast.languages.python.Python3Lexer import Python3Lexer +from module_programming_ast.convert_code_to_ast.languages.python.Python3Parser import Python3Parser +from module_programming_ast.convert_code_to_ast.languages.java.JavaLexer import JavaLexer +from module_programming_ast.convert_code_to_ast.languages.java.JavaParser import JavaParser +from module_programming_ast.convert_code_to_ast.languages.python.Python3MethodParserListener import \ + MethodParserListener as PythonMethodParserListener +from module_programming_ast.convert_code_to_ast.languages.java.JavaMethodParserListener import \ + MethodParserListener as JavaMethodParserListener + +# TODO: DO I need the to_ast method? + +# Grammars for programming languages have different parse rules +JAVA_PARSE_RULE = "compilationUnit" +PYTHON_PARSE_RULE = "file_input" + + +# class ASTNode: +# def __init__(self, name): +# self.name = name +# self.children = [] +# +# def add_child(self, child): +# self.children.append(child) +# +# def __repr__(self): +# return f"{self.name}{self.children}" +# +# +# def to_ast(node): +# if isinstance(node, TerminalNodeImpl): +# return ASTNode(node.getText()) +# ast_node = ASTNode(type(node).__name__.replace('Context', '')) +# for i in range(node.getChildCount()): +# ast_node.add_child(to_ast(node.getChild(i))) +# return ast_node + + +def parse_java_file(source_code: str): + return parse_file(source_code, JavaLexer, JavaParser, JAVA_PARSE_RULE, JavaMethodParserListener) + + +def parse_python_file(source_code: str): + return parse_file(source_code, Python3Lexer, Python3Parser, PYTHON_PARSE_RULE, PythonMethodParserListener) + + +def parse_file(source_code, lexer_class, parser_class, parse_rule, listener_class): + input_stream = InputStream(source_code) + lexer = lexer_class(input_stream) + stream = CommonTokenStream(lexer) + parser = parser_class(stream) + tree = getattr(parser, parse_rule)() + + listener = listener_class(parser) + walker = ParseTreeWalker() + walker.walk(listener, tree) + print(listener.methods) + + return listener.methods.copy() + + +def parse(source_code: str, programming_language: str): + if programming_language == "java": + return parse_java_file(source_code) + if programming_language == "python": + return parse_python_file(source_code) + raise ValueError(f"Unsupported programming language: {programming_language}") + + +if __name__ == "__main__": + # file_path2 = "../test_files/test_java_1.java" + # parse_java_file(file_path2) + + code = """def process_numbers(numbers): + total = 0 + for number in numbers: + if number % 2 == 1: + total += number + else: + total -= number + if total > 0: + print("Positive total:", total) + else: + print("Non-positive total:", total)""" + code1 = parse_python_file(code) + code2 = parse_python_file(code) diff --git a/module_programming_ast/module_programming_ast/convert_code_to_ast/get_feedback_methods.py b/module_programming_ast/module_programming_ast/convert_code_to_ast/get_feedback_methods.py new file mode 100644 index 000000000..d152f6653 --- /dev/null +++ b/module_programming_ast/module_programming_ast/convert_code_to_ast/get_feedback_methods.py @@ -0,0 +1,27 @@ +from typing import Optional + +from athena.programming import Submission, Feedback +from module_programming_ast.convert_code_to_ast.extract_method_and_ast import parse +from module_programming_ast.convert_code_to_ast.method_node import MethodNode +from athena.logger import logger + + +def get_feedback_method(submission: Submission, feedback: Feedback, programming_language: str) -> Optional[MethodNode]: + """Find method that the feedback is on""" + if feedback.file_path is None or feedback.line_start is None: + return None + try: + code = submission.get_code(feedback.file_path) + except UnicodeDecodeError: + logger.warning("File %s in submission %d is not UTF-8 encoded.", feedback.file_path, submission.id) + return None + methods = parse(code, programming_language) + for m in methods: + if m.line_start is None or m.line_end is None: + continue + # method has to contain all feedback lines + if m.line_start <= feedback.line_start: + feedback_line_end = feedback.line_end if feedback.line_end is not None else feedback.line_start + if m.line_end >= feedback_line_end: + return m + return None diff --git a/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/__init__.py b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/java/JavaLexer.py b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/java/JavaLexer.py new file mode 100644 index 000000000..30195841e --- /dev/null +++ b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/java/JavaLexer.py @@ -0,0 +1,656 @@ +# Generated from JavaLexer.g4 by ANTLR 4.13.1 +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(): + return [ + 4, 0, 128, 1126, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, + 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, + 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, + 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, + 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, + 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, + 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, + 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, + 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, + 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, + 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, + 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, + 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, + 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, + 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, + 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, + 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, + 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, + 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, 7, 117, 2, 118, 7, 118, 2, 119, 7, 119, + 2, 120, 7, 120, 2, 121, 7, 121, 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, + 7, 125, 2, 126, 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, + 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, + 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, + 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, + 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, + 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, + 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, + 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, + 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, + 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, + 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, + 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, + 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, + 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, + 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, + 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, + 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, + 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, + 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, + 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, + 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, + 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, + 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, + 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, + 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, + 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, + 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, + 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, + 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, + 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, + 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, + 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, + 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, + 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 3, 66, 725, 8, 66, 1, 66, + 4, 66, 728, 8, 66, 11, 66, 12, 66, 729, 1, 66, 3, 66, 733, 8, 66, 3, 66, 735, 8, 66, 1, + 66, 3, 66, 738, 8, 66, 1, 67, 1, 67, 1, 67, 1, 67, 5, 67, 744, 8, 67, 10, 67, 12, 67, 747, + 9, 67, 1, 67, 3, 67, 750, 8, 67, 1, 67, 3, 67, 753, 8, 67, 1, 68, 1, 68, 5, 68, 757, 8, + 68, 10, 68, 12, 68, 760, 9, 68, 1, 68, 1, 68, 5, 68, 764, 8, 68, 10, 68, 12, 68, 767, + 9, 68, 1, 68, 3, 68, 770, 8, 68, 1, 68, 3, 68, 773, 8, 68, 1, 69, 1, 69, 1, 69, 1, 69, 5, + 69, 779, 8, 69, 10, 69, 12, 69, 782, 9, 69, 1, 69, 3, 69, 785, 8, 69, 1, 69, 3, 69, 788, + 8, 69, 1, 70, 1, 70, 1, 70, 3, 70, 793, 8, 70, 1, 70, 1, 70, 3, 70, 797, 8, 70, 1, 70, 3, + 70, 800, 8, 70, 1, 70, 3, 70, 803, 8, 70, 1, 70, 1, 70, 1, 70, 3, 70, 808, 8, 70, 1, 70, + 3, 70, 811, 8, 70, 3, 70, 813, 8, 70, 1, 71, 1, 71, 1, 71, 1, 71, 3, 71, 819, 8, 71, 1, + 71, 3, 71, 822, 8, 71, 1, 71, 1, 71, 3, 71, 826, 8, 71, 1, 71, 1, 71, 3, 71, 830, 8, 71, + 1, 71, 1, 71, 3, 71, 834, 8, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, + 1, 72, 3, 72, 845, 8, 72, 1, 73, 1, 73, 1, 73, 3, 73, 850, 8, 73, 1, 73, 1, 73, 1, 74, 1, + 74, 1, 74, 5, 74, 857, 8, 74, 10, 74, 12, 74, 860, 9, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, + 75, 1, 75, 1, 75, 5, 75, 869, 8, 75, 10, 75, 12, 75, 872, 9, 75, 1, 75, 1, 75, 1, 75, 5, + 75, 877, 8, 75, 10, 75, 12, 75, 880, 9, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, + 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 78, 1, 78, 1, 79, 1, 79, 1, 80, 1, 80, 1, 81, 1, 81, 1, + 82, 1, 82, 1, 83, 1, 83, 1, 84, 1, 84, 1, 85, 1, 85, 1, 86, 1, 86, 1, 87, 1, 87, 1, 88, 1, + 88, 1, 89, 1, 89, 1, 90, 1, 90, 1, 91, 1, 91, 1, 92, 1, 92, 1, 93, 1, 93, 1, 93, 1, 94, 1, + 94, 1, 94, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, 98, 1, 98, 1, + 98, 1, 99, 1, 99, 1, 99, 1, 100, 1, 100, 1, 100, 1, 101, 1, 101, 1, 102, 1, 102, 1, 103, + 1, 103, 1, 104, 1, 104, 1, 105, 1, 105, 1, 106, 1, 106, 1, 107, 1, 107, 1, 108, 1, 108, + 1, 109, 1, 109, 1, 109, 1, 110, 1, 110, 1, 110, 1, 111, 1, 111, 1, 111, 1, 112, 1, 112, + 1, 112, 1, 113, 1, 113, 1, 113, 1, 114, 1, 114, 1, 114, 1, 115, 1, 115, 1, 115, 1, 116, + 1, 116, 1, 116, 1, 117, 1, 117, 1, 117, 1, 117, 1, 118, 1, 118, 1, 118, 1, 118, 1, 119, + 1, 119, 1, 119, 1, 119, 1, 119, 1, 120, 1, 120, 1, 120, 1, 121, 1, 121, 1, 121, 1, 122, + 1, 122, 1, 123, 1, 123, 1, 123, 1, 123, 1, 124, 4, 124, 1013, 8, 124, 11, 124, 12, 124, + 1014, 1, 124, 1, 124, 1, 125, 1, 125, 1, 125, 1, 125, 5, 125, 1023, 8, 125, 10, 125, + 12, 125, 1026, 9, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 126, 1, 126, 1, 126, + 1, 126, 5, 126, 1037, 8, 126, 10, 126, 12, 126, 1040, 9, 126, 1, 126, 1, 126, 1, 127, + 1, 127, 5, 127, 1046, 8, 127, 10, 127, 12, 127, 1049, 9, 127, 1, 128, 1, 128, 3, 128, + 1053, 8, 128, 1, 128, 1, 128, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 3, 129, + 1063, 8, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 3, 129, 1072, + 8, 129, 1, 129, 3, 129, 1075, 8, 129, 1, 129, 3, 129, 1078, 8, 129, 1, 129, 1, 129, + 1, 129, 4, 129, 1083, 8, 129, 11, 129, 12, 129, 1084, 1, 129, 1, 129, 1, 129, 1, 129, + 1, 129, 3, 129, 1092, 8, 129, 1, 130, 1, 130, 1, 130, 5, 130, 1097, 8, 130, 10, 130, + 12, 130, 1100, 9, 130, 1, 130, 3, 130, 1103, 8, 130, 1, 131, 1, 131, 1, 132, 1, 132, + 5, 132, 1109, 8, 132, 10, 132, 12, 132, 1112, 9, 132, 1, 132, 3, 132, 1115, 8, 132, + 1, 133, 1, 133, 3, 133, 1119, 8, 133, 1, 134, 1, 134, 1, 134, 1, 134, 3, 134, 1125, + 8, 134, 2, 878, 1024, 0, 135, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, + 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, + 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, + 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, + 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, + 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, + 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, + 145, 73, 147, 74, 149, 75, 151, 76, 153, 77, 155, 78, 157, 79, 159, 80, 161, 81, 163, + 82, 165, 83, 167, 84, 169, 85, 171, 86, 173, 87, 175, 88, 177, 89, 179, 90, 181, 91, + 183, 92, 185, 93, 187, 94, 189, 95, 191, 96, 193, 97, 195, 98, 197, 99, 199, 100, + 201, 101, 203, 102, 205, 103, 207, 104, 209, 105, 211, 106, 213, 107, 215, 108, + 217, 109, 219, 110, 221, 111, 223, 112, 225, 113, 227, 114, 229, 115, 231, 116, + 233, 117, 235, 118, 237, 119, 239, 120, 241, 121, 243, 122, 245, 123, 247, 124, + 249, 125, 251, 126, 253, 127, 255, 128, 257, 0, 259, 0, 261, 0, 263, 0, 265, 0, 267, + 0, 269, 0, 1, 0, 27, 1, 0, 49, 57, 2, 0, 76, 76, 108, 108, 2, 0, 88, 88, 120, 120, 3, 0, + 48, 57, 65, 70, 97, 102, 4, 0, 48, 57, 65, 70, 95, 95, 97, 102, 1, 0, 48, 55, 2, 0, 48, + 55, 95, 95, 2, 0, 66, 66, 98, 98, 1, 0, 48, 49, 2, 0, 48, 49, 95, 95, 4, 0, 68, 68, 70, + 70, 100, 100, 102, 102, 2, 0, 80, 80, 112, 112, 2, 0, 43, 43, 45, 45, 4, 0, 10, 10, 13, + 13, 39, 39, 92, 92, 4, 0, 10, 10, 13, 13, 34, 34, 92, 92, 2, 0, 9, 9, 32, 32, 2, 0, 10, + 10, 13, 13, 3, 0, 9, 10, 12, 13, 32, 32, 2, 0, 69, 69, 101, 101, 8, 0, 34, 34, 39, 39, + 92, 92, 98, 98, 102, 102, 110, 110, 114, 114, 116, 116, 1, 0, 48, 51, 1, 0, 48, 57, + 2, 0, 48, 57, 95, 95, 4, 0, 36, 36, 65, 90, 95, 95, 97, 122, 2, 0, 0, 127, 55296, 56319, + 1, 0, 55296, 56319, 1, 0, 56320, 57343, 1172, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, + 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, + 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, + 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, + 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, + 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, + 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, + 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, + 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, + 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, + 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, + 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, + 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, + 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, + 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, + 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, + 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, + 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, + 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, + 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, 0, 0, 0, 0, 185, 1, 0, 0, 0, 0, 187, 1, 0, + 0, 0, 0, 189, 1, 0, 0, 0, 0, 191, 1, 0, 0, 0, 0, 193, 1, 0, 0, 0, 0, 195, 1, 0, 0, 0, 0, 197, + 1, 0, 0, 0, 0, 199, 1, 0, 0, 0, 0, 201, 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 205, 1, 0, 0, 0, + 0, 207, 1, 0, 0, 0, 0, 209, 1, 0, 0, 0, 0, 211, 1, 0, 0, 0, 0, 213, 1, 0, 0, 0, 0, 215, 1, + 0, 0, 0, 0, 217, 1, 0, 0, 0, 0, 219, 1, 0, 0, 0, 0, 221, 1, 0, 0, 0, 0, 223, 1, 0, 0, 0, 0, + 225, 1, 0, 0, 0, 0, 227, 1, 0, 0, 0, 0, 229, 1, 0, 0, 0, 0, 231, 1, 0, 0, 0, 0, 233, 1, 0, + 0, 0, 0, 235, 1, 0, 0, 0, 0, 237, 1, 0, 0, 0, 0, 239, 1, 0, 0, 0, 0, 241, 1, 0, 0, 0, 0, 243, + 1, 0, 0, 0, 0, 245, 1, 0, 0, 0, 0, 247, 1, 0, 0, 0, 0, 249, 1, 0, 0, 0, 0, 251, 1, 0, 0, 0, + 0, 253, 1, 0, 0, 0, 0, 255, 1, 0, 0, 0, 1, 271, 1, 0, 0, 0, 3, 280, 1, 0, 0, 0, 5, 287, 1, + 0, 0, 0, 7, 295, 1, 0, 0, 0, 9, 301, 1, 0, 0, 0, 11, 306, 1, 0, 0, 0, 13, 311, 1, 0, 0, 0, + 15, 317, 1, 0, 0, 0, 17, 322, 1, 0, 0, 0, 19, 328, 1, 0, 0, 0, 21, 334, 1, 0, 0, 0, 23, 343, + 1, 0, 0, 0, 25, 351, 1, 0, 0, 0, 27, 354, 1, 0, 0, 0, 29, 361, 1, 0, 0, 0, 31, 366, 1, 0, + 0, 0, 33, 371, 1, 0, 0, 0, 35, 379, 1, 0, 0, 0, 37, 385, 1, 0, 0, 0, 39, 393, 1, 0, 0, 0, + 41, 399, 1, 0, 0, 0, 43, 403, 1, 0, 0, 0, 45, 406, 1, 0, 0, 0, 47, 411, 1, 0, 0, 0, 49, 422, + 1, 0, 0, 0, 51, 429, 1, 0, 0, 0, 53, 440, 1, 0, 0, 0, 55, 444, 1, 0, 0, 0, 57, 454, 1, 0, + 0, 0, 59, 459, 1, 0, 0, 0, 61, 466, 1, 0, 0, 0, 63, 470, 1, 0, 0, 0, 65, 478, 1, 0, 0, 0, + 67, 486, 1, 0, 0, 0, 69, 496, 1, 0, 0, 0, 71, 503, 1, 0, 0, 0, 73, 510, 1, 0, 0, 0, 75, 516, + 1, 0, 0, 0, 77, 523, 1, 0, 0, 0, 79, 532, 1, 0, 0, 0, 81, 538, 1, 0, 0, 0, 83, 545, 1, 0, + 0, 0, 85, 558, 1, 0, 0, 0, 87, 563, 1, 0, 0, 0, 89, 569, 1, 0, 0, 0, 91, 576, 1, 0, 0, 0, + 93, 586, 1, 0, 0, 0, 95, 590, 1, 0, 0, 0, 97, 595, 1, 0, 0, 0, 99, 604, 1, 0, 0, 0, 101, + 610, 1, 0, 0, 0, 103, 617, 1, 0, 0, 0, 105, 622, 1, 0, 0, 0, 107, 631, 1, 0, 0, 0, 109, + 639, 1, 0, 0, 0, 111, 645, 1, 0, 0, 0, 113, 648, 1, 0, 0, 0, 115, 653, 1, 0, 0, 0, 117, + 662, 1, 0, 0, 0, 119, 667, 1, 0, 0, 0, 121, 678, 1, 0, 0, 0, 123, 682, 1, 0, 0, 0, 125, + 688, 1, 0, 0, 0, 127, 695, 1, 0, 0, 0, 129, 702, 1, 0, 0, 0, 131, 710, 1, 0, 0, 0, 133, + 734, 1, 0, 0, 0, 135, 739, 1, 0, 0, 0, 137, 754, 1, 0, 0, 0, 139, 774, 1, 0, 0, 0, 141, + 812, 1, 0, 0, 0, 143, 814, 1, 0, 0, 0, 145, 844, 1, 0, 0, 0, 147, 846, 1, 0, 0, 0, 149, + 853, 1, 0, 0, 0, 151, 863, 1, 0, 0, 0, 153, 885, 1, 0, 0, 0, 155, 890, 1, 0, 0, 0, 157, + 892, 1, 0, 0, 0, 159, 894, 1, 0, 0, 0, 161, 896, 1, 0, 0, 0, 163, 898, 1, 0, 0, 0, 165, + 900, 1, 0, 0, 0, 167, 902, 1, 0, 0, 0, 169, 904, 1, 0, 0, 0, 171, 906, 1, 0, 0, 0, 173, + 908, 1, 0, 0, 0, 175, 910, 1, 0, 0, 0, 177, 912, 1, 0, 0, 0, 179, 914, 1, 0, 0, 0, 181, + 916, 1, 0, 0, 0, 183, 918, 1, 0, 0, 0, 185, 920, 1, 0, 0, 0, 187, 922, 1, 0, 0, 0, 189, + 925, 1, 0, 0, 0, 191, 928, 1, 0, 0, 0, 193, 931, 1, 0, 0, 0, 195, 934, 1, 0, 0, 0, 197, + 937, 1, 0, 0, 0, 199, 940, 1, 0, 0, 0, 201, 943, 1, 0, 0, 0, 203, 946, 1, 0, 0, 0, 205, + 948, 1, 0, 0, 0, 207, 950, 1, 0, 0, 0, 209, 952, 1, 0, 0, 0, 211, 954, 1, 0, 0, 0, 213, + 956, 1, 0, 0, 0, 215, 958, 1, 0, 0, 0, 217, 960, 1, 0, 0, 0, 219, 962, 1, 0, 0, 0, 221, + 965, 1, 0, 0, 0, 223, 968, 1, 0, 0, 0, 225, 971, 1, 0, 0, 0, 227, 974, 1, 0, 0, 0, 229, + 977, 1, 0, 0, 0, 231, 980, 1, 0, 0, 0, 233, 983, 1, 0, 0, 0, 235, 986, 1, 0, 0, 0, 237, + 990, 1, 0, 0, 0, 239, 994, 1, 0, 0, 0, 241, 999, 1, 0, 0, 0, 243, 1002, 1, 0, 0, 0, 245, + 1005, 1, 0, 0, 0, 247, 1007, 1, 0, 0, 0, 249, 1012, 1, 0, 0, 0, 251, 1018, 1, 0, 0, 0, + 253, 1032, 1, 0, 0, 0, 255, 1043, 1, 0, 0, 0, 257, 1050, 1, 0, 0, 0, 259, 1091, 1, 0, + 0, 0, 261, 1093, 1, 0, 0, 0, 263, 1104, 1, 0, 0, 0, 265, 1106, 1, 0, 0, 0, 267, 1118, + 1, 0, 0, 0, 269, 1124, 1, 0, 0, 0, 271, 272, 5, 97, 0, 0, 272, 273, 5, 98, 0, 0, 273, 274, + 5, 115, 0, 0, 274, 275, 5, 116, 0, 0, 275, 276, 5, 114, 0, 0, 276, 277, 5, 97, 0, 0, 277, + 278, 5, 99, 0, 0, 278, 279, 5, 116, 0, 0, 279, 2, 1, 0, 0, 0, 280, 281, 5, 97, 0, 0, 281, + 282, 5, 115, 0, 0, 282, 283, 5, 115, 0, 0, 283, 284, 5, 101, 0, 0, 284, 285, 5, 114, + 0, 0, 285, 286, 5, 116, 0, 0, 286, 4, 1, 0, 0, 0, 287, 288, 5, 98, 0, 0, 288, 289, 5, 111, + 0, 0, 289, 290, 5, 111, 0, 0, 290, 291, 5, 108, 0, 0, 291, 292, 5, 101, 0, 0, 292, 293, + 5, 97, 0, 0, 293, 294, 5, 110, 0, 0, 294, 6, 1, 0, 0, 0, 295, 296, 5, 98, 0, 0, 296, 297, + 5, 114, 0, 0, 297, 298, 5, 101, 0, 0, 298, 299, 5, 97, 0, 0, 299, 300, 5, 107, 0, 0, 300, + 8, 1, 0, 0, 0, 301, 302, 5, 98, 0, 0, 302, 303, 5, 121, 0, 0, 303, 304, 5, 116, 0, 0, 304, + 305, 5, 101, 0, 0, 305, 10, 1, 0, 0, 0, 306, 307, 5, 99, 0, 0, 307, 308, 5, 97, 0, 0, 308, + 309, 5, 115, 0, 0, 309, 310, 5, 101, 0, 0, 310, 12, 1, 0, 0, 0, 311, 312, 5, 99, 0, 0, + 312, 313, 5, 97, 0, 0, 313, 314, 5, 116, 0, 0, 314, 315, 5, 99, 0, 0, 315, 316, 5, 104, + 0, 0, 316, 14, 1, 0, 0, 0, 317, 318, 5, 99, 0, 0, 318, 319, 5, 104, 0, 0, 319, 320, 5, + 97, 0, 0, 320, 321, 5, 114, 0, 0, 321, 16, 1, 0, 0, 0, 322, 323, 5, 99, 0, 0, 323, 324, + 5, 108, 0, 0, 324, 325, 5, 97, 0, 0, 325, 326, 5, 115, 0, 0, 326, 327, 5, 115, 0, 0, 327, + 18, 1, 0, 0, 0, 328, 329, 5, 99, 0, 0, 329, 330, 5, 111, 0, 0, 330, 331, 5, 110, 0, 0, + 331, 332, 5, 115, 0, 0, 332, 333, 5, 116, 0, 0, 333, 20, 1, 0, 0, 0, 334, 335, 5, 99, + 0, 0, 335, 336, 5, 111, 0, 0, 336, 337, 5, 110, 0, 0, 337, 338, 5, 116, 0, 0, 338, 339, + 5, 105, 0, 0, 339, 340, 5, 110, 0, 0, 340, 341, 5, 117, 0, 0, 341, 342, 5, 101, 0, 0, + 342, 22, 1, 0, 0, 0, 343, 344, 5, 100, 0, 0, 344, 345, 5, 101, 0, 0, 345, 346, 5, 102, + 0, 0, 346, 347, 5, 97, 0, 0, 347, 348, 5, 117, 0, 0, 348, 349, 5, 108, 0, 0, 349, 350, + 5, 116, 0, 0, 350, 24, 1, 0, 0, 0, 351, 352, 5, 100, 0, 0, 352, 353, 5, 111, 0, 0, 353, + 26, 1, 0, 0, 0, 354, 355, 5, 100, 0, 0, 355, 356, 5, 111, 0, 0, 356, 357, 5, 117, 0, 0, + 357, 358, 5, 98, 0, 0, 358, 359, 5, 108, 0, 0, 359, 360, 5, 101, 0, 0, 360, 28, 1, 0, + 0, 0, 361, 362, 5, 101, 0, 0, 362, 363, 5, 108, 0, 0, 363, 364, 5, 115, 0, 0, 364, 365, + 5, 101, 0, 0, 365, 30, 1, 0, 0, 0, 366, 367, 5, 101, 0, 0, 367, 368, 5, 110, 0, 0, 368, + 369, 5, 117, 0, 0, 369, 370, 5, 109, 0, 0, 370, 32, 1, 0, 0, 0, 371, 372, 5, 101, 0, 0, + 372, 373, 5, 120, 0, 0, 373, 374, 5, 116, 0, 0, 374, 375, 5, 101, 0, 0, 375, 376, 5, + 110, 0, 0, 376, 377, 5, 100, 0, 0, 377, 378, 5, 115, 0, 0, 378, 34, 1, 0, 0, 0, 379, 380, + 5, 102, 0, 0, 380, 381, 5, 105, 0, 0, 381, 382, 5, 110, 0, 0, 382, 383, 5, 97, 0, 0, 383, + 384, 5, 108, 0, 0, 384, 36, 1, 0, 0, 0, 385, 386, 5, 102, 0, 0, 386, 387, 5, 105, 0, 0, + 387, 388, 5, 110, 0, 0, 388, 389, 5, 97, 0, 0, 389, 390, 5, 108, 0, 0, 390, 391, 5, 108, + 0, 0, 391, 392, 5, 121, 0, 0, 392, 38, 1, 0, 0, 0, 393, 394, 5, 102, 0, 0, 394, 395, 5, + 108, 0, 0, 395, 396, 5, 111, 0, 0, 396, 397, 5, 97, 0, 0, 397, 398, 5, 116, 0, 0, 398, + 40, 1, 0, 0, 0, 399, 400, 5, 102, 0, 0, 400, 401, 5, 111, 0, 0, 401, 402, 5, 114, 0, 0, + 402, 42, 1, 0, 0, 0, 403, 404, 5, 105, 0, 0, 404, 405, 5, 102, 0, 0, 405, 44, 1, 0, 0, + 0, 406, 407, 5, 103, 0, 0, 407, 408, 5, 111, 0, 0, 408, 409, 5, 116, 0, 0, 409, 410, + 5, 111, 0, 0, 410, 46, 1, 0, 0, 0, 411, 412, 5, 105, 0, 0, 412, 413, 5, 109, 0, 0, 413, + 414, 5, 112, 0, 0, 414, 415, 5, 108, 0, 0, 415, 416, 5, 101, 0, 0, 416, 417, 5, 109, + 0, 0, 417, 418, 5, 101, 0, 0, 418, 419, 5, 110, 0, 0, 419, 420, 5, 116, 0, 0, 420, 421, + 5, 115, 0, 0, 421, 48, 1, 0, 0, 0, 422, 423, 5, 105, 0, 0, 423, 424, 5, 109, 0, 0, 424, + 425, 5, 112, 0, 0, 425, 426, 5, 111, 0, 0, 426, 427, 5, 114, 0, 0, 427, 428, 5, 116, + 0, 0, 428, 50, 1, 0, 0, 0, 429, 430, 5, 105, 0, 0, 430, 431, 5, 110, 0, 0, 431, 432, 5, + 115, 0, 0, 432, 433, 5, 116, 0, 0, 433, 434, 5, 97, 0, 0, 434, 435, 5, 110, 0, 0, 435, + 436, 5, 99, 0, 0, 436, 437, 5, 101, 0, 0, 437, 438, 5, 111, 0, 0, 438, 439, 5, 102, 0, + 0, 439, 52, 1, 0, 0, 0, 440, 441, 5, 105, 0, 0, 441, 442, 5, 110, 0, 0, 442, 443, 5, 116, + 0, 0, 443, 54, 1, 0, 0, 0, 444, 445, 5, 105, 0, 0, 445, 446, 5, 110, 0, 0, 446, 447, 5, + 116, 0, 0, 447, 448, 5, 101, 0, 0, 448, 449, 5, 114, 0, 0, 449, 450, 5, 102, 0, 0, 450, + 451, 5, 97, 0, 0, 451, 452, 5, 99, 0, 0, 452, 453, 5, 101, 0, 0, 453, 56, 1, 0, 0, 0, 454, + 455, 5, 108, 0, 0, 455, 456, 5, 111, 0, 0, 456, 457, 5, 110, 0, 0, 457, 458, 5, 103, + 0, 0, 458, 58, 1, 0, 0, 0, 459, 460, 5, 110, 0, 0, 460, 461, 5, 97, 0, 0, 461, 462, 5, + 116, 0, 0, 462, 463, 5, 105, 0, 0, 463, 464, 5, 118, 0, 0, 464, 465, 5, 101, 0, 0, 465, + 60, 1, 0, 0, 0, 466, 467, 5, 110, 0, 0, 467, 468, 5, 101, 0, 0, 468, 469, 5, 119, 0, 0, + 469, 62, 1, 0, 0, 0, 470, 471, 5, 112, 0, 0, 471, 472, 5, 97, 0, 0, 472, 473, 5, 99, 0, + 0, 473, 474, 5, 107, 0, 0, 474, 475, 5, 97, 0, 0, 475, 476, 5, 103, 0, 0, 476, 477, 5, + 101, 0, 0, 477, 64, 1, 0, 0, 0, 478, 479, 5, 112, 0, 0, 479, 480, 5, 114, 0, 0, 480, 481, + 5, 105, 0, 0, 481, 482, 5, 118, 0, 0, 482, 483, 5, 97, 0, 0, 483, 484, 5, 116, 0, 0, 484, + 485, 5, 101, 0, 0, 485, 66, 1, 0, 0, 0, 486, 487, 5, 112, 0, 0, 487, 488, 5, 114, 0, 0, + 488, 489, 5, 111, 0, 0, 489, 490, 5, 116, 0, 0, 490, 491, 5, 101, 0, 0, 491, 492, 5, + 99, 0, 0, 492, 493, 5, 116, 0, 0, 493, 494, 5, 101, 0, 0, 494, 495, 5, 100, 0, 0, 495, + 68, 1, 0, 0, 0, 496, 497, 5, 112, 0, 0, 497, 498, 5, 117, 0, 0, 498, 499, 5, 98, 0, 0, + 499, 500, 5, 108, 0, 0, 500, 501, 5, 105, 0, 0, 501, 502, 5, 99, 0, 0, 502, 70, 1, 0, + 0, 0, 503, 504, 5, 114, 0, 0, 504, 505, 5, 101, 0, 0, 505, 506, 5, 116, 0, 0, 506, 507, + 5, 117, 0, 0, 507, 508, 5, 114, 0, 0, 508, 509, 5, 110, 0, 0, 509, 72, 1, 0, 0, 0, 510, + 511, 5, 115, 0, 0, 511, 512, 5, 104, 0, 0, 512, 513, 5, 111, 0, 0, 513, 514, 5, 114, + 0, 0, 514, 515, 5, 116, 0, 0, 515, 74, 1, 0, 0, 0, 516, 517, 5, 115, 0, 0, 517, 518, 5, + 116, 0, 0, 518, 519, 5, 97, 0, 0, 519, 520, 5, 116, 0, 0, 520, 521, 5, 105, 0, 0, 521, + 522, 5, 99, 0, 0, 522, 76, 1, 0, 0, 0, 523, 524, 5, 115, 0, 0, 524, 525, 5, 116, 0, 0, + 525, 526, 5, 114, 0, 0, 526, 527, 5, 105, 0, 0, 527, 528, 5, 99, 0, 0, 528, 529, 5, 116, + 0, 0, 529, 530, 5, 102, 0, 0, 530, 531, 5, 112, 0, 0, 531, 78, 1, 0, 0, 0, 532, 533, 5, + 115, 0, 0, 533, 534, 5, 117, 0, 0, 534, 535, 5, 112, 0, 0, 535, 536, 5, 101, 0, 0, 536, + 537, 5, 114, 0, 0, 537, 80, 1, 0, 0, 0, 538, 539, 5, 115, 0, 0, 539, 540, 5, 119, 0, 0, + 540, 541, 5, 105, 0, 0, 541, 542, 5, 116, 0, 0, 542, 543, 5, 99, 0, 0, 543, 544, 5, 104, + 0, 0, 544, 82, 1, 0, 0, 0, 545, 546, 5, 115, 0, 0, 546, 547, 5, 121, 0, 0, 547, 548, 5, + 110, 0, 0, 548, 549, 5, 99, 0, 0, 549, 550, 5, 104, 0, 0, 550, 551, 5, 114, 0, 0, 551, + 552, 5, 111, 0, 0, 552, 553, 5, 110, 0, 0, 553, 554, 5, 105, 0, 0, 554, 555, 5, 122, + 0, 0, 555, 556, 5, 101, 0, 0, 556, 557, 5, 100, 0, 0, 557, 84, 1, 0, 0, 0, 558, 559, 5, + 116, 0, 0, 559, 560, 5, 104, 0, 0, 560, 561, 5, 105, 0, 0, 561, 562, 5, 115, 0, 0, 562, + 86, 1, 0, 0, 0, 563, 564, 5, 116, 0, 0, 564, 565, 5, 104, 0, 0, 565, 566, 5, 114, 0, 0, + 566, 567, 5, 111, 0, 0, 567, 568, 5, 119, 0, 0, 568, 88, 1, 0, 0, 0, 569, 570, 5, 116, + 0, 0, 570, 571, 5, 104, 0, 0, 571, 572, 5, 114, 0, 0, 572, 573, 5, 111, 0, 0, 573, 574, + 5, 119, 0, 0, 574, 575, 5, 115, 0, 0, 575, 90, 1, 0, 0, 0, 576, 577, 5, 116, 0, 0, 577, + 578, 5, 114, 0, 0, 578, 579, 5, 97, 0, 0, 579, 580, 5, 110, 0, 0, 580, 581, 5, 115, 0, + 0, 581, 582, 5, 105, 0, 0, 582, 583, 5, 101, 0, 0, 583, 584, 5, 110, 0, 0, 584, 585, + 5, 116, 0, 0, 585, 92, 1, 0, 0, 0, 586, 587, 5, 116, 0, 0, 587, 588, 5, 114, 0, 0, 588, + 589, 5, 121, 0, 0, 589, 94, 1, 0, 0, 0, 590, 591, 5, 118, 0, 0, 591, 592, 5, 111, 0, 0, + 592, 593, 5, 105, 0, 0, 593, 594, 5, 100, 0, 0, 594, 96, 1, 0, 0, 0, 595, 596, 5, 118, + 0, 0, 596, 597, 5, 111, 0, 0, 597, 598, 5, 108, 0, 0, 598, 599, 5, 97, 0, 0, 599, 600, + 5, 116, 0, 0, 600, 601, 5, 105, 0, 0, 601, 602, 5, 108, 0, 0, 602, 603, 5, 101, 0, 0, + 603, 98, 1, 0, 0, 0, 604, 605, 5, 119, 0, 0, 605, 606, 5, 104, 0, 0, 606, 607, 5, 105, + 0, 0, 607, 608, 5, 108, 0, 0, 608, 609, 5, 101, 0, 0, 609, 100, 1, 0, 0, 0, 610, 611, + 5, 109, 0, 0, 611, 612, 5, 111, 0, 0, 612, 613, 5, 100, 0, 0, 613, 614, 5, 117, 0, 0, + 614, 615, 5, 108, 0, 0, 615, 616, 5, 101, 0, 0, 616, 102, 1, 0, 0, 0, 617, 618, 5, 111, + 0, 0, 618, 619, 5, 112, 0, 0, 619, 620, 5, 101, 0, 0, 620, 621, 5, 110, 0, 0, 621, 104, + 1, 0, 0, 0, 622, 623, 5, 114, 0, 0, 623, 624, 5, 101, 0, 0, 624, 625, 5, 113, 0, 0, 625, + 626, 5, 117, 0, 0, 626, 627, 5, 105, 0, 0, 627, 628, 5, 114, 0, 0, 628, 629, 5, 101, + 0, 0, 629, 630, 5, 115, 0, 0, 630, 106, 1, 0, 0, 0, 631, 632, 5, 101, 0, 0, 632, 633, + 5, 120, 0, 0, 633, 634, 5, 112, 0, 0, 634, 635, 5, 111, 0, 0, 635, 636, 5, 114, 0, 0, + 636, 637, 5, 116, 0, 0, 637, 638, 5, 115, 0, 0, 638, 108, 1, 0, 0, 0, 639, 640, 5, 111, + 0, 0, 640, 641, 5, 112, 0, 0, 641, 642, 5, 101, 0, 0, 642, 643, 5, 110, 0, 0, 643, 644, + 5, 115, 0, 0, 644, 110, 1, 0, 0, 0, 645, 646, 5, 116, 0, 0, 646, 647, 5, 111, 0, 0, 647, + 112, 1, 0, 0, 0, 648, 649, 5, 117, 0, 0, 649, 650, 5, 115, 0, 0, 650, 651, 5, 101, 0, + 0, 651, 652, 5, 115, 0, 0, 652, 114, 1, 0, 0, 0, 653, 654, 5, 112, 0, 0, 654, 655, 5, + 114, 0, 0, 655, 656, 5, 111, 0, 0, 656, 657, 5, 118, 0, 0, 657, 658, 5, 105, 0, 0, 658, + 659, 5, 100, 0, 0, 659, 660, 5, 101, 0, 0, 660, 661, 5, 115, 0, 0, 661, 116, 1, 0, 0, + 0, 662, 663, 5, 119, 0, 0, 663, 664, 5, 105, 0, 0, 664, 665, 5, 116, 0, 0, 665, 666, + 5, 104, 0, 0, 666, 118, 1, 0, 0, 0, 667, 668, 5, 116, 0, 0, 668, 669, 5, 114, 0, 0, 669, + 670, 5, 97, 0, 0, 670, 671, 5, 110, 0, 0, 671, 672, 5, 115, 0, 0, 672, 673, 5, 105, 0, + 0, 673, 674, 5, 116, 0, 0, 674, 675, 5, 105, 0, 0, 675, 676, 5, 118, 0, 0, 676, 677, + 5, 101, 0, 0, 677, 120, 1, 0, 0, 0, 678, 679, 5, 118, 0, 0, 679, 680, 5, 97, 0, 0, 680, + 681, 5, 114, 0, 0, 681, 122, 1, 0, 0, 0, 682, 683, 5, 121, 0, 0, 683, 684, 5, 105, 0, + 0, 684, 685, 5, 101, 0, 0, 685, 686, 5, 108, 0, 0, 686, 687, 5, 100, 0, 0, 687, 124, + 1, 0, 0, 0, 688, 689, 5, 114, 0, 0, 689, 690, 5, 101, 0, 0, 690, 691, 5, 99, 0, 0, 691, + 692, 5, 111, 0, 0, 692, 693, 5, 114, 0, 0, 693, 694, 5, 100, 0, 0, 694, 126, 1, 0, 0, + 0, 695, 696, 5, 115, 0, 0, 696, 697, 5, 101, 0, 0, 697, 698, 5, 97, 0, 0, 698, 699, 5, + 108, 0, 0, 699, 700, 5, 101, 0, 0, 700, 701, 5, 100, 0, 0, 701, 128, 1, 0, 0, 0, 702, + 703, 5, 112, 0, 0, 703, 704, 5, 101, 0, 0, 704, 705, 5, 114, 0, 0, 705, 706, 5, 109, + 0, 0, 706, 707, 5, 105, 0, 0, 707, 708, 5, 116, 0, 0, 708, 709, 5, 115, 0, 0, 709, 130, + 1, 0, 0, 0, 710, 711, 5, 110, 0, 0, 711, 712, 5, 111, 0, 0, 712, 713, 5, 110, 0, 0, 713, + 714, 5, 45, 0, 0, 714, 715, 5, 115, 0, 0, 715, 716, 5, 101, 0, 0, 716, 717, 5, 97, 0, + 0, 717, 718, 5, 108, 0, 0, 718, 719, 5, 101, 0, 0, 719, 720, 5, 100, 0, 0, 720, 132, + 1, 0, 0, 0, 721, 735, 5, 48, 0, 0, 722, 732, 7, 0, 0, 0, 723, 725, 3, 265, 132, 0, 724, + 723, 1, 0, 0, 0, 724, 725, 1, 0, 0, 0, 725, 733, 1, 0, 0, 0, 726, 728, 5, 95, 0, 0, 727, + 726, 1, 0, 0, 0, 728, 729, 1, 0, 0, 0, 729, 727, 1, 0, 0, 0, 729, 730, 1, 0, 0, 0, 730, + 731, 1, 0, 0, 0, 731, 733, 3, 265, 132, 0, 732, 724, 1, 0, 0, 0, 732, 727, 1, 0, 0, 0, + 733, 735, 1, 0, 0, 0, 734, 721, 1, 0, 0, 0, 734, 722, 1, 0, 0, 0, 735, 737, 1, 0, 0, 0, + 736, 738, 7, 1, 0, 0, 737, 736, 1, 0, 0, 0, 737, 738, 1, 0, 0, 0, 738, 134, 1, 0, 0, 0, + 739, 740, 5, 48, 0, 0, 740, 741, 7, 2, 0, 0, 741, 749, 7, 3, 0, 0, 742, 744, 7, 4, 0, 0, + 743, 742, 1, 0, 0, 0, 744, 747, 1, 0, 0, 0, 745, 743, 1, 0, 0, 0, 745, 746, 1, 0, 0, 0, + 746, 748, 1, 0, 0, 0, 747, 745, 1, 0, 0, 0, 748, 750, 7, 3, 0, 0, 749, 745, 1, 0, 0, 0, + 749, 750, 1, 0, 0, 0, 750, 752, 1, 0, 0, 0, 751, 753, 7, 1, 0, 0, 752, 751, 1, 0, 0, 0, + 752, 753, 1, 0, 0, 0, 753, 136, 1, 0, 0, 0, 754, 758, 5, 48, 0, 0, 755, 757, 5, 95, 0, + 0, 756, 755, 1, 0, 0, 0, 757, 760, 1, 0, 0, 0, 758, 756, 1, 0, 0, 0, 758, 759, 1, 0, 0, + 0, 759, 761, 1, 0, 0, 0, 760, 758, 1, 0, 0, 0, 761, 769, 7, 5, 0, 0, 762, 764, 7, 6, 0, + 0, 763, 762, 1, 0, 0, 0, 764, 767, 1, 0, 0, 0, 765, 763, 1, 0, 0, 0, 765, 766, 1, 0, 0, + 0, 766, 768, 1, 0, 0, 0, 767, 765, 1, 0, 0, 0, 768, 770, 7, 5, 0, 0, 769, 765, 1, 0, 0, + 0, 769, 770, 1, 0, 0, 0, 770, 772, 1, 0, 0, 0, 771, 773, 7, 1, 0, 0, 772, 771, 1, 0, 0, + 0, 772, 773, 1, 0, 0, 0, 773, 138, 1, 0, 0, 0, 774, 775, 5, 48, 0, 0, 775, 776, 7, 7, 0, + 0, 776, 784, 7, 8, 0, 0, 777, 779, 7, 9, 0, 0, 778, 777, 1, 0, 0, 0, 779, 782, 1, 0, 0, + 0, 780, 778, 1, 0, 0, 0, 780, 781, 1, 0, 0, 0, 781, 783, 1, 0, 0, 0, 782, 780, 1, 0, 0, + 0, 783, 785, 7, 8, 0, 0, 784, 780, 1, 0, 0, 0, 784, 785, 1, 0, 0, 0, 785, 787, 1, 0, 0, + 0, 786, 788, 7, 1, 0, 0, 787, 786, 1, 0, 0, 0, 787, 788, 1, 0, 0, 0, 788, 140, 1, 0, 0, + 0, 789, 790, 3, 265, 132, 0, 790, 792, 5, 46, 0, 0, 791, 793, 3, 265, 132, 0, 792, 791, + 1, 0, 0, 0, 792, 793, 1, 0, 0, 0, 793, 797, 1, 0, 0, 0, 794, 795, 5, 46, 0, 0, 795, 797, + 3, 265, 132, 0, 796, 789, 1, 0, 0, 0, 796, 794, 1, 0, 0, 0, 797, 799, 1, 0, 0, 0, 798, + 800, 3, 257, 128, 0, 799, 798, 1, 0, 0, 0, 799, 800, 1, 0, 0, 0, 800, 802, 1, 0, 0, 0, + 801, 803, 7, 10, 0, 0, 802, 801, 1, 0, 0, 0, 802, 803, 1, 0, 0, 0, 803, 813, 1, 0, 0, 0, + 804, 810, 3, 265, 132, 0, 805, 807, 3, 257, 128, 0, 806, 808, 7, 10, 0, 0, 807, 806, + 1, 0, 0, 0, 807, 808, 1, 0, 0, 0, 808, 811, 1, 0, 0, 0, 809, 811, 7, 10, 0, 0, 810, 805, + 1, 0, 0, 0, 810, 809, 1, 0, 0, 0, 811, 813, 1, 0, 0, 0, 812, 796, 1, 0, 0, 0, 812, 804, + 1, 0, 0, 0, 813, 142, 1, 0, 0, 0, 814, 815, 5, 48, 0, 0, 815, 825, 7, 2, 0, 0, 816, 818, + 3, 261, 130, 0, 817, 819, 5, 46, 0, 0, 818, 817, 1, 0, 0, 0, 818, 819, 1, 0, 0, 0, 819, + 826, 1, 0, 0, 0, 820, 822, 3, 261, 130, 0, 821, 820, 1, 0, 0, 0, 821, 822, 1, 0, 0, 0, + 822, 823, 1, 0, 0, 0, 823, 824, 5, 46, 0, 0, 824, 826, 3, 261, 130, 0, 825, 816, 1, 0, + 0, 0, 825, 821, 1, 0, 0, 0, 826, 827, 1, 0, 0, 0, 827, 829, 7, 11, 0, 0, 828, 830, 7, 12, + 0, 0, 829, 828, 1, 0, 0, 0, 829, 830, 1, 0, 0, 0, 830, 831, 1, 0, 0, 0, 831, 833, 3, 265, + 132, 0, 832, 834, 7, 10, 0, 0, 833, 832, 1, 0, 0, 0, 833, 834, 1, 0, 0, 0, 834, 144, 1, + 0, 0, 0, 835, 836, 5, 116, 0, 0, 836, 837, 5, 114, 0, 0, 837, 838, 5, 117, 0, 0, 838, + 845, 5, 101, 0, 0, 839, 840, 5, 102, 0, 0, 840, 841, 5, 97, 0, 0, 841, 842, 5, 108, 0, + 0, 842, 843, 5, 115, 0, 0, 843, 845, 5, 101, 0, 0, 844, 835, 1, 0, 0, 0, 844, 839, 1, + 0, 0, 0, 845, 146, 1, 0, 0, 0, 846, 849, 5, 39, 0, 0, 847, 850, 8, 13, 0, 0, 848, 850, + 3, 259, 129, 0, 849, 847, 1, 0, 0, 0, 849, 848, 1, 0, 0, 0, 850, 851, 1, 0, 0, 0, 851, + 852, 5, 39, 0, 0, 852, 148, 1, 0, 0, 0, 853, 858, 5, 34, 0, 0, 854, 857, 8, 14, 0, 0, 855, + 857, 3, 259, 129, 0, 856, 854, 1, 0, 0, 0, 856, 855, 1, 0, 0, 0, 857, 860, 1, 0, 0, 0, + 858, 856, 1, 0, 0, 0, 858, 859, 1, 0, 0, 0, 859, 861, 1, 0, 0, 0, 860, 858, 1, 0, 0, 0, + 861, 862, 5, 34, 0, 0, 862, 150, 1, 0, 0, 0, 863, 864, 5, 34, 0, 0, 864, 865, 5, 34, 0, + 0, 865, 866, 5, 34, 0, 0, 866, 870, 1, 0, 0, 0, 867, 869, 7, 15, 0, 0, 868, 867, 1, 0, + 0, 0, 869, 872, 1, 0, 0, 0, 870, 868, 1, 0, 0, 0, 870, 871, 1, 0, 0, 0, 871, 873, 1, 0, + 0, 0, 872, 870, 1, 0, 0, 0, 873, 878, 7, 16, 0, 0, 874, 877, 9, 0, 0, 0, 875, 877, 3, 259, + 129, 0, 876, 874, 1, 0, 0, 0, 876, 875, 1, 0, 0, 0, 877, 880, 1, 0, 0, 0, 878, 879, 1, + 0, 0, 0, 878, 876, 1, 0, 0, 0, 879, 881, 1, 0, 0, 0, 880, 878, 1, 0, 0, 0, 881, 882, 5, + 34, 0, 0, 882, 883, 5, 34, 0, 0, 883, 884, 5, 34, 0, 0, 884, 152, 1, 0, 0, 0, 885, 886, + 5, 110, 0, 0, 886, 887, 5, 117, 0, 0, 887, 888, 5, 108, 0, 0, 888, 889, 5, 108, 0, 0, + 889, 154, 1, 0, 0, 0, 890, 891, 5, 40, 0, 0, 891, 156, 1, 0, 0, 0, 892, 893, 5, 41, 0, + 0, 893, 158, 1, 0, 0, 0, 894, 895, 5, 123, 0, 0, 895, 160, 1, 0, 0, 0, 896, 897, 5, 125, + 0, 0, 897, 162, 1, 0, 0, 0, 898, 899, 5, 91, 0, 0, 899, 164, 1, 0, 0, 0, 900, 901, 5, 93, + 0, 0, 901, 166, 1, 0, 0, 0, 902, 903, 5, 59, 0, 0, 903, 168, 1, 0, 0, 0, 904, 905, 5, 44, + 0, 0, 905, 170, 1, 0, 0, 0, 906, 907, 5, 46, 0, 0, 907, 172, 1, 0, 0, 0, 908, 909, 5, 61, + 0, 0, 909, 174, 1, 0, 0, 0, 910, 911, 5, 62, 0, 0, 911, 176, 1, 0, 0, 0, 912, 913, 5, 60, + 0, 0, 913, 178, 1, 0, 0, 0, 914, 915, 5, 33, 0, 0, 915, 180, 1, 0, 0, 0, 916, 917, 5, 126, + 0, 0, 917, 182, 1, 0, 0, 0, 918, 919, 5, 63, 0, 0, 919, 184, 1, 0, 0, 0, 920, 921, 5, 58, + 0, 0, 921, 186, 1, 0, 0, 0, 922, 923, 5, 61, 0, 0, 923, 924, 5, 61, 0, 0, 924, 188, 1, + 0, 0, 0, 925, 926, 5, 60, 0, 0, 926, 927, 5, 61, 0, 0, 927, 190, 1, 0, 0, 0, 928, 929, + 5, 62, 0, 0, 929, 930, 5, 61, 0, 0, 930, 192, 1, 0, 0, 0, 931, 932, 5, 33, 0, 0, 932, 933, + 5, 61, 0, 0, 933, 194, 1, 0, 0, 0, 934, 935, 5, 38, 0, 0, 935, 936, 5, 38, 0, 0, 936, 196, + 1, 0, 0, 0, 937, 938, 5, 124, 0, 0, 938, 939, 5, 124, 0, 0, 939, 198, 1, 0, 0, 0, 940, + 941, 5, 43, 0, 0, 941, 942, 5, 43, 0, 0, 942, 200, 1, 0, 0, 0, 943, 944, 5, 45, 0, 0, 944, + 945, 5, 45, 0, 0, 945, 202, 1, 0, 0, 0, 946, 947, 5, 43, 0, 0, 947, 204, 1, 0, 0, 0, 948, + 949, 5, 45, 0, 0, 949, 206, 1, 0, 0, 0, 950, 951, 5, 42, 0, 0, 951, 208, 1, 0, 0, 0, 952, + 953, 5, 47, 0, 0, 953, 210, 1, 0, 0, 0, 954, 955, 5, 38, 0, 0, 955, 212, 1, 0, 0, 0, 956, + 957, 5, 124, 0, 0, 957, 214, 1, 0, 0, 0, 958, 959, 5, 94, 0, 0, 959, 216, 1, 0, 0, 0, 960, + 961, 5, 37, 0, 0, 961, 218, 1, 0, 0, 0, 962, 963, 5, 43, 0, 0, 963, 964, 5, 61, 0, 0, 964, + 220, 1, 0, 0, 0, 965, 966, 5, 45, 0, 0, 966, 967, 5, 61, 0, 0, 967, 222, 1, 0, 0, 0, 968, + 969, 5, 42, 0, 0, 969, 970, 5, 61, 0, 0, 970, 224, 1, 0, 0, 0, 971, 972, 5, 47, 0, 0, 972, + 973, 5, 61, 0, 0, 973, 226, 1, 0, 0, 0, 974, 975, 5, 38, 0, 0, 975, 976, 5, 61, 0, 0, 976, + 228, 1, 0, 0, 0, 977, 978, 5, 124, 0, 0, 978, 979, 5, 61, 0, 0, 979, 230, 1, 0, 0, 0, 980, + 981, 5, 94, 0, 0, 981, 982, 5, 61, 0, 0, 982, 232, 1, 0, 0, 0, 983, 984, 5, 37, 0, 0, 984, + 985, 5, 61, 0, 0, 985, 234, 1, 0, 0, 0, 986, 987, 5, 60, 0, 0, 987, 988, 5, 60, 0, 0, 988, + 989, 5, 61, 0, 0, 989, 236, 1, 0, 0, 0, 990, 991, 5, 62, 0, 0, 991, 992, 5, 62, 0, 0, 992, + 993, 5, 61, 0, 0, 993, 238, 1, 0, 0, 0, 994, 995, 5, 62, 0, 0, 995, 996, 5, 62, 0, 0, 996, + 997, 5, 62, 0, 0, 997, 998, 5, 61, 0, 0, 998, 240, 1, 0, 0, 0, 999, 1000, 5, 45, 0, 0, + 1000, 1001, 5, 62, 0, 0, 1001, 242, 1, 0, 0, 0, 1002, 1003, 5, 58, 0, 0, 1003, 1004, + 5, 58, 0, 0, 1004, 244, 1, 0, 0, 0, 1005, 1006, 5, 64, 0, 0, 1006, 246, 1, 0, 0, 0, 1007, + 1008, 5, 46, 0, 0, 1008, 1009, 5, 46, 0, 0, 1009, 1010, 5, 46, 0, 0, 1010, 248, 1, 0, + 0, 0, 1011, 1013, 7, 17, 0, 0, 1012, 1011, 1, 0, 0, 0, 1013, 1014, 1, 0, 0, 0, 1014, + 1012, 1, 0, 0, 0, 1014, 1015, 1, 0, 0, 0, 1015, 1016, 1, 0, 0, 0, 1016, 1017, 6, 124, + 0, 0, 1017, 250, 1, 0, 0, 0, 1018, 1019, 5, 47, 0, 0, 1019, 1020, 5, 42, 0, 0, 1020, + 1024, 1, 0, 0, 0, 1021, 1023, 9, 0, 0, 0, 1022, 1021, 1, 0, 0, 0, 1023, 1026, 1, 0, 0, + 0, 1024, 1025, 1, 0, 0, 0, 1024, 1022, 1, 0, 0, 0, 1025, 1027, 1, 0, 0, 0, 1026, 1024, + 1, 0, 0, 0, 1027, 1028, 5, 42, 0, 0, 1028, 1029, 5, 47, 0, 0, 1029, 1030, 1, 0, 0, 0, + 1030, 1031, 6, 125, 0, 0, 1031, 252, 1, 0, 0, 0, 1032, 1033, 5, 47, 0, 0, 1033, 1034, + 5, 47, 0, 0, 1034, 1038, 1, 0, 0, 0, 1035, 1037, 8, 16, 0, 0, 1036, 1035, 1, 0, 0, 0, + 1037, 1040, 1, 0, 0, 0, 1038, 1036, 1, 0, 0, 0, 1038, 1039, 1, 0, 0, 0, 1039, 1041, + 1, 0, 0, 0, 1040, 1038, 1, 0, 0, 0, 1041, 1042, 6, 126, 0, 0, 1042, 254, 1, 0, 0, 0, 1043, + 1047, 3, 269, 134, 0, 1044, 1046, 3, 267, 133, 0, 1045, 1044, 1, 0, 0, 0, 1046, 1049, + 1, 0, 0, 0, 1047, 1045, 1, 0, 0, 0, 1047, 1048, 1, 0, 0, 0, 1048, 256, 1, 0, 0, 0, 1049, + 1047, 1, 0, 0, 0, 1050, 1052, 7, 18, 0, 0, 1051, 1053, 7, 12, 0, 0, 1052, 1051, 1, 0, + 0, 0, 1052, 1053, 1, 0, 0, 0, 1053, 1054, 1, 0, 0, 0, 1054, 1055, 3, 265, 132, 0, 1055, + 258, 1, 0, 0, 0, 1056, 1062, 5, 92, 0, 0, 1057, 1058, 5, 117, 0, 0, 1058, 1059, 5, 48, + 0, 0, 1059, 1060, 5, 48, 0, 0, 1060, 1061, 5, 53, 0, 0, 1061, 1063, 5, 99, 0, 0, 1062, + 1057, 1, 0, 0, 0, 1062, 1063, 1, 0, 0, 0, 1063, 1064, 1, 0, 0, 0, 1064, 1092, 7, 19, + 0, 0, 1065, 1071, 5, 92, 0, 0, 1066, 1067, 5, 117, 0, 0, 1067, 1068, 5, 48, 0, 0, 1068, + 1069, 5, 48, 0, 0, 1069, 1070, 5, 53, 0, 0, 1070, 1072, 5, 99, 0, 0, 1071, 1066, 1, + 0, 0, 0, 1071, 1072, 1, 0, 0, 0, 1072, 1077, 1, 0, 0, 0, 1073, 1075, 7, 20, 0, 0, 1074, + 1073, 1, 0, 0, 0, 1074, 1075, 1, 0, 0, 0, 1075, 1076, 1, 0, 0, 0, 1076, 1078, 7, 5, 0, + 0, 1077, 1074, 1, 0, 0, 0, 1077, 1078, 1, 0, 0, 0, 1078, 1079, 1, 0, 0, 0, 1079, 1092, + 7, 5, 0, 0, 1080, 1082, 5, 92, 0, 0, 1081, 1083, 5, 117, 0, 0, 1082, 1081, 1, 0, 0, 0, + 1083, 1084, 1, 0, 0, 0, 1084, 1082, 1, 0, 0, 0, 1084, 1085, 1, 0, 0, 0, 108, 1086, + 1, 0, 0, 0, 1086, 1087, 3, 263, 131, 0, 1087, 1088, 3, 263, 131, 0, 1088, 1089, 3, + 263, 131, 0, 1089, 1090, 3, 263, 131, 0, 1090, 1092, 1, 0, 0, 0, 1091, 1056, 1, 0, + 0, 0, 1091, 1065, 1, 0, 0, 0, 1091, 1080, 1, 0, 0, 0, 1092, 260, 1, 0, 0, 0, 1093, 1102, + 3, 263, 131, 0, 1094, 1097, 3, 263, 131, 0, 1095, 1097, 5, 95, 0, 0, 1096, 1094, 1, + 0, 0, 0, 1096, 1095, 1, 0, 0, 0, 1097, 1100, 1, 0, 0, 0, 1098, 1096, 1, 0, 0, 0, 1098, + 1099, 1, 0, 0, 0, 1099, 1101, 1, 0, 0, 0, 1100, 1098, 1, 0, 0, 0, 1101, 1103, 3, 263, + 131, 0, 1102, 1098, 1, 0, 0, 0, 1102, 1103, 1, 0, 0, 0, 1103, 262, 1, 0, 0, 0, 1104, + 1105, 7, 3, 0, 0, 1105, 264, 1, 0, 0, 0, 1106, 1114, 7, 21, 0, 0, 1107, 1109, 7, 22, + 0, 0, 1108, 1107, 1, 0, 0, 0, 1109, 1112, 1, 0, 0, 0, 1110, 1108, 1, 0, 0, 0, 1110, 1111, + 1, 0, 0, 0, 1111, 1113, 1, 0, 0, 0, 1112, 1110, 1, 0, 0, 0, 1113, 1115, 7, 21, 0, 0, 1114, + 1110, 1, 0, 0, 0, 1114, 1115, 1, 0, 0, 0, 1115, 266, 1, 0, 0, 0, 1116, 1119, 3, 269, + 134, 0, 1117, 1119, 7, 21, 0, 0, 1118, 1116, 1, 0, 0, 0, 1118, 1117, 1, 0, 0, 0, 1119, + 268, 1, 0, 0, 0, 1120, 1125, 7, 23, 0, 0, 1121, 1125, 8, 24, 0, 0, 1122, 1123, 7, 25, + 0, 0, 1123, 1125, 7, 26, 0, 0, 1124, 1120, 1, 0, 0, 0, 1124, 1121, 1, 0, 0, 0, 1124, + 1122, 1, 0, 0, 0, 1125, 270, 1, 0, 0, 0, 53, 0, 724, 729, 732, 734, 737, 745, 749, 752, + 758, 765, 769, 772, 780, 784, 787, 792, 796, 799, 802, 807, 810, 812, 818, 821, + 825, 829, 833, 844, 849, 856, 858, 870, 876, 878, 1014, 1024, 1038, 1047, 1052, + 1062, 1071, 1074, 1077, 1084, 1091, 1096, 1098, 1102, 1110, 1114, 1118, 1124, + 1, 0, 1, 0 + ] + + +class JavaLexer(Lexer): + atn = ATNDeserializer().deserialize(serializedATN()) + + decisionsToDFA = [DFA(ds, i) for i, ds in enumerate(atn.decisionToState)] + + ABSTRACT = 1 + ASSERT = 2 + BOOLEAN = 3 + BREAK = 4 + BYTE = 5 + CASE = 6 + CATCH = 7 + CHAR = 8 + CLASS = 9 + CONST = 10 + CONTINUE = 11 + DEFAULT = 12 + DO = 13 + DOUBLE = 14 + ELSE = 15 + ENUM = 16 + EXTENDS = 17 + FINAL = 18 + FINALLY = 19 + FLOAT = 20 + FOR = 21 + IF = 22 + GOTO = 23 + IMPLEMENTS = 24 + IMPORT = 25 + INSTANCEOF = 26 + INT = 27 + INTERFACE = 28 + LONG = 29 + NATIVE = 30 + NEW = 31 + PACKAGE = 32 + PRIVATE = 33 + PROTECTED = 34 + PUBLIC = 35 + RETURN = 36 + SHORT = 37 + STATIC = 38 + STRICTFP = 39 + SUPER = 40 + SWITCH = 41 + SYNCHRONIZED = 42 + THIS = 43 + THROW = 44 + THROWS = 45 + TRANSIENT = 46 + TRY = 47 + VOID = 48 + VOLATILE = 49 + WHILE = 50 + MODULE = 51 + OPEN = 52 + REQUIRES = 53 + EXPORTS = 54 + OPENS = 55 + TO = 56 + USES = 57 + PROVIDES = 58 + WITH = 59 + TRANSITIVE = 60 + VAR = 61 + YIELD = 62 + RECORD = 63 + SEALED = 64 + PERMITS = 65 + NON_SEALED = 66 + DECIMAL_LITERAL = 67 + HEX_LITERAL = 68 + OCT_LITERAL = 69 + BINARY_LITERAL = 70 + FLOAT_LITERAL = 71 + HEX_FLOAT_LITERAL = 72 + BOOL_LITERAL = 73 + CHAR_LITERAL = 74 + STRING_LITERAL = 75 + TEXT_BLOCK = 76 + NULL_LITERAL = 77 + LPAREN = 78 + RPAREN = 79 + LBRACE = 80 + RBRACE = 81 + LBRACK = 82 + RBRACK = 83 + SEMI = 84 + COMMA = 85 + DOT = 86 + ASSIGN = 87 + GT = 88 + LT = 89 + BANG = 90 + TILDE = 91 + QUESTION = 92 + COLON = 93 + EQUAL = 94 + LE = 95 + GE = 96 + NOTEQUAL = 97 + AND = 98 + OR = 99 + INC = 100 + DEC = 101 + ADD = 102 + SUB = 103 + MUL = 104 + DIV = 105 + BITAND = 106 + BITOR = 107 + CARET = 108 + MOD = 109 + ADD_ASSIGN = 110 + SUB_ASSIGN = 111 + MUL_ASSIGN = 112 + DIV_ASSIGN = 113 + AND_ASSIGN = 114 + OR_ASSIGN = 115 + XOR_ASSIGN = 116 + MOD_ASSIGN = 117 + LSHIFT_ASSIGN = 118 + RSHIFT_ASSIGN = 119 + URSHIFT_ASSIGN = 120 + ARROW = 121 + COLONCOLON = 122 + AT = 123 + ELLIPSIS = 124 + WS = 125 + COMMENT = 126 + LINE_COMMENT = 127 + IDENTIFIER = 128 + + channelNames = [u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN"] + + modeNames = ["DEFAULT_MODE"] + + literalNames = ["", + "'abstract'", "'assert'", "'boolean'", "'break'", "'byte'", + "'case'", "'catch'", "'char'", "'class'", "'const'", "'continue'", + "'default'", "'do'", "'double'", "'else'", "'enum'", "'extends'", + "'final'", "'finally'", "'float'", "'for'", "'if'", "'goto'", + "'implements'", "'import'", "'instanceof'", "'int'", "'interface'", + "'long'", "'native'", "'new'", "'package'", "'private'", "'protected'", + "'public'", "'return'", "'short'", "'static'", "'strictfp'", + "'super'", "'switch'", "'synchronized'", "'this'", "'throw'", + "'throws'", "'transient'", "'try'", "'void'", "'volatile'", + "'while'", "'module'", "'open'", "'requires'", "'exports'", + "'opens'", "'to'", "'uses'", "'provides'", "'with'", "'transitive'", + "'var'", "'yield'", "'record'", "'sealed'", "'permits'", "'non-sealed'", + "'null'", "'('", "')'", "'{'", "'}'", "'['", "']'", "';'", "','", + "'.'", "'='", "'>'", "'<'", "'!'", "'~'", "'?'", "':'", "'=='", + "'<='", "'>='", "'!='", "'&&'", "'||'", "'++'", "'--'", "'+'", + "'-'", "'*'", "'/'", "'&'", "'|'", "'^'", "'%'", "'+='", "'-='", + "'*='", "'/='", "'&='", "'|='", "'^='", "'%='", "'<<='", "'>>='", + "'>>>='", "'->'", "'::'", "'@'", "'...'"] + + symbolicNames = ["", + "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH", + "CHAR", "CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", + "ELSE", "ENUM", "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", + "IF", "GOTO", "IMPLEMENTS", "IMPORT", "INSTANCEOF", "INT", "INTERFACE", + "LONG", "NATIVE", "NEW", "PACKAGE", "PRIVATE", "PROTECTED", + "PUBLIC", "RETURN", "SHORT", "STATIC", "STRICTFP", "SUPER", + "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", "TRANSIENT", + "TRY", "VOID", "VOLATILE", "WHILE", "MODULE", "OPEN", "REQUIRES", + "EXPORTS", "OPENS", "TO", "USES", "PROVIDES", "WITH", "TRANSITIVE", + "VAR", "YIELD", "RECORD", "SEALED", "PERMITS", "NON_SEALED", + "DECIMAL_LITERAL", "HEX_LITERAL", "OCT_LITERAL", "BINARY_LITERAL", + "FLOAT_LITERAL", "HEX_FLOAT_LITERAL", "BOOL_LITERAL", "CHAR_LITERAL", + "STRING_LITERAL", "TEXT_BLOCK", "NULL_LITERAL", "LPAREN", "RPAREN", + "LBRACE", "RBRACE", "LBRACK", "RBRACK", "SEMI", "COMMA", "DOT", + "ASSIGN", "GT", "LT", "BANG", "TILDE", "QUESTION", "COLON", + "EQUAL", "LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", + "ADD", "SUB", "MUL", "DIV", "BITAND", "BITOR", "CARET", "MOD", + "ADD_ASSIGN", "SUB_ASSIGN", "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN", + "OR_ASSIGN", "XOR_ASSIGN", "MOD_ASSIGN", "LSHIFT_ASSIGN", "RSHIFT_ASSIGN", + "URSHIFT_ASSIGN", "ARROW", "COLONCOLON", "AT", "ELLIPSIS", "WS", + "COMMENT", "LINE_COMMENT", "IDENTIFIER"] + + ruleNames = ["ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", + "CATCH", "CHAR", "CLASS", "CONST", "CONTINUE", "DEFAULT", + "DO", "DOUBLE", "ELSE", "ENUM", "EXTENDS", "FINAL", "FINALLY", + "FLOAT", "FOR", "IF", "GOTO", "IMPLEMENTS", "IMPORT", + "INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE", "NEW", + "PACKAGE", "PRIVATE", "PROTECTED", "PUBLIC", "RETURN", + "SHORT", "STATIC", "STRICTFP", "SUPER", "SWITCH", "SYNCHRONIZED", + "THIS", "THROW", "THROWS", "TRANSIENT", "TRY", "VOID", + "VOLATILE", "WHILE", "MODULE", "OPEN", "REQUIRES", "EXPORTS", + "OPENS", "TO", "USES", "PROVIDES", "WITH", "TRANSITIVE", + "VAR", "YIELD", "RECORD", "SEALED", "PERMITS", "NON_SEALED", + "DECIMAL_LITERAL", "HEX_LITERAL", "OCT_LITERAL", "BINARY_LITERAL", + "FLOAT_LITERAL", "HEX_FLOAT_LITERAL", "BOOL_LITERAL", + "CHAR_LITERAL", "STRING_LITERAL", "TEXT_BLOCK", "NULL_LITERAL", + "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", + "SEMI", "COMMA", "DOT", "ASSIGN", "GT", "LT", "BANG", + "TILDE", "QUESTION", "COLON", "EQUAL", "LE", "GE", "NOTEQUAL", + "AND", "OR", "INC", "DEC", "ADD", "SUB", "MUL", "DIV", + "BITAND", "BITOR", "CARET", "MOD", "ADD_ASSIGN", "SUB_ASSIGN", + "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", + "XOR_ASSIGN", "MOD_ASSIGN", "LSHIFT_ASSIGN", "RSHIFT_ASSIGN", + "URSHIFT_ASSIGN", "ARROW", "COLONCOLON", "AT", "ELLIPSIS", + "WS", "COMMENT", "LINE_COMMENT", "IDENTIFIER", "ExponentPart", + "EscapeSequence", "HexDigits", "HexDigit", "Digits", "LetterOrDigit", + "Letter"] + + grammarFileName = "JavaLexer.g4" + + def __init__(self, input=None, output: TextIO = sys.stdout): + super().__init__(input, output) + self.checkVersion("4.13.0") + self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache()) + self._actions = None + self._predicates = None + + diff --git a/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/java/JavaMethodParserListener.py b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/java/JavaMethodParserListener.py new file mode 100644 index 000000000..e50dcb70e --- /dev/null +++ b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/java/JavaMethodParserListener.py @@ -0,0 +1,73 @@ +# Generated from JavaParser.g4 by ANTLR 4.11.1 +from dataclasses import dataclass +from antlr4 import * + +from module_programming_ast.convert_code_to_ast.languages.java.JavaParser import JavaParser + + +@dataclass +class MethodNode: + line_start: int + line_end: int + source_code: str + name: str + ast: any + ast_string: str + + def __str__(self): + return f"MethodNode({self.name}, lines {self.line_start} to {self.line_end})" + + +def _extract_method_name(ctx): + # Navigate through the methodHeader context to find the method name + if hasattr(ctx, 'methodHeader'): + method_header = ctx.methodHeader() + if method_header: + method_declarator = method_header.methodDeclarator() + if method_declarator and hasattr(method_declarator, 'Identifier'): + return method_declarator.Identifier().getText() + elif method_declarator and hasattr(method_declarator, 'identifier'): + return method_declarator.identifier().getText() + else: + # Traverse the children to find the identifier + for child in method_declarator.children: + if isinstance(child, TerminalNode) and child.symbol.type == JavaParser.Identifier: + return child.getText() + return "Unknown" + + +class MethodParserListener(ParseTreeListener): + def __init__(self, parser): + self.methods = [] + self.parser = parser + + def enterMethodDeclaration(self, ctx): + self._enter_method(ctx) + + def enterConstructorDeclaration(self, ctx): + self._enter_method(ctx) + + def enterGenericMethodDeclaration(self, ctx): + self._enter_method(ctx) + + def enterGenericConstructorDeclaration(self, ctx): + self._enter_method(ctx) + + def _enter_method(self, ctx): + ast_string = ctx.toStringTree(recog=self.parser) + method_name = _extract_method_name(ctx) + + me = MethodNode( + line_start=ctx.start.line, + line_end=ctx.stop.line, + source_code=ctx.start.source[1].getText(ctx.start.start, ctx.stop.stop), + name=method_name, + ast=ctx, + ast_string=ast_string + ) + self.methods.append(me) + print("Method found:", method_name) + + def enterIdentifier(self, ctx: ParserRuleContext): + if self.methods and self.methods[-1].name is None: + self.methods[-1].name = ctx.getText() diff --git a/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/java/JavaParser.py b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/java/JavaParser.py new file mode 100644 index 000000000..73eff4ade --- /dev/null +++ b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/java/JavaParser.py @@ -0,0 +1,12187 @@ +# Generated from JavaParser.g4 by ANTLR 4.13.1 +# encoding: utf-8 +from antlr4 import * +from io import StringIO +import sys +if sys.version_info[1] > 5: + from typing import TextIO +else: + from typing.io import TextIO + +def serializedATN(): + return [ + 4,1,128,1755,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6, + 7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7, + 13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2, + 20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7, + 26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2, + 33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7, + 39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2, + 46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,2,51,7,51,2,52,7, + 52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,56,2,57,7,57,2,58,7,58,2, + 59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,63,2,64,7,64,2,65,7, + 65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7,70,2,71,7,71,2, + 72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,7,77,2,78,7, + 78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,7,84,2, + 85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,2,91,7, + 91,2,92,7,92,2,93,7,93,2,94,7,94,2,95,7,95,2,96,7,96,2,97,7,97,2, + 98,7,98,2,99,7,99,2,100,7,100,2,101,7,101,2,102,7,102,2,103,7,103, + 2,104,7,104,2,105,7,105,2,106,7,106,2,107,7,107,2,108,7,108,2,109, + 7,109,2,110,7,110,2,111,7,111,2,112,7,112,2,113,7,113,2,114,7,114, + 2,115,7,115,2,116,7,116,2,117,7,117,2,118,7,118,2,119,7,119,2,120, + 7,120,2,121,7,121,2,122,7,122,2,123,7,123,2,124,7,124,2,125,7,125, + 1,0,3,0,254,8,0,1,0,1,0,5,0,258,8,0,10,0,12,0,261,9,0,1,0,1,0,5, + 0,265,8,0,10,0,12,0,268,9,0,1,0,1,0,1,0,3,0,273,8,0,1,1,5,1,276, + 8,1,10,1,12,1,279,9,1,1,1,1,1,1,1,1,1,1,2,1,2,3,2,287,8,2,1,2,1, + 2,1,2,3,2,292,8,2,1,2,1,2,1,3,5,3,297,8,3,10,3,12,3,300,9,3,1,3, + 1,3,1,3,1,3,1,3,3,3,307,8,3,1,4,1,4,1,4,1,4,1,4,3,4,314,8,4,1,5, + 1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,326,8,5,1,6,1,6,3,6,330, + 8,6,1,7,1,7,1,7,3,7,335,8,7,1,7,1,7,3,7,339,8,7,1,7,1,7,3,7,343, + 8,7,1,7,1,7,3,7,347,8,7,1,7,1,7,1,8,1,8,1,8,1,8,5,8,355,8,8,10,8, + 12,8,358,9,8,1,8,1,8,1,9,5,9,363,8,9,10,9,12,9,366,9,9,1,9,1,9,1, + 9,5,9,371,8,9,10,9,12,9,374,9,9,1,9,3,9,377,8,9,1,10,1,10,1,10,5, + 10,382,8,10,10,10,12,10,385,9,10,1,11,1,11,1,11,1,11,3,11,391,8, + 11,1,11,1,11,3,11,395,8,11,1,11,3,11,398,8,11,1,11,3,11,401,8,11, + 1,11,1,11,1,12,1,12,1,12,5,12,408,8,12,10,12,12,12,411,9,12,1,13, + 5,13,414,8,13,10,13,12,13,417,9,13,1,13,1,13,3,13,421,8,13,1,13, + 3,13,424,8,13,1,14,1,14,5,14,428,8,14,10,14,12,14,431,9,14,1,15, + 1,15,1,15,3,15,436,8,15,1,15,1,15,3,15,440,8,15,1,15,1,15,3,15,444, + 8,15,1,15,1,15,1,16,1,16,5,16,450,8,16,10,16,12,16,453,9,16,1,16, + 1,16,1,17,1,17,5,17,459,8,17,10,17,12,17,462,9,17,1,17,1,17,1,18, + 1,18,3,18,468,8,18,1,18,1,18,5,18,472,8,18,10,18,12,18,475,9,18, + 1,18,3,18,478,8,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19, + 1,19,3,19,490,8,19,1,20,1,20,1,20,1,20,1,20,5,20,497,8,20,10,20, + 12,20,500,9,20,1,20,1,20,3,20,504,8,20,1,20,1,20,1,21,1,21,3,21, + 510,8,21,1,22,1,22,3,22,514,8,22,1,23,1,23,1,23,1,24,1,24,1,24,1, + 25,1,25,1,25,1,25,3,25,526,8,25,1,25,1,25,1,26,5,26,531,8,26,10, + 26,12,26,534,9,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,28,5,28,544, + 8,28,10,28,12,28,547,9,28,1,28,1,28,3,28,551,8,28,1,29,1,29,1,29, + 1,29,1,29,1,29,1,29,1,29,3,29,561,8,29,1,30,1,30,1,30,1,30,5,30, + 567,8,30,10,30,12,30,570,9,30,1,30,1,30,1,31,1,31,1,31,5,31,577, + 8,31,10,31,12,31,580,9,31,1,31,1,31,1,31,1,32,5,32,586,8,32,10,32, + 12,32,589,9,32,1,32,1,32,1,33,1,33,1,33,1,33,1,33,1,33,3,33,599, + 8,33,1,34,5,34,602,8,34,10,34,12,34,605,9,34,1,34,1,34,1,34,1,35, + 5,35,611,8,35,10,35,12,35,614,9,35,1,35,1,35,1,35,1,35,1,35,5,35, + 621,8,35,10,35,12,35,624,9,35,1,35,1,35,3,35,628,8,35,1,35,1,35, + 1,36,1,36,1,36,5,36,635,8,36,10,36,12,36,638,9,36,1,37,1,37,1,37, + 3,37,643,8,37,1,38,1,38,1,38,5,38,648,8,38,10,38,12,38,651,9,38, + 1,39,1,39,3,39,655,8,39,1,40,1,40,1,40,1,40,5,40,661,8,40,10,40, + 12,40,664,9,40,1,40,3,40,667,8,40,3,40,669,8,40,1,40,1,40,1,41,1, + 41,3,41,675,8,41,1,41,1,41,5,41,679,8,41,10,41,12,41,682,9,41,1, + 41,1,41,3,41,686,8,41,1,42,1,42,5,42,690,8,42,10,42,12,42,693,9, + 42,1,42,1,42,1,42,3,42,698,8,42,3,42,700,8,42,1,43,1,43,1,43,5,43, + 705,8,43,10,43,12,43,708,9,43,1,44,1,44,3,44,712,8,44,1,44,1,44, + 1,44,3,44,717,8,44,1,44,3,44,720,8,44,3,44,722,8,44,1,44,1,44,1, + 45,1,45,1,45,1,45,5,45,730,8,45,10,45,12,45,733,9,45,1,45,1,45,1, + 46,1,46,1,46,5,46,740,8,46,10,46,12,46,743,9,46,1,46,1,46,3,46,747, + 8,46,1,46,3,46,750,8,46,1,47,5,47,753,8,47,10,47,12,47,756,9,47, + 1,47,1,47,1,47,1,48,5,48,762,8,48,10,48,12,48,765,9,48,1,48,1,48, + 5,48,769,8,48,10,48,12,48,772,9,48,1,48,1,48,1,48,1,49,1,49,1,49, + 5,49,780,8,49,10,49,12,49,783,9,49,1,50,5,50,786,8,50,10,50,12,50, + 789,9,50,1,50,1,50,1,50,1,51,1,51,1,51,5,51,797,8,51,10,51,12,51, + 800,9,51,1,52,1,52,1,52,1,52,1,52,1,52,1,52,3,52,809,8,52,1,53,1, + 53,1,54,1,54,1,55,1,55,1,55,5,55,818,8,55,10,55,12,55,821,9,55,1, + 55,1,55,1,55,1,56,1,56,1,56,3,56,829,8,56,1,56,1,56,1,56,3,56,834, + 8,56,1,56,3,56,837,8,56,1,57,1,57,1,57,5,57,842,8,57,10,57,12,57, + 845,9,57,1,58,1,58,1,58,1,58,1,59,1,59,1,59,3,59,854,8,59,1,60,1, + 60,1,60,1,60,5,60,860,8,60,10,60,12,60,863,9,60,3,60,865,8,60,1, + 60,3,60,868,8,60,1,60,1,60,1,61,1,61,1,61,1,61,1,61,1,62,1,62,5, + 62,879,8,62,10,62,12,62,882,9,62,1,62,1,62,1,63,5,63,887,8,63,10, + 63,12,63,890,9,63,1,63,1,63,3,63,894,8,63,1,64,1,64,1,64,1,64,1, + 64,1,64,3,64,902,8,64,1,64,1,64,3,64,906,8,64,1,64,1,64,3,64,910, + 8,64,1,64,1,64,3,64,914,8,64,1,64,1,64,3,64,918,8,64,3,64,920,8, + 64,1,65,1,65,3,65,924,8,65,1,66,1,66,1,66,1,66,3,66,930,8,66,1,67, + 1,67,1,68,1,68,1,68,1,69,3,69,938,8,69,1,69,1,69,1,69,1,69,1,70, + 1,70,5,70,946,8,70,10,70,12,70,949,9,70,1,70,1,70,1,71,1,71,5,71, + 955,8,71,10,71,12,71,958,9,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71, + 3,71,967,8,71,1,71,1,71,1,71,1,71,1,71,1,71,3,71,975,8,71,1,71,1, + 71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,3,71,989,8, + 71,1,72,1,72,1,73,1,73,1,73,3,73,996,8,73,1,73,1,73,1,73,3,73,1001, + 8,73,1,73,1,73,1,74,1,74,3,74,1007,8,74,1,74,1,74,1,75,1,75,1,75, + 5,75,1014,8,75,10,75,12,75,1017,9,75,1,76,1,76,1,76,1,77,1,77,1, + 77,5,77,1025,8,77,10,77,12,77,1028,9,77,1,77,1,77,1,78,1,78,5,78, + 1034,8,78,10,78,12,78,1037,9,78,1,78,1,78,1,79,1,79,1,79,1,79,1, + 79,3,79,1046,8,79,1,80,5,80,1049,8,80,10,80,12,80,1052,9,80,1,80, + 1,80,1,80,1,80,1,80,1,80,1,80,1,80,3,80,1062,8,80,1,81,1,81,1,82, + 1,82,1,83,5,83,1069,8,83,10,83,12,83,1072,9,83,1,83,1,83,1,83,3, + 83,1077,8,83,1,84,1,84,1,84,1,84,1,84,3,84,1084,8,84,1,84,1,84,1, + 84,1,84,1,84,1,84,1,84,3,84,1093,8,84,1,84,1,84,1,84,1,84,1,84,1, + 84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1, + 84,4,84,1114,8,84,11,84,12,84,1115,1,84,3,84,1119,8,84,1,84,3,84, + 1122,8,84,1,84,1,84,1,84,1,84,5,84,1128,8,84,10,84,12,84,1131,9, + 84,1,84,3,84,1134,8,84,1,84,1,84,1,84,1,84,5,84,1140,8,84,10,84, + 12,84,1143,9,84,1,84,5,84,1146,8,84,10,84,12,84,1149,9,84,1,84,1, + 84,1,84,1,84,1,84,1,84,1,84,1,84,3,84,1159,8,84,1,84,1,84,1,84,1, + 84,1,84,1,84,1,84,3,84,1168,8,84,1,84,1,84,1,84,3,84,1173,8,84,1, + 84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,3,84,1186,8, + 84,1,84,1,84,1,84,1,84,3,84,1192,8,84,1,85,1,85,1,85,5,85,1197,8, + 85,10,85,12,85,1200,9,85,1,85,1,85,1,85,1,85,1,85,1,86,1,86,1,86, + 5,86,1210,8,86,10,86,12,86,1213,9,86,1,87,1,87,1,87,1,88,1,88,1, + 88,3,88,1221,8,88,1,88,1,88,1,89,1,89,1,89,5,89,1228,8,89,10,89, + 12,89,1231,9,89,1,90,5,90,1234,8,90,10,90,12,90,1237,9,90,1,90,1, + 90,1,90,1,90,1,90,3,90,1244,8,90,1,90,1,90,1,90,1,90,3,90,1250,8, + 90,1,91,4,91,1253,8,91,11,91,12,91,1254,1,91,4,91,1258,8,91,11,91, + 12,91,1259,1,92,1,92,1,92,1,92,1,92,1,92,3,92,1268,8,92,1,92,1,92, + 1,92,3,92,1273,8,92,1,93,1,93,3,93,1277,8,93,1,93,1,93,3,93,1281, + 8,93,1,93,1,93,3,93,1285,8,93,3,93,1287,8,93,1,94,1,94,3,94,1291, + 8,94,1,95,5,95,1294,8,95,10,95,12,95,1297,9,95,1,95,1,95,3,95,1301, + 8,95,1,95,1,95,1,95,1,95,1,96,1,96,1,96,1,96,1,97,1,97,1,97,5,97, + 1314,8,97,10,97,12,97,1317,9,97,1,98,1,98,1,98,3,98,1322,8,98,1, + 98,1,98,1,99,1,99,1,99,1,99,1,99,1,99,3,99,1332,8,99,1,99,1,99,3, + 99,1336,8,99,1,99,1,99,1,99,3,99,1341,8,99,1,99,1,99,1,99,1,99,1, + 99,1,99,1,99,5,99,1350,8,99,10,99,12,99,1353,9,99,1,99,1,99,1,99, + 5,99,1358,8,99,10,99,12,99,1361,9,99,1,99,1,99,1,99,1,99,1,99,1, + 99,3,99,1369,8,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1, + 99,1,99,1,99,1,99,1,99,3,99,1385,8,99,1,99,1,99,1,99,1,99,1,99,1, + 99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1, + 99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1, + 99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,3,99,1430, + 8,99,1,99,1,99,1,99,1,99,3,99,1436,8,99,1,99,1,99,1,99,3,99,1441, + 8,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,3,99,1450,8,99,5,99,1452, + 8,99,10,99,12,99,1455,9,99,1,100,5,100,1458,8,100,10,100,12,100, + 1461,9,100,1,100,1,100,5,100,1465,8,100,10,100,12,100,1468,9,100, + 1,100,1,100,1,101,1,101,1,101,1,101,1,102,1,102,1,102,3,102,1479, + 8,102,1,102,1,102,1,102,1,102,1,102,5,102,1486,8,102,10,102,12,102, + 1489,9,102,1,102,1,102,1,102,1,102,3,102,1495,8,102,1,102,3,102, + 1498,8,102,1,103,1,103,3,103,1502,8,103,1,104,1,104,1,104,1,104, + 1,104,1,104,1,104,1,104,1,104,1,104,1,104,1,104,1,104,1,104,1,104, + 1,104,3,104,1520,8,104,3,104,1522,8,104,1,105,1,105,1,105,1,105, + 5,105,1528,8,105,10,105,12,105,1531,9,105,1,105,1,105,1,106,1,106, + 1,106,1,106,3,106,1539,8,106,1,106,1,106,1,106,1,106,1,106,3,106, + 1546,8,106,1,107,1,107,1,107,1,107,1,107,1,107,5,107,1554,8,107, + 10,107,12,107,1557,9,107,1,107,1,107,5,107,1561,8,107,10,107,12, + 107,1564,9,107,1,107,1,107,1,107,5,107,1569,8,107,10,107,12,107, + 1572,9,107,3,107,1574,8,107,1,107,1,107,1,107,5,107,1579,8,107,10, + 107,12,107,1582,9,107,1,108,1,108,5,108,1586,8,108,10,108,12,108, + 1589,9,108,3,108,1591,8,108,1,109,1,109,1,109,3,109,1596,8,109,1, + 109,5,109,1599,8,109,10,109,12,109,1602,9,109,1,109,1,109,3,109, + 1606,8,109,1,110,3,110,1609,8,110,1,110,1,110,1,110,1,110,1,110, + 1,110,3,110,1617,8,110,1,111,1,111,3,111,1621,8,111,1,111,1,111, + 1,111,3,111,1626,8,111,5,111,1628,8,111,10,111,12,111,1631,9,111, + 1,111,3,111,1634,8,111,1,112,1,112,3,112,1638,8,112,1,112,1,112, + 1,113,1,113,4,113,1644,8,113,11,113,12,113,1645,1,113,1,113,1,113, + 1,113,1,113,4,113,1653,8,113,11,113,12,113,1654,1,113,1,113,5,113, + 1659,8,113,10,113,12,113,1662,9,113,3,113,1664,8,113,1,114,1,114, + 3,114,1668,8,114,1,115,1,115,1,115,1,116,1,116,1,116,3,116,1676, + 8,116,1,117,1,117,1,117,3,117,1681,8,117,1,118,1,118,1,118,1,118, + 1,119,1,119,1,119,5,119,1690,8,119,10,119,12,119,1693,9,119,1,120, + 5,120,1696,8,120,10,120,12,120,1699,9,120,1,120,1,120,3,120,1703, + 8,120,1,120,5,120,1706,8,120,10,120,12,120,1709,9,120,1,120,1,120, + 5,120,1713,8,120,10,120,12,120,1716,9,120,1,121,1,121,1,122,1,122, + 1,122,1,122,5,122,1724,8,122,10,122,12,122,1727,9,122,1,122,1,122, + 1,123,1,123,1,123,3,123,1734,8,123,1,123,1,123,3,123,1738,8,123, + 3,123,1740,8,123,1,124,1,124,1,124,1,124,1,124,3,124,1747,8,124, + 1,125,1,125,3,125,1751,8,125,1,125,1,125,1,125,0,2,198,214,126,0, + 2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46, + 48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90, + 92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124, + 126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156, + 158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188, + 190,192,194,196,198,200,202,204,206,208,210,212,214,216,218,220, + 222,224,226,228,230,232,234,236,238,240,242,244,246,248,250,0,15, + 2,0,17,17,40,40,1,0,67,70,1,0,71,72,2,0,38,38,60,60,2,0,51,65,128, + 128,3,0,51,60,63,65,128,128,2,0,90,91,100,103,2,0,104,105,109,109, + 1,0,102,103,2,0,88,89,95,96,2,0,94,94,97,97,2,0,87,87,110,120,1, + 0,100,101,2,0,93,93,121,121,8,0,3,3,5,5,8,8,14,14,20,20,27,27,29, + 29,37,37,1951,0,272,1,0,0,0,2,277,1,0,0,0,4,284,1,0,0,0,6,298,1, + 0,0,0,8,313,1,0,0,0,10,325,1,0,0,0,12,329,1,0,0,0,14,331,1,0,0,0, + 16,350,1,0,0,0,18,364,1,0,0,0,20,378,1,0,0,0,22,386,1,0,0,0,24,404, + 1,0,0,0,26,415,1,0,0,0,28,425,1,0,0,0,30,432,1,0,0,0,32,447,1,0, + 0,0,34,456,1,0,0,0,36,477,1,0,0,0,38,489,1,0,0,0,40,491,1,0,0,0, + 42,509,1,0,0,0,44,513,1,0,0,0,46,515,1,0,0,0,48,518,1,0,0,0,50,521, + 1,0,0,0,52,532,1,0,0,0,54,538,1,0,0,0,56,550,1,0,0,0,58,560,1,0, + 0,0,60,562,1,0,0,0,62,573,1,0,0,0,64,587,1,0,0,0,66,598,1,0,0,0, + 68,603,1,0,0,0,70,612,1,0,0,0,72,631,1,0,0,0,74,639,1,0,0,0,76,644, + 1,0,0,0,78,654,1,0,0,0,80,656,1,0,0,0,82,680,1,0,0,0,84,699,1,0, + 0,0,86,701,1,0,0,0,88,709,1,0,0,0,90,725,1,0,0,0,92,749,1,0,0,0, + 94,754,1,0,0,0,96,763,1,0,0,0,98,776,1,0,0,0,100,787,1,0,0,0,102, + 793,1,0,0,0,104,808,1,0,0,0,106,810,1,0,0,0,108,812,1,0,0,0,110, + 819,1,0,0,0,112,828,1,0,0,0,114,838,1,0,0,0,116,846,1,0,0,0,118, + 853,1,0,0,0,120,855,1,0,0,0,122,871,1,0,0,0,124,876,1,0,0,0,126, + 893,1,0,0,0,128,919,1,0,0,0,130,923,1,0,0,0,132,925,1,0,0,0,134, + 931,1,0,0,0,136,933,1,0,0,0,138,937,1,0,0,0,140,943,1,0,0,0,142, + 988,1,0,0,0,144,990,1,0,0,0,146,992,1,0,0,0,148,1004,1,0,0,0,150, + 1010,1,0,0,0,152,1018,1,0,0,0,154,1021,1,0,0,0,156,1031,1,0,0,0, + 158,1045,1,0,0,0,160,1050,1,0,0,0,162,1063,1,0,0,0,164,1065,1,0, + 0,0,166,1070,1,0,0,0,168,1191,1,0,0,0,170,1193,1,0,0,0,172,1206, + 1,0,0,0,174,1214,1,0,0,0,176,1217,1,0,0,0,178,1224,1,0,0,0,180,1249, + 1,0,0,0,182,1252,1,0,0,0,184,1272,1,0,0,0,186,1286,1,0,0,0,188,1290, + 1,0,0,0,190,1295,1,0,0,0,192,1306,1,0,0,0,194,1310,1,0,0,0,196,1321, + 1,0,0,0,198,1368,1,0,0,0,200,1459,1,0,0,0,202,1471,1,0,0,0,204,1497, + 1,0,0,0,206,1501,1,0,0,0,208,1521,1,0,0,0,210,1523,1,0,0,0,212,1545, + 1,0,0,0,214,1573,1,0,0,0,216,1590,1,0,0,0,218,1595,1,0,0,0,220,1616, + 1,0,0,0,222,1633,1,0,0,0,224,1635,1,0,0,0,226,1663,1,0,0,0,228,1665, + 1,0,0,0,230,1669,1,0,0,0,232,1675,1,0,0,0,234,1680,1,0,0,0,236,1682, + 1,0,0,0,238,1686,1,0,0,0,240,1697,1,0,0,0,242,1717,1,0,0,0,244,1719, + 1,0,0,0,246,1739,1,0,0,0,248,1746,1,0,0,0,250,1748,1,0,0,0,252,254, + 3,2,1,0,253,252,1,0,0,0,253,254,1,0,0,0,254,259,1,0,0,0,255,258, + 3,4,2,0,256,258,5,84,0,0,257,255,1,0,0,0,257,256,1,0,0,0,258,261, + 1,0,0,0,259,257,1,0,0,0,259,260,1,0,0,0,260,266,1,0,0,0,261,259, + 1,0,0,0,262,265,3,6,3,0,263,265,5,84,0,0,264,262,1,0,0,0,264,263, + 1,0,0,0,265,268,1,0,0,0,266,264,1,0,0,0,266,267,1,0,0,0,267,273, + 1,0,0,0,268,266,1,0,0,0,269,270,3,138,69,0,270,271,5,0,0,1,271,273, + 1,0,0,0,272,253,1,0,0,0,272,269,1,0,0,0,273,1,1,0,0,0,274,276,3, + 112,56,0,275,274,1,0,0,0,276,279,1,0,0,0,277,275,1,0,0,0,277,278, + 1,0,0,0,278,280,1,0,0,0,279,277,1,0,0,0,280,281,5,32,0,0,281,282, + 3,102,51,0,282,283,5,84,0,0,283,3,1,0,0,0,284,286,5,25,0,0,285,287, + 5,38,0,0,286,285,1,0,0,0,286,287,1,0,0,0,287,288,1,0,0,0,288,291, + 3,102,51,0,289,290,5,86,0,0,290,292,5,104,0,0,291,289,1,0,0,0,291, + 292,1,0,0,0,292,293,1,0,0,0,293,294,5,84,0,0,294,5,1,0,0,0,295,297, + 3,10,5,0,296,295,1,0,0,0,297,300,1,0,0,0,298,296,1,0,0,0,298,299, + 1,0,0,0,299,306,1,0,0,0,300,298,1,0,0,0,301,307,3,14,7,0,302,307, + 3,22,11,0,303,307,3,30,15,0,304,307,3,122,61,0,305,307,3,146,73, + 0,306,301,1,0,0,0,306,302,1,0,0,0,306,303,1,0,0,0,306,304,1,0,0, + 0,306,305,1,0,0,0,307,7,1,0,0,0,308,314,3,10,5,0,309,314,5,30,0, + 0,310,314,5,42,0,0,311,314,5,46,0,0,312,314,5,49,0,0,313,308,1,0, + 0,0,313,309,1,0,0,0,313,310,1,0,0,0,313,311,1,0,0,0,313,312,1,0, + 0,0,314,9,1,0,0,0,315,326,3,112,56,0,316,326,5,35,0,0,317,326,5, + 34,0,0,318,326,5,33,0,0,319,326,5,38,0,0,320,326,5,1,0,0,321,326, + 5,18,0,0,322,326,5,39,0,0,323,326,5,64,0,0,324,326,5,66,0,0,325, + 315,1,0,0,0,325,316,1,0,0,0,325,317,1,0,0,0,325,318,1,0,0,0,325, + 319,1,0,0,0,325,320,1,0,0,0,325,321,1,0,0,0,325,322,1,0,0,0,325, + 323,1,0,0,0,325,324,1,0,0,0,326,11,1,0,0,0,327,330,5,18,0,0,328, + 330,3,112,56,0,329,327,1,0,0,0,329,328,1,0,0,0,330,13,1,0,0,0,331, + 332,5,9,0,0,332,334,3,162,81,0,333,335,3,16,8,0,334,333,1,0,0,0, + 334,335,1,0,0,0,335,338,1,0,0,0,336,337,5,17,0,0,337,339,3,240,120, + 0,338,336,1,0,0,0,338,339,1,0,0,0,339,342,1,0,0,0,340,341,5,24,0, + 0,341,343,3,238,119,0,342,340,1,0,0,0,342,343,1,0,0,0,343,346,1, + 0,0,0,344,345,5,65,0,0,345,347,3,238,119,0,346,344,1,0,0,0,346,347, + 1,0,0,0,347,348,1,0,0,0,348,349,3,32,16,0,349,15,1,0,0,0,350,351, + 5,89,0,0,351,356,3,18,9,0,352,353,5,85,0,0,353,355,3,18,9,0,354, + 352,1,0,0,0,355,358,1,0,0,0,356,354,1,0,0,0,356,357,1,0,0,0,357, + 359,1,0,0,0,358,356,1,0,0,0,359,360,5,88,0,0,360,17,1,0,0,0,361, + 363,3,112,56,0,362,361,1,0,0,0,363,366,1,0,0,0,364,362,1,0,0,0,364, + 365,1,0,0,0,365,367,1,0,0,0,366,364,1,0,0,0,367,376,3,162,81,0,368, + 372,5,17,0,0,369,371,3,112,56,0,370,369,1,0,0,0,371,374,1,0,0,0, + 372,370,1,0,0,0,372,373,1,0,0,0,373,375,1,0,0,0,374,372,1,0,0,0, + 375,377,3,20,10,0,376,368,1,0,0,0,376,377,1,0,0,0,377,19,1,0,0,0, + 378,383,3,240,120,0,379,380,5,106,0,0,380,382,3,240,120,0,381,379, + 1,0,0,0,382,385,1,0,0,0,383,381,1,0,0,0,383,384,1,0,0,0,384,21,1, + 0,0,0,385,383,1,0,0,0,386,387,5,16,0,0,387,390,3,162,81,0,388,389, + 5,24,0,0,389,391,3,238,119,0,390,388,1,0,0,0,390,391,1,0,0,0,391, + 392,1,0,0,0,392,394,5,80,0,0,393,395,3,24,12,0,394,393,1,0,0,0,394, + 395,1,0,0,0,395,397,1,0,0,0,396,398,5,85,0,0,397,396,1,0,0,0,397, + 398,1,0,0,0,398,400,1,0,0,0,399,401,3,28,14,0,400,399,1,0,0,0,400, + 401,1,0,0,0,401,402,1,0,0,0,402,403,5,81,0,0,403,23,1,0,0,0,404, + 409,3,26,13,0,405,406,5,85,0,0,406,408,3,26,13,0,407,405,1,0,0,0, + 408,411,1,0,0,0,409,407,1,0,0,0,409,410,1,0,0,0,410,25,1,0,0,0,411, + 409,1,0,0,0,412,414,3,112,56,0,413,412,1,0,0,0,414,417,1,0,0,0,415, + 413,1,0,0,0,415,416,1,0,0,0,416,418,1,0,0,0,417,415,1,0,0,0,418, + 420,3,162,81,0,419,421,3,250,125,0,420,419,1,0,0,0,420,421,1,0,0, + 0,421,423,1,0,0,0,422,424,3,32,16,0,423,422,1,0,0,0,423,424,1,0, + 0,0,424,27,1,0,0,0,425,429,5,84,0,0,426,428,3,36,18,0,427,426,1, + 0,0,0,428,431,1,0,0,0,429,427,1,0,0,0,429,430,1,0,0,0,430,29,1,0, + 0,0,431,429,1,0,0,0,432,433,5,28,0,0,433,435,3,162,81,0,434,436, + 3,16,8,0,435,434,1,0,0,0,435,436,1,0,0,0,436,439,1,0,0,0,437,438, + 5,17,0,0,438,440,3,238,119,0,439,437,1,0,0,0,439,440,1,0,0,0,440, + 443,1,0,0,0,441,442,5,65,0,0,442,444,3,238,119,0,443,441,1,0,0,0, + 443,444,1,0,0,0,444,445,1,0,0,0,445,446,3,34,17,0,446,31,1,0,0,0, + 447,451,5,80,0,0,448,450,3,36,18,0,449,448,1,0,0,0,450,453,1,0,0, + 0,451,449,1,0,0,0,451,452,1,0,0,0,452,454,1,0,0,0,453,451,1,0,0, + 0,454,455,5,81,0,0,455,33,1,0,0,0,456,460,5,80,0,0,457,459,3,56, + 28,0,458,457,1,0,0,0,459,462,1,0,0,0,460,458,1,0,0,0,460,461,1,0, + 0,0,461,463,1,0,0,0,462,460,1,0,0,0,463,464,5,81,0,0,464,35,1,0, + 0,0,465,478,5,84,0,0,466,468,5,38,0,0,467,466,1,0,0,0,467,468,1, + 0,0,0,468,469,1,0,0,0,469,478,3,156,78,0,470,472,3,8,4,0,471,470, + 1,0,0,0,472,475,1,0,0,0,473,471,1,0,0,0,473,474,1,0,0,0,474,476, + 1,0,0,0,475,473,1,0,0,0,476,478,3,38,19,0,477,465,1,0,0,0,477,467, + 1,0,0,0,477,473,1,0,0,0,478,37,1,0,0,0,479,490,3,146,73,0,480,490, + 3,40,20,0,481,490,3,46,23,0,482,490,3,54,27,0,483,490,3,50,25,0, + 484,490,3,48,24,0,485,490,3,30,15,0,486,490,3,122,61,0,487,490,3, + 14,7,0,488,490,3,22,11,0,489,479,1,0,0,0,489,480,1,0,0,0,489,481, + 1,0,0,0,489,482,1,0,0,0,489,483,1,0,0,0,489,484,1,0,0,0,489,485, + 1,0,0,0,489,486,1,0,0,0,489,487,1,0,0,0,489,488,1,0,0,0,490,39,1, + 0,0,0,491,492,3,44,22,0,492,493,3,162,81,0,493,498,3,88,44,0,494, + 495,5,82,0,0,495,497,5,83,0,0,496,494,1,0,0,0,497,500,1,0,0,0,498, + 496,1,0,0,0,498,499,1,0,0,0,499,503,1,0,0,0,500,498,1,0,0,0,501, + 502,5,45,0,0,502,504,3,86,43,0,503,501,1,0,0,0,503,504,1,0,0,0,504, + 505,1,0,0,0,505,506,3,42,21,0,506,41,1,0,0,0,507,510,3,156,78,0, + 508,510,5,84,0,0,509,507,1,0,0,0,509,508,1,0,0,0,510,43,1,0,0,0, + 511,514,3,240,120,0,512,514,5,48,0,0,513,511,1,0,0,0,513,512,1,0, + 0,0,514,45,1,0,0,0,515,516,3,16,8,0,516,517,3,40,20,0,517,47,1,0, + 0,0,518,519,3,16,8,0,519,520,3,50,25,0,520,49,1,0,0,0,521,522,3, + 162,81,0,522,525,3,88,44,0,523,524,5,45,0,0,524,526,3,86,43,0,525, + 523,1,0,0,0,525,526,1,0,0,0,526,527,1,0,0,0,527,528,3,156,78,0,528, + 51,1,0,0,0,529,531,3,8,4,0,530,529,1,0,0,0,531,534,1,0,0,0,532,530, + 1,0,0,0,532,533,1,0,0,0,533,535,1,0,0,0,534,532,1,0,0,0,535,536, + 3,162,81,0,536,537,3,156,78,0,537,53,1,0,0,0,538,539,3,240,120,0, + 539,540,3,72,36,0,540,541,5,84,0,0,541,55,1,0,0,0,542,544,3,8,4, + 0,543,542,1,0,0,0,544,547,1,0,0,0,545,543,1,0,0,0,545,546,1,0,0, + 0,546,548,1,0,0,0,547,545,1,0,0,0,548,551,3,58,29,0,549,551,5,84, + 0,0,550,545,1,0,0,0,550,549,1,0,0,0,551,57,1,0,0,0,552,561,3,146, + 73,0,553,561,3,60,30,0,554,561,3,64,32,0,555,561,3,68,34,0,556,561, + 3,30,15,0,557,561,3,122,61,0,558,561,3,14,7,0,559,561,3,22,11,0, + 560,552,1,0,0,0,560,553,1,0,0,0,560,554,1,0,0,0,560,555,1,0,0,0, + 560,556,1,0,0,0,560,557,1,0,0,0,560,558,1,0,0,0,560,559,1,0,0,0, + 561,59,1,0,0,0,562,563,3,240,120,0,563,568,3,62,31,0,564,565,5,85, + 0,0,565,567,3,62,31,0,566,564,1,0,0,0,567,570,1,0,0,0,568,566,1, + 0,0,0,568,569,1,0,0,0,569,571,1,0,0,0,570,568,1,0,0,0,571,572,5, + 84,0,0,572,61,1,0,0,0,573,578,3,162,81,0,574,575,5,82,0,0,575,577, + 5,83,0,0,576,574,1,0,0,0,577,580,1,0,0,0,578,576,1,0,0,0,578,579, + 1,0,0,0,579,581,1,0,0,0,580,578,1,0,0,0,581,582,5,87,0,0,582,583, + 3,78,39,0,583,63,1,0,0,0,584,586,3,66,33,0,585,584,1,0,0,0,586,589, + 1,0,0,0,587,585,1,0,0,0,587,588,1,0,0,0,588,590,1,0,0,0,589,587, + 1,0,0,0,590,591,3,70,35,0,591,65,1,0,0,0,592,599,3,112,56,0,593, + 599,5,35,0,0,594,599,5,1,0,0,595,599,5,12,0,0,596,599,5,38,0,0,597, + 599,5,39,0,0,598,592,1,0,0,0,598,593,1,0,0,0,598,594,1,0,0,0,598, + 595,1,0,0,0,598,596,1,0,0,0,598,597,1,0,0,0,599,67,1,0,0,0,600,602, + 3,66,33,0,601,600,1,0,0,0,602,605,1,0,0,0,603,601,1,0,0,0,603,604, + 1,0,0,0,604,606,1,0,0,0,605,603,1,0,0,0,606,607,3,16,8,0,607,608, + 3,70,35,0,608,69,1,0,0,0,609,611,3,112,56,0,610,609,1,0,0,0,611, + 614,1,0,0,0,612,610,1,0,0,0,612,613,1,0,0,0,613,615,1,0,0,0,614, + 612,1,0,0,0,615,616,3,44,22,0,616,617,3,162,81,0,617,622,3,88,44, + 0,618,619,5,82,0,0,619,621,5,83,0,0,620,618,1,0,0,0,621,624,1,0, + 0,0,622,620,1,0,0,0,622,623,1,0,0,0,623,627,1,0,0,0,624,622,1,0, + 0,0,625,626,5,45,0,0,626,628,3,86,43,0,627,625,1,0,0,0,627,628,1, + 0,0,0,628,629,1,0,0,0,629,630,3,42,21,0,630,71,1,0,0,0,631,636,3, + 74,37,0,632,633,5,85,0,0,633,635,3,74,37,0,634,632,1,0,0,0,635,638, + 1,0,0,0,636,634,1,0,0,0,636,637,1,0,0,0,637,73,1,0,0,0,638,636,1, + 0,0,0,639,642,3,76,38,0,640,641,5,87,0,0,641,643,3,78,39,0,642,640, + 1,0,0,0,642,643,1,0,0,0,643,75,1,0,0,0,644,649,3,162,81,0,645,646, + 5,82,0,0,646,648,5,83,0,0,647,645,1,0,0,0,648,651,1,0,0,0,649,647, + 1,0,0,0,649,650,1,0,0,0,650,77,1,0,0,0,651,649,1,0,0,0,652,655,3, + 80,40,0,653,655,3,198,99,0,654,652,1,0,0,0,654,653,1,0,0,0,655,79, + 1,0,0,0,656,668,5,80,0,0,657,662,3,78,39,0,658,659,5,85,0,0,659, + 661,3,78,39,0,660,658,1,0,0,0,661,664,1,0,0,0,662,660,1,0,0,0,662, + 663,1,0,0,0,663,666,1,0,0,0,664,662,1,0,0,0,665,667,5,85,0,0,666, + 665,1,0,0,0,666,667,1,0,0,0,667,669,1,0,0,0,668,657,1,0,0,0,668, + 669,1,0,0,0,669,670,1,0,0,0,670,671,5,81,0,0,671,81,1,0,0,0,672, + 674,3,162,81,0,673,675,3,244,122,0,674,673,1,0,0,0,674,675,1,0,0, + 0,675,676,1,0,0,0,676,677,5,86,0,0,677,679,1,0,0,0,678,672,1,0,0, + 0,679,682,1,0,0,0,680,678,1,0,0,0,680,681,1,0,0,0,681,683,1,0,0, + 0,682,680,1,0,0,0,683,685,3,164,82,0,684,686,3,244,122,0,685,684, + 1,0,0,0,685,686,1,0,0,0,686,83,1,0,0,0,687,700,3,240,120,0,688,690, + 3,112,56,0,689,688,1,0,0,0,690,693,1,0,0,0,691,689,1,0,0,0,691,692, + 1,0,0,0,692,694,1,0,0,0,693,691,1,0,0,0,694,697,5,92,0,0,695,696, + 7,0,0,0,696,698,3,240,120,0,697,695,1,0,0,0,697,698,1,0,0,0,698, + 700,1,0,0,0,699,687,1,0,0,0,699,691,1,0,0,0,700,85,1,0,0,0,701,706, + 3,102,51,0,702,703,5,85,0,0,703,705,3,102,51,0,704,702,1,0,0,0,705, + 708,1,0,0,0,706,704,1,0,0,0,706,707,1,0,0,0,707,87,1,0,0,0,708,706, + 1,0,0,0,709,721,5,78,0,0,710,712,3,90,45,0,711,710,1,0,0,0,711,712, + 1,0,0,0,712,722,1,0,0,0,713,716,3,90,45,0,714,715,5,85,0,0,715,717, + 3,92,46,0,716,714,1,0,0,0,716,717,1,0,0,0,717,722,1,0,0,0,718,720, + 3,92,46,0,719,718,1,0,0,0,719,720,1,0,0,0,720,722,1,0,0,0,721,711, + 1,0,0,0,721,713,1,0,0,0,721,719,1,0,0,0,722,723,1,0,0,0,723,724, + 5,79,0,0,724,89,1,0,0,0,725,731,3,240,120,0,726,727,3,162,81,0,727, + 728,5,86,0,0,728,730,1,0,0,0,729,726,1,0,0,0,730,733,1,0,0,0,731, + 729,1,0,0,0,731,732,1,0,0,0,732,734,1,0,0,0,733,731,1,0,0,0,734, + 735,5,43,0,0,735,91,1,0,0,0,736,741,3,94,47,0,737,738,5,85,0,0,738, + 740,3,94,47,0,739,737,1,0,0,0,740,743,1,0,0,0,741,739,1,0,0,0,741, + 742,1,0,0,0,742,746,1,0,0,0,743,741,1,0,0,0,744,745,5,85,0,0,745, + 747,3,96,48,0,746,744,1,0,0,0,746,747,1,0,0,0,747,750,1,0,0,0,748, + 750,3,96,48,0,749,736,1,0,0,0,749,748,1,0,0,0,750,93,1,0,0,0,751, + 753,3,12,6,0,752,751,1,0,0,0,753,756,1,0,0,0,754,752,1,0,0,0,754, + 755,1,0,0,0,755,757,1,0,0,0,756,754,1,0,0,0,757,758,3,240,120,0, + 758,759,3,76,38,0,759,95,1,0,0,0,760,762,3,12,6,0,761,760,1,0,0, + 0,762,765,1,0,0,0,763,761,1,0,0,0,763,764,1,0,0,0,764,766,1,0,0, + 0,765,763,1,0,0,0,766,770,3,240,120,0,767,769,3,112,56,0,768,767, + 1,0,0,0,769,772,1,0,0,0,770,768,1,0,0,0,770,771,1,0,0,0,771,773, + 1,0,0,0,772,770,1,0,0,0,773,774,5,124,0,0,774,775,3,76,38,0,775, + 97,1,0,0,0,776,781,3,100,50,0,777,778,5,85,0,0,778,780,3,100,50, + 0,779,777,1,0,0,0,780,783,1,0,0,0,781,779,1,0,0,0,781,782,1,0,0, + 0,782,99,1,0,0,0,783,781,1,0,0,0,784,786,3,12,6,0,785,784,1,0,0, + 0,786,789,1,0,0,0,787,785,1,0,0,0,787,788,1,0,0,0,788,790,1,0,0, + 0,789,787,1,0,0,0,790,791,5,61,0,0,791,792,3,162,81,0,792,101,1, + 0,0,0,793,798,3,162,81,0,794,795,5,86,0,0,795,797,3,162,81,0,796, + 794,1,0,0,0,797,800,1,0,0,0,798,796,1,0,0,0,798,799,1,0,0,0,799, + 103,1,0,0,0,800,798,1,0,0,0,801,809,3,106,53,0,802,809,3,108,54, + 0,803,809,5,74,0,0,804,809,5,75,0,0,805,809,5,73,0,0,806,809,5,77, + 0,0,807,809,5,76,0,0,808,801,1,0,0,0,808,802,1,0,0,0,808,803,1,0, + 0,0,808,804,1,0,0,0,808,805,1,0,0,0,808,806,1,0,0,0,808,807,1,0, + 0,0,809,105,1,0,0,0,810,811,7,1,0,0,811,107,1,0,0,0,812,813,7,2, + 0,0,813,109,1,0,0,0,814,815,3,162,81,0,815,816,5,86,0,0,816,818, + 1,0,0,0,817,814,1,0,0,0,818,821,1,0,0,0,819,817,1,0,0,0,819,820, + 1,0,0,0,820,822,1,0,0,0,821,819,1,0,0,0,822,823,5,123,0,0,823,824, + 3,162,81,0,824,111,1,0,0,0,825,826,5,123,0,0,826,829,3,102,51,0, + 827,829,3,110,55,0,828,825,1,0,0,0,828,827,1,0,0,0,829,836,1,0,0, + 0,830,833,5,78,0,0,831,834,3,114,57,0,832,834,3,118,59,0,833,831, + 1,0,0,0,833,832,1,0,0,0,833,834,1,0,0,0,834,835,1,0,0,0,835,837, + 5,79,0,0,836,830,1,0,0,0,836,837,1,0,0,0,837,113,1,0,0,0,838,843, + 3,116,58,0,839,840,5,85,0,0,840,842,3,116,58,0,841,839,1,0,0,0,842, + 845,1,0,0,0,843,841,1,0,0,0,843,844,1,0,0,0,844,115,1,0,0,0,845, + 843,1,0,0,0,846,847,3,162,81,0,847,848,5,87,0,0,848,849,3,118,59, + 0,849,117,1,0,0,0,850,854,3,198,99,0,851,854,3,112,56,0,852,854, + 3,120,60,0,853,850,1,0,0,0,853,851,1,0,0,0,853,852,1,0,0,0,854,119, + 1,0,0,0,855,864,5,80,0,0,856,861,3,118,59,0,857,858,5,85,0,0,858, + 860,3,118,59,0,859,857,1,0,0,0,860,863,1,0,0,0,861,859,1,0,0,0,861, + 862,1,0,0,0,862,865,1,0,0,0,863,861,1,0,0,0,864,856,1,0,0,0,864, + 865,1,0,0,0,865,867,1,0,0,0,866,868,5,85,0,0,867,866,1,0,0,0,867, + 868,1,0,0,0,868,869,1,0,0,0,869,870,5,81,0,0,870,121,1,0,0,0,871, + 872,5,123,0,0,872,873,5,28,0,0,873,874,3,162,81,0,874,875,3,124, + 62,0,875,123,1,0,0,0,876,880,5,80,0,0,877,879,3,126,63,0,878,877, + 1,0,0,0,879,882,1,0,0,0,880,878,1,0,0,0,880,881,1,0,0,0,881,883, + 1,0,0,0,882,880,1,0,0,0,883,884,5,81,0,0,884,125,1,0,0,0,885,887, + 3,8,4,0,886,885,1,0,0,0,887,890,1,0,0,0,888,886,1,0,0,0,888,889, + 1,0,0,0,889,891,1,0,0,0,890,888,1,0,0,0,891,894,3,128,64,0,892,894, + 5,84,0,0,893,888,1,0,0,0,893,892,1,0,0,0,894,127,1,0,0,0,895,896, + 3,240,120,0,896,897,3,130,65,0,897,898,5,84,0,0,898,920,1,0,0,0, + 899,901,3,14,7,0,900,902,5,84,0,0,901,900,1,0,0,0,901,902,1,0,0, + 0,902,920,1,0,0,0,903,905,3,30,15,0,904,906,5,84,0,0,905,904,1,0, + 0,0,905,906,1,0,0,0,906,920,1,0,0,0,907,909,3,22,11,0,908,910,5, + 84,0,0,909,908,1,0,0,0,909,910,1,0,0,0,910,920,1,0,0,0,911,913,3, + 122,61,0,912,914,5,84,0,0,913,912,1,0,0,0,913,914,1,0,0,0,914,920, + 1,0,0,0,915,917,3,146,73,0,916,918,5,84,0,0,917,916,1,0,0,0,917, + 918,1,0,0,0,918,920,1,0,0,0,919,895,1,0,0,0,919,899,1,0,0,0,919, + 903,1,0,0,0,919,907,1,0,0,0,919,911,1,0,0,0,919,915,1,0,0,0,920, + 129,1,0,0,0,921,924,3,132,66,0,922,924,3,134,67,0,923,921,1,0,0, + 0,923,922,1,0,0,0,924,131,1,0,0,0,925,926,3,162,81,0,926,927,5,78, + 0,0,927,929,5,79,0,0,928,930,3,136,68,0,929,928,1,0,0,0,929,930, + 1,0,0,0,930,133,1,0,0,0,931,932,3,72,36,0,932,135,1,0,0,0,933,934, + 5,12,0,0,934,935,3,118,59,0,935,137,1,0,0,0,936,938,5,52,0,0,937, + 936,1,0,0,0,937,938,1,0,0,0,938,939,1,0,0,0,939,940,5,51,0,0,940, + 941,3,102,51,0,941,942,3,140,70,0,942,139,1,0,0,0,943,947,5,80,0, + 0,944,946,3,142,71,0,945,944,1,0,0,0,946,949,1,0,0,0,947,945,1,0, + 0,0,947,948,1,0,0,0,948,950,1,0,0,0,949,947,1,0,0,0,950,951,5,81, + 0,0,951,141,1,0,0,0,952,956,5,53,0,0,953,955,3,144,72,0,954,953, + 1,0,0,0,955,958,1,0,0,0,956,954,1,0,0,0,956,957,1,0,0,0,957,959, + 1,0,0,0,958,956,1,0,0,0,959,960,3,102,51,0,960,961,5,84,0,0,961, + 989,1,0,0,0,962,963,5,54,0,0,963,966,3,102,51,0,964,965,5,56,0,0, + 965,967,3,102,51,0,966,964,1,0,0,0,966,967,1,0,0,0,967,968,1,0,0, + 0,968,969,5,84,0,0,969,989,1,0,0,0,970,971,5,55,0,0,971,974,3,102, + 51,0,972,973,5,56,0,0,973,975,3,102,51,0,974,972,1,0,0,0,974,975, + 1,0,0,0,975,976,1,0,0,0,976,977,5,84,0,0,977,989,1,0,0,0,978,979, + 5,57,0,0,979,980,3,102,51,0,980,981,5,84,0,0,981,989,1,0,0,0,982, + 983,5,58,0,0,983,984,3,102,51,0,984,985,5,59,0,0,985,986,3,102,51, + 0,986,987,5,84,0,0,987,989,1,0,0,0,988,952,1,0,0,0,988,962,1,0,0, + 0,988,970,1,0,0,0,988,978,1,0,0,0,988,982,1,0,0,0,989,143,1,0,0, + 0,990,991,7,3,0,0,991,145,1,0,0,0,992,993,5,63,0,0,993,995,3,162, + 81,0,994,996,3,16,8,0,995,994,1,0,0,0,995,996,1,0,0,0,996,997,1, + 0,0,0,997,1000,3,148,74,0,998,999,5,24,0,0,999,1001,3,238,119,0, + 1000,998,1,0,0,0,1000,1001,1,0,0,0,1001,1002,1,0,0,0,1002,1003,3, + 154,77,0,1003,147,1,0,0,0,1004,1006,5,78,0,0,1005,1007,3,150,75, + 0,1006,1005,1,0,0,0,1006,1007,1,0,0,0,1007,1008,1,0,0,0,1008,1009, + 5,79,0,0,1009,149,1,0,0,0,1010,1015,3,152,76,0,1011,1012,5,85,0, + 0,1012,1014,3,152,76,0,1013,1011,1,0,0,0,1014,1017,1,0,0,0,1015, + 1013,1,0,0,0,1015,1016,1,0,0,0,1016,151,1,0,0,0,1017,1015,1,0,0, + 0,1018,1019,3,240,120,0,1019,1020,3,162,81,0,1020,153,1,0,0,0,1021, + 1026,5,80,0,0,1022,1025,3,36,18,0,1023,1025,3,52,26,0,1024,1022, + 1,0,0,0,1024,1023,1,0,0,0,1025,1028,1,0,0,0,1026,1024,1,0,0,0,1026, + 1027,1,0,0,0,1027,1029,1,0,0,0,1028,1026,1,0,0,0,1029,1030,5,81, + 0,0,1030,155,1,0,0,0,1031,1035,5,80,0,0,1032,1034,3,158,79,0,1033, + 1032,1,0,0,0,1034,1037,1,0,0,0,1035,1033,1,0,0,0,1035,1036,1,0,0, + 0,1036,1038,1,0,0,0,1037,1035,1,0,0,0,1038,1039,5,81,0,0,1039,157, + 1,0,0,0,1040,1041,3,160,80,0,1041,1042,5,84,0,0,1042,1046,1,0,0, + 0,1043,1046,3,166,83,0,1044,1046,3,168,84,0,1045,1040,1,0,0,0,1045, + 1043,1,0,0,0,1045,1044,1,0,0,0,1046,159,1,0,0,0,1047,1049,3,12,6, + 0,1048,1047,1,0,0,0,1049,1052,1,0,0,0,1050,1048,1,0,0,0,1050,1051, + 1,0,0,0,1051,1061,1,0,0,0,1052,1050,1,0,0,0,1053,1054,5,61,0,0,1054, + 1055,3,162,81,0,1055,1056,5,87,0,0,1056,1057,3,198,99,0,1057,1062, + 1,0,0,0,1058,1059,3,240,120,0,1059,1060,3,72,36,0,1060,1062,1,0, + 0,0,1061,1053,1,0,0,0,1061,1058,1,0,0,0,1062,161,1,0,0,0,1063,1064, + 7,4,0,0,1064,163,1,0,0,0,1065,1066,7,5,0,0,1066,165,1,0,0,0,1067, + 1069,3,10,5,0,1068,1067,1,0,0,0,1069,1072,1,0,0,0,1070,1068,1,0, + 0,0,1070,1071,1,0,0,0,1071,1076,1,0,0,0,1072,1070,1,0,0,0,1073,1077, + 3,14,7,0,1074,1077,3,30,15,0,1075,1077,3,146,73,0,1076,1073,1,0, + 0,0,1076,1074,1,0,0,0,1076,1075,1,0,0,0,1077,167,1,0,0,0,1078,1192, + 3,156,78,0,1079,1080,5,2,0,0,1080,1083,3,198,99,0,1081,1082,5,93, + 0,0,1082,1084,3,198,99,0,1083,1081,1,0,0,0,1083,1084,1,0,0,0,1084, + 1085,1,0,0,0,1085,1086,5,84,0,0,1086,1192,1,0,0,0,1087,1088,5,22, + 0,0,1088,1089,3,192,96,0,1089,1092,3,168,84,0,1090,1091,5,15,0,0, + 1091,1093,3,168,84,0,1092,1090,1,0,0,0,1092,1093,1,0,0,0,1093,1192, + 1,0,0,0,1094,1095,5,21,0,0,1095,1096,5,78,0,0,1096,1097,3,186,93, + 0,1097,1098,5,79,0,0,1098,1099,3,168,84,0,1099,1192,1,0,0,0,1100, + 1101,5,50,0,0,1101,1102,3,192,96,0,1102,1103,3,168,84,0,1103,1192, + 1,0,0,0,1104,1105,5,13,0,0,1105,1106,3,168,84,0,1106,1107,5,50,0, + 0,1107,1108,3,192,96,0,1108,1109,5,84,0,0,1109,1192,1,0,0,0,1110, + 1111,5,47,0,0,1111,1121,3,156,78,0,1112,1114,3,170,85,0,1113,1112, + 1,0,0,0,1114,1115,1,0,0,0,1115,1113,1,0,0,0,1115,1116,1,0,0,0,1116, + 1118,1,0,0,0,1117,1119,3,174,87,0,1118,1117,1,0,0,0,1118,1119,1, + 0,0,0,1119,1122,1,0,0,0,1120,1122,3,174,87,0,1121,1113,1,0,0,0,1121, + 1120,1,0,0,0,1122,1192,1,0,0,0,1123,1124,5,47,0,0,1124,1125,3,176, + 88,0,1125,1129,3,156,78,0,1126,1128,3,170,85,0,1127,1126,1,0,0,0, + 1128,1131,1,0,0,0,1129,1127,1,0,0,0,1129,1130,1,0,0,0,1130,1133, + 1,0,0,0,1131,1129,1,0,0,0,1132,1134,3,174,87,0,1133,1132,1,0,0,0, + 1133,1134,1,0,0,0,1134,1192,1,0,0,0,1135,1136,5,41,0,0,1136,1137, + 3,192,96,0,1137,1141,5,80,0,0,1138,1140,3,182,91,0,1139,1138,1,0, + 0,0,1140,1143,1,0,0,0,1141,1139,1,0,0,0,1141,1142,1,0,0,0,1142,1147, + 1,0,0,0,1143,1141,1,0,0,0,1144,1146,3,184,92,0,1145,1144,1,0,0,0, + 1146,1149,1,0,0,0,1147,1145,1,0,0,0,1147,1148,1,0,0,0,1148,1150, + 1,0,0,0,1149,1147,1,0,0,0,1150,1151,5,81,0,0,1151,1192,1,0,0,0,1152, + 1153,5,42,0,0,1153,1154,3,192,96,0,1154,1155,3,156,78,0,1155,1192, + 1,0,0,0,1156,1158,5,36,0,0,1157,1159,3,198,99,0,1158,1157,1,0,0, + 0,1158,1159,1,0,0,0,1159,1160,1,0,0,0,1160,1192,5,84,0,0,1161,1162, + 5,44,0,0,1162,1163,3,198,99,0,1163,1164,5,84,0,0,1164,1192,1,0,0, + 0,1165,1167,5,4,0,0,1166,1168,3,162,81,0,1167,1166,1,0,0,0,1167, + 1168,1,0,0,0,1168,1169,1,0,0,0,1169,1192,5,84,0,0,1170,1172,5,11, + 0,0,1171,1173,3,162,81,0,1172,1171,1,0,0,0,1172,1173,1,0,0,0,1173, + 1174,1,0,0,0,1174,1192,5,84,0,0,1175,1176,5,62,0,0,1176,1177,3,198, + 99,0,1177,1178,5,84,0,0,1178,1192,1,0,0,0,1179,1192,5,84,0,0,1180, + 1181,3,198,99,0,1181,1182,5,84,0,0,1182,1192,1,0,0,0,1183,1185,3, + 210,105,0,1184,1186,5,84,0,0,1185,1184,1,0,0,0,1185,1186,1,0,0,0, + 1186,1192,1,0,0,0,1187,1188,3,162,81,0,1188,1189,5,93,0,0,1189,1190, + 3,168,84,0,1190,1192,1,0,0,0,1191,1078,1,0,0,0,1191,1079,1,0,0,0, + 1191,1087,1,0,0,0,1191,1094,1,0,0,0,1191,1100,1,0,0,0,1191,1104, + 1,0,0,0,1191,1110,1,0,0,0,1191,1123,1,0,0,0,1191,1135,1,0,0,0,1191, + 1152,1,0,0,0,1191,1156,1,0,0,0,1191,1161,1,0,0,0,1191,1165,1,0,0, + 0,1191,1170,1,0,0,0,1191,1175,1,0,0,0,1191,1179,1,0,0,0,1191,1180, + 1,0,0,0,1191,1183,1,0,0,0,1191,1187,1,0,0,0,1192,169,1,0,0,0,1193, + 1194,5,7,0,0,1194,1198,5,78,0,0,1195,1197,3,12,6,0,1196,1195,1,0, + 0,0,1197,1200,1,0,0,0,1198,1196,1,0,0,0,1198,1199,1,0,0,0,1199,1201, + 1,0,0,0,1200,1198,1,0,0,0,1201,1202,3,172,86,0,1202,1203,3,162,81, + 0,1203,1204,5,79,0,0,1204,1205,3,156,78,0,1205,171,1,0,0,0,1206, + 1211,3,102,51,0,1207,1208,5,107,0,0,1208,1210,3,102,51,0,1209,1207, + 1,0,0,0,1210,1213,1,0,0,0,1211,1209,1,0,0,0,1211,1212,1,0,0,0,1212, + 173,1,0,0,0,1213,1211,1,0,0,0,1214,1215,5,19,0,0,1215,1216,3,156, + 78,0,1216,175,1,0,0,0,1217,1218,5,78,0,0,1218,1220,3,178,89,0,1219, + 1221,5,84,0,0,1220,1219,1,0,0,0,1220,1221,1,0,0,0,1221,1222,1,0, + 0,0,1222,1223,5,79,0,0,1223,177,1,0,0,0,1224,1229,3,180,90,0,1225, + 1226,5,84,0,0,1226,1228,3,180,90,0,1227,1225,1,0,0,0,1228,1231,1, + 0,0,0,1229,1227,1,0,0,0,1229,1230,1,0,0,0,1230,179,1,0,0,0,1231, + 1229,1,0,0,0,1232,1234,3,12,6,0,1233,1232,1,0,0,0,1234,1237,1,0, + 0,0,1235,1233,1,0,0,0,1235,1236,1,0,0,0,1236,1243,1,0,0,0,1237,1235, + 1,0,0,0,1238,1239,3,82,41,0,1239,1240,3,76,38,0,1240,1244,1,0,0, + 0,1241,1242,5,61,0,0,1242,1244,3,162,81,0,1243,1238,1,0,0,0,1243, + 1241,1,0,0,0,1244,1245,1,0,0,0,1245,1246,5,87,0,0,1246,1247,3,198, + 99,0,1247,1250,1,0,0,0,1248,1250,3,102,51,0,1249,1235,1,0,0,0,1249, + 1248,1,0,0,0,1250,181,1,0,0,0,1251,1253,3,184,92,0,1252,1251,1,0, + 0,0,1253,1254,1,0,0,0,1254,1252,1,0,0,0,1254,1255,1,0,0,0,1255,1257, + 1,0,0,0,1256,1258,3,158,79,0,1257,1256,1,0,0,0,1258,1259,1,0,0,0, + 1259,1257,1,0,0,0,1259,1260,1,0,0,0,1260,183,1,0,0,0,1261,1267,5, + 6,0,0,1262,1268,3,198,99,0,1263,1268,5,128,0,0,1264,1265,3,240,120, + 0,1265,1266,3,162,81,0,1266,1268,1,0,0,0,1267,1262,1,0,0,0,1267, + 1263,1,0,0,0,1267,1264,1,0,0,0,1268,1269,1,0,0,0,1269,1273,5,93, + 0,0,1270,1271,5,12,0,0,1271,1273,5,93,0,0,1272,1261,1,0,0,0,1272, + 1270,1,0,0,0,1273,185,1,0,0,0,1274,1287,3,190,95,0,1275,1277,3,188, + 94,0,1276,1275,1,0,0,0,1276,1277,1,0,0,0,1277,1278,1,0,0,0,1278, + 1280,5,84,0,0,1279,1281,3,198,99,0,1280,1279,1,0,0,0,1280,1281,1, + 0,0,0,1281,1282,1,0,0,0,1282,1284,5,84,0,0,1283,1285,3,194,97,0, + 1284,1283,1,0,0,0,1284,1285,1,0,0,0,1285,1287,1,0,0,0,1286,1274, + 1,0,0,0,1286,1276,1,0,0,0,1287,187,1,0,0,0,1288,1291,3,160,80,0, + 1289,1291,3,194,97,0,1290,1288,1,0,0,0,1290,1289,1,0,0,0,1291,189, + 1,0,0,0,1292,1294,3,12,6,0,1293,1292,1,0,0,0,1294,1297,1,0,0,0,1295, + 1293,1,0,0,0,1295,1296,1,0,0,0,1296,1300,1,0,0,0,1297,1295,1,0,0, + 0,1298,1301,3,240,120,0,1299,1301,5,61,0,0,1300,1298,1,0,0,0,1300, + 1299,1,0,0,0,1301,1302,1,0,0,0,1302,1303,3,76,38,0,1303,1304,5,93, + 0,0,1304,1305,3,198,99,0,1305,191,1,0,0,0,1306,1307,5,78,0,0,1307, + 1308,3,198,99,0,1308,1309,5,79,0,0,1309,193,1,0,0,0,1310,1315,3, + 198,99,0,1311,1312,5,85,0,0,1312,1314,3,198,99,0,1313,1311,1,0,0, + 0,1314,1317,1,0,0,0,1315,1313,1,0,0,0,1315,1316,1,0,0,0,1316,195, + 1,0,0,0,1317,1315,1,0,0,0,1318,1322,3,162,81,0,1319,1322,5,43,0, + 0,1320,1322,5,40,0,0,1321,1318,1,0,0,0,1321,1319,1,0,0,0,1321,1320, + 1,0,0,0,1322,1323,1,0,0,0,1323,1324,3,250,125,0,1324,197,1,0,0,0, + 1325,1326,6,99,-1,0,1326,1369,3,208,104,0,1327,1369,3,196,98,0,1328, + 1329,3,240,120,0,1329,1335,5,122,0,0,1330,1332,3,244,122,0,1331, + 1330,1,0,0,0,1331,1332,1,0,0,0,1332,1333,1,0,0,0,1333,1336,3,162, + 81,0,1334,1336,5,31,0,0,1335,1331,1,0,0,0,1335,1334,1,0,0,0,1336, + 1369,1,0,0,0,1337,1338,3,218,109,0,1338,1340,5,122,0,0,1339,1341, + 3,244,122,0,1340,1339,1,0,0,0,1340,1341,1,0,0,0,1341,1342,1,0,0, + 0,1342,1343,5,31,0,0,1343,1369,1,0,0,0,1344,1369,3,210,105,0,1345, + 1346,7,6,0,0,1346,1369,3,198,99,17,1347,1351,5,78,0,0,1348,1350, + 3,112,56,0,1349,1348,1,0,0,0,1350,1353,1,0,0,0,1351,1349,1,0,0,0, + 1351,1352,1,0,0,0,1352,1354,1,0,0,0,1353,1351,1,0,0,0,1354,1359, + 3,240,120,0,1355,1356,5,106,0,0,1356,1358,3,240,120,0,1357,1355, + 1,0,0,0,1358,1361,1,0,0,0,1359,1357,1,0,0,0,1359,1360,1,0,0,0,1360, + 1362,1,0,0,0,1361,1359,1,0,0,0,1362,1363,5,79,0,0,1363,1364,3,198, + 99,16,1364,1369,1,0,0,0,1365,1366,5,31,0,0,1366,1369,3,220,110,0, + 1367,1369,3,202,101,0,1368,1325,1,0,0,0,1368,1327,1,0,0,0,1368,1328, + 1,0,0,0,1368,1337,1,0,0,0,1368,1344,1,0,0,0,1368,1345,1,0,0,0,1368, + 1347,1,0,0,0,1368,1365,1,0,0,0,1368,1367,1,0,0,0,1369,1453,1,0,0, + 0,1370,1371,10,14,0,0,1371,1372,7,7,0,0,1372,1452,3,198,99,15,1373, + 1374,10,13,0,0,1374,1375,7,8,0,0,1375,1452,3,198,99,14,1376,1384, + 10,12,0,0,1377,1378,5,89,0,0,1378,1385,5,89,0,0,1379,1380,5,88,0, + 0,1380,1381,5,88,0,0,1381,1385,5,88,0,0,1382,1383,5,88,0,0,1383, + 1385,5,88,0,0,1384,1377,1,0,0,0,1384,1379,1,0,0,0,1384,1382,1,0, + 0,0,1385,1386,1,0,0,0,1386,1452,3,198,99,13,1387,1388,10,11,0,0, + 1388,1389,7,9,0,0,1389,1452,3,198,99,12,1390,1391,10,9,0,0,1391, + 1392,7,10,0,0,1392,1452,3,198,99,10,1393,1394,10,8,0,0,1394,1395, + 5,106,0,0,1395,1452,3,198,99,9,1396,1397,10,7,0,0,1397,1398,5,108, + 0,0,1398,1452,3,198,99,8,1399,1400,10,6,0,0,1400,1401,5,107,0,0, + 1401,1452,3,198,99,7,1402,1403,10,5,0,0,1403,1404,5,98,0,0,1404, + 1452,3,198,99,6,1405,1406,10,4,0,0,1406,1407,5,99,0,0,1407,1452, + 3,198,99,5,1408,1409,10,3,0,0,1409,1410,5,92,0,0,1410,1411,3,198, + 99,0,1411,1412,5,93,0,0,1412,1413,3,198,99,3,1413,1452,1,0,0,0,1414, + 1415,10,2,0,0,1415,1416,7,11,0,0,1416,1452,3,198,99,2,1417,1418, + 10,25,0,0,1418,1419,5,82,0,0,1419,1420,3,198,99,0,1420,1421,5,83, + 0,0,1421,1452,1,0,0,0,1422,1423,10,24,0,0,1423,1435,5,86,0,0,1424, + 1436,3,162,81,0,1425,1436,3,196,98,0,1426,1436,5,43,0,0,1427,1429, + 5,31,0,0,1428,1430,3,236,118,0,1429,1428,1,0,0,0,1429,1430,1,0,0, + 0,1430,1431,1,0,0,0,1431,1436,3,224,112,0,1432,1433,5,40,0,0,1433, + 1436,3,246,123,0,1434,1436,3,230,115,0,1435,1424,1,0,0,0,1435,1425, + 1,0,0,0,1435,1426,1,0,0,0,1435,1427,1,0,0,0,1435,1432,1,0,0,0,1435, + 1434,1,0,0,0,1436,1452,1,0,0,0,1437,1438,10,22,0,0,1438,1440,5,122, + 0,0,1439,1441,3,244,122,0,1440,1439,1,0,0,0,1440,1441,1,0,0,0,1441, + 1442,1,0,0,0,1442,1452,3,162,81,0,1443,1444,10,18,0,0,1444,1452, + 7,12,0,0,1445,1446,10,10,0,0,1446,1449,5,26,0,0,1447,1450,3,240, + 120,0,1448,1450,3,200,100,0,1449,1447,1,0,0,0,1449,1448,1,0,0,0, + 1450,1452,1,0,0,0,1451,1370,1,0,0,0,1451,1373,1,0,0,0,1451,1376, + 1,0,0,0,1451,1387,1,0,0,0,1451,1390,1,0,0,0,1451,1393,1,0,0,0,1451, + 1396,1,0,0,0,1451,1399,1,0,0,0,1451,1402,1,0,0,0,1451,1405,1,0,0, + 0,1451,1408,1,0,0,0,1451,1414,1,0,0,0,1451,1417,1,0,0,0,1451,1422, + 1,0,0,0,1451,1437,1,0,0,0,1451,1443,1,0,0,0,1451,1445,1,0,0,0,1452, + 1455,1,0,0,0,1453,1451,1,0,0,0,1453,1454,1,0,0,0,1454,199,1,0,0, + 0,1455,1453,1,0,0,0,1456,1458,3,12,6,0,1457,1456,1,0,0,0,1458,1461, + 1,0,0,0,1459,1457,1,0,0,0,1459,1460,1,0,0,0,1460,1462,1,0,0,0,1461, + 1459,1,0,0,0,1462,1466,3,240,120,0,1463,1465,3,112,56,0,1464,1463, + 1,0,0,0,1465,1468,1,0,0,0,1466,1464,1,0,0,0,1466,1467,1,0,0,0,1467, + 1469,1,0,0,0,1468,1466,1,0,0,0,1469,1470,3,162,81,0,1470,201,1,0, + 0,0,1471,1472,3,204,102,0,1472,1473,5,121,0,0,1473,1474,3,206,103, + 0,1474,203,1,0,0,0,1475,1498,3,162,81,0,1476,1478,5,78,0,0,1477, + 1479,3,92,46,0,1478,1477,1,0,0,0,1478,1479,1,0,0,0,1479,1480,1,0, + 0,0,1480,1498,5,79,0,0,1481,1482,5,78,0,0,1482,1487,3,162,81,0,1483, + 1484,5,85,0,0,1484,1486,3,162,81,0,1485,1483,1,0,0,0,1486,1489,1, + 0,0,0,1487,1485,1,0,0,0,1487,1488,1,0,0,0,1488,1490,1,0,0,0,1489, + 1487,1,0,0,0,1490,1491,5,79,0,0,1491,1498,1,0,0,0,1492,1494,5,78, + 0,0,1493,1495,3,98,49,0,1494,1493,1,0,0,0,1494,1495,1,0,0,0,1495, + 1496,1,0,0,0,1496,1498,5,79,0,0,1497,1475,1,0,0,0,1497,1476,1,0, + 0,0,1497,1481,1,0,0,0,1497,1492,1,0,0,0,1498,205,1,0,0,0,1499,1502, + 3,198,99,0,1500,1502,3,156,78,0,1501,1499,1,0,0,0,1501,1500,1,0, + 0,0,1502,207,1,0,0,0,1503,1504,5,78,0,0,1504,1505,3,198,99,0,1505, + 1506,5,79,0,0,1506,1522,1,0,0,0,1507,1522,5,43,0,0,1508,1522,5,40, + 0,0,1509,1522,3,104,52,0,1510,1522,3,162,81,0,1511,1512,3,44,22, + 0,1512,1513,5,86,0,0,1513,1514,5,9,0,0,1514,1522,1,0,0,0,1515,1519, + 3,236,118,0,1516,1520,3,248,124,0,1517,1518,5,43,0,0,1518,1520,3, + 250,125,0,1519,1516,1,0,0,0,1519,1517,1,0,0,0,1520,1522,1,0,0,0, + 1521,1503,1,0,0,0,1521,1507,1,0,0,0,1521,1508,1,0,0,0,1521,1509, + 1,0,0,0,1521,1510,1,0,0,0,1521,1511,1,0,0,0,1521,1515,1,0,0,0,1522, + 209,1,0,0,0,1523,1524,5,41,0,0,1524,1525,3,192,96,0,1525,1529,5, + 80,0,0,1526,1528,3,212,106,0,1527,1526,1,0,0,0,1528,1531,1,0,0,0, + 1529,1527,1,0,0,0,1529,1530,1,0,0,0,1530,1532,1,0,0,0,1531,1529, + 1,0,0,0,1532,1533,5,81,0,0,1533,211,1,0,0,0,1534,1538,5,6,0,0,1535, + 1539,3,194,97,0,1536,1539,5,77,0,0,1537,1539,3,214,107,0,1538,1535, + 1,0,0,0,1538,1536,1,0,0,0,1538,1537,1,0,0,0,1539,1540,1,0,0,0,1540, + 1541,7,13,0,0,1541,1546,3,216,108,0,1542,1543,5,12,0,0,1543,1544, + 7,13,0,0,1544,1546,3,216,108,0,1545,1534,1,0,0,0,1545,1542,1,0,0, + 0,1546,213,1,0,0,0,1547,1548,6,107,-1,0,1548,1549,5,78,0,0,1549, + 1550,3,214,107,0,1550,1551,5,79,0,0,1551,1574,1,0,0,0,1552,1554, + 3,12,6,0,1553,1552,1,0,0,0,1554,1557,1,0,0,0,1555,1553,1,0,0,0,1555, + 1556,1,0,0,0,1556,1558,1,0,0,0,1557,1555,1,0,0,0,1558,1562,3,240, + 120,0,1559,1561,3,112,56,0,1560,1559,1,0,0,0,1561,1564,1,0,0,0,1562, + 1560,1,0,0,0,1562,1563,1,0,0,0,1563,1565,1,0,0,0,1564,1562,1,0,0, + 0,1565,1570,3,162,81,0,1566,1567,5,98,0,0,1567,1569,3,198,99,0,1568, + 1566,1,0,0,0,1569,1572,1,0,0,0,1570,1568,1,0,0,0,1570,1571,1,0,0, + 0,1571,1574,1,0,0,0,1572,1570,1,0,0,0,1573,1547,1,0,0,0,1573,1555, + 1,0,0,0,1574,1580,1,0,0,0,1575,1576,10,1,0,0,1576,1577,5,98,0,0, + 1577,1579,3,198,99,0,1578,1575,1,0,0,0,1579,1582,1,0,0,0,1580,1578, + 1,0,0,0,1580,1581,1,0,0,0,1581,215,1,0,0,0,1582,1580,1,0,0,0,1583, + 1591,3,156,78,0,1584,1586,3,158,79,0,1585,1584,1,0,0,0,1586,1589, + 1,0,0,0,1587,1585,1,0,0,0,1587,1588,1,0,0,0,1588,1591,1,0,0,0,1589, + 1587,1,0,0,0,1590,1583,1,0,0,0,1590,1587,1,0,0,0,1591,217,1,0,0, + 0,1592,1593,3,82,41,0,1593,1594,5,86,0,0,1594,1596,1,0,0,0,1595, + 1592,1,0,0,0,1595,1596,1,0,0,0,1596,1600,1,0,0,0,1597,1599,3,112, + 56,0,1598,1597,1,0,0,0,1599,1602,1,0,0,0,1600,1598,1,0,0,0,1600, + 1601,1,0,0,0,1601,1603,1,0,0,0,1602,1600,1,0,0,0,1603,1605,3,162, + 81,0,1604,1606,3,244,122,0,1605,1604,1,0,0,0,1605,1606,1,0,0,0,1606, + 219,1,0,0,0,1607,1609,3,236,118,0,1608,1607,1,0,0,0,1608,1609,1, + 0,0,0,1609,1610,1,0,0,0,1610,1611,3,222,111,0,1611,1612,3,228,114, + 0,1612,1617,1,0,0,0,1613,1614,3,222,111,0,1614,1615,3,226,113,0, + 1615,1617,1,0,0,0,1616,1608,1,0,0,0,1616,1613,1,0,0,0,1617,221,1, + 0,0,0,1618,1620,3,162,81,0,1619,1621,3,232,116,0,1620,1619,1,0,0, + 0,1620,1621,1,0,0,0,1621,1629,1,0,0,0,1622,1623,5,86,0,0,1623,1625, + 3,162,81,0,1624,1626,3,232,116,0,1625,1624,1,0,0,0,1625,1626,1,0, + 0,0,1626,1628,1,0,0,0,1627,1622,1,0,0,0,1628,1631,1,0,0,0,1629,1627, + 1,0,0,0,1629,1630,1,0,0,0,1630,1634,1,0,0,0,1631,1629,1,0,0,0,1632, + 1634,3,242,121,0,1633,1618,1,0,0,0,1633,1632,1,0,0,0,1634,223,1, + 0,0,0,1635,1637,3,162,81,0,1636,1638,3,234,117,0,1637,1636,1,0,0, + 0,1637,1638,1,0,0,0,1638,1639,1,0,0,0,1639,1640,3,228,114,0,1640, + 225,1,0,0,0,1641,1642,5,82,0,0,1642,1644,5,83,0,0,1643,1641,1,0, + 0,0,1644,1645,1,0,0,0,1645,1643,1,0,0,0,1645,1646,1,0,0,0,1646,1647, + 1,0,0,0,1647,1664,3,80,40,0,1648,1649,5,82,0,0,1649,1650,3,198,99, + 0,1650,1651,5,83,0,0,1651,1653,1,0,0,0,1652,1648,1,0,0,0,1653,1654, + 1,0,0,0,1654,1652,1,0,0,0,1654,1655,1,0,0,0,1655,1660,1,0,0,0,1656, + 1657,5,82,0,0,1657,1659,5,83,0,0,1658,1656,1,0,0,0,1659,1662,1,0, + 0,0,1660,1658,1,0,0,0,1660,1661,1,0,0,0,1661,1664,1,0,0,0,1662,1660, + 1,0,0,0,1663,1643,1,0,0,0,1663,1652,1,0,0,0,1664,227,1,0,0,0,1665, + 1667,3,250,125,0,1666,1668,3,32,16,0,1667,1666,1,0,0,0,1667,1668, + 1,0,0,0,1668,229,1,0,0,0,1669,1670,3,236,118,0,1670,1671,3,248,124, + 0,1671,231,1,0,0,0,1672,1673,5,89,0,0,1673,1676,5,88,0,0,1674,1676, + 3,244,122,0,1675,1672,1,0,0,0,1675,1674,1,0,0,0,1676,233,1,0,0,0, + 1677,1678,5,89,0,0,1678,1681,5,88,0,0,1679,1681,3,236,118,0,1680, + 1677,1,0,0,0,1680,1679,1,0,0,0,1681,235,1,0,0,0,1682,1683,5,89,0, + 0,1683,1684,3,238,119,0,1684,1685,5,88,0,0,1685,237,1,0,0,0,1686, + 1691,3,240,120,0,1687,1688,5,85,0,0,1688,1690,3,240,120,0,1689,1687, + 1,0,0,0,1690,1693,1,0,0,0,1691,1689,1,0,0,0,1691,1692,1,0,0,0,1692, + 239,1,0,0,0,1693,1691,1,0,0,0,1694,1696,3,112,56,0,1695,1694,1,0, + 0,0,1696,1699,1,0,0,0,1697,1695,1,0,0,0,1697,1698,1,0,0,0,1698,1702, + 1,0,0,0,1699,1697,1,0,0,0,1700,1703,3,82,41,0,1701,1703,3,242,121, + 0,1702,1700,1,0,0,0,1702,1701,1,0,0,0,1703,1714,1,0,0,0,1704,1706, + 3,112,56,0,1705,1704,1,0,0,0,1706,1709,1,0,0,0,1707,1705,1,0,0,0, + 1707,1708,1,0,0,0,1708,1710,1,0,0,0,1709,1707,1,0,0,0,1710,1711, + 5,82,0,0,1711,1713,5,83,0,0,1712,1707,1,0,0,0,1713,1716,1,0,0,0, + 1714,1712,1,0,0,0,1714,1715,1,0,0,0,1715,241,1,0,0,0,1716,1714,1, + 0,0,0,1717,1718,7,14,0,0,1718,243,1,0,0,0,1719,1720,5,89,0,0,1720, + 1725,3,84,42,0,1721,1722,5,85,0,0,1722,1724,3,84,42,0,1723,1721, + 1,0,0,0,1724,1727,1,0,0,0,1725,1723,1,0,0,0,1725,1726,1,0,0,0,1726, + 1728,1,0,0,0,1727,1725,1,0,0,0,1728,1729,5,88,0,0,1729,245,1,0,0, + 0,1730,1740,3,250,125,0,1731,1733,5,86,0,0,1732,1734,3,244,122,0, + 1733,1732,1,0,0,0,1733,1734,1,0,0,0,1734,1735,1,0,0,0,1735,1737, + 3,162,81,0,1736,1738,3,250,125,0,1737,1736,1,0,0,0,1737,1738,1,0, + 0,0,1738,1740,1,0,0,0,1739,1730,1,0,0,0,1739,1731,1,0,0,0,1740,247, + 1,0,0,0,1741,1742,5,40,0,0,1742,1747,3,246,123,0,1743,1744,3,162, + 81,0,1744,1745,3,250,125,0,1745,1747,1,0,0,0,1746,1741,1,0,0,0,1746, + 1743,1,0,0,0,1747,249,1,0,0,0,1748,1750,5,78,0,0,1749,1751,3,194, + 97,0,1750,1749,1,0,0,0,1750,1751,1,0,0,0,1751,1752,1,0,0,0,1752, + 1753,5,79,0,0,1753,251,1,0,0,0,219,253,257,259,264,266,272,277,286, + 291,298,306,313,325,329,334,338,342,346,356,364,372,376,383,390, + 394,397,400,409,415,420,423,429,435,439,443,451,460,467,473,477, + 489,498,503,509,513,525,532,545,550,560,568,578,587,598,603,612, + 622,627,636,642,649,654,662,666,668,674,680,685,691,697,699,706, + 711,716,719,721,731,741,746,749,754,763,770,781,787,798,808,819, + 828,833,836,843,853,861,864,867,880,888,893,901,905,909,913,917, + 919,923,929,937,947,956,966,974,988,995,1000,1006,1015,1024,1026, + 1035,1045,1050,1061,1070,1076,1083,1092,1115,1118,1121,1129,1133, + 1141,1147,1158,1167,1172,1185,1191,1198,1211,1220,1229,1235,1243, + 1249,1254,1259,1267,1272,1276,1280,1284,1286,1290,1295,1300,1315, + 1321,1331,1335,1340,1351,1359,1368,1384,1429,1435,1440,1449,1451, + 1453,1459,1466,1478,1487,1494,1497,1501,1519,1521,1529,1538,1545, + 1555,1562,1570,1573,1580,1587,1590,1595,1600,1605,1608,1616,1620, + 1625,1629,1633,1637,1645,1654,1660,1663,1667,1675,1680,1691,1697, + 1702,1707,1714,1725,1733,1737,1739,1746,1750 + ] + +class JavaParser ( Parser ): + + grammarFileName = "JavaParser.g4" + + atn = ATNDeserializer().deserialize(serializedATN()) + + decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ] + + sharedContextCache = PredictionContextCache() + + literalNames = [ "", "'abstract'", "'assert'", "'boolean'", + "'break'", "'byte'", "'case'", "'catch'", "'char'", + "'class'", "'const'", "'continue'", "'default'", "'do'", + "'double'", "'else'", "'enum'", "'extends'", "'final'", + "'finally'", "'float'", "'for'", "'if'", "'goto'", + "'implements'", "'import'", "'instanceof'", "'int'", + "'interface'", "'long'", "'native'", "'new'", "'package'", + "'private'", "'protected'", "'public'", "'return'", + "'short'", "'static'", "'strictfp'", "'super'", "'switch'", + "'synchronized'", "'this'", "'throw'", "'throws'", + "'transient'", "'try'", "'void'", "'volatile'", "'while'", + "'module'", "'open'", "'requires'", "'exports'", "'opens'", + "'to'", "'uses'", "'provides'", "'with'", "'transitive'", + "'var'", "'yield'", "'record'", "'sealed'", "'permits'", + "'non-sealed'", "", "", "", + "", "", "", "", + "", "", "", "'null'", "'('", + "')'", "'{'", "'}'", "'['", "']'", "';'", "','", "'.'", + "'='", "'>'", "'<'", "'!'", "'~'", "'?'", "':'", "'=='", + "'<='", "'>='", "'!='", "'&&'", "'||'", "'++'", "'--'", + "'+'", "'-'", "'*'", "'/'", "'&'", "'|'", "'^'", "'%'", + "'+='", "'-='", "'*='", "'/='", "'&='", "'|='", "'^='", + "'%='", "'<<='", "'>>='", "'>>>='", "'->'", "'::'", + "'@'", "'...'" ] + + symbolicNames = [ "", "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", + "BYTE", "CASE", "CATCH", "CHAR", "CLASS", "CONST", + "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE", "ENUM", + "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF", + "GOTO", "IMPLEMENTS", "IMPORT", "INSTANCEOF", "INT", + "INTERFACE", "LONG", "NATIVE", "NEW", "PACKAGE", "PRIVATE", + "PROTECTED", "PUBLIC", "RETURN", "SHORT", "STATIC", + "STRICTFP", "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", + "THROW", "THROWS", "TRANSIENT", "TRY", "VOID", "VOLATILE", + "WHILE", "MODULE", "OPEN", "REQUIRES", "EXPORTS", + "OPENS", "TO", "USES", "PROVIDES", "WITH", "TRANSITIVE", + "VAR", "YIELD", "RECORD", "SEALED", "PERMITS", "NON_SEALED", + "DECIMAL_LITERAL", "HEX_LITERAL", "OCT_LITERAL", "BINARY_LITERAL", + "FLOAT_LITERAL", "HEX_FLOAT_LITERAL", "BOOL_LITERAL", + "CHAR_LITERAL", "STRING_LITERAL", "TEXT_BLOCK", "NULL_LITERAL", + "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", + "RBRACK", "SEMI", "COMMA", "DOT", "ASSIGN", "GT", + "LT", "BANG", "TILDE", "QUESTION", "COLON", "EQUAL", + "LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", + "ADD", "SUB", "MUL", "DIV", "BITAND", "BITOR", "CARET", + "MOD", "ADD_ASSIGN", "SUB_ASSIGN", "MUL_ASSIGN", "DIV_ASSIGN", + "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", "MOD_ASSIGN", + "LSHIFT_ASSIGN", "RSHIFT_ASSIGN", "URSHIFT_ASSIGN", + "ARROW", "COLONCOLON", "AT", "ELLIPSIS", "WS", "COMMENT", + "LINE_COMMENT", "IDENTIFIER" ] + + RULE_compilationUnit = 0 + RULE_packageDeclaration = 1 + RULE_importDeclaration = 2 + RULE_typeDeclaration = 3 + RULE_modifier = 4 + RULE_classOrInterfaceModifier = 5 + RULE_variableModifier = 6 + RULE_classDeclaration = 7 + RULE_typeParameters = 8 + RULE_typeParameter = 9 + RULE_typeBound = 10 + RULE_enumDeclaration = 11 + RULE_enumConstants = 12 + RULE_enumConstant = 13 + RULE_enumBodyDeclarations = 14 + RULE_interfaceDeclaration = 15 + RULE_classBody = 16 + RULE_interfaceBody = 17 + RULE_classBodyDeclaration = 18 + RULE_memberDeclaration = 19 + RULE_methodDeclaration = 20 + RULE_methodBody = 21 + RULE_typeTypeOrVoid = 22 + RULE_genericMethodDeclaration = 23 + RULE_genericConstructorDeclaration = 24 + RULE_constructorDeclaration = 25 + RULE_compactConstructorDeclaration = 26 + RULE_fieldDeclaration = 27 + RULE_interfaceBodyDeclaration = 28 + RULE_interfaceMemberDeclaration = 29 + RULE_constDeclaration = 30 + RULE_constantDeclarator = 31 + RULE_interfaceMethodDeclaration = 32 + RULE_interfaceMethodModifier = 33 + RULE_genericInterfaceMethodDeclaration = 34 + RULE_interfaceCommonBodyDeclaration = 35 + RULE_variableDeclarators = 36 + RULE_variableDeclarator = 37 + RULE_variableDeclaratorId = 38 + RULE_variableInitializer = 39 + RULE_arrayInitializer = 40 + RULE_classOrInterfaceType = 41 + RULE_typeArgument = 42 + RULE_qualifiedNameList = 43 + RULE_formalParameters = 44 + RULE_receiverParameter = 45 + RULE_formalParameterList = 46 + RULE_formalParameter = 47 + RULE_lastFormalParameter = 48 + RULE_lambdaLVTIList = 49 + RULE_lambdaLVTIParameter = 50 + RULE_qualifiedName = 51 + RULE_literal = 52 + RULE_integerLiteral = 53 + RULE_floatLiteral = 54 + RULE_altAnnotationQualifiedName = 55 + RULE_annotation = 56 + RULE_elementValuePairs = 57 + RULE_elementValuePair = 58 + RULE_elementValue = 59 + RULE_elementValueArrayInitializer = 60 + RULE_annotationTypeDeclaration = 61 + RULE_annotationTypeBody = 62 + RULE_annotationTypeElementDeclaration = 63 + RULE_annotationTypeElementRest = 64 + RULE_annotationMethodOrConstantRest = 65 + RULE_annotationMethodRest = 66 + RULE_annotationConstantRest = 67 + RULE_defaultValue = 68 + RULE_moduleDeclaration = 69 + RULE_moduleBody = 70 + RULE_moduleDirective = 71 + RULE_requiresModifier = 72 + RULE_recordDeclaration = 73 + RULE_recordHeader = 74 + RULE_recordComponentList = 75 + RULE_recordComponent = 76 + RULE_recordBody = 77 + RULE_block = 78 + RULE_blockStatement = 79 + RULE_localVariableDeclaration = 80 + RULE_identifier = 81 + RULE_typeIdentifier = 82 + RULE_localTypeDeclaration = 83 + RULE_statement = 84 + RULE_catchClause = 85 + RULE_catchType = 86 + RULE_finallyBlock = 87 + RULE_resourceSpecification = 88 + RULE_resources = 89 + RULE_resource = 90 + RULE_switchBlockStatementGroup = 91 + RULE_switchLabel = 92 + RULE_forControl = 93 + RULE_forInit = 94 + RULE_enhancedForControl = 95 + RULE_parExpression = 96 + RULE_expressionList = 97 + RULE_methodCall = 98 + RULE_expression = 99 + RULE_pattern = 100 + RULE_lambdaExpression = 101 + RULE_lambdaParameters = 102 + RULE_lambdaBody = 103 + RULE_primary = 104 + RULE_switchExpression = 105 + RULE_switchLabeledRule = 106 + RULE_guardedPattern = 107 + RULE_switchRuleOutcome = 108 + RULE_classType = 109 + RULE_creator = 110 + RULE_createdName = 111 + RULE_innerCreator = 112 + RULE_arrayCreatorRest = 113 + RULE_classCreatorRest = 114 + RULE_explicitGenericInvocation = 115 + RULE_typeArgumentsOrDiamond = 116 + RULE_nonWildcardTypeArgumentsOrDiamond = 117 + RULE_nonWildcardTypeArguments = 118 + RULE_typeList = 119 + RULE_typeType = 120 + RULE_primitiveType = 121 + RULE_typeArguments = 122 + RULE_superSuffix = 123 + RULE_explicitGenericInvocationSuffix = 124 + RULE_arguments = 125 + + ruleNames = [ "compilationUnit", "packageDeclaration", "importDeclaration", + "typeDeclaration", "modifier", "classOrInterfaceModifier", + "variableModifier", "classDeclaration", "typeParameters", + "typeParameter", "typeBound", "enumDeclaration", "enumConstants", + "enumConstant", "enumBodyDeclarations", "interfaceDeclaration", + "classBody", "interfaceBody", "classBodyDeclaration", + "memberDeclaration", "methodDeclaration", "methodBody", + "typeTypeOrVoid", "genericMethodDeclaration", "genericConstructorDeclaration", + "constructorDeclaration", "compactConstructorDeclaration", + "fieldDeclaration", "interfaceBodyDeclaration", "interfaceMemberDeclaration", + "constDeclaration", "constantDeclarator", "interfaceMethodDeclaration", + "interfaceMethodModifier", "genericInterfaceMethodDeclaration", + "interfaceCommonBodyDeclaration", "variableDeclarators", + "variableDeclarator", "variableDeclaratorId", "variableInitializer", + "arrayInitializer", "classOrInterfaceType", "typeArgument", + "qualifiedNameList", "formalParameters", "receiverParameter", + "formalParameterList", "formalParameter", "lastFormalParameter", + "lambdaLVTIList", "lambdaLVTIParameter", "qualifiedName", + "literal", "integerLiteral", "floatLiteral", "altAnnotationQualifiedName", + "annotation", "elementValuePairs", "elementValuePair", + "elementValue", "elementValueArrayInitializer", "annotationTypeDeclaration", + "annotationTypeBody", "annotationTypeElementDeclaration", + "annotationTypeElementRest", "annotationMethodOrConstantRest", + "annotationMethodRest", "annotationConstantRest", "defaultValue", + "moduleDeclaration", "moduleBody", "moduleDirective", + "requiresModifier", "recordDeclaration", "recordHeader", + "recordComponentList", "recordComponent", "recordBody", + "block", "blockStatement", "localVariableDeclaration", + "identifier", "typeIdentifier", "localTypeDeclaration", + "statement", "catchClause", "catchType", "finallyBlock", + "resourceSpecification", "resources", "resource", "switchBlockStatementGroup", + "switchLabel", "forControl", "forInit", "enhancedForControl", + "parExpression", "expressionList", "methodCall", "expression", + "pattern", "lambdaExpression", "lambdaParameters", "lambdaBody", + "primary", "switchExpression", "switchLabeledRule", "guardedPattern", + "switchRuleOutcome", "classType", "creator", "createdName", + "innerCreator", "arrayCreatorRest", "classCreatorRest", + "explicitGenericInvocation", "typeArgumentsOrDiamond", + "nonWildcardTypeArgumentsOrDiamond", "nonWildcardTypeArguments", + "typeList", "typeType", "primitiveType", "typeArguments", + "superSuffix", "explicitGenericInvocationSuffix", "arguments" ] + + EOF = Token.EOF + ABSTRACT=1 + ASSERT=2 + BOOLEAN=3 + BREAK=4 + BYTE=5 + CASE=6 + CATCH=7 + CHAR=8 + CLASS=9 + CONST=10 + CONTINUE=11 + DEFAULT=12 + DO=13 + DOUBLE=14 + ELSE=15 + ENUM=16 + EXTENDS=17 + FINAL=18 + FINALLY=19 + FLOAT=20 + FOR=21 + IF=22 + GOTO=23 + IMPLEMENTS=24 + IMPORT=25 + INSTANCEOF=26 + INT=27 + INTERFACE=28 + LONG=29 + NATIVE=30 + NEW=31 + PACKAGE=32 + PRIVATE=33 + PROTECTED=34 + PUBLIC=35 + RETURN=36 + SHORT=37 + STATIC=38 + STRICTFP=39 + SUPER=40 + SWITCH=41 + SYNCHRONIZED=42 + THIS=43 + THROW=44 + THROWS=45 + TRANSIENT=46 + TRY=47 + VOID=48 + VOLATILE=49 + WHILE=50 + MODULE=51 + OPEN=52 + REQUIRES=53 + EXPORTS=54 + OPENS=55 + TO=56 + USES=57 + PROVIDES=58 + WITH=59 + TRANSITIVE=60 + VAR=61 + YIELD=62 + RECORD=63 + SEALED=64 + PERMITS=65 + NON_SEALED=66 + DECIMAL_LITERAL=67 + HEX_LITERAL=68 + OCT_LITERAL=69 + BINARY_LITERAL=70 + FLOAT_LITERAL=71 + HEX_FLOAT_LITERAL=72 + BOOL_LITERAL=73 + CHAR_LITERAL=74 + STRING_LITERAL=75 + TEXT_BLOCK=76 + NULL_LITERAL=77 + LPAREN=78 + RPAREN=79 + LBRACE=80 + RBRACE=81 + LBRACK=82 + RBRACK=83 + SEMI=84 + COMMA=85 + DOT=86 + ASSIGN=87 + GT=88 + LT=89 + BANG=90 + TILDE=91 + QUESTION=92 + COLON=93 + EQUAL=94 + LE=95 + GE=96 + NOTEQUAL=97 + AND=98 + OR=99 + INC=100 + DEC=101 + ADD=102 + SUB=103 + MUL=104 + DIV=105 + BITAND=106 + BITOR=107 + CARET=108 + MOD=109 + ADD_ASSIGN=110 + SUB_ASSIGN=111 + MUL_ASSIGN=112 + DIV_ASSIGN=113 + AND_ASSIGN=114 + OR_ASSIGN=115 + XOR_ASSIGN=116 + MOD_ASSIGN=117 + LSHIFT_ASSIGN=118 + RSHIFT_ASSIGN=119 + URSHIFT_ASSIGN=120 + ARROW=121 + COLONCOLON=122 + AT=123 + ELLIPSIS=124 + WS=125 + COMMENT=126 + LINE_COMMENT=127 + IDENTIFIER=128 + + def __init__(self, input:TokenStream, output:TextIO = sys.stdout): + super().__init__(input, output) + self.checkVersion("4.13.0") + self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache) + self._predicates = None + + + + + class CompilationUnitContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def packageDeclaration(self): + return self.getTypedRuleContext(JavaParser.PackageDeclarationContext,0) + + + def importDeclaration(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ImportDeclarationContext) + else: + return self.getTypedRuleContext(JavaParser.ImportDeclarationContext,i) + + + def SEMI(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.SEMI) + else: + return self.getToken(JavaParser.SEMI, i) + + def typeDeclaration(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.TypeDeclarationContext) + else: + return self.getTypedRuleContext(JavaParser.TypeDeclarationContext,i) + + + def moduleDeclaration(self): + return self.getTypedRuleContext(JavaParser.ModuleDeclarationContext,0) + + + def EOF(self): + return self.getToken(JavaParser.EOF, 0) + + def getRuleIndex(self): + return JavaParser.RULE_compilationUnit + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCompilationUnit" ): + listener.enterCompilationUnit(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCompilationUnit" ): + listener.exitCompilationUnit(self) + + + + + def compilationUnit(self): + + localctx = JavaParser.CompilationUnitContext(self, self._ctx, self.state) + self.enterRule(localctx, 0, self.RULE_compilationUnit) + self._la = 0 # Token type + try: + self.state = 272 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,5,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 253 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,0,self._ctx) + if la_ == 1: + self.state = 252 + self.packageDeclaration() + + + self.state = 259 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,2,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 257 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [25]: + self.state = 255 + self.importDeclaration() + pass + elif token in [84]: + self.state = 256 + self.match(JavaParser.SEMI) + pass + else: + raise NoViableAltException(self) + + self.state = 261 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,2,self._ctx) + + self.state = 266 + self._errHandler.sync(self) + _la = self._input.LA(1) + while ((((_la - 1)) & ~0x3f) == 0 and ((1 << (_la - 1)) & -1125457390829311) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & -8935141660702539773) != 0): + self.state = 264 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [1, 9, 16, 18, 28, 33, 34, 35, 38, 39, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 123, 128]: + self.state = 262 + self.typeDeclaration() + pass + elif token in [84]: + self.state = 263 + self.match(JavaParser.SEMI) + pass + else: + raise NoViableAltException(self) + + self.state = 268 + self._errHandler.sync(self) + _la = self._input.LA(1) + + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 269 + self.moduleDeclaration() + self.state = 270 + self.match(JavaParser.EOF) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class PackageDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def PACKAGE(self): + return self.getToken(JavaParser.PACKAGE, 0) + + def qualifiedName(self): + return self.getTypedRuleContext(JavaParser.QualifiedNameContext,0) + + + def SEMI(self): + return self.getToken(JavaParser.SEMI, 0) + + def annotation(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.AnnotationContext) + else: + return self.getTypedRuleContext(JavaParser.AnnotationContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_packageDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPackageDeclaration" ): + listener.enterPackageDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPackageDeclaration" ): + listener.exitPackageDeclaration(self) + + + + + def packageDeclaration(self): + + localctx = JavaParser.PackageDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 2, self.RULE_packageDeclaration) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 277 + self._errHandler.sync(self) + _la = self._input.LA(1) + while ((((_la - 51)) & ~0x3f) == 0 and ((1 << (_la - 51)) & 32767) != 0) or _la==123 or _la==128: + self.state = 274 + self.annotation() + self.state = 279 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 280 + self.match(JavaParser.PACKAGE) + self.state = 281 + self.qualifiedName() + self.state = 282 + self.match(JavaParser.SEMI) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ImportDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def IMPORT(self): + return self.getToken(JavaParser.IMPORT, 0) + + def qualifiedName(self): + return self.getTypedRuleContext(JavaParser.QualifiedNameContext,0) + + + def SEMI(self): + return self.getToken(JavaParser.SEMI, 0) + + def STATIC(self): + return self.getToken(JavaParser.STATIC, 0) + + def DOT(self): + return self.getToken(JavaParser.DOT, 0) + + def MUL(self): + return self.getToken(JavaParser.MUL, 0) + + def getRuleIndex(self): + return JavaParser.RULE_importDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterImportDeclaration" ): + listener.enterImportDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitImportDeclaration" ): + listener.exitImportDeclaration(self) + + + + + def importDeclaration(self): + + localctx = JavaParser.ImportDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 4, self.RULE_importDeclaration) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 284 + self.match(JavaParser.IMPORT) + self.state = 286 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==38: + self.state = 285 + self.match(JavaParser.STATIC) + + + self.state = 288 + self.qualifiedName() + self.state = 291 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==86: + self.state = 289 + self.match(JavaParser.DOT) + self.state = 290 + self.match(JavaParser.MUL) + + + self.state = 293 + self.match(JavaParser.SEMI) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TypeDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def classDeclaration(self): + return self.getTypedRuleContext(JavaParser.ClassDeclarationContext,0) + + + def enumDeclaration(self): + return self.getTypedRuleContext(JavaParser.EnumDeclarationContext,0) + + + def interfaceDeclaration(self): + return self.getTypedRuleContext(JavaParser.InterfaceDeclarationContext,0) + + + def annotationTypeDeclaration(self): + return self.getTypedRuleContext(JavaParser.AnnotationTypeDeclarationContext,0) + + + def recordDeclaration(self): + return self.getTypedRuleContext(JavaParser.RecordDeclarationContext,0) + + + def classOrInterfaceModifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ClassOrInterfaceModifierContext) + else: + return self.getTypedRuleContext(JavaParser.ClassOrInterfaceModifierContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_typeDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypeDeclaration" ): + listener.enterTypeDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypeDeclaration" ): + listener.exitTypeDeclaration(self) + + + + + def typeDeclaration(self): + + localctx = JavaParser.TypeDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 6, self.RULE_typeDeclaration) + try: + self.enterOuterAlt(localctx, 1) + self.state = 298 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,9,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 295 + self.classOrInterfaceModifier() + self.state = 300 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,9,self._ctx) + + self.state = 306 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [9]: + self.state = 301 + self.classDeclaration() + pass + elif token in [16]: + self.state = 302 + self.enumDeclaration() + pass + elif token in [28]: + self.state = 303 + self.interfaceDeclaration() + pass + elif token in [123]: + self.state = 304 + self.annotationTypeDeclaration() + pass + elif token in [63]: + self.state = 305 + self.recordDeclaration() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ModifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def classOrInterfaceModifier(self): + return self.getTypedRuleContext(JavaParser.ClassOrInterfaceModifierContext,0) + + + def NATIVE(self): + return self.getToken(JavaParser.NATIVE, 0) + + def SYNCHRONIZED(self): + return self.getToken(JavaParser.SYNCHRONIZED, 0) + + def TRANSIENT(self): + return self.getToken(JavaParser.TRANSIENT, 0) + + def VOLATILE(self): + return self.getToken(JavaParser.VOLATILE, 0) + + def getRuleIndex(self): + return JavaParser.RULE_modifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterModifier" ): + listener.enterModifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitModifier" ): + listener.exitModifier(self) + + + + + def modifier(self): + + localctx = JavaParser.ModifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 8, self.RULE_modifier) + try: + self.state = 313 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [1, 18, 33, 34, 35, 38, 39, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 123, 128]: + self.enterOuterAlt(localctx, 1) + self.state = 308 + self.classOrInterfaceModifier() + pass + elif token in [30]: + self.enterOuterAlt(localctx, 2) + self.state = 309 + self.match(JavaParser.NATIVE) + pass + elif token in [42]: + self.enterOuterAlt(localctx, 3) + self.state = 310 + self.match(JavaParser.SYNCHRONIZED) + pass + elif token in [46]: + self.enterOuterAlt(localctx, 4) + self.state = 311 + self.match(JavaParser.TRANSIENT) + pass + elif token in [49]: + self.enterOuterAlt(localctx, 5) + self.state = 312 + self.match(JavaParser.VOLATILE) + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ClassOrInterfaceModifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def annotation(self): + return self.getTypedRuleContext(JavaParser.AnnotationContext,0) + + + def PUBLIC(self): + return self.getToken(JavaParser.PUBLIC, 0) + + def PROTECTED(self): + return self.getToken(JavaParser.PROTECTED, 0) + + def PRIVATE(self): + return self.getToken(JavaParser.PRIVATE, 0) + + def STATIC(self): + return self.getToken(JavaParser.STATIC, 0) + + def ABSTRACT(self): + return self.getToken(JavaParser.ABSTRACT, 0) + + def FINAL(self): + return self.getToken(JavaParser.FINAL, 0) + + def STRICTFP(self): + return self.getToken(JavaParser.STRICTFP, 0) + + def SEALED(self): + return self.getToken(JavaParser.SEALED, 0) + + def NON_SEALED(self): + return self.getToken(JavaParser.NON_SEALED, 0) + + def getRuleIndex(self): + return JavaParser.RULE_classOrInterfaceModifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClassOrInterfaceModifier" ): + listener.enterClassOrInterfaceModifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClassOrInterfaceModifier" ): + listener.exitClassOrInterfaceModifier(self) + + + + + def classOrInterfaceModifier(self): + + localctx = JavaParser.ClassOrInterfaceModifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 10, self.RULE_classOrInterfaceModifier) + try: + self.state = 325 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,12,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 315 + self.annotation() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 316 + self.match(JavaParser.PUBLIC) + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 317 + self.match(JavaParser.PROTECTED) + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 318 + self.match(JavaParser.PRIVATE) + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 319 + self.match(JavaParser.STATIC) + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 320 + self.match(JavaParser.ABSTRACT) + pass + + elif la_ == 7: + self.enterOuterAlt(localctx, 7) + self.state = 321 + self.match(JavaParser.FINAL) + pass + + elif la_ == 8: + self.enterOuterAlt(localctx, 8) + self.state = 322 + self.match(JavaParser.STRICTFP) + pass + + elif la_ == 9: + self.enterOuterAlt(localctx, 9) + self.state = 323 + self.match(JavaParser.SEALED) + pass + + elif la_ == 10: + self.enterOuterAlt(localctx, 10) + self.state = 324 + self.match(JavaParser.NON_SEALED) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class VariableModifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def FINAL(self): + return self.getToken(JavaParser.FINAL, 0) + + def annotation(self): + return self.getTypedRuleContext(JavaParser.AnnotationContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_variableModifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterVariableModifier" ): + listener.enterVariableModifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitVariableModifier" ): + listener.exitVariableModifier(self) + + + + + def variableModifier(self): + + localctx = JavaParser.VariableModifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 12, self.RULE_variableModifier) + try: + self.state = 329 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [18]: + self.enterOuterAlt(localctx, 1) + self.state = 327 + self.match(JavaParser.FINAL) + pass + elif token in [51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 123, 128]: + self.enterOuterAlt(localctx, 2) + self.state = 328 + self.annotation() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ClassDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def CLASS(self): + return self.getToken(JavaParser.CLASS, 0) + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def classBody(self): + return self.getTypedRuleContext(JavaParser.ClassBodyContext,0) + + + def typeParameters(self): + return self.getTypedRuleContext(JavaParser.TypeParametersContext,0) + + + def EXTENDS(self): + return self.getToken(JavaParser.EXTENDS, 0) + + def typeType(self): + return self.getTypedRuleContext(JavaParser.TypeTypeContext,0) + + + def IMPLEMENTS(self): + return self.getToken(JavaParser.IMPLEMENTS, 0) + + def typeList(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.TypeListContext) + else: + return self.getTypedRuleContext(JavaParser.TypeListContext,i) + + + def PERMITS(self): + return self.getToken(JavaParser.PERMITS, 0) + + def getRuleIndex(self): + return JavaParser.RULE_classDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClassDeclaration" ): + listener.enterClassDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClassDeclaration" ): + listener.exitClassDeclaration(self) + + + + + def classDeclaration(self): + + localctx = JavaParser.ClassDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 14, self.RULE_classDeclaration) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 331 + self.match(JavaParser.CLASS) + self.state = 332 + self.identifier() + self.state = 334 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==89: + self.state = 333 + self.typeParameters() + + + self.state = 338 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==17: + self.state = 336 + self.match(JavaParser.EXTENDS) + self.state = 337 + self.typeType() + + + self.state = 342 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==24: + self.state = 340 + self.match(JavaParser.IMPLEMENTS) + self.state = 341 + self.typeList() + + + self.state = 346 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==65: + self.state = 344 + self.match(JavaParser.PERMITS) + self.state = 345 + self.typeList() + + + self.state = 348 + self.classBody() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TypeParametersContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LT(self): + return self.getToken(JavaParser.LT, 0) + + def typeParameter(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.TypeParameterContext) + else: + return self.getTypedRuleContext(JavaParser.TypeParameterContext,i) + + + def GT(self): + return self.getToken(JavaParser.GT, 0) + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.COMMA) + else: + return self.getToken(JavaParser.COMMA, i) + + def getRuleIndex(self): + return JavaParser.RULE_typeParameters + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypeParameters" ): + listener.enterTypeParameters(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypeParameters" ): + listener.exitTypeParameters(self) + + + + + def typeParameters(self): + + localctx = JavaParser.TypeParametersContext(self, self._ctx, self.state) + self.enterRule(localctx, 16, self.RULE_typeParameters) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 350 + self.match(JavaParser.LT) + self.state = 351 + self.typeParameter() + self.state = 356 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==85: + self.state = 352 + self.match(JavaParser.COMMA) + self.state = 353 + self.typeParameter() + self.state = 358 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 359 + self.match(JavaParser.GT) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TypeParameterContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def annotation(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.AnnotationContext) + else: + return self.getTypedRuleContext(JavaParser.AnnotationContext,i) + + + def EXTENDS(self): + return self.getToken(JavaParser.EXTENDS, 0) + + def typeBound(self): + return self.getTypedRuleContext(JavaParser.TypeBoundContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_typeParameter + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypeParameter" ): + listener.enterTypeParameter(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypeParameter" ): + listener.exitTypeParameter(self) + + + + + def typeParameter(self): + + localctx = JavaParser.TypeParameterContext(self, self._ctx, self.state) + self.enterRule(localctx, 18, self.RULE_typeParameter) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 364 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,19,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 361 + self.annotation() + self.state = 366 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,19,self._ctx) + + self.state = 367 + self.identifier() + self.state = 376 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==17: + self.state = 368 + self.match(JavaParser.EXTENDS) + self.state = 372 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,20,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 369 + self.annotation() + self.state = 374 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,20,self._ctx) + + self.state = 375 + self.typeBound() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TypeBoundContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeType(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.TypeTypeContext) + else: + return self.getTypedRuleContext(JavaParser.TypeTypeContext,i) + + + def BITAND(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.BITAND) + else: + return self.getToken(JavaParser.BITAND, i) + + def getRuleIndex(self): + return JavaParser.RULE_typeBound + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypeBound" ): + listener.enterTypeBound(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypeBound" ): + listener.exitTypeBound(self) + + + + + def typeBound(self): + + localctx = JavaParser.TypeBoundContext(self, self._ctx, self.state) + self.enterRule(localctx, 20, self.RULE_typeBound) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 378 + self.typeType() + self.state = 383 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==106: + self.state = 379 + self.match(JavaParser.BITAND) + self.state = 380 + self.typeType() + self.state = 385 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class EnumDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def ENUM(self): + return self.getToken(JavaParser.ENUM, 0) + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def LBRACE(self): + return self.getToken(JavaParser.LBRACE, 0) + + def RBRACE(self): + return self.getToken(JavaParser.RBRACE, 0) + + def IMPLEMENTS(self): + return self.getToken(JavaParser.IMPLEMENTS, 0) + + def typeList(self): + return self.getTypedRuleContext(JavaParser.TypeListContext,0) + + + def enumConstants(self): + return self.getTypedRuleContext(JavaParser.EnumConstantsContext,0) + + + def COMMA(self): + return self.getToken(JavaParser.COMMA, 0) + + def enumBodyDeclarations(self): + return self.getTypedRuleContext(JavaParser.EnumBodyDeclarationsContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_enumDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEnumDeclaration" ): + listener.enterEnumDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEnumDeclaration" ): + listener.exitEnumDeclaration(self) + + + + + def enumDeclaration(self): + + localctx = JavaParser.EnumDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 22, self.RULE_enumDeclaration) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 386 + self.match(JavaParser.ENUM) + self.state = 387 + self.identifier() + self.state = 390 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==24: + self.state = 388 + self.match(JavaParser.IMPLEMENTS) + self.state = 389 + self.typeList() + + + self.state = 392 + self.match(JavaParser.LBRACE) + self.state = 394 + self._errHandler.sync(self) + _la = self._input.LA(1) + if ((((_la - 51)) & ~0x3f) == 0 and ((1 << (_la - 51)) & 32767) != 0) or _la==123 or _la==128: + self.state = 393 + self.enumConstants() + + + self.state = 397 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==85: + self.state = 396 + self.match(JavaParser.COMMA) + + + self.state = 400 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==84: + self.state = 399 + self.enumBodyDeclarations() + + + self.state = 402 + self.match(JavaParser.RBRACE) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class EnumConstantsContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def enumConstant(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.EnumConstantContext) + else: + return self.getTypedRuleContext(JavaParser.EnumConstantContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.COMMA) + else: + return self.getToken(JavaParser.COMMA, i) + + def getRuleIndex(self): + return JavaParser.RULE_enumConstants + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEnumConstants" ): + listener.enterEnumConstants(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEnumConstants" ): + listener.exitEnumConstants(self) + + + + + def enumConstants(self): + + localctx = JavaParser.EnumConstantsContext(self, self._ctx, self.state) + self.enterRule(localctx, 24, self.RULE_enumConstants) + try: + self.enterOuterAlt(localctx, 1) + self.state = 404 + self.enumConstant() + self.state = 409 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,27,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 405 + self.match(JavaParser.COMMA) + self.state = 406 + self.enumConstant() + self.state = 411 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,27,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class EnumConstantContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def annotation(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.AnnotationContext) + else: + return self.getTypedRuleContext(JavaParser.AnnotationContext,i) + + + def arguments(self): + return self.getTypedRuleContext(JavaParser.ArgumentsContext,0) + + + def classBody(self): + return self.getTypedRuleContext(JavaParser.ClassBodyContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_enumConstant + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEnumConstant" ): + listener.enterEnumConstant(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEnumConstant" ): + listener.exitEnumConstant(self) + + + + + def enumConstant(self): + + localctx = JavaParser.EnumConstantContext(self, self._ctx, self.state) + self.enterRule(localctx, 26, self.RULE_enumConstant) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 415 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,28,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 412 + self.annotation() + self.state = 417 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,28,self._ctx) + + self.state = 418 + self.identifier() + self.state = 420 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==78: + self.state = 419 + self.arguments() + + + self.state = 423 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==80: + self.state = 422 + self.classBody() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class EnumBodyDeclarationsContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def SEMI(self): + return self.getToken(JavaParser.SEMI, 0) + + def classBodyDeclaration(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ClassBodyDeclarationContext) + else: + return self.getTypedRuleContext(JavaParser.ClassBodyDeclarationContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_enumBodyDeclarations + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEnumBodyDeclarations" ): + listener.enterEnumBodyDeclarations(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEnumBodyDeclarations" ): + listener.exitEnumBodyDeclarations(self) + + + + + def enumBodyDeclarations(self): + + localctx = JavaParser.EnumBodyDeclarationsContext(self, self._ctx, self.state) + self.enterRule(localctx, 28, self.RULE_enumBodyDeclarations) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 425 + self.match(JavaParser.SEMI) + self.state = 429 + self._errHandler.sync(self) + _la = self._input.LA(1) + while ((((_la - 1)) & ~0x3f) == 0 and ((1 << (_la - 1)) & -665791937994347) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & -8935141660685729789) != 0): + self.state = 426 + self.classBodyDeclaration() + self.state = 431 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class InterfaceDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def INTERFACE(self): + return self.getToken(JavaParser.INTERFACE, 0) + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def interfaceBody(self): + return self.getTypedRuleContext(JavaParser.InterfaceBodyContext,0) + + + def typeParameters(self): + return self.getTypedRuleContext(JavaParser.TypeParametersContext,0) + + + def EXTENDS(self): + return self.getToken(JavaParser.EXTENDS, 0) + + def typeList(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.TypeListContext) + else: + return self.getTypedRuleContext(JavaParser.TypeListContext,i) + + + def PERMITS(self): + return self.getToken(JavaParser.PERMITS, 0) + + def getRuleIndex(self): + return JavaParser.RULE_interfaceDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterInterfaceDeclaration" ): + listener.enterInterfaceDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitInterfaceDeclaration" ): + listener.exitInterfaceDeclaration(self) + + + + + def interfaceDeclaration(self): + + localctx = JavaParser.InterfaceDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 30, self.RULE_interfaceDeclaration) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 432 + self.match(JavaParser.INTERFACE) + self.state = 433 + self.identifier() + self.state = 435 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==89: + self.state = 434 + self.typeParameters() + + + self.state = 439 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==17: + self.state = 437 + self.match(JavaParser.EXTENDS) + self.state = 438 + self.typeList() + + + self.state = 443 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==65: + self.state = 441 + self.match(JavaParser.PERMITS) + self.state = 442 + self.typeList() + + + self.state = 445 + self.interfaceBody() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ClassBodyContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LBRACE(self): + return self.getToken(JavaParser.LBRACE, 0) + + def RBRACE(self): + return self.getToken(JavaParser.RBRACE, 0) + + def classBodyDeclaration(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ClassBodyDeclarationContext) + else: + return self.getTypedRuleContext(JavaParser.ClassBodyDeclarationContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_classBody + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClassBody" ): + listener.enterClassBody(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClassBody" ): + listener.exitClassBody(self) + + + + + def classBody(self): + + localctx = JavaParser.ClassBodyContext(self, self._ctx, self.state) + self.enterRule(localctx, 32, self.RULE_classBody) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 447 + self.match(JavaParser.LBRACE) + self.state = 451 + self._errHandler.sync(self) + _la = self._input.LA(1) + while ((((_la - 1)) & ~0x3f) == 0 and ((1 << (_la - 1)) & -665791937994347) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & -8935141660685729789) != 0): + self.state = 448 + self.classBodyDeclaration() + self.state = 453 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 454 + self.match(JavaParser.RBRACE) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class InterfaceBodyContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LBRACE(self): + return self.getToken(JavaParser.LBRACE, 0) + + def RBRACE(self): + return self.getToken(JavaParser.RBRACE, 0) + + def interfaceBodyDeclaration(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.InterfaceBodyDeclarationContext) + else: + return self.getTypedRuleContext(JavaParser.InterfaceBodyDeclarationContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_interfaceBody + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterInterfaceBody" ): + listener.enterInterfaceBody(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitInterfaceBody" ): + listener.exitInterfaceBody(self) + + + + + def interfaceBody(self): + + localctx = JavaParser.InterfaceBodyContext(self, self._ctx, self.state) + self.enterRule(localctx, 34, self.RULE_interfaceBody) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 456 + self.match(JavaParser.LBRACE) + self.state = 460 + self._errHandler.sync(self) + _la = self._input.LA(1) + while ((((_la - 1)) & ~0x3f) == 0 and ((1 << (_la - 1)) & -665791937992299) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & -8935141660685762557) != 0): + self.state = 457 + self.interfaceBodyDeclaration() + self.state = 462 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 463 + self.match(JavaParser.RBRACE) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ClassBodyDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def SEMI(self): + return self.getToken(JavaParser.SEMI, 0) + + def block(self): + return self.getTypedRuleContext(JavaParser.BlockContext,0) + + + def STATIC(self): + return self.getToken(JavaParser.STATIC, 0) + + def memberDeclaration(self): + return self.getTypedRuleContext(JavaParser.MemberDeclarationContext,0) + + + def modifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ModifierContext) + else: + return self.getTypedRuleContext(JavaParser.ModifierContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_classBodyDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClassBodyDeclaration" ): + listener.enterClassBodyDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClassBodyDeclaration" ): + listener.exitClassBodyDeclaration(self) + + + + + def classBodyDeclaration(self): + + localctx = JavaParser.ClassBodyDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 36, self.RULE_classBodyDeclaration) + self._la = 0 # Token type + try: + self.state = 477 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,39,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 465 + self.match(JavaParser.SEMI) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 467 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==38: + self.state = 466 + self.match(JavaParser.STATIC) + + + self.state = 469 + self.block() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 473 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,38,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 470 + self.modifier() + self.state = 475 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,38,self._ctx) + + self.state = 476 + self.memberDeclaration() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class MemberDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def recordDeclaration(self): + return self.getTypedRuleContext(JavaParser.RecordDeclarationContext,0) + + + def methodDeclaration(self): + return self.getTypedRuleContext(JavaParser.MethodDeclarationContext,0) + + + def genericMethodDeclaration(self): + return self.getTypedRuleContext(JavaParser.GenericMethodDeclarationContext,0) + + + def fieldDeclaration(self): + return self.getTypedRuleContext(JavaParser.FieldDeclarationContext,0) + + + def constructorDeclaration(self): + return self.getTypedRuleContext(JavaParser.ConstructorDeclarationContext,0) + + + def genericConstructorDeclaration(self): + return self.getTypedRuleContext(JavaParser.GenericConstructorDeclarationContext,0) + + + def interfaceDeclaration(self): + return self.getTypedRuleContext(JavaParser.InterfaceDeclarationContext,0) + + + def annotationTypeDeclaration(self): + return self.getTypedRuleContext(JavaParser.AnnotationTypeDeclarationContext,0) + + + def classDeclaration(self): + return self.getTypedRuleContext(JavaParser.ClassDeclarationContext,0) + + + def enumDeclaration(self): + return self.getTypedRuleContext(JavaParser.EnumDeclarationContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_memberDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMemberDeclaration" ): + listener.enterMemberDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMemberDeclaration" ): + listener.exitMemberDeclaration(self) + + + + + def memberDeclaration(self): + + localctx = JavaParser.MemberDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 38, self.RULE_memberDeclaration) + try: + self.state = 489 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,40,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 479 + self.recordDeclaration() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 480 + self.methodDeclaration() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 481 + self.genericMethodDeclaration() + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 482 + self.fieldDeclaration() + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 483 + self.constructorDeclaration() + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 484 + self.genericConstructorDeclaration() + pass + + elif la_ == 7: + self.enterOuterAlt(localctx, 7) + self.state = 485 + self.interfaceDeclaration() + pass + + elif la_ == 8: + self.enterOuterAlt(localctx, 8) + self.state = 486 + self.annotationTypeDeclaration() + pass + + elif la_ == 9: + self.enterOuterAlt(localctx, 9) + self.state = 487 + self.classDeclaration() + pass + + elif la_ == 10: + self.enterOuterAlt(localctx, 10) + self.state = 488 + self.enumDeclaration() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class MethodDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeTypeOrVoid(self): + return self.getTypedRuleContext(JavaParser.TypeTypeOrVoidContext,0) + + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def formalParameters(self): + return self.getTypedRuleContext(JavaParser.FormalParametersContext,0) + + + def methodBody(self): + return self.getTypedRuleContext(JavaParser.MethodBodyContext,0) + + + def LBRACK(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.LBRACK) + else: + return self.getToken(JavaParser.LBRACK, i) + + def RBRACK(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.RBRACK) + else: + return self.getToken(JavaParser.RBRACK, i) + + def THROWS(self): + return self.getToken(JavaParser.THROWS, 0) + + def qualifiedNameList(self): + return self.getTypedRuleContext(JavaParser.QualifiedNameListContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_methodDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMethodDeclaration" ): + listener.enterMethodDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMethodDeclaration" ): + listener.exitMethodDeclaration(self) + + + + + def methodDeclaration(self): + + localctx = JavaParser.MethodDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 40, self.RULE_methodDeclaration) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 491 + self.typeTypeOrVoid() + self.state = 492 + self.identifier() + self.state = 493 + self.formalParameters() + self.state = 498 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==82: + self.state = 494 + self.match(JavaParser.LBRACK) + self.state = 495 + self.match(JavaParser.RBRACK) + self.state = 500 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 503 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==45: + self.state = 501 + self.match(JavaParser.THROWS) + self.state = 502 + self.qualifiedNameList() + + + self.state = 505 + self.methodBody() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class MethodBodyContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def block(self): + return self.getTypedRuleContext(JavaParser.BlockContext,0) + + + def SEMI(self): + return self.getToken(JavaParser.SEMI, 0) + + def getRuleIndex(self): + return JavaParser.RULE_methodBody + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMethodBody" ): + listener.enterMethodBody(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMethodBody" ): + listener.exitMethodBody(self) + + + + + def methodBody(self): + + localctx = JavaParser.MethodBodyContext(self, self._ctx, self.state) + self.enterRule(localctx, 42, self.RULE_methodBody) + try: + self.state = 509 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [80]: + self.enterOuterAlt(localctx, 1) + self.state = 507 + self.block() + pass + elif token in [84]: + self.enterOuterAlt(localctx, 2) + self.state = 508 + self.match(JavaParser.SEMI) + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TypeTypeOrVoidContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeType(self): + return self.getTypedRuleContext(JavaParser.TypeTypeContext,0) + + + def VOID(self): + return self.getToken(JavaParser.VOID, 0) + + def getRuleIndex(self): + return JavaParser.RULE_typeTypeOrVoid + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypeTypeOrVoid" ): + listener.enterTypeTypeOrVoid(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypeTypeOrVoid" ): + listener.exitTypeTypeOrVoid(self) + + + + + def typeTypeOrVoid(self): + + localctx = JavaParser.TypeTypeOrVoidContext(self, self._ctx, self.state) + self.enterRule(localctx, 44, self.RULE_typeTypeOrVoid) + try: + self.state = 513 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [3, 5, 8, 14, 20, 27, 29, 37, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 123, 128]: + self.enterOuterAlt(localctx, 1) + self.state = 511 + self.typeType() + pass + elif token in [48]: + self.enterOuterAlt(localctx, 2) + self.state = 512 + self.match(JavaParser.VOID) + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class GenericMethodDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeParameters(self): + return self.getTypedRuleContext(JavaParser.TypeParametersContext,0) + + + def methodDeclaration(self): + return self.getTypedRuleContext(JavaParser.MethodDeclarationContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_genericMethodDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterGenericMethodDeclaration" ): + listener.enterGenericMethodDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitGenericMethodDeclaration" ): + listener.exitGenericMethodDeclaration(self) + + + + + def genericMethodDeclaration(self): + + localctx = JavaParser.GenericMethodDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 46, self.RULE_genericMethodDeclaration) + try: + self.enterOuterAlt(localctx, 1) + self.state = 515 + self.typeParameters() + self.state = 516 + self.methodDeclaration() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class GenericConstructorDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeParameters(self): + return self.getTypedRuleContext(JavaParser.TypeParametersContext,0) + + + def constructorDeclaration(self): + return self.getTypedRuleContext(JavaParser.ConstructorDeclarationContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_genericConstructorDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterGenericConstructorDeclaration" ): + listener.enterGenericConstructorDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitGenericConstructorDeclaration" ): + listener.exitGenericConstructorDeclaration(self) + + + + + def genericConstructorDeclaration(self): + + localctx = JavaParser.GenericConstructorDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 48, self.RULE_genericConstructorDeclaration) + try: + self.enterOuterAlt(localctx, 1) + self.state = 518 + self.typeParameters() + self.state = 519 + self.constructorDeclaration() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ConstructorDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + self.constructorBody = None # BlockContext + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def formalParameters(self): + return self.getTypedRuleContext(JavaParser.FormalParametersContext,0) + + + def block(self): + return self.getTypedRuleContext(JavaParser.BlockContext,0) + + + def THROWS(self): + return self.getToken(JavaParser.THROWS, 0) + + def qualifiedNameList(self): + return self.getTypedRuleContext(JavaParser.QualifiedNameListContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_constructorDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterConstructorDeclaration" ): + listener.enterConstructorDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitConstructorDeclaration" ): + listener.exitConstructorDeclaration(self) + + + + + def constructorDeclaration(self): + + localctx = JavaParser.ConstructorDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 50, self.RULE_constructorDeclaration) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 521 + self.identifier() + self.state = 522 + self.formalParameters() + self.state = 525 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==45: + self.state = 523 + self.match(JavaParser.THROWS) + self.state = 524 + self.qualifiedNameList() + + + self.state = 527 + localctx.constructorBody = self.block() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class CompactConstructorDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + self.constructorBody = None # BlockContext + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def block(self): + return self.getTypedRuleContext(JavaParser.BlockContext,0) + + + def modifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ModifierContext) + else: + return self.getTypedRuleContext(JavaParser.ModifierContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_compactConstructorDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCompactConstructorDeclaration" ): + listener.enterCompactConstructorDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCompactConstructorDeclaration" ): + listener.exitCompactConstructorDeclaration(self) + + + + + def compactConstructorDeclaration(self): + + localctx = JavaParser.CompactConstructorDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 52, self.RULE_compactConstructorDeclaration) + try: + self.enterOuterAlt(localctx, 1) + self.state = 532 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,46,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 529 + self.modifier() + self.state = 534 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,46,self._ctx) + + self.state = 535 + self.identifier() + self.state = 536 + localctx.constructorBody = self.block() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class FieldDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeType(self): + return self.getTypedRuleContext(JavaParser.TypeTypeContext,0) + + + def variableDeclarators(self): + return self.getTypedRuleContext(JavaParser.VariableDeclaratorsContext,0) + + + def SEMI(self): + return self.getToken(JavaParser.SEMI, 0) + + def getRuleIndex(self): + return JavaParser.RULE_fieldDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFieldDeclaration" ): + listener.enterFieldDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFieldDeclaration" ): + listener.exitFieldDeclaration(self) + + + + + def fieldDeclaration(self): + + localctx = JavaParser.FieldDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 54, self.RULE_fieldDeclaration) + try: + self.enterOuterAlt(localctx, 1) + self.state = 538 + self.typeType() + self.state = 539 + self.variableDeclarators() + self.state = 540 + self.match(JavaParser.SEMI) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class InterfaceBodyDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def interfaceMemberDeclaration(self): + return self.getTypedRuleContext(JavaParser.InterfaceMemberDeclarationContext,0) + + + def modifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ModifierContext) + else: + return self.getTypedRuleContext(JavaParser.ModifierContext,i) + + + def SEMI(self): + return self.getToken(JavaParser.SEMI, 0) + + def getRuleIndex(self): + return JavaParser.RULE_interfaceBodyDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterInterfaceBodyDeclaration" ): + listener.enterInterfaceBodyDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitInterfaceBodyDeclaration" ): + listener.exitInterfaceBodyDeclaration(self) + + + + + def interfaceBodyDeclaration(self): + + localctx = JavaParser.InterfaceBodyDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 56, self.RULE_interfaceBodyDeclaration) + try: + self.state = 550 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [1, 3, 5, 8, 9, 12, 14, 16, 18, 20, 27, 28, 29, 30, 33, 34, 35, 37, 38, 39, 42, 46, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 89, 123, 128]: + self.enterOuterAlt(localctx, 1) + self.state = 545 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,47,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 542 + self.modifier() + self.state = 547 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,47,self._ctx) + + self.state = 548 + self.interfaceMemberDeclaration() + pass + elif token in [84]: + self.enterOuterAlt(localctx, 2) + self.state = 549 + self.match(JavaParser.SEMI) + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class InterfaceMemberDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def recordDeclaration(self): + return self.getTypedRuleContext(JavaParser.RecordDeclarationContext,0) + + + def constDeclaration(self): + return self.getTypedRuleContext(JavaParser.ConstDeclarationContext,0) + + + def interfaceMethodDeclaration(self): + return self.getTypedRuleContext(JavaParser.InterfaceMethodDeclarationContext,0) + + + def genericInterfaceMethodDeclaration(self): + return self.getTypedRuleContext(JavaParser.GenericInterfaceMethodDeclarationContext,0) + + + def interfaceDeclaration(self): + return self.getTypedRuleContext(JavaParser.InterfaceDeclarationContext,0) + + + def annotationTypeDeclaration(self): + return self.getTypedRuleContext(JavaParser.AnnotationTypeDeclarationContext,0) + + + def classDeclaration(self): + return self.getTypedRuleContext(JavaParser.ClassDeclarationContext,0) + + + def enumDeclaration(self): + return self.getTypedRuleContext(JavaParser.EnumDeclarationContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_interfaceMemberDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterInterfaceMemberDeclaration" ): + listener.enterInterfaceMemberDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitInterfaceMemberDeclaration" ): + listener.exitInterfaceMemberDeclaration(self) + + + + + def interfaceMemberDeclaration(self): + + localctx = JavaParser.InterfaceMemberDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 58, self.RULE_interfaceMemberDeclaration) + try: + self.state = 560 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,49,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 552 + self.recordDeclaration() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 553 + self.constDeclaration() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 554 + self.interfaceMethodDeclaration() + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 555 + self.genericInterfaceMethodDeclaration() + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 556 + self.interfaceDeclaration() + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 557 + self.annotationTypeDeclaration() + pass + + elif la_ == 7: + self.enterOuterAlt(localctx, 7) + self.state = 558 + self.classDeclaration() + pass + + elif la_ == 8: + self.enterOuterAlt(localctx, 8) + self.state = 559 + self.enumDeclaration() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ConstDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeType(self): + return self.getTypedRuleContext(JavaParser.TypeTypeContext,0) + + + def constantDeclarator(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ConstantDeclaratorContext) + else: + return self.getTypedRuleContext(JavaParser.ConstantDeclaratorContext,i) + + + def SEMI(self): + return self.getToken(JavaParser.SEMI, 0) + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.COMMA) + else: + return self.getToken(JavaParser.COMMA, i) + + def getRuleIndex(self): + return JavaParser.RULE_constDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterConstDeclaration" ): + listener.enterConstDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitConstDeclaration" ): + listener.exitConstDeclaration(self) + + + + + def constDeclaration(self): + + localctx = JavaParser.ConstDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 60, self.RULE_constDeclaration) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 562 + self.typeType() + self.state = 563 + self.constantDeclarator() + self.state = 568 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==85: + self.state = 564 + self.match(JavaParser.COMMA) + self.state = 565 + self.constantDeclarator() + self.state = 570 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 571 + self.match(JavaParser.SEMI) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ConstantDeclaratorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def ASSIGN(self): + return self.getToken(JavaParser.ASSIGN, 0) + + def variableInitializer(self): + return self.getTypedRuleContext(JavaParser.VariableInitializerContext,0) + + + def LBRACK(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.LBRACK) + else: + return self.getToken(JavaParser.LBRACK, i) + + def RBRACK(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.RBRACK) + else: + return self.getToken(JavaParser.RBRACK, i) + + def getRuleIndex(self): + return JavaParser.RULE_constantDeclarator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterConstantDeclarator" ): + listener.enterConstantDeclarator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitConstantDeclarator" ): + listener.exitConstantDeclarator(self) + + + + + def constantDeclarator(self): + + localctx = JavaParser.ConstantDeclaratorContext(self, self._ctx, self.state) + self.enterRule(localctx, 62, self.RULE_constantDeclarator) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 573 + self.identifier() + self.state = 578 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==82: + self.state = 574 + self.match(JavaParser.LBRACK) + self.state = 575 + self.match(JavaParser.RBRACK) + self.state = 580 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 581 + self.match(JavaParser.ASSIGN) + self.state = 582 + self.variableInitializer() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class InterfaceMethodDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def interfaceCommonBodyDeclaration(self): + return self.getTypedRuleContext(JavaParser.InterfaceCommonBodyDeclarationContext,0) + + + def interfaceMethodModifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.InterfaceMethodModifierContext) + else: + return self.getTypedRuleContext(JavaParser.InterfaceMethodModifierContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_interfaceMethodDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterInterfaceMethodDeclaration" ): + listener.enterInterfaceMethodDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitInterfaceMethodDeclaration" ): + listener.exitInterfaceMethodDeclaration(self) + + + + + def interfaceMethodDeclaration(self): + + localctx = JavaParser.InterfaceMethodDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 64, self.RULE_interfaceMethodDeclaration) + try: + self.enterOuterAlt(localctx, 1) + self.state = 587 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,52,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 584 + self.interfaceMethodModifier() + self.state = 589 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,52,self._ctx) + + self.state = 590 + self.interfaceCommonBodyDeclaration() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class InterfaceMethodModifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def annotation(self): + return self.getTypedRuleContext(JavaParser.AnnotationContext,0) + + + def PUBLIC(self): + return self.getToken(JavaParser.PUBLIC, 0) + + def ABSTRACT(self): + return self.getToken(JavaParser.ABSTRACT, 0) + + def DEFAULT(self): + return self.getToken(JavaParser.DEFAULT, 0) + + def STATIC(self): + return self.getToken(JavaParser.STATIC, 0) + + def STRICTFP(self): + return self.getToken(JavaParser.STRICTFP, 0) + + def getRuleIndex(self): + return JavaParser.RULE_interfaceMethodModifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterInterfaceMethodModifier" ): + listener.enterInterfaceMethodModifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitInterfaceMethodModifier" ): + listener.exitInterfaceMethodModifier(self) + + + + + def interfaceMethodModifier(self): + + localctx = JavaParser.InterfaceMethodModifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 66, self.RULE_interfaceMethodModifier) + try: + self.state = 598 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 123, 128]: + self.enterOuterAlt(localctx, 1) + self.state = 592 + self.annotation() + pass + elif token in [35]: + self.enterOuterAlt(localctx, 2) + self.state = 593 + self.match(JavaParser.PUBLIC) + pass + elif token in [1]: + self.enterOuterAlt(localctx, 3) + self.state = 594 + self.match(JavaParser.ABSTRACT) + pass + elif token in [12]: + self.enterOuterAlt(localctx, 4) + self.state = 595 + self.match(JavaParser.DEFAULT) + pass + elif token in [38]: + self.enterOuterAlt(localctx, 5) + self.state = 596 + self.match(JavaParser.STATIC) + pass + elif token in [39]: + self.enterOuterAlt(localctx, 6) + self.state = 597 + self.match(JavaParser.STRICTFP) + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class GenericInterfaceMethodDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeParameters(self): + return self.getTypedRuleContext(JavaParser.TypeParametersContext,0) + + + def interfaceCommonBodyDeclaration(self): + return self.getTypedRuleContext(JavaParser.InterfaceCommonBodyDeclarationContext,0) + + + def interfaceMethodModifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.InterfaceMethodModifierContext) + else: + return self.getTypedRuleContext(JavaParser.InterfaceMethodModifierContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_genericInterfaceMethodDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterGenericInterfaceMethodDeclaration" ): + listener.enterGenericInterfaceMethodDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitGenericInterfaceMethodDeclaration" ): + listener.exitGenericInterfaceMethodDeclaration(self) + + + + + def genericInterfaceMethodDeclaration(self): + + localctx = JavaParser.GenericInterfaceMethodDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 68, self.RULE_genericInterfaceMethodDeclaration) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 603 + self._errHandler.sync(self) + _la = self._input.LA(1) + while ((((_la - 1)) & ~0x3f) == 0 and ((1 << (_la - 1)) & -1125470410110975) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & -8935141660703064063) != 0): + self.state = 600 + self.interfaceMethodModifier() + self.state = 605 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 606 + self.typeParameters() + self.state = 607 + self.interfaceCommonBodyDeclaration() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class InterfaceCommonBodyDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeTypeOrVoid(self): + return self.getTypedRuleContext(JavaParser.TypeTypeOrVoidContext,0) + + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def formalParameters(self): + return self.getTypedRuleContext(JavaParser.FormalParametersContext,0) + + + def methodBody(self): + return self.getTypedRuleContext(JavaParser.MethodBodyContext,0) + + + def annotation(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.AnnotationContext) + else: + return self.getTypedRuleContext(JavaParser.AnnotationContext,i) + + + def LBRACK(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.LBRACK) + else: + return self.getToken(JavaParser.LBRACK, i) + + def RBRACK(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.RBRACK) + else: + return self.getToken(JavaParser.RBRACK, i) + + def THROWS(self): + return self.getToken(JavaParser.THROWS, 0) + + def qualifiedNameList(self): + return self.getTypedRuleContext(JavaParser.QualifiedNameListContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_interfaceCommonBodyDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterInterfaceCommonBodyDeclaration" ): + listener.enterInterfaceCommonBodyDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitInterfaceCommonBodyDeclaration" ): + listener.exitInterfaceCommonBodyDeclaration(self) + + + + + def interfaceCommonBodyDeclaration(self): + + localctx = JavaParser.InterfaceCommonBodyDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 70, self.RULE_interfaceCommonBodyDeclaration) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 612 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,55,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 609 + self.annotation() + self.state = 614 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,55,self._ctx) + + self.state = 615 + self.typeTypeOrVoid() + self.state = 616 + self.identifier() + self.state = 617 + self.formalParameters() + self.state = 622 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==82: + self.state = 618 + self.match(JavaParser.LBRACK) + self.state = 619 + self.match(JavaParser.RBRACK) + self.state = 624 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 627 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==45: + self.state = 625 + self.match(JavaParser.THROWS) + self.state = 626 + self.qualifiedNameList() + + + self.state = 629 + self.methodBody() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class VariableDeclaratorsContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def variableDeclarator(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.VariableDeclaratorContext) + else: + return self.getTypedRuleContext(JavaParser.VariableDeclaratorContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.COMMA) + else: + return self.getToken(JavaParser.COMMA, i) + + def getRuleIndex(self): + return JavaParser.RULE_variableDeclarators + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterVariableDeclarators" ): + listener.enterVariableDeclarators(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitVariableDeclarators" ): + listener.exitVariableDeclarators(self) + + + + + def variableDeclarators(self): + + localctx = JavaParser.VariableDeclaratorsContext(self, self._ctx, self.state) + self.enterRule(localctx, 72, self.RULE_variableDeclarators) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 631 + self.variableDeclarator() + self.state = 636 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==85: + self.state = 632 + self.match(JavaParser.COMMA) + self.state = 633 + self.variableDeclarator() + self.state = 638 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class VariableDeclaratorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def variableDeclaratorId(self): + return self.getTypedRuleContext(JavaParser.VariableDeclaratorIdContext,0) + + + def ASSIGN(self): + return self.getToken(JavaParser.ASSIGN, 0) + + def variableInitializer(self): + return self.getTypedRuleContext(JavaParser.VariableInitializerContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_variableDeclarator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterVariableDeclarator" ): + listener.enterVariableDeclarator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitVariableDeclarator" ): + listener.exitVariableDeclarator(self) + + + + + def variableDeclarator(self): + + localctx = JavaParser.VariableDeclaratorContext(self, self._ctx, self.state) + self.enterRule(localctx, 74, self.RULE_variableDeclarator) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 639 + self.variableDeclaratorId() + self.state = 642 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==87: + self.state = 640 + self.match(JavaParser.ASSIGN) + self.state = 641 + self.variableInitializer() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class VariableDeclaratorIdContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def LBRACK(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.LBRACK) + else: + return self.getToken(JavaParser.LBRACK, i) + + def RBRACK(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.RBRACK) + else: + return self.getToken(JavaParser.RBRACK, i) + + def getRuleIndex(self): + return JavaParser.RULE_variableDeclaratorId + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterVariableDeclaratorId" ): + listener.enterVariableDeclaratorId(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitVariableDeclaratorId" ): + listener.exitVariableDeclaratorId(self) + + + + + def variableDeclaratorId(self): + + localctx = JavaParser.VariableDeclaratorIdContext(self, self._ctx, self.state) + self.enterRule(localctx, 76, self.RULE_variableDeclaratorId) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 644 + self.identifier() + self.state = 649 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==82: + self.state = 645 + self.match(JavaParser.LBRACK) + self.state = 646 + self.match(JavaParser.RBRACK) + self.state = 651 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class VariableInitializerContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def arrayInitializer(self): + return self.getTypedRuleContext(JavaParser.ArrayInitializerContext,0) + + + def expression(self): + return self.getTypedRuleContext(JavaParser.ExpressionContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_variableInitializer + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterVariableInitializer" ): + listener.enterVariableInitializer(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitVariableInitializer" ): + listener.exitVariableInitializer(self) + + + + + def variableInitializer(self): + + localctx = JavaParser.VariableInitializerContext(self, self._ctx, self.state) + self.enterRule(localctx, 78, self.RULE_variableInitializer) + try: + self.state = 654 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [80]: + self.enterOuterAlt(localctx, 1) + self.state = 652 + self.arrayInitializer() + pass + elif token in [3, 5, 8, 14, 20, 27, 29, 31, 37, 40, 41, 43, 48, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 89, 90, 91, 100, 101, 102, 103, 123, 128]: + self.enterOuterAlt(localctx, 2) + self.state = 653 + self.expression(0) + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ArrayInitializerContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LBRACE(self): + return self.getToken(JavaParser.LBRACE, 0) + + def RBRACE(self): + return self.getToken(JavaParser.RBRACE, 0) + + def variableInitializer(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.VariableInitializerContext) + else: + return self.getTypedRuleContext(JavaParser.VariableInitializerContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.COMMA) + else: + return self.getToken(JavaParser.COMMA, i) + + def getRuleIndex(self): + return JavaParser.RULE_arrayInitializer + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterArrayInitializer" ): + listener.enterArrayInitializer(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitArrayInitializer" ): + listener.exitArrayInitializer(self) + + + + + def arrayInitializer(self): + + localctx = JavaParser.ArrayInitializerContext(self, self._ctx, self.state) + self.enterRule(localctx, 80, self.RULE_arrayInitializer) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 656 + self.match(JavaParser.LBRACE) + self.state = 668 + self._errHandler.sync(self) + _la = self._input.LA(1) + if ((((_la - 3)) & ~0x3f) == 0 and ((1 << (_la - 3)) & 9223127275610966053) != 0) or ((((_la - 67)) & ~0x3f) == 0 and ((1 << (_la - 67)) & 2377900732130013183) != 0): + self.state = 657 + self.variableInitializer() + self.state = 662 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,62,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 658 + self.match(JavaParser.COMMA) + self.state = 659 + self.variableInitializer() + self.state = 664 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,62,self._ctx) + + self.state = 666 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==85: + self.state = 665 + self.match(JavaParser.COMMA) + + + + + self.state = 670 + self.match(JavaParser.RBRACE) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ClassOrInterfaceTypeContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeIdentifier(self): + return self.getTypedRuleContext(JavaParser.TypeIdentifierContext,0) + + + def identifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.IdentifierContext) + else: + return self.getTypedRuleContext(JavaParser.IdentifierContext,i) + + + def DOT(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.DOT) + else: + return self.getToken(JavaParser.DOT, i) + + def typeArguments(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.TypeArgumentsContext) + else: + return self.getTypedRuleContext(JavaParser.TypeArgumentsContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_classOrInterfaceType + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClassOrInterfaceType" ): + listener.enterClassOrInterfaceType(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClassOrInterfaceType" ): + listener.exitClassOrInterfaceType(self) + + + + + def classOrInterfaceType(self): + + localctx = JavaParser.ClassOrInterfaceTypeContext(self, self._ctx, self.state) + self.enterRule(localctx, 82, self.RULE_classOrInterfaceType) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 680 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,66,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 672 + self.identifier() + self.state = 674 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==89: + self.state = 673 + self.typeArguments() + + + self.state = 676 + self.match(JavaParser.DOT) + self.state = 682 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,66,self._ctx) + + self.state = 683 + self.typeIdentifier() + self.state = 685 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,67,self._ctx) + if la_ == 1: + self.state = 684 + self.typeArguments() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TypeArgumentContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeType(self): + return self.getTypedRuleContext(JavaParser.TypeTypeContext,0) + + + def QUESTION(self): + return self.getToken(JavaParser.QUESTION, 0) + + def annotation(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.AnnotationContext) + else: + return self.getTypedRuleContext(JavaParser.AnnotationContext,i) + + + def EXTENDS(self): + return self.getToken(JavaParser.EXTENDS, 0) + + def SUPER(self): + return self.getToken(JavaParser.SUPER, 0) + + def getRuleIndex(self): + return JavaParser.RULE_typeArgument + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypeArgument" ): + listener.enterTypeArgument(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypeArgument" ): + listener.exitTypeArgument(self) + + + + + def typeArgument(self): + + localctx = JavaParser.TypeArgumentContext(self, self._ctx, self.state) + self.enterRule(localctx, 84, self.RULE_typeArgument) + self._la = 0 # Token type + try: + self.state = 699 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,70,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 687 + self.typeType() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 691 + self._errHandler.sync(self) + _la = self._input.LA(1) + while ((((_la - 51)) & ~0x3f) == 0 and ((1 << (_la - 51)) & 32767) != 0) or _la==123 or _la==128: + self.state = 688 + self.annotation() + self.state = 693 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 694 + self.match(JavaParser.QUESTION) + self.state = 697 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==17 or _la==40: + self.state = 695 + _la = self._input.LA(1) + if not(_la==17 or _la==40): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + self.state = 696 + self.typeType() + + + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class QualifiedNameListContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def qualifiedName(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.QualifiedNameContext) + else: + return self.getTypedRuleContext(JavaParser.QualifiedNameContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.COMMA) + else: + return self.getToken(JavaParser.COMMA, i) + + def getRuleIndex(self): + return JavaParser.RULE_qualifiedNameList + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterQualifiedNameList" ): + listener.enterQualifiedNameList(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitQualifiedNameList" ): + listener.exitQualifiedNameList(self) + + + + + def qualifiedNameList(self): + + localctx = JavaParser.QualifiedNameListContext(self, self._ctx, self.state) + self.enterRule(localctx, 86, self.RULE_qualifiedNameList) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 701 + self.qualifiedName() + self.state = 706 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==85: + self.state = 702 + self.match(JavaParser.COMMA) + self.state = 703 + self.qualifiedName() + self.state = 708 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class FormalParametersContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LPAREN(self): + return self.getToken(JavaParser.LPAREN, 0) + + def RPAREN(self): + return self.getToken(JavaParser.RPAREN, 0) + + def receiverParameter(self): + return self.getTypedRuleContext(JavaParser.ReceiverParameterContext,0) + + + def COMMA(self): + return self.getToken(JavaParser.COMMA, 0) + + def formalParameterList(self): + return self.getTypedRuleContext(JavaParser.FormalParameterListContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_formalParameters + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFormalParameters" ): + listener.enterFormalParameters(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFormalParameters" ): + listener.exitFormalParameters(self) + + + + + def formalParameters(self): + + localctx = JavaParser.FormalParametersContext(self, self._ctx, self.state) + self.enterRule(localctx, 88, self.RULE_formalParameters) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 709 + self.match(JavaParser.LPAREN) + self.state = 721 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,75,self._ctx) + if la_ == 1: + self.state = 711 + self._errHandler.sync(self) + _la = self._input.LA(1) + if ((((_la - 3)) & ~0x3f) == 0 and ((1 << (_la - 3)) & 9223090579141953573) != 0) or _la==123 or _la==128: + self.state = 710 + self.receiverParameter() + + + pass + + elif la_ == 2: + self.state = 713 + self.receiverParameter() + self.state = 716 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==85: + self.state = 714 + self.match(JavaParser.COMMA) + self.state = 715 + self.formalParameterList() + + + pass + + elif la_ == 3: + self.state = 719 + self._errHandler.sync(self) + _la = self._input.LA(1) + if ((((_la - 3)) & ~0x3f) == 0 and ((1 << (_la - 3)) & 9223090579141986341) != 0) or _la==123 or _la==128: + self.state = 718 + self.formalParameterList() + + + pass + + + self.state = 723 + self.match(JavaParser.RPAREN) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ReceiverParameterContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeType(self): + return self.getTypedRuleContext(JavaParser.TypeTypeContext,0) + + + def THIS(self): + return self.getToken(JavaParser.THIS, 0) + + def identifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.IdentifierContext) + else: + return self.getTypedRuleContext(JavaParser.IdentifierContext,i) + + + def DOT(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.DOT) + else: + return self.getToken(JavaParser.DOT, i) + + def getRuleIndex(self): + return JavaParser.RULE_receiverParameter + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterReceiverParameter" ): + listener.enterReceiverParameter(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitReceiverParameter" ): + listener.exitReceiverParameter(self) + + + + + def receiverParameter(self): + + localctx = JavaParser.ReceiverParameterContext(self, self._ctx, self.state) + self.enterRule(localctx, 90, self.RULE_receiverParameter) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 725 + self.typeType() + self.state = 731 + self._errHandler.sync(self) + _la = self._input.LA(1) + while ((((_la - 51)) & ~0x3f) == 0 and ((1 << (_la - 51)) & 32767) != 0) or _la==128: + self.state = 726 + self.identifier() + self.state = 727 + self.match(JavaParser.DOT) + self.state = 733 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 734 + self.match(JavaParser.THIS) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class FormalParameterListContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def formalParameter(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.FormalParameterContext) + else: + return self.getTypedRuleContext(JavaParser.FormalParameterContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.COMMA) + else: + return self.getToken(JavaParser.COMMA, i) + + def lastFormalParameter(self): + return self.getTypedRuleContext(JavaParser.LastFormalParameterContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_formalParameterList + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFormalParameterList" ): + listener.enterFormalParameterList(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFormalParameterList" ): + listener.exitFormalParameterList(self) + + + + + def formalParameterList(self): + + localctx = JavaParser.FormalParameterListContext(self, self._ctx, self.state) + self.enterRule(localctx, 92, self.RULE_formalParameterList) + self._la = 0 # Token type + try: + self.state = 749 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,79,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 736 + self.formalParameter() + self.state = 741 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,77,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 737 + self.match(JavaParser.COMMA) + self.state = 738 + self.formalParameter() + self.state = 743 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,77,self._ctx) + + self.state = 746 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==85: + self.state = 744 + self.match(JavaParser.COMMA) + self.state = 745 + self.lastFormalParameter() + + + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 748 + self.lastFormalParameter() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class FormalParameterContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeType(self): + return self.getTypedRuleContext(JavaParser.TypeTypeContext,0) + + + def variableDeclaratorId(self): + return self.getTypedRuleContext(JavaParser.VariableDeclaratorIdContext,0) + + + def variableModifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.VariableModifierContext) + else: + return self.getTypedRuleContext(JavaParser.VariableModifierContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_formalParameter + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFormalParameter" ): + listener.enterFormalParameter(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFormalParameter" ): + listener.exitFormalParameter(self) + + + + + def formalParameter(self): + + localctx = JavaParser.FormalParameterContext(self, self._ctx, self.state) + self.enterRule(localctx, 94, self.RULE_formalParameter) + try: + self.enterOuterAlt(localctx, 1) + self.state = 754 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,80,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 751 + self.variableModifier() + self.state = 756 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,80,self._ctx) + + self.state = 757 + self.typeType() + self.state = 758 + self.variableDeclaratorId() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class LastFormalParameterContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeType(self): + return self.getTypedRuleContext(JavaParser.TypeTypeContext,0) + + + def ELLIPSIS(self): + return self.getToken(JavaParser.ELLIPSIS, 0) + + def variableDeclaratorId(self): + return self.getTypedRuleContext(JavaParser.VariableDeclaratorIdContext,0) + + + def variableModifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.VariableModifierContext) + else: + return self.getTypedRuleContext(JavaParser.VariableModifierContext,i) + + + def annotation(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.AnnotationContext) + else: + return self.getTypedRuleContext(JavaParser.AnnotationContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_lastFormalParameter + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLastFormalParameter" ): + listener.enterLastFormalParameter(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLastFormalParameter" ): + listener.exitLastFormalParameter(self) + + + + + def lastFormalParameter(self): + + localctx = JavaParser.LastFormalParameterContext(self, self._ctx, self.state) + self.enterRule(localctx, 96, self.RULE_lastFormalParameter) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 763 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,81,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 760 + self.variableModifier() + self.state = 765 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,81,self._ctx) + + self.state = 766 + self.typeType() + self.state = 770 + self._errHandler.sync(self) + _la = self._input.LA(1) + while ((((_la - 51)) & ~0x3f) == 0 and ((1 << (_la - 51)) & 32767) != 0) or _la==123 or _la==128: + self.state = 767 + self.annotation() + self.state = 772 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 773 + self.match(JavaParser.ELLIPSIS) + self.state = 774 + self.variableDeclaratorId() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class LambdaLVTIListContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def lambdaLVTIParameter(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.LambdaLVTIParameterContext) + else: + return self.getTypedRuleContext(JavaParser.LambdaLVTIParameterContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.COMMA) + else: + return self.getToken(JavaParser.COMMA, i) + + def getRuleIndex(self): + return JavaParser.RULE_lambdaLVTIList + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLambdaLVTIList" ): + listener.enterLambdaLVTIList(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLambdaLVTIList" ): + listener.exitLambdaLVTIList(self) + + + + + def lambdaLVTIList(self): + + localctx = JavaParser.LambdaLVTIListContext(self, self._ctx, self.state) + self.enterRule(localctx, 98, self.RULE_lambdaLVTIList) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 776 + self.lambdaLVTIParameter() + self.state = 781 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==85: + self.state = 777 + self.match(JavaParser.COMMA) + self.state = 778 + self.lambdaLVTIParameter() + self.state = 783 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class LambdaLVTIParameterContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def VAR(self): + return self.getToken(JavaParser.VAR, 0) + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def variableModifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.VariableModifierContext) + else: + return self.getTypedRuleContext(JavaParser.VariableModifierContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_lambdaLVTIParameter + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLambdaLVTIParameter" ): + listener.enterLambdaLVTIParameter(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLambdaLVTIParameter" ): + listener.exitLambdaLVTIParameter(self) + + + + + def lambdaLVTIParameter(self): + + localctx = JavaParser.LambdaLVTIParameterContext(self, self._ctx, self.state) + self.enterRule(localctx, 100, self.RULE_lambdaLVTIParameter) + try: + self.enterOuterAlt(localctx, 1) + self.state = 787 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,84,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 784 + self.variableModifier() + self.state = 789 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,84,self._ctx) + + self.state = 790 + self.match(JavaParser.VAR) + self.state = 791 + self.identifier() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class QualifiedNameContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def identifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.IdentifierContext) + else: + return self.getTypedRuleContext(JavaParser.IdentifierContext,i) + + + def DOT(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.DOT) + else: + return self.getToken(JavaParser.DOT, i) + + def getRuleIndex(self): + return JavaParser.RULE_qualifiedName + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterQualifiedName" ): + listener.enterQualifiedName(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitQualifiedName" ): + listener.exitQualifiedName(self) + + + + + def qualifiedName(self): + + localctx = JavaParser.QualifiedNameContext(self, self._ctx, self.state) + self.enterRule(localctx, 102, self.RULE_qualifiedName) + try: + self.enterOuterAlt(localctx, 1) + self.state = 793 + self.identifier() + self.state = 798 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,85,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 794 + self.match(JavaParser.DOT) + self.state = 795 + self.identifier() + self.state = 800 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,85,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class LiteralContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def integerLiteral(self): + return self.getTypedRuleContext(JavaParser.IntegerLiteralContext,0) + + + def floatLiteral(self): + return self.getTypedRuleContext(JavaParser.FloatLiteralContext,0) + + + def CHAR_LITERAL(self): + return self.getToken(JavaParser.CHAR_LITERAL, 0) + + def STRING_LITERAL(self): + return self.getToken(JavaParser.STRING_LITERAL, 0) + + def BOOL_LITERAL(self): + return self.getToken(JavaParser.BOOL_LITERAL, 0) + + def NULL_LITERAL(self): + return self.getToken(JavaParser.NULL_LITERAL, 0) + + def TEXT_BLOCK(self): + return self.getToken(JavaParser.TEXT_BLOCK, 0) + + def getRuleIndex(self): + return JavaParser.RULE_literal + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLiteral" ): + listener.enterLiteral(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLiteral" ): + listener.exitLiteral(self) + + + + + def literal(self): + + localctx = JavaParser.LiteralContext(self, self._ctx, self.state) + self.enterRule(localctx, 104, self.RULE_literal) + try: + self.state = 808 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [67, 68, 69, 70]: + self.enterOuterAlt(localctx, 1) + self.state = 801 + self.integerLiteral() + pass + elif token in [71, 72]: + self.enterOuterAlt(localctx, 2) + self.state = 802 + self.floatLiteral() + pass + elif token in [74]: + self.enterOuterAlt(localctx, 3) + self.state = 803 + self.match(JavaParser.CHAR_LITERAL) + pass + elif token in [75]: + self.enterOuterAlt(localctx, 4) + self.state = 804 + self.match(JavaParser.STRING_LITERAL) + pass + elif token in [73]: + self.enterOuterAlt(localctx, 5) + self.state = 805 + self.match(JavaParser.BOOL_LITERAL) + pass + elif token in [77]: + self.enterOuterAlt(localctx, 6) + self.state = 806 + self.match(JavaParser.NULL_LITERAL) + pass + elif token in [76]: + self.enterOuterAlt(localctx, 7) + self.state = 807 + self.match(JavaParser.TEXT_BLOCK) + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class IntegerLiteralContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def DECIMAL_LITERAL(self): + return self.getToken(JavaParser.DECIMAL_LITERAL, 0) + + def HEX_LITERAL(self): + return self.getToken(JavaParser.HEX_LITERAL, 0) + + def OCT_LITERAL(self): + return self.getToken(JavaParser.OCT_LITERAL, 0) + + def BINARY_LITERAL(self): + return self.getToken(JavaParser.BINARY_LITERAL, 0) + + def getRuleIndex(self): + return JavaParser.RULE_integerLiteral + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterIntegerLiteral" ): + listener.enterIntegerLiteral(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitIntegerLiteral" ): + listener.exitIntegerLiteral(self) + + + + + def integerLiteral(self): + + localctx = JavaParser.IntegerLiteralContext(self, self._ctx, self.state) + self.enterRule(localctx, 106, self.RULE_integerLiteral) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 810 + _la = self._input.LA(1) + if not(((((_la - 67)) & ~0x3f) == 0 and ((1 << (_la - 67)) & 15) != 0)): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class FloatLiteralContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def FLOAT_LITERAL(self): + return self.getToken(JavaParser.FLOAT_LITERAL, 0) + + def HEX_FLOAT_LITERAL(self): + return self.getToken(JavaParser.HEX_FLOAT_LITERAL, 0) + + def getRuleIndex(self): + return JavaParser.RULE_floatLiteral + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFloatLiteral" ): + listener.enterFloatLiteral(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFloatLiteral" ): + listener.exitFloatLiteral(self) + + + + + def floatLiteral(self): + + localctx = JavaParser.FloatLiteralContext(self, self._ctx, self.state) + self.enterRule(localctx, 108, self.RULE_floatLiteral) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 812 + _la = self._input.LA(1) + if not(_la==71 or _la==72): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AltAnnotationQualifiedNameContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def AT(self): + return self.getToken(JavaParser.AT, 0) + + def identifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.IdentifierContext) + else: + return self.getTypedRuleContext(JavaParser.IdentifierContext,i) + + + def DOT(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.DOT) + else: + return self.getToken(JavaParser.DOT, i) + + def getRuleIndex(self): + return JavaParser.RULE_altAnnotationQualifiedName + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAltAnnotationQualifiedName" ): + listener.enterAltAnnotationQualifiedName(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAltAnnotationQualifiedName" ): + listener.exitAltAnnotationQualifiedName(self) + + + + + def altAnnotationQualifiedName(self): + + localctx = JavaParser.AltAnnotationQualifiedNameContext(self, self._ctx, self.state) + self.enterRule(localctx, 110, self.RULE_altAnnotationQualifiedName) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 819 + self._errHandler.sync(self) + _la = self._input.LA(1) + while ((((_la - 51)) & ~0x3f) == 0 and ((1 << (_la - 51)) & 32767) != 0) or _la==128: + self.state = 814 + self.identifier() + self.state = 815 + self.match(JavaParser.DOT) + self.state = 821 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 822 + self.match(JavaParser.AT) + self.state = 823 + self.identifier() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AnnotationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def AT(self): + return self.getToken(JavaParser.AT, 0) + + def qualifiedName(self): + return self.getTypedRuleContext(JavaParser.QualifiedNameContext,0) + + + def altAnnotationQualifiedName(self): + return self.getTypedRuleContext(JavaParser.AltAnnotationQualifiedNameContext,0) + + + def LPAREN(self): + return self.getToken(JavaParser.LPAREN, 0) + + def RPAREN(self): + return self.getToken(JavaParser.RPAREN, 0) + + def elementValuePairs(self): + return self.getTypedRuleContext(JavaParser.ElementValuePairsContext,0) + + + def elementValue(self): + return self.getTypedRuleContext(JavaParser.ElementValueContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_annotation + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAnnotation" ): + listener.enterAnnotation(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAnnotation" ): + listener.exitAnnotation(self) + + + + + def annotation(self): + + localctx = JavaParser.AnnotationContext(self, self._ctx, self.state) + self.enterRule(localctx, 112, self.RULE_annotation) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 828 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,88,self._ctx) + if la_ == 1: + self.state = 825 + self.match(JavaParser.AT) + self.state = 826 + self.qualifiedName() + pass + + elif la_ == 2: + self.state = 827 + self.altAnnotationQualifiedName() + pass + + + self.state = 836 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==78: + self.state = 830 + self.match(JavaParser.LPAREN) + self.state = 833 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,89,self._ctx) + if la_ == 1: + self.state = 831 + self.elementValuePairs() + + elif la_ == 2: + self.state = 832 + self.elementValue() + + + self.state = 835 + self.match(JavaParser.RPAREN) + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ElementValuePairsContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def elementValuePair(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ElementValuePairContext) + else: + return self.getTypedRuleContext(JavaParser.ElementValuePairContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.COMMA) + else: + return self.getToken(JavaParser.COMMA, i) + + def getRuleIndex(self): + return JavaParser.RULE_elementValuePairs + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterElementValuePairs" ): + listener.enterElementValuePairs(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitElementValuePairs" ): + listener.exitElementValuePairs(self) + + + + + def elementValuePairs(self): + + localctx = JavaParser.ElementValuePairsContext(self, self._ctx, self.state) + self.enterRule(localctx, 114, self.RULE_elementValuePairs) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 838 + self.elementValuePair() + self.state = 843 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==85: + self.state = 839 + self.match(JavaParser.COMMA) + self.state = 840 + self.elementValuePair() + self.state = 845 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ElementValuePairContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def ASSIGN(self): + return self.getToken(JavaParser.ASSIGN, 0) + + def elementValue(self): + return self.getTypedRuleContext(JavaParser.ElementValueContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_elementValuePair + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterElementValuePair" ): + listener.enterElementValuePair(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitElementValuePair" ): + listener.exitElementValuePair(self) + + + + + def elementValuePair(self): + + localctx = JavaParser.ElementValuePairContext(self, self._ctx, self.state) + self.enterRule(localctx, 116, self.RULE_elementValuePair) + try: + self.enterOuterAlt(localctx, 1) + self.state = 846 + self.identifier() + self.state = 847 + self.match(JavaParser.ASSIGN) + self.state = 848 + self.elementValue() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ElementValueContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def expression(self): + return self.getTypedRuleContext(JavaParser.ExpressionContext,0) + + + def annotation(self): + return self.getTypedRuleContext(JavaParser.AnnotationContext,0) + + + def elementValueArrayInitializer(self): + return self.getTypedRuleContext(JavaParser.ElementValueArrayInitializerContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_elementValue + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterElementValue" ): + listener.enterElementValue(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitElementValue" ): + listener.exitElementValue(self) + + + + + def elementValue(self): + + localctx = JavaParser.ElementValueContext(self, self._ctx, self.state) + self.enterRule(localctx, 118, self.RULE_elementValue) + try: + self.state = 853 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,92,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 850 + self.expression(0) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 851 + self.annotation() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 852 + self.elementValueArrayInitializer() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ElementValueArrayInitializerContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LBRACE(self): + return self.getToken(JavaParser.LBRACE, 0) + + def RBRACE(self): + return self.getToken(JavaParser.RBRACE, 0) + + def elementValue(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ElementValueContext) + else: + return self.getTypedRuleContext(JavaParser.ElementValueContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.COMMA) + else: + return self.getToken(JavaParser.COMMA, i) + + def getRuleIndex(self): + return JavaParser.RULE_elementValueArrayInitializer + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterElementValueArrayInitializer" ): + listener.enterElementValueArrayInitializer(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitElementValueArrayInitializer" ): + listener.exitElementValueArrayInitializer(self) + + + + + def elementValueArrayInitializer(self): + + localctx = JavaParser.ElementValueArrayInitializerContext(self, self._ctx, self.state) + self.enterRule(localctx, 120, self.RULE_elementValueArrayInitializer) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 855 + self.match(JavaParser.LBRACE) + self.state = 864 + self._errHandler.sync(self) + _la = self._input.LA(1) + if ((((_la - 3)) & ~0x3f) == 0 and ((1 << (_la - 3)) & 9223127275610966053) != 0) or ((((_la - 67)) & ~0x3f) == 0 and ((1 << (_la - 67)) & 2377900732130013183) != 0): + self.state = 856 + self.elementValue() + self.state = 861 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,93,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 857 + self.match(JavaParser.COMMA) + self.state = 858 + self.elementValue() + self.state = 863 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,93,self._ctx) + + + + self.state = 867 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==85: + self.state = 866 + self.match(JavaParser.COMMA) + + + self.state = 869 + self.match(JavaParser.RBRACE) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AnnotationTypeDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def AT(self): + return self.getToken(JavaParser.AT, 0) + + def INTERFACE(self): + return self.getToken(JavaParser.INTERFACE, 0) + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def annotationTypeBody(self): + return self.getTypedRuleContext(JavaParser.AnnotationTypeBodyContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_annotationTypeDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAnnotationTypeDeclaration" ): + listener.enterAnnotationTypeDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAnnotationTypeDeclaration" ): + listener.exitAnnotationTypeDeclaration(self) + + + + + def annotationTypeDeclaration(self): + + localctx = JavaParser.AnnotationTypeDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 122, self.RULE_annotationTypeDeclaration) + try: + self.enterOuterAlt(localctx, 1) + self.state = 871 + self.match(JavaParser.AT) + self.state = 872 + self.match(JavaParser.INTERFACE) + self.state = 873 + self.identifier() + self.state = 874 + self.annotationTypeBody() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AnnotationTypeBodyContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LBRACE(self): + return self.getToken(JavaParser.LBRACE, 0) + + def RBRACE(self): + return self.getToken(JavaParser.RBRACE, 0) + + def annotationTypeElementDeclaration(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.AnnotationTypeElementDeclarationContext) + else: + return self.getTypedRuleContext(JavaParser.AnnotationTypeElementDeclarationContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_annotationTypeBody + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAnnotationTypeBody" ): + listener.enterAnnotationTypeBody(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAnnotationTypeBody" ): + listener.exitAnnotationTypeBody(self) + + + + + def annotationTypeBody(self): + + localctx = JavaParser.AnnotationTypeBodyContext(self, self._ctx, self.state) + self.enterRule(localctx, 124, self.RULE_annotationTypeBody) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 876 + self.match(JavaParser.LBRACE) + self.state = 880 + self._errHandler.sync(self) + _la = self._input.LA(1) + while ((((_la - 1)) & ~0x3f) == 0 and ((1 << (_la - 1)) & -806529426349675) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & -8935141660702539773) != 0): + self.state = 877 + self.annotationTypeElementDeclaration() + self.state = 882 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 883 + self.match(JavaParser.RBRACE) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AnnotationTypeElementDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def annotationTypeElementRest(self): + return self.getTypedRuleContext(JavaParser.AnnotationTypeElementRestContext,0) + + + def modifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ModifierContext) + else: + return self.getTypedRuleContext(JavaParser.ModifierContext,i) + + + def SEMI(self): + return self.getToken(JavaParser.SEMI, 0) + + def getRuleIndex(self): + return JavaParser.RULE_annotationTypeElementDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAnnotationTypeElementDeclaration" ): + listener.enterAnnotationTypeElementDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAnnotationTypeElementDeclaration" ): + listener.exitAnnotationTypeElementDeclaration(self) + + + + + def annotationTypeElementDeclaration(self): + + localctx = JavaParser.AnnotationTypeElementDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 126, self.RULE_annotationTypeElementDeclaration) + try: + self.state = 893 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [1, 3, 5, 8, 9, 14, 16, 18, 20, 27, 28, 29, 30, 33, 34, 35, 37, 38, 39, 42, 46, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 123, 128]: + self.enterOuterAlt(localctx, 1) + self.state = 888 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,97,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 885 + self.modifier() + self.state = 890 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,97,self._ctx) + + self.state = 891 + self.annotationTypeElementRest() + pass + elif token in [84]: + self.enterOuterAlt(localctx, 2) + self.state = 892 + self.match(JavaParser.SEMI) + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AnnotationTypeElementRestContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeType(self): + return self.getTypedRuleContext(JavaParser.TypeTypeContext,0) + + + def annotationMethodOrConstantRest(self): + return self.getTypedRuleContext(JavaParser.AnnotationMethodOrConstantRestContext,0) + + + def SEMI(self): + return self.getToken(JavaParser.SEMI, 0) + + def classDeclaration(self): + return self.getTypedRuleContext(JavaParser.ClassDeclarationContext,0) + + + def interfaceDeclaration(self): + return self.getTypedRuleContext(JavaParser.InterfaceDeclarationContext,0) + + + def enumDeclaration(self): + return self.getTypedRuleContext(JavaParser.EnumDeclarationContext,0) + + + def annotationTypeDeclaration(self): + return self.getTypedRuleContext(JavaParser.AnnotationTypeDeclarationContext,0) + + + def recordDeclaration(self): + return self.getTypedRuleContext(JavaParser.RecordDeclarationContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_annotationTypeElementRest + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAnnotationTypeElementRest" ): + listener.enterAnnotationTypeElementRest(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAnnotationTypeElementRest" ): + listener.exitAnnotationTypeElementRest(self) + + + + + def annotationTypeElementRest(self): + + localctx = JavaParser.AnnotationTypeElementRestContext(self, self._ctx, self.state) + self.enterRule(localctx, 128, self.RULE_annotationTypeElementRest) + try: + self.state = 919 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,104,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 895 + self.typeType() + self.state = 896 + self.annotationMethodOrConstantRest() + self.state = 897 + self.match(JavaParser.SEMI) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 899 + self.classDeclaration() + self.state = 901 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,99,self._ctx) + if la_ == 1: + self.state = 900 + self.match(JavaParser.SEMI) + + + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 903 + self.interfaceDeclaration() + self.state = 905 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,100,self._ctx) + if la_ == 1: + self.state = 904 + self.match(JavaParser.SEMI) + + + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 907 + self.enumDeclaration() + self.state = 909 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,101,self._ctx) + if la_ == 1: + self.state = 908 + self.match(JavaParser.SEMI) + + + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 911 + self.annotationTypeDeclaration() + self.state = 913 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,102,self._ctx) + if la_ == 1: + self.state = 912 + self.match(JavaParser.SEMI) + + + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 915 + self.recordDeclaration() + self.state = 917 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,103,self._ctx) + if la_ == 1: + self.state = 916 + self.match(JavaParser.SEMI) + + + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AnnotationMethodOrConstantRestContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def annotationMethodRest(self): + return self.getTypedRuleContext(JavaParser.AnnotationMethodRestContext,0) + + + def annotationConstantRest(self): + return self.getTypedRuleContext(JavaParser.AnnotationConstantRestContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_annotationMethodOrConstantRest + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAnnotationMethodOrConstantRest" ): + listener.enterAnnotationMethodOrConstantRest(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAnnotationMethodOrConstantRest" ): + listener.exitAnnotationMethodOrConstantRest(self) + + + + + def annotationMethodOrConstantRest(self): + + localctx = JavaParser.AnnotationMethodOrConstantRestContext(self, self._ctx, self.state) + self.enterRule(localctx, 130, self.RULE_annotationMethodOrConstantRest) + try: + self.state = 923 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,105,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 921 + self.annotationMethodRest() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 922 + self.annotationConstantRest() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AnnotationMethodRestContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def LPAREN(self): + return self.getToken(JavaParser.LPAREN, 0) + + def RPAREN(self): + return self.getToken(JavaParser.RPAREN, 0) + + def defaultValue(self): + return self.getTypedRuleContext(JavaParser.DefaultValueContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_annotationMethodRest + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAnnotationMethodRest" ): + listener.enterAnnotationMethodRest(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAnnotationMethodRest" ): + listener.exitAnnotationMethodRest(self) + + + + + def annotationMethodRest(self): + + localctx = JavaParser.AnnotationMethodRestContext(self, self._ctx, self.state) + self.enterRule(localctx, 132, self.RULE_annotationMethodRest) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 925 + self.identifier() + self.state = 926 + self.match(JavaParser.LPAREN) + self.state = 927 + self.match(JavaParser.RPAREN) + self.state = 929 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==12: + self.state = 928 + self.defaultValue() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AnnotationConstantRestContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def variableDeclarators(self): + return self.getTypedRuleContext(JavaParser.VariableDeclaratorsContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_annotationConstantRest + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAnnotationConstantRest" ): + listener.enterAnnotationConstantRest(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAnnotationConstantRest" ): + listener.exitAnnotationConstantRest(self) + + + + + def annotationConstantRest(self): + + localctx = JavaParser.AnnotationConstantRestContext(self, self._ctx, self.state) + self.enterRule(localctx, 134, self.RULE_annotationConstantRest) + try: + self.enterOuterAlt(localctx, 1) + self.state = 931 + self.variableDeclarators() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class DefaultValueContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def DEFAULT(self): + return self.getToken(JavaParser.DEFAULT, 0) + + def elementValue(self): + return self.getTypedRuleContext(JavaParser.ElementValueContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_defaultValue + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDefaultValue" ): + listener.enterDefaultValue(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDefaultValue" ): + listener.exitDefaultValue(self) + + + + + def defaultValue(self): + + localctx = JavaParser.DefaultValueContext(self, self._ctx, self.state) + self.enterRule(localctx, 136, self.RULE_defaultValue) + try: + self.enterOuterAlt(localctx, 1) + self.state = 933 + self.match(JavaParser.DEFAULT) + self.state = 934 + self.elementValue() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ModuleDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def MODULE(self): + return self.getToken(JavaParser.MODULE, 0) + + def qualifiedName(self): + return self.getTypedRuleContext(JavaParser.QualifiedNameContext,0) + + + def moduleBody(self): + return self.getTypedRuleContext(JavaParser.ModuleBodyContext,0) + + + def OPEN(self): + return self.getToken(JavaParser.OPEN, 0) + + def getRuleIndex(self): + return JavaParser.RULE_moduleDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterModuleDeclaration" ): + listener.enterModuleDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitModuleDeclaration" ): + listener.exitModuleDeclaration(self) + + + + + def moduleDeclaration(self): + + localctx = JavaParser.ModuleDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 138, self.RULE_moduleDeclaration) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 937 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==52: + self.state = 936 + self.match(JavaParser.OPEN) + + + self.state = 939 + self.match(JavaParser.MODULE) + self.state = 940 + self.qualifiedName() + self.state = 941 + self.moduleBody() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ModuleBodyContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LBRACE(self): + return self.getToken(JavaParser.LBRACE, 0) + + def RBRACE(self): + return self.getToken(JavaParser.RBRACE, 0) + + def moduleDirective(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ModuleDirectiveContext) + else: + return self.getTypedRuleContext(JavaParser.ModuleDirectiveContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_moduleBody + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterModuleBody" ): + listener.enterModuleBody(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitModuleBody" ): + listener.exitModuleBody(self) + + + + + def moduleBody(self): + + localctx = JavaParser.ModuleBodyContext(self, self._ctx, self.state) + self.enterRule(localctx, 140, self.RULE_moduleBody) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 943 + self.match(JavaParser.LBRACE) + self.state = 947 + self._errHandler.sync(self) + _la = self._input.LA(1) + while (((_la) & ~0x3f) == 0 and ((1 << _la) & 495395959010754560) != 0): + self.state = 944 + self.moduleDirective() + self.state = 949 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 950 + self.match(JavaParser.RBRACE) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ModuleDirectiveContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def REQUIRES(self): + return self.getToken(JavaParser.REQUIRES, 0) + + def qualifiedName(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.QualifiedNameContext) + else: + return self.getTypedRuleContext(JavaParser.QualifiedNameContext,i) + + + def SEMI(self): + return self.getToken(JavaParser.SEMI, 0) + + def requiresModifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.RequiresModifierContext) + else: + return self.getTypedRuleContext(JavaParser.RequiresModifierContext,i) + + + def EXPORTS(self): + return self.getToken(JavaParser.EXPORTS, 0) + + def TO(self): + return self.getToken(JavaParser.TO, 0) + + def OPENS(self): + return self.getToken(JavaParser.OPENS, 0) + + def USES(self): + return self.getToken(JavaParser.USES, 0) + + def PROVIDES(self): + return self.getToken(JavaParser.PROVIDES, 0) + + def WITH(self): + return self.getToken(JavaParser.WITH, 0) + + def getRuleIndex(self): + return JavaParser.RULE_moduleDirective + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterModuleDirective" ): + listener.enterModuleDirective(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitModuleDirective" ): + listener.exitModuleDirective(self) + + + + + def moduleDirective(self): + + localctx = JavaParser.ModuleDirectiveContext(self, self._ctx, self.state) + self.enterRule(localctx, 142, self.RULE_moduleDirective) + self._la = 0 # Token type + try: + self.state = 988 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [53]: + self.enterOuterAlt(localctx, 1) + self.state = 952 + self.match(JavaParser.REQUIRES) + self.state = 956 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,109,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 953 + self.requiresModifier() + self.state = 958 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,109,self._ctx) + + self.state = 959 + self.qualifiedName() + self.state = 960 + self.match(JavaParser.SEMI) + pass + elif token in [54]: + self.enterOuterAlt(localctx, 2) + self.state = 962 + self.match(JavaParser.EXPORTS) + self.state = 963 + self.qualifiedName() + self.state = 966 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==56: + self.state = 964 + self.match(JavaParser.TO) + self.state = 965 + self.qualifiedName() + + + self.state = 968 + self.match(JavaParser.SEMI) + pass + elif token in [55]: + self.enterOuterAlt(localctx, 3) + self.state = 970 + self.match(JavaParser.OPENS) + self.state = 971 + self.qualifiedName() + self.state = 974 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==56: + self.state = 972 + self.match(JavaParser.TO) + self.state = 973 + self.qualifiedName() + + + self.state = 976 + self.match(JavaParser.SEMI) + pass + elif token in [57]: + self.enterOuterAlt(localctx, 4) + self.state = 978 + self.match(JavaParser.USES) + self.state = 979 + self.qualifiedName() + self.state = 980 + self.match(JavaParser.SEMI) + pass + elif token in [58]: + self.enterOuterAlt(localctx, 5) + self.state = 982 + self.match(JavaParser.PROVIDES) + self.state = 983 + self.qualifiedName() + self.state = 984 + self.match(JavaParser.WITH) + self.state = 985 + self.qualifiedName() + self.state = 986 + self.match(JavaParser.SEMI) + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class RequiresModifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def TRANSITIVE(self): + return self.getToken(JavaParser.TRANSITIVE, 0) + + def STATIC(self): + return self.getToken(JavaParser.STATIC, 0) + + def getRuleIndex(self): + return JavaParser.RULE_requiresModifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterRequiresModifier" ): + listener.enterRequiresModifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitRequiresModifier" ): + listener.exitRequiresModifier(self) + + + + + def requiresModifier(self): + + localctx = JavaParser.RequiresModifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 144, self.RULE_requiresModifier) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 990 + _la = self._input.LA(1) + if not(_la==38 or _la==60): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class RecordDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def RECORD(self): + return self.getToken(JavaParser.RECORD, 0) + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def recordHeader(self): + return self.getTypedRuleContext(JavaParser.RecordHeaderContext,0) + + + def recordBody(self): + return self.getTypedRuleContext(JavaParser.RecordBodyContext,0) + + + def typeParameters(self): + return self.getTypedRuleContext(JavaParser.TypeParametersContext,0) + + + def IMPLEMENTS(self): + return self.getToken(JavaParser.IMPLEMENTS, 0) + + def typeList(self): + return self.getTypedRuleContext(JavaParser.TypeListContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_recordDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterRecordDeclaration" ): + listener.enterRecordDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitRecordDeclaration" ): + listener.exitRecordDeclaration(self) + + + + + def recordDeclaration(self): + + localctx = JavaParser.RecordDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 146, self.RULE_recordDeclaration) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 992 + self.match(JavaParser.RECORD) + self.state = 993 + self.identifier() + self.state = 995 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==89: + self.state = 994 + self.typeParameters() + + + self.state = 997 + self.recordHeader() + self.state = 1000 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==24: + self.state = 998 + self.match(JavaParser.IMPLEMENTS) + self.state = 999 + self.typeList() + + + self.state = 1002 + self.recordBody() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class RecordHeaderContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LPAREN(self): + return self.getToken(JavaParser.LPAREN, 0) + + def RPAREN(self): + return self.getToken(JavaParser.RPAREN, 0) + + def recordComponentList(self): + return self.getTypedRuleContext(JavaParser.RecordComponentListContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_recordHeader + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterRecordHeader" ): + listener.enterRecordHeader(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitRecordHeader" ): + listener.exitRecordHeader(self) + + + + + def recordHeader(self): + + localctx = JavaParser.RecordHeaderContext(self, self._ctx, self.state) + self.enterRule(localctx, 148, self.RULE_recordHeader) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1004 + self.match(JavaParser.LPAREN) + self.state = 1006 + self._errHandler.sync(self) + _la = self._input.LA(1) + if ((((_la - 3)) & ~0x3f) == 0 and ((1 << (_la - 3)) & 9223090579141953573) != 0) or _la==123 or _la==128: + self.state = 1005 + self.recordComponentList() + + + self.state = 1008 + self.match(JavaParser.RPAREN) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class RecordComponentListContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def recordComponent(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.RecordComponentContext) + else: + return self.getTypedRuleContext(JavaParser.RecordComponentContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.COMMA) + else: + return self.getToken(JavaParser.COMMA, i) + + def getRuleIndex(self): + return JavaParser.RULE_recordComponentList + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterRecordComponentList" ): + listener.enterRecordComponentList(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitRecordComponentList" ): + listener.exitRecordComponentList(self) + + + + + def recordComponentList(self): + + localctx = JavaParser.RecordComponentListContext(self, self._ctx, self.state) + self.enterRule(localctx, 150, self.RULE_recordComponentList) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1010 + self.recordComponent() + self.state = 1015 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==85: + self.state = 1011 + self.match(JavaParser.COMMA) + self.state = 1012 + self.recordComponent() + self.state = 1017 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class RecordComponentContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeType(self): + return self.getTypedRuleContext(JavaParser.TypeTypeContext,0) + + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_recordComponent + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterRecordComponent" ): + listener.enterRecordComponent(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitRecordComponent" ): + listener.exitRecordComponent(self) + + + + + def recordComponent(self): + + localctx = JavaParser.RecordComponentContext(self, self._ctx, self.state) + self.enterRule(localctx, 152, self.RULE_recordComponent) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1018 + self.typeType() + self.state = 1019 + self.identifier() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class RecordBodyContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LBRACE(self): + return self.getToken(JavaParser.LBRACE, 0) + + def RBRACE(self): + return self.getToken(JavaParser.RBRACE, 0) + + def classBodyDeclaration(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ClassBodyDeclarationContext) + else: + return self.getTypedRuleContext(JavaParser.ClassBodyDeclarationContext,i) + + + def compactConstructorDeclaration(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.CompactConstructorDeclarationContext) + else: + return self.getTypedRuleContext(JavaParser.CompactConstructorDeclarationContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_recordBody + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterRecordBody" ): + listener.enterRecordBody(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitRecordBody" ): + listener.exitRecordBody(self) + + + + + def recordBody(self): + + localctx = JavaParser.RecordBodyContext(self, self._ctx, self.state) + self.enterRule(localctx, 154, self.RULE_recordBody) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1021 + self.match(JavaParser.LBRACE) + self.state = 1026 + self._errHandler.sync(self) + _la = self._input.LA(1) + while ((((_la - 1)) & ~0x3f) == 0 and ((1 << (_la - 1)) & -665791937994347) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & -8935141660685729789) != 0): + self.state = 1024 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,117,self._ctx) + if la_ == 1: + self.state = 1022 + self.classBodyDeclaration() + pass + + elif la_ == 2: + self.state = 1023 + self.compactConstructorDeclaration() + pass + + + self.state = 1028 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 1029 + self.match(JavaParser.RBRACE) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class BlockContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LBRACE(self): + return self.getToken(JavaParser.LBRACE, 0) + + def RBRACE(self): + return self.getToken(JavaParser.RBRACE, 0) + + def blockStatement(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.BlockStatementContext) + else: + return self.getTypedRuleContext(JavaParser.BlockStatementContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_block + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterBlock" ): + listener.enterBlock(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitBlock" ): + listener.exitBlock(self) + + + + + def block(self): + + localctx = JavaParser.BlockContext(self, self._ctx, self.state) + self.enterRule(localctx, 156, self.RULE_block) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1031 + self.match(JavaParser.LBRACE) + self.state = 1035 + self._errHandler.sync(self) + _la = self._input.LA(1) + while ((((_la - 1)) & ~0x3f) == 0 and ((1 << (_la - 1)) & -334254282492513) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & -8935141145188974593) != 0): + self.state = 1032 + self.blockStatement() + self.state = 1037 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 1038 + self.match(JavaParser.RBRACE) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class BlockStatementContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def localVariableDeclaration(self): + return self.getTypedRuleContext(JavaParser.LocalVariableDeclarationContext,0) + + + def SEMI(self): + return self.getToken(JavaParser.SEMI, 0) + + def localTypeDeclaration(self): + return self.getTypedRuleContext(JavaParser.LocalTypeDeclarationContext,0) + + + def statement(self): + return self.getTypedRuleContext(JavaParser.StatementContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_blockStatement + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterBlockStatement" ): + listener.enterBlockStatement(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitBlockStatement" ): + listener.exitBlockStatement(self) + + + + + def blockStatement(self): + + localctx = JavaParser.BlockStatementContext(self, self._ctx, self.state) + self.enterRule(localctx, 158, self.RULE_blockStatement) + try: + self.state = 1045 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,120,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1040 + self.localVariableDeclaration() + self.state = 1041 + self.match(JavaParser.SEMI) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1043 + self.localTypeDeclaration() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1044 + self.statement() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class LocalVariableDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def VAR(self): + return self.getToken(JavaParser.VAR, 0) + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def ASSIGN(self): + return self.getToken(JavaParser.ASSIGN, 0) + + def expression(self): + return self.getTypedRuleContext(JavaParser.ExpressionContext,0) + + + def typeType(self): + return self.getTypedRuleContext(JavaParser.TypeTypeContext,0) + + + def variableDeclarators(self): + return self.getTypedRuleContext(JavaParser.VariableDeclaratorsContext,0) + + + def variableModifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.VariableModifierContext) + else: + return self.getTypedRuleContext(JavaParser.VariableModifierContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_localVariableDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLocalVariableDeclaration" ): + listener.enterLocalVariableDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLocalVariableDeclaration" ): + listener.exitLocalVariableDeclaration(self) + + + + + def localVariableDeclaration(self): + + localctx = JavaParser.LocalVariableDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 160, self.RULE_localVariableDeclaration) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1050 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,121,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1047 + self.variableModifier() + self.state = 1052 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,121,self._ctx) + + self.state = 1061 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,122,self._ctx) + if la_ == 1: + self.state = 1053 + self.match(JavaParser.VAR) + self.state = 1054 + self.identifier() + self.state = 1055 + self.match(JavaParser.ASSIGN) + self.state = 1056 + self.expression(0) + pass + + elif la_ == 2: + self.state = 1058 + self.typeType() + self.state = 1059 + self.variableDeclarators() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class IdentifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def IDENTIFIER(self): + return self.getToken(JavaParser.IDENTIFIER, 0) + + def MODULE(self): + return self.getToken(JavaParser.MODULE, 0) + + def OPEN(self): + return self.getToken(JavaParser.OPEN, 0) + + def REQUIRES(self): + return self.getToken(JavaParser.REQUIRES, 0) + + def EXPORTS(self): + return self.getToken(JavaParser.EXPORTS, 0) + + def OPENS(self): + return self.getToken(JavaParser.OPENS, 0) + + def TO(self): + return self.getToken(JavaParser.TO, 0) + + def USES(self): + return self.getToken(JavaParser.USES, 0) + + def PROVIDES(self): + return self.getToken(JavaParser.PROVIDES, 0) + + def WITH(self): + return self.getToken(JavaParser.WITH, 0) + + def TRANSITIVE(self): + return self.getToken(JavaParser.TRANSITIVE, 0) + + def YIELD(self): + return self.getToken(JavaParser.YIELD, 0) + + def SEALED(self): + return self.getToken(JavaParser.SEALED, 0) + + def PERMITS(self): + return self.getToken(JavaParser.PERMITS, 0) + + def RECORD(self): + return self.getToken(JavaParser.RECORD, 0) + + def VAR(self): + return self.getToken(JavaParser.VAR, 0) + + def getRuleIndex(self): + return JavaParser.RULE_identifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterIdentifier" ): + listener.enterIdentifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitIdentifier" ): + listener.exitIdentifier(self) + + + + + def identifier(self): + + localctx = JavaParser.IdentifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 162, self.RULE_identifier) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1063 + _la = self._input.LA(1) + if not(((((_la - 51)) & ~0x3f) == 0 and ((1 << (_la - 51)) & 32767) != 0) or _la==128): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TypeIdentifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def IDENTIFIER(self): + return self.getToken(JavaParser.IDENTIFIER, 0) + + def MODULE(self): + return self.getToken(JavaParser.MODULE, 0) + + def OPEN(self): + return self.getToken(JavaParser.OPEN, 0) + + def REQUIRES(self): + return self.getToken(JavaParser.REQUIRES, 0) + + def EXPORTS(self): + return self.getToken(JavaParser.EXPORTS, 0) + + def OPENS(self): + return self.getToken(JavaParser.OPENS, 0) + + def TO(self): + return self.getToken(JavaParser.TO, 0) + + def USES(self): + return self.getToken(JavaParser.USES, 0) + + def PROVIDES(self): + return self.getToken(JavaParser.PROVIDES, 0) + + def WITH(self): + return self.getToken(JavaParser.WITH, 0) + + def TRANSITIVE(self): + return self.getToken(JavaParser.TRANSITIVE, 0) + + def SEALED(self): + return self.getToken(JavaParser.SEALED, 0) + + def PERMITS(self): + return self.getToken(JavaParser.PERMITS, 0) + + def RECORD(self): + return self.getToken(JavaParser.RECORD, 0) + + def getRuleIndex(self): + return JavaParser.RULE_typeIdentifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypeIdentifier" ): + listener.enterTypeIdentifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypeIdentifier" ): + listener.exitTypeIdentifier(self) + + + + + def typeIdentifier(self): + + localctx = JavaParser.TypeIdentifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 164, self.RULE_typeIdentifier) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1065 + _la = self._input.LA(1) + if not(((((_la - 51)) & ~0x3f) == 0 and ((1 << (_la - 51)) & 29695) != 0) or _la==128): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class LocalTypeDeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def classDeclaration(self): + return self.getTypedRuleContext(JavaParser.ClassDeclarationContext,0) + + + def interfaceDeclaration(self): + return self.getTypedRuleContext(JavaParser.InterfaceDeclarationContext,0) + + + def recordDeclaration(self): + return self.getTypedRuleContext(JavaParser.RecordDeclarationContext,0) + + + def classOrInterfaceModifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ClassOrInterfaceModifierContext) + else: + return self.getTypedRuleContext(JavaParser.ClassOrInterfaceModifierContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_localTypeDeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLocalTypeDeclaration" ): + listener.enterLocalTypeDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLocalTypeDeclaration" ): + listener.exitLocalTypeDeclaration(self) + + + + + def localTypeDeclaration(self): + + localctx = JavaParser.LocalTypeDeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 166, self.RULE_localTypeDeclaration) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1070 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,123,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1067 + self.classOrInterfaceModifier() + self.state = 1072 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,123,self._ctx) + + self.state = 1076 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [9]: + self.state = 1073 + self.classDeclaration() + pass + elif token in [28]: + self.state = 1074 + self.interfaceDeclaration() + pass + elif token in [63]: + self.state = 1075 + self.recordDeclaration() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class StatementContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + self.blockLabel = None # BlockContext + self.statementExpression = None # ExpressionContext + self.identifierLabel = None # IdentifierContext + + def block(self): + return self.getTypedRuleContext(JavaParser.BlockContext,0) + + + def ASSERT(self): + return self.getToken(JavaParser.ASSERT, 0) + + def expression(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ExpressionContext) + else: + return self.getTypedRuleContext(JavaParser.ExpressionContext,i) + + + def SEMI(self): + return self.getToken(JavaParser.SEMI, 0) + + def COLON(self): + return self.getToken(JavaParser.COLON, 0) + + def IF(self): + return self.getToken(JavaParser.IF, 0) + + def parExpression(self): + return self.getTypedRuleContext(JavaParser.ParExpressionContext,0) + + + def statement(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.StatementContext) + else: + return self.getTypedRuleContext(JavaParser.StatementContext,i) + + + def ELSE(self): + return self.getToken(JavaParser.ELSE, 0) + + def FOR(self): + return self.getToken(JavaParser.FOR, 0) + + def LPAREN(self): + return self.getToken(JavaParser.LPAREN, 0) + + def forControl(self): + return self.getTypedRuleContext(JavaParser.ForControlContext,0) + + + def RPAREN(self): + return self.getToken(JavaParser.RPAREN, 0) + + def WHILE(self): + return self.getToken(JavaParser.WHILE, 0) + + def DO(self): + return self.getToken(JavaParser.DO, 0) + + def TRY(self): + return self.getToken(JavaParser.TRY, 0) + + def finallyBlock(self): + return self.getTypedRuleContext(JavaParser.FinallyBlockContext,0) + + + def catchClause(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.CatchClauseContext) + else: + return self.getTypedRuleContext(JavaParser.CatchClauseContext,i) + + + def resourceSpecification(self): + return self.getTypedRuleContext(JavaParser.ResourceSpecificationContext,0) + + + def SWITCH(self): + return self.getToken(JavaParser.SWITCH, 0) + + def LBRACE(self): + return self.getToken(JavaParser.LBRACE, 0) + + def RBRACE(self): + return self.getToken(JavaParser.RBRACE, 0) + + def switchBlockStatementGroup(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.SwitchBlockStatementGroupContext) + else: + return self.getTypedRuleContext(JavaParser.SwitchBlockStatementGroupContext,i) + + + def switchLabel(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.SwitchLabelContext) + else: + return self.getTypedRuleContext(JavaParser.SwitchLabelContext,i) + + + def SYNCHRONIZED(self): + return self.getToken(JavaParser.SYNCHRONIZED, 0) + + def RETURN(self): + return self.getToken(JavaParser.RETURN, 0) + + def THROW(self): + return self.getToken(JavaParser.THROW, 0) + + def BREAK(self): + return self.getToken(JavaParser.BREAK, 0) + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def CONTINUE(self): + return self.getToken(JavaParser.CONTINUE, 0) + + def YIELD(self): + return self.getToken(JavaParser.YIELD, 0) + + def switchExpression(self): + return self.getTypedRuleContext(JavaParser.SwitchExpressionContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_statement + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterStatement" ): + listener.enterStatement(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitStatement" ): + listener.exitStatement(self) + + + + + def statement(self): + + localctx = JavaParser.StatementContext(self, self._ctx, self.state) + self.enterRule(localctx, 168, self.RULE_statement) + self._la = 0 # Token type + try: + self.state = 1191 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,138,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1078 + localctx.blockLabel = self.block() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1079 + self.match(JavaParser.ASSERT) + self.state = 1080 + self.expression(0) + self.state = 1083 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==93: + self.state = 1081 + self.match(JavaParser.COLON) + self.state = 1082 + self.expression(0) + + + self.state = 1085 + self.match(JavaParser.SEMI) + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1087 + self.match(JavaParser.IF) + self.state = 1088 + self.parExpression() + self.state = 1089 + self.statement() + self.state = 1092 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,126,self._ctx) + if la_ == 1: + self.state = 1090 + self.match(JavaParser.ELSE) + self.state = 1091 + self.statement() + + + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 1094 + self.match(JavaParser.FOR) + self.state = 1095 + self.match(JavaParser.LPAREN) + self.state = 1096 + self.forControl() + self.state = 1097 + self.match(JavaParser.RPAREN) + self.state = 1098 + self.statement() + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 1100 + self.match(JavaParser.WHILE) + self.state = 1101 + self.parExpression() + self.state = 1102 + self.statement() + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 1104 + self.match(JavaParser.DO) + self.state = 1105 + self.statement() + self.state = 1106 + self.match(JavaParser.WHILE) + self.state = 1107 + self.parExpression() + self.state = 1108 + self.match(JavaParser.SEMI) + pass + + elif la_ == 7: + self.enterOuterAlt(localctx, 7) + self.state = 1110 + self.match(JavaParser.TRY) + self.state = 1111 + self.block() + self.state = 1121 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [7]: + self.state = 1113 + self._errHandler.sync(self) + _la = self._input.LA(1) + while True: + self.state = 1112 + self.catchClause() + self.state = 1115 + self._errHandler.sync(self) + _la = self._input.LA(1) + if not (_la==7): + break + + self.state = 1118 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==19: + self.state = 1117 + self.finallyBlock() + + + pass + elif token in [19]: + self.state = 1120 + self.finallyBlock() + pass + else: + raise NoViableAltException(self) + + pass + + elif la_ == 8: + self.enterOuterAlt(localctx, 8) + self.state = 1123 + self.match(JavaParser.TRY) + self.state = 1124 + self.resourceSpecification() + self.state = 1125 + self.block() + self.state = 1129 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==7: + self.state = 1126 + self.catchClause() + self.state = 1131 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 1133 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==19: + self.state = 1132 + self.finallyBlock() + + + pass + + elif la_ == 9: + self.enterOuterAlt(localctx, 9) + self.state = 1135 + self.match(JavaParser.SWITCH) + self.state = 1136 + self.parExpression() + self.state = 1137 + self.match(JavaParser.LBRACE) + self.state = 1141 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,132,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1138 + self.switchBlockStatementGroup() + self.state = 1143 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,132,self._ctx) + + self.state = 1147 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==6 or _la==12: + self.state = 1144 + self.switchLabel() + self.state = 1149 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 1150 + self.match(JavaParser.RBRACE) + pass + + elif la_ == 10: + self.enterOuterAlt(localctx, 10) + self.state = 1152 + self.match(JavaParser.SYNCHRONIZED) + self.state = 1153 + self.parExpression() + self.state = 1154 + self.block() + pass + + elif la_ == 11: + self.enterOuterAlt(localctx, 11) + self.state = 1156 + self.match(JavaParser.RETURN) + self.state = 1158 + self._errHandler.sync(self) + _la = self._input.LA(1) + if ((((_la - 3)) & ~0x3f) == 0 and ((1 << (_la - 3)) & 9223127275610966053) != 0) or ((((_la - 67)) & ~0x3f) == 0 and ((1 << (_la - 67)) & 2377900732130004991) != 0): + self.state = 1157 + self.expression(0) + + + self.state = 1160 + self.match(JavaParser.SEMI) + pass + + elif la_ == 12: + self.enterOuterAlt(localctx, 12) + self.state = 1161 + self.match(JavaParser.THROW) + self.state = 1162 + self.expression(0) + self.state = 1163 + self.match(JavaParser.SEMI) + pass + + elif la_ == 13: + self.enterOuterAlt(localctx, 13) + self.state = 1165 + self.match(JavaParser.BREAK) + self.state = 1167 + self._errHandler.sync(self) + _la = self._input.LA(1) + if ((((_la - 51)) & ~0x3f) == 0 and ((1 << (_la - 51)) & 32767) != 0) or _la==128: + self.state = 1166 + self.identifier() + + + self.state = 1169 + self.match(JavaParser.SEMI) + pass + + elif la_ == 14: + self.enterOuterAlt(localctx, 14) + self.state = 1170 + self.match(JavaParser.CONTINUE) + self.state = 1172 + self._errHandler.sync(self) + _la = self._input.LA(1) + if ((((_la - 51)) & ~0x3f) == 0 and ((1 << (_la - 51)) & 32767) != 0) or _la==128: + self.state = 1171 + self.identifier() + + + self.state = 1174 + self.match(JavaParser.SEMI) + pass + + elif la_ == 15: + self.enterOuterAlt(localctx, 15) + self.state = 1175 + self.match(JavaParser.YIELD) + self.state = 1176 + self.expression(0) + self.state = 1177 + self.match(JavaParser.SEMI) + pass + + elif la_ == 16: + self.enterOuterAlt(localctx, 16) + self.state = 1179 + self.match(JavaParser.SEMI) + pass + + elif la_ == 17: + self.enterOuterAlt(localctx, 17) + self.state = 1180 + localctx.statementExpression = self.expression(0) + self.state = 1181 + self.match(JavaParser.SEMI) + pass + + elif la_ == 18: + self.enterOuterAlt(localctx, 18) + self.state = 1183 + self.switchExpression() + self.state = 1185 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,137,self._ctx) + if la_ == 1: + self.state = 1184 + self.match(JavaParser.SEMI) + + + pass + + elif la_ == 19: + self.enterOuterAlt(localctx, 19) + self.state = 1187 + localctx.identifierLabel = self.identifier() + self.state = 1188 + self.match(JavaParser.COLON) + self.state = 1189 + self.statement() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class CatchClauseContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def CATCH(self): + return self.getToken(JavaParser.CATCH, 0) + + def LPAREN(self): + return self.getToken(JavaParser.LPAREN, 0) + + def catchType(self): + return self.getTypedRuleContext(JavaParser.CatchTypeContext,0) + + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def RPAREN(self): + return self.getToken(JavaParser.RPAREN, 0) + + def block(self): + return self.getTypedRuleContext(JavaParser.BlockContext,0) + + + def variableModifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.VariableModifierContext) + else: + return self.getTypedRuleContext(JavaParser.VariableModifierContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_catchClause + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCatchClause" ): + listener.enterCatchClause(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCatchClause" ): + listener.exitCatchClause(self) + + + + + def catchClause(self): + + localctx = JavaParser.CatchClauseContext(self, self._ctx, self.state) + self.enterRule(localctx, 170, self.RULE_catchClause) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1193 + self.match(JavaParser.CATCH) + self.state = 1194 + self.match(JavaParser.LPAREN) + self.state = 1198 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,139,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1195 + self.variableModifier() + self.state = 1200 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,139,self._ctx) + + self.state = 1201 + self.catchType() + self.state = 1202 + self.identifier() + self.state = 1203 + self.match(JavaParser.RPAREN) + self.state = 1204 + self.block() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class CatchTypeContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def qualifiedName(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.QualifiedNameContext) + else: + return self.getTypedRuleContext(JavaParser.QualifiedNameContext,i) + + + def BITOR(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.BITOR) + else: + return self.getToken(JavaParser.BITOR, i) + + def getRuleIndex(self): + return JavaParser.RULE_catchType + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCatchType" ): + listener.enterCatchType(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCatchType" ): + listener.exitCatchType(self) + + + + + def catchType(self): + + localctx = JavaParser.CatchTypeContext(self, self._ctx, self.state) + self.enterRule(localctx, 172, self.RULE_catchType) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1206 + self.qualifiedName() + self.state = 1211 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==107: + self.state = 1207 + self.match(JavaParser.BITOR) + self.state = 1208 + self.qualifiedName() + self.state = 1213 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class FinallyBlockContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def FINALLY(self): + return self.getToken(JavaParser.FINALLY, 0) + + def block(self): + return self.getTypedRuleContext(JavaParser.BlockContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_finallyBlock + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFinallyBlock" ): + listener.enterFinallyBlock(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFinallyBlock" ): + listener.exitFinallyBlock(self) + + + + + def finallyBlock(self): + + localctx = JavaParser.FinallyBlockContext(self, self._ctx, self.state) + self.enterRule(localctx, 174, self.RULE_finallyBlock) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1214 + self.match(JavaParser.FINALLY) + self.state = 1215 + self.block() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ResourceSpecificationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LPAREN(self): + return self.getToken(JavaParser.LPAREN, 0) + + def resources(self): + return self.getTypedRuleContext(JavaParser.ResourcesContext,0) + + + def RPAREN(self): + return self.getToken(JavaParser.RPAREN, 0) + + def SEMI(self): + return self.getToken(JavaParser.SEMI, 0) + + def getRuleIndex(self): + return JavaParser.RULE_resourceSpecification + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterResourceSpecification" ): + listener.enterResourceSpecification(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitResourceSpecification" ): + listener.exitResourceSpecification(self) + + + + + def resourceSpecification(self): + + localctx = JavaParser.ResourceSpecificationContext(self, self._ctx, self.state) + self.enterRule(localctx, 176, self.RULE_resourceSpecification) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1217 + self.match(JavaParser.LPAREN) + self.state = 1218 + self.resources() + self.state = 1220 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==84: + self.state = 1219 + self.match(JavaParser.SEMI) + + + self.state = 1222 + self.match(JavaParser.RPAREN) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ResourcesContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def resource(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ResourceContext) + else: + return self.getTypedRuleContext(JavaParser.ResourceContext,i) + + + def SEMI(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.SEMI) + else: + return self.getToken(JavaParser.SEMI, i) + + def getRuleIndex(self): + return JavaParser.RULE_resources + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterResources" ): + listener.enterResources(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitResources" ): + listener.exitResources(self) + + + + + def resources(self): + + localctx = JavaParser.ResourcesContext(self, self._ctx, self.state) + self.enterRule(localctx, 178, self.RULE_resources) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1224 + self.resource() + self.state = 1229 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,142,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1225 + self.match(JavaParser.SEMI) + self.state = 1226 + self.resource() + self.state = 1231 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,142,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ResourceContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def ASSIGN(self): + return self.getToken(JavaParser.ASSIGN, 0) + + def expression(self): + return self.getTypedRuleContext(JavaParser.ExpressionContext,0) + + + def classOrInterfaceType(self): + return self.getTypedRuleContext(JavaParser.ClassOrInterfaceTypeContext,0) + + + def variableDeclaratorId(self): + return self.getTypedRuleContext(JavaParser.VariableDeclaratorIdContext,0) + + + def VAR(self): + return self.getToken(JavaParser.VAR, 0) + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def variableModifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.VariableModifierContext) + else: + return self.getTypedRuleContext(JavaParser.VariableModifierContext,i) + + + def qualifiedName(self): + return self.getTypedRuleContext(JavaParser.QualifiedNameContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_resource + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterResource" ): + listener.enterResource(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitResource" ): + listener.exitResource(self) + + + + + def resource(self): + + localctx = JavaParser.ResourceContext(self, self._ctx, self.state) + self.enterRule(localctx, 180, self.RULE_resource) + try: + self.state = 1249 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,145,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1235 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,143,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1232 + self.variableModifier() + self.state = 1237 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,143,self._ctx) + + self.state = 1243 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,144,self._ctx) + if la_ == 1: + self.state = 1238 + self.classOrInterfaceType() + self.state = 1239 + self.variableDeclaratorId() + pass + + elif la_ == 2: + self.state = 1241 + self.match(JavaParser.VAR) + self.state = 1242 + self.identifier() + pass + + + self.state = 1245 + self.match(JavaParser.ASSIGN) + self.state = 1246 + self.expression(0) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1248 + self.qualifiedName() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class SwitchBlockStatementGroupContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def switchLabel(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.SwitchLabelContext) + else: + return self.getTypedRuleContext(JavaParser.SwitchLabelContext,i) + + + def blockStatement(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.BlockStatementContext) + else: + return self.getTypedRuleContext(JavaParser.BlockStatementContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_switchBlockStatementGroup + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSwitchBlockStatementGroup" ): + listener.enterSwitchBlockStatementGroup(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSwitchBlockStatementGroup" ): + listener.exitSwitchBlockStatementGroup(self) + + + + + def switchBlockStatementGroup(self): + + localctx = JavaParser.SwitchBlockStatementGroupContext(self, self._ctx, self.state) + self.enterRule(localctx, 182, self.RULE_switchBlockStatementGroup) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1252 + self._errHandler.sync(self) + _la = self._input.LA(1) + while True: + self.state = 1251 + self.switchLabel() + self.state = 1254 + self._errHandler.sync(self) + _la = self._input.LA(1) + if not (_la==6 or _la==12): + break + + self.state = 1257 + self._errHandler.sync(self) + _la = self._input.LA(1) + while True: + self.state = 1256 + self.blockStatement() + self.state = 1259 + self._errHandler.sync(self) + _la = self._input.LA(1) + if not (((((_la - 1)) & ~0x3f) == 0 and ((1 << (_la - 1)) & -334254282492513) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & -8935141145188974593) != 0)): + break + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class SwitchLabelContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + self.constantExpression = None # ExpressionContext + self.enumConstantName = None # Token + self.varName = None # IdentifierContext + + def CASE(self): + return self.getToken(JavaParser.CASE, 0) + + def COLON(self): + return self.getToken(JavaParser.COLON, 0) + + def typeType(self): + return self.getTypedRuleContext(JavaParser.TypeTypeContext,0) + + + def expression(self): + return self.getTypedRuleContext(JavaParser.ExpressionContext,0) + + + def IDENTIFIER(self): + return self.getToken(JavaParser.IDENTIFIER, 0) + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def DEFAULT(self): + return self.getToken(JavaParser.DEFAULT, 0) + + def getRuleIndex(self): + return JavaParser.RULE_switchLabel + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSwitchLabel" ): + listener.enterSwitchLabel(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSwitchLabel" ): + listener.exitSwitchLabel(self) + + + + + def switchLabel(self): + + localctx = JavaParser.SwitchLabelContext(self, self._ctx, self.state) + self.enterRule(localctx, 184, self.RULE_switchLabel) + try: + self.state = 1272 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [6]: + self.enterOuterAlt(localctx, 1) + self.state = 1261 + self.match(JavaParser.CASE) + self.state = 1267 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,148,self._ctx) + if la_ == 1: + self.state = 1262 + localctx.constantExpression = self.expression(0) + pass + + elif la_ == 2: + self.state = 1263 + localctx.enumConstantName = self.match(JavaParser.IDENTIFIER) + pass + + elif la_ == 3: + self.state = 1264 + self.typeType() + self.state = 1265 + localctx.varName = self.identifier() + pass + + + self.state = 1269 + self.match(JavaParser.COLON) + pass + elif token in [12]: + self.enterOuterAlt(localctx, 2) + self.state = 1270 + self.match(JavaParser.DEFAULT) + self.state = 1271 + self.match(JavaParser.COLON) + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ForControlContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + self.forUpdate = None # ExpressionListContext + + def enhancedForControl(self): + return self.getTypedRuleContext(JavaParser.EnhancedForControlContext,0) + + + def SEMI(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.SEMI) + else: + return self.getToken(JavaParser.SEMI, i) + + def forInit(self): + return self.getTypedRuleContext(JavaParser.ForInitContext,0) + + + def expression(self): + return self.getTypedRuleContext(JavaParser.ExpressionContext,0) + + + def expressionList(self): + return self.getTypedRuleContext(JavaParser.ExpressionListContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_forControl + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterForControl" ): + listener.enterForControl(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitForControl" ): + listener.exitForControl(self) + + + + + def forControl(self): + + localctx = JavaParser.ForControlContext(self, self._ctx, self.state) + self.enterRule(localctx, 186, self.RULE_forControl) + self._la = 0 # Token type + try: + self.state = 1286 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,153,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1274 + self.enhancedForControl() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1276 + self._errHandler.sync(self) + _la = self._input.LA(1) + if ((((_la - 3)) & ~0x3f) == 0 and ((1 << (_la - 3)) & 9223127275610998821) != 0) or ((((_la - 67)) & ~0x3f) == 0 and ((1 << (_la - 67)) & 2377900732130004991) != 0): + self.state = 1275 + self.forInit() + + + self.state = 1278 + self.match(JavaParser.SEMI) + self.state = 1280 + self._errHandler.sync(self) + _la = self._input.LA(1) + if ((((_la - 3)) & ~0x3f) == 0 and ((1 << (_la - 3)) & 9223127275610966053) != 0) or ((((_la - 67)) & ~0x3f) == 0 and ((1 << (_la - 67)) & 2377900732130004991) != 0): + self.state = 1279 + self.expression(0) + + + self.state = 1282 + self.match(JavaParser.SEMI) + self.state = 1284 + self._errHandler.sync(self) + _la = self._input.LA(1) + if ((((_la - 3)) & ~0x3f) == 0 and ((1 << (_la - 3)) & 9223127275610966053) != 0) or ((((_la - 67)) & ~0x3f) == 0 and ((1 << (_la - 67)) & 2377900732130004991) != 0): + self.state = 1283 + localctx.forUpdate = self.expressionList() + + + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ForInitContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def localVariableDeclaration(self): + return self.getTypedRuleContext(JavaParser.LocalVariableDeclarationContext,0) + + + def expressionList(self): + return self.getTypedRuleContext(JavaParser.ExpressionListContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_forInit + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterForInit" ): + listener.enterForInit(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitForInit" ): + listener.exitForInit(self) + + + + + def forInit(self): + + localctx = JavaParser.ForInitContext(self, self._ctx, self.state) + self.enterRule(localctx, 188, self.RULE_forInit) + try: + self.state = 1290 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,154,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1288 + self.localVariableDeclaration() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1289 + self.expressionList() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class EnhancedForControlContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def variableDeclaratorId(self): + return self.getTypedRuleContext(JavaParser.VariableDeclaratorIdContext,0) + + + def COLON(self): + return self.getToken(JavaParser.COLON, 0) + + def expression(self): + return self.getTypedRuleContext(JavaParser.ExpressionContext,0) + + + def typeType(self): + return self.getTypedRuleContext(JavaParser.TypeTypeContext,0) + + + def VAR(self): + return self.getToken(JavaParser.VAR, 0) + + def variableModifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.VariableModifierContext) + else: + return self.getTypedRuleContext(JavaParser.VariableModifierContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_enhancedForControl + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEnhancedForControl" ): + listener.enterEnhancedForControl(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEnhancedForControl" ): + listener.exitEnhancedForControl(self) + + + + + def enhancedForControl(self): + + localctx = JavaParser.EnhancedForControlContext(self, self._ctx, self.state) + self.enterRule(localctx, 190, self.RULE_enhancedForControl) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1295 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,155,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1292 + self.variableModifier() + self.state = 1297 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,155,self._ctx) + + self.state = 1300 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,156,self._ctx) + if la_ == 1: + self.state = 1298 + self.typeType() + pass + + elif la_ == 2: + self.state = 1299 + self.match(JavaParser.VAR) + pass + + + self.state = 1302 + self.variableDeclaratorId() + self.state = 1303 + self.match(JavaParser.COLON) + self.state = 1304 + self.expression(0) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ParExpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LPAREN(self): + return self.getToken(JavaParser.LPAREN, 0) + + def expression(self): + return self.getTypedRuleContext(JavaParser.ExpressionContext,0) + + + def RPAREN(self): + return self.getToken(JavaParser.RPAREN, 0) + + def getRuleIndex(self): + return JavaParser.RULE_parExpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterParExpression" ): + listener.enterParExpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitParExpression" ): + listener.exitParExpression(self) + + + + + def parExpression(self): + + localctx = JavaParser.ParExpressionContext(self, self._ctx, self.state) + self.enterRule(localctx, 192, self.RULE_parExpression) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1306 + self.match(JavaParser.LPAREN) + self.state = 1307 + self.expression(0) + self.state = 1308 + self.match(JavaParser.RPAREN) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ExpressionListContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def expression(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ExpressionContext) + else: + return self.getTypedRuleContext(JavaParser.ExpressionContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.COMMA) + else: + return self.getToken(JavaParser.COMMA, i) + + def getRuleIndex(self): + return JavaParser.RULE_expressionList + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExpressionList" ): + listener.enterExpressionList(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExpressionList" ): + listener.exitExpressionList(self) + + + + + def expressionList(self): + + localctx = JavaParser.ExpressionListContext(self, self._ctx, self.state) + self.enterRule(localctx, 194, self.RULE_expressionList) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1310 + self.expression(0) + self.state = 1315 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==85: + self.state = 1311 + self.match(JavaParser.COMMA) + self.state = 1312 + self.expression(0) + self.state = 1317 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class MethodCallContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def arguments(self): + return self.getTypedRuleContext(JavaParser.ArgumentsContext,0) + + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def THIS(self): + return self.getToken(JavaParser.THIS, 0) + + def SUPER(self): + return self.getToken(JavaParser.SUPER, 0) + + def getRuleIndex(self): + return JavaParser.RULE_methodCall + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMethodCall" ): + listener.enterMethodCall(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMethodCall" ): + listener.exitMethodCall(self) + + + + + def methodCall(self): + + localctx = JavaParser.MethodCallContext(self, self._ctx, self.state) + self.enterRule(localctx, 196, self.RULE_methodCall) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1321 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 128]: + self.state = 1318 + self.identifier() + pass + elif token in [43]: + self.state = 1319 + self.match(JavaParser.THIS) + pass + elif token in [40]: + self.state = 1320 + self.match(JavaParser.SUPER) + pass + else: + raise NoViableAltException(self) + + self.state = 1323 + self.arguments() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ExpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + self.prefix = None # Token + self.bop = None # Token + self.postfix = None # Token + + def primary(self): + return self.getTypedRuleContext(JavaParser.PrimaryContext,0) + + + def methodCall(self): + return self.getTypedRuleContext(JavaParser.MethodCallContext,0) + + + def typeType(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.TypeTypeContext) + else: + return self.getTypedRuleContext(JavaParser.TypeTypeContext,i) + + + def COLONCOLON(self): + return self.getToken(JavaParser.COLONCOLON, 0) + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def NEW(self): + return self.getToken(JavaParser.NEW, 0) + + def typeArguments(self): + return self.getTypedRuleContext(JavaParser.TypeArgumentsContext,0) + + + def classType(self): + return self.getTypedRuleContext(JavaParser.ClassTypeContext,0) + + + def switchExpression(self): + return self.getTypedRuleContext(JavaParser.SwitchExpressionContext,0) + + + def expression(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ExpressionContext) + else: + return self.getTypedRuleContext(JavaParser.ExpressionContext,i) + + + def ADD(self): + return self.getToken(JavaParser.ADD, 0) + + def SUB(self): + return self.getToken(JavaParser.SUB, 0) + + def INC(self): + return self.getToken(JavaParser.INC, 0) + + def DEC(self): + return self.getToken(JavaParser.DEC, 0) + + def TILDE(self): + return self.getToken(JavaParser.TILDE, 0) + + def BANG(self): + return self.getToken(JavaParser.BANG, 0) + + def LPAREN(self): + return self.getToken(JavaParser.LPAREN, 0) + + def RPAREN(self): + return self.getToken(JavaParser.RPAREN, 0) + + def annotation(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.AnnotationContext) + else: + return self.getTypedRuleContext(JavaParser.AnnotationContext,i) + + + def BITAND(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.BITAND) + else: + return self.getToken(JavaParser.BITAND, i) + + def creator(self): + return self.getTypedRuleContext(JavaParser.CreatorContext,0) + + + def lambdaExpression(self): + return self.getTypedRuleContext(JavaParser.LambdaExpressionContext,0) + + + def MUL(self): + return self.getToken(JavaParser.MUL, 0) + + def DIV(self): + return self.getToken(JavaParser.DIV, 0) + + def MOD(self): + return self.getToken(JavaParser.MOD, 0) + + def LT(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.LT) + else: + return self.getToken(JavaParser.LT, i) + + def GT(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.GT) + else: + return self.getToken(JavaParser.GT, i) + + def LE(self): + return self.getToken(JavaParser.LE, 0) + + def GE(self): + return self.getToken(JavaParser.GE, 0) + + def EQUAL(self): + return self.getToken(JavaParser.EQUAL, 0) + + def NOTEQUAL(self): + return self.getToken(JavaParser.NOTEQUAL, 0) + + def CARET(self): + return self.getToken(JavaParser.CARET, 0) + + def BITOR(self): + return self.getToken(JavaParser.BITOR, 0) + + def AND(self): + return self.getToken(JavaParser.AND, 0) + + def OR(self): + return self.getToken(JavaParser.OR, 0) + + def COLON(self): + return self.getToken(JavaParser.COLON, 0) + + def QUESTION(self): + return self.getToken(JavaParser.QUESTION, 0) + + def ASSIGN(self): + return self.getToken(JavaParser.ASSIGN, 0) + + def ADD_ASSIGN(self): + return self.getToken(JavaParser.ADD_ASSIGN, 0) + + def SUB_ASSIGN(self): + return self.getToken(JavaParser.SUB_ASSIGN, 0) + + def MUL_ASSIGN(self): + return self.getToken(JavaParser.MUL_ASSIGN, 0) + + def DIV_ASSIGN(self): + return self.getToken(JavaParser.DIV_ASSIGN, 0) + + def AND_ASSIGN(self): + return self.getToken(JavaParser.AND_ASSIGN, 0) + + def OR_ASSIGN(self): + return self.getToken(JavaParser.OR_ASSIGN, 0) + + def XOR_ASSIGN(self): + return self.getToken(JavaParser.XOR_ASSIGN, 0) + + def RSHIFT_ASSIGN(self): + return self.getToken(JavaParser.RSHIFT_ASSIGN, 0) + + def URSHIFT_ASSIGN(self): + return self.getToken(JavaParser.URSHIFT_ASSIGN, 0) + + def LSHIFT_ASSIGN(self): + return self.getToken(JavaParser.LSHIFT_ASSIGN, 0) + + def MOD_ASSIGN(self): + return self.getToken(JavaParser.MOD_ASSIGN, 0) + + def LBRACK(self): + return self.getToken(JavaParser.LBRACK, 0) + + def RBRACK(self): + return self.getToken(JavaParser.RBRACK, 0) + + def DOT(self): + return self.getToken(JavaParser.DOT, 0) + + def THIS(self): + return self.getToken(JavaParser.THIS, 0) + + def innerCreator(self): + return self.getTypedRuleContext(JavaParser.InnerCreatorContext,0) + + + def SUPER(self): + return self.getToken(JavaParser.SUPER, 0) + + def superSuffix(self): + return self.getTypedRuleContext(JavaParser.SuperSuffixContext,0) + + + def explicitGenericInvocation(self): + return self.getTypedRuleContext(JavaParser.ExplicitGenericInvocationContext,0) + + + def nonWildcardTypeArguments(self): + return self.getTypedRuleContext(JavaParser.NonWildcardTypeArgumentsContext,0) + + + def INSTANCEOF(self): + return self.getToken(JavaParser.INSTANCEOF, 0) + + def pattern(self): + return self.getTypedRuleContext(JavaParser.PatternContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_expression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExpression" ): + listener.enterExpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExpression" ): + listener.exitExpression(self) + + + + def expression(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = JavaParser.ExpressionContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 198 + self.enterRecursionRule(localctx, 198, self.RULE_expression, _p) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1368 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,164,self._ctx) + if la_ == 1: + self.state = 1326 + self.primary() + pass + + elif la_ == 2: + self.state = 1327 + self.methodCall() + pass + + elif la_ == 3: + self.state = 1328 + self.typeType() + self.state = 1329 + self.match(JavaParser.COLONCOLON) + self.state = 1335 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 89, 128]: + self.state = 1331 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==89: + self.state = 1330 + self.typeArguments() + + + self.state = 1333 + self.identifier() + pass + elif token in [31]: + self.state = 1334 + self.match(JavaParser.NEW) + pass + else: + raise NoViableAltException(self) + + pass + + elif la_ == 4: + self.state = 1337 + self.classType() + self.state = 1338 + self.match(JavaParser.COLONCOLON) + self.state = 1340 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==89: + self.state = 1339 + self.typeArguments() + + + self.state = 1342 + self.match(JavaParser.NEW) + pass + + elif la_ == 5: + self.state = 1344 + self.switchExpression() + pass + + elif la_ == 6: + self.state = 1345 + localctx.prefix = self._input.LT(1) + _la = self._input.LA(1) + if not(((((_la - 90)) & ~0x3f) == 0 and ((1 << (_la - 90)) & 15363) != 0)): + localctx.prefix = self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + self.state = 1346 + self.expression(17) + pass + + elif la_ == 7: + self.state = 1347 + self.match(JavaParser.LPAREN) + self.state = 1351 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,162,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1348 + self.annotation() + self.state = 1353 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,162,self._ctx) + + self.state = 1354 + self.typeType() + self.state = 1359 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==106: + self.state = 1355 + self.match(JavaParser.BITAND) + self.state = 1356 + self.typeType() + self.state = 1361 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 1362 + self.match(JavaParser.RPAREN) + self.state = 1363 + self.expression(16) + pass + + elif la_ == 8: + self.state = 1365 + self.match(JavaParser.NEW) + self.state = 1366 + self.creator() + pass + + elif la_ == 9: + self.state = 1367 + self.lambdaExpression() + pass + + + self._ctx.stop = self._input.LT(-1) + self.state = 1453 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,171,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + self.state = 1451 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,170,self._ctx) + if la_ == 1: + localctx = JavaParser.ExpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) + self.state = 1370 + if not self.precpred(self._ctx, 14): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 14)") + self.state = 1371 + localctx.bop = self._input.LT(1) + _la = self._input.LA(1) + if not(((((_la - 104)) & ~0x3f) == 0 and ((1 << (_la - 104)) & 35) != 0)): + localctx.bop = self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + self.state = 1372 + self.expression(15) + pass + + elif la_ == 2: + localctx = JavaParser.ExpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) + self.state = 1373 + if not self.precpred(self._ctx, 13): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 13)") + self.state = 1374 + localctx.bop = self._input.LT(1) + _la = self._input.LA(1) + if not(_la==102 or _la==103): + localctx.bop = self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + self.state = 1375 + self.expression(14) + pass + + elif la_ == 3: + localctx = JavaParser.ExpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) + self.state = 1376 + if not self.precpred(self._ctx, 12): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 12)") + self.state = 1384 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,165,self._ctx) + if la_ == 1: + self.state = 1377 + self.match(JavaParser.LT) + self.state = 1378 + self.match(JavaParser.LT) + pass + + elif la_ == 2: + self.state = 1379 + self.match(JavaParser.GT) + self.state = 1380 + self.match(JavaParser.GT) + self.state = 1381 + self.match(JavaParser.GT) + pass + + elif la_ == 3: + self.state = 1382 + self.match(JavaParser.GT) + self.state = 1383 + self.match(JavaParser.GT) + pass + + + self.state = 1386 + self.expression(13) + pass + + elif la_ == 4: + localctx = JavaParser.ExpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) + self.state = 1387 + if not self.precpred(self._ctx, 11): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 11)") + self.state = 1388 + localctx.bop = self._input.LT(1) + _la = self._input.LA(1) + if not(((((_la - 88)) & ~0x3f) == 0 and ((1 << (_la - 88)) & 387) != 0)): + localctx.bop = self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + self.state = 1389 + self.expression(12) + pass + + elif la_ == 5: + localctx = JavaParser.ExpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) + self.state = 1390 + if not self.precpred(self._ctx, 9): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 9)") + self.state = 1391 + localctx.bop = self._input.LT(1) + _la = self._input.LA(1) + if not(_la==94 or _la==97): + localctx.bop = self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + self.state = 1392 + self.expression(10) + pass + + elif la_ == 6: + localctx = JavaParser.ExpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) + self.state = 1393 + if not self.precpred(self._ctx, 8): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 8)") + self.state = 1394 + localctx.bop = self.match(JavaParser.BITAND) + self.state = 1395 + self.expression(9) + pass + + elif la_ == 7: + localctx = JavaParser.ExpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) + self.state = 1396 + if not self.precpred(self._ctx, 7): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 7)") + self.state = 1397 + localctx.bop = self.match(JavaParser.CARET) + self.state = 1398 + self.expression(8) + pass + + elif la_ == 8: + localctx = JavaParser.ExpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) + self.state = 1399 + if not self.precpred(self._ctx, 6): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 6)") + self.state = 1400 + localctx.bop = self.match(JavaParser.BITOR) + self.state = 1401 + self.expression(7) + pass + + elif la_ == 9: + localctx = JavaParser.ExpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) + self.state = 1402 + if not self.precpred(self._ctx, 5): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 5)") + self.state = 1403 + localctx.bop = self.match(JavaParser.AND) + self.state = 1404 + self.expression(6) + pass + + elif la_ == 10: + localctx = JavaParser.ExpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) + self.state = 1405 + if not self.precpred(self._ctx, 4): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 4)") + self.state = 1406 + localctx.bop = self.match(JavaParser.OR) + self.state = 1407 + self.expression(5) + pass + + elif la_ == 11: + localctx = JavaParser.ExpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) + self.state = 1408 + if not self.precpred(self._ctx, 3): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") + self.state = 1409 + localctx.bop = self.match(JavaParser.QUESTION) + self.state = 1410 + self.expression(0) + self.state = 1411 + self.match(JavaParser.COLON) + self.state = 1412 + self.expression(3) + pass + + elif la_ == 12: + localctx = JavaParser.ExpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) + self.state = 1414 + if not self.precpred(self._ctx, 2): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") + self.state = 1415 + localctx.bop = self._input.LT(1) + _la = self._input.LA(1) + if not(((((_la - 87)) & ~0x3f) == 0 and ((1 << (_la - 87)) & 17171480577) != 0)): + localctx.bop = self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + self.state = 1416 + self.expression(2) + pass + + elif la_ == 13: + localctx = JavaParser.ExpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) + self.state = 1417 + if not self.precpred(self._ctx, 25): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 25)") + self.state = 1418 + self.match(JavaParser.LBRACK) + self.state = 1419 + self.expression(0) + self.state = 1420 + self.match(JavaParser.RBRACK) + pass + + elif la_ == 14: + localctx = JavaParser.ExpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) + self.state = 1422 + if not self.precpred(self._ctx, 24): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 24)") + self.state = 1423 + localctx.bop = self.match(JavaParser.DOT) + self.state = 1435 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,167,self._ctx) + if la_ == 1: + self.state = 1424 + self.identifier() + pass + + elif la_ == 2: + self.state = 1425 + self.methodCall() + pass + + elif la_ == 3: + self.state = 1426 + self.match(JavaParser.THIS) + pass + + elif la_ == 4: + self.state = 1427 + self.match(JavaParser.NEW) + self.state = 1429 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==89: + self.state = 1428 + self.nonWildcardTypeArguments() + + + self.state = 1431 + self.innerCreator() + pass + + elif la_ == 5: + self.state = 1432 + self.match(JavaParser.SUPER) + self.state = 1433 + self.superSuffix() + pass + + elif la_ == 6: + self.state = 1434 + self.explicitGenericInvocation() + pass + + + pass + + elif la_ == 15: + localctx = JavaParser.ExpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) + self.state = 1437 + if not self.precpred(self._ctx, 22): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 22)") + self.state = 1438 + self.match(JavaParser.COLONCOLON) + self.state = 1440 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==89: + self.state = 1439 + self.typeArguments() + + + self.state = 1442 + self.identifier() + pass + + elif la_ == 16: + localctx = JavaParser.ExpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) + self.state = 1443 + if not self.precpred(self._ctx, 18): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 18)") + self.state = 1444 + localctx.postfix = self._input.LT(1) + _la = self._input.LA(1) + if not(_la==100 or _la==101): + localctx.postfix = self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + pass + + elif la_ == 17: + localctx = JavaParser.ExpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) + self.state = 1445 + if not self.precpred(self._ctx, 10): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 10)") + self.state = 1446 + localctx.bop = self.match(JavaParser.INSTANCEOF) + self.state = 1449 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,169,self._ctx) + if la_ == 1: + self.state = 1447 + self.typeType() + pass + + elif la_ == 2: + self.state = 1448 + self.pattern() + pass + + + pass + + + self.state = 1455 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,171,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class PatternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeType(self): + return self.getTypedRuleContext(JavaParser.TypeTypeContext,0) + + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def variableModifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.VariableModifierContext) + else: + return self.getTypedRuleContext(JavaParser.VariableModifierContext,i) + + + def annotation(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.AnnotationContext) + else: + return self.getTypedRuleContext(JavaParser.AnnotationContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPattern" ): + listener.enterPattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPattern" ): + listener.exitPattern(self) + + + + + def pattern(self): + + localctx = JavaParser.PatternContext(self, self._ctx, self.state) + self.enterRule(localctx, 200, self.RULE_pattern) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1459 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,172,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1456 + self.variableModifier() + self.state = 1461 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,172,self._ctx) + + self.state = 1462 + self.typeType() + self.state = 1466 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,173,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1463 + self.annotation() + self.state = 1468 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,173,self._ctx) + + self.state = 1469 + self.identifier() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class LambdaExpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def lambdaParameters(self): + return self.getTypedRuleContext(JavaParser.LambdaParametersContext,0) + + + def ARROW(self): + return self.getToken(JavaParser.ARROW, 0) + + def lambdaBody(self): + return self.getTypedRuleContext(JavaParser.LambdaBodyContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_lambdaExpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLambdaExpression" ): + listener.enterLambdaExpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLambdaExpression" ): + listener.exitLambdaExpression(self) + + + + + def lambdaExpression(self): + + localctx = JavaParser.LambdaExpressionContext(self, self._ctx, self.state) + self.enterRule(localctx, 202, self.RULE_lambdaExpression) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1471 + self.lambdaParameters() + self.state = 1472 + self.match(JavaParser.ARROW) + self.state = 1473 + self.lambdaBody() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class LambdaParametersContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def identifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.IdentifierContext) + else: + return self.getTypedRuleContext(JavaParser.IdentifierContext,i) + + + def LPAREN(self): + return self.getToken(JavaParser.LPAREN, 0) + + def RPAREN(self): + return self.getToken(JavaParser.RPAREN, 0) + + def formalParameterList(self): + return self.getTypedRuleContext(JavaParser.FormalParameterListContext,0) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.COMMA) + else: + return self.getToken(JavaParser.COMMA, i) + + def lambdaLVTIList(self): + return self.getTypedRuleContext(JavaParser.LambdaLVTIListContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_lambdaParameters + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLambdaParameters" ): + listener.enterLambdaParameters(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLambdaParameters" ): + listener.exitLambdaParameters(self) + + + + + def lambdaParameters(self): + + localctx = JavaParser.LambdaParametersContext(self, self._ctx, self.state) + self.enterRule(localctx, 204, self.RULE_lambdaParameters) + self._la = 0 # Token type + try: + self.state = 1497 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,177,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1475 + self.identifier() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1476 + self.match(JavaParser.LPAREN) + self.state = 1478 + self._errHandler.sync(self) + _la = self._input.LA(1) + if ((((_la - 3)) & ~0x3f) == 0 and ((1 << (_la - 3)) & 9223090579141986341) != 0) or _la==123 or _la==128: + self.state = 1477 + self.formalParameterList() + + + self.state = 1480 + self.match(JavaParser.RPAREN) + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1481 + self.match(JavaParser.LPAREN) + self.state = 1482 + self.identifier() + self.state = 1487 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==85: + self.state = 1483 + self.match(JavaParser.COMMA) + self.state = 1484 + self.identifier() + self.state = 1489 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 1490 + self.match(JavaParser.RPAREN) + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 1492 + self.match(JavaParser.LPAREN) + self.state = 1494 + self._errHandler.sync(self) + _la = self._input.LA(1) + if ((((_la - 18)) & ~0x3f) == 0 and ((1 << (_la - 18)) & 281466386776065) != 0) or _la==123 or _la==128: + self.state = 1493 + self.lambdaLVTIList() + + + self.state = 1496 + self.match(JavaParser.RPAREN) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class LambdaBodyContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def expression(self): + return self.getTypedRuleContext(JavaParser.ExpressionContext,0) + + + def block(self): + return self.getTypedRuleContext(JavaParser.BlockContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_lambdaBody + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLambdaBody" ): + listener.enterLambdaBody(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLambdaBody" ): + listener.exitLambdaBody(self) + + + + + def lambdaBody(self): + + localctx = JavaParser.LambdaBodyContext(self, self._ctx, self.state) + self.enterRule(localctx, 206, self.RULE_lambdaBody) + try: + self.state = 1501 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [3, 5, 8, 14, 20, 27, 29, 31, 37, 40, 41, 43, 48, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 89, 90, 91, 100, 101, 102, 103, 123, 128]: + self.enterOuterAlt(localctx, 1) + self.state = 1499 + self.expression(0) + pass + elif token in [80]: + self.enterOuterAlt(localctx, 2) + self.state = 1500 + self.block() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class PrimaryContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LPAREN(self): + return self.getToken(JavaParser.LPAREN, 0) + + def expression(self): + return self.getTypedRuleContext(JavaParser.ExpressionContext,0) + + + def RPAREN(self): + return self.getToken(JavaParser.RPAREN, 0) + + def THIS(self): + return self.getToken(JavaParser.THIS, 0) + + def SUPER(self): + return self.getToken(JavaParser.SUPER, 0) + + def literal(self): + return self.getTypedRuleContext(JavaParser.LiteralContext,0) + + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def typeTypeOrVoid(self): + return self.getTypedRuleContext(JavaParser.TypeTypeOrVoidContext,0) + + + def DOT(self): + return self.getToken(JavaParser.DOT, 0) + + def CLASS(self): + return self.getToken(JavaParser.CLASS, 0) + + def nonWildcardTypeArguments(self): + return self.getTypedRuleContext(JavaParser.NonWildcardTypeArgumentsContext,0) + + + def explicitGenericInvocationSuffix(self): + return self.getTypedRuleContext(JavaParser.ExplicitGenericInvocationSuffixContext,0) + + + def arguments(self): + return self.getTypedRuleContext(JavaParser.ArgumentsContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_primary + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPrimary" ): + listener.enterPrimary(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPrimary" ): + listener.exitPrimary(self) + + + + + def primary(self): + + localctx = JavaParser.PrimaryContext(self, self._ctx, self.state) + self.enterRule(localctx, 208, self.RULE_primary) + try: + self.state = 1521 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,180,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1503 + self.match(JavaParser.LPAREN) + self.state = 1504 + self.expression(0) + self.state = 1505 + self.match(JavaParser.RPAREN) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1507 + self.match(JavaParser.THIS) + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1508 + self.match(JavaParser.SUPER) + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 1509 + self.literal() + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 1510 + self.identifier() + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 1511 + self.typeTypeOrVoid() + self.state = 1512 + self.match(JavaParser.DOT) + self.state = 1513 + self.match(JavaParser.CLASS) + pass + + elif la_ == 7: + self.enterOuterAlt(localctx, 7) + self.state = 1515 + self.nonWildcardTypeArguments() + self.state = 1519 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [40, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 128]: + self.state = 1516 + self.explicitGenericInvocationSuffix() + pass + elif token in [43]: + self.state = 1517 + self.match(JavaParser.THIS) + self.state = 1518 + self.arguments() + pass + else: + raise NoViableAltException(self) + + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class SwitchExpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def SWITCH(self): + return self.getToken(JavaParser.SWITCH, 0) + + def parExpression(self): + return self.getTypedRuleContext(JavaParser.ParExpressionContext,0) + + + def LBRACE(self): + return self.getToken(JavaParser.LBRACE, 0) + + def RBRACE(self): + return self.getToken(JavaParser.RBRACE, 0) + + def switchLabeledRule(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.SwitchLabeledRuleContext) + else: + return self.getTypedRuleContext(JavaParser.SwitchLabeledRuleContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_switchExpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSwitchExpression" ): + listener.enterSwitchExpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSwitchExpression" ): + listener.exitSwitchExpression(self) + + + + + def switchExpression(self): + + localctx = JavaParser.SwitchExpressionContext(self, self._ctx, self.state) + self.enterRule(localctx, 210, self.RULE_switchExpression) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1523 + self.match(JavaParser.SWITCH) + self.state = 1524 + self.parExpression() + self.state = 1525 + self.match(JavaParser.LBRACE) + self.state = 1529 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==6 or _la==12: + self.state = 1526 + self.switchLabeledRule() + self.state = 1531 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 1532 + self.match(JavaParser.RBRACE) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class SwitchLabeledRuleContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def CASE(self): + return self.getToken(JavaParser.CASE, 0) + + def switchRuleOutcome(self): + return self.getTypedRuleContext(JavaParser.SwitchRuleOutcomeContext,0) + + + def ARROW(self): + return self.getToken(JavaParser.ARROW, 0) + + def COLON(self): + return self.getToken(JavaParser.COLON, 0) + + def expressionList(self): + return self.getTypedRuleContext(JavaParser.ExpressionListContext,0) + + + def NULL_LITERAL(self): + return self.getToken(JavaParser.NULL_LITERAL, 0) + + def guardedPattern(self): + return self.getTypedRuleContext(JavaParser.GuardedPatternContext,0) + + + def DEFAULT(self): + return self.getToken(JavaParser.DEFAULT, 0) + + def getRuleIndex(self): + return JavaParser.RULE_switchLabeledRule + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSwitchLabeledRule" ): + listener.enterSwitchLabeledRule(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSwitchLabeledRule" ): + listener.exitSwitchLabeledRule(self) + + + + + def switchLabeledRule(self): + + localctx = JavaParser.SwitchLabeledRuleContext(self, self._ctx, self.state) + self.enterRule(localctx, 212, self.RULE_switchLabeledRule) + self._la = 0 # Token type + try: + self.state = 1545 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [6]: + self.enterOuterAlt(localctx, 1) + self.state = 1534 + self.match(JavaParser.CASE) + self.state = 1538 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,182,self._ctx) + if la_ == 1: + self.state = 1535 + self.expressionList() + pass + + elif la_ == 2: + self.state = 1536 + self.match(JavaParser.NULL_LITERAL) + pass + + elif la_ == 3: + self.state = 1537 + self.guardedPattern(0) + pass + + + self.state = 1540 + _la = self._input.LA(1) + if not(_la==93 or _la==121): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + self.state = 1541 + self.switchRuleOutcome() + pass + elif token in [12]: + self.enterOuterAlt(localctx, 2) + self.state = 1542 + self.match(JavaParser.DEFAULT) + self.state = 1543 + _la = self._input.LA(1) + if not(_la==93 or _la==121): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + self.state = 1544 + self.switchRuleOutcome() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class GuardedPatternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LPAREN(self): + return self.getToken(JavaParser.LPAREN, 0) + + def guardedPattern(self): + return self.getTypedRuleContext(JavaParser.GuardedPatternContext,0) + + + def RPAREN(self): + return self.getToken(JavaParser.RPAREN, 0) + + def typeType(self): + return self.getTypedRuleContext(JavaParser.TypeTypeContext,0) + + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def variableModifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.VariableModifierContext) + else: + return self.getTypedRuleContext(JavaParser.VariableModifierContext,i) + + + def annotation(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.AnnotationContext) + else: + return self.getTypedRuleContext(JavaParser.AnnotationContext,i) + + + def AND(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.AND) + else: + return self.getToken(JavaParser.AND, i) + + def expression(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ExpressionContext) + else: + return self.getTypedRuleContext(JavaParser.ExpressionContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_guardedPattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterGuardedPattern" ): + listener.enterGuardedPattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitGuardedPattern" ): + listener.exitGuardedPattern(self) + + + + def guardedPattern(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = JavaParser.GuardedPatternContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 214 + self.enterRecursionRule(localctx, 214, self.RULE_guardedPattern, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1573 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [78]: + self.state = 1548 + self.match(JavaParser.LPAREN) + self.state = 1549 + self.guardedPattern(0) + self.state = 1550 + self.match(JavaParser.RPAREN) + pass + elif token in [3, 5, 8, 14, 18, 20, 27, 29, 37, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 123, 128]: + self.state = 1555 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,184,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1552 + self.variableModifier() + self.state = 1557 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,184,self._ctx) + + self.state = 1558 + self.typeType() + self.state = 1562 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,185,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1559 + self.annotation() + self.state = 1564 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,185,self._ctx) + + self.state = 1565 + self.identifier() + self.state = 1570 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,186,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1566 + self.match(JavaParser.AND) + self.state = 1567 + self.expression(0) + self.state = 1572 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,186,self._ctx) + + pass + else: + raise NoViableAltException(self) + + self._ctx.stop = self._input.LT(-1) + self.state = 1580 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,188,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = JavaParser.GuardedPatternContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_guardedPattern) + self.state = 1575 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 1576 + self.match(JavaParser.AND) + self.state = 1577 + self.expression(0) + self.state = 1582 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,188,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class SwitchRuleOutcomeContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def block(self): + return self.getTypedRuleContext(JavaParser.BlockContext,0) + + + def blockStatement(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.BlockStatementContext) + else: + return self.getTypedRuleContext(JavaParser.BlockStatementContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_switchRuleOutcome + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSwitchRuleOutcome" ): + listener.enterSwitchRuleOutcome(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSwitchRuleOutcome" ): + listener.exitSwitchRuleOutcome(self) + + + + + def switchRuleOutcome(self): + + localctx = JavaParser.SwitchRuleOutcomeContext(self, self._ctx, self.state) + self.enterRule(localctx, 216, self.RULE_switchRuleOutcome) + self._la = 0 # Token type + try: + self.state = 1590 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,190,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1583 + self.block() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1587 + self._errHandler.sync(self) + _la = self._input.LA(1) + while ((((_la - 1)) & ~0x3f) == 0 and ((1 << (_la - 1)) & -334254282492513) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & -8935141145188974593) != 0): + self.state = 1584 + self.blockStatement() + self.state = 1589 + self._errHandler.sync(self) + _la = self._input.LA(1) + + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ClassTypeContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def classOrInterfaceType(self): + return self.getTypedRuleContext(JavaParser.ClassOrInterfaceTypeContext,0) + + + def DOT(self): + return self.getToken(JavaParser.DOT, 0) + + def annotation(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.AnnotationContext) + else: + return self.getTypedRuleContext(JavaParser.AnnotationContext,i) + + + def typeArguments(self): + return self.getTypedRuleContext(JavaParser.TypeArgumentsContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_classType + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClassType" ): + listener.enterClassType(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClassType" ): + listener.exitClassType(self) + + + + + def classType(self): + + localctx = JavaParser.ClassTypeContext(self, self._ctx, self.state) + self.enterRule(localctx, 218, self.RULE_classType) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1595 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,191,self._ctx) + if la_ == 1: + self.state = 1592 + self.classOrInterfaceType() + self.state = 1593 + self.match(JavaParser.DOT) + + + self.state = 1600 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,192,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1597 + self.annotation() + self.state = 1602 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,192,self._ctx) + + self.state = 1603 + self.identifier() + self.state = 1605 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==89: + self.state = 1604 + self.typeArguments() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class CreatorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def createdName(self): + return self.getTypedRuleContext(JavaParser.CreatedNameContext,0) + + + def classCreatorRest(self): + return self.getTypedRuleContext(JavaParser.ClassCreatorRestContext,0) + + + def nonWildcardTypeArguments(self): + return self.getTypedRuleContext(JavaParser.NonWildcardTypeArgumentsContext,0) + + + def arrayCreatorRest(self): + return self.getTypedRuleContext(JavaParser.ArrayCreatorRestContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_creator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCreator" ): + listener.enterCreator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCreator" ): + listener.exitCreator(self) + + + + + def creator(self): + + localctx = JavaParser.CreatorContext(self, self._ctx, self.state) + self.enterRule(localctx, 220, self.RULE_creator) + self._la = 0 # Token type + try: + self.state = 1616 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,195,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1608 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==89: + self.state = 1607 + self.nonWildcardTypeArguments() + + + self.state = 1610 + self.createdName() + self.state = 1611 + self.classCreatorRest() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1613 + self.createdName() + self.state = 1614 + self.arrayCreatorRest() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class CreatedNameContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def identifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.IdentifierContext) + else: + return self.getTypedRuleContext(JavaParser.IdentifierContext,i) + + + def typeArgumentsOrDiamond(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.TypeArgumentsOrDiamondContext) + else: + return self.getTypedRuleContext(JavaParser.TypeArgumentsOrDiamondContext,i) + + + def DOT(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.DOT) + else: + return self.getToken(JavaParser.DOT, i) + + def primitiveType(self): + return self.getTypedRuleContext(JavaParser.PrimitiveTypeContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_createdName + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCreatedName" ): + listener.enterCreatedName(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCreatedName" ): + listener.exitCreatedName(self) + + + + + def createdName(self): + + localctx = JavaParser.CreatedNameContext(self, self._ctx, self.state) + self.enterRule(localctx, 222, self.RULE_createdName) + self._la = 0 # Token type + try: + self.state = 1633 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 128]: + self.enterOuterAlt(localctx, 1) + self.state = 1618 + self.identifier() + self.state = 1620 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==89: + self.state = 1619 + self.typeArgumentsOrDiamond() + + + self.state = 1629 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==86: + self.state = 1622 + self.match(JavaParser.DOT) + self.state = 1623 + self.identifier() + self.state = 1625 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==89: + self.state = 1624 + self.typeArgumentsOrDiamond() + + + self.state = 1631 + self._errHandler.sync(self) + _la = self._input.LA(1) + + pass + elif token in [3, 5, 8, 14, 20, 27, 29, 37]: + self.enterOuterAlt(localctx, 2) + self.state = 1632 + self.primitiveType() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class InnerCreatorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def classCreatorRest(self): + return self.getTypedRuleContext(JavaParser.ClassCreatorRestContext,0) + + + def nonWildcardTypeArgumentsOrDiamond(self): + return self.getTypedRuleContext(JavaParser.NonWildcardTypeArgumentsOrDiamondContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_innerCreator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterInnerCreator" ): + listener.enterInnerCreator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitInnerCreator" ): + listener.exitInnerCreator(self) + + + + + def innerCreator(self): + + localctx = JavaParser.InnerCreatorContext(self, self._ctx, self.state) + self.enterRule(localctx, 224, self.RULE_innerCreator) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1635 + self.identifier() + self.state = 1637 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==89: + self.state = 1636 + self.nonWildcardTypeArgumentsOrDiamond() + + + self.state = 1639 + self.classCreatorRest() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ArrayCreatorRestContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def arrayInitializer(self): + return self.getTypedRuleContext(JavaParser.ArrayInitializerContext,0) + + + def LBRACK(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.LBRACK) + else: + return self.getToken(JavaParser.LBRACK, i) + + def RBRACK(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.RBRACK) + else: + return self.getToken(JavaParser.RBRACK, i) + + def expression(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.ExpressionContext) + else: + return self.getTypedRuleContext(JavaParser.ExpressionContext,i) + + + def getRuleIndex(self): + return JavaParser.RULE_arrayCreatorRest + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterArrayCreatorRest" ): + listener.enterArrayCreatorRest(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitArrayCreatorRest" ): + listener.exitArrayCreatorRest(self) + + + + + def arrayCreatorRest(self): + + localctx = JavaParser.ArrayCreatorRestContext(self, self._ctx, self.state) + self.enterRule(localctx, 226, self.RULE_arrayCreatorRest) + self._la = 0 # Token type + try: + self.state = 1663 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,204,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1643 + self._errHandler.sync(self) + _la = self._input.LA(1) + while True: + self.state = 1641 + self.match(JavaParser.LBRACK) + self.state = 1642 + self.match(JavaParser.RBRACK) + self.state = 1645 + self._errHandler.sync(self) + _la = self._input.LA(1) + if not (_la==82): + break + + self.state = 1647 + self.arrayInitializer() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1652 + self._errHandler.sync(self) + _alt = 1 + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt == 1: + self.state = 1648 + self.match(JavaParser.LBRACK) + self.state = 1649 + self.expression(0) + self.state = 1650 + self.match(JavaParser.RBRACK) + + else: + raise NoViableAltException(self) + self.state = 1654 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,202,self._ctx) + + self.state = 1660 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,203,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1656 + self.match(JavaParser.LBRACK) + self.state = 1657 + self.match(JavaParser.RBRACK) + self.state = 1662 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,203,self._ctx) + + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ClassCreatorRestContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def arguments(self): + return self.getTypedRuleContext(JavaParser.ArgumentsContext,0) + + + def classBody(self): + return self.getTypedRuleContext(JavaParser.ClassBodyContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_classCreatorRest + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClassCreatorRest" ): + listener.enterClassCreatorRest(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClassCreatorRest" ): + listener.exitClassCreatorRest(self) + + + + + def classCreatorRest(self): + + localctx = JavaParser.ClassCreatorRestContext(self, self._ctx, self.state) + self.enterRule(localctx, 228, self.RULE_classCreatorRest) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1665 + self.arguments() + self.state = 1667 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,205,self._ctx) + if la_ == 1: + self.state = 1666 + self.classBody() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ExplicitGenericInvocationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def nonWildcardTypeArguments(self): + return self.getTypedRuleContext(JavaParser.NonWildcardTypeArgumentsContext,0) + + + def explicitGenericInvocationSuffix(self): + return self.getTypedRuleContext(JavaParser.ExplicitGenericInvocationSuffixContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_explicitGenericInvocation + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExplicitGenericInvocation" ): + listener.enterExplicitGenericInvocation(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExplicitGenericInvocation" ): + listener.exitExplicitGenericInvocation(self) + + + + + def explicitGenericInvocation(self): + + localctx = JavaParser.ExplicitGenericInvocationContext(self, self._ctx, self.state) + self.enterRule(localctx, 230, self.RULE_explicitGenericInvocation) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1669 + self.nonWildcardTypeArguments() + self.state = 1670 + self.explicitGenericInvocationSuffix() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TypeArgumentsOrDiamondContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LT(self): + return self.getToken(JavaParser.LT, 0) + + def GT(self): + return self.getToken(JavaParser.GT, 0) + + def typeArguments(self): + return self.getTypedRuleContext(JavaParser.TypeArgumentsContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_typeArgumentsOrDiamond + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypeArgumentsOrDiamond" ): + listener.enterTypeArgumentsOrDiamond(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypeArgumentsOrDiamond" ): + listener.exitTypeArgumentsOrDiamond(self) + + + + + def typeArgumentsOrDiamond(self): + + localctx = JavaParser.TypeArgumentsOrDiamondContext(self, self._ctx, self.state) + self.enterRule(localctx, 232, self.RULE_typeArgumentsOrDiamond) + try: + self.state = 1675 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,206,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1672 + self.match(JavaParser.LT) + self.state = 1673 + self.match(JavaParser.GT) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1674 + self.typeArguments() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class NonWildcardTypeArgumentsOrDiamondContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LT(self): + return self.getToken(JavaParser.LT, 0) + + def GT(self): + return self.getToken(JavaParser.GT, 0) + + def nonWildcardTypeArguments(self): + return self.getTypedRuleContext(JavaParser.NonWildcardTypeArgumentsContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_nonWildcardTypeArgumentsOrDiamond + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNonWildcardTypeArgumentsOrDiamond" ): + listener.enterNonWildcardTypeArgumentsOrDiamond(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNonWildcardTypeArgumentsOrDiamond" ): + listener.exitNonWildcardTypeArgumentsOrDiamond(self) + + + + + def nonWildcardTypeArgumentsOrDiamond(self): + + localctx = JavaParser.NonWildcardTypeArgumentsOrDiamondContext(self, self._ctx, self.state) + self.enterRule(localctx, 234, self.RULE_nonWildcardTypeArgumentsOrDiamond) + try: + self.state = 1680 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,207,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1677 + self.match(JavaParser.LT) + self.state = 1678 + self.match(JavaParser.GT) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1679 + self.nonWildcardTypeArguments() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class NonWildcardTypeArgumentsContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LT(self): + return self.getToken(JavaParser.LT, 0) + + def typeList(self): + return self.getTypedRuleContext(JavaParser.TypeListContext,0) + + + def GT(self): + return self.getToken(JavaParser.GT, 0) + + def getRuleIndex(self): + return JavaParser.RULE_nonWildcardTypeArguments + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNonWildcardTypeArguments" ): + listener.enterNonWildcardTypeArguments(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNonWildcardTypeArguments" ): + listener.exitNonWildcardTypeArguments(self) + + + + + def nonWildcardTypeArguments(self): + + localctx = JavaParser.NonWildcardTypeArgumentsContext(self, self._ctx, self.state) + self.enterRule(localctx, 236, self.RULE_nonWildcardTypeArguments) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1682 + self.match(JavaParser.LT) + self.state = 1683 + self.typeList() + self.state = 1684 + self.match(JavaParser.GT) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TypeListContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeType(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.TypeTypeContext) + else: + return self.getTypedRuleContext(JavaParser.TypeTypeContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.COMMA) + else: + return self.getToken(JavaParser.COMMA, i) + + def getRuleIndex(self): + return JavaParser.RULE_typeList + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypeList" ): + listener.enterTypeList(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypeList" ): + listener.exitTypeList(self) + + + + + def typeList(self): + + localctx = JavaParser.TypeListContext(self, self._ctx, self.state) + self.enterRule(localctx, 238, self.RULE_typeList) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1686 + self.typeType() + self.state = 1691 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==85: + self.state = 1687 + self.match(JavaParser.COMMA) + self.state = 1688 + self.typeType() + self.state = 1693 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TypeTypeContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def classOrInterfaceType(self): + return self.getTypedRuleContext(JavaParser.ClassOrInterfaceTypeContext,0) + + + def primitiveType(self): + return self.getTypedRuleContext(JavaParser.PrimitiveTypeContext,0) + + + def annotation(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.AnnotationContext) + else: + return self.getTypedRuleContext(JavaParser.AnnotationContext,i) + + + def LBRACK(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.LBRACK) + else: + return self.getToken(JavaParser.LBRACK, i) + + def RBRACK(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.RBRACK) + else: + return self.getToken(JavaParser.RBRACK, i) + + def getRuleIndex(self): + return JavaParser.RULE_typeType + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypeType" ): + listener.enterTypeType(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypeType" ): + listener.exitTypeType(self) + + + + + def typeType(self): + + localctx = JavaParser.TypeTypeContext(self, self._ctx, self.state) + self.enterRule(localctx, 240, self.RULE_typeType) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1697 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,209,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1694 + self.annotation() + self.state = 1699 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,209,self._ctx) + + self.state = 1702 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 128]: + self.state = 1700 + self.classOrInterfaceType() + pass + elif token in [3, 5, 8, 14, 20, 27, 29, 37]: + self.state = 1701 + self.primitiveType() + pass + else: + raise NoViableAltException(self) + + self.state = 1714 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,212,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1707 + self._errHandler.sync(self) + _la = self._input.LA(1) + while ((((_la - 51)) & ~0x3f) == 0 and ((1 << (_la - 51)) & 32767) != 0) or _la==123 or _la==128: + self.state = 1704 + self.annotation() + self.state = 1709 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 1710 + self.match(JavaParser.LBRACK) + self.state = 1711 + self.match(JavaParser.RBRACK) + self.state = 1716 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,212,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class PrimitiveTypeContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def BOOLEAN(self): + return self.getToken(JavaParser.BOOLEAN, 0) + + def CHAR(self): + return self.getToken(JavaParser.CHAR, 0) + + def BYTE(self): + return self.getToken(JavaParser.BYTE, 0) + + def SHORT(self): + return self.getToken(JavaParser.SHORT, 0) + + def INT(self): + return self.getToken(JavaParser.INT, 0) + + def LONG(self): + return self.getToken(JavaParser.LONG, 0) + + def FLOAT(self): + return self.getToken(JavaParser.FLOAT, 0) + + def DOUBLE(self): + return self.getToken(JavaParser.DOUBLE, 0) + + def getRuleIndex(self): + return JavaParser.RULE_primitiveType + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPrimitiveType" ): + listener.enterPrimitiveType(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPrimitiveType" ): + listener.exitPrimitiveType(self) + + + + + def primitiveType(self): + + localctx = JavaParser.PrimitiveTypeContext(self, self._ctx, self.state) + self.enterRule(localctx, 242, self.RULE_primitiveType) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1717 + _la = self._input.LA(1) + if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 138111107368) != 0)): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TypeArgumentsContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LT(self): + return self.getToken(JavaParser.LT, 0) + + def typeArgument(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(JavaParser.TypeArgumentContext) + else: + return self.getTypedRuleContext(JavaParser.TypeArgumentContext,i) + + + def GT(self): + return self.getToken(JavaParser.GT, 0) + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(JavaParser.COMMA) + else: + return self.getToken(JavaParser.COMMA, i) + + def getRuleIndex(self): + return JavaParser.RULE_typeArguments + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypeArguments" ): + listener.enterTypeArguments(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypeArguments" ): + listener.exitTypeArguments(self) + + + + + def typeArguments(self): + + localctx = JavaParser.TypeArgumentsContext(self, self._ctx, self.state) + self.enterRule(localctx, 244, self.RULE_typeArguments) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1719 + self.match(JavaParser.LT) + self.state = 1720 + self.typeArgument() + self.state = 1725 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==85: + self.state = 1721 + self.match(JavaParser.COMMA) + self.state = 1722 + self.typeArgument() + self.state = 1727 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 1728 + self.match(JavaParser.GT) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class SuperSuffixContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def arguments(self): + return self.getTypedRuleContext(JavaParser.ArgumentsContext,0) + + + def DOT(self): + return self.getToken(JavaParser.DOT, 0) + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def typeArguments(self): + return self.getTypedRuleContext(JavaParser.TypeArgumentsContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_superSuffix + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSuperSuffix" ): + listener.enterSuperSuffix(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSuperSuffix" ): + listener.exitSuperSuffix(self) + + + + + def superSuffix(self): + + localctx = JavaParser.SuperSuffixContext(self, self._ctx, self.state) + self.enterRule(localctx, 246, self.RULE_superSuffix) + self._la = 0 # Token type + try: + self.state = 1739 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [78]: + self.enterOuterAlt(localctx, 1) + self.state = 1730 + self.arguments() + pass + elif token in [86]: + self.enterOuterAlt(localctx, 2) + self.state = 1731 + self.match(JavaParser.DOT) + self.state = 1733 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==89: + self.state = 1732 + self.typeArguments() + + + self.state = 1735 + self.identifier() + self.state = 1737 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,215,self._ctx) + if la_ == 1: + self.state = 1736 + self.arguments() + + + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ExplicitGenericInvocationSuffixContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def SUPER(self): + return self.getToken(JavaParser.SUPER, 0) + + def superSuffix(self): + return self.getTypedRuleContext(JavaParser.SuperSuffixContext,0) + + + def identifier(self): + return self.getTypedRuleContext(JavaParser.IdentifierContext,0) + + + def arguments(self): + return self.getTypedRuleContext(JavaParser.ArgumentsContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_explicitGenericInvocationSuffix + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExplicitGenericInvocationSuffix" ): + listener.enterExplicitGenericInvocationSuffix(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExplicitGenericInvocationSuffix" ): + listener.exitExplicitGenericInvocationSuffix(self) + + + + + def explicitGenericInvocationSuffix(self): + + localctx = JavaParser.ExplicitGenericInvocationSuffixContext(self, self._ctx, self.state) + self.enterRule(localctx, 248, self.RULE_explicitGenericInvocationSuffix) + try: + self.state = 1746 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [40]: + self.enterOuterAlt(localctx, 1) + self.state = 1741 + self.match(JavaParser.SUPER) + self.state = 1742 + self.superSuffix() + pass + elif token in [51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 128]: + self.enterOuterAlt(localctx, 2) + self.state = 1743 + self.identifier() + self.state = 1744 + self.arguments() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ArgumentsContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LPAREN(self): + return self.getToken(JavaParser.LPAREN, 0) + + def RPAREN(self): + return self.getToken(JavaParser.RPAREN, 0) + + def expressionList(self): + return self.getTypedRuleContext(JavaParser.ExpressionListContext,0) + + + def getRuleIndex(self): + return JavaParser.RULE_arguments + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterArguments" ): + listener.enterArguments(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitArguments" ): + listener.exitArguments(self) + + + + + def arguments(self): + + localctx = JavaParser.ArgumentsContext(self, self._ctx, self.state) + self.enterRule(localctx, 250, self.RULE_arguments) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1748 + self.match(JavaParser.LPAREN) + self.state = 1750 + self._errHandler.sync(self) + _la = self._input.LA(1) + if ((((_la - 3)) & ~0x3f) == 0 and ((1 << (_la - 3)) & 9223127275610966053) != 0) or ((((_la - 67)) & ~0x3f) == 0 and ((1 << (_la - 67)) & 2377900732130004991) != 0): + self.state = 1749 + self.expressionList() + + + self.state = 1752 + self.match(JavaParser.RPAREN) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + + def sempred(self, localctx:RuleContext, ruleIndex:int, predIndex:int): + if self._predicates == None: + self._predicates = dict() + self._predicates[99] = self.expression_sempred + self._predicates[107] = self.guardedPattern_sempred + pred = self._predicates.get(ruleIndex, None) + if pred is None: + raise Exception("No predicate with index:" + str(ruleIndex)) + else: + return pred(localctx, predIndex) + + def expression_sempred(self, localctx:ExpressionContext, predIndex:int): + if predIndex == 0: + return self.precpred(self._ctx, 14) + + + if predIndex == 1: + return self.precpred(self._ctx, 13) + + + if predIndex == 2: + return self.precpred(self._ctx, 12) + + + if predIndex == 3: + return self.precpred(self._ctx, 11) + + + if predIndex == 4: + return self.precpred(self._ctx, 9) + + + if predIndex == 5: + return self.precpred(self._ctx, 8) + + + if predIndex == 6: + return self.precpred(self._ctx, 7) + + + if predIndex == 7: + return self.precpred(self._ctx, 6) + + + if predIndex == 8: + return self.precpred(self._ctx, 5) + + + if predIndex == 9: + return self.precpred(self._ctx, 4) + + + if predIndex == 10: + return self.precpred(self._ctx, 3) + + + if predIndex == 11: + return self.precpred(self._ctx, 2) + + + if predIndex == 12: + return self.precpred(self._ctx, 25) + + + if predIndex == 13: + return self.precpred(self._ctx, 24) + + + if predIndex == 14: + return self.precpred(self._ctx, 22) + + + if predIndex == 15: + return self.precpred(self._ctx, 18) + + + if predIndex == 16: + return self.precpred(self._ctx, 10) + + + def guardedPattern_sempred(self, localctx:GuardedPatternContext, predIndex:int): + if predIndex == 17: + return self.precpred(self._ctx, 1) + + + + + diff --git a/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/java/__init__.py b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/java/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3Lexer.py b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3Lexer.py new file mode 100644 index 000000000..7c958a810 --- /dev/null +++ b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3Lexer.py @@ -0,0 +1,791 @@ +# Generated from Python3Lexer.g4 by ANTLR 4.13.1 +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 + + +if "." in __name__: + from module_programming_ast.convert_code_to_ast.languages.python.Python3LexerBase import Python3LexerBase +else: + from module_programming_ast.convert_code_to_ast.languages.python.Python3LexerBase import Python3LexerBase + +def serializedATN(): + return [ + 4,0,102,910,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5, + 2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2, + 13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7, + 19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2, + 26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7, + 32,2,33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2, + 39,7,39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7, + 45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,2,51,7,51,2, + 52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,56,2,57,7,57,2,58,7, + 58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,63,2,64,7,64,2, + 65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7,70,2,71,7, + 71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,7,77,2, + 78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,7, + 84,2,85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,2, + 91,7,91,2,92,7,92,2,93,7,93,2,94,7,94,2,95,7,95,2,96,7,96,2,97,7, + 97,2,98,7,98,2,99,7,99,2,100,7,100,2,101,7,101,2,102,7,102,2,103, + 7,103,2,104,7,104,2,105,7,105,2,106,7,106,2,107,7,107,2,108,7,108, + 2,109,7,109,2,110,7,110,2,111,7,111,2,112,7,112,2,113,7,113,2,114, + 7,114,2,115,7,115,2,116,7,116,2,117,7,117,2,118,7,118,2,119,7,119, + 2,120,7,120,2,121,7,121,2,122,7,122,2,123,7,123,2,124,7,124,2,125, + 7,125,2,126,7,126,2,127,7,127,2,128,7,128,1,0,1,0,3,0,262,8,0,1, + 1,1,1,1,1,3,1,267,8,1,1,2,1,2,1,2,1,2,3,2,273,8,2,1,3,1,3,1,3,1, + 3,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1, + 6,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1, + 9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,11, + 1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,14,1,14, + 1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16, + 1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,17,1,18,1,18,1,18,1,18,1,18, + 1,18,1,18,1,18,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20,1,20,1,21, + 1,21,1,21,1,21,1,21,1,21,1,21,1,22,1,22,1,22,1,23,1,23,1,23,1,23, + 1,23,1,23,1,23,1,24,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,26,1,26, + 1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28, + 1,28,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1,30, + 1,30,1,31,1,31,1,31,1,32,1,32,1,32,1,32,1,32,1,33,1,33,1,33,1,33, + 1,33,1,33,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,35,1,35,1,35,1,35, + 1,35,1,36,1,36,1,36,1,36,1,37,1,37,1,38,1,38,1,38,1,38,1,38,1,38, + 1,39,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,40,1,40,1,41,1,41, + 1,41,3,41,481,8,41,1,41,1,41,3,41,485,8,41,1,41,3,41,488,8,41,3, + 41,490,8,41,1,41,1,41,1,42,1,42,5,42,496,8,42,10,42,12,42,499,9, + 42,1,43,1,43,1,43,1,43,1,43,3,43,506,8,43,1,43,1,43,3,43,510,8,43, + 1,44,1,44,1,44,1,44,1,44,3,44,517,8,44,1,44,1,44,3,44,521,8,44,1, + 45,1,45,5,45,525,8,45,10,45,12,45,528,9,45,1,45,4,45,531,8,45,11, + 45,12,45,532,3,45,535,8,45,1,46,1,46,1,46,4,46,540,8,46,11,46,12, + 46,541,1,47,1,47,1,47,4,47,547,8,47,11,47,12,47,548,1,48,1,48,1, + 48,4,48,554,8,48,11,48,12,48,555,1,49,1,49,3,49,560,8,49,1,50,1, + 50,3,50,564,8,50,1,50,1,50,1,51,1,51,1,52,1,52,1,52,1,52,1,53,1, + 53,1,54,1,54,1,54,1,55,1,55,1,55,1,56,1,56,1,57,1,57,1,58,1,58,1, + 59,1,59,1,59,1,60,1,60,1,61,1,61,1,61,1,62,1,62,1,62,1,63,1,63,1, + 64,1,64,1,65,1,65,1,66,1,66,1,66,1,67,1,67,1,67,1,68,1,68,1,69,1, + 69,1,70,1,70,1,71,1,71,1,72,1,72,1,72,1,73,1,73,1,74,1,74,1,74,1, + 75,1,75,1,75,1,76,1,76,1,77,1,77,1,78,1,78,1,78,1,79,1,79,1,79,1, + 80,1,80,1,80,1,81,1,81,1,81,1,82,1,82,1,82,1,83,1,83,1,84,1,84,1, + 84,1,85,1,85,1,85,1,86,1,86,1,86,1,87,1,87,1,87,1,88,1,88,1,88,1, + 89,1,89,1,89,1,90,1,90,1,90,1,91,1,91,1,91,1,92,1,92,1,92,1,93,1, + 93,1,93,1,94,1,94,1,94,1,94,1,95,1,95,1,95,1,95,1,96,1,96,1,96,1, + 96,1,97,1,97,1,97,1,97,1,98,1,98,1,98,3,98,700,8,98,1,98,1,98,1, + 99,1,99,1,100,1,100,1,100,5,100,709,8,100,10,100,12,100,712,9,100, + 1,100,1,100,1,100,1,100,5,100,718,8,100,10,100,12,100,721,9,100, + 1,100,3,100,724,8,100,1,101,1,101,1,101,1,101,1,101,5,101,731,8, + 101,10,101,12,101,734,9,101,1,101,1,101,1,101,1,101,1,101,1,101, + 1,101,1,101,5,101,744,8,101,10,101,12,101,747,9,101,1,101,1,101, + 1,101,3,101,752,8,101,1,102,1,102,3,102,756,8,102,1,103,1,103,1, + 104,1,104,1,104,1,104,3,104,764,8,104,1,105,1,105,1,106,1,106,1, + 107,1,107,1,108,1,108,1,109,1,109,1,110,3,110,777,8,110,1,110,1, + 110,1,110,1,110,3,110,783,8,110,1,111,1,111,3,111,787,8,111,1,111, + 1,111,1,112,4,112,792,8,112,11,112,12,112,793,1,113,1,113,4,113, + 798,8,113,11,113,12,113,799,1,114,1,114,3,114,804,8,114,1,114,4, + 114,807,8,114,11,114,12,114,808,1,115,1,115,1,115,5,115,814,8,115, + 10,115,12,115,817,9,115,1,115,1,115,1,115,1,115,5,115,823,8,115, + 10,115,12,115,826,9,115,1,115,3,115,829,8,115,1,116,1,116,1,116, + 1,116,1,116,5,116,836,8,116,10,116,12,116,839,9,116,1,116,1,116, + 1,116,1,116,1,116,1,116,1,116,1,116,5,116,849,8,116,10,116,12,116, + 852,9,116,1,116,1,116,1,116,3,116,857,8,116,1,117,1,117,3,117,861, + 8,117,1,118,3,118,864,8,118,1,119,3,119,867,8,119,1,120,3,120,870, + 8,120,1,121,1,121,1,121,1,122,4,122,876,8,122,11,122,12,122,877, + 1,123,1,123,5,123,882,8,123,10,123,12,123,885,9,123,1,124,1,124, + 3,124,889,8,124,1,124,3,124,892,8,124,1,124,1,124,3,124,896,8,124, + 1,125,1,125,1,126,1,126,1,127,1,127,3,127,904,8,127,1,128,1,128, + 1,128,3,128,909,8,128,4,732,745,837,850,0,129,1,3,3,4,5,5,7,6,9, + 7,11,8,13,9,15,10,17,11,19,12,21,13,23,14,25,15,27,16,29,17,31,18, + 33,19,35,20,37,21,39,22,41,23,43,24,45,25,47,26,49,27,51,28,53,29, + 55,30,57,31,59,32,61,33,63,34,65,35,67,36,69,37,71,38,73,39,75,40, + 77,41,79,42,81,43,83,44,85,45,87,46,89,47,91,48,93,49,95,50,97,51, + 99,52,101,53,103,54,105,55,107,56,109,57,111,58,113,59,115,60,117, + 61,119,62,121,63,123,64,125,65,127,66,129,67,131,68,133,69,135,70, + 137,71,139,72,141,73,143,74,145,75,147,76,149,77,151,78,153,79,155, + 80,157,81,159,82,161,83,163,84,165,85,167,86,169,87,171,88,173,89, + 175,90,177,91,179,92,181,93,183,94,185,95,187,96,189,97,191,98,193, + 99,195,100,197,101,199,102,201,0,203,0,205,0,207,0,209,0,211,0,213, + 0,215,0,217,0,219,0,221,0,223,0,225,0,227,0,229,0,231,0,233,0,235, + 0,237,0,239,0,241,0,243,0,245,0,247,0,249,0,251,0,253,0,255,0,257, + 0,1,0,27,6,0,70,70,82,82,85,85,102,102,114,114,117,117,2,0,70,70, + 102,102,2,0,82,82,114,114,2,0,66,66,98,98,2,0,79,79,111,111,2,0, + 88,88,120,120,2,0,74,74,106,106,4,0,10,10,12,13,39,39,92,92,4,0, + 10,10,12,13,34,34,92,92,1,0,92,92,1,0,49,57,1,0,48,57,1,0,48,55, + 3,0,48,57,65,70,97,102,1,0,48,49,2,0,69,69,101,101,2,0,43,43,45, + 45,5,0,0,9,11,12,14,38,40,91,93,127,5,0,0,9,11,12,14,33,35,91,93, + 127,2,0,0,91,93,127,1,0,0,127,2,0,9,9,32,32,2,0,10,10,12,13,4,0, + 6277,6278,8472,8472,8494,8494,12443,12444,4,0,183,183,903,903,4969, + 4977,6618,6618,663,0,65,90,95,95,97,122,170,170,181,181,186,186, + 192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884, + 886,887,890,893,895,895,902,902,904,906,908,908,910,929,931,1013, + 1015,1153,1162,1327,1329,1366,1369,1369,1376,1416,1488,1514,1519, + 1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775, + 1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994, + 2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088, + 2112,2136,2144,2154,2160,2183,2185,2190,2208,2249,2308,2361,2365, + 2365,2384,2384,2392,2401,2417,2432,2437,2444,2447,2448,2451,2472, + 2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527, + 2529,2544,2545,2556,2556,2565,2570,2575,2576,2579,2600,2602,2608, + 2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693, + 2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749, + 2768,2768,2784,2785,2809,2809,2821,2828,2831,2832,2835,2856,2858, + 2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929, + 2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974, + 2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088, + 3090,3112,3114,3129,3133,3133,3160,3162,3165,3165,3168,3169,3200, + 3200,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261, + 3293,3294,3296,3297,3313,3314,3332,3340,3342,3344,3346,3386,3389, + 3389,3406,3406,3412,3414,3423,3425,3450,3455,3461,3478,3482,3505, + 3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713, + 3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3760,3762,3763, + 3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913, + 3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193, + 4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301, + 4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701, + 4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802, + 4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5109, + 5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888, + 5905,5919,5937,5952,5969,5984,5996,5998,6000,6016,6067,6103,6103, + 6108,6108,6176,6264,6272,6276,6279,6312,6314,6314,6320,6389,6400, + 6430,6480,6509,6512,6516,6528,6571,6576,6601,6656,6678,6688,6740, + 6823,6823,6917,6963,6981,6988,7043,7072,7086,7087,7098,7141,7168, + 7203,7245,7247,7258,7293,7296,7304,7312,7354,7357,7359,7401,7404, + 7406,7411,7413,7414,7418,7418,7424,7615,7680,7957,7960,7965,7968, + 8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061, + 8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150, + 8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348, + 8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486, + 8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526, + 8544,8584,11264,11492,11499,11502,11506,11507,11520,11557,11559, + 11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686, + 11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728, + 11734,11736,11742,11823,11823,12293,12295,12321,12329,12337,12341, + 12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549, + 12591,12593,12686,12704,12735,12784,12799,13312,19903,19968,42124, + 42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623, + 42653,42656,42735,42775,42783,42786,42888,42891,42954,42960,42961, + 42963,42963,42965,42969,42994,43009,43011,43013,43015,43018,43020, + 43042,43072,43123,43138,43187,43250,43255,43259,43259,43261,43262, + 43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43488, + 43492,43494,43503,43514,43518,43520,43560,43584,43586,43588,43595, + 43616,43638,43642,43642,43646,43695,43697,43697,43701,43702,43705, + 43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764, + 43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824, + 43866,43868,43881,43888,44002,44032,55203,55216,55238,55243,55291, + 63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287, + 64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324, + 64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136, + 65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479, + 65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576, + 65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908, + 66176,66204,66208,66256,66304,66335,66349,66378,66384,66421,66432, + 66461,66464,66499,66504,66511,66513,66517,66560,66717,66736,66771, + 66776,66811,66816,66855,66864,66915,66928,66938,66940,66954,66956, + 66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004, + 67072,67382,67392,67413,67424,67431,67456,67461,67463,67504,67506, + 67514,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644, + 67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840, + 67861,67872,67897,67968,68023,68030,68031,68096,68096,68112,68115, + 68117,68119,68121,68149,68192,68220,68224,68252,68288,68295,68297, + 68324,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680, + 68736,68786,68800,68850,68864,68899,69248,69289,69296,69297,69376, + 69404,69415,69415,69424,69445,69488,69505,69552,69572,69600,69622, + 69635,69687,69745,69746,69749,69749,69763,69807,69840,69864,69891, + 69926,69956,69956,69959,69959,69968,70002,70006,70006,70019,70066, + 70081,70084,70106,70106,70108,70108,70144,70161,70163,70187,70207, + 70208,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312, + 70320,70366,70405,70412,70415,70416,70419,70440,70442,70448,70450, + 70451,70453,70457,70461,70461,70480,70480,70493,70497,70656,70708, + 70727,70730,70751,70753,70784,70831,70852,70853,70855,70855,71040, + 71086,71128,71131,71168,71215,71236,71236,71296,71338,71352,71352, + 71424,71450,71488,71494,71680,71723,71840,71903,71935,71942,71945, + 71945,71948,71955,71957,71958,71960,71983,71999,71999,72001,72001, + 72096,72103,72106,72144,72161,72161,72163,72163,72192,72192,72203, + 72242,72250,72250,72272,72272,72284,72329,72349,72349,72368,72440, + 72704,72712,72714,72750,72768,72768,72818,72847,72960,72966,72968, + 72969,72971,73008,73030,73030,73056,73061,73063,73064,73066,73097, + 73112,73112,73440,73458,73474,73474,73476,73488,73490,73523,73648, + 73648,73728,74649,74752,74862,74880,75075,77712,77808,77824,78895, + 78913,78918,82944,83526,92160,92728,92736,92766,92784,92862,92880, + 92909,92928,92975,92992,92995,93027,93047,93053,93071,93760,93823, + 93952,94026,94032,94032,94099,94111,94176,94177,94179,94179,94208, + 100343,100352,101589,101632,101640,110576,110579,110581,110587,110589, + 110590,110592,110882,110898,110898,110928,110930,110933,110933,110948, + 110951,110960,111355,113664,113770,113776,113788,113792,113800,113808, + 113817,119808,119892,119894,119964,119966,119967,119970,119970,119973, + 119974,119977,119980,119982,119993,119995,119995,119997,120003,120005, + 120069,120071,120074,120077,120084,120086,120092,120094,120121,120123, + 120126,120128,120132,120134,120134,120138,120144,120146,120485,120488, + 120512,120514,120538,120540,120570,120572,120596,120598,120628,120630, + 120654,120656,120686,120688,120712,120714,120744,120746,120770,120772, + 120779,122624,122654,122661,122666,122928,122989,123136,123180,123191, + 123197,123214,123214,123536,123565,123584,123627,124112,124139,124896, + 124902,124904,124907,124909,124910,124912,124926,124928,125124,125184, + 125251,125259,125259,126464,126467,126469,126495,126497,126498,126500, + 126500,126503,126503,126505,126514,126516,126519,126521,126521,126523, + 126523,126530,126530,126535,126535,126537,126537,126539,126539,126541, + 126543,126545,126546,126548,126548,126551,126551,126553,126553,126555, + 126555,126557,126557,126559,126559,126561,126562,126564,126564,126567, + 126570,126572,126578,126580,126583,126585,126588,126590,126590,126592, + 126601,126603,126619,126625,126627,126629,126633,126635,126651,131072, + 173791,173824,177977,177984,178205,178208,183969,183984,191456,194560, + 195101,196608,201546,201552,205743,372,0,48,57,95,95,768,879,1155, + 1159,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1552,1562, + 1611,1641,1648,1648,1750,1756,1759,1764,1767,1768,1770,1773,1776, + 1785,1809,1809,1840,1866,1958,1968,1984,1993,2027,2035,2045,2045, + 2070,2073,2075,2083,2085,2087,2089,2093,2137,2139,2200,2207,2250, + 2273,2275,2307,2362,2364,2366,2383,2385,2391,2402,2403,2406,2415, + 2433,2435,2492,2492,2494,2500,2503,2504,2507,2509,2519,2519,2530, + 2531,2534,2543,2558,2558,2561,2563,2620,2620,2622,2626,2631,2632, + 2635,2637,2641,2641,2662,2673,2677,2677,2689,2691,2748,2748,2750, + 2757,2759,2761,2763,2765,2786,2787,2790,2799,2810,2815,2817,2819, + 2876,2876,2878,2884,2887,2888,2891,2893,2901,2903,2914,2915,2918, + 2927,2946,2946,3006,3010,3014,3016,3018,3021,3031,3031,3046,3055, + 3072,3076,3132,3132,3134,3140,3142,3144,3146,3149,3157,3158,3170, + 3171,3174,3183,3201,3203,3260,3260,3262,3268,3270,3272,3274,3277, + 3285,3286,3298,3299,3302,3311,3315,3315,3328,3331,3387,3388,3390, + 3396,3398,3400,3402,3405,3415,3415,3426,3427,3430,3439,3457,3459, + 3530,3530,3535,3540,3542,3542,3544,3551,3558,3567,3570,3571,3633, + 3633,3636,3642,3655,3662,3664,3673,3761,3761,3764,3772,3784,3790, + 3792,3801,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902, + 3903,3953,3972,3974,3975,3981,3991,3993,4028,4038,4038,4139,4158, + 4160,4169,4182,4185,4190,4192,4194,4196,4199,4205,4209,4212,4226, + 4237,4239,4253,4957,4959,5906,5909,5938,5940,5970,5971,6002,6003, + 6068,6099,6109,6109,6112,6121,6155,6157,6159,6169,6277,6278,6313, + 6313,6432,6443,6448,6459,6470,6479,6608,6617,6679,6683,6741,6750, + 6752,6780,6783,6793,6800,6809,6832,6845,6847,6862,6912,6916,6964, + 6980,6992,7001,7019,7027,7040,7042,7073,7085,7088,7097,7142,7155, + 7204,7223,7232,7241,7248,7257,7376,7378,7380,7400,7405,7405,7412, + 7412,7415,7417,7616,7679,8255,8256,8276,8276,8400,8412,8417,8417, + 8421,8432,11503,11505,11647,11647,11744,11775,12330,12335,12441, + 12442,42528,42537,42607,42607,42612,42621,42654,42655,42736,42737, + 43010,43010,43014,43014,43019,43019,43043,43047,43052,43052,43136, + 43137,43188,43205,43216,43225,43232,43249,43263,43273,43302,43309, + 43335,43347,43392,43395,43443,43456,43472,43481,43493,43493,43504, + 43513,43561,43574,43587,43587,43596,43597,43600,43609,43643,43645, + 43696,43696,43698,43700,43703,43704,43710,43711,43713,43713,43755, + 43759,43765,43766,44003,44010,44012,44013,44016,44025,64286,64286, + 65024,65039,65056,65071,65075,65076,65101,65103,65296,65305,65343, + 65343,66045,66045,66272,66272,66422,66426,66720,66729,68097,68099, + 68101,68102,68108,68111,68152,68154,68159,68159,68325,68326,68900, + 68903,68912,68921,69291,69292,69373,69375,69446,69456,69506,69509, + 69632,69634,69688,69702,69734,69744,69747,69748,69759,69762,69808, + 69818,69826,69826,69872,69881,69888,69890,69927,69940,69942,69951, + 69957,69958,70003,70003,70016,70018,70067,70080,70089,70092,70094, + 70105,70188,70199,70206,70206,70209,70209,70367,70378,70384,70393, + 70400,70403,70459,70460,70462,70468,70471,70472,70475,70477,70487, + 70487,70498,70499,70502,70508,70512,70516,70709,70726,70736,70745, + 70750,70750,70832,70851,70864,70873,71087,71093,71096,71104,71132, + 71133,71216,71232,71248,71257,71339,71351,71360,71369,71453,71467, + 71472,71481,71724,71738,71904,71913,71984,71989,71991,71992,71995, + 71998,72000,72000,72002,72003,72016,72025,72145,72151,72154,72160, + 72164,72164,72193,72202,72243,72249,72251,72254,72263,72263,72273, + 72283,72330,72345,72751,72758,72760,72767,72784,72793,72850,72871, + 72873,72886,73009,73014,73018,73018,73020,73021,73023,73029,73031, + 73031,73040,73049,73098,73102,73104,73105,73107,73111,73120,73129, + 73459,73462,73472,73473,73475,73475,73524,73530,73534,73538,73552, + 73561,78912,78912,78919,78933,92768,92777,92864,92873,92912,92916, + 92976,92982,93008,93017,94031,94031,94033,94087,94095,94098,94180, + 94180,94192,94193,113821,113822,118528,118573,118576,118598,119141, + 119145,119149,119154,119163,119170,119173,119179,119210,119213,119362, + 119364,120782,120831,121344,121398,121403,121452,121461,121461,121476, + 121476,121499,121503,121505,121519,122880,122886,122888,122904,122907, + 122913,122915,122916,122918,122922,123023,123023,123184,123190,123200, + 123209,123566,123566,123628,123641,124140,124153,125136,125142,125252, + 125258,125264,125273,130032,130041,917760,917999,942,0,1,1,0,0,0, + 0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13, + 1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23, + 1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33, + 1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43, + 1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53, + 1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63, + 1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73, + 1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83, + 1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93, + 1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103, + 1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0, + 0,113,1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,0,119,1,0,0,0,0,121,1, + 0,0,0,0,123,1,0,0,0,0,125,1,0,0,0,0,127,1,0,0,0,0,129,1,0,0,0,0, + 131,1,0,0,0,0,133,1,0,0,0,0,135,1,0,0,0,0,137,1,0,0,0,0,139,1,0, + 0,0,0,141,1,0,0,0,0,143,1,0,0,0,0,145,1,0,0,0,0,147,1,0,0,0,0,149, + 1,0,0,0,0,151,1,0,0,0,0,153,1,0,0,0,0,155,1,0,0,0,0,157,1,0,0,0, + 0,159,1,0,0,0,0,161,1,0,0,0,0,163,1,0,0,0,0,165,1,0,0,0,0,167,1, + 0,0,0,0,169,1,0,0,0,0,171,1,0,0,0,0,173,1,0,0,0,0,175,1,0,0,0,0, + 177,1,0,0,0,0,179,1,0,0,0,0,181,1,0,0,0,0,183,1,0,0,0,0,185,1,0, + 0,0,0,187,1,0,0,0,0,189,1,0,0,0,0,191,1,0,0,0,0,193,1,0,0,0,0,195, + 1,0,0,0,0,197,1,0,0,0,0,199,1,0,0,0,1,261,1,0,0,0,3,266,1,0,0,0, + 5,272,1,0,0,0,7,274,1,0,0,0,9,278,1,0,0,0,11,281,1,0,0,0,13,288, + 1,0,0,0,15,294,1,0,0,0,17,300,1,0,0,0,19,306,1,0,0,0,21,311,1,0, + 0,0,23,317,1,0,0,0,25,326,1,0,0,0,27,330,1,0,0,0,29,334,1,0,0,0, + 31,339,1,0,0,0,33,344,1,0,0,0,35,351,1,0,0,0,37,357,1,0,0,0,39,365, + 1,0,0,0,41,369,1,0,0,0,43,374,1,0,0,0,45,381,1,0,0,0,47,384,1,0, + 0,0,49,391,1,0,0,0,51,394,1,0,0,0,53,397,1,0,0,0,55,404,1,0,0,0, + 57,410,1,0,0,0,59,415,1,0,0,0,61,424,1,0,0,0,63,428,1,0,0,0,65,431, + 1,0,0,0,67,436,1,0,0,0,69,442,1,0,0,0,71,449,1,0,0,0,73,454,1,0, + 0,0,75,458,1,0,0,0,77,460,1,0,0,0,79,466,1,0,0,0,81,471,1,0,0,0, + 83,489,1,0,0,0,85,493,1,0,0,0,87,505,1,0,0,0,89,516,1,0,0,0,91,534, + 1,0,0,0,93,536,1,0,0,0,95,543,1,0,0,0,97,550,1,0,0,0,99,559,1,0, + 0,0,101,563,1,0,0,0,103,567,1,0,0,0,105,569,1,0,0,0,107,573,1,0, + 0,0,109,575,1,0,0,0,111,578,1,0,0,0,113,581,1,0,0,0,115,583,1,0, + 0,0,117,585,1,0,0,0,119,587,1,0,0,0,121,590,1,0,0,0,123,592,1,0, + 0,0,125,595,1,0,0,0,127,598,1,0,0,0,129,600,1,0,0,0,131,602,1,0, + 0,0,133,604,1,0,0,0,135,607,1,0,0,0,137,610,1,0,0,0,139,612,1,0, + 0,0,141,614,1,0,0,0,143,616,1,0,0,0,145,618,1,0,0,0,147,621,1,0, + 0,0,149,623,1,0,0,0,151,626,1,0,0,0,153,629,1,0,0,0,155,631,1,0, + 0,0,157,633,1,0,0,0,159,636,1,0,0,0,161,639,1,0,0,0,163,642,1,0, + 0,0,165,645,1,0,0,0,167,648,1,0,0,0,169,650,1,0,0,0,171,653,1,0, + 0,0,173,656,1,0,0,0,175,659,1,0,0,0,177,662,1,0,0,0,179,665,1,0, + 0,0,181,668,1,0,0,0,183,671,1,0,0,0,185,674,1,0,0,0,187,677,1,0, + 0,0,189,680,1,0,0,0,191,684,1,0,0,0,193,688,1,0,0,0,195,692,1,0, + 0,0,197,699,1,0,0,0,199,703,1,0,0,0,201,723,1,0,0,0,203,751,1,0, + 0,0,205,755,1,0,0,0,207,757,1,0,0,0,209,763,1,0,0,0,211,765,1,0, + 0,0,213,767,1,0,0,0,215,769,1,0,0,0,217,771,1,0,0,0,219,773,1,0, + 0,0,221,782,1,0,0,0,223,786,1,0,0,0,225,791,1,0,0,0,227,795,1,0, + 0,0,229,801,1,0,0,0,231,828,1,0,0,0,233,856,1,0,0,0,235,860,1,0, + 0,0,237,863,1,0,0,0,239,866,1,0,0,0,241,869,1,0,0,0,243,871,1,0, + 0,0,245,875,1,0,0,0,247,879,1,0,0,0,249,886,1,0,0,0,251,897,1,0, + 0,0,253,899,1,0,0,0,255,903,1,0,0,0,257,908,1,0,0,0,259,262,3,87, + 43,0,260,262,3,89,44,0,261,259,1,0,0,0,261,260,1,0,0,0,262,2,1,0, + 0,0,263,267,3,5,2,0,264,267,3,99,49,0,265,267,3,101,50,0,266,263, + 1,0,0,0,266,264,1,0,0,0,266,265,1,0,0,0,267,4,1,0,0,0,268,273,3, + 91,45,0,269,273,3,93,46,0,270,273,3,95,47,0,271,273,3,97,48,0,272, + 268,1,0,0,0,272,269,1,0,0,0,272,270,1,0,0,0,272,271,1,0,0,0,273, + 6,1,0,0,0,274,275,5,97,0,0,275,276,5,110,0,0,276,277,5,100,0,0,277, + 8,1,0,0,0,278,279,5,97,0,0,279,280,5,115,0,0,280,10,1,0,0,0,281, + 282,5,97,0,0,282,283,5,115,0,0,283,284,5,115,0,0,284,285,5,101,0, + 0,285,286,5,114,0,0,286,287,5,116,0,0,287,12,1,0,0,0,288,289,5,97, + 0,0,289,290,5,115,0,0,290,291,5,121,0,0,291,292,5,110,0,0,292,293, + 5,99,0,0,293,14,1,0,0,0,294,295,5,97,0,0,295,296,5,119,0,0,296,297, + 5,97,0,0,297,298,5,105,0,0,298,299,5,116,0,0,299,16,1,0,0,0,300, + 301,5,98,0,0,301,302,5,114,0,0,302,303,5,101,0,0,303,304,5,97,0, + 0,304,305,5,107,0,0,305,18,1,0,0,0,306,307,5,99,0,0,307,308,5,97, + 0,0,308,309,5,115,0,0,309,310,5,101,0,0,310,20,1,0,0,0,311,312,5, + 99,0,0,312,313,5,108,0,0,313,314,5,97,0,0,314,315,5,115,0,0,315, + 316,5,115,0,0,316,22,1,0,0,0,317,318,5,99,0,0,318,319,5,111,0,0, + 319,320,5,110,0,0,320,321,5,116,0,0,321,322,5,105,0,0,322,323,5, + 110,0,0,323,324,5,117,0,0,324,325,5,101,0,0,325,24,1,0,0,0,326,327, + 5,100,0,0,327,328,5,101,0,0,328,329,5,102,0,0,329,26,1,0,0,0,330, + 331,5,100,0,0,331,332,5,101,0,0,332,333,5,108,0,0,333,28,1,0,0,0, + 334,335,5,101,0,0,335,336,5,108,0,0,336,337,5,105,0,0,337,338,5, + 102,0,0,338,30,1,0,0,0,339,340,5,101,0,0,340,341,5,108,0,0,341,342, + 5,115,0,0,342,343,5,101,0,0,343,32,1,0,0,0,344,345,5,101,0,0,345, + 346,5,120,0,0,346,347,5,99,0,0,347,348,5,101,0,0,348,349,5,112,0, + 0,349,350,5,116,0,0,350,34,1,0,0,0,351,352,5,70,0,0,352,353,5,97, + 0,0,353,354,5,108,0,0,354,355,5,115,0,0,355,356,5,101,0,0,356,36, + 1,0,0,0,357,358,5,102,0,0,358,359,5,105,0,0,359,360,5,110,0,0,360, + 361,5,97,0,0,361,362,5,108,0,0,362,363,5,108,0,0,363,364,5,121,0, + 0,364,38,1,0,0,0,365,366,5,102,0,0,366,367,5,111,0,0,367,368,5,114, + 0,0,368,40,1,0,0,0,369,370,5,102,0,0,370,371,5,114,0,0,371,372,5, + 111,0,0,372,373,5,109,0,0,373,42,1,0,0,0,374,375,5,103,0,0,375,376, + 5,108,0,0,376,377,5,111,0,0,377,378,5,98,0,0,378,379,5,97,0,0,379, + 380,5,108,0,0,380,44,1,0,0,0,381,382,5,105,0,0,382,383,5,102,0,0, + 383,46,1,0,0,0,384,385,5,105,0,0,385,386,5,109,0,0,386,387,5,112, + 0,0,387,388,5,111,0,0,388,389,5,114,0,0,389,390,5,116,0,0,390,48, + 1,0,0,0,391,392,5,105,0,0,392,393,5,110,0,0,393,50,1,0,0,0,394,395, + 5,105,0,0,395,396,5,115,0,0,396,52,1,0,0,0,397,398,5,108,0,0,398, + 399,5,97,0,0,399,400,5,109,0,0,400,401,5,98,0,0,401,402,5,100,0, + 0,402,403,5,97,0,0,403,54,1,0,0,0,404,405,5,109,0,0,405,406,5,97, + 0,0,406,407,5,116,0,0,407,408,5,99,0,0,408,409,5,104,0,0,409,56, + 1,0,0,0,410,411,5,78,0,0,411,412,5,111,0,0,412,413,5,110,0,0,413, + 414,5,101,0,0,414,58,1,0,0,0,415,416,5,110,0,0,416,417,5,111,0,0, + 417,418,5,110,0,0,418,419,5,108,0,0,419,420,5,111,0,0,420,421,5, + 99,0,0,421,422,5,97,0,0,422,423,5,108,0,0,423,60,1,0,0,0,424,425, + 5,110,0,0,425,426,5,111,0,0,426,427,5,116,0,0,427,62,1,0,0,0,428, + 429,5,111,0,0,429,430,5,114,0,0,430,64,1,0,0,0,431,432,5,112,0,0, + 432,433,5,97,0,0,433,434,5,115,0,0,434,435,5,115,0,0,435,66,1,0, + 0,0,436,437,5,114,0,0,437,438,5,97,0,0,438,439,5,105,0,0,439,440, + 5,115,0,0,440,441,5,101,0,0,441,68,1,0,0,0,442,443,5,114,0,0,443, + 444,5,101,0,0,444,445,5,116,0,0,445,446,5,117,0,0,446,447,5,114, + 0,0,447,448,5,110,0,0,448,70,1,0,0,0,449,450,5,84,0,0,450,451,5, + 114,0,0,451,452,5,117,0,0,452,453,5,101,0,0,453,72,1,0,0,0,454,455, + 5,116,0,0,455,456,5,114,0,0,456,457,5,121,0,0,457,74,1,0,0,0,458, + 459,5,95,0,0,459,76,1,0,0,0,460,461,5,119,0,0,461,462,5,104,0,0, + 462,463,5,105,0,0,463,464,5,108,0,0,464,465,5,101,0,0,465,78,1,0, + 0,0,466,467,5,119,0,0,467,468,5,105,0,0,468,469,5,116,0,0,469,470, + 5,104,0,0,470,80,1,0,0,0,471,472,5,121,0,0,472,473,5,105,0,0,473, + 474,5,101,0,0,474,475,5,108,0,0,475,476,5,100,0,0,476,82,1,0,0,0, + 477,478,4,41,0,0,478,490,3,245,122,0,479,481,5,13,0,0,480,479,1, + 0,0,0,480,481,1,0,0,0,481,482,1,0,0,0,482,485,5,10,0,0,483,485,2, + 12,13,0,484,480,1,0,0,0,484,483,1,0,0,0,485,487,1,0,0,0,486,488, + 3,245,122,0,487,486,1,0,0,0,487,488,1,0,0,0,488,490,1,0,0,0,489, + 477,1,0,0,0,489,484,1,0,0,0,490,491,1,0,0,0,491,492,6,41,0,0,492, + 84,1,0,0,0,493,497,3,255,127,0,494,496,3,257,128,0,495,494,1,0,0, + 0,496,499,1,0,0,0,497,495,1,0,0,0,497,498,1,0,0,0,498,86,1,0,0,0, + 499,497,1,0,0,0,500,506,7,0,0,0,501,502,7,1,0,0,502,506,7,2,0,0, + 503,504,7,2,0,0,504,506,7,1,0,0,505,500,1,0,0,0,505,501,1,0,0,0, + 505,503,1,0,0,0,505,506,1,0,0,0,506,509,1,0,0,0,507,510,3,201,100, + 0,508,510,3,203,101,0,509,507,1,0,0,0,509,508,1,0,0,0,510,88,1,0, + 0,0,511,517,7,3,0,0,512,513,7,3,0,0,513,517,7,2,0,0,514,515,7,2, + 0,0,515,517,7,3,0,0,516,511,1,0,0,0,516,512,1,0,0,0,516,514,1,0, + 0,0,517,520,1,0,0,0,518,521,3,231,115,0,519,521,3,233,116,0,520, + 518,1,0,0,0,520,519,1,0,0,0,521,90,1,0,0,0,522,526,3,211,105,0,523, + 525,3,213,106,0,524,523,1,0,0,0,525,528,1,0,0,0,526,524,1,0,0,0, + 526,527,1,0,0,0,527,535,1,0,0,0,528,526,1,0,0,0,529,531,5,48,0,0, + 530,529,1,0,0,0,531,532,1,0,0,0,532,530,1,0,0,0,532,533,1,0,0,0, + 533,535,1,0,0,0,534,522,1,0,0,0,534,530,1,0,0,0,535,92,1,0,0,0,536, + 537,5,48,0,0,537,539,7,4,0,0,538,540,3,215,107,0,539,538,1,0,0,0, + 540,541,1,0,0,0,541,539,1,0,0,0,541,542,1,0,0,0,542,94,1,0,0,0,543, + 544,5,48,0,0,544,546,7,5,0,0,545,547,3,217,108,0,546,545,1,0,0,0, + 547,548,1,0,0,0,548,546,1,0,0,0,548,549,1,0,0,0,549,96,1,0,0,0,550, + 551,5,48,0,0,551,553,7,3,0,0,552,554,3,219,109,0,553,552,1,0,0,0, + 554,555,1,0,0,0,555,553,1,0,0,0,555,556,1,0,0,0,556,98,1,0,0,0,557, + 560,3,221,110,0,558,560,3,223,111,0,559,557,1,0,0,0,559,558,1,0, + 0,0,560,100,1,0,0,0,561,564,3,99,49,0,562,564,3,225,112,0,563,561, + 1,0,0,0,563,562,1,0,0,0,564,565,1,0,0,0,565,566,7,6,0,0,566,102, + 1,0,0,0,567,568,5,46,0,0,568,104,1,0,0,0,569,570,5,46,0,0,570,571, + 5,46,0,0,571,572,5,46,0,0,572,106,1,0,0,0,573,574,5,42,0,0,574,108, + 1,0,0,0,575,576,5,40,0,0,576,577,6,54,1,0,577,110,1,0,0,0,578,579, + 5,41,0,0,579,580,6,55,2,0,580,112,1,0,0,0,581,582,5,44,0,0,582,114, + 1,0,0,0,583,584,5,58,0,0,584,116,1,0,0,0,585,586,5,59,0,0,586,118, + 1,0,0,0,587,588,5,42,0,0,588,589,5,42,0,0,589,120,1,0,0,0,590,591, + 5,61,0,0,591,122,1,0,0,0,592,593,5,91,0,0,593,594,6,61,3,0,594,124, + 1,0,0,0,595,596,5,93,0,0,596,597,6,62,4,0,597,126,1,0,0,0,598,599, + 5,124,0,0,599,128,1,0,0,0,600,601,5,94,0,0,601,130,1,0,0,0,602,603, + 5,38,0,0,603,132,1,0,0,0,604,605,5,60,0,0,605,606,5,60,0,0,606,134, + 1,0,0,0,607,608,5,62,0,0,608,609,5,62,0,0,609,136,1,0,0,0,610,611, + 5,43,0,0,611,138,1,0,0,0,612,613,5,45,0,0,613,140,1,0,0,0,614,615, + 5,47,0,0,615,142,1,0,0,0,616,617,5,37,0,0,617,144,1,0,0,0,618,619, + 5,47,0,0,619,620,5,47,0,0,620,146,1,0,0,0,621,622,5,126,0,0,622, + 148,1,0,0,0,623,624,5,123,0,0,624,625,6,74,5,0,625,150,1,0,0,0,626, + 627,5,125,0,0,627,628,6,75,6,0,628,152,1,0,0,0,629,630,5,60,0,0, + 630,154,1,0,0,0,631,632,5,62,0,0,632,156,1,0,0,0,633,634,5,61,0, + 0,634,635,5,61,0,0,635,158,1,0,0,0,636,637,5,62,0,0,637,638,5,61, + 0,0,638,160,1,0,0,0,639,640,5,60,0,0,640,641,5,61,0,0,641,162,1, + 0,0,0,642,643,5,60,0,0,643,644,5,62,0,0,644,164,1,0,0,0,645,646, + 5,33,0,0,646,647,5,61,0,0,647,166,1,0,0,0,648,649,5,64,0,0,649,168, + 1,0,0,0,650,651,5,45,0,0,651,652,5,62,0,0,652,170,1,0,0,0,653,654, + 5,43,0,0,654,655,5,61,0,0,655,172,1,0,0,0,656,657,5,45,0,0,657,658, + 5,61,0,0,658,174,1,0,0,0,659,660,5,42,0,0,660,661,5,61,0,0,661,176, + 1,0,0,0,662,663,5,64,0,0,663,664,5,61,0,0,664,178,1,0,0,0,665,666, + 5,47,0,0,666,667,5,61,0,0,667,180,1,0,0,0,668,669,5,37,0,0,669,670, + 5,61,0,0,670,182,1,0,0,0,671,672,5,38,0,0,672,673,5,61,0,0,673,184, + 1,0,0,0,674,675,5,124,0,0,675,676,5,61,0,0,676,186,1,0,0,0,677,678, + 5,94,0,0,678,679,5,61,0,0,679,188,1,0,0,0,680,681,5,60,0,0,681,682, + 5,60,0,0,682,683,5,61,0,0,683,190,1,0,0,0,684,685,5,62,0,0,685,686, + 5,62,0,0,686,687,5,61,0,0,687,192,1,0,0,0,688,689,5,42,0,0,689,690, + 5,42,0,0,690,691,5,61,0,0,691,194,1,0,0,0,692,693,5,47,0,0,693,694, + 5,47,0,0,694,695,5,61,0,0,695,196,1,0,0,0,696,700,3,245,122,0,697, + 700,3,247,123,0,698,700,3,249,124,0,699,696,1,0,0,0,699,697,1,0, + 0,0,699,698,1,0,0,0,700,701,1,0,0,0,701,702,6,98,7,0,702,198,1,0, + 0,0,703,704,9,0,0,0,704,200,1,0,0,0,705,710,5,39,0,0,706,709,3,209, + 104,0,707,709,8,7,0,0,708,706,1,0,0,0,708,707,1,0,0,0,709,712,1, + 0,0,0,710,708,1,0,0,0,710,711,1,0,0,0,711,713,1,0,0,0,712,710,1, + 0,0,0,713,724,5,39,0,0,714,719,5,34,0,0,715,718,3,209,104,0,716, + 718,8,8,0,0,717,715,1,0,0,0,717,716,1,0,0,0,718,721,1,0,0,0,719, + 717,1,0,0,0,719,720,1,0,0,0,720,722,1,0,0,0,721,719,1,0,0,0,722, + 724,5,34,0,0,723,705,1,0,0,0,723,714,1,0,0,0,724,202,1,0,0,0,725, + 726,5,39,0,0,726,727,5,39,0,0,727,728,5,39,0,0,728,732,1,0,0,0,729, + 731,3,205,102,0,730,729,1,0,0,0,731,734,1,0,0,0,732,733,1,0,0,0, + 732,730,1,0,0,0,733,735,1,0,0,0,734,732,1,0,0,0,735,736,5,39,0,0, + 736,737,5,39,0,0,737,752,5,39,0,0,738,739,5,34,0,0,739,740,5,34, + 0,0,740,741,5,34,0,0,741,745,1,0,0,0,742,744,3,205,102,0,743,742, + 1,0,0,0,744,747,1,0,0,0,745,746,1,0,0,0,745,743,1,0,0,0,746,748, + 1,0,0,0,747,745,1,0,0,0,748,749,5,34,0,0,749,750,5,34,0,0,750,752, + 5,34,0,0,751,725,1,0,0,0,751,738,1,0,0,0,752,204,1,0,0,0,753,756, + 3,207,103,0,754,756,3,209,104,0,755,753,1,0,0,0,755,754,1,0,0,0, + 756,206,1,0,0,0,757,758,8,9,0,0,758,208,1,0,0,0,759,760,5,92,0,0, + 760,764,9,0,0,0,761,762,5,92,0,0,762,764,3,83,41,0,763,759,1,0,0, + 0,763,761,1,0,0,0,764,210,1,0,0,0,765,766,7,10,0,0,766,212,1,0,0, + 0,767,768,7,11,0,0,768,214,1,0,0,0,769,770,7,12,0,0,770,216,1,0, + 0,0,771,772,7,13,0,0,772,218,1,0,0,0,773,774,7,14,0,0,774,220,1, + 0,0,0,775,777,3,225,112,0,776,775,1,0,0,0,776,777,1,0,0,0,777,778, + 1,0,0,0,778,783,3,227,113,0,779,780,3,225,112,0,780,781,5,46,0,0, + 781,783,1,0,0,0,782,776,1,0,0,0,782,779,1,0,0,0,783,222,1,0,0,0, + 784,787,3,225,112,0,785,787,3,221,110,0,786,784,1,0,0,0,786,785, + 1,0,0,0,787,788,1,0,0,0,788,789,3,229,114,0,789,224,1,0,0,0,790, + 792,3,213,106,0,791,790,1,0,0,0,792,793,1,0,0,0,793,791,1,0,0,0, + 793,794,1,0,0,0,794,226,1,0,0,0,795,797,5,46,0,0,796,798,3,213,106, + 0,797,796,1,0,0,0,798,799,1,0,0,0,799,797,1,0,0,0,799,800,1,0,0, + 0,800,228,1,0,0,0,801,803,7,15,0,0,802,804,7,16,0,0,803,802,1,0, + 0,0,803,804,1,0,0,0,804,806,1,0,0,0,805,807,3,213,106,0,806,805, + 1,0,0,0,807,808,1,0,0,0,808,806,1,0,0,0,808,809,1,0,0,0,809,230, + 1,0,0,0,810,815,5,39,0,0,811,814,3,237,118,0,812,814,3,243,121,0, + 813,811,1,0,0,0,813,812,1,0,0,0,814,817,1,0,0,0,815,813,1,0,0,0, + 815,816,1,0,0,0,816,818,1,0,0,0,817,815,1,0,0,0,818,829,5,39,0,0, + 819,824,5,34,0,0,820,823,3,239,119,0,821,823,3,243,121,0,822,820, + 1,0,0,0,822,821,1,0,0,0,823,826,1,0,0,0,824,822,1,0,0,0,824,825, + 1,0,0,0,825,827,1,0,0,0,826,824,1,0,0,0,827,829,5,34,0,0,828,810, + 1,0,0,0,828,819,1,0,0,0,829,232,1,0,0,0,830,831,5,39,0,0,831,832, + 5,39,0,0,832,833,5,39,0,0,833,837,1,0,0,0,834,836,3,235,117,0,835, + 834,1,0,0,0,836,839,1,0,0,0,837,838,1,0,0,0,837,835,1,0,0,0,838, + 840,1,0,0,0,839,837,1,0,0,0,840,841,5,39,0,0,841,842,5,39,0,0,842, + 857,5,39,0,0,843,844,5,34,0,0,844,845,5,34,0,0,845,846,5,34,0,0, + 846,850,1,0,0,0,847,849,3,235,117,0,848,847,1,0,0,0,849,852,1,0, + 0,0,850,851,1,0,0,0,850,848,1,0,0,0,851,853,1,0,0,0,852,850,1,0, + 0,0,853,854,5,34,0,0,854,855,5,34,0,0,855,857,5,34,0,0,856,830,1, + 0,0,0,856,843,1,0,0,0,857,234,1,0,0,0,858,861,3,241,120,0,859,861, + 3,243,121,0,860,858,1,0,0,0,860,859,1,0,0,0,861,236,1,0,0,0,862, + 864,7,17,0,0,863,862,1,0,0,0,864,238,1,0,0,0,865,867,7,18,0,0,866, + 865,1,0,0,0,867,240,1,0,0,0,868,870,7,19,0,0,869,868,1,0,0,0,870, + 242,1,0,0,0,871,872,5,92,0,0,872,873,7,20,0,0,873,244,1,0,0,0,874, + 876,7,21,0,0,875,874,1,0,0,0,876,877,1,0,0,0,877,875,1,0,0,0,877, + 878,1,0,0,0,878,246,1,0,0,0,879,883,5,35,0,0,880,882,8,22,0,0,881, + 880,1,0,0,0,882,885,1,0,0,0,883,881,1,0,0,0,883,884,1,0,0,0,884, + 248,1,0,0,0,885,883,1,0,0,0,886,888,5,92,0,0,887,889,3,245,122,0, + 888,887,1,0,0,0,888,889,1,0,0,0,889,895,1,0,0,0,890,892,5,13,0,0, + 891,890,1,0,0,0,891,892,1,0,0,0,892,893,1,0,0,0,893,896,5,10,0,0, + 894,896,2,12,13,0,895,891,1,0,0,0,895,894,1,0,0,0,896,250,1,0,0, + 0,897,898,7,23,0,0,898,252,1,0,0,0,899,900,7,24,0,0,900,254,1,0, + 0,0,901,904,7,25,0,0,902,904,3,251,125,0,903,901,1,0,0,0,903,902, + 1,0,0,0,904,256,1,0,0,0,905,909,3,255,127,0,906,909,7,26,0,0,907, + 909,3,253,126,0,908,905,1,0,0,0,908,906,1,0,0,0,908,907,1,0,0,0, + 909,258,1,0,0,0,58,0,261,266,272,480,484,487,489,497,505,509,516, + 520,526,532,534,541,548,555,559,563,699,708,710,717,719,723,732, + 745,751,755,763,776,782,786,793,799,803,808,813,815,822,824,828, + 837,850,856,860,863,866,869,877,883,888,891,895,903,908,8,1,41,0, + 1,54,1,1,55,2,1,61,3,1,62,4,1,74,5,1,75,6,6,0,0 + ] + +class Python3Lexer(Python3LexerBase): + + atn = ATNDeserializer().deserialize(serializedATN()) + + decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ] + + INDENT = 1 + DEDENT = 2 + STRING = 3 + NUMBER = 4 + INTEGER = 5 + AND = 6 + AS = 7 + ASSERT = 8 + ASYNC = 9 + AWAIT = 10 + BREAK = 11 + CASE = 12 + CLASS = 13 + CONTINUE = 14 + DEF = 15 + DEL = 16 + ELIF = 17 + ELSE = 18 + EXCEPT = 19 + FALSE = 20 + FINALLY = 21 + FOR = 22 + FROM = 23 + GLOBAL = 24 + IF = 25 + IMPORT = 26 + IN = 27 + IS = 28 + LAMBDA = 29 + MATCH = 30 + NONE = 31 + NONLOCAL = 32 + NOT = 33 + OR = 34 + PASS = 35 + RAISE = 36 + RETURN = 37 + TRUE = 38 + TRY = 39 + UNDERSCORE = 40 + WHILE = 41 + WITH = 42 + YIELD = 43 + NEWLINE = 44 + NAME = 45 + STRING_LITERAL = 46 + BYTES_LITERAL = 47 + DECIMAL_INTEGER = 48 + OCT_INTEGER = 49 + HEX_INTEGER = 50 + BIN_INTEGER = 51 + FLOAT_NUMBER = 52 + IMAG_NUMBER = 53 + DOT = 54 + ELLIPSIS = 55 + STAR = 56 + OPEN_PAREN = 57 + CLOSE_PAREN = 58 + COMMA = 59 + COLON = 60 + SEMI_COLON = 61 + POWER = 62 + ASSIGN = 63 + OPEN_BRACK = 64 + CLOSE_BRACK = 65 + OR_OP = 66 + XOR = 67 + AND_OP = 68 + LEFT_SHIFT = 69 + RIGHT_SHIFT = 70 + ADD = 71 + MINUS = 72 + DIV = 73 + MOD = 74 + IDIV = 75 + NOT_OP = 76 + OPEN_BRACE = 77 + CLOSE_BRACE = 78 + LESS_THAN = 79 + GREATER_THAN = 80 + EQUALS = 81 + GT_EQ = 82 + LT_EQ = 83 + NOT_EQ_1 = 84 + NOT_EQ_2 = 85 + AT = 86 + ARROW = 87 + ADD_ASSIGN = 88 + SUB_ASSIGN = 89 + MULT_ASSIGN = 90 + AT_ASSIGN = 91 + DIV_ASSIGN = 92 + MOD_ASSIGN = 93 + AND_ASSIGN = 94 + OR_ASSIGN = 95 + XOR_ASSIGN = 96 + LEFT_SHIFT_ASSIGN = 97 + RIGHT_SHIFT_ASSIGN = 98 + POWER_ASSIGN = 99 + IDIV_ASSIGN = 100 + SKIP_ = 101 + UNKNOWN_CHAR = 102 + + channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ] + + modeNames = [ "DEFAULT_MODE" ] + + literalNames = [ "", + "'and'", "'as'", "'assert'", "'async'", "'await'", "'break'", + "'case'", "'class'", "'continue'", "'def'", "'del'", "'elif'", + "'else'", "'except'", "'False'", "'finally'", "'for'", "'from'", + "'global'", "'if'", "'import'", "'in'", "'is'", "'lambda'", + "'match'", "'None'", "'nonlocal'", "'not'", "'or'", "'pass'", + "'raise'", "'return'", "'True'", "'try'", "'_'", "'while'", + "'with'", "'yield'", "'.'", "'...'", "'*'", "'('", "')'", "','", + "':'", "';'", "'**'", "'='", "'['", "']'", "'|'", "'^'", "'&'", + "'<<'", "'>>'", "'+'", "'-'", "'/'", "'%'", "'//'", "'~'", "'{'", + "'}'", "'<'", "'>'", "'=='", "'>='", "'<='", "'<>'", "'!='", + "'@'", "'->'", "'+='", "'-='", "'*='", "'@='", "'/='", "'%='", + "'&='", "'|='", "'^='", "'<<='", "'>>='", "'**='", "'//='" ] + + symbolicNames = [ "", + "INDENT", "DEDENT", "STRING", "NUMBER", "INTEGER", "AND", "AS", + "ASSERT", "ASYNC", "AWAIT", "BREAK", "CASE", "CLASS", "CONTINUE", + "DEF", "DEL", "ELIF", "ELSE", "EXCEPT", "FALSE", "FINALLY", + "FOR", "FROM", "GLOBAL", "IF", "IMPORT", "IN", "IS", "LAMBDA", + "MATCH", "NONE", "NONLOCAL", "NOT", "OR", "PASS", "RAISE", "RETURN", + "TRUE", "TRY", "UNDERSCORE", "WHILE", "WITH", "YIELD", "NEWLINE", + "NAME", "STRING_LITERAL", "BYTES_LITERAL", "DECIMAL_INTEGER", + "OCT_INTEGER", "HEX_INTEGER", "BIN_INTEGER", "FLOAT_NUMBER", + "IMAG_NUMBER", "DOT", "ELLIPSIS", "STAR", "OPEN_PAREN", "CLOSE_PAREN", + "COMMA", "COLON", "SEMI_COLON", "POWER", "ASSIGN", "OPEN_BRACK", + "CLOSE_BRACK", "OR_OP", "XOR", "AND_OP", "LEFT_SHIFT", "RIGHT_SHIFT", + "ADD", "MINUS", "DIV", "MOD", "IDIV", "NOT_OP", "OPEN_BRACE", + "CLOSE_BRACE", "LESS_THAN", "GREATER_THAN", "EQUALS", "GT_EQ", + "LT_EQ", "NOT_EQ_1", "NOT_EQ_2", "AT", "ARROW", "ADD_ASSIGN", + "SUB_ASSIGN", "MULT_ASSIGN", "AT_ASSIGN", "DIV_ASSIGN", "MOD_ASSIGN", + "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", "LEFT_SHIFT_ASSIGN", + "RIGHT_SHIFT_ASSIGN", "POWER_ASSIGN", "IDIV_ASSIGN", "SKIP_", + "UNKNOWN_CHAR" ] + + ruleNames = [ "STRING", "NUMBER", "INTEGER", "AND", "AS", "ASSERT", + "ASYNC", "AWAIT", "BREAK", "CASE", "CLASS", "CONTINUE", + "DEF", "DEL", "ELIF", "ELSE", "EXCEPT", "FALSE", "FINALLY", + "FOR", "FROM", "GLOBAL", "IF", "IMPORT", "IN", "IS", "LAMBDA", + "MATCH", "NONE", "NONLOCAL", "NOT", "OR", "PASS", "RAISE", + "RETURN", "TRUE", "TRY", "UNDERSCORE", "WHILE", "WITH", + "YIELD", "NEWLINE", "NAME", "STRING_LITERAL", "BYTES_LITERAL", + "DECIMAL_INTEGER", "OCT_INTEGER", "HEX_INTEGER", "BIN_INTEGER", + "FLOAT_NUMBER", "IMAG_NUMBER", "DOT", "ELLIPSIS", "STAR", + "OPEN_PAREN", "CLOSE_PAREN", "COMMA", "COLON", "SEMI_COLON", + "POWER", "ASSIGN", "OPEN_BRACK", "CLOSE_BRACK", "OR_OP", + "XOR", "AND_OP", "LEFT_SHIFT", "RIGHT_SHIFT", "ADD", "MINUS", + "DIV", "MOD", "IDIV", "NOT_OP", "OPEN_BRACE", "CLOSE_BRACE", + "LESS_THAN", "GREATER_THAN", "EQUALS", "GT_EQ", "LT_EQ", + "NOT_EQ_1", "NOT_EQ_2", "AT", "ARROW", "ADD_ASSIGN", "SUB_ASSIGN", + "MULT_ASSIGN", "AT_ASSIGN", "DIV_ASSIGN", "MOD_ASSIGN", + "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", "LEFT_SHIFT_ASSIGN", + "RIGHT_SHIFT_ASSIGN", "POWER_ASSIGN", "IDIV_ASSIGN", "SKIP_", + "UNKNOWN_CHAR", "SHORT_STRING", "LONG_STRING", "LONG_STRING_ITEM", + "LONG_STRING_CHAR", "STRING_ESCAPE_SEQ", "NON_ZERO_DIGIT", + "DIGIT", "OCT_DIGIT", "HEX_DIGIT", "BIN_DIGIT", "POINT_FLOAT", + "EXPONENT_FLOAT", "INT_PART", "FRACTION", "EXPONENT", + "SHORT_BYTES", "LONG_BYTES", "LONG_BYTES_ITEM", "SHORT_BYTES_CHAR_NO_SINGLE_QUOTE", + "SHORT_BYTES_CHAR_NO_DOUBLE_QUOTE", "LONG_BYTES_CHAR", + "BYTES_ESCAPE_SEQ", "SPACES", "COMMENT", "LINE_JOINING", + "UNICODE_OIDS", "UNICODE_OIDC", "ID_START", "ID_CONTINUE" ] + + grammarFileName = "Python3Lexer.g4" + + def __init__(self, input=None, output:TextIO = sys.stdout): + super().__init__(input, output) + self.checkVersion("4.13.1") + self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache()) + self._actions = None + self._predicates = None + + + def action(self, localctx:RuleContext, ruleIndex:int, actionIndex:int): + if self._actions is None: + actions = dict() + actions[41] = self.NEWLINE_action + actions[54] = self.OPEN_PAREN_action + actions[55] = self.CLOSE_PAREN_action + actions[61] = self.OPEN_BRACK_action + actions[62] = self.CLOSE_BRACK_action + actions[74] = self.OPEN_BRACE_action + actions[75] = self.CLOSE_BRACE_action + self._actions = actions + action = self._actions.get(ruleIndex, None) + if action is not None: + action(localctx, actionIndex) + else: + raise Exception("No registered action for:" + str(ruleIndex)) + + + def NEWLINE_action(self, localctx:RuleContext , actionIndex:int): + if actionIndex == 0: + self.onNewLine(); + + + def OPEN_PAREN_action(self, localctx:RuleContext , actionIndex:int): + if actionIndex == 1: + self.openBrace(); + + + def CLOSE_PAREN_action(self, localctx:RuleContext , actionIndex:int): + if actionIndex == 2: + self.closeBrace(); + + + def OPEN_BRACK_action(self, localctx:RuleContext , actionIndex:int): + if actionIndex == 3: + self.openBrace(); + + + def CLOSE_BRACK_action(self, localctx:RuleContext , actionIndex:int): + if actionIndex == 4: + self.closeBrace(); + + + def OPEN_BRACE_action(self, localctx:RuleContext , actionIndex:int): + if actionIndex == 5: + self.openBrace(); + + + def CLOSE_BRACE_action(self, localctx:RuleContext , actionIndex:int): + if actionIndex == 6: + self.closeBrace(); + + + def sempred(self, localctx:RuleContext, ruleIndex:int, predIndex:int): + if self._predicates is None: + preds = dict() + preds[41] = self.NEWLINE_sempred + self._predicates = preds + pred = self._predicates.get(ruleIndex, None) + if pred is not None: + return pred(localctx, predIndex) + else: + raise Exception("No registered predicate for:" + str(ruleIndex)) + + def NEWLINE_sempred(self, localctx:RuleContext, predIndex:int): + if predIndex == 0: + return self.atStartOfInput() + + + diff --git a/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3LexerBase.py b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3LexerBase.py new file mode 100644 index 000000000..160e4c9a2 --- /dev/null +++ b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3LexerBase.py @@ -0,0 +1,101 @@ +from typing import TextIO +from antlr4 import * +from antlr4.Token import CommonToken +from module_programming_ast.convert_code_to_ast.languages.python.Python3Parser import Python3Parser + +import sys +from typing import TextIO +import re + + +class Python3LexerBase(Lexer): + NEW_LINE_PATTERN = re.compile('[^\r\n\f]+') + SPACES_PATTERN = re.compile('[\r\n\f]+') + + def __init__(self, input: InputStream, output: TextIO = sys.stdout): + super().__init__(input, output) + self.tokens = [] + self.indents = [] + self.opened = 0 + + def reset(self): + self.tokens = [] + self.indents = [] + self.opened = 0 + super().reset() + + def emitToken(self, token): + self._token = token + self.tokens.append(token) + + def nextToken(self): + # Check if the end-of-file is ahead and there are still some DEDENTS expected. + if self._input.LA(1) == Python3Parser.EOF and len(self.indents) != 0: + # Remove any trailing EOF tokens from our buffer. + self.tokens = [token for token in self.tokens if token.type != Python3Parser.EOF] + + # First emit an extra line break that serves as the end of the statement. + self.emitToken(self.commonToken(Python3Parser.NEWLINE, '\n')) + + # Now emit as much DEDENT tokens as needed. + while len(self.indents) != 0: + self.emitToken(self.createDedent()) + self.indents.pop() + + # Put the EOF back on the token stream. + self.emitToken(self.commonToken(Python3Parser.EOF, '')) + + next_ = super().nextToken() + return next_ if len(self.tokens) == 0 else self.tokens.pop(0) + + def createDedent(self): + return self.commonToken(Python3Parser.DEDENT, '') + + def commonToken(self, type_: int, text: str): + stop = self.getCharIndex() - 1 + start = stop if text == '' else stop - len(text) + 1 + return CommonToken(self._tokenFactorySourcePair, type_, Lexer.DEFAULT_TOKEN_CHANNEL, start, stop) + + def getIndentationCount(self, whitespace: str): + count = 0 + for c in whitespace: + if c == '\t': + count += 8 - count % 8 + else: + count += 1 + return count + + def atStartOfInput(self): + return self.getCharIndex() == 0 + + def openBrace(self): + self.opened += 1 + + def closeBrace(self): + self.opened -= 1 + + def onNewLine(self): + new_line = self.NEW_LINE_PATTERN.sub('', self.text) + spaces = self.SPACES_PATTERN.sub('', self.text) + + # Strip newlines inside open clauses except if we are near EOF. We keep NEWLINEs near EOF to + # satisfy the final newline needed by the single_put rule used by the REPL. + next_ = self._input.LA(1) + next_next = self._input.LA(2) + + if self.opened > 0 or (next_next != -1 and next_ in (10, 13, 35)): + self.skip() + else: + self.emitToken(self.commonToken(Python3Parser.NEWLINE, new_line)) + indent = self.getIndentationCount(spaces) + previous = 0 if len(self.indents) == 0 else self.indents[-1] + + if indent == previous: + self.skip() + elif indent > previous: + self.indents.append(indent) + self.emitToken(self.commonToken(Python3Parser.INDENT, spaces)) + else: + while len(self.indents) > 0 and self.indents[-1] > indent: + self.emitToken(self.createDedent()) + self.indents.pop() \ No newline at end of file diff --git a/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3MethodParserListener.py b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3MethodParserListener.py new file mode 100644 index 000000000..f42b868c2 --- /dev/null +++ b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3MethodParserListener.py @@ -0,0 +1,52 @@ +from antlr4 import ParseTreeListener + +from module_programming_ast.convert_code_to_ast.languages.python.Python3Parser import Python3Parser +from module_programming_ast.convert_code_to_ast.languages.python.Python3ParserListener import Python3ParserListener +from dataclasses import dataclass + + +@dataclass +class MethodNode: + def __init__(self, line_start, line_end, source_code, name, ast_string): + self.line_start = line_start + self.line_end = line_end + self.source_code = source_code + self.name = name + self.ast_string = ast_string + + +class MethodParserListener(Python3ParserListener): + def __init__(self, parser): + self.methods = [] + self.parser = parser + + def enterFuncdef(self, ctx: Python3Parser.FuncdefContext): + # Initialize the method name as None + method_name = None + + # Iterate over the children of the context to find the method name + for child in ctx.children: + if isinstance(child, Python3Parser.NameContext): + method_name = child.getText() + break + + # If method name is not found, set it to "Unknown" + if method_name is None: + method_name = "Unknown" + + ast_string = ctx.toStringTree(recog=self.parser) + + # Create a MethodNode for the method + method_node = MethodNode( + line_start=ctx.start.line, + line_end=ctx.stop.line, + source_code=ctx.start.source[1].getText(ctx.start.start, ctx.stop.stop), + name=method_name, + ast_string=ast_string + ) + + self.methods.append(method_node) + + def enterIdentifier(self, ctx): + if self.methods and self.methods[-1].name is None: + self.methods[-1].name = ctx.getText() diff --git a/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3Parser.py b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3Parser.py new file mode 100644 index 000000000..df20ca823 --- /dev/null +++ b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3Parser.py @@ -0,0 +1,10334 @@ +# Generated from Python3Parser.g4 by ANTLR 4.13.1 +# encoding: utf-8 +from antlr4 import * +from io import StringIO +import sys +if sys.version_info[1] > 5: + from typing import TextIO +else: + from typing.io import TextIO + +if "." in __name__: + from .Python3ParserBase import Python3ParserBase +else: + from Python3ParserBase import Python3ParserBase + +def serializedATN(): + return [ + 4,1,102,1435,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6, + 7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7, + 13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2, + 20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7, + 26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2, + 33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7, + 39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2, + 46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,2,51,7,51,2,52,7, + 52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,56,2,57,7,57,2,58,7,58,2, + 59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,63,2,64,7,64,2,65,7, + 65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7,70,2,71,7,71,2, + 72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,7,77,2,78,7, + 78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,7,84,2, + 85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,2,91,7, + 91,2,92,7,92,2,93,7,93,2,94,7,94,2,95,7,95,2,96,7,96,2,97,7,97,2, + 98,7,98,2,99,7,99,2,100,7,100,2,101,7,101,2,102,7,102,2,103,7,103, + 2,104,7,104,2,105,7,105,2,106,7,106,2,107,7,107,2,108,7,108,2,109, + 7,109,2,110,7,110,2,111,7,111,2,112,7,112,2,113,7,113,2,114,7,114, + 2,115,7,115,2,116,7,116,2,117,7,117,2,118,7,118,1,0,1,0,1,0,1,0, + 1,0,3,0,244,8,0,1,1,1,1,5,1,248,8,1,10,1,12,1,251,9,1,1,1,1,1,1, + 2,1,2,5,2,257,8,2,10,2,12,2,260,9,2,1,2,1,2,1,3,1,3,1,3,1,3,3,3, + 268,8,3,1,3,3,3,271,8,3,1,3,1,3,1,4,4,4,276,8,4,11,4,12,4,277,1, + 5,1,5,1,5,1,5,3,5,284,8,5,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,3,7,294, + 8,7,1,7,1,7,1,7,1,8,1,8,3,8,301,8,8,1,8,1,8,1,9,1,9,1,9,3,9,308, + 8,9,1,9,1,9,1,9,1,9,3,9,314,8,9,5,9,316,8,9,10,9,12,9,319,9,9,1, + 9,1,9,1,9,3,9,324,8,9,1,9,1,9,1,9,1,9,3,9,330,8,9,5,9,332,8,9,10, + 9,12,9,335,9,9,1,9,1,9,1,9,1,9,3,9,341,8,9,3,9,343,8,9,3,9,345,8, + 9,1,9,1,9,1,9,3,9,350,8,9,3,9,352,8,9,3,9,354,8,9,1,9,1,9,3,9,358, + 8,9,1,9,1,9,1,9,1,9,3,9,364,8,9,5,9,366,8,9,10,9,12,9,369,9,9,1, + 9,1,9,1,9,1,9,3,9,375,8,9,3,9,377,8,9,3,9,379,8,9,1,9,1,9,1,9,3, + 9,384,8,9,3,9,386,8,9,1,10,1,10,1,10,3,10,391,8,10,1,11,1,11,1,11, + 3,11,396,8,11,1,11,1,11,1,11,1,11,3,11,402,8,11,5,11,404,8,11,10, + 11,12,11,407,9,11,1,11,1,11,1,11,3,11,412,8,11,1,11,1,11,1,11,1, + 11,3,11,418,8,11,5,11,420,8,11,10,11,12,11,423,9,11,1,11,1,11,1, + 11,1,11,3,11,429,8,11,3,11,431,8,11,3,11,433,8,11,1,11,1,11,1,11, + 3,11,438,8,11,3,11,440,8,11,3,11,442,8,11,1,11,1,11,3,11,446,8,11, + 1,11,1,11,1,11,1,11,3,11,452,8,11,5,11,454,8,11,10,11,12,11,457, + 9,11,1,11,1,11,1,11,1,11,3,11,463,8,11,3,11,465,8,11,3,11,467,8, + 11,1,11,1,11,1,11,3,11,472,8,11,3,11,474,8,11,1,12,1,12,1,13,1,13, + 3,13,480,8,13,1,14,1,14,1,14,5,14,485,8,14,10,14,12,14,488,9,14, + 1,14,3,14,491,8,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,15, + 1,15,3,15,503,8,15,1,16,1,16,1,16,1,16,1,16,3,16,510,8,16,1,16,1, + 16,1,16,3,16,515,8,16,5,16,517,8,16,10,16,12,16,520,9,16,3,16,522, + 8,16,1,17,1,17,1,17,1,17,3,17,528,8,17,1,18,1,18,3,18,532,8,18,1, + 18,1,18,1,18,3,18,537,8,18,5,18,539,8,18,10,18,12,18,542,9,18,1, + 18,3,18,545,8,18,1,19,1,19,1,20,1,20,1,20,1,21,1,21,1,22,1,22,1, + 22,1,22,1,22,3,22,559,8,22,1,23,1,23,1,24,1,24,1,25,1,25,3,25,567, + 8,25,1,26,1,26,1,27,1,27,1,27,1,27,3,27,575,8,27,3,27,577,8,27,1, + 28,1,28,3,28,581,8,28,1,29,1,29,1,29,1,30,1,30,5,30,588,8,30,10, + 30,12,30,591,9,30,1,30,1,30,4,30,595,8,30,11,30,12,30,596,3,30,599, + 8,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,3,30,608,8,30,1,31,1,31, + 1,31,3,31,613,8,31,1,32,1,32,1,32,3,32,618,8,32,1,33,1,33,1,33,5, + 33,623,8,33,10,33,12,33,626,9,33,1,33,3,33,629,8,33,1,34,1,34,1, + 34,5,34,634,8,34,10,34,12,34,637,9,34,1,35,1,35,1,35,5,35,642,8, + 35,10,35,12,35,645,9,35,1,36,1,36,1,36,1,36,5,36,651,8,36,10,36, + 12,36,654,9,36,1,37,1,37,1,37,1,37,5,37,660,8,37,10,37,12,37,663, + 9,37,1,38,1,38,1,38,1,38,3,38,669,8,38,1,39,1,39,1,39,1,39,1,39, + 1,39,1,39,1,39,1,39,1,39,3,39,681,8,39,1,40,1,40,1,40,1,40,3,40, + 687,8,40,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,5,41,698,8, + 41,10,41,12,41,701,9,41,1,41,1,41,1,41,3,41,706,8,41,1,42,1,42,1, + 42,1,42,1,42,1,42,1,42,3,42,715,8,42,1,43,1,43,1,43,1,43,1,43,1, + 43,1,43,1,43,1,43,3,43,726,8,43,1,44,1,44,1,44,1,44,1,44,1,44,1, + 44,4,44,735,8,44,11,44,12,44,736,1,44,1,44,1,44,3,44,742,8,44,1, + 44,1,44,1,44,3,44,747,8,44,1,44,1,44,1,44,3,44,752,8,44,1,45,1,45, + 1,45,1,45,5,45,758,8,45,10,45,12,45,761,9,45,1,45,1,45,1,45,1,46, + 1,46,1,46,3,46,769,8,46,1,47,1,47,1,47,1,47,3,47,775,8,47,3,47,777, + 8,47,1,48,1,48,1,48,1,48,4,48,783,8,48,11,48,12,48,784,1,48,1,48, + 3,48,789,8,48,1,49,1,49,1,49,1,49,1,49,1,49,4,49,797,8,49,11,49, + 12,49,798,1,49,1,49,1,50,1,50,1,50,3,50,806,8,50,1,50,3,50,809,8, + 50,1,51,1,51,4,51,813,8,51,11,51,12,51,814,1,51,3,51,818,8,51,1, + 52,1,52,1,52,3,52,823,8,52,1,53,1,53,1,53,3,53,828,8,53,1,53,1,53, + 1,53,1,54,1,54,1,54,1,55,1,55,3,55,838,8,55,1,56,1,56,3,56,842,8, + 56,1,57,1,57,1,57,1,57,1,58,1,58,1,58,5,58,851,8,58,10,58,12,58, + 854,9,58,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,3,59,864,8,59,1, + 60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,3,60,874,8,60,1,61,1,61,1, + 61,1,61,1,61,1,61,1,61,1,61,3,61,884,8,61,1,62,1,62,1,62,1,62,1, + 62,1,62,1,62,1,62,3,62,894,8,62,1,63,1,63,1,63,3,63,899,8,63,1,64, + 1,64,1,64,3,64,904,8,64,1,65,1,65,1,66,1,66,1,67,1,67,1,68,1,68, + 1,68,1,69,1,69,1,70,1,70,1,70,1,71,1,71,1,71,4,71,923,8,71,11,71, + 12,71,924,1,72,1,72,3,72,929,8,72,1,73,1,73,1,73,1,73,1,74,1,74, + 3,74,937,8,74,1,74,1,74,1,74,3,74,942,8,74,1,74,3,74,945,8,74,1, + 75,1,75,1,75,3,75,950,8,75,1,76,1,76,1,76,5,76,955,8,76,10,76,12, + 76,958,9,76,1,76,3,76,961,8,76,1,77,1,77,3,77,965,8,77,1,78,1,78, + 1,78,1,78,3,78,971,8,78,1,79,1,79,1,79,1,79,1,79,3,79,978,8,79,1, + 79,1,79,1,79,1,79,1,79,1,79,1,79,3,79,987,8,79,1,79,1,79,1,79,1, + 79,1,79,3,79,994,8,79,1,79,1,79,3,79,998,8,79,1,80,1,80,1,80,5,80, + 1003,8,80,10,80,12,80,1006,9,80,1,81,1,81,3,81,1010,8,81,1,81,1, + 81,1,81,1,82,1,82,1,82,1,83,1,83,1,83,1,83,1,83,1,83,1,83,1,83,3, + 83,1026,8,83,1,83,1,83,1,83,1,83,1,83,1,83,3,83,1034,8,83,1,83,1, + 83,1,83,1,83,1,83,1,83,1,83,1,83,3,83,1044,8,83,1,83,1,83,3,83,1048, + 8,83,1,84,1,84,1,84,5,84,1053,8,84,10,84,12,84,1056,9,84,1,85,1, + 85,1,85,5,85,1061,8,85,10,85,12,85,1064,9,85,1,86,1,86,1,86,1,86, + 1,87,1,87,1,87,1,87,1,87,1,87,3,87,1076,8,87,1,87,3,87,1079,8,87, + 1,88,1,88,3,88,1083,8,88,1,89,1,89,3,89,1087,8,89,1,89,1,89,1,89, + 1,90,1,90,3,90,1094,8,90,1,90,1,90,1,90,1,91,1,91,1,91,5,91,1102, + 8,91,10,91,12,91,1105,9,91,1,92,1,92,1,92,5,92,1110,8,92,10,92,12, + 92,1113,9,92,1,93,1,93,1,93,3,93,1118,8,93,1,94,1,94,1,94,1,94,5, + 94,1124,8,94,10,94,12,94,1127,9,94,1,95,1,95,1,95,1,95,1,95,1,95, + 1,95,1,95,1,95,1,95,1,95,1,95,1,95,3,95,1142,8,95,1,96,1,96,1,96, + 1,97,1,97,1,97,4,97,1150,8,97,11,97,12,97,1151,1,97,3,97,1155,8, + 97,1,97,1,97,1,97,1,97,1,97,1,97,1,97,1,97,1,97,1,97,1,97,1,97,1, + 97,1,97,1,97,1,97,1,97,1,97,1,97,1,97,1,97,5,97,1178,8,97,10,97, + 12,97,1181,9,97,1,98,3,98,1184,8,98,1,98,1,98,5,98,1188,8,98,10, + 98,12,98,1191,9,98,1,99,1,99,1,99,3,99,1196,8,99,1,99,1,99,1,99, + 3,99,1201,8,99,1,99,1,99,1,99,3,99,1206,8,99,1,99,1,99,1,99,1,99, + 4,99,1212,8,99,11,99,12,99,1213,1,99,1,99,1,99,1,99,3,99,1220,8, + 99,1,100,1,100,1,101,1,101,3,101,1226,8,101,1,101,1,101,1,101,1, + 101,3,101,1232,8,101,5,101,1234,8,101,10,101,12,101,1237,9,101,1, + 101,3,101,1240,8,101,3,101,1242,8,101,1,102,1,102,3,102,1246,8,102, + 1,102,1,102,1,102,1,102,1,102,1,102,1,102,3,102,1255,8,102,1,103, + 1,103,1,103,5,103,1260,8,103,10,103,12,103,1263,9,103,1,103,3,103, + 1266,8,103,1,104,1,104,3,104,1270,8,104,1,104,1,104,3,104,1274,8, + 104,1,104,3,104,1277,8,104,3,104,1279,8,104,1,105,1,105,3,105,1283, + 8,105,1,106,1,106,3,106,1287,8,106,1,106,1,106,1,106,3,106,1292, + 8,106,5,106,1294,8,106,10,106,12,106,1297,9,106,1,106,3,106,1300, + 8,106,1,107,1,107,1,107,5,107,1305,8,107,10,107,12,107,1308,9,107, + 1,107,3,107,1311,8,107,1,108,1,108,1,108,1,108,1,108,1,108,3,108, + 1319,8,108,1,108,1,108,1,108,1,108,1,108,1,108,1,108,1,108,3,108, + 1329,8,108,5,108,1331,8,108,10,108,12,108,1334,9,108,1,108,3,108, + 1337,8,108,3,108,1339,8,108,1,108,1,108,3,108,1343,8,108,1,108,1, + 108,1,108,1,108,3,108,1349,8,108,5,108,1351,8,108,10,108,12,108, + 1354,9,108,1,108,3,108,1357,8,108,3,108,1359,8,108,3,108,1361,8, + 108,1,109,1,109,1,109,1,109,3,109,1367,8,109,1,109,3,109,1370,8, + 109,1,109,1,109,1,109,1,110,1,110,1,110,5,110,1378,8,110,10,110, + 12,110,1381,9,110,1,110,3,110,1384,8,110,1,111,1,111,3,111,1388, + 8,111,1,111,1,111,1,111,1,111,1,111,1,111,1,111,1,111,3,111,1398, + 8,111,1,112,1,112,3,112,1402,8,112,1,113,3,113,1405,8,113,1,113, + 1,113,1,113,1,113,1,113,3,113,1412,8,113,1,114,1,114,1,114,3,114, + 1417,8,114,1,115,1,115,1,116,1,116,3,116,1423,8,116,1,117,1,117, + 1,117,3,117,1428,8,117,1,118,4,118,1431,8,118,11,118,12,118,1432, + 1,118,0,1,194,119,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32, + 34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76, + 78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114, + 116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146, + 148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178, + 180,182,184,186,188,190,192,194,196,198,200,202,204,206,208,210, + 212,214,216,218,220,222,224,226,228,230,232,234,236,0,7,1,0,88,100, + 1,0,54,55,2,0,71,72,76,76,3,0,56,56,73,75,86,86,1,0,71,72,1,0,69, + 70,3,0,30,30,40,40,45,45,1586,0,243,1,0,0,0,2,249,1,0,0,0,4,254, + 1,0,0,0,6,263,1,0,0,0,8,275,1,0,0,0,10,279,1,0,0,0,12,285,1,0,0, + 0,14,288,1,0,0,0,16,298,1,0,0,0,18,385,1,0,0,0,20,387,1,0,0,0,22, + 473,1,0,0,0,24,475,1,0,0,0,26,479,1,0,0,0,28,481,1,0,0,0,30,502, + 1,0,0,0,32,504,1,0,0,0,34,523,1,0,0,0,36,531,1,0,0,0,38,546,1,0, + 0,0,40,548,1,0,0,0,42,551,1,0,0,0,44,558,1,0,0,0,46,560,1,0,0,0, + 48,562,1,0,0,0,50,564,1,0,0,0,52,568,1,0,0,0,54,570,1,0,0,0,56,580, + 1,0,0,0,58,582,1,0,0,0,60,585,1,0,0,0,62,609,1,0,0,0,64,614,1,0, + 0,0,66,619,1,0,0,0,68,630,1,0,0,0,70,638,1,0,0,0,72,646,1,0,0,0, + 74,655,1,0,0,0,76,664,1,0,0,0,78,680,1,0,0,0,80,682,1,0,0,0,82,688, + 1,0,0,0,84,707,1,0,0,0,86,716,1,0,0,0,88,727,1,0,0,0,90,753,1,0, + 0,0,92,765,1,0,0,0,94,770,1,0,0,0,96,788,1,0,0,0,98,790,1,0,0,0, + 100,808,1,0,0,0,102,810,1,0,0,0,104,822,1,0,0,0,106,824,1,0,0,0, + 108,832,1,0,0,0,110,837,1,0,0,0,112,841,1,0,0,0,114,843,1,0,0,0, + 116,847,1,0,0,0,118,863,1,0,0,0,120,873,1,0,0,0,122,883,1,0,0,0, + 124,893,1,0,0,0,126,898,1,0,0,0,128,903,1,0,0,0,130,905,1,0,0,0, + 132,907,1,0,0,0,134,909,1,0,0,0,136,911,1,0,0,0,138,914,1,0,0,0, + 140,916,1,0,0,0,142,919,1,0,0,0,144,928,1,0,0,0,146,930,1,0,0,0, + 148,944,1,0,0,0,150,946,1,0,0,0,152,951,1,0,0,0,154,964,1,0,0,0, + 156,970,1,0,0,0,158,997,1,0,0,0,160,999,1,0,0,0,162,1009,1,0,0,0, + 164,1014,1,0,0,0,166,1047,1,0,0,0,168,1049,1,0,0,0,170,1057,1,0, + 0,0,172,1065,1,0,0,0,174,1078,1,0,0,0,176,1082,1,0,0,0,178,1084, + 1,0,0,0,180,1091,1,0,0,0,182,1098,1,0,0,0,184,1106,1,0,0,0,186,1117, + 1,0,0,0,188,1119,1,0,0,0,190,1141,1,0,0,0,192,1143,1,0,0,0,194,1154, + 1,0,0,0,196,1183,1,0,0,0,198,1219,1,0,0,0,200,1221,1,0,0,0,202,1225, + 1,0,0,0,204,1254,1,0,0,0,206,1256,1,0,0,0,208,1278,1,0,0,0,210,1280, + 1,0,0,0,212,1286,1,0,0,0,214,1301,1,0,0,0,216,1360,1,0,0,0,218,1362, + 1,0,0,0,220,1374,1,0,0,0,222,1397,1,0,0,0,224,1401,1,0,0,0,226,1404, + 1,0,0,0,228,1413,1,0,0,0,230,1418,1,0,0,0,232,1420,1,0,0,0,234,1427, + 1,0,0,0,236,1430,1,0,0,0,238,244,5,44,0,0,239,244,3,28,14,0,240, + 241,3,78,39,0,241,242,5,44,0,0,242,244,1,0,0,0,243,238,1,0,0,0,243, + 239,1,0,0,0,243,240,1,0,0,0,244,1,1,0,0,0,245,248,5,44,0,0,246,248, + 3,26,13,0,247,245,1,0,0,0,247,246,1,0,0,0,248,251,1,0,0,0,249,247, + 1,0,0,0,249,250,1,0,0,0,250,252,1,0,0,0,251,249,1,0,0,0,252,253, + 5,0,0,1,253,3,1,0,0,0,254,258,3,214,107,0,255,257,5,44,0,0,256,255, + 1,0,0,0,257,260,1,0,0,0,258,256,1,0,0,0,258,259,1,0,0,0,259,261, + 1,0,0,0,260,258,1,0,0,0,261,262,5,0,0,1,262,5,1,0,0,0,263,264,5, + 86,0,0,264,270,3,70,35,0,265,267,5,57,0,0,266,268,3,220,110,0,267, + 266,1,0,0,0,267,268,1,0,0,0,268,269,1,0,0,0,269,271,5,58,0,0,270, + 265,1,0,0,0,270,271,1,0,0,0,271,272,1,0,0,0,272,273,5,44,0,0,273, + 7,1,0,0,0,274,276,3,6,3,0,275,274,1,0,0,0,276,277,1,0,0,0,277,275, + 1,0,0,0,277,278,1,0,0,0,278,9,1,0,0,0,279,283,3,8,4,0,280,284,3, + 218,109,0,281,284,3,14,7,0,282,284,3,12,6,0,283,280,1,0,0,0,283, + 281,1,0,0,0,283,282,1,0,0,0,284,11,1,0,0,0,285,286,5,9,0,0,286,287, + 3,14,7,0,287,13,1,0,0,0,288,289,5,15,0,0,289,290,3,200,100,0,290, + 293,3,16,8,0,291,292,5,87,0,0,292,294,3,174,87,0,293,291,1,0,0,0, + 293,294,1,0,0,0,294,295,1,0,0,0,295,296,5,60,0,0,296,297,3,96,48, + 0,297,15,1,0,0,0,298,300,5,57,0,0,299,301,3,18,9,0,300,299,1,0,0, + 0,300,301,1,0,0,0,301,302,1,0,0,0,302,303,5,58,0,0,303,17,1,0,0, + 0,304,307,3,20,10,0,305,306,5,63,0,0,306,308,3,174,87,0,307,305, + 1,0,0,0,307,308,1,0,0,0,308,317,1,0,0,0,309,310,5,59,0,0,310,313, + 3,20,10,0,311,312,5,63,0,0,312,314,3,174,87,0,313,311,1,0,0,0,313, + 314,1,0,0,0,314,316,1,0,0,0,315,309,1,0,0,0,316,319,1,0,0,0,317, + 315,1,0,0,0,317,318,1,0,0,0,318,353,1,0,0,0,319,317,1,0,0,0,320, + 351,5,59,0,0,321,323,5,56,0,0,322,324,3,20,10,0,323,322,1,0,0,0, + 323,324,1,0,0,0,324,333,1,0,0,0,325,326,5,59,0,0,326,329,3,20,10, + 0,327,328,5,63,0,0,328,330,3,174,87,0,329,327,1,0,0,0,329,330,1, + 0,0,0,330,332,1,0,0,0,331,325,1,0,0,0,332,335,1,0,0,0,333,331,1, + 0,0,0,333,334,1,0,0,0,334,344,1,0,0,0,335,333,1,0,0,0,336,342,5, + 59,0,0,337,338,5,62,0,0,338,340,3,20,10,0,339,341,5,59,0,0,340,339, + 1,0,0,0,340,341,1,0,0,0,341,343,1,0,0,0,342,337,1,0,0,0,342,343, + 1,0,0,0,343,345,1,0,0,0,344,336,1,0,0,0,344,345,1,0,0,0,345,352, + 1,0,0,0,346,347,5,62,0,0,347,349,3,20,10,0,348,350,5,59,0,0,349, + 348,1,0,0,0,349,350,1,0,0,0,350,352,1,0,0,0,351,321,1,0,0,0,351, + 346,1,0,0,0,351,352,1,0,0,0,352,354,1,0,0,0,353,320,1,0,0,0,353, + 354,1,0,0,0,354,386,1,0,0,0,355,357,5,56,0,0,356,358,3,20,10,0,357, + 356,1,0,0,0,357,358,1,0,0,0,358,367,1,0,0,0,359,360,5,59,0,0,360, + 363,3,20,10,0,361,362,5,63,0,0,362,364,3,174,87,0,363,361,1,0,0, + 0,363,364,1,0,0,0,364,366,1,0,0,0,365,359,1,0,0,0,366,369,1,0,0, + 0,367,365,1,0,0,0,367,368,1,0,0,0,368,378,1,0,0,0,369,367,1,0,0, + 0,370,376,5,59,0,0,371,372,5,62,0,0,372,374,3,20,10,0,373,375,5, + 59,0,0,374,373,1,0,0,0,374,375,1,0,0,0,375,377,1,0,0,0,376,371,1, + 0,0,0,376,377,1,0,0,0,377,379,1,0,0,0,378,370,1,0,0,0,378,379,1, + 0,0,0,379,386,1,0,0,0,380,381,5,62,0,0,381,383,3,20,10,0,382,384, + 5,59,0,0,383,382,1,0,0,0,383,384,1,0,0,0,384,386,1,0,0,0,385,304, + 1,0,0,0,385,355,1,0,0,0,385,380,1,0,0,0,386,19,1,0,0,0,387,390,3, + 200,100,0,388,389,5,60,0,0,389,391,3,174,87,0,390,388,1,0,0,0,390, + 391,1,0,0,0,391,21,1,0,0,0,392,395,3,24,12,0,393,394,5,63,0,0,394, + 396,3,174,87,0,395,393,1,0,0,0,395,396,1,0,0,0,396,405,1,0,0,0,397, + 398,5,59,0,0,398,401,3,24,12,0,399,400,5,63,0,0,400,402,3,174,87, + 0,401,399,1,0,0,0,401,402,1,0,0,0,402,404,1,0,0,0,403,397,1,0,0, + 0,404,407,1,0,0,0,405,403,1,0,0,0,405,406,1,0,0,0,406,441,1,0,0, + 0,407,405,1,0,0,0,408,439,5,59,0,0,409,411,5,56,0,0,410,412,3,24, + 12,0,411,410,1,0,0,0,411,412,1,0,0,0,412,421,1,0,0,0,413,414,5,59, + 0,0,414,417,3,24,12,0,415,416,5,63,0,0,416,418,3,174,87,0,417,415, + 1,0,0,0,417,418,1,0,0,0,418,420,1,0,0,0,419,413,1,0,0,0,420,423, + 1,0,0,0,421,419,1,0,0,0,421,422,1,0,0,0,422,432,1,0,0,0,423,421, + 1,0,0,0,424,430,5,59,0,0,425,426,5,62,0,0,426,428,3,24,12,0,427, + 429,5,59,0,0,428,427,1,0,0,0,428,429,1,0,0,0,429,431,1,0,0,0,430, + 425,1,0,0,0,430,431,1,0,0,0,431,433,1,0,0,0,432,424,1,0,0,0,432, + 433,1,0,0,0,433,440,1,0,0,0,434,435,5,62,0,0,435,437,3,24,12,0,436, + 438,5,59,0,0,437,436,1,0,0,0,437,438,1,0,0,0,438,440,1,0,0,0,439, + 409,1,0,0,0,439,434,1,0,0,0,439,440,1,0,0,0,440,442,1,0,0,0,441, + 408,1,0,0,0,441,442,1,0,0,0,442,474,1,0,0,0,443,445,5,56,0,0,444, + 446,3,24,12,0,445,444,1,0,0,0,445,446,1,0,0,0,446,455,1,0,0,0,447, + 448,5,59,0,0,448,451,3,24,12,0,449,450,5,63,0,0,450,452,3,174,87, + 0,451,449,1,0,0,0,451,452,1,0,0,0,452,454,1,0,0,0,453,447,1,0,0, + 0,454,457,1,0,0,0,455,453,1,0,0,0,455,456,1,0,0,0,456,466,1,0,0, + 0,457,455,1,0,0,0,458,464,5,59,0,0,459,460,5,62,0,0,460,462,3,24, + 12,0,461,463,5,59,0,0,462,461,1,0,0,0,462,463,1,0,0,0,463,465,1, + 0,0,0,464,459,1,0,0,0,464,465,1,0,0,0,465,467,1,0,0,0,466,458,1, + 0,0,0,466,467,1,0,0,0,467,474,1,0,0,0,468,469,5,62,0,0,469,471,3, + 24,12,0,470,472,5,59,0,0,471,470,1,0,0,0,471,472,1,0,0,0,472,474, + 1,0,0,0,473,392,1,0,0,0,473,443,1,0,0,0,473,468,1,0,0,0,474,23,1, + 0,0,0,475,476,3,200,100,0,476,25,1,0,0,0,477,480,3,28,14,0,478,480, + 3,78,39,0,479,477,1,0,0,0,479,478,1,0,0,0,480,27,1,0,0,0,481,486, + 3,30,15,0,482,483,5,61,0,0,483,485,3,30,15,0,484,482,1,0,0,0,485, + 488,1,0,0,0,486,484,1,0,0,0,486,487,1,0,0,0,487,490,1,0,0,0,488, + 486,1,0,0,0,489,491,5,61,0,0,490,489,1,0,0,0,490,491,1,0,0,0,491, + 492,1,0,0,0,492,493,5,44,0,0,493,29,1,0,0,0,494,503,3,32,16,0,495, + 503,3,40,20,0,496,503,3,42,21,0,497,503,3,44,22,0,498,503,3,56,28, + 0,499,503,3,72,36,0,500,503,3,74,37,0,501,503,3,76,38,0,502,494, + 1,0,0,0,502,495,1,0,0,0,502,496,1,0,0,0,502,497,1,0,0,0,502,498, + 1,0,0,0,502,499,1,0,0,0,502,500,1,0,0,0,502,501,1,0,0,0,503,31,1, + 0,0,0,504,521,3,36,18,0,505,522,3,34,17,0,506,509,3,38,19,0,507, + 510,3,232,116,0,508,510,3,214,107,0,509,507,1,0,0,0,509,508,1,0, + 0,0,510,522,1,0,0,0,511,514,5,63,0,0,512,515,3,232,116,0,513,515, + 3,36,18,0,514,512,1,0,0,0,514,513,1,0,0,0,515,517,1,0,0,0,516,511, + 1,0,0,0,517,520,1,0,0,0,518,516,1,0,0,0,518,519,1,0,0,0,519,522, + 1,0,0,0,520,518,1,0,0,0,521,505,1,0,0,0,521,506,1,0,0,0,521,518, + 1,0,0,0,522,33,1,0,0,0,523,524,5,60,0,0,524,527,3,174,87,0,525,526, + 5,63,0,0,526,528,3,174,87,0,527,525,1,0,0,0,527,528,1,0,0,0,528, + 35,1,0,0,0,529,532,3,174,87,0,530,532,3,192,96,0,531,529,1,0,0,0, + 531,530,1,0,0,0,532,540,1,0,0,0,533,536,5,59,0,0,534,537,3,174,87, + 0,535,537,3,192,96,0,536,534,1,0,0,0,536,535,1,0,0,0,537,539,1,0, + 0,0,538,533,1,0,0,0,539,542,1,0,0,0,540,538,1,0,0,0,540,541,1,0, + 0,0,541,544,1,0,0,0,542,540,1,0,0,0,543,545,5,59,0,0,544,543,1,0, + 0,0,544,545,1,0,0,0,545,37,1,0,0,0,546,547,7,0,0,0,547,39,1,0,0, + 0,548,549,5,16,0,0,549,550,3,212,106,0,550,41,1,0,0,0,551,552,5, + 35,0,0,552,43,1,0,0,0,553,559,3,46,23,0,554,559,3,48,24,0,555,559, + 3,50,25,0,556,559,3,54,27,0,557,559,3,52,26,0,558,553,1,0,0,0,558, + 554,1,0,0,0,558,555,1,0,0,0,558,556,1,0,0,0,558,557,1,0,0,0,559, + 45,1,0,0,0,560,561,5,11,0,0,561,47,1,0,0,0,562,563,5,14,0,0,563, + 49,1,0,0,0,564,566,5,37,0,0,565,567,3,214,107,0,566,565,1,0,0,0, + 566,567,1,0,0,0,567,51,1,0,0,0,568,569,3,232,116,0,569,53,1,0,0, + 0,570,576,5,36,0,0,571,574,3,174,87,0,572,573,5,23,0,0,573,575,3, + 174,87,0,574,572,1,0,0,0,574,575,1,0,0,0,575,577,1,0,0,0,576,571, + 1,0,0,0,576,577,1,0,0,0,577,55,1,0,0,0,578,581,3,58,29,0,579,581, + 3,60,30,0,580,578,1,0,0,0,580,579,1,0,0,0,581,57,1,0,0,0,582,583, + 5,26,0,0,583,584,3,68,34,0,584,59,1,0,0,0,585,598,5,23,0,0,586,588, + 7,1,0,0,587,586,1,0,0,0,588,591,1,0,0,0,589,587,1,0,0,0,589,590, + 1,0,0,0,590,592,1,0,0,0,591,589,1,0,0,0,592,599,3,70,35,0,593,595, + 7,1,0,0,594,593,1,0,0,0,595,596,1,0,0,0,596,594,1,0,0,0,596,597, + 1,0,0,0,597,599,1,0,0,0,598,589,1,0,0,0,598,594,1,0,0,0,599,600, + 1,0,0,0,600,607,5,26,0,0,601,608,5,56,0,0,602,603,5,57,0,0,603,604, + 3,66,33,0,604,605,5,58,0,0,605,608,1,0,0,0,606,608,3,66,33,0,607, + 601,1,0,0,0,607,602,1,0,0,0,607,606,1,0,0,0,608,61,1,0,0,0,609,612, + 3,200,100,0,610,611,5,7,0,0,611,613,3,200,100,0,612,610,1,0,0,0, + 612,613,1,0,0,0,613,63,1,0,0,0,614,617,3,70,35,0,615,616,5,7,0,0, + 616,618,3,200,100,0,617,615,1,0,0,0,617,618,1,0,0,0,618,65,1,0,0, + 0,619,624,3,62,31,0,620,621,5,59,0,0,621,623,3,62,31,0,622,620,1, + 0,0,0,623,626,1,0,0,0,624,622,1,0,0,0,624,625,1,0,0,0,625,628,1, + 0,0,0,626,624,1,0,0,0,627,629,5,59,0,0,628,627,1,0,0,0,628,629,1, + 0,0,0,629,67,1,0,0,0,630,635,3,64,32,0,631,632,5,59,0,0,632,634, + 3,64,32,0,633,631,1,0,0,0,634,637,1,0,0,0,635,633,1,0,0,0,635,636, + 1,0,0,0,636,69,1,0,0,0,637,635,1,0,0,0,638,643,3,200,100,0,639,640, + 5,54,0,0,640,642,3,200,100,0,641,639,1,0,0,0,642,645,1,0,0,0,643, + 641,1,0,0,0,643,644,1,0,0,0,644,71,1,0,0,0,645,643,1,0,0,0,646,647, + 5,24,0,0,647,652,3,200,100,0,648,649,5,59,0,0,649,651,3,200,100, + 0,650,648,1,0,0,0,651,654,1,0,0,0,652,650,1,0,0,0,652,653,1,0,0, + 0,653,73,1,0,0,0,654,652,1,0,0,0,655,656,5,32,0,0,656,661,3,200, + 100,0,657,658,5,59,0,0,658,660,3,200,100,0,659,657,1,0,0,0,660,663, + 1,0,0,0,661,659,1,0,0,0,661,662,1,0,0,0,662,75,1,0,0,0,663,661,1, + 0,0,0,664,665,5,8,0,0,665,668,3,174,87,0,666,667,5,59,0,0,667,669, + 3,174,87,0,668,666,1,0,0,0,668,669,1,0,0,0,669,77,1,0,0,0,670,681, + 3,82,41,0,671,681,3,84,42,0,672,681,3,86,43,0,673,681,3,88,44,0, + 674,681,3,90,45,0,675,681,3,14,7,0,676,681,3,218,109,0,677,681,3, + 10,5,0,678,681,3,80,40,0,679,681,3,98,49,0,680,670,1,0,0,0,680,671, + 1,0,0,0,680,672,1,0,0,0,680,673,1,0,0,0,680,674,1,0,0,0,680,675, + 1,0,0,0,680,676,1,0,0,0,680,677,1,0,0,0,680,678,1,0,0,0,680,679, + 1,0,0,0,681,79,1,0,0,0,682,686,5,9,0,0,683,687,3,14,7,0,684,687, + 3,90,45,0,685,687,3,86,43,0,686,683,1,0,0,0,686,684,1,0,0,0,686, + 685,1,0,0,0,687,81,1,0,0,0,688,689,5,25,0,0,689,690,3,174,87,0,690, + 691,5,60,0,0,691,699,3,96,48,0,692,693,5,17,0,0,693,694,3,174,87, + 0,694,695,5,60,0,0,695,696,3,96,48,0,696,698,1,0,0,0,697,692,1,0, + 0,0,698,701,1,0,0,0,699,697,1,0,0,0,699,700,1,0,0,0,700,705,1,0, + 0,0,701,699,1,0,0,0,702,703,5,18,0,0,703,704,5,60,0,0,704,706,3, + 96,48,0,705,702,1,0,0,0,705,706,1,0,0,0,706,83,1,0,0,0,707,708,5, + 41,0,0,708,709,3,174,87,0,709,710,5,60,0,0,710,714,3,96,48,0,711, + 712,5,18,0,0,712,713,5,60,0,0,713,715,3,96,48,0,714,711,1,0,0,0, + 714,715,1,0,0,0,715,85,1,0,0,0,716,717,5,22,0,0,717,718,3,212,106, + 0,718,719,5,27,0,0,719,720,3,214,107,0,720,721,5,60,0,0,721,725, + 3,96,48,0,722,723,5,18,0,0,723,724,5,60,0,0,724,726,3,96,48,0,725, + 722,1,0,0,0,725,726,1,0,0,0,726,87,1,0,0,0,727,728,5,39,0,0,728, + 729,5,60,0,0,729,751,3,96,48,0,730,731,3,94,47,0,731,732,5,60,0, + 0,732,733,3,96,48,0,733,735,1,0,0,0,734,730,1,0,0,0,735,736,1,0, + 0,0,736,734,1,0,0,0,736,737,1,0,0,0,737,741,1,0,0,0,738,739,5,18, + 0,0,739,740,5,60,0,0,740,742,3,96,48,0,741,738,1,0,0,0,741,742,1, + 0,0,0,742,746,1,0,0,0,743,744,5,21,0,0,744,745,5,60,0,0,745,747, + 3,96,48,0,746,743,1,0,0,0,746,747,1,0,0,0,747,752,1,0,0,0,748,749, + 5,21,0,0,749,750,5,60,0,0,750,752,3,96,48,0,751,734,1,0,0,0,751, + 748,1,0,0,0,752,89,1,0,0,0,753,754,5,42,0,0,754,759,3,92,46,0,755, + 756,5,59,0,0,756,758,3,92,46,0,757,755,1,0,0,0,758,761,1,0,0,0,759, + 757,1,0,0,0,759,760,1,0,0,0,760,762,1,0,0,0,761,759,1,0,0,0,762, + 763,5,60,0,0,763,764,3,96,48,0,764,91,1,0,0,0,765,768,3,174,87,0, + 766,767,5,7,0,0,767,769,3,194,97,0,768,766,1,0,0,0,768,769,1,0,0, + 0,769,93,1,0,0,0,770,776,5,19,0,0,771,774,3,174,87,0,772,773,5,7, + 0,0,773,775,3,200,100,0,774,772,1,0,0,0,774,775,1,0,0,0,775,777, + 1,0,0,0,776,771,1,0,0,0,776,777,1,0,0,0,777,95,1,0,0,0,778,789,3, + 28,14,0,779,780,5,44,0,0,780,782,5,1,0,0,781,783,3,26,13,0,782,781, + 1,0,0,0,783,784,1,0,0,0,784,782,1,0,0,0,784,785,1,0,0,0,785,786, + 1,0,0,0,786,787,5,2,0,0,787,789,1,0,0,0,788,778,1,0,0,0,788,779, + 1,0,0,0,789,97,1,0,0,0,790,791,5,30,0,0,791,792,3,100,50,0,792,793, + 5,60,0,0,793,794,5,44,0,0,794,796,5,1,0,0,795,797,3,106,53,0,796, + 795,1,0,0,0,797,798,1,0,0,0,798,796,1,0,0,0,798,799,1,0,0,0,799, + 800,1,0,0,0,800,801,5,2,0,0,801,99,1,0,0,0,802,803,3,104,52,0,803, + 805,5,59,0,0,804,806,3,102,51,0,805,804,1,0,0,0,805,806,1,0,0,0, + 806,809,1,0,0,0,807,809,3,174,87,0,808,802,1,0,0,0,808,807,1,0,0, + 0,809,101,1,0,0,0,810,812,5,59,0,0,811,813,3,104,52,0,812,811,1, + 0,0,0,813,814,1,0,0,0,814,812,1,0,0,0,814,815,1,0,0,0,815,817,1, + 0,0,0,816,818,5,59,0,0,817,816,1,0,0,0,817,818,1,0,0,0,818,103,1, + 0,0,0,819,820,5,56,0,0,820,823,3,194,97,0,821,823,3,174,87,0,822, + 819,1,0,0,0,822,821,1,0,0,0,823,105,1,0,0,0,824,825,5,12,0,0,825, + 827,3,110,55,0,826,828,3,108,54,0,827,826,1,0,0,0,827,828,1,0,0, + 0,828,829,1,0,0,0,829,830,5,60,0,0,830,831,3,96,48,0,831,107,1,0, + 0,0,832,833,5,25,0,0,833,834,3,174,87,0,834,109,1,0,0,0,835,838, + 3,150,75,0,836,838,3,112,56,0,837,835,1,0,0,0,837,836,1,0,0,0,838, + 111,1,0,0,0,839,842,3,114,57,0,840,842,3,116,58,0,841,839,1,0,0, + 0,841,840,1,0,0,0,842,113,1,0,0,0,843,844,3,116,58,0,844,845,5,7, + 0,0,845,846,3,136,68,0,846,115,1,0,0,0,847,852,3,118,59,0,848,849, + 5,66,0,0,849,851,3,118,59,0,850,848,1,0,0,0,851,854,1,0,0,0,852, + 850,1,0,0,0,852,853,1,0,0,0,853,117,1,0,0,0,854,852,1,0,0,0,855, + 864,3,120,60,0,856,864,3,134,67,0,857,864,3,138,69,0,858,864,3,140, + 70,0,859,864,3,146,73,0,860,864,3,148,74,0,861,864,3,158,79,0,862, + 864,3,166,83,0,863,855,1,0,0,0,863,856,1,0,0,0,863,857,1,0,0,0,863, + 858,1,0,0,0,863,859,1,0,0,0,863,860,1,0,0,0,863,861,1,0,0,0,863, + 862,1,0,0,0,864,119,1,0,0,0,865,866,3,126,63,0,866,867,4,60,0,0, + 867,874,1,0,0,0,868,874,3,124,62,0,869,874,3,236,118,0,870,874,5, + 31,0,0,871,874,5,38,0,0,872,874,5,20,0,0,873,865,1,0,0,0,873,868, + 1,0,0,0,873,869,1,0,0,0,873,870,1,0,0,0,873,871,1,0,0,0,873,872, + 1,0,0,0,874,121,1,0,0,0,875,876,3,126,63,0,876,877,4,61,1,0,877, + 884,1,0,0,0,878,884,3,124,62,0,879,884,3,236,118,0,880,884,5,31, + 0,0,881,884,5,38,0,0,882,884,5,20,0,0,883,875,1,0,0,0,883,878,1, + 0,0,0,883,879,1,0,0,0,883,880,1,0,0,0,883,881,1,0,0,0,883,882,1, + 0,0,0,884,123,1,0,0,0,885,886,3,128,64,0,886,887,5,71,0,0,887,888, + 3,132,66,0,888,894,1,0,0,0,889,890,3,128,64,0,890,891,5,72,0,0,891, + 892,3,132,66,0,892,894,1,0,0,0,893,885,1,0,0,0,893,889,1,0,0,0,894, + 125,1,0,0,0,895,899,5,4,0,0,896,897,5,72,0,0,897,899,5,4,0,0,898, + 895,1,0,0,0,898,896,1,0,0,0,899,127,1,0,0,0,900,904,3,130,65,0,901, + 902,5,72,0,0,902,904,3,130,65,0,903,900,1,0,0,0,903,901,1,0,0,0, + 904,129,1,0,0,0,905,906,5,4,0,0,906,131,1,0,0,0,907,908,5,4,0,0, + 908,133,1,0,0,0,909,910,3,136,68,0,910,135,1,0,0,0,911,912,3,200, + 100,0,912,913,4,68,2,0,913,137,1,0,0,0,914,915,5,40,0,0,915,139, + 1,0,0,0,916,917,3,142,71,0,917,918,4,70,3,0,918,141,1,0,0,0,919, + 922,3,200,100,0,920,921,5,54,0,0,921,923,3,200,100,0,922,920,1,0, + 0,0,923,924,1,0,0,0,924,922,1,0,0,0,924,925,1,0,0,0,925,143,1,0, + 0,0,926,929,3,142,71,0,927,929,3,200,100,0,928,926,1,0,0,0,928,927, + 1,0,0,0,929,145,1,0,0,0,930,931,5,57,0,0,931,932,3,112,56,0,932, + 933,5,58,0,0,933,147,1,0,0,0,934,936,5,64,0,0,935,937,3,152,76,0, + 936,935,1,0,0,0,936,937,1,0,0,0,937,938,1,0,0,0,938,945,5,65,0,0, + 939,941,5,57,0,0,940,942,3,150,75,0,941,940,1,0,0,0,941,942,1,0, + 0,0,942,943,1,0,0,0,943,945,5,58,0,0,944,934,1,0,0,0,944,939,1,0, + 0,0,945,149,1,0,0,0,946,947,3,154,77,0,947,949,5,59,0,0,948,950, + 3,152,76,0,949,948,1,0,0,0,949,950,1,0,0,0,950,151,1,0,0,0,951,956, + 3,154,77,0,952,953,5,59,0,0,953,955,3,154,77,0,954,952,1,0,0,0,955, + 958,1,0,0,0,956,954,1,0,0,0,956,957,1,0,0,0,957,960,1,0,0,0,958, + 956,1,0,0,0,959,961,5,59,0,0,960,959,1,0,0,0,960,961,1,0,0,0,961, + 153,1,0,0,0,962,965,3,156,78,0,963,965,3,112,56,0,964,962,1,0,0, + 0,964,963,1,0,0,0,965,155,1,0,0,0,966,967,5,56,0,0,967,971,3,136, + 68,0,968,969,5,56,0,0,969,971,3,138,69,0,970,966,1,0,0,0,970,968, + 1,0,0,0,971,157,1,0,0,0,972,973,5,77,0,0,973,998,5,78,0,0,974,975, + 5,77,0,0,975,977,3,164,82,0,976,978,5,59,0,0,977,976,1,0,0,0,977, + 978,1,0,0,0,978,979,1,0,0,0,979,980,5,78,0,0,980,998,1,0,0,0,981, + 982,5,77,0,0,982,983,3,160,80,0,983,984,5,59,0,0,984,986,3,164,82, + 0,985,987,5,59,0,0,986,985,1,0,0,0,986,987,1,0,0,0,987,988,1,0,0, + 0,988,989,5,78,0,0,989,998,1,0,0,0,990,991,5,77,0,0,991,993,3,160, + 80,0,992,994,5,59,0,0,993,992,1,0,0,0,993,994,1,0,0,0,994,995,1, + 0,0,0,995,996,5,78,0,0,996,998,1,0,0,0,997,972,1,0,0,0,997,974,1, + 0,0,0,997,981,1,0,0,0,997,990,1,0,0,0,998,159,1,0,0,0,999,1004,3, + 162,81,0,1000,1001,5,59,0,0,1001,1003,3,162,81,0,1002,1000,1,0,0, + 0,1003,1006,1,0,0,0,1004,1002,1,0,0,0,1004,1005,1,0,0,0,1005,161, + 1,0,0,0,1006,1004,1,0,0,0,1007,1010,3,122,61,0,1008,1010,3,142,71, + 0,1009,1007,1,0,0,0,1009,1008,1,0,0,0,1010,1011,1,0,0,0,1011,1012, + 5,60,0,0,1012,1013,3,112,56,0,1013,163,1,0,0,0,1014,1015,5,62,0, + 0,1015,1016,3,136,68,0,1016,165,1,0,0,0,1017,1018,3,144,72,0,1018, + 1019,5,57,0,0,1019,1020,5,58,0,0,1020,1048,1,0,0,0,1021,1022,3,144, + 72,0,1022,1023,5,57,0,0,1023,1025,3,168,84,0,1024,1026,5,59,0,0, + 1025,1024,1,0,0,0,1025,1026,1,0,0,0,1026,1027,1,0,0,0,1027,1028, + 5,58,0,0,1028,1048,1,0,0,0,1029,1030,3,144,72,0,1030,1031,5,57,0, + 0,1031,1033,3,170,85,0,1032,1034,5,59,0,0,1033,1032,1,0,0,0,1033, + 1034,1,0,0,0,1034,1035,1,0,0,0,1035,1036,5,58,0,0,1036,1048,1,0, + 0,0,1037,1038,3,144,72,0,1038,1039,5,57,0,0,1039,1040,3,168,84,0, + 1040,1041,5,59,0,0,1041,1043,3,170,85,0,1042,1044,5,59,0,0,1043, + 1042,1,0,0,0,1043,1044,1,0,0,0,1044,1045,1,0,0,0,1045,1046,5,58, + 0,0,1046,1048,1,0,0,0,1047,1017,1,0,0,0,1047,1021,1,0,0,0,1047,1029, + 1,0,0,0,1047,1037,1,0,0,0,1048,167,1,0,0,0,1049,1054,3,112,56,0, + 1050,1051,5,59,0,0,1051,1053,3,112,56,0,1052,1050,1,0,0,0,1053,1056, + 1,0,0,0,1054,1052,1,0,0,0,1054,1055,1,0,0,0,1055,169,1,0,0,0,1056, + 1054,1,0,0,0,1057,1062,3,172,86,0,1058,1059,5,59,0,0,1059,1061,3, + 172,86,0,1060,1058,1,0,0,0,1061,1064,1,0,0,0,1062,1060,1,0,0,0,1062, + 1063,1,0,0,0,1063,171,1,0,0,0,1064,1062,1,0,0,0,1065,1066,3,200, + 100,0,1066,1067,5,63,0,0,1067,1068,3,112,56,0,1068,173,1,0,0,0,1069, + 1075,3,182,91,0,1070,1071,5,25,0,0,1071,1072,3,182,91,0,1072,1073, + 5,18,0,0,1073,1074,3,174,87,0,1074,1076,1,0,0,0,1075,1070,1,0,0, + 0,1075,1076,1,0,0,0,1076,1079,1,0,0,0,1077,1079,3,178,89,0,1078, + 1069,1,0,0,0,1078,1077,1,0,0,0,1079,175,1,0,0,0,1080,1083,3,182, + 91,0,1081,1083,3,180,90,0,1082,1080,1,0,0,0,1082,1081,1,0,0,0,1083, + 177,1,0,0,0,1084,1086,5,29,0,0,1085,1087,3,22,11,0,1086,1085,1,0, + 0,0,1086,1087,1,0,0,0,1087,1088,1,0,0,0,1088,1089,5,60,0,0,1089, + 1090,3,174,87,0,1090,179,1,0,0,0,1091,1093,5,29,0,0,1092,1094,3, + 22,11,0,1093,1092,1,0,0,0,1093,1094,1,0,0,0,1094,1095,1,0,0,0,1095, + 1096,5,60,0,0,1096,1097,3,176,88,0,1097,181,1,0,0,0,1098,1103,3, + 184,92,0,1099,1100,5,34,0,0,1100,1102,3,184,92,0,1101,1099,1,0,0, + 0,1102,1105,1,0,0,0,1103,1101,1,0,0,0,1103,1104,1,0,0,0,1104,183, + 1,0,0,0,1105,1103,1,0,0,0,1106,1111,3,186,93,0,1107,1108,5,6,0,0, + 1108,1110,3,186,93,0,1109,1107,1,0,0,0,1110,1113,1,0,0,0,1111,1109, + 1,0,0,0,1111,1112,1,0,0,0,1112,185,1,0,0,0,1113,1111,1,0,0,0,1114, + 1115,5,33,0,0,1115,1118,3,186,93,0,1116,1118,3,188,94,0,1117,1114, + 1,0,0,0,1117,1116,1,0,0,0,1118,187,1,0,0,0,1119,1125,3,194,97,0, + 1120,1121,3,190,95,0,1121,1122,3,194,97,0,1122,1124,1,0,0,0,1123, + 1120,1,0,0,0,1124,1127,1,0,0,0,1125,1123,1,0,0,0,1125,1126,1,0,0, + 0,1126,189,1,0,0,0,1127,1125,1,0,0,0,1128,1142,5,79,0,0,1129,1142, + 5,80,0,0,1130,1142,5,81,0,0,1131,1142,5,82,0,0,1132,1142,5,83,0, + 0,1133,1142,5,84,0,0,1134,1142,5,85,0,0,1135,1142,5,27,0,0,1136, + 1137,5,33,0,0,1137,1142,5,27,0,0,1138,1142,5,28,0,0,1139,1140,5, + 28,0,0,1140,1142,5,33,0,0,1141,1128,1,0,0,0,1141,1129,1,0,0,0,1141, + 1130,1,0,0,0,1141,1131,1,0,0,0,1141,1132,1,0,0,0,1141,1133,1,0,0, + 0,1141,1134,1,0,0,0,1141,1135,1,0,0,0,1141,1136,1,0,0,0,1141,1138, + 1,0,0,0,1141,1139,1,0,0,0,1142,191,1,0,0,0,1143,1144,5,56,0,0,1144, + 1145,3,194,97,0,1145,193,1,0,0,0,1146,1147,6,97,-1,0,1147,1155,3, + 196,98,0,1148,1150,7,2,0,0,1149,1148,1,0,0,0,1150,1151,1,0,0,0,1151, + 1149,1,0,0,0,1151,1152,1,0,0,0,1152,1153,1,0,0,0,1153,1155,3,194, + 97,7,1154,1146,1,0,0,0,1154,1149,1,0,0,0,1155,1179,1,0,0,0,1156, + 1157,10,8,0,0,1157,1158,5,62,0,0,1158,1178,3,194,97,9,1159,1160, + 10,6,0,0,1160,1161,7,3,0,0,1161,1178,3,194,97,7,1162,1163,10,5,0, + 0,1163,1164,7,4,0,0,1164,1178,3,194,97,6,1165,1166,10,4,0,0,1166, + 1167,7,5,0,0,1167,1178,3,194,97,5,1168,1169,10,3,0,0,1169,1170,5, + 68,0,0,1170,1178,3,194,97,4,1171,1172,10,2,0,0,1172,1173,5,67,0, + 0,1173,1178,3,194,97,3,1174,1175,10,1,0,0,1175,1176,5,66,0,0,1176, + 1178,3,194,97,2,1177,1156,1,0,0,0,1177,1159,1,0,0,0,1177,1162,1, + 0,0,0,1177,1165,1,0,0,0,1177,1168,1,0,0,0,1177,1171,1,0,0,0,1177, + 1174,1,0,0,0,1178,1181,1,0,0,0,1179,1177,1,0,0,0,1179,1180,1,0,0, + 0,1180,195,1,0,0,0,1181,1179,1,0,0,0,1182,1184,5,10,0,0,1183,1182, + 1,0,0,0,1183,1184,1,0,0,0,1184,1185,1,0,0,0,1185,1189,3,198,99,0, + 1186,1188,3,204,102,0,1187,1186,1,0,0,0,1188,1191,1,0,0,0,1189,1187, + 1,0,0,0,1189,1190,1,0,0,0,1190,197,1,0,0,0,1191,1189,1,0,0,0,1192, + 1195,5,57,0,0,1193,1196,3,232,116,0,1194,1196,3,202,101,0,1195,1193, + 1,0,0,0,1195,1194,1,0,0,0,1195,1196,1,0,0,0,1196,1197,1,0,0,0,1197, + 1220,5,58,0,0,1198,1200,5,64,0,0,1199,1201,3,202,101,0,1200,1199, + 1,0,0,0,1200,1201,1,0,0,0,1201,1202,1,0,0,0,1202,1220,5,65,0,0,1203, + 1205,5,77,0,0,1204,1206,3,216,108,0,1205,1204,1,0,0,0,1205,1206, + 1,0,0,0,1206,1207,1,0,0,0,1207,1220,5,78,0,0,1208,1220,3,200,100, + 0,1209,1220,5,4,0,0,1210,1212,5,3,0,0,1211,1210,1,0,0,0,1212,1213, + 1,0,0,0,1213,1211,1,0,0,0,1213,1214,1,0,0,0,1214,1220,1,0,0,0,1215, + 1220,5,55,0,0,1216,1220,5,31,0,0,1217,1220,5,38,0,0,1218,1220,5, + 20,0,0,1219,1192,1,0,0,0,1219,1198,1,0,0,0,1219,1203,1,0,0,0,1219, + 1208,1,0,0,0,1219,1209,1,0,0,0,1219,1211,1,0,0,0,1219,1215,1,0,0, + 0,1219,1216,1,0,0,0,1219,1217,1,0,0,0,1219,1218,1,0,0,0,1220,199, + 1,0,0,0,1221,1222,7,6,0,0,1222,201,1,0,0,0,1223,1226,3,174,87,0, + 1224,1226,3,192,96,0,1225,1223,1,0,0,0,1225,1224,1,0,0,0,1226,1241, + 1,0,0,0,1227,1242,3,226,113,0,1228,1231,5,59,0,0,1229,1232,3,174, + 87,0,1230,1232,3,192,96,0,1231,1229,1,0,0,0,1231,1230,1,0,0,0,1232, + 1234,1,0,0,0,1233,1228,1,0,0,0,1234,1237,1,0,0,0,1235,1233,1,0,0, + 0,1235,1236,1,0,0,0,1236,1239,1,0,0,0,1237,1235,1,0,0,0,1238,1240, + 5,59,0,0,1239,1238,1,0,0,0,1239,1240,1,0,0,0,1240,1242,1,0,0,0,1241, + 1227,1,0,0,0,1241,1235,1,0,0,0,1242,203,1,0,0,0,1243,1245,5,57,0, + 0,1244,1246,3,220,110,0,1245,1244,1,0,0,0,1245,1246,1,0,0,0,1246, + 1247,1,0,0,0,1247,1255,5,58,0,0,1248,1249,5,64,0,0,1249,1250,3,206, + 103,0,1250,1251,5,65,0,0,1251,1255,1,0,0,0,1252,1253,5,54,0,0,1253, + 1255,3,200,100,0,1254,1243,1,0,0,0,1254,1248,1,0,0,0,1254,1252,1, + 0,0,0,1255,205,1,0,0,0,1256,1261,3,208,104,0,1257,1258,5,59,0,0, + 1258,1260,3,208,104,0,1259,1257,1,0,0,0,1260,1263,1,0,0,0,1261,1259, + 1,0,0,0,1261,1262,1,0,0,0,1262,1265,1,0,0,0,1263,1261,1,0,0,0,1264, + 1266,5,59,0,0,1265,1264,1,0,0,0,1265,1266,1,0,0,0,1266,207,1,0,0, + 0,1267,1279,3,174,87,0,1268,1270,3,174,87,0,1269,1268,1,0,0,0,1269, + 1270,1,0,0,0,1270,1271,1,0,0,0,1271,1273,5,60,0,0,1272,1274,3,174, + 87,0,1273,1272,1,0,0,0,1273,1274,1,0,0,0,1274,1276,1,0,0,0,1275, + 1277,3,210,105,0,1276,1275,1,0,0,0,1276,1277,1,0,0,0,1277,1279,1, + 0,0,0,1278,1267,1,0,0,0,1278,1269,1,0,0,0,1279,209,1,0,0,0,1280, + 1282,5,60,0,0,1281,1283,3,174,87,0,1282,1281,1,0,0,0,1282,1283,1, + 0,0,0,1283,211,1,0,0,0,1284,1287,3,194,97,0,1285,1287,3,192,96,0, + 1286,1284,1,0,0,0,1286,1285,1,0,0,0,1287,1295,1,0,0,0,1288,1291, + 5,59,0,0,1289,1292,3,194,97,0,1290,1292,3,192,96,0,1291,1289,1,0, + 0,0,1291,1290,1,0,0,0,1292,1294,1,0,0,0,1293,1288,1,0,0,0,1294,1297, + 1,0,0,0,1295,1293,1,0,0,0,1295,1296,1,0,0,0,1296,1299,1,0,0,0,1297, + 1295,1,0,0,0,1298,1300,5,59,0,0,1299,1298,1,0,0,0,1299,1300,1,0, + 0,0,1300,213,1,0,0,0,1301,1306,3,174,87,0,1302,1303,5,59,0,0,1303, + 1305,3,174,87,0,1304,1302,1,0,0,0,1305,1308,1,0,0,0,1306,1304,1, + 0,0,0,1306,1307,1,0,0,0,1307,1310,1,0,0,0,1308,1306,1,0,0,0,1309, + 1311,5,59,0,0,1310,1309,1,0,0,0,1310,1311,1,0,0,0,1311,215,1,0,0, + 0,1312,1313,3,174,87,0,1313,1314,5,60,0,0,1314,1315,3,174,87,0,1315, + 1319,1,0,0,0,1316,1317,5,62,0,0,1317,1319,3,194,97,0,1318,1312,1, + 0,0,0,1318,1316,1,0,0,0,1319,1338,1,0,0,0,1320,1339,3,226,113,0, + 1321,1328,5,59,0,0,1322,1323,3,174,87,0,1323,1324,5,60,0,0,1324, + 1325,3,174,87,0,1325,1329,1,0,0,0,1326,1327,5,62,0,0,1327,1329,3, + 194,97,0,1328,1322,1,0,0,0,1328,1326,1,0,0,0,1329,1331,1,0,0,0,1330, + 1321,1,0,0,0,1331,1334,1,0,0,0,1332,1330,1,0,0,0,1332,1333,1,0,0, + 0,1333,1336,1,0,0,0,1334,1332,1,0,0,0,1335,1337,5,59,0,0,1336,1335, + 1,0,0,0,1336,1337,1,0,0,0,1337,1339,1,0,0,0,1338,1320,1,0,0,0,1338, + 1332,1,0,0,0,1339,1361,1,0,0,0,1340,1343,3,174,87,0,1341,1343,3, + 192,96,0,1342,1340,1,0,0,0,1342,1341,1,0,0,0,1343,1358,1,0,0,0,1344, + 1359,3,226,113,0,1345,1348,5,59,0,0,1346,1349,3,174,87,0,1347,1349, + 3,192,96,0,1348,1346,1,0,0,0,1348,1347,1,0,0,0,1349,1351,1,0,0,0, + 1350,1345,1,0,0,0,1351,1354,1,0,0,0,1352,1350,1,0,0,0,1352,1353, + 1,0,0,0,1353,1356,1,0,0,0,1354,1352,1,0,0,0,1355,1357,5,59,0,0,1356, + 1355,1,0,0,0,1356,1357,1,0,0,0,1357,1359,1,0,0,0,1358,1344,1,0,0, + 0,1358,1352,1,0,0,0,1359,1361,1,0,0,0,1360,1318,1,0,0,0,1360,1342, + 1,0,0,0,1361,217,1,0,0,0,1362,1363,5,13,0,0,1363,1369,3,200,100, + 0,1364,1366,5,57,0,0,1365,1367,3,220,110,0,1366,1365,1,0,0,0,1366, + 1367,1,0,0,0,1367,1368,1,0,0,0,1368,1370,5,58,0,0,1369,1364,1,0, + 0,0,1369,1370,1,0,0,0,1370,1371,1,0,0,0,1371,1372,5,60,0,0,1372, + 1373,3,96,48,0,1373,219,1,0,0,0,1374,1379,3,222,111,0,1375,1376, + 5,59,0,0,1376,1378,3,222,111,0,1377,1375,1,0,0,0,1378,1381,1,0,0, + 0,1379,1377,1,0,0,0,1379,1380,1,0,0,0,1380,1383,1,0,0,0,1381,1379, + 1,0,0,0,1382,1384,5,59,0,0,1383,1382,1,0,0,0,1383,1384,1,0,0,0,1384, + 221,1,0,0,0,1385,1387,3,174,87,0,1386,1388,3,226,113,0,1387,1386, + 1,0,0,0,1387,1388,1,0,0,0,1388,1398,1,0,0,0,1389,1390,3,174,87,0, + 1390,1391,5,63,0,0,1391,1392,3,174,87,0,1392,1398,1,0,0,0,1393,1394, + 5,62,0,0,1394,1398,3,174,87,0,1395,1396,5,56,0,0,1396,1398,3,174, + 87,0,1397,1385,1,0,0,0,1397,1389,1,0,0,0,1397,1393,1,0,0,0,1397, + 1395,1,0,0,0,1398,223,1,0,0,0,1399,1402,3,226,113,0,1400,1402,3, + 228,114,0,1401,1399,1,0,0,0,1401,1400,1,0,0,0,1402,225,1,0,0,0,1403, + 1405,5,9,0,0,1404,1403,1,0,0,0,1404,1405,1,0,0,0,1405,1406,1,0,0, + 0,1406,1407,5,22,0,0,1407,1408,3,212,106,0,1408,1409,5,27,0,0,1409, + 1411,3,182,91,0,1410,1412,3,224,112,0,1411,1410,1,0,0,0,1411,1412, + 1,0,0,0,1412,227,1,0,0,0,1413,1414,5,25,0,0,1414,1416,3,176,88,0, + 1415,1417,3,224,112,0,1416,1415,1,0,0,0,1416,1417,1,0,0,0,1417,229, + 1,0,0,0,1418,1419,3,200,100,0,1419,231,1,0,0,0,1420,1422,5,43,0, + 0,1421,1423,3,234,117,0,1422,1421,1,0,0,0,1422,1423,1,0,0,0,1423, + 233,1,0,0,0,1424,1425,5,23,0,0,1425,1428,3,174,87,0,1426,1428,3, + 214,107,0,1427,1424,1,0,0,0,1427,1426,1,0,0,0,1428,235,1,0,0,0,1429, + 1431,5,3,0,0,1430,1429,1,0,0,0,1431,1432,1,0,0,0,1432,1430,1,0,0, + 0,1432,1433,1,0,0,0,1433,237,1,0,0,0,201,243,247,249,258,267,270, + 277,283,293,300,307,313,317,323,329,333,340,342,344,349,351,353, + 357,363,367,374,376,378,383,385,390,395,401,405,411,417,421,428, + 430,432,437,439,441,445,451,455,462,464,466,471,473,479,486,490, + 502,509,514,518,521,527,531,536,540,544,558,566,574,576,580,589, + 596,598,607,612,617,624,628,635,643,652,661,668,680,686,699,705, + 714,725,736,741,746,751,759,768,774,776,784,788,798,805,808,814, + 817,822,827,837,841,852,863,873,883,893,898,903,924,928,936,941, + 944,949,956,960,964,970,977,986,993,997,1004,1009,1025,1033,1043, + 1047,1054,1062,1075,1078,1082,1086,1093,1103,1111,1117,1125,1141, + 1151,1154,1177,1179,1183,1189,1195,1200,1205,1213,1219,1225,1231, + 1235,1239,1241,1245,1254,1261,1265,1269,1273,1276,1278,1282,1286, + 1291,1295,1299,1306,1310,1318,1328,1332,1336,1338,1342,1348,1352, + 1356,1358,1360,1366,1369,1379,1383,1387,1397,1401,1404,1411,1416, + 1422,1427,1432 + ] + +class Python3Parser ( Python3ParserBase ): + + grammarFileName = "Python3Parser.g4" + + atn = ATNDeserializer().deserialize(serializedATN()) + + decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ] + + sharedContextCache = PredictionContextCache() + + literalNames = [ "", "", "", "", + "", "", "'and'", "'as'", "'assert'", + "'async'", "'await'", "'break'", "'case'", "'class'", + "'continue'", "'def'", "'del'", "'elif'", "'else'", + "'except'", "'False'", "'finally'", "'for'", "'from'", + "'global'", "'if'", "'import'", "'in'", "'is'", "'lambda'", + "'match'", "'None'", "'nonlocal'", "'not'", "'or'", + "'pass'", "'raise'", "'return'", "'True'", "'try'", + "'_'", "'while'", "'with'", "'yield'", "", + "", "", "", "", + "", "", "", "", + "", "'.'", "'...'", "'*'", "'('", "')'", "','", + "':'", "';'", "'**'", "'='", "'['", "']'", "'|'", "'^'", + "'&'", "'<<'", "'>>'", "'+'", "'-'", "'/'", "'%'", + "'//'", "'~'", "'{'", "'}'", "'<'", "'>'", "'=='", + "'>='", "'<='", "'<>'", "'!='", "'@'", "'->'", "'+='", + "'-='", "'*='", "'@='", "'/='", "'%='", "'&='", "'|='", + "'^='", "'<<='", "'>>='", "'**='", "'//='" ] + + symbolicNames = [ "", "INDENT", "DEDENT", "STRING", "NUMBER", + "INTEGER", "AND", "AS", "ASSERT", "ASYNC", "AWAIT", + "BREAK", "CASE", "CLASS", "CONTINUE", "DEF", "DEL", + "ELIF", "ELSE", "EXCEPT", "FALSE", "FINALLY", "FOR", + "FROM", "GLOBAL", "IF", "IMPORT", "IN", "IS", "LAMBDA", + "MATCH", "NONE", "NONLOCAL", "NOT", "OR", "PASS", + "RAISE", "RETURN", "TRUE", "TRY", "UNDERSCORE", "WHILE", + "WITH", "YIELD", "NEWLINE", "NAME", "STRING_LITERAL", + "BYTES_LITERAL", "DECIMAL_INTEGER", "OCT_INTEGER", + "HEX_INTEGER", "BIN_INTEGER", "FLOAT_NUMBER", "IMAG_NUMBER", + "DOT", "ELLIPSIS", "STAR", "OPEN_PAREN", "CLOSE_PAREN", + "COMMA", "COLON", "SEMI_COLON", "POWER", "ASSIGN", + "OPEN_BRACK", "CLOSE_BRACK", "OR_OP", "XOR", "AND_OP", + "LEFT_SHIFT", "RIGHT_SHIFT", "ADD", "MINUS", "DIV", + "MOD", "IDIV", "NOT_OP", "OPEN_BRACE", "CLOSE_BRACE", + "LESS_THAN", "GREATER_THAN", "EQUALS", "GT_EQ", "LT_EQ", + "NOT_EQ_1", "NOT_EQ_2", "AT", "ARROW", "ADD_ASSIGN", + "SUB_ASSIGN", "MULT_ASSIGN", "AT_ASSIGN", "DIV_ASSIGN", + "MOD_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", + "LEFT_SHIFT_ASSIGN", "RIGHT_SHIFT_ASSIGN", "POWER_ASSIGN", + "IDIV_ASSIGN", "SKIP_", "UNKNOWN_CHAR" ] + + RULE_single_input = 0 + RULE_file_input = 1 + RULE_eval_input = 2 + RULE_decorator = 3 + RULE_decorators = 4 + RULE_decorated = 5 + RULE_async_funcdef = 6 + RULE_funcdef = 7 + RULE_parameters = 8 + RULE_typedargslist = 9 + RULE_tfpdef = 10 + RULE_varargslist = 11 + RULE_vfpdef = 12 + RULE_stmt = 13 + RULE_simple_stmts = 14 + RULE_simple_stmt = 15 + RULE_expr_stmt = 16 + RULE_annassign = 17 + RULE_testlist_star_expr = 18 + RULE_augassign = 19 + RULE_del_stmt = 20 + RULE_pass_stmt = 21 + RULE_flow_stmt = 22 + RULE_break_stmt = 23 + RULE_continue_stmt = 24 + RULE_return_stmt = 25 + RULE_yield_stmt = 26 + RULE_raise_stmt = 27 + RULE_import_stmt = 28 + RULE_import_name = 29 + RULE_import_from = 30 + RULE_import_as_name = 31 + RULE_dotted_as_name = 32 + RULE_import_as_names = 33 + RULE_dotted_as_names = 34 + RULE_dotted_name = 35 + RULE_global_stmt = 36 + RULE_nonlocal_stmt = 37 + RULE_assert_stmt = 38 + RULE_compound_stmt = 39 + RULE_async_stmt = 40 + RULE_if_stmt = 41 + RULE_while_stmt = 42 + RULE_for_stmt = 43 + RULE_try_stmt = 44 + RULE_with_stmt = 45 + RULE_with_item = 46 + RULE_except_clause = 47 + RULE_block = 48 + RULE_match_stmt = 49 + RULE_subject_expr = 50 + RULE_star_named_expressions = 51 + RULE_star_named_expression = 52 + RULE_case_block = 53 + RULE_guard = 54 + RULE_patterns = 55 + RULE_pattern = 56 + RULE_as_pattern = 57 + RULE_or_pattern = 58 + RULE_closed_pattern = 59 + RULE_literal_pattern = 60 + RULE_literal_expr = 61 + RULE_complex_number = 62 + RULE_signed_number = 63 + RULE_signed_real_number = 64 + RULE_real_number = 65 + RULE_imaginary_number = 66 + RULE_capture_pattern = 67 + RULE_pattern_capture_target = 68 + RULE_wildcard_pattern = 69 + RULE_value_pattern = 70 + RULE_attr = 71 + RULE_name_or_attr = 72 + RULE_group_pattern = 73 + RULE_sequence_pattern = 74 + RULE_open_sequence_pattern = 75 + RULE_maybe_sequence_pattern = 76 + RULE_maybe_star_pattern = 77 + RULE_star_pattern = 78 + RULE_mapping_pattern = 79 + RULE_items_pattern = 80 + RULE_key_value_pattern = 81 + RULE_double_star_pattern = 82 + RULE_class_pattern = 83 + RULE_positional_patterns = 84 + RULE_keyword_patterns = 85 + RULE_keyword_pattern = 86 + RULE_test = 87 + RULE_test_nocond = 88 + RULE_lambdef = 89 + RULE_lambdef_nocond = 90 + RULE_or_test = 91 + RULE_and_test = 92 + RULE_not_test = 93 + RULE_comparison = 94 + RULE_comp_op = 95 + RULE_star_expr = 96 + RULE_expr = 97 + RULE_atom_expr = 98 + RULE_atom = 99 + RULE_name = 100 + RULE_testlist_comp = 101 + RULE_trailer = 102 + RULE_subscriptlist = 103 + RULE_subscript_ = 104 + RULE_sliceop = 105 + RULE_exprlist = 106 + RULE_testlist = 107 + RULE_dictorsetmaker = 108 + RULE_classdef = 109 + RULE_arglist = 110 + RULE_argument = 111 + RULE_comp_iter = 112 + RULE_comp_for = 113 + RULE_comp_if = 114 + RULE_encoding_decl = 115 + RULE_yield_expr = 116 + RULE_yield_arg = 117 + RULE_strings = 118 + + ruleNames = [ "single_input", "file_input", "eval_input", "decorator", + "decorators", "decorated", "async_funcdef", "funcdef", + "parameters", "typedargslist", "tfpdef", "varargslist", + "vfpdef", "stmt", "simple_stmts", "simple_stmt", "expr_stmt", + "annassign", "testlist_star_expr", "augassign", "del_stmt", + "pass_stmt", "flow_stmt", "break_stmt", "continue_stmt", + "return_stmt", "yield_stmt", "raise_stmt", "import_stmt", + "import_name", "import_from", "import_as_name", "dotted_as_name", + "import_as_names", "dotted_as_names", "dotted_name", + "global_stmt", "nonlocal_stmt", "assert_stmt", "compound_stmt", + "async_stmt", "if_stmt", "while_stmt", "for_stmt", "try_stmt", + "with_stmt", "with_item", "except_clause", "block", "match_stmt", + "subject_expr", "star_named_expressions", "star_named_expression", + "case_block", "guard", "patterns", "pattern", "as_pattern", + "or_pattern", "closed_pattern", "literal_pattern", "literal_expr", + "complex_number", "signed_number", "signed_real_number", + "real_number", "imaginary_number", "capture_pattern", + "pattern_capture_target", "wildcard_pattern", "value_pattern", + "attr", "name_or_attr", "group_pattern", "sequence_pattern", + "open_sequence_pattern", "maybe_sequence_pattern", "maybe_star_pattern", + "star_pattern", "mapping_pattern", "items_pattern", "key_value_pattern", + "double_star_pattern", "class_pattern", "positional_patterns", + "keyword_patterns", "keyword_pattern", "test", "test_nocond", + "lambdef", "lambdef_nocond", "or_test", "and_test", "not_test", + "comparison", "comp_op", "star_expr", "expr", "atom_expr", + "atom", "name", "testlist_comp", "trailer", "subscriptlist", + "subscript_", "sliceop", "exprlist", "testlist", "dictorsetmaker", + "classdef", "arglist", "argument", "comp_iter", "comp_for", + "comp_if", "encoding_decl", "yield_expr", "yield_arg", + "strings" ] + + EOF = Token.EOF + INDENT=1 + DEDENT=2 + STRING=3 + NUMBER=4 + INTEGER=5 + AND=6 + AS=7 + ASSERT=8 + ASYNC=9 + AWAIT=10 + BREAK=11 + CASE=12 + CLASS=13 + CONTINUE=14 + DEF=15 + DEL=16 + ELIF=17 + ELSE=18 + EXCEPT=19 + FALSE=20 + FINALLY=21 + FOR=22 + FROM=23 + GLOBAL=24 + IF=25 + IMPORT=26 + IN=27 + IS=28 + LAMBDA=29 + MATCH=30 + NONE=31 + NONLOCAL=32 + NOT=33 + OR=34 + PASS=35 + RAISE=36 + RETURN=37 + TRUE=38 + TRY=39 + UNDERSCORE=40 + WHILE=41 + WITH=42 + YIELD=43 + NEWLINE=44 + NAME=45 + STRING_LITERAL=46 + BYTES_LITERAL=47 + DECIMAL_INTEGER=48 + OCT_INTEGER=49 + HEX_INTEGER=50 + BIN_INTEGER=51 + FLOAT_NUMBER=52 + IMAG_NUMBER=53 + DOT=54 + ELLIPSIS=55 + STAR=56 + OPEN_PAREN=57 + CLOSE_PAREN=58 + COMMA=59 + COLON=60 + SEMI_COLON=61 + POWER=62 + ASSIGN=63 + OPEN_BRACK=64 + CLOSE_BRACK=65 + OR_OP=66 + XOR=67 + AND_OP=68 + LEFT_SHIFT=69 + RIGHT_SHIFT=70 + ADD=71 + MINUS=72 + DIV=73 + MOD=74 + IDIV=75 + NOT_OP=76 + OPEN_BRACE=77 + CLOSE_BRACE=78 + LESS_THAN=79 + GREATER_THAN=80 + EQUALS=81 + GT_EQ=82 + LT_EQ=83 + NOT_EQ_1=84 + NOT_EQ_2=85 + AT=86 + ARROW=87 + ADD_ASSIGN=88 + SUB_ASSIGN=89 + MULT_ASSIGN=90 + AT_ASSIGN=91 + DIV_ASSIGN=92 + MOD_ASSIGN=93 + AND_ASSIGN=94 + OR_ASSIGN=95 + XOR_ASSIGN=96 + LEFT_SHIFT_ASSIGN=97 + RIGHT_SHIFT_ASSIGN=98 + POWER_ASSIGN=99 + IDIV_ASSIGN=100 + SKIP_=101 + UNKNOWN_CHAR=102 + + def __init__(self, input:TokenStream, output:TextIO = sys.stdout): + super().__init__(input, output) + self.checkVersion("4.13.1") + self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache) + self._predicates = None + + + + + class Single_inputContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def NEWLINE(self): + return self.getToken(Python3Parser.NEWLINE, 0) + + def simple_stmts(self): + return self.getTypedRuleContext(Python3Parser.Simple_stmtsContext,0) + + + def compound_stmt(self): + return self.getTypedRuleContext(Python3Parser.Compound_stmtContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_single_input + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSingle_input" ): + listener.enterSingle_input(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSingle_input" ): + listener.exitSingle_input(self) + + + + + def single_input(self): + + localctx = Python3Parser.Single_inputContext(self, self._ctx, self.state) + self.enterRule(localctx, 0, self.RULE_single_input) + try: + self.state = 243 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,0,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 238 + self.match(Python3Parser.NEWLINE) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 239 + self.simple_stmts() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 240 + self.compound_stmt() + self.state = 241 + self.match(Python3Parser.NEWLINE) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class File_inputContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def EOF(self): + return self.getToken(Python3Parser.EOF, 0) + + def NEWLINE(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.NEWLINE) + else: + return self.getToken(Python3Parser.NEWLINE, i) + + def stmt(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.StmtContext) + else: + return self.getTypedRuleContext(Python3Parser.StmtContext,i) + + + def getRuleIndex(self): + return Python3Parser.RULE_file_input + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFile_input" ): + listener.enterFile_input(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFile_input" ): + listener.exitFile_input(self) + + + + + def file_input(self): + + localctx = Python3Parser.File_inputContext(self, self._ctx, self.state) + self.enterRule(localctx, 2, self.RULE_file_input) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 249 + self._errHandler.sync(self) + _la = self._input.LA(1) + while (((_la) & ~0x3f) == 0 and ((1 << _la) & 252271930291384088) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 4206977) != 0): + self.state = 247 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [44]: + self.state = 245 + self.match(Python3Parser.NEWLINE) + pass + elif token in [3, 4, 8, 9, 10, 11, 13, 14, 15, 16, 20, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 55, 56, 57, 64, 71, 72, 76, 77, 86]: + self.state = 246 + self.stmt() + pass + else: + raise NoViableAltException(self) + + self.state = 251 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 252 + self.match(Python3Parser.EOF) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Eval_inputContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def testlist(self): + return self.getTypedRuleContext(Python3Parser.TestlistContext,0) + + + def EOF(self): + return self.getToken(Python3Parser.EOF, 0) + + def NEWLINE(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.NEWLINE) + else: + return self.getToken(Python3Parser.NEWLINE, i) + + def getRuleIndex(self): + return Python3Parser.RULE_eval_input + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEval_input" ): + listener.enterEval_input(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEval_input" ): + listener.exitEval_input(self) + + + + + def eval_input(self): + + localctx = Python3Parser.Eval_inputContext(self, self._ctx, self.state) + self.enterRule(localctx, 4, self.RULE_eval_input) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 254 + self.testlist() + self.state = 258 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==44: + self.state = 255 + self.match(Python3Parser.NEWLINE) + self.state = 260 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 261 + self.match(Python3Parser.EOF) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class DecoratorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def AT(self): + return self.getToken(Python3Parser.AT, 0) + + def dotted_name(self): + return self.getTypedRuleContext(Python3Parser.Dotted_nameContext,0) + + + def NEWLINE(self): + return self.getToken(Python3Parser.NEWLINE, 0) + + def OPEN_PAREN(self): + return self.getToken(Python3Parser.OPEN_PAREN, 0) + + def CLOSE_PAREN(self): + return self.getToken(Python3Parser.CLOSE_PAREN, 0) + + def arglist(self): + return self.getTypedRuleContext(Python3Parser.ArglistContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_decorator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDecorator" ): + listener.enterDecorator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDecorator" ): + listener.exitDecorator(self) + + + + + def decorator(self): + + localctx = Python3Parser.DecoratorContext(self, self._ctx, self.state) + self.enterRule(localctx, 6, self.RULE_decorator) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 263 + self.match(Python3Parser.AT) + self.state = 264 + self.dotted_name() + self.state = 270 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==57: + self.state = 265 + self.match(Python3Parser.OPEN_PAREN) + self.state = 267 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 4863924168670839832) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0): + self.state = 266 + self.arglist() + + + self.state = 269 + self.match(Python3Parser.CLOSE_PAREN) + + + self.state = 272 + self.match(Python3Parser.NEWLINE) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class DecoratorsContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def decorator(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.DecoratorContext) + else: + return self.getTypedRuleContext(Python3Parser.DecoratorContext,i) + + + def getRuleIndex(self): + return Python3Parser.RULE_decorators + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDecorators" ): + listener.enterDecorators(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDecorators" ): + listener.exitDecorators(self) + + + + + def decorators(self): + + localctx = Python3Parser.DecoratorsContext(self, self._ctx, self.state) + self.enterRule(localctx, 8, self.RULE_decorators) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 275 + self._errHandler.sync(self) + _la = self._input.LA(1) + while True: + self.state = 274 + self.decorator() + self.state = 277 + self._errHandler.sync(self) + _la = self._input.LA(1) + if not (_la==86): + break + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class DecoratedContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def decorators(self): + return self.getTypedRuleContext(Python3Parser.DecoratorsContext,0) + + + def classdef(self): + return self.getTypedRuleContext(Python3Parser.ClassdefContext,0) + + + def funcdef(self): + return self.getTypedRuleContext(Python3Parser.FuncdefContext,0) + + + def async_funcdef(self): + return self.getTypedRuleContext(Python3Parser.Async_funcdefContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_decorated + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDecorated" ): + listener.enterDecorated(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDecorated" ): + listener.exitDecorated(self) + + + + + def decorated(self): + + localctx = Python3Parser.DecoratedContext(self, self._ctx, self.state) + self.enterRule(localctx, 10, self.RULE_decorated) + try: + self.enterOuterAlt(localctx, 1) + self.state = 279 + self.decorators() + self.state = 283 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [13]: + self.state = 280 + self.classdef() + pass + elif token in [15]: + self.state = 281 + self.funcdef() + pass + elif token in [9]: + self.state = 282 + self.async_funcdef() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Async_funcdefContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def ASYNC(self): + return self.getToken(Python3Parser.ASYNC, 0) + + def funcdef(self): + return self.getTypedRuleContext(Python3Parser.FuncdefContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_async_funcdef + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAsync_funcdef" ): + listener.enterAsync_funcdef(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAsync_funcdef" ): + listener.exitAsync_funcdef(self) + + + + + def async_funcdef(self): + + localctx = Python3Parser.Async_funcdefContext(self, self._ctx, self.state) + self.enterRule(localctx, 12, self.RULE_async_funcdef) + try: + self.enterOuterAlt(localctx, 1) + self.state = 285 + self.match(Python3Parser.ASYNC) + self.state = 286 + self.funcdef() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class FuncdefContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def DEF(self): + return self.getToken(Python3Parser.DEF, 0) + + def name(self): + return self.getTypedRuleContext(Python3Parser.NameContext,0) + + + def parameters(self): + return self.getTypedRuleContext(Python3Parser.ParametersContext,0) + + + def COLON(self): + return self.getToken(Python3Parser.COLON, 0) + + def block(self): + return self.getTypedRuleContext(Python3Parser.BlockContext,0) + + + def ARROW(self): + return self.getToken(Python3Parser.ARROW, 0) + + def test(self): + return self.getTypedRuleContext(Python3Parser.TestContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_funcdef + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFuncdef" ): + listener.enterFuncdef(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFuncdef" ): + listener.exitFuncdef(self) + + + + + def funcdef(self): + + localctx = Python3Parser.FuncdefContext(self, self._ctx, self.state) + self.enterRule(localctx, 14, self.RULE_funcdef) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 288 + self.match(Python3Parser.DEF) + self.state = 289 + self.name() + self.state = 290 + self.parameters() + self.state = 293 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==87: + self.state = 291 + self.match(Python3Parser.ARROW) + self.state = 292 + self.test() + + + self.state = 295 + self.match(Python3Parser.COLON) + self.state = 296 + self.block() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ParametersContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def OPEN_PAREN(self): + return self.getToken(Python3Parser.OPEN_PAREN, 0) + + def CLOSE_PAREN(self): + return self.getToken(Python3Parser.CLOSE_PAREN, 0) + + def typedargslist(self): + return self.getTypedRuleContext(Python3Parser.TypedargslistContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_parameters + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterParameters" ): + listener.enterParameters(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitParameters" ): + listener.exitParameters(self) + + + + + def parameters(self): + + localctx = Python3Parser.ParametersContext(self, self._ctx, self.state) + self.enterRule(localctx, 16, self.RULE_parameters) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 298 + self.match(Python3Parser.OPEN_PAREN) + self.state = 300 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 4683779897422774272) != 0): + self.state = 299 + self.typedargslist() + + + self.state = 302 + self.match(Python3Parser.CLOSE_PAREN) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TypedargslistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def tfpdef(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.TfpdefContext) + else: + return self.getTypedRuleContext(Python3Parser.TfpdefContext,i) + + + def STAR(self): + return self.getToken(Python3Parser.STAR, 0) + + def POWER(self): + return self.getToken(Python3Parser.POWER, 0) + + def ASSIGN(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.ASSIGN) + else: + return self.getToken(Python3Parser.ASSIGN, i) + + def test(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.TestContext) + else: + return self.getTypedRuleContext(Python3Parser.TestContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def getRuleIndex(self): + return Python3Parser.RULE_typedargslist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypedargslist" ): + listener.enterTypedargslist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypedargslist" ): + listener.exitTypedargslist(self) + + + + + def typedargslist(self): + + localctx = Python3Parser.TypedargslistContext(self, self._ctx, self.state) + self.enterRule(localctx, 18, self.RULE_typedargslist) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 385 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [30, 40, 45]: + self.state = 304 + self.tfpdef() + self.state = 307 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==63: + self.state = 305 + self.match(Python3Parser.ASSIGN) + self.state = 306 + self.test() + + + self.state = 317 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,12,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 309 + self.match(Python3Parser.COMMA) + self.state = 310 + self.tfpdef() + self.state = 313 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==63: + self.state = 311 + self.match(Python3Parser.ASSIGN) + self.state = 312 + self.test() + + + self.state = 319 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,12,self._ctx) + + self.state = 353 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 320 + self.match(Python3Parser.COMMA) + self.state = 351 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [56]: + self.state = 321 + self.match(Python3Parser.STAR) + self.state = 323 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 36284957458432) != 0): + self.state = 322 + self.tfpdef() + + + self.state = 333 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,15,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 325 + self.match(Python3Parser.COMMA) + self.state = 326 + self.tfpdef() + self.state = 329 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==63: + self.state = 327 + self.match(Python3Parser.ASSIGN) + self.state = 328 + self.test() + + + self.state = 335 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,15,self._ctx) + + self.state = 344 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 336 + self.match(Python3Parser.COMMA) + self.state = 342 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==62: + self.state = 337 + self.match(Python3Parser.POWER) + self.state = 338 + self.tfpdef() + self.state = 340 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 339 + self.match(Python3Parser.COMMA) + + + + + + + pass + elif token in [62]: + self.state = 346 + self.match(Python3Parser.POWER) + self.state = 347 + self.tfpdef() + self.state = 349 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 348 + self.match(Python3Parser.COMMA) + + + pass + elif token in [58]: + pass + else: + pass + + + pass + elif token in [56]: + self.state = 355 + self.match(Python3Parser.STAR) + self.state = 357 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 36284957458432) != 0): + self.state = 356 + self.tfpdef() + + + self.state = 367 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,24,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 359 + self.match(Python3Parser.COMMA) + self.state = 360 + self.tfpdef() + self.state = 363 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==63: + self.state = 361 + self.match(Python3Parser.ASSIGN) + self.state = 362 + self.test() + + + self.state = 369 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,24,self._ctx) + + self.state = 378 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 370 + self.match(Python3Parser.COMMA) + self.state = 376 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==62: + self.state = 371 + self.match(Python3Parser.POWER) + self.state = 372 + self.tfpdef() + self.state = 374 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 373 + self.match(Python3Parser.COMMA) + + + + + + + pass + elif token in [62]: + self.state = 380 + self.match(Python3Parser.POWER) + self.state = 381 + self.tfpdef() + self.state = 383 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 382 + self.match(Python3Parser.COMMA) + + + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TfpdefContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def name(self): + return self.getTypedRuleContext(Python3Parser.NameContext,0) + + + def COLON(self): + return self.getToken(Python3Parser.COLON, 0) + + def test(self): + return self.getTypedRuleContext(Python3Parser.TestContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_tfpdef + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTfpdef" ): + listener.enterTfpdef(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTfpdef" ): + listener.exitTfpdef(self) + + + + + def tfpdef(self): + + localctx = Python3Parser.TfpdefContext(self, self._ctx, self.state) + self.enterRule(localctx, 20, self.RULE_tfpdef) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 387 + self.name() + self.state = 390 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==60: + self.state = 388 + self.match(Python3Parser.COLON) + self.state = 389 + self.test() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class VarargslistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def vfpdef(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.VfpdefContext) + else: + return self.getTypedRuleContext(Python3Parser.VfpdefContext,i) + + + def STAR(self): + return self.getToken(Python3Parser.STAR, 0) + + def POWER(self): + return self.getToken(Python3Parser.POWER, 0) + + def ASSIGN(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.ASSIGN) + else: + return self.getToken(Python3Parser.ASSIGN, i) + + def test(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.TestContext) + else: + return self.getTypedRuleContext(Python3Parser.TestContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def getRuleIndex(self): + return Python3Parser.RULE_varargslist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterVarargslist" ): + listener.enterVarargslist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitVarargslist" ): + listener.exitVarargslist(self) + + + + + def varargslist(self): + + localctx = Python3Parser.VarargslistContext(self, self._ctx, self.state) + self.enterRule(localctx, 22, self.RULE_varargslist) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 473 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [30, 40, 45]: + self.state = 392 + self.vfpdef() + self.state = 395 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==63: + self.state = 393 + self.match(Python3Parser.ASSIGN) + self.state = 394 + self.test() + + + self.state = 405 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,33,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 397 + self.match(Python3Parser.COMMA) + self.state = 398 + self.vfpdef() + self.state = 401 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==63: + self.state = 399 + self.match(Python3Parser.ASSIGN) + self.state = 400 + self.test() + + + self.state = 407 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,33,self._ctx) + + self.state = 441 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 408 + self.match(Python3Parser.COMMA) + self.state = 439 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [56]: + self.state = 409 + self.match(Python3Parser.STAR) + self.state = 411 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 36284957458432) != 0): + self.state = 410 + self.vfpdef() + + + self.state = 421 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,36,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 413 + self.match(Python3Parser.COMMA) + self.state = 414 + self.vfpdef() + self.state = 417 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==63: + self.state = 415 + self.match(Python3Parser.ASSIGN) + self.state = 416 + self.test() + + + self.state = 423 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,36,self._ctx) + + self.state = 432 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 424 + self.match(Python3Parser.COMMA) + self.state = 430 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==62: + self.state = 425 + self.match(Python3Parser.POWER) + self.state = 426 + self.vfpdef() + self.state = 428 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 427 + self.match(Python3Parser.COMMA) + + + + + + + pass + elif token in [62]: + self.state = 434 + self.match(Python3Parser.POWER) + self.state = 435 + self.vfpdef() + self.state = 437 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 436 + self.match(Python3Parser.COMMA) + + + pass + elif token in [60]: + pass + else: + pass + + + pass + elif token in [56]: + self.state = 443 + self.match(Python3Parser.STAR) + self.state = 445 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 36284957458432) != 0): + self.state = 444 + self.vfpdef() + + + self.state = 455 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,45,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 447 + self.match(Python3Parser.COMMA) + self.state = 448 + self.vfpdef() + self.state = 451 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==63: + self.state = 449 + self.match(Python3Parser.ASSIGN) + self.state = 450 + self.test() + + + self.state = 457 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,45,self._ctx) + + self.state = 466 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 458 + self.match(Python3Parser.COMMA) + self.state = 464 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==62: + self.state = 459 + self.match(Python3Parser.POWER) + self.state = 460 + self.vfpdef() + self.state = 462 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 461 + self.match(Python3Parser.COMMA) + + + + + + + pass + elif token in [62]: + self.state = 468 + self.match(Python3Parser.POWER) + self.state = 469 + self.vfpdef() + self.state = 471 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 470 + self.match(Python3Parser.COMMA) + + + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class VfpdefContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def name(self): + return self.getTypedRuleContext(Python3Parser.NameContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_vfpdef + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterVfpdef" ): + listener.enterVfpdef(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitVfpdef" ): + listener.exitVfpdef(self) + + + + + def vfpdef(self): + + localctx = Python3Parser.VfpdefContext(self, self._ctx, self.state) + self.enterRule(localctx, 24, self.RULE_vfpdef) + try: + self.enterOuterAlt(localctx, 1) + self.state = 475 + self.name() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class StmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def simple_stmts(self): + return self.getTypedRuleContext(Python3Parser.Simple_stmtsContext,0) + + + def compound_stmt(self): + return self.getTypedRuleContext(Python3Parser.Compound_stmtContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterStmt" ): + listener.enterStmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitStmt" ): + listener.exitStmt(self) + + + + + def stmt(self): + + localctx = Python3Parser.StmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 26, self.RULE_stmt) + try: + self.state = 479 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,51,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 477 + self.simple_stmts() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 478 + self.compound_stmt() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Simple_stmtsContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def simple_stmt(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Simple_stmtContext) + else: + return self.getTypedRuleContext(Python3Parser.Simple_stmtContext,i) + + + def NEWLINE(self): + return self.getToken(Python3Parser.NEWLINE, 0) + + def SEMI_COLON(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.SEMI_COLON) + else: + return self.getToken(Python3Parser.SEMI_COLON, i) + + def getRuleIndex(self): + return Python3Parser.RULE_simple_stmts + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSimple_stmts" ): + listener.enterSimple_stmts(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSimple_stmts" ): + listener.exitSimple_stmts(self) + + + + + def simple_stmts(self): + + localctx = Python3Parser.Simple_stmtsContext(self, self._ctx, self.state) + self.enterRule(localctx, 28, self.RULE_simple_stmts) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 481 + self.simple_stmt() + self.state = 486 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,52,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 482 + self.match(Python3Parser.SEMI_COLON) + self.state = 483 + self.simple_stmt() + self.state = 488 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,52,self._ctx) + + self.state = 490 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==61: + self.state = 489 + self.match(Python3Parser.SEMI_COLON) + + + self.state = 492 + self.match(Python3Parser.NEWLINE) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Simple_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def expr_stmt(self): + return self.getTypedRuleContext(Python3Parser.Expr_stmtContext,0) + + + def del_stmt(self): + return self.getTypedRuleContext(Python3Parser.Del_stmtContext,0) + + + def pass_stmt(self): + return self.getTypedRuleContext(Python3Parser.Pass_stmtContext,0) + + + def flow_stmt(self): + return self.getTypedRuleContext(Python3Parser.Flow_stmtContext,0) + + + def import_stmt(self): + return self.getTypedRuleContext(Python3Parser.Import_stmtContext,0) + + + def global_stmt(self): + return self.getTypedRuleContext(Python3Parser.Global_stmtContext,0) + + + def nonlocal_stmt(self): + return self.getTypedRuleContext(Python3Parser.Nonlocal_stmtContext,0) + + + def assert_stmt(self): + return self.getTypedRuleContext(Python3Parser.Assert_stmtContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_simple_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSimple_stmt" ): + listener.enterSimple_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSimple_stmt" ): + listener.exitSimple_stmt(self) + + + + + def simple_stmt(self): + + localctx = Python3Parser.Simple_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 30, self.RULE_simple_stmt) + try: + self.enterOuterAlt(localctx, 1) + self.state = 502 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 56, 57, 64, 71, 72, 76, 77]: + self.state = 494 + self.expr_stmt() + pass + elif token in [16]: + self.state = 495 + self.del_stmt() + pass + elif token in [35]: + self.state = 496 + self.pass_stmt() + pass + elif token in [11, 14, 36, 37, 43]: + self.state = 497 + self.flow_stmt() + pass + elif token in [23, 26]: + self.state = 498 + self.import_stmt() + pass + elif token in [24]: + self.state = 499 + self.global_stmt() + pass + elif token in [32]: + self.state = 500 + self.nonlocal_stmt() + pass + elif token in [8]: + self.state = 501 + self.assert_stmt() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Expr_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def testlist_star_expr(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Testlist_star_exprContext) + else: + return self.getTypedRuleContext(Python3Parser.Testlist_star_exprContext,i) + + + def annassign(self): + return self.getTypedRuleContext(Python3Parser.AnnassignContext,0) + + + def augassign(self): + return self.getTypedRuleContext(Python3Parser.AugassignContext,0) + + + def yield_expr(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Yield_exprContext) + else: + return self.getTypedRuleContext(Python3Parser.Yield_exprContext,i) + + + def testlist(self): + return self.getTypedRuleContext(Python3Parser.TestlistContext,0) + + + def ASSIGN(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.ASSIGN) + else: + return self.getToken(Python3Parser.ASSIGN, i) + + def getRuleIndex(self): + return Python3Parser.RULE_expr_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExpr_stmt" ): + listener.enterExpr_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExpr_stmt" ): + listener.exitExpr_stmt(self) + + + + + def expr_stmt(self): + + localctx = Python3Parser.Expr_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 32, self.RULE_expr_stmt) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 504 + self.testlist_star_expr() + self.state = 521 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [60]: + self.state = 505 + self.annassign() + pass + elif token in [88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]: + self.state = 506 + self.augassign() + self.state = 509 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [43]: + self.state = 507 + self.yield_expr() + pass + elif token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]: + self.state = 508 + self.testlist() + pass + else: + raise NoViableAltException(self) + + pass + elif token in [44, 61, 63]: + self.state = 518 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==63: + self.state = 511 + self.match(Python3Parser.ASSIGN) + self.state = 514 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [43]: + self.state = 512 + self.yield_expr() + pass + elif token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 56, 57, 64, 71, 72, 76, 77]: + self.state = 513 + self.testlist_star_expr() + pass + else: + raise NoViableAltException(self) + + self.state = 520 + self._errHandler.sync(self) + _la = self._input.LA(1) + + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AnnassignContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def COLON(self): + return self.getToken(Python3Parser.COLON, 0) + + def test(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.TestContext) + else: + return self.getTypedRuleContext(Python3Parser.TestContext,i) + + + def ASSIGN(self): + return self.getToken(Python3Parser.ASSIGN, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_annassign + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAnnassign" ): + listener.enterAnnassign(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAnnassign" ): + listener.exitAnnassign(self) + + + + + def annassign(self): + + localctx = Python3Parser.AnnassignContext(self, self._ctx, self.state) + self.enterRule(localctx, 34, self.RULE_annassign) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 523 + self.match(Python3Parser.COLON) + self.state = 524 + self.test() + self.state = 527 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==63: + self.state = 525 + self.match(Python3Parser.ASSIGN) + self.state = 526 + self.test() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Testlist_star_exprContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def test(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.TestContext) + else: + return self.getTypedRuleContext(Python3Parser.TestContext,i) + + + def star_expr(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Star_exprContext) + else: + return self.getTypedRuleContext(Python3Parser.Star_exprContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def getRuleIndex(self): + return Python3Parser.RULE_testlist_star_expr + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTestlist_star_expr" ): + listener.enterTestlist_star_expr(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTestlist_star_expr" ): + listener.exitTestlist_star_expr(self) + + + + + def testlist_star_expr(self): + + localctx = Python3Parser.Testlist_star_exprContext(self, self._ctx, self.state) + self.enterRule(localctx, 36, self.RULE_testlist_star_expr) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 531 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]: + self.state = 529 + self.test() + pass + elif token in [56]: + self.state = 530 + self.star_expr() + pass + else: + raise NoViableAltException(self) + + self.state = 540 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,62,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 533 + self.match(Python3Parser.COMMA) + self.state = 536 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]: + self.state = 534 + self.test() + pass + elif token in [56]: + self.state = 535 + self.star_expr() + pass + else: + raise NoViableAltException(self) + + self.state = 542 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,62,self._ctx) + + self.state = 544 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 543 + self.match(Python3Parser.COMMA) + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AugassignContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def ADD_ASSIGN(self): + return self.getToken(Python3Parser.ADD_ASSIGN, 0) + + def SUB_ASSIGN(self): + return self.getToken(Python3Parser.SUB_ASSIGN, 0) + + def MULT_ASSIGN(self): + return self.getToken(Python3Parser.MULT_ASSIGN, 0) + + def AT_ASSIGN(self): + return self.getToken(Python3Parser.AT_ASSIGN, 0) + + def DIV_ASSIGN(self): + return self.getToken(Python3Parser.DIV_ASSIGN, 0) + + def MOD_ASSIGN(self): + return self.getToken(Python3Parser.MOD_ASSIGN, 0) + + def AND_ASSIGN(self): + return self.getToken(Python3Parser.AND_ASSIGN, 0) + + def OR_ASSIGN(self): + return self.getToken(Python3Parser.OR_ASSIGN, 0) + + def XOR_ASSIGN(self): + return self.getToken(Python3Parser.XOR_ASSIGN, 0) + + def LEFT_SHIFT_ASSIGN(self): + return self.getToken(Python3Parser.LEFT_SHIFT_ASSIGN, 0) + + def RIGHT_SHIFT_ASSIGN(self): + return self.getToken(Python3Parser.RIGHT_SHIFT_ASSIGN, 0) + + def POWER_ASSIGN(self): + return self.getToken(Python3Parser.POWER_ASSIGN, 0) + + def IDIV_ASSIGN(self): + return self.getToken(Python3Parser.IDIV_ASSIGN, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_augassign + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAugassign" ): + listener.enterAugassign(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAugassign" ): + listener.exitAugassign(self) + + + + + def augassign(self): + + localctx = Python3Parser.AugassignContext(self, self._ctx, self.state) + self.enterRule(localctx, 38, self.RULE_augassign) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 546 + _la = self._input.LA(1) + if not(((((_la - 88)) & ~0x3f) == 0 and ((1 << (_la - 88)) & 8191) != 0)): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Del_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def DEL(self): + return self.getToken(Python3Parser.DEL, 0) + + def exprlist(self): + return self.getTypedRuleContext(Python3Parser.ExprlistContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_del_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDel_stmt" ): + listener.enterDel_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDel_stmt" ): + listener.exitDel_stmt(self) + + + + + def del_stmt(self): + + localctx = Python3Parser.Del_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 40, self.RULE_del_stmt) + try: + self.enterOuterAlt(localctx, 1) + self.state = 548 + self.match(Python3Parser.DEL) + self.state = 549 + self.exprlist() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Pass_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def PASS(self): + return self.getToken(Python3Parser.PASS, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_pass_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPass_stmt" ): + listener.enterPass_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPass_stmt" ): + listener.exitPass_stmt(self) + + + + + def pass_stmt(self): + + localctx = Python3Parser.Pass_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 42, self.RULE_pass_stmt) + try: + self.enterOuterAlt(localctx, 1) + self.state = 551 + self.match(Python3Parser.PASS) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Flow_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def break_stmt(self): + return self.getTypedRuleContext(Python3Parser.Break_stmtContext,0) + + + def continue_stmt(self): + return self.getTypedRuleContext(Python3Parser.Continue_stmtContext,0) + + + def return_stmt(self): + return self.getTypedRuleContext(Python3Parser.Return_stmtContext,0) + + + def raise_stmt(self): + return self.getTypedRuleContext(Python3Parser.Raise_stmtContext,0) + + + def yield_stmt(self): + return self.getTypedRuleContext(Python3Parser.Yield_stmtContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_flow_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFlow_stmt" ): + listener.enterFlow_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFlow_stmt" ): + listener.exitFlow_stmt(self) + + + + + def flow_stmt(self): + + localctx = Python3Parser.Flow_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 44, self.RULE_flow_stmt) + try: + self.state = 558 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [11]: + self.enterOuterAlt(localctx, 1) + self.state = 553 + self.break_stmt() + pass + elif token in [14]: + self.enterOuterAlt(localctx, 2) + self.state = 554 + self.continue_stmt() + pass + elif token in [37]: + self.enterOuterAlt(localctx, 3) + self.state = 555 + self.return_stmt() + pass + elif token in [36]: + self.enterOuterAlt(localctx, 4) + self.state = 556 + self.raise_stmt() + pass + elif token in [43]: + self.enterOuterAlt(localctx, 5) + self.state = 557 + self.yield_stmt() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Break_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def BREAK(self): + return self.getToken(Python3Parser.BREAK, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_break_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterBreak_stmt" ): + listener.enterBreak_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitBreak_stmt" ): + listener.exitBreak_stmt(self) + + + + + def break_stmt(self): + + localctx = Python3Parser.Break_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 46, self.RULE_break_stmt) + try: + self.enterOuterAlt(localctx, 1) + self.state = 560 + self.match(Python3Parser.BREAK) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Continue_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def CONTINUE(self): + return self.getToken(Python3Parser.CONTINUE, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_continue_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterContinue_stmt" ): + listener.enterContinue_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitContinue_stmt" ): + listener.exitContinue_stmt(self) + + + + + def continue_stmt(self): + + localctx = Python3Parser.Continue_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 48, self.RULE_continue_stmt) + try: + self.enterOuterAlt(localctx, 1) + self.state = 562 + self.match(Python3Parser.CONTINUE) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Return_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def RETURN(self): + return self.getToken(Python3Parser.RETURN, 0) + + def testlist(self): + return self.getTypedRuleContext(Python3Parser.TestlistContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_return_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterReturn_stmt" ): + listener.enterReturn_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitReturn_stmt" ): + listener.exitReturn_stmt(self) + + + + + def return_stmt(self): + + localctx = Python3Parser.Return_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 50, self.RULE_return_stmt) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 564 + self.match(Python3Parser.RETURN) + self.state = 566 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 180180556205523992) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0): + self.state = 565 + self.testlist() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Yield_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def yield_expr(self): + return self.getTypedRuleContext(Python3Parser.Yield_exprContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_yield_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterYield_stmt" ): + listener.enterYield_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitYield_stmt" ): + listener.exitYield_stmt(self) + + + + + def yield_stmt(self): + + localctx = Python3Parser.Yield_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 52, self.RULE_yield_stmt) + try: + self.enterOuterAlt(localctx, 1) + self.state = 568 + self.yield_expr() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Raise_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def RAISE(self): + return self.getToken(Python3Parser.RAISE, 0) + + def test(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.TestContext) + else: + return self.getTypedRuleContext(Python3Parser.TestContext,i) + + + def FROM(self): + return self.getToken(Python3Parser.FROM, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_raise_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterRaise_stmt" ): + listener.enterRaise_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitRaise_stmt" ): + listener.exitRaise_stmt(self) + + + + + def raise_stmt(self): + + localctx = Python3Parser.Raise_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 54, self.RULE_raise_stmt) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 570 + self.match(Python3Parser.RAISE) + self.state = 576 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 180180556205523992) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0): + self.state = 571 + self.test() + self.state = 574 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==23: + self.state = 572 + self.match(Python3Parser.FROM) + self.state = 573 + self.test() + + + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Import_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def import_name(self): + return self.getTypedRuleContext(Python3Parser.Import_nameContext,0) + + + def import_from(self): + return self.getTypedRuleContext(Python3Parser.Import_fromContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_import_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterImport_stmt" ): + listener.enterImport_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitImport_stmt" ): + listener.exitImport_stmt(self) + + + + + def import_stmt(self): + + localctx = Python3Parser.Import_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 56, self.RULE_import_stmt) + try: + self.state = 580 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [26]: + self.enterOuterAlt(localctx, 1) + self.state = 578 + self.import_name() + pass + elif token in [23]: + self.enterOuterAlt(localctx, 2) + self.state = 579 + self.import_from() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Import_nameContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def IMPORT(self): + return self.getToken(Python3Parser.IMPORT, 0) + + def dotted_as_names(self): + return self.getTypedRuleContext(Python3Parser.Dotted_as_namesContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_import_name + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterImport_name" ): + listener.enterImport_name(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitImport_name" ): + listener.exitImport_name(self) + + + + + def import_name(self): + + localctx = Python3Parser.Import_nameContext(self, self._ctx, self.state) + self.enterRule(localctx, 58, self.RULE_import_name) + try: + self.enterOuterAlt(localctx, 1) + self.state = 582 + self.match(Python3Parser.IMPORT) + self.state = 583 + self.dotted_as_names() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Import_fromContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def FROM(self): + return self.getToken(Python3Parser.FROM, 0) + + def IMPORT(self): + return self.getToken(Python3Parser.IMPORT, 0) + + def dotted_name(self): + return self.getTypedRuleContext(Python3Parser.Dotted_nameContext,0) + + + def STAR(self): + return self.getToken(Python3Parser.STAR, 0) + + def OPEN_PAREN(self): + return self.getToken(Python3Parser.OPEN_PAREN, 0) + + def import_as_names(self): + return self.getTypedRuleContext(Python3Parser.Import_as_namesContext,0) + + + def CLOSE_PAREN(self): + return self.getToken(Python3Parser.CLOSE_PAREN, 0) + + def DOT(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.DOT) + else: + return self.getToken(Python3Parser.DOT, i) + + def ELLIPSIS(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.ELLIPSIS) + else: + return self.getToken(Python3Parser.ELLIPSIS, i) + + def getRuleIndex(self): + return Python3Parser.RULE_import_from + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterImport_from" ): + listener.enterImport_from(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitImport_from" ): + listener.exitImport_from(self) + + + + + def import_from(self): + + localctx = Python3Parser.Import_fromContext(self, self._ctx, self.state) + self.enterRule(localctx, 60, self.RULE_import_from) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 585 + self.match(Python3Parser.FROM) + self.state = 598 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,71,self._ctx) + if la_ == 1: + self.state = 589 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==54 or _la==55: + self.state = 586 + _la = self._input.LA(1) + if not(_la==54 or _la==55): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + self.state = 591 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 592 + self.dotted_name() + pass + + elif la_ == 2: + self.state = 594 + self._errHandler.sync(self) + _la = self._input.LA(1) + while True: + self.state = 593 + _la = self._input.LA(1) + if not(_la==54 or _la==55): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + self.state = 596 + self._errHandler.sync(self) + _la = self._input.LA(1) + if not (_la==54 or _la==55): + break + + pass + + + self.state = 600 + self.match(Python3Parser.IMPORT) + self.state = 607 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [56]: + self.state = 601 + self.match(Python3Parser.STAR) + pass + elif token in [57]: + self.state = 602 + self.match(Python3Parser.OPEN_PAREN) + self.state = 603 + self.import_as_names() + self.state = 604 + self.match(Python3Parser.CLOSE_PAREN) + pass + elif token in [30, 40, 45]: + self.state = 606 + self.import_as_names() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Import_as_nameContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def name(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.NameContext) + else: + return self.getTypedRuleContext(Python3Parser.NameContext,i) + + + def AS(self): + return self.getToken(Python3Parser.AS, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_import_as_name + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterImport_as_name" ): + listener.enterImport_as_name(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitImport_as_name" ): + listener.exitImport_as_name(self) + + + + + def import_as_name(self): + + localctx = Python3Parser.Import_as_nameContext(self, self._ctx, self.state) + self.enterRule(localctx, 62, self.RULE_import_as_name) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 609 + self.name() + self.state = 612 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==7: + self.state = 610 + self.match(Python3Parser.AS) + self.state = 611 + self.name() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Dotted_as_nameContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def dotted_name(self): + return self.getTypedRuleContext(Python3Parser.Dotted_nameContext,0) + + + def AS(self): + return self.getToken(Python3Parser.AS, 0) + + def name(self): + return self.getTypedRuleContext(Python3Parser.NameContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_dotted_as_name + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDotted_as_name" ): + listener.enterDotted_as_name(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDotted_as_name" ): + listener.exitDotted_as_name(self) + + + + + def dotted_as_name(self): + + localctx = Python3Parser.Dotted_as_nameContext(self, self._ctx, self.state) + self.enterRule(localctx, 64, self.RULE_dotted_as_name) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 614 + self.dotted_name() + self.state = 617 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==7: + self.state = 615 + self.match(Python3Parser.AS) + self.state = 616 + self.name() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Import_as_namesContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def import_as_name(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Import_as_nameContext) + else: + return self.getTypedRuleContext(Python3Parser.Import_as_nameContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def getRuleIndex(self): + return Python3Parser.RULE_import_as_names + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterImport_as_names" ): + listener.enterImport_as_names(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitImport_as_names" ): + listener.exitImport_as_names(self) + + + + + def import_as_names(self): + + localctx = Python3Parser.Import_as_namesContext(self, self._ctx, self.state) + self.enterRule(localctx, 66, self.RULE_import_as_names) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 619 + self.import_as_name() + self.state = 624 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,75,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 620 + self.match(Python3Parser.COMMA) + self.state = 621 + self.import_as_name() + self.state = 626 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,75,self._ctx) + + self.state = 628 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 627 + self.match(Python3Parser.COMMA) + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Dotted_as_namesContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def dotted_as_name(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Dotted_as_nameContext) + else: + return self.getTypedRuleContext(Python3Parser.Dotted_as_nameContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def getRuleIndex(self): + return Python3Parser.RULE_dotted_as_names + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDotted_as_names" ): + listener.enterDotted_as_names(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDotted_as_names" ): + listener.exitDotted_as_names(self) + + + + + def dotted_as_names(self): + + localctx = Python3Parser.Dotted_as_namesContext(self, self._ctx, self.state) + self.enterRule(localctx, 68, self.RULE_dotted_as_names) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 630 + self.dotted_as_name() + self.state = 635 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==59: + self.state = 631 + self.match(Python3Parser.COMMA) + self.state = 632 + self.dotted_as_name() + self.state = 637 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Dotted_nameContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def name(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.NameContext) + else: + return self.getTypedRuleContext(Python3Parser.NameContext,i) + + + def DOT(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.DOT) + else: + return self.getToken(Python3Parser.DOT, i) + + def getRuleIndex(self): + return Python3Parser.RULE_dotted_name + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDotted_name" ): + listener.enterDotted_name(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDotted_name" ): + listener.exitDotted_name(self) + + + + + def dotted_name(self): + + localctx = Python3Parser.Dotted_nameContext(self, self._ctx, self.state) + self.enterRule(localctx, 70, self.RULE_dotted_name) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 638 + self.name() + self.state = 643 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==54: + self.state = 639 + self.match(Python3Parser.DOT) + self.state = 640 + self.name() + self.state = 645 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Global_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def GLOBAL(self): + return self.getToken(Python3Parser.GLOBAL, 0) + + def name(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.NameContext) + else: + return self.getTypedRuleContext(Python3Parser.NameContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def getRuleIndex(self): + return Python3Parser.RULE_global_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterGlobal_stmt" ): + listener.enterGlobal_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitGlobal_stmt" ): + listener.exitGlobal_stmt(self) + + + + + def global_stmt(self): + + localctx = Python3Parser.Global_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 72, self.RULE_global_stmt) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 646 + self.match(Python3Parser.GLOBAL) + self.state = 647 + self.name() + self.state = 652 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==59: + self.state = 648 + self.match(Python3Parser.COMMA) + self.state = 649 + self.name() + self.state = 654 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Nonlocal_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def NONLOCAL(self): + return self.getToken(Python3Parser.NONLOCAL, 0) + + def name(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.NameContext) + else: + return self.getTypedRuleContext(Python3Parser.NameContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def getRuleIndex(self): + return Python3Parser.RULE_nonlocal_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNonlocal_stmt" ): + listener.enterNonlocal_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNonlocal_stmt" ): + listener.exitNonlocal_stmt(self) + + + + + def nonlocal_stmt(self): + + localctx = Python3Parser.Nonlocal_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 74, self.RULE_nonlocal_stmt) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 655 + self.match(Python3Parser.NONLOCAL) + self.state = 656 + self.name() + self.state = 661 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==59: + self.state = 657 + self.match(Python3Parser.COMMA) + self.state = 658 + self.name() + self.state = 663 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Assert_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def ASSERT(self): + return self.getToken(Python3Parser.ASSERT, 0) + + def test(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.TestContext) + else: + return self.getTypedRuleContext(Python3Parser.TestContext,i) + + + def COMMA(self): + return self.getToken(Python3Parser.COMMA, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_assert_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAssert_stmt" ): + listener.enterAssert_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAssert_stmt" ): + listener.exitAssert_stmt(self) + + + + + def assert_stmt(self): + + localctx = Python3Parser.Assert_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 76, self.RULE_assert_stmt) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 664 + self.match(Python3Parser.ASSERT) + self.state = 665 + self.test() + self.state = 668 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 666 + self.match(Python3Parser.COMMA) + self.state = 667 + self.test() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Compound_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def if_stmt(self): + return self.getTypedRuleContext(Python3Parser.If_stmtContext,0) + + + def while_stmt(self): + return self.getTypedRuleContext(Python3Parser.While_stmtContext,0) + + + def for_stmt(self): + return self.getTypedRuleContext(Python3Parser.For_stmtContext,0) + + + def try_stmt(self): + return self.getTypedRuleContext(Python3Parser.Try_stmtContext,0) + + + def with_stmt(self): + return self.getTypedRuleContext(Python3Parser.With_stmtContext,0) + + + def funcdef(self): + return self.getTypedRuleContext(Python3Parser.FuncdefContext,0) + + + def classdef(self): + return self.getTypedRuleContext(Python3Parser.ClassdefContext,0) + + + def decorated(self): + return self.getTypedRuleContext(Python3Parser.DecoratedContext,0) + + + def async_stmt(self): + return self.getTypedRuleContext(Python3Parser.Async_stmtContext,0) + + + def match_stmt(self): + return self.getTypedRuleContext(Python3Parser.Match_stmtContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_compound_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCompound_stmt" ): + listener.enterCompound_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCompound_stmt" ): + listener.exitCompound_stmt(self) + + + + + def compound_stmt(self): + + localctx = Python3Parser.Compound_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 78, self.RULE_compound_stmt) + try: + self.state = 680 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [25]: + self.enterOuterAlt(localctx, 1) + self.state = 670 + self.if_stmt() + pass + elif token in [41]: + self.enterOuterAlt(localctx, 2) + self.state = 671 + self.while_stmt() + pass + elif token in [22]: + self.enterOuterAlt(localctx, 3) + self.state = 672 + self.for_stmt() + pass + elif token in [39]: + self.enterOuterAlt(localctx, 4) + self.state = 673 + self.try_stmt() + pass + elif token in [42]: + self.enterOuterAlt(localctx, 5) + self.state = 674 + self.with_stmt() + pass + elif token in [15]: + self.enterOuterAlt(localctx, 6) + self.state = 675 + self.funcdef() + pass + elif token in [13]: + self.enterOuterAlt(localctx, 7) + self.state = 676 + self.classdef() + pass + elif token in [86]: + self.enterOuterAlt(localctx, 8) + self.state = 677 + self.decorated() + pass + elif token in [9]: + self.enterOuterAlt(localctx, 9) + self.state = 678 + self.async_stmt() + pass + elif token in [30]: + self.enterOuterAlt(localctx, 10) + self.state = 679 + self.match_stmt() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Async_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def ASYNC(self): + return self.getToken(Python3Parser.ASYNC, 0) + + def funcdef(self): + return self.getTypedRuleContext(Python3Parser.FuncdefContext,0) + + + def with_stmt(self): + return self.getTypedRuleContext(Python3Parser.With_stmtContext,0) + + + def for_stmt(self): + return self.getTypedRuleContext(Python3Parser.For_stmtContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_async_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAsync_stmt" ): + listener.enterAsync_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAsync_stmt" ): + listener.exitAsync_stmt(self) + + + + + def async_stmt(self): + + localctx = Python3Parser.Async_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 80, self.RULE_async_stmt) + try: + self.enterOuterAlt(localctx, 1) + self.state = 682 + self.match(Python3Parser.ASYNC) + self.state = 686 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [15]: + self.state = 683 + self.funcdef() + pass + elif token in [42]: + self.state = 684 + self.with_stmt() + pass + elif token in [22]: + self.state = 685 + self.for_stmt() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class If_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def IF(self): + return self.getToken(Python3Parser.IF, 0) + + def test(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.TestContext) + else: + return self.getTypedRuleContext(Python3Parser.TestContext,i) + + + def COLON(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COLON) + else: + return self.getToken(Python3Parser.COLON, i) + + def block(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.BlockContext) + else: + return self.getTypedRuleContext(Python3Parser.BlockContext,i) + + + def ELIF(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.ELIF) + else: + return self.getToken(Python3Parser.ELIF, i) + + def ELSE(self): + return self.getToken(Python3Parser.ELSE, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_if_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterIf_stmt" ): + listener.enterIf_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitIf_stmt" ): + listener.exitIf_stmt(self) + + + + + def if_stmt(self): + + localctx = Python3Parser.If_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 82, self.RULE_if_stmt) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 688 + self.match(Python3Parser.IF) + self.state = 689 + self.test() + self.state = 690 + self.match(Python3Parser.COLON) + self.state = 691 + self.block() + self.state = 699 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==17: + self.state = 692 + self.match(Python3Parser.ELIF) + self.state = 693 + self.test() + self.state = 694 + self.match(Python3Parser.COLON) + self.state = 695 + self.block() + self.state = 701 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 705 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==18: + self.state = 702 + self.match(Python3Parser.ELSE) + self.state = 703 + self.match(Python3Parser.COLON) + self.state = 704 + self.block() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class While_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def WHILE(self): + return self.getToken(Python3Parser.WHILE, 0) + + def test(self): + return self.getTypedRuleContext(Python3Parser.TestContext,0) + + + def COLON(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COLON) + else: + return self.getToken(Python3Parser.COLON, i) + + def block(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.BlockContext) + else: + return self.getTypedRuleContext(Python3Parser.BlockContext,i) + + + def ELSE(self): + return self.getToken(Python3Parser.ELSE, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_while_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterWhile_stmt" ): + listener.enterWhile_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitWhile_stmt" ): + listener.exitWhile_stmt(self) + + + + + def while_stmt(self): + + localctx = Python3Parser.While_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 84, self.RULE_while_stmt) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 707 + self.match(Python3Parser.WHILE) + self.state = 708 + self.test() + self.state = 709 + self.match(Python3Parser.COLON) + self.state = 710 + self.block() + self.state = 714 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==18: + self.state = 711 + self.match(Python3Parser.ELSE) + self.state = 712 + self.match(Python3Parser.COLON) + self.state = 713 + self.block() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class For_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def FOR(self): + return self.getToken(Python3Parser.FOR, 0) + + def exprlist(self): + return self.getTypedRuleContext(Python3Parser.ExprlistContext,0) + + + def IN(self): + return self.getToken(Python3Parser.IN, 0) + + def testlist(self): + return self.getTypedRuleContext(Python3Parser.TestlistContext,0) + + + def COLON(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COLON) + else: + return self.getToken(Python3Parser.COLON, i) + + def block(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.BlockContext) + else: + return self.getTypedRuleContext(Python3Parser.BlockContext,i) + + + def ELSE(self): + return self.getToken(Python3Parser.ELSE, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_for_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFor_stmt" ): + listener.enterFor_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFor_stmt" ): + listener.exitFor_stmt(self) + + + + + def for_stmt(self): + + localctx = Python3Parser.For_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 86, self.RULE_for_stmt) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 716 + self.match(Python3Parser.FOR) + self.state = 717 + self.exprlist() + self.state = 718 + self.match(Python3Parser.IN) + self.state = 719 + self.testlist() + self.state = 720 + self.match(Python3Parser.COLON) + self.state = 721 + self.block() + self.state = 725 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==18: + self.state = 722 + self.match(Python3Parser.ELSE) + self.state = 723 + self.match(Python3Parser.COLON) + self.state = 724 + self.block() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Try_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def TRY(self): + return self.getToken(Python3Parser.TRY, 0) + + def COLON(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COLON) + else: + return self.getToken(Python3Parser.COLON, i) + + def block(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.BlockContext) + else: + return self.getTypedRuleContext(Python3Parser.BlockContext,i) + + + def FINALLY(self): + return self.getToken(Python3Parser.FINALLY, 0) + + def except_clause(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Except_clauseContext) + else: + return self.getTypedRuleContext(Python3Parser.Except_clauseContext,i) + + + def ELSE(self): + return self.getToken(Python3Parser.ELSE, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_try_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTry_stmt" ): + listener.enterTry_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTry_stmt" ): + listener.exitTry_stmt(self) + + + + + def try_stmt(self): + + localctx = Python3Parser.Try_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 88, self.RULE_try_stmt) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 727 + self.match(Python3Parser.TRY) + self.state = 728 + self.match(Python3Parser.COLON) + self.state = 729 + self.block() + self.state = 751 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [19]: + self.state = 734 + self._errHandler.sync(self) + _la = self._input.LA(1) + while True: + self.state = 730 + self.except_clause() + self.state = 731 + self.match(Python3Parser.COLON) + self.state = 732 + self.block() + self.state = 736 + self._errHandler.sync(self) + _la = self._input.LA(1) + if not (_la==19): + break + + self.state = 741 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==18: + self.state = 738 + self.match(Python3Parser.ELSE) + self.state = 739 + self.match(Python3Parser.COLON) + self.state = 740 + self.block() + + + self.state = 746 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==21: + self.state = 743 + self.match(Python3Parser.FINALLY) + self.state = 744 + self.match(Python3Parser.COLON) + self.state = 745 + self.block() + + + pass + elif token in [21]: + self.state = 748 + self.match(Python3Parser.FINALLY) + self.state = 749 + self.match(Python3Parser.COLON) + self.state = 750 + self.block() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class With_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def WITH(self): + return self.getToken(Python3Parser.WITH, 0) + + def with_item(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.With_itemContext) + else: + return self.getTypedRuleContext(Python3Parser.With_itemContext,i) + + + def COLON(self): + return self.getToken(Python3Parser.COLON, 0) + + def block(self): + return self.getTypedRuleContext(Python3Parser.BlockContext,0) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def getRuleIndex(self): + return Python3Parser.RULE_with_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterWith_stmt" ): + listener.enterWith_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitWith_stmt" ): + listener.exitWith_stmt(self) + + + + + def with_stmt(self): + + localctx = Python3Parser.With_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 90, self.RULE_with_stmt) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 753 + self.match(Python3Parser.WITH) + self.state = 754 + self.with_item() + self.state = 759 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==59: + self.state = 755 + self.match(Python3Parser.COMMA) + self.state = 756 + self.with_item() + self.state = 761 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 762 + self.match(Python3Parser.COLON) + self.state = 763 + self.block() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class With_itemContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def test(self): + return self.getTypedRuleContext(Python3Parser.TestContext,0) + + + def AS(self): + return self.getToken(Python3Parser.AS, 0) + + def expr(self): + return self.getTypedRuleContext(Python3Parser.ExprContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_with_item + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterWith_item" ): + listener.enterWith_item(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitWith_item" ): + listener.exitWith_item(self) + + + + + def with_item(self): + + localctx = Python3Parser.With_itemContext(self, self._ctx, self.state) + self.enterRule(localctx, 92, self.RULE_with_item) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 765 + self.test() + self.state = 768 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==7: + self.state = 766 + self.match(Python3Parser.AS) + self.state = 767 + self.expr(0) + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Except_clauseContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def EXCEPT(self): + return self.getToken(Python3Parser.EXCEPT, 0) + + def test(self): + return self.getTypedRuleContext(Python3Parser.TestContext,0) + + + def AS(self): + return self.getToken(Python3Parser.AS, 0) + + def name(self): + return self.getTypedRuleContext(Python3Parser.NameContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_except_clause + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExcept_clause" ): + listener.enterExcept_clause(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExcept_clause" ): + listener.exitExcept_clause(self) + + + + + def except_clause(self): + + localctx = Python3Parser.Except_clauseContext(self, self._ctx, self.state) + self.enterRule(localctx, 94, self.RULE_except_clause) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 770 + self.match(Python3Parser.EXCEPT) + self.state = 776 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 180180556205523992) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0): + self.state = 771 + self.test() + self.state = 774 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==7: + self.state = 772 + self.match(Python3Parser.AS) + self.state = 773 + self.name() + + + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class BlockContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def simple_stmts(self): + return self.getTypedRuleContext(Python3Parser.Simple_stmtsContext,0) + + + def NEWLINE(self): + return self.getToken(Python3Parser.NEWLINE, 0) + + def INDENT(self): + return self.getToken(Python3Parser.INDENT, 0) + + def DEDENT(self): + return self.getToken(Python3Parser.DEDENT, 0) + + def stmt(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.StmtContext) + else: + return self.getTypedRuleContext(Python3Parser.StmtContext,i) + + + def getRuleIndex(self): + return Python3Parser.RULE_block + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterBlock" ): + listener.enterBlock(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitBlock" ): + listener.exitBlock(self) + + + + + def block(self): + + localctx = Python3Parser.BlockContext(self, self._ctx, self.state) + self.enterRule(localctx, 96, self.RULE_block) + self._la = 0 # Token type + try: + self.state = 788 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [3, 4, 8, 10, 11, 14, 16, 20, 23, 24, 26, 29, 30, 31, 32, 33, 35, 36, 37, 38, 40, 43, 45, 55, 56, 57, 64, 71, 72, 76, 77]: + self.enterOuterAlt(localctx, 1) + self.state = 778 + self.simple_stmts() + pass + elif token in [44]: + self.enterOuterAlt(localctx, 2) + self.state = 779 + self.match(Python3Parser.NEWLINE) + self.state = 780 + self.match(Python3Parser.INDENT) + self.state = 782 + self._errHandler.sync(self) + _la = self._input.LA(1) + while True: + self.state = 781 + self.stmt() + self.state = 784 + self._errHandler.sync(self) + _la = self._input.LA(1) + if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & 252254338105339672) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 4206977) != 0)): + break + + self.state = 786 + self.match(Python3Parser.DEDENT) + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Match_stmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def MATCH(self): + return self.getToken(Python3Parser.MATCH, 0) + + def subject_expr(self): + return self.getTypedRuleContext(Python3Parser.Subject_exprContext,0) + + + def COLON(self): + return self.getToken(Python3Parser.COLON, 0) + + def NEWLINE(self): + return self.getToken(Python3Parser.NEWLINE, 0) + + def INDENT(self): + return self.getToken(Python3Parser.INDENT, 0) + + def DEDENT(self): + return self.getToken(Python3Parser.DEDENT, 0) + + def case_block(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Case_blockContext) + else: + return self.getTypedRuleContext(Python3Parser.Case_blockContext,i) + + + def getRuleIndex(self): + return Python3Parser.RULE_match_stmt + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMatch_stmt" ): + listener.enterMatch_stmt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMatch_stmt" ): + listener.exitMatch_stmt(self) + + + + + def match_stmt(self): + + localctx = Python3Parser.Match_stmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 98, self.RULE_match_stmt) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 790 + self.match(Python3Parser.MATCH) + self.state = 791 + self.subject_expr() + self.state = 792 + self.match(Python3Parser.COLON) + self.state = 793 + self.match(Python3Parser.NEWLINE) + self.state = 794 + self.match(Python3Parser.INDENT) + self.state = 796 + self._errHandler.sync(self) + _la = self._input.LA(1) + while True: + self.state = 795 + self.case_block() + self.state = 798 + self._errHandler.sync(self) + _la = self._input.LA(1) + if not (_la==12): + break + + self.state = 800 + self.match(Python3Parser.DEDENT) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Subject_exprContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def star_named_expression(self): + return self.getTypedRuleContext(Python3Parser.Star_named_expressionContext,0) + + + def COMMA(self): + return self.getToken(Python3Parser.COMMA, 0) + + def star_named_expressions(self): + return self.getTypedRuleContext(Python3Parser.Star_named_expressionsContext,0) + + + def test(self): + return self.getTypedRuleContext(Python3Parser.TestContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_subject_expr + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSubject_expr" ): + listener.enterSubject_expr(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSubject_expr" ): + listener.exitSubject_expr(self) + + + + + def subject_expr(self): + + localctx = Python3Parser.Subject_exprContext(self, self._ctx, self.state) + self.enterRule(localctx, 100, self.RULE_subject_expr) + self._la = 0 # Token type + try: + self.state = 808 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,100,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 802 + self.star_named_expression() + self.state = 803 + self.match(Python3Parser.COMMA) + self.state = 805 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 804 + self.star_named_expressions() + + + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 807 + self.test() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Star_named_expressionsContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def star_named_expression(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Star_named_expressionContext) + else: + return self.getTypedRuleContext(Python3Parser.Star_named_expressionContext,i) + + + def getRuleIndex(self): + return Python3Parser.RULE_star_named_expressions + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterStar_named_expressions" ): + listener.enterStar_named_expressions(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitStar_named_expressions" ): + listener.exitStar_named_expressions(self) + + + + + def star_named_expressions(self): + + localctx = Python3Parser.Star_named_expressionsContext(self, self._ctx, self.state) + self.enterRule(localctx, 102, self.RULE_star_named_expressions) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 810 + self.match(Python3Parser.COMMA) + self.state = 812 + self._errHandler.sync(self) + _la = self._input.LA(1) + while True: + self.state = 811 + self.star_named_expression() + self.state = 814 + self._errHandler.sync(self) + _la = self._input.LA(1) + if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & 252238150243451928) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0)): + break + + self.state = 817 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 816 + self.match(Python3Parser.COMMA) + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Star_named_expressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def STAR(self): + return self.getToken(Python3Parser.STAR, 0) + + def expr(self): + return self.getTypedRuleContext(Python3Parser.ExprContext,0) + + + def test(self): + return self.getTypedRuleContext(Python3Parser.TestContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_star_named_expression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterStar_named_expression" ): + listener.enterStar_named_expression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitStar_named_expression" ): + listener.exitStar_named_expression(self) + + + + + def star_named_expression(self): + + localctx = Python3Parser.Star_named_expressionContext(self, self._ctx, self.state) + self.enterRule(localctx, 104, self.RULE_star_named_expression) + try: + self.state = 822 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [56]: + self.enterOuterAlt(localctx, 1) + self.state = 819 + self.match(Python3Parser.STAR) + self.state = 820 + self.expr(0) + pass + elif token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]: + self.enterOuterAlt(localctx, 2) + self.state = 821 + self.test() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Case_blockContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def CASE(self): + return self.getToken(Python3Parser.CASE, 0) + + def patterns(self): + return self.getTypedRuleContext(Python3Parser.PatternsContext,0) + + + def COLON(self): + return self.getToken(Python3Parser.COLON, 0) + + def block(self): + return self.getTypedRuleContext(Python3Parser.BlockContext,0) + + + def guard(self): + return self.getTypedRuleContext(Python3Parser.GuardContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_case_block + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCase_block" ): + listener.enterCase_block(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCase_block" ): + listener.exitCase_block(self) + + + + + def case_block(self): + + localctx = Python3Parser.Case_blockContext(self, self._ctx, self.state) + self.enterRule(localctx, 106, self.RULE_case_block) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 824 + self.match(Python3Parser.CASE) + self.state = 825 + self.patterns() + self.state = 827 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==25: + self.state = 826 + self.guard() + + + self.state = 829 + self.match(Python3Parser.COLON) + self.state = 830 + self.block() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class GuardContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def IF(self): + return self.getToken(Python3Parser.IF, 0) + + def test(self): + return self.getTypedRuleContext(Python3Parser.TestContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_guard + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterGuard" ): + listener.enterGuard(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitGuard" ): + listener.exitGuard(self) + + + + + def guard(self): + + localctx = Python3Parser.GuardContext(self, self._ctx, self.state) + self.enterRule(localctx, 108, self.RULE_guard) + try: + self.enterOuterAlt(localctx, 1) + self.state = 832 + self.match(Python3Parser.IF) + self.state = 833 + self.test() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class PatternsContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def open_sequence_pattern(self): + return self.getTypedRuleContext(Python3Parser.Open_sequence_patternContext,0) + + + def pattern(self): + return self.getTypedRuleContext(Python3Parser.PatternContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_patterns + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPatterns" ): + listener.enterPatterns(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPatterns" ): + listener.exitPatterns(self) + + + + + def patterns(self): + + localctx = Python3Parser.PatternsContext(self, self._ctx, self.state) + self.enterRule(localctx, 110, self.RULE_patterns) + try: + self.state = 837 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,105,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 835 + self.open_sequence_pattern() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 836 + self.pattern() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class PatternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def as_pattern(self): + return self.getTypedRuleContext(Python3Parser.As_patternContext,0) + + + def or_pattern(self): + return self.getTypedRuleContext(Python3Parser.Or_patternContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPattern" ): + listener.enterPattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPattern" ): + listener.exitPattern(self) + + + + + def pattern(self): + + localctx = Python3Parser.PatternContext(self, self._ctx, self.state) + self.enterRule(localctx, 112, self.RULE_pattern) + try: + self.state = 841 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,106,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 839 + self.as_pattern() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 840 + self.or_pattern() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class As_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def or_pattern(self): + return self.getTypedRuleContext(Python3Parser.Or_patternContext,0) + + + def AS(self): + return self.getToken(Python3Parser.AS, 0) + + def pattern_capture_target(self): + return self.getTypedRuleContext(Python3Parser.Pattern_capture_targetContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_as_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAs_pattern" ): + listener.enterAs_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAs_pattern" ): + listener.exitAs_pattern(self) + + + + + def as_pattern(self): + + localctx = Python3Parser.As_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 114, self.RULE_as_pattern) + try: + self.enterOuterAlt(localctx, 1) + self.state = 843 + self.or_pattern() + self.state = 844 + self.match(Python3Parser.AS) + self.state = 845 + self.pattern_capture_target() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Or_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def closed_pattern(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Closed_patternContext) + else: + return self.getTypedRuleContext(Python3Parser.Closed_patternContext,i) + + + def OR_OP(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.OR_OP) + else: + return self.getToken(Python3Parser.OR_OP, i) + + def getRuleIndex(self): + return Python3Parser.RULE_or_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterOr_pattern" ): + listener.enterOr_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitOr_pattern" ): + listener.exitOr_pattern(self) + + + + + def or_pattern(self): + + localctx = Python3Parser.Or_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 116, self.RULE_or_pattern) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 847 + self.closed_pattern() + self.state = 852 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==66: + self.state = 848 + self.match(Python3Parser.OR_OP) + self.state = 849 + self.closed_pattern() + self.state = 854 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Closed_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def literal_pattern(self): + return self.getTypedRuleContext(Python3Parser.Literal_patternContext,0) + + + def capture_pattern(self): + return self.getTypedRuleContext(Python3Parser.Capture_patternContext,0) + + + def wildcard_pattern(self): + return self.getTypedRuleContext(Python3Parser.Wildcard_patternContext,0) + + + def value_pattern(self): + return self.getTypedRuleContext(Python3Parser.Value_patternContext,0) + + + def group_pattern(self): + return self.getTypedRuleContext(Python3Parser.Group_patternContext,0) + + + def sequence_pattern(self): + return self.getTypedRuleContext(Python3Parser.Sequence_patternContext,0) + + + def mapping_pattern(self): + return self.getTypedRuleContext(Python3Parser.Mapping_patternContext,0) + + + def class_pattern(self): + return self.getTypedRuleContext(Python3Parser.Class_patternContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_closed_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClosed_pattern" ): + listener.enterClosed_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClosed_pattern" ): + listener.exitClosed_pattern(self) + + + + + def closed_pattern(self): + + localctx = Python3Parser.Closed_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 118, self.RULE_closed_pattern) + try: + self.state = 863 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,108,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 855 + self.literal_pattern() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 856 + self.capture_pattern() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 857 + self.wildcard_pattern() + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 858 + self.value_pattern() + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 859 + self.group_pattern() + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 860 + self.sequence_pattern() + pass + + elif la_ == 7: + self.enterOuterAlt(localctx, 7) + self.state = 861 + self.mapping_pattern() + pass + + elif la_ == 8: + self.enterOuterAlt(localctx, 8) + self.state = 862 + self.class_pattern() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Literal_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def signed_number(self): + return self.getTypedRuleContext(Python3Parser.Signed_numberContext,0) + + + def complex_number(self): + return self.getTypedRuleContext(Python3Parser.Complex_numberContext,0) + + + def strings(self): + return self.getTypedRuleContext(Python3Parser.StringsContext,0) + + + def NONE(self): + return self.getToken(Python3Parser.NONE, 0) + + def TRUE(self): + return self.getToken(Python3Parser.TRUE, 0) + + def FALSE(self): + return self.getToken(Python3Parser.FALSE, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_literal_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLiteral_pattern" ): + listener.enterLiteral_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLiteral_pattern" ): + listener.exitLiteral_pattern(self) + + + + + def literal_pattern(self): + + localctx = Python3Parser.Literal_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 120, self.RULE_literal_pattern) + try: + self.state = 873 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,109,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 865 + self.signed_number() + self.state = 866 + if not self.CannotBePlusMinus() : + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, " self.CannotBePlusMinus() ") + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 868 + self.complex_number() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 869 + self.strings() + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 870 + self.match(Python3Parser.NONE) + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 871 + self.match(Python3Parser.TRUE) + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 872 + self.match(Python3Parser.FALSE) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Literal_exprContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def signed_number(self): + return self.getTypedRuleContext(Python3Parser.Signed_numberContext,0) + + + def complex_number(self): + return self.getTypedRuleContext(Python3Parser.Complex_numberContext,0) + + + def strings(self): + return self.getTypedRuleContext(Python3Parser.StringsContext,0) + + + def NONE(self): + return self.getToken(Python3Parser.NONE, 0) + + def TRUE(self): + return self.getToken(Python3Parser.TRUE, 0) + + def FALSE(self): + return self.getToken(Python3Parser.FALSE, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_literal_expr + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLiteral_expr" ): + listener.enterLiteral_expr(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLiteral_expr" ): + listener.exitLiteral_expr(self) + + + + + def literal_expr(self): + + localctx = Python3Parser.Literal_exprContext(self, self._ctx, self.state) + self.enterRule(localctx, 122, self.RULE_literal_expr) + try: + self.state = 883 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,110,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 875 + self.signed_number() + self.state = 876 + if not self.CannotBePlusMinus() : + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, " self.CannotBePlusMinus() ") + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 878 + self.complex_number() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 879 + self.strings() + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 880 + self.match(Python3Parser.NONE) + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 881 + self.match(Python3Parser.TRUE) + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 882 + self.match(Python3Parser.FALSE) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Complex_numberContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def signed_real_number(self): + return self.getTypedRuleContext(Python3Parser.Signed_real_numberContext,0) + + + def ADD(self): + return self.getToken(Python3Parser.ADD, 0) + + def imaginary_number(self): + return self.getTypedRuleContext(Python3Parser.Imaginary_numberContext,0) + + + def MINUS(self): + return self.getToken(Python3Parser.MINUS, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_complex_number + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterComplex_number" ): + listener.enterComplex_number(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitComplex_number" ): + listener.exitComplex_number(self) + + + + + def complex_number(self): + + localctx = Python3Parser.Complex_numberContext(self, self._ctx, self.state) + self.enterRule(localctx, 124, self.RULE_complex_number) + try: + self.state = 893 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,111,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 885 + self.signed_real_number() + self.state = 886 + self.match(Python3Parser.ADD) + self.state = 887 + self.imaginary_number() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 889 + self.signed_real_number() + self.state = 890 + self.match(Python3Parser.MINUS) + self.state = 891 + self.imaginary_number() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Signed_numberContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def NUMBER(self): + return self.getToken(Python3Parser.NUMBER, 0) + + def MINUS(self): + return self.getToken(Python3Parser.MINUS, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_signed_number + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSigned_number" ): + listener.enterSigned_number(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSigned_number" ): + listener.exitSigned_number(self) + + + + + def signed_number(self): + + localctx = Python3Parser.Signed_numberContext(self, self._ctx, self.state) + self.enterRule(localctx, 126, self.RULE_signed_number) + try: + self.state = 898 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [4]: + self.enterOuterAlt(localctx, 1) + self.state = 895 + self.match(Python3Parser.NUMBER) + pass + elif token in [72]: + self.enterOuterAlt(localctx, 2) + self.state = 896 + self.match(Python3Parser.MINUS) + self.state = 897 + self.match(Python3Parser.NUMBER) + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Signed_real_numberContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def real_number(self): + return self.getTypedRuleContext(Python3Parser.Real_numberContext,0) + + + def MINUS(self): + return self.getToken(Python3Parser.MINUS, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_signed_real_number + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSigned_real_number" ): + listener.enterSigned_real_number(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSigned_real_number" ): + listener.exitSigned_real_number(self) + + + + + def signed_real_number(self): + + localctx = Python3Parser.Signed_real_numberContext(self, self._ctx, self.state) + self.enterRule(localctx, 128, self.RULE_signed_real_number) + try: + self.state = 903 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [4]: + self.enterOuterAlt(localctx, 1) + self.state = 900 + self.real_number() + pass + elif token in [72]: + self.enterOuterAlt(localctx, 2) + self.state = 901 + self.match(Python3Parser.MINUS) + self.state = 902 + self.real_number() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Real_numberContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def NUMBER(self): + return self.getToken(Python3Parser.NUMBER, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_real_number + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterReal_number" ): + listener.enterReal_number(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitReal_number" ): + listener.exitReal_number(self) + + + + + def real_number(self): + + localctx = Python3Parser.Real_numberContext(self, self._ctx, self.state) + self.enterRule(localctx, 130, self.RULE_real_number) + try: + self.enterOuterAlt(localctx, 1) + self.state = 905 + self.match(Python3Parser.NUMBER) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Imaginary_numberContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def NUMBER(self): + return self.getToken(Python3Parser.NUMBER, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_imaginary_number + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterImaginary_number" ): + listener.enterImaginary_number(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitImaginary_number" ): + listener.exitImaginary_number(self) + + + + + def imaginary_number(self): + + localctx = Python3Parser.Imaginary_numberContext(self, self._ctx, self.state) + self.enterRule(localctx, 132, self.RULE_imaginary_number) + try: + self.enterOuterAlt(localctx, 1) + self.state = 907 + self.match(Python3Parser.NUMBER) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Capture_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def pattern_capture_target(self): + return self.getTypedRuleContext(Python3Parser.Pattern_capture_targetContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_capture_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCapture_pattern" ): + listener.enterCapture_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCapture_pattern" ): + listener.exitCapture_pattern(self) + + + + + def capture_pattern(self): + + localctx = Python3Parser.Capture_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 134, self.RULE_capture_pattern) + try: + self.enterOuterAlt(localctx, 1) + self.state = 909 + self.pattern_capture_target() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Pattern_capture_targetContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def name(self): + return self.getTypedRuleContext(Python3Parser.NameContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_pattern_capture_target + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPattern_capture_target" ): + listener.enterPattern_capture_target(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPattern_capture_target" ): + listener.exitPattern_capture_target(self) + + + + + def pattern_capture_target(self): + + localctx = Python3Parser.Pattern_capture_targetContext(self, self._ctx, self.state) + self.enterRule(localctx, 136, self.RULE_pattern_capture_target) + try: + self.enterOuterAlt(localctx, 1) + self.state = 911 + self.name() + self.state = 912 + if not self.CannotBeDotLpEq() : + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, " self.CannotBeDotLpEq() ") + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Wildcard_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def UNDERSCORE(self): + return self.getToken(Python3Parser.UNDERSCORE, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_wildcard_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterWildcard_pattern" ): + listener.enterWildcard_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitWildcard_pattern" ): + listener.exitWildcard_pattern(self) + + + + + def wildcard_pattern(self): + + localctx = Python3Parser.Wildcard_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 138, self.RULE_wildcard_pattern) + try: + self.enterOuterAlt(localctx, 1) + self.state = 914 + self.match(Python3Parser.UNDERSCORE) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Value_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def attr(self): + return self.getTypedRuleContext(Python3Parser.AttrContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_value_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterValue_pattern" ): + listener.enterValue_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitValue_pattern" ): + listener.exitValue_pattern(self) + + + + + def value_pattern(self): + + localctx = Python3Parser.Value_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 140, self.RULE_value_pattern) + try: + self.enterOuterAlt(localctx, 1) + self.state = 916 + self.attr() + self.state = 917 + if not self.CannotBeDotLpEq() : + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, " self.CannotBeDotLpEq() ") + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AttrContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def name(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.NameContext) + else: + return self.getTypedRuleContext(Python3Parser.NameContext,i) + + + def DOT(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.DOT) + else: + return self.getToken(Python3Parser.DOT, i) + + def getRuleIndex(self): + return Python3Parser.RULE_attr + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAttr" ): + listener.enterAttr(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAttr" ): + listener.exitAttr(self) + + + + + def attr(self): + + localctx = Python3Parser.AttrContext(self, self._ctx, self.state) + self.enterRule(localctx, 142, self.RULE_attr) + try: + self.enterOuterAlt(localctx, 1) + self.state = 919 + self.name() + self.state = 922 + self._errHandler.sync(self) + _alt = 1 + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt == 1: + self.state = 920 + self.match(Python3Parser.DOT) + self.state = 921 + self.name() + + else: + raise NoViableAltException(self) + self.state = 924 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,114,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Name_or_attrContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def attr(self): + return self.getTypedRuleContext(Python3Parser.AttrContext,0) + + + def name(self): + return self.getTypedRuleContext(Python3Parser.NameContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_name_or_attr + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterName_or_attr" ): + listener.enterName_or_attr(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitName_or_attr" ): + listener.exitName_or_attr(self) + + + + + def name_or_attr(self): + + localctx = Python3Parser.Name_or_attrContext(self, self._ctx, self.state) + self.enterRule(localctx, 144, self.RULE_name_or_attr) + try: + self.state = 928 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,115,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 926 + self.attr() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 927 + self.name() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Group_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def OPEN_PAREN(self): + return self.getToken(Python3Parser.OPEN_PAREN, 0) + + def pattern(self): + return self.getTypedRuleContext(Python3Parser.PatternContext,0) + + + def CLOSE_PAREN(self): + return self.getToken(Python3Parser.CLOSE_PAREN, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_group_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterGroup_pattern" ): + listener.enterGroup_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitGroup_pattern" ): + listener.exitGroup_pattern(self) + + + + + def group_pattern(self): + + localctx = Python3Parser.Group_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 146, self.RULE_group_pattern) + try: + self.enterOuterAlt(localctx, 1) + self.state = 930 + self.match(Python3Parser.OPEN_PAREN) + self.state = 931 + self.pattern() + self.state = 932 + self.match(Python3Parser.CLOSE_PAREN) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Sequence_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def OPEN_BRACK(self): + return self.getToken(Python3Parser.OPEN_BRACK, 0) + + def CLOSE_BRACK(self): + return self.getToken(Python3Parser.CLOSE_BRACK, 0) + + def maybe_sequence_pattern(self): + return self.getTypedRuleContext(Python3Parser.Maybe_sequence_patternContext,0) + + + def OPEN_PAREN(self): + return self.getToken(Python3Parser.OPEN_PAREN, 0) + + def CLOSE_PAREN(self): + return self.getToken(Python3Parser.CLOSE_PAREN, 0) + + def open_sequence_pattern(self): + return self.getTypedRuleContext(Python3Parser.Open_sequence_patternContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_sequence_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSequence_pattern" ): + listener.enterSequence_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSequence_pattern" ): + listener.exitSequence_pattern(self) + + + + + def sequence_pattern(self): + + localctx = Python3Parser.Sequence_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 148, self.RULE_sequence_pattern) + self._la = 0 # Token type + try: + self.state = 944 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [64]: + self.enterOuterAlt(localctx, 1) + self.state = 934 + self.match(Python3Parser.OPEN_BRACK) + self.state = 936 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 216209344097681432) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8449) != 0): + self.state = 935 + self.maybe_sequence_pattern() + + + self.state = 938 + self.match(Python3Parser.CLOSE_BRACK) + pass + elif token in [57]: + self.enterOuterAlt(localctx, 2) + self.state = 939 + self.match(Python3Parser.OPEN_PAREN) + self.state = 941 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 216209344097681432) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8449) != 0): + self.state = 940 + self.open_sequence_pattern() + + + self.state = 943 + self.match(Python3Parser.CLOSE_PAREN) + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Open_sequence_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def maybe_star_pattern(self): + return self.getTypedRuleContext(Python3Parser.Maybe_star_patternContext,0) + + + def COMMA(self): + return self.getToken(Python3Parser.COMMA, 0) + + def maybe_sequence_pattern(self): + return self.getTypedRuleContext(Python3Parser.Maybe_sequence_patternContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_open_sequence_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterOpen_sequence_pattern" ): + listener.enterOpen_sequence_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitOpen_sequence_pattern" ): + listener.exitOpen_sequence_pattern(self) + + + + + def open_sequence_pattern(self): + + localctx = Python3Parser.Open_sequence_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 150, self.RULE_open_sequence_pattern) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 946 + self.maybe_star_pattern() + self.state = 947 + self.match(Python3Parser.COMMA) + self.state = 949 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 216209344097681432) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8449) != 0): + self.state = 948 + self.maybe_sequence_pattern() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Maybe_sequence_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def maybe_star_pattern(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Maybe_star_patternContext) + else: + return self.getTypedRuleContext(Python3Parser.Maybe_star_patternContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def getRuleIndex(self): + return Python3Parser.RULE_maybe_sequence_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMaybe_sequence_pattern" ): + listener.enterMaybe_sequence_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMaybe_sequence_pattern" ): + listener.exitMaybe_sequence_pattern(self) + + + + + def maybe_sequence_pattern(self): + + localctx = Python3Parser.Maybe_sequence_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 152, self.RULE_maybe_sequence_pattern) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 951 + self.maybe_star_pattern() + self.state = 956 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,120,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 952 + self.match(Python3Parser.COMMA) + self.state = 953 + self.maybe_star_pattern() + self.state = 958 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,120,self._ctx) + + self.state = 960 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 959 + self.match(Python3Parser.COMMA) + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Maybe_star_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def star_pattern(self): + return self.getTypedRuleContext(Python3Parser.Star_patternContext,0) + + + def pattern(self): + return self.getTypedRuleContext(Python3Parser.PatternContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_maybe_star_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMaybe_star_pattern" ): + listener.enterMaybe_star_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMaybe_star_pattern" ): + listener.exitMaybe_star_pattern(self) + + + + + def maybe_star_pattern(self): + + localctx = Python3Parser.Maybe_star_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 154, self.RULE_maybe_star_pattern) + try: + self.state = 964 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [56]: + self.enterOuterAlt(localctx, 1) + self.state = 962 + self.star_pattern() + pass + elif token in [3, 4, 20, 30, 31, 38, 40, 45, 57, 64, 72, 77]: + self.enterOuterAlt(localctx, 2) + self.state = 963 + self.pattern() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Star_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def STAR(self): + return self.getToken(Python3Parser.STAR, 0) + + def pattern_capture_target(self): + return self.getTypedRuleContext(Python3Parser.Pattern_capture_targetContext,0) + + + def wildcard_pattern(self): + return self.getTypedRuleContext(Python3Parser.Wildcard_patternContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_star_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterStar_pattern" ): + listener.enterStar_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitStar_pattern" ): + listener.exitStar_pattern(self) + + + + + def star_pattern(self): + + localctx = Python3Parser.Star_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 156, self.RULE_star_pattern) + try: + self.state = 970 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,123,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 966 + self.match(Python3Parser.STAR) + self.state = 967 + self.pattern_capture_target() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 968 + self.match(Python3Parser.STAR) + self.state = 969 + self.wildcard_pattern() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Mapping_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def OPEN_BRACE(self): + return self.getToken(Python3Parser.OPEN_BRACE, 0) + + def CLOSE_BRACE(self): + return self.getToken(Python3Parser.CLOSE_BRACE, 0) + + def double_star_pattern(self): + return self.getTypedRuleContext(Python3Parser.Double_star_patternContext,0) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def items_pattern(self): + return self.getTypedRuleContext(Python3Parser.Items_patternContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_mapping_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMapping_pattern" ): + listener.enterMapping_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMapping_pattern" ): + listener.exitMapping_pattern(self) + + + + + def mapping_pattern(self): + + localctx = Python3Parser.Mapping_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 158, self.RULE_mapping_pattern) + self._la = 0 # Token type + try: + self.state = 997 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,127,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 972 + self.match(Python3Parser.OPEN_BRACE) + self.state = 973 + self.match(Python3Parser.CLOSE_BRACE) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 974 + self.match(Python3Parser.OPEN_BRACE) + self.state = 975 + self.double_star_pattern() + self.state = 977 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 976 + self.match(Python3Parser.COMMA) + + + self.state = 979 + self.match(Python3Parser.CLOSE_BRACE) + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 981 + self.match(Python3Parser.OPEN_BRACE) + self.state = 982 + self.items_pattern() + self.state = 983 + self.match(Python3Parser.COMMA) + self.state = 984 + self.double_star_pattern() + self.state = 986 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 985 + self.match(Python3Parser.COMMA) + + + self.state = 988 + self.match(Python3Parser.CLOSE_BRACE) + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 990 + self.match(Python3Parser.OPEN_BRACE) + self.state = 991 + self.items_pattern() + self.state = 993 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 992 + self.match(Python3Parser.COMMA) + + + self.state = 995 + self.match(Python3Parser.CLOSE_BRACE) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Items_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def key_value_pattern(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Key_value_patternContext) + else: + return self.getTypedRuleContext(Python3Parser.Key_value_patternContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def getRuleIndex(self): + return Python3Parser.RULE_items_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterItems_pattern" ): + listener.enterItems_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitItems_pattern" ): + listener.exitItems_pattern(self) + + + + + def items_pattern(self): + + localctx = Python3Parser.Items_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 160, self.RULE_items_pattern) + try: + self.enterOuterAlt(localctx, 1) + self.state = 999 + self.key_value_pattern() + self.state = 1004 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,128,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1000 + self.match(Python3Parser.COMMA) + self.state = 1001 + self.key_value_pattern() + self.state = 1006 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,128,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Key_value_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def COLON(self): + return self.getToken(Python3Parser.COLON, 0) + + def pattern(self): + return self.getTypedRuleContext(Python3Parser.PatternContext,0) + + + def literal_expr(self): + return self.getTypedRuleContext(Python3Parser.Literal_exprContext,0) + + + def attr(self): + return self.getTypedRuleContext(Python3Parser.AttrContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_key_value_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterKey_value_pattern" ): + listener.enterKey_value_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitKey_value_pattern" ): + listener.exitKey_value_pattern(self) + + + + + def key_value_pattern(self): + + localctx = Python3Parser.Key_value_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 162, self.RULE_key_value_pattern) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1009 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [3, 4, 20, 31, 38, 72]: + self.state = 1007 + self.literal_expr() + pass + elif token in [30, 40, 45]: + self.state = 1008 + self.attr() + pass + else: + raise NoViableAltException(self) + + self.state = 1011 + self.match(Python3Parser.COLON) + self.state = 1012 + self.pattern() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Double_star_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def POWER(self): + return self.getToken(Python3Parser.POWER, 0) + + def pattern_capture_target(self): + return self.getTypedRuleContext(Python3Parser.Pattern_capture_targetContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_double_star_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDouble_star_pattern" ): + listener.enterDouble_star_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDouble_star_pattern" ): + listener.exitDouble_star_pattern(self) + + + + + def double_star_pattern(self): + + localctx = Python3Parser.Double_star_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 164, self.RULE_double_star_pattern) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1014 + self.match(Python3Parser.POWER) + self.state = 1015 + self.pattern_capture_target() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Class_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def name_or_attr(self): + return self.getTypedRuleContext(Python3Parser.Name_or_attrContext,0) + + + def OPEN_PAREN(self): + return self.getToken(Python3Parser.OPEN_PAREN, 0) + + def CLOSE_PAREN(self): + return self.getToken(Python3Parser.CLOSE_PAREN, 0) + + def positional_patterns(self): + return self.getTypedRuleContext(Python3Parser.Positional_patternsContext,0) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def keyword_patterns(self): + return self.getTypedRuleContext(Python3Parser.Keyword_patternsContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_class_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClass_pattern" ): + listener.enterClass_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClass_pattern" ): + listener.exitClass_pattern(self) + + + + + def class_pattern(self): + + localctx = Python3Parser.Class_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 166, self.RULE_class_pattern) + self._la = 0 # Token type + try: + self.state = 1047 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,133,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1017 + self.name_or_attr() + self.state = 1018 + self.match(Python3Parser.OPEN_PAREN) + self.state = 1019 + self.match(Python3Parser.CLOSE_PAREN) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1021 + self.name_or_attr() + self.state = 1022 + self.match(Python3Parser.OPEN_PAREN) + self.state = 1023 + self.positional_patterns() + self.state = 1025 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 1024 + self.match(Python3Parser.COMMA) + + + self.state = 1027 + self.match(Python3Parser.CLOSE_PAREN) + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1029 + self.name_or_attr() + self.state = 1030 + self.match(Python3Parser.OPEN_PAREN) + self.state = 1031 + self.keyword_patterns() + self.state = 1033 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 1032 + self.match(Python3Parser.COMMA) + + + self.state = 1035 + self.match(Python3Parser.CLOSE_PAREN) + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 1037 + self.name_or_attr() + self.state = 1038 + self.match(Python3Parser.OPEN_PAREN) + self.state = 1039 + self.positional_patterns() + self.state = 1040 + self.match(Python3Parser.COMMA) + self.state = 1041 + self.keyword_patterns() + self.state = 1043 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 1042 + self.match(Python3Parser.COMMA) + + + self.state = 1045 + self.match(Python3Parser.CLOSE_PAREN) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Positional_patternsContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def pattern(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.PatternContext) + else: + return self.getTypedRuleContext(Python3Parser.PatternContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def getRuleIndex(self): + return Python3Parser.RULE_positional_patterns + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPositional_patterns" ): + listener.enterPositional_patterns(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPositional_patterns" ): + listener.exitPositional_patterns(self) + + + + + def positional_patterns(self): + + localctx = Python3Parser.Positional_patternsContext(self, self._ctx, self.state) + self.enterRule(localctx, 168, self.RULE_positional_patterns) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1049 + self.pattern() + self.state = 1054 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,134,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1050 + self.match(Python3Parser.COMMA) + self.state = 1051 + self.pattern() + self.state = 1056 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,134,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Keyword_patternsContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def keyword_pattern(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Keyword_patternContext) + else: + return self.getTypedRuleContext(Python3Parser.Keyword_patternContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def getRuleIndex(self): + return Python3Parser.RULE_keyword_patterns + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterKeyword_patterns" ): + listener.enterKeyword_patterns(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitKeyword_patterns" ): + listener.exitKeyword_patterns(self) + + + + + def keyword_patterns(self): + + localctx = Python3Parser.Keyword_patternsContext(self, self._ctx, self.state) + self.enterRule(localctx, 170, self.RULE_keyword_patterns) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1057 + self.keyword_pattern() + self.state = 1062 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,135,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1058 + self.match(Python3Parser.COMMA) + self.state = 1059 + self.keyword_pattern() + self.state = 1064 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,135,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Keyword_patternContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def name(self): + return self.getTypedRuleContext(Python3Parser.NameContext,0) + + + def ASSIGN(self): + return self.getToken(Python3Parser.ASSIGN, 0) + + def pattern(self): + return self.getTypedRuleContext(Python3Parser.PatternContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_keyword_pattern + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterKeyword_pattern" ): + listener.enterKeyword_pattern(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitKeyword_pattern" ): + listener.exitKeyword_pattern(self) + + + + + def keyword_pattern(self): + + localctx = Python3Parser.Keyword_patternContext(self, self._ctx, self.state) + self.enterRule(localctx, 172, self.RULE_keyword_pattern) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1065 + self.name() + self.state = 1066 + self.match(Python3Parser.ASSIGN) + self.state = 1067 + self.pattern() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TestContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def or_test(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Or_testContext) + else: + return self.getTypedRuleContext(Python3Parser.Or_testContext,i) + + + def IF(self): + return self.getToken(Python3Parser.IF, 0) + + def ELSE(self): + return self.getToken(Python3Parser.ELSE, 0) + + def test(self): + return self.getTypedRuleContext(Python3Parser.TestContext,0) + + + def lambdef(self): + return self.getTypedRuleContext(Python3Parser.LambdefContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_test + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTest" ): + listener.enterTest(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTest" ): + listener.exitTest(self) + + + + + def test(self): + + localctx = Python3Parser.TestContext(self, self._ctx, self.state) + self.enterRule(localctx, 174, self.RULE_test) + self._la = 0 # Token type + try: + self.state = 1078 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [3, 4, 10, 20, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]: + self.enterOuterAlt(localctx, 1) + self.state = 1069 + self.or_test() + self.state = 1075 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==25: + self.state = 1070 + self.match(Python3Parser.IF) + self.state = 1071 + self.or_test() + self.state = 1072 + self.match(Python3Parser.ELSE) + self.state = 1073 + self.test() + + + pass + elif token in [29]: + self.enterOuterAlt(localctx, 2) + self.state = 1077 + self.lambdef() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Test_nocondContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def or_test(self): + return self.getTypedRuleContext(Python3Parser.Or_testContext,0) + + + def lambdef_nocond(self): + return self.getTypedRuleContext(Python3Parser.Lambdef_nocondContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_test_nocond + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTest_nocond" ): + listener.enterTest_nocond(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTest_nocond" ): + listener.exitTest_nocond(self) + + + + + def test_nocond(self): + + localctx = Python3Parser.Test_nocondContext(self, self._ctx, self.state) + self.enterRule(localctx, 176, self.RULE_test_nocond) + try: + self.state = 1082 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [3, 4, 10, 20, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]: + self.enterOuterAlt(localctx, 1) + self.state = 1080 + self.or_test() + pass + elif token in [29]: + self.enterOuterAlt(localctx, 2) + self.state = 1081 + self.lambdef_nocond() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class LambdefContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LAMBDA(self): + return self.getToken(Python3Parser.LAMBDA, 0) + + def COLON(self): + return self.getToken(Python3Parser.COLON, 0) + + def test(self): + return self.getTypedRuleContext(Python3Parser.TestContext,0) + + + def varargslist(self): + return self.getTypedRuleContext(Python3Parser.VarargslistContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_lambdef + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLambdef" ): + listener.enterLambdef(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLambdef" ): + listener.exitLambdef(self) + + + + + def lambdef(self): + + localctx = Python3Parser.LambdefContext(self, self._ctx, self.state) + self.enterRule(localctx, 178, self.RULE_lambdef) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1084 + self.match(Python3Parser.LAMBDA) + self.state = 1086 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 4683779897422774272) != 0): + self.state = 1085 + self.varargslist() + + + self.state = 1088 + self.match(Python3Parser.COLON) + self.state = 1089 + self.test() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Lambdef_nocondContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LAMBDA(self): + return self.getToken(Python3Parser.LAMBDA, 0) + + def COLON(self): + return self.getToken(Python3Parser.COLON, 0) + + def test_nocond(self): + return self.getTypedRuleContext(Python3Parser.Test_nocondContext,0) + + + def varargslist(self): + return self.getTypedRuleContext(Python3Parser.VarargslistContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_lambdef_nocond + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLambdef_nocond" ): + listener.enterLambdef_nocond(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLambdef_nocond" ): + listener.exitLambdef_nocond(self) + + + + + def lambdef_nocond(self): + + localctx = Python3Parser.Lambdef_nocondContext(self, self._ctx, self.state) + self.enterRule(localctx, 180, self.RULE_lambdef_nocond) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1091 + self.match(Python3Parser.LAMBDA) + self.state = 1093 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 4683779897422774272) != 0): + self.state = 1092 + self.varargslist() + + + self.state = 1095 + self.match(Python3Parser.COLON) + self.state = 1096 + self.test_nocond() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Or_testContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def and_test(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.And_testContext) + else: + return self.getTypedRuleContext(Python3Parser.And_testContext,i) + + + def OR(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.OR) + else: + return self.getToken(Python3Parser.OR, i) + + def getRuleIndex(self): + return Python3Parser.RULE_or_test + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterOr_test" ): + listener.enterOr_test(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitOr_test" ): + listener.exitOr_test(self) + + + + + def or_test(self): + + localctx = Python3Parser.Or_testContext(self, self._ctx, self.state) + self.enterRule(localctx, 182, self.RULE_or_test) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1098 + self.and_test() + self.state = 1103 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==34: + self.state = 1099 + self.match(Python3Parser.OR) + self.state = 1100 + self.and_test() + self.state = 1105 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class And_testContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def not_test(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Not_testContext) + else: + return self.getTypedRuleContext(Python3Parser.Not_testContext,i) + + + def AND(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.AND) + else: + return self.getToken(Python3Parser.AND, i) + + def getRuleIndex(self): + return Python3Parser.RULE_and_test + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAnd_test" ): + listener.enterAnd_test(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAnd_test" ): + listener.exitAnd_test(self) + + + + + def and_test(self): + + localctx = Python3Parser.And_testContext(self, self._ctx, self.state) + self.enterRule(localctx, 184, self.RULE_and_test) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1106 + self.not_test() + self.state = 1111 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==6: + self.state = 1107 + self.match(Python3Parser.AND) + self.state = 1108 + self.not_test() + self.state = 1113 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Not_testContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def NOT(self): + return self.getToken(Python3Parser.NOT, 0) + + def not_test(self): + return self.getTypedRuleContext(Python3Parser.Not_testContext,0) + + + def comparison(self): + return self.getTypedRuleContext(Python3Parser.ComparisonContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_not_test + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNot_test" ): + listener.enterNot_test(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNot_test" ): + listener.exitNot_test(self) + + + + + def not_test(self): + + localctx = Python3Parser.Not_testContext(self, self._ctx, self.state) + self.enterRule(localctx, 186, self.RULE_not_test) + try: + self.state = 1117 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [33]: + self.enterOuterAlt(localctx, 1) + self.state = 1114 + self.match(Python3Parser.NOT) + self.state = 1115 + self.not_test() + pass + elif token in [3, 4, 10, 20, 30, 31, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]: + self.enterOuterAlt(localctx, 2) + self.state = 1116 + self.comparison() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ComparisonContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def expr(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.ExprContext) + else: + return self.getTypedRuleContext(Python3Parser.ExprContext,i) + + + def comp_op(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Comp_opContext) + else: + return self.getTypedRuleContext(Python3Parser.Comp_opContext,i) + + + def getRuleIndex(self): + return Python3Parser.RULE_comparison + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterComparison" ): + listener.enterComparison(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitComparison" ): + listener.exitComparison(self) + + + + + def comparison(self): + + localctx = Python3Parser.ComparisonContext(self, self._ctx, self.state) + self.enterRule(localctx, 188, self.RULE_comparison) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1119 + self.expr(0) + self.state = 1125 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,144,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1120 + self.comp_op() + self.state = 1121 + self.expr(0) + self.state = 1127 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,144,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Comp_opContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LESS_THAN(self): + return self.getToken(Python3Parser.LESS_THAN, 0) + + def GREATER_THAN(self): + return self.getToken(Python3Parser.GREATER_THAN, 0) + + def EQUALS(self): + return self.getToken(Python3Parser.EQUALS, 0) + + def GT_EQ(self): + return self.getToken(Python3Parser.GT_EQ, 0) + + def LT_EQ(self): + return self.getToken(Python3Parser.LT_EQ, 0) + + def NOT_EQ_1(self): + return self.getToken(Python3Parser.NOT_EQ_1, 0) + + def NOT_EQ_2(self): + return self.getToken(Python3Parser.NOT_EQ_2, 0) + + def IN(self): + return self.getToken(Python3Parser.IN, 0) + + def NOT(self): + return self.getToken(Python3Parser.NOT, 0) + + def IS(self): + return self.getToken(Python3Parser.IS, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_comp_op + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterComp_op" ): + listener.enterComp_op(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitComp_op" ): + listener.exitComp_op(self) + + + + + def comp_op(self): + + localctx = Python3Parser.Comp_opContext(self, self._ctx, self.state) + self.enterRule(localctx, 190, self.RULE_comp_op) + try: + self.state = 1141 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,145,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1128 + self.match(Python3Parser.LESS_THAN) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1129 + self.match(Python3Parser.GREATER_THAN) + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1130 + self.match(Python3Parser.EQUALS) + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 1131 + self.match(Python3Parser.GT_EQ) + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 1132 + self.match(Python3Parser.LT_EQ) + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 1133 + self.match(Python3Parser.NOT_EQ_1) + pass + + elif la_ == 7: + self.enterOuterAlt(localctx, 7) + self.state = 1134 + self.match(Python3Parser.NOT_EQ_2) + pass + + elif la_ == 8: + self.enterOuterAlt(localctx, 8) + self.state = 1135 + self.match(Python3Parser.IN) + pass + + elif la_ == 9: + self.enterOuterAlt(localctx, 9) + self.state = 1136 + self.match(Python3Parser.NOT) + self.state = 1137 + self.match(Python3Parser.IN) + pass + + elif la_ == 10: + self.enterOuterAlt(localctx, 10) + self.state = 1138 + self.match(Python3Parser.IS) + pass + + elif la_ == 11: + self.enterOuterAlt(localctx, 11) + self.state = 1139 + self.match(Python3Parser.IS) + self.state = 1140 + self.match(Python3Parser.NOT) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Star_exprContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def STAR(self): + return self.getToken(Python3Parser.STAR, 0) + + def expr(self): + return self.getTypedRuleContext(Python3Parser.ExprContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_star_expr + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterStar_expr" ): + listener.enterStar_expr(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitStar_expr" ): + listener.exitStar_expr(self) + + + + + def star_expr(self): + + localctx = Python3Parser.Star_exprContext(self, self._ctx, self.state) + self.enterRule(localctx, 192, self.RULE_star_expr) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1143 + self.match(Python3Parser.STAR) + self.state = 1144 + self.expr(0) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ExprContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def atom_expr(self): + return self.getTypedRuleContext(Python3Parser.Atom_exprContext,0) + + + def expr(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.ExprContext) + else: + return self.getTypedRuleContext(Python3Parser.ExprContext,i) + + + def ADD(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.ADD) + else: + return self.getToken(Python3Parser.ADD, i) + + def MINUS(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.MINUS) + else: + return self.getToken(Python3Parser.MINUS, i) + + def NOT_OP(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.NOT_OP) + else: + return self.getToken(Python3Parser.NOT_OP, i) + + def POWER(self): + return self.getToken(Python3Parser.POWER, 0) + + def STAR(self): + return self.getToken(Python3Parser.STAR, 0) + + def AT(self): + return self.getToken(Python3Parser.AT, 0) + + def DIV(self): + return self.getToken(Python3Parser.DIV, 0) + + def MOD(self): + return self.getToken(Python3Parser.MOD, 0) + + def IDIV(self): + return self.getToken(Python3Parser.IDIV, 0) + + def LEFT_SHIFT(self): + return self.getToken(Python3Parser.LEFT_SHIFT, 0) + + def RIGHT_SHIFT(self): + return self.getToken(Python3Parser.RIGHT_SHIFT, 0) + + def AND_OP(self): + return self.getToken(Python3Parser.AND_OP, 0) + + def XOR(self): + return self.getToken(Python3Parser.XOR, 0) + + def OR_OP(self): + return self.getToken(Python3Parser.OR_OP, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_expr + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExpr" ): + listener.enterExpr(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExpr" ): + listener.exitExpr(self) + + + + def expr(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = Python3Parser.ExprContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 194 + self.enterRecursionRule(localctx, 194, self.RULE_expr, _p) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1154 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [3, 4, 10, 20, 30, 31, 38, 40, 45, 55, 57, 64, 77]: + self.state = 1147 + self.atom_expr() + pass + elif token in [71, 72, 76]: + self.state = 1149 + self._errHandler.sync(self) + _alt = 1 + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt == 1: + self.state = 1148 + _la = self._input.LA(1) + if not(((((_la - 71)) & ~0x3f) == 0 and ((1 << (_la - 71)) & 35) != 0)): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + + else: + raise NoViableAltException(self) + self.state = 1151 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,146,self._ctx) + + self.state = 1153 + self.expr(7) + pass + else: + raise NoViableAltException(self) + + self._ctx.stop = self._input.LT(-1) + self.state = 1179 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,149,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + self.state = 1177 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,148,self._ctx) + if la_ == 1: + localctx = Python3Parser.ExprContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expr) + self.state = 1156 + if not self.precpred(self._ctx, 8): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 8)") + self.state = 1157 + self.match(Python3Parser.POWER) + self.state = 1158 + self.expr(9) + pass + + elif la_ == 2: + localctx = Python3Parser.ExprContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expr) + self.state = 1159 + if not self.precpred(self._ctx, 6): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 6)") + self.state = 1160 + _la = self._input.LA(1) + if not(((((_la - 56)) & ~0x3f) == 0 and ((1 << (_la - 56)) & 1074659329) != 0)): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + self.state = 1161 + self.expr(7) + pass + + elif la_ == 3: + localctx = Python3Parser.ExprContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expr) + self.state = 1162 + if not self.precpred(self._ctx, 5): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 5)") + self.state = 1163 + _la = self._input.LA(1) + if not(_la==71 or _la==72): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + self.state = 1164 + self.expr(6) + pass + + elif la_ == 4: + localctx = Python3Parser.ExprContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expr) + self.state = 1165 + if not self.precpred(self._ctx, 4): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 4)") + self.state = 1166 + _la = self._input.LA(1) + if not(_la==69 or _la==70): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + self.state = 1167 + self.expr(5) + pass + + elif la_ == 5: + localctx = Python3Parser.ExprContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expr) + self.state = 1168 + if not self.precpred(self._ctx, 3): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") + self.state = 1169 + self.match(Python3Parser.AND_OP) + self.state = 1170 + self.expr(4) + pass + + elif la_ == 6: + localctx = Python3Parser.ExprContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expr) + self.state = 1171 + if not self.precpred(self._ctx, 2): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") + self.state = 1172 + self.match(Python3Parser.XOR) + self.state = 1173 + self.expr(3) + pass + + elif la_ == 7: + localctx = Python3Parser.ExprContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expr) + self.state = 1174 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 1175 + self.match(Python3Parser.OR_OP) + self.state = 1176 + self.expr(2) + pass + + + self.state = 1181 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,149,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class Atom_exprContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def atom(self): + return self.getTypedRuleContext(Python3Parser.AtomContext,0) + + + def AWAIT(self): + return self.getToken(Python3Parser.AWAIT, 0) + + def trailer(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.TrailerContext) + else: + return self.getTypedRuleContext(Python3Parser.TrailerContext,i) + + + def getRuleIndex(self): + return Python3Parser.RULE_atom_expr + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAtom_expr" ): + listener.enterAtom_expr(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAtom_expr" ): + listener.exitAtom_expr(self) + + + + + def atom_expr(self): + + localctx = Python3Parser.Atom_exprContext(self, self._ctx, self.state) + self.enterRule(localctx, 196, self.RULE_atom_expr) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1183 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==10: + self.state = 1182 + self.match(Python3Parser.AWAIT) + + + self.state = 1185 + self.atom() + self.state = 1189 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,151,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1186 + self.trailer() + self.state = 1191 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,151,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AtomContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def OPEN_PAREN(self): + return self.getToken(Python3Parser.OPEN_PAREN, 0) + + def CLOSE_PAREN(self): + return self.getToken(Python3Parser.CLOSE_PAREN, 0) + + def yield_expr(self): + return self.getTypedRuleContext(Python3Parser.Yield_exprContext,0) + + + def testlist_comp(self): + return self.getTypedRuleContext(Python3Parser.Testlist_compContext,0) + + + def OPEN_BRACK(self): + return self.getToken(Python3Parser.OPEN_BRACK, 0) + + def CLOSE_BRACK(self): + return self.getToken(Python3Parser.CLOSE_BRACK, 0) + + def OPEN_BRACE(self): + return self.getToken(Python3Parser.OPEN_BRACE, 0) + + def CLOSE_BRACE(self): + return self.getToken(Python3Parser.CLOSE_BRACE, 0) + + def dictorsetmaker(self): + return self.getTypedRuleContext(Python3Parser.DictorsetmakerContext,0) + + + def name(self): + return self.getTypedRuleContext(Python3Parser.NameContext,0) + + + def NUMBER(self): + return self.getToken(Python3Parser.NUMBER, 0) + + def STRING(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.STRING) + else: + return self.getToken(Python3Parser.STRING, i) + + def ELLIPSIS(self): + return self.getToken(Python3Parser.ELLIPSIS, 0) + + def NONE(self): + return self.getToken(Python3Parser.NONE, 0) + + def TRUE(self): + return self.getToken(Python3Parser.TRUE, 0) + + def FALSE(self): + return self.getToken(Python3Parser.FALSE, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_atom + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAtom" ): + listener.enterAtom(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAtom" ): + listener.exitAtom(self) + + + + + def atom(self): + + localctx = Python3Parser.AtomContext(self, self._ctx, self.state) + self.enterRule(localctx, 198, self.RULE_atom) + self._la = 0 # Token type + try: + self.state = 1219 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [57]: + self.enterOuterAlt(localctx, 1) + self.state = 1192 + self.match(Python3Parser.OPEN_PAREN) + self.state = 1195 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [43]: + self.state = 1193 + self.yield_expr() + pass + elif token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 56, 57, 64, 71, 72, 76, 77]: + self.state = 1194 + self.testlist_comp() + pass + elif token in [58]: + pass + else: + pass + self.state = 1197 + self.match(Python3Parser.CLOSE_PAREN) + pass + elif token in [64]: + self.enterOuterAlt(localctx, 2) + self.state = 1198 + self.match(Python3Parser.OPEN_BRACK) + self.state = 1200 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 252238150243451928) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0): + self.state = 1199 + self.testlist_comp() + + + self.state = 1202 + self.match(Python3Parser.CLOSE_BRACK) + pass + elif token in [77]: + self.enterOuterAlt(localctx, 3) + self.state = 1203 + self.match(Python3Parser.OPEN_BRACE) + self.state = 1205 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 4863924168670839832) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0): + self.state = 1204 + self.dictorsetmaker() + + + self.state = 1207 + self.match(Python3Parser.CLOSE_BRACE) + pass + elif token in [30, 40, 45]: + self.enterOuterAlt(localctx, 4) + self.state = 1208 + self.name() + pass + elif token in [4]: + self.enterOuterAlt(localctx, 5) + self.state = 1209 + self.match(Python3Parser.NUMBER) + pass + elif token in [3]: + self.enterOuterAlt(localctx, 6) + self.state = 1211 + self._errHandler.sync(self) + _alt = 1 + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt == 1: + self.state = 1210 + self.match(Python3Parser.STRING) + + else: + raise NoViableAltException(self) + self.state = 1213 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,155,self._ctx) + + pass + elif token in [55]: + self.enterOuterAlt(localctx, 7) + self.state = 1215 + self.match(Python3Parser.ELLIPSIS) + pass + elif token in [31]: + self.enterOuterAlt(localctx, 8) + self.state = 1216 + self.match(Python3Parser.NONE) + pass + elif token in [38]: + self.enterOuterAlt(localctx, 9) + self.state = 1217 + self.match(Python3Parser.TRUE) + pass + elif token in [20]: + self.enterOuterAlt(localctx, 10) + self.state = 1218 + self.match(Python3Parser.FALSE) + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class NameContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def NAME(self): + return self.getToken(Python3Parser.NAME, 0) + + def UNDERSCORE(self): + return self.getToken(Python3Parser.UNDERSCORE, 0) + + def MATCH(self): + return self.getToken(Python3Parser.MATCH, 0) + + def getRuleIndex(self): + return Python3Parser.RULE_name + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterName" ): + listener.enterName(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitName" ): + listener.exitName(self) + + + + + def name(self): + + localctx = Python3Parser.NameContext(self, self._ctx, self.state) + self.enterRule(localctx, 200, self.RULE_name) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1221 + _la = self._input.LA(1) + if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 36284957458432) != 0)): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Testlist_compContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def test(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.TestContext) + else: + return self.getTypedRuleContext(Python3Parser.TestContext,i) + + + def star_expr(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Star_exprContext) + else: + return self.getTypedRuleContext(Python3Parser.Star_exprContext,i) + + + def comp_for(self): + return self.getTypedRuleContext(Python3Parser.Comp_forContext,0) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def getRuleIndex(self): + return Python3Parser.RULE_testlist_comp + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTestlist_comp" ): + listener.enterTestlist_comp(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTestlist_comp" ): + listener.exitTestlist_comp(self) + + + + + def testlist_comp(self): + + localctx = Python3Parser.Testlist_compContext(self, self._ctx, self.state) + self.enterRule(localctx, 202, self.RULE_testlist_comp) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1225 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]: + self.state = 1223 + self.test() + pass + elif token in [56]: + self.state = 1224 + self.star_expr() + pass + else: + raise NoViableAltException(self) + + self.state = 1241 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [9, 22]: + self.state = 1227 + self.comp_for() + pass + elif token in [58, 59, 65]: + self.state = 1235 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,159,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1228 + self.match(Python3Parser.COMMA) + self.state = 1231 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]: + self.state = 1229 + self.test() + pass + elif token in [56]: + self.state = 1230 + self.star_expr() + pass + else: + raise NoViableAltException(self) + + self.state = 1237 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,159,self._ctx) + + self.state = 1239 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 1238 + self.match(Python3Parser.COMMA) + + + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TrailerContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def OPEN_PAREN(self): + return self.getToken(Python3Parser.OPEN_PAREN, 0) + + def CLOSE_PAREN(self): + return self.getToken(Python3Parser.CLOSE_PAREN, 0) + + def arglist(self): + return self.getTypedRuleContext(Python3Parser.ArglistContext,0) + + + def OPEN_BRACK(self): + return self.getToken(Python3Parser.OPEN_BRACK, 0) + + def subscriptlist(self): + return self.getTypedRuleContext(Python3Parser.SubscriptlistContext,0) + + + def CLOSE_BRACK(self): + return self.getToken(Python3Parser.CLOSE_BRACK, 0) + + def DOT(self): + return self.getToken(Python3Parser.DOT, 0) + + def name(self): + return self.getTypedRuleContext(Python3Parser.NameContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_trailer + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTrailer" ): + listener.enterTrailer(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTrailer" ): + listener.exitTrailer(self) + + + + + def trailer(self): + + localctx = Python3Parser.TrailerContext(self, self._ctx, self.state) + self.enterRule(localctx, 204, self.RULE_trailer) + self._la = 0 # Token type + try: + self.state = 1254 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [57]: + self.enterOuterAlt(localctx, 1) + self.state = 1243 + self.match(Python3Parser.OPEN_PAREN) + self.state = 1245 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 4863924168670839832) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0): + self.state = 1244 + self.arglist() + + + self.state = 1247 + self.match(Python3Parser.CLOSE_PAREN) + pass + elif token in [64]: + self.enterOuterAlt(localctx, 2) + self.state = 1248 + self.match(Python3Parser.OPEN_BRACK) + self.state = 1249 + self.subscriptlist() + self.state = 1250 + self.match(Python3Parser.CLOSE_BRACK) + pass + elif token in [54]: + self.enterOuterAlt(localctx, 3) + self.state = 1252 + self.match(Python3Parser.DOT) + self.state = 1253 + self.name() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class SubscriptlistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def subscript_(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Subscript_Context) + else: + return self.getTypedRuleContext(Python3Parser.Subscript_Context,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def getRuleIndex(self): + return Python3Parser.RULE_subscriptlist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSubscriptlist" ): + listener.enterSubscriptlist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSubscriptlist" ): + listener.exitSubscriptlist(self) + + + + + def subscriptlist(self): + + localctx = Python3Parser.SubscriptlistContext(self, self._ctx, self.state) + self.enterRule(localctx, 206, self.RULE_subscriptlist) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1256 + self.subscript_() + self.state = 1261 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,164,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1257 + self.match(Python3Parser.COMMA) + self.state = 1258 + self.subscript_() + self.state = 1263 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,164,self._ctx) + + self.state = 1265 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 1264 + self.match(Python3Parser.COMMA) + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Subscript_Context(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def test(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.TestContext) + else: + return self.getTypedRuleContext(Python3Parser.TestContext,i) + + + def COLON(self): + return self.getToken(Python3Parser.COLON, 0) + + def sliceop(self): + return self.getTypedRuleContext(Python3Parser.SliceopContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_subscript_ + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSubscript_" ): + listener.enterSubscript_(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSubscript_" ): + listener.exitSubscript_(self) + + + + + def subscript_(self): + + localctx = Python3Parser.Subscript_Context(self, self._ctx, self.state) + self.enterRule(localctx, 208, self.RULE_subscript_) + self._la = 0 # Token type + try: + self.state = 1278 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,169,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1267 + self.test() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1269 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 180180556205523992) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0): + self.state = 1268 + self.test() + + + self.state = 1271 + self.match(Python3Parser.COLON) + self.state = 1273 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 180180556205523992) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0): + self.state = 1272 + self.test() + + + self.state = 1276 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==60: + self.state = 1275 + self.sliceop() + + + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class SliceopContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def COLON(self): + return self.getToken(Python3Parser.COLON, 0) + + def test(self): + return self.getTypedRuleContext(Python3Parser.TestContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_sliceop + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSliceop" ): + listener.enterSliceop(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSliceop" ): + listener.exitSliceop(self) + + + + + def sliceop(self): + + localctx = Python3Parser.SliceopContext(self, self._ctx, self.state) + self.enterRule(localctx, 210, self.RULE_sliceop) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1280 + self.match(Python3Parser.COLON) + self.state = 1282 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 180180556205523992) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0): + self.state = 1281 + self.test() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ExprlistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def expr(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.ExprContext) + else: + return self.getTypedRuleContext(Python3Parser.ExprContext,i) + + + def star_expr(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Star_exprContext) + else: + return self.getTypedRuleContext(Python3Parser.Star_exprContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def getRuleIndex(self): + return Python3Parser.RULE_exprlist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExprlist" ): + listener.enterExprlist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExprlist" ): + listener.exitExprlist(self) + + + + + def exprlist(self): + + localctx = Python3Parser.ExprlistContext(self, self._ctx, self.state) + self.enterRule(localctx, 212, self.RULE_exprlist) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1286 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [3, 4, 10, 20, 30, 31, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]: + self.state = 1284 + self.expr(0) + pass + elif token in [56]: + self.state = 1285 + self.star_expr() + pass + else: + raise NoViableAltException(self) + + self.state = 1295 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,173,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1288 + self.match(Python3Parser.COMMA) + self.state = 1291 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [3, 4, 10, 20, 30, 31, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]: + self.state = 1289 + self.expr(0) + pass + elif token in [56]: + self.state = 1290 + self.star_expr() + pass + else: + raise NoViableAltException(self) + + self.state = 1297 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,173,self._ctx) + + self.state = 1299 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 1298 + self.match(Python3Parser.COMMA) + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TestlistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def test(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.TestContext) + else: + return self.getTypedRuleContext(Python3Parser.TestContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def getRuleIndex(self): + return Python3Parser.RULE_testlist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTestlist" ): + listener.enterTestlist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTestlist" ): + listener.exitTestlist(self) + + + + + def testlist(self): + + localctx = Python3Parser.TestlistContext(self, self._ctx, self.state) + self.enterRule(localctx, 214, self.RULE_testlist) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1301 + self.test() + self.state = 1306 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,175,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1302 + self.match(Python3Parser.COMMA) + self.state = 1303 + self.test() + self.state = 1308 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,175,self._ctx) + + self.state = 1310 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 1309 + self.match(Python3Parser.COMMA) + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class DictorsetmakerContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def test(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.TestContext) + else: + return self.getTypedRuleContext(Python3Parser.TestContext,i) + + + def COLON(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COLON) + else: + return self.getToken(Python3Parser.COLON, i) + + def POWER(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.POWER) + else: + return self.getToken(Python3Parser.POWER, i) + + def expr(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.ExprContext) + else: + return self.getTypedRuleContext(Python3Parser.ExprContext,i) + + + def comp_for(self): + return self.getTypedRuleContext(Python3Parser.Comp_forContext,0) + + + def star_expr(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.Star_exprContext) + else: + return self.getTypedRuleContext(Python3Parser.Star_exprContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def getRuleIndex(self): + return Python3Parser.RULE_dictorsetmaker + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDictorsetmaker" ): + listener.enterDictorsetmaker(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDictorsetmaker" ): + listener.exitDictorsetmaker(self) + + + + + def dictorsetmaker(self): + + localctx = Python3Parser.DictorsetmakerContext(self, self._ctx, self.state) + self.enterRule(localctx, 216, self.RULE_dictorsetmaker) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1360 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,187,self._ctx) + if la_ == 1: + self.state = 1318 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]: + self.state = 1312 + self.test() + self.state = 1313 + self.match(Python3Parser.COLON) + self.state = 1314 + self.test() + pass + elif token in [62]: + self.state = 1316 + self.match(Python3Parser.POWER) + self.state = 1317 + self.expr(0) + pass + else: + raise NoViableAltException(self) + + self.state = 1338 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [9, 22]: + self.state = 1320 + self.comp_for() + pass + elif token in [59, 78]: + self.state = 1332 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,179,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1321 + self.match(Python3Parser.COMMA) + self.state = 1328 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]: + self.state = 1322 + self.test() + self.state = 1323 + self.match(Python3Parser.COLON) + self.state = 1324 + self.test() + pass + elif token in [62]: + self.state = 1326 + self.match(Python3Parser.POWER) + self.state = 1327 + self.expr(0) + pass + else: + raise NoViableAltException(self) + + self.state = 1334 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,179,self._ctx) + + self.state = 1336 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 1335 + self.match(Python3Parser.COMMA) + + + pass + else: + raise NoViableAltException(self) + + pass + + elif la_ == 2: + self.state = 1342 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]: + self.state = 1340 + self.test() + pass + elif token in [56]: + self.state = 1341 + self.star_expr() + pass + else: + raise NoViableAltException(self) + + self.state = 1358 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [9, 22]: + self.state = 1344 + self.comp_for() + pass + elif token in [59, 78]: + self.state = 1352 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,184,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1345 + self.match(Python3Parser.COMMA) + self.state = 1348 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]: + self.state = 1346 + self.test() + pass + elif token in [56]: + self.state = 1347 + self.star_expr() + pass + else: + raise NoViableAltException(self) + + self.state = 1354 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,184,self._ctx) + + self.state = 1356 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 1355 + self.match(Python3Parser.COMMA) + + + pass + else: + raise NoViableAltException(self) + + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ClassdefContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def CLASS(self): + return self.getToken(Python3Parser.CLASS, 0) + + def name(self): + return self.getTypedRuleContext(Python3Parser.NameContext,0) + + + def COLON(self): + return self.getToken(Python3Parser.COLON, 0) + + def block(self): + return self.getTypedRuleContext(Python3Parser.BlockContext,0) + + + def OPEN_PAREN(self): + return self.getToken(Python3Parser.OPEN_PAREN, 0) + + def CLOSE_PAREN(self): + return self.getToken(Python3Parser.CLOSE_PAREN, 0) + + def arglist(self): + return self.getTypedRuleContext(Python3Parser.ArglistContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_classdef + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClassdef" ): + listener.enterClassdef(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClassdef" ): + listener.exitClassdef(self) + + + + + def classdef(self): + + localctx = Python3Parser.ClassdefContext(self, self._ctx, self.state) + self.enterRule(localctx, 218, self.RULE_classdef) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1362 + self.match(Python3Parser.CLASS) + self.state = 1363 + self.name() + self.state = 1369 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==57: + self.state = 1364 + self.match(Python3Parser.OPEN_PAREN) + self.state = 1366 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 4863924168670839832) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0): + self.state = 1365 + self.arglist() + + + self.state = 1368 + self.match(Python3Parser.CLOSE_PAREN) + + + self.state = 1371 + self.match(Python3Parser.COLON) + self.state = 1372 + self.block() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ArglistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def argument(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.ArgumentContext) + else: + return self.getTypedRuleContext(Python3Parser.ArgumentContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.COMMA) + else: + return self.getToken(Python3Parser.COMMA, i) + + def getRuleIndex(self): + return Python3Parser.RULE_arglist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterArglist" ): + listener.enterArglist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitArglist" ): + listener.exitArglist(self) + + + + + def arglist(self): + + localctx = Python3Parser.ArglistContext(self, self._ctx, self.state) + self.enterRule(localctx, 220, self.RULE_arglist) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1374 + self.argument() + self.state = 1379 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,190,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 1375 + self.match(Python3Parser.COMMA) + self.state = 1376 + self.argument() + self.state = 1381 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,190,self._ctx) + + self.state = 1383 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==59: + self.state = 1382 + self.match(Python3Parser.COMMA) + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ArgumentContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def test(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(Python3Parser.TestContext) + else: + return self.getTypedRuleContext(Python3Parser.TestContext,i) + + + def ASSIGN(self): + return self.getToken(Python3Parser.ASSIGN, 0) + + def POWER(self): + return self.getToken(Python3Parser.POWER, 0) + + def STAR(self): + return self.getToken(Python3Parser.STAR, 0) + + def comp_for(self): + return self.getTypedRuleContext(Python3Parser.Comp_forContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_argument + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterArgument" ): + listener.enterArgument(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitArgument" ): + listener.exitArgument(self) + + + + + def argument(self): + + localctx = Python3Parser.ArgumentContext(self, self._ctx, self.state) + self.enterRule(localctx, 222, self.RULE_argument) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1397 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,193,self._ctx) + if la_ == 1: + self.state = 1385 + self.test() + self.state = 1387 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==9 or _la==22: + self.state = 1386 + self.comp_for() + + + pass + + elif la_ == 2: + self.state = 1389 + self.test() + self.state = 1390 + self.match(Python3Parser.ASSIGN) + self.state = 1391 + self.test() + pass + + elif la_ == 3: + self.state = 1393 + self.match(Python3Parser.POWER) + self.state = 1394 + self.test() + pass + + elif la_ == 4: + self.state = 1395 + self.match(Python3Parser.STAR) + self.state = 1396 + self.test() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Comp_iterContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def comp_for(self): + return self.getTypedRuleContext(Python3Parser.Comp_forContext,0) + + + def comp_if(self): + return self.getTypedRuleContext(Python3Parser.Comp_ifContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_comp_iter + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterComp_iter" ): + listener.enterComp_iter(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitComp_iter" ): + listener.exitComp_iter(self) + + + + + def comp_iter(self): + + localctx = Python3Parser.Comp_iterContext(self, self._ctx, self.state) + self.enterRule(localctx, 224, self.RULE_comp_iter) + try: + self.state = 1401 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [9, 22]: + self.enterOuterAlt(localctx, 1) + self.state = 1399 + self.comp_for() + pass + elif token in [25]: + self.enterOuterAlt(localctx, 2) + self.state = 1400 + self.comp_if() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Comp_forContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def FOR(self): + return self.getToken(Python3Parser.FOR, 0) + + def exprlist(self): + return self.getTypedRuleContext(Python3Parser.ExprlistContext,0) + + + def IN(self): + return self.getToken(Python3Parser.IN, 0) + + def or_test(self): + return self.getTypedRuleContext(Python3Parser.Or_testContext,0) + + + def ASYNC(self): + return self.getToken(Python3Parser.ASYNC, 0) + + def comp_iter(self): + return self.getTypedRuleContext(Python3Parser.Comp_iterContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_comp_for + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterComp_for" ): + listener.enterComp_for(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitComp_for" ): + listener.exitComp_for(self) + + + + + def comp_for(self): + + localctx = Python3Parser.Comp_forContext(self, self._ctx, self.state) + self.enterRule(localctx, 226, self.RULE_comp_for) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1404 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==9: + self.state = 1403 + self.match(Python3Parser.ASYNC) + + + self.state = 1406 + self.match(Python3Parser.FOR) + self.state = 1407 + self.exprlist() + self.state = 1408 + self.match(Python3Parser.IN) + self.state = 1409 + self.or_test() + self.state = 1411 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 37749248) != 0): + self.state = 1410 + self.comp_iter() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Comp_ifContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def IF(self): + return self.getToken(Python3Parser.IF, 0) + + def test_nocond(self): + return self.getTypedRuleContext(Python3Parser.Test_nocondContext,0) + + + def comp_iter(self): + return self.getTypedRuleContext(Python3Parser.Comp_iterContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_comp_if + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterComp_if" ): + listener.enterComp_if(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitComp_if" ): + listener.exitComp_if(self) + + + + + def comp_if(self): + + localctx = Python3Parser.Comp_ifContext(self, self._ctx, self.state) + self.enterRule(localctx, 228, self.RULE_comp_if) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1413 + self.match(Python3Parser.IF) + self.state = 1414 + self.test_nocond() + self.state = 1416 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 37749248) != 0): + self.state = 1415 + self.comp_iter() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Encoding_declContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def name(self): + return self.getTypedRuleContext(Python3Parser.NameContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_encoding_decl + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEncoding_decl" ): + listener.enterEncoding_decl(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEncoding_decl" ): + listener.exitEncoding_decl(self) + + + + + def encoding_decl(self): + + localctx = Python3Parser.Encoding_declContext(self, self._ctx, self.state) + self.enterRule(localctx, 230, self.RULE_encoding_decl) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1418 + self.name() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Yield_exprContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def YIELD(self): + return self.getToken(Python3Parser.YIELD, 0) + + def yield_arg(self): + return self.getTypedRuleContext(Python3Parser.Yield_argContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_yield_expr + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterYield_expr" ): + listener.enterYield_expr(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitYield_expr" ): + listener.exitYield_expr(self) + + + + + def yield_expr(self): + + localctx = Python3Parser.Yield_exprContext(self, self._ctx, self.state) + self.enterRule(localctx, 232, self.RULE_yield_expr) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1420 + self.match(Python3Parser.YIELD) + self.state = 1422 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 180180556213912600) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 12673) != 0): + self.state = 1421 + self.yield_arg() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class Yield_argContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def FROM(self): + return self.getToken(Python3Parser.FROM, 0) + + def test(self): + return self.getTypedRuleContext(Python3Parser.TestContext,0) + + + def testlist(self): + return self.getTypedRuleContext(Python3Parser.TestlistContext,0) + + + def getRuleIndex(self): + return Python3Parser.RULE_yield_arg + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterYield_arg" ): + listener.enterYield_arg(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitYield_arg" ): + listener.exitYield_arg(self) + + + + + def yield_arg(self): + + localctx = Python3Parser.Yield_argContext(self, self._ctx, self.state) + self.enterRule(localctx, 234, self.RULE_yield_arg) + try: + self.state = 1427 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [23]: + self.enterOuterAlt(localctx, 1) + self.state = 1424 + self.match(Python3Parser.FROM) + self.state = 1425 + self.test() + pass + elif token in [3, 4, 10, 20, 29, 30, 31, 33, 38, 40, 45, 55, 57, 64, 71, 72, 76, 77]: + self.enterOuterAlt(localctx, 2) + self.state = 1426 + self.testlist() + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class StringsContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def STRING(self, i:int=None): + if i is None: + return self.getTokens(Python3Parser.STRING) + else: + return self.getToken(Python3Parser.STRING, i) + + def getRuleIndex(self): + return Python3Parser.RULE_strings + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterStrings" ): + listener.enterStrings(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitStrings" ): + listener.exitStrings(self) + + + + + def strings(self): + + localctx = Python3Parser.StringsContext(self, self._ctx, self.state) + self.enterRule(localctx, 236, self.RULE_strings) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1430 + self._errHandler.sync(self) + _la = self._input.LA(1) + while True: + self.state = 1429 + self.match(Python3Parser.STRING) + self.state = 1432 + self._errHandler.sync(self) + _la = self._input.LA(1) + if not (_la==3): + break + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + + def sempred(self, localctx:RuleContext, ruleIndex:int, predIndex:int): + if self._predicates == None: + self._predicates = dict() + self._predicates[60] = self.literal_pattern_sempred + self._predicates[61] = self.literal_expr_sempred + self._predicates[68] = self.pattern_capture_target_sempred + self._predicates[70] = self.value_pattern_sempred + self._predicates[97] = self.expr_sempred + pred = self._predicates.get(ruleIndex, None) + if pred is None: + raise Exception("No predicate with index:" + str(ruleIndex)) + else: + return pred(localctx, predIndex) + + def literal_pattern_sempred(self, localctx:Literal_patternContext, predIndex:int): + if predIndex == 0: + return self.CannotBePlusMinus() + + + def literal_expr_sempred(self, localctx:Literal_exprContext, predIndex:int): + if predIndex == 1: + return self.CannotBePlusMinus() + + + def pattern_capture_target_sempred(self, localctx:Pattern_capture_targetContext, predIndex:int): + if predIndex == 2: + return self.CannotBeDotLpEq() + + + def value_pattern_sempred(self, localctx:Value_patternContext, predIndex:int): + if predIndex == 3: + return self.CannotBeDotLpEq() + + + def expr_sempred(self, localctx:ExprContext, predIndex:int): + if predIndex == 4: + return self.precpred(self._ctx, 8) + + + if predIndex == 5: + return self.precpred(self._ctx, 6) + + + if predIndex == 6: + return self.precpred(self._ctx, 5) + + + if predIndex == 7: + return self.precpred(self._ctx, 4) + + + if predIndex == 8: + return self.precpred(self._ctx, 3) + + + if predIndex == 9: + return self.precpred(self._ctx, 2) + + + if predIndex == 10: + return self.precpred(self._ctx, 1) + + + + + diff --git a/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3ParserBase.py b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3ParserBase.py new file mode 100644 index 000000000..72a046e2a --- /dev/null +++ b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3ParserBase.py @@ -0,0 +1,9 @@ +from antlr4 import * + +class Python3ParserBase(Parser): + + def CannotBePlusMinus(self) -> bool: + return True + + def CannotBeDotLpEq(self) -> bool: + return True diff --git a/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3ParserListener.py b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3ParserListener.py new file mode 100644 index 000000000..8117a775d --- /dev/null +++ b/module_programming_ast/module_programming_ast/convert_code_to_ast/languages/python/Python3ParserListener.py @@ -0,0 +1,1083 @@ +# Generated from Python3Parser.g4 by ANTLR 4.13.1 +from antlr4 import * +if "." in __name__: + from .Python3Parser import Python3Parser +else: + from Python3Parser import Python3Parser + +# This class defines a complete listener for a parse tree produced by Python3Parser. +class Python3ParserListener(ParseTreeListener): + + # Enter a parse tree produced by Python3Parser#single_input. + def enterSingle_input(self, ctx:Python3Parser.Single_inputContext): + pass + + # Exit a parse tree produced by Python3Parser#single_input. + def exitSingle_input(self, ctx:Python3Parser.Single_inputContext): + pass + + + # Enter a parse tree produced by Python3Parser#file_input. + def enterFile_input(self, ctx:Python3Parser.File_inputContext): + pass + + # Exit a parse tree produced by Python3Parser#file_input. + def exitFile_input(self, ctx:Python3Parser.File_inputContext): + pass + + + # Enter a parse tree produced by Python3Parser#eval_input. + def enterEval_input(self, ctx:Python3Parser.Eval_inputContext): + pass + + # Exit a parse tree produced by Python3Parser#eval_input. + def exitEval_input(self, ctx:Python3Parser.Eval_inputContext): + pass + + + # Enter a parse tree produced by Python3Parser#decorator. + def enterDecorator(self, ctx:Python3Parser.DecoratorContext): + pass + + # Exit a parse tree produced by Python3Parser#decorator. + def exitDecorator(self, ctx:Python3Parser.DecoratorContext): + pass + + + # Enter a parse tree produced by Python3Parser#decorators. + def enterDecorators(self, ctx:Python3Parser.DecoratorsContext): + pass + + # Exit a parse tree produced by Python3Parser#decorators. + def exitDecorators(self, ctx:Python3Parser.DecoratorsContext): + pass + + + # Enter a parse tree produced by Python3Parser#decorated. + def enterDecorated(self, ctx:Python3Parser.DecoratedContext): + pass + + # Exit a parse tree produced by Python3Parser#decorated. + def exitDecorated(self, ctx:Python3Parser.DecoratedContext): + pass + + + # Enter a parse tree produced by Python3Parser#async_funcdef. + def enterAsync_funcdef(self, ctx:Python3Parser.Async_funcdefContext): + pass + + # Exit a parse tree produced by Python3Parser#async_funcdef. + def exitAsync_funcdef(self, ctx:Python3Parser.Async_funcdefContext): + pass + + + # Enter a parse tree produced by Python3Parser#funcdef. + def enterFuncdef(self, ctx:Python3Parser.FuncdefContext): + pass + + # Exit a parse tree produced by Python3Parser#funcdef. + def exitFuncdef(self, ctx:Python3Parser.FuncdefContext): + pass + + + # Enter a parse tree produced by Python3Parser#parameters. + def enterParameters(self, ctx:Python3Parser.ParametersContext): + pass + + # Exit a parse tree produced by Python3Parser#parameters. + def exitParameters(self, ctx:Python3Parser.ParametersContext): + pass + + + # Enter a parse tree produced by Python3Parser#typedargslist. + def enterTypedargslist(self, ctx:Python3Parser.TypedargslistContext): + pass + + # Exit a parse tree produced by Python3Parser#typedargslist. + def exitTypedargslist(self, ctx:Python3Parser.TypedargslistContext): + pass + + + # Enter a parse tree produced by Python3Parser#tfpdef. + def enterTfpdef(self, ctx:Python3Parser.TfpdefContext): + pass + + # Exit a parse tree produced by Python3Parser#tfpdef. + def exitTfpdef(self, ctx:Python3Parser.TfpdefContext): + pass + + + # Enter a parse tree produced by Python3Parser#varargslist. + def enterVarargslist(self, ctx:Python3Parser.VarargslistContext): + pass + + # Exit a parse tree produced by Python3Parser#varargslist. + def exitVarargslist(self, ctx:Python3Parser.VarargslistContext): + pass + + + # Enter a parse tree produced by Python3Parser#vfpdef. + def enterVfpdef(self, ctx:Python3Parser.VfpdefContext): + pass + + # Exit a parse tree produced by Python3Parser#vfpdef. + def exitVfpdef(self, ctx:Python3Parser.VfpdefContext): + pass + + + # Enter a parse tree produced by Python3Parser#stmt. + def enterStmt(self, ctx:Python3Parser.StmtContext): + pass + + # Exit a parse tree produced by Python3Parser#stmt. + def exitStmt(self, ctx:Python3Parser.StmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#simple_stmts. + def enterSimple_stmts(self, ctx:Python3Parser.Simple_stmtsContext): + pass + + # Exit a parse tree produced by Python3Parser#simple_stmts. + def exitSimple_stmts(self, ctx:Python3Parser.Simple_stmtsContext): + pass + + + # Enter a parse tree produced by Python3Parser#simple_stmt. + def enterSimple_stmt(self, ctx:Python3Parser.Simple_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#simple_stmt. + def exitSimple_stmt(self, ctx:Python3Parser.Simple_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#expr_stmt. + def enterExpr_stmt(self, ctx:Python3Parser.Expr_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#expr_stmt. + def exitExpr_stmt(self, ctx:Python3Parser.Expr_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#annassign. + def enterAnnassign(self, ctx:Python3Parser.AnnassignContext): + pass + + # Exit a parse tree produced by Python3Parser#annassign. + def exitAnnassign(self, ctx:Python3Parser.AnnassignContext): + pass + + + # Enter a parse tree produced by Python3Parser#testlist_star_expr. + def enterTestlist_star_expr(self, ctx:Python3Parser.Testlist_star_exprContext): + pass + + # Exit a parse tree produced by Python3Parser#testlist_star_expr. + def exitTestlist_star_expr(self, ctx:Python3Parser.Testlist_star_exprContext): + pass + + + # Enter a parse tree produced by Python3Parser#augassign. + def enterAugassign(self, ctx:Python3Parser.AugassignContext): + pass + + # Exit a parse tree produced by Python3Parser#augassign. + def exitAugassign(self, ctx:Python3Parser.AugassignContext): + pass + + + # Enter a parse tree produced by Python3Parser#del_stmt. + def enterDel_stmt(self, ctx:Python3Parser.Del_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#del_stmt. + def exitDel_stmt(self, ctx:Python3Parser.Del_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#pass_stmt. + def enterPass_stmt(self, ctx:Python3Parser.Pass_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#pass_stmt. + def exitPass_stmt(self, ctx:Python3Parser.Pass_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#flow_stmt. + def enterFlow_stmt(self, ctx:Python3Parser.Flow_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#flow_stmt. + def exitFlow_stmt(self, ctx:Python3Parser.Flow_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#break_stmt. + def enterBreak_stmt(self, ctx:Python3Parser.Break_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#break_stmt. + def exitBreak_stmt(self, ctx:Python3Parser.Break_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#continue_stmt. + def enterContinue_stmt(self, ctx:Python3Parser.Continue_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#continue_stmt. + def exitContinue_stmt(self, ctx:Python3Parser.Continue_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#return_stmt. + def enterReturn_stmt(self, ctx:Python3Parser.Return_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#return_stmt. + def exitReturn_stmt(self, ctx:Python3Parser.Return_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#yield_stmt. + def enterYield_stmt(self, ctx:Python3Parser.Yield_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#yield_stmt. + def exitYield_stmt(self, ctx:Python3Parser.Yield_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#raise_stmt. + def enterRaise_stmt(self, ctx:Python3Parser.Raise_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#raise_stmt. + def exitRaise_stmt(self, ctx:Python3Parser.Raise_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#import_stmt. + def enterImport_stmt(self, ctx:Python3Parser.Import_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#import_stmt. + def exitImport_stmt(self, ctx:Python3Parser.Import_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#import_name. + def enterImport_name(self, ctx:Python3Parser.Import_nameContext): + pass + + # Exit a parse tree produced by Python3Parser#import_name. + def exitImport_name(self, ctx:Python3Parser.Import_nameContext): + pass + + + # Enter a parse tree produced by Python3Parser#import_from. + def enterImport_from(self, ctx:Python3Parser.Import_fromContext): + pass + + # Exit a parse tree produced by Python3Parser#import_from. + def exitImport_from(self, ctx:Python3Parser.Import_fromContext): + pass + + + # Enter a parse tree produced by Python3Parser#import_as_name. + def enterImport_as_name(self, ctx:Python3Parser.Import_as_nameContext): + pass + + # Exit a parse tree produced by Python3Parser#import_as_name. + def exitImport_as_name(self, ctx:Python3Parser.Import_as_nameContext): + pass + + + # Enter a parse tree produced by Python3Parser#dotted_as_name. + def enterDotted_as_name(self, ctx:Python3Parser.Dotted_as_nameContext): + pass + + # Exit a parse tree produced by Python3Parser#dotted_as_name. + def exitDotted_as_name(self, ctx:Python3Parser.Dotted_as_nameContext): + pass + + + # Enter a parse tree produced by Python3Parser#import_as_names. + def enterImport_as_names(self, ctx:Python3Parser.Import_as_namesContext): + pass + + # Exit a parse tree produced by Python3Parser#import_as_names. + def exitImport_as_names(self, ctx:Python3Parser.Import_as_namesContext): + pass + + + # Enter a parse tree produced by Python3Parser#dotted_as_names. + def enterDotted_as_names(self, ctx:Python3Parser.Dotted_as_namesContext): + pass + + # Exit a parse tree produced by Python3Parser#dotted_as_names. + def exitDotted_as_names(self, ctx:Python3Parser.Dotted_as_namesContext): + pass + + + # Enter a parse tree produced by Python3Parser#dotted_name. + def enterDotted_name(self, ctx:Python3Parser.Dotted_nameContext): + pass + + # Exit a parse tree produced by Python3Parser#dotted_name. + def exitDotted_name(self, ctx:Python3Parser.Dotted_nameContext): + pass + + + # Enter a parse tree produced by Python3Parser#global_stmt. + def enterGlobal_stmt(self, ctx:Python3Parser.Global_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#global_stmt. + def exitGlobal_stmt(self, ctx:Python3Parser.Global_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#nonlocal_stmt. + def enterNonlocal_stmt(self, ctx:Python3Parser.Nonlocal_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#nonlocal_stmt. + def exitNonlocal_stmt(self, ctx:Python3Parser.Nonlocal_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#assert_stmt. + def enterAssert_stmt(self, ctx:Python3Parser.Assert_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#assert_stmt. + def exitAssert_stmt(self, ctx:Python3Parser.Assert_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#compound_stmt. + def enterCompound_stmt(self, ctx:Python3Parser.Compound_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#compound_stmt. + def exitCompound_stmt(self, ctx:Python3Parser.Compound_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#async_stmt. + def enterAsync_stmt(self, ctx:Python3Parser.Async_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#async_stmt. + def exitAsync_stmt(self, ctx:Python3Parser.Async_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#if_stmt. + def enterIf_stmt(self, ctx:Python3Parser.If_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#if_stmt. + def exitIf_stmt(self, ctx:Python3Parser.If_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#while_stmt. + def enterWhile_stmt(self, ctx:Python3Parser.While_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#while_stmt. + def exitWhile_stmt(self, ctx:Python3Parser.While_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#for_stmt. + def enterFor_stmt(self, ctx:Python3Parser.For_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#for_stmt. + def exitFor_stmt(self, ctx:Python3Parser.For_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#try_stmt. + def enterTry_stmt(self, ctx:Python3Parser.Try_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#try_stmt. + def exitTry_stmt(self, ctx:Python3Parser.Try_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#with_stmt. + def enterWith_stmt(self, ctx:Python3Parser.With_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#with_stmt. + def exitWith_stmt(self, ctx:Python3Parser.With_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#with_item. + def enterWith_item(self, ctx:Python3Parser.With_itemContext): + pass + + # Exit a parse tree produced by Python3Parser#with_item. + def exitWith_item(self, ctx:Python3Parser.With_itemContext): + pass + + + # Enter a parse tree produced by Python3Parser#except_clause. + def enterExcept_clause(self, ctx:Python3Parser.Except_clauseContext): + pass + + # Exit a parse tree produced by Python3Parser#except_clause. + def exitExcept_clause(self, ctx:Python3Parser.Except_clauseContext): + pass + + + # Enter a parse tree produced by Python3Parser#block. + def enterBlock(self, ctx:Python3Parser.BlockContext): + pass + + # Exit a parse tree produced by Python3Parser#block. + def exitBlock(self, ctx:Python3Parser.BlockContext): + pass + + + # Enter a parse tree produced by Python3Parser#match_stmt. + def enterMatch_stmt(self, ctx:Python3Parser.Match_stmtContext): + pass + + # Exit a parse tree produced by Python3Parser#match_stmt. + def exitMatch_stmt(self, ctx:Python3Parser.Match_stmtContext): + pass + + + # Enter a parse tree produced by Python3Parser#subject_expr. + def enterSubject_expr(self, ctx:Python3Parser.Subject_exprContext): + pass + + # Exit a parse tree produced by Python3Parser#subject_expr. + def exitSubject_expr(self, ctx:Python3Parser.Subject_exprContext): + pass + + + # Enter a parse tree produced by Python3Parser#star_named_expressions. + def enterStar_named_expressions(self, ctx:Python3Parser.Star_named_expressionsContext): + pass + + # Exit a parse tree produced by Python3Parser#star_named_expressions. + def exitStar_named_expressions(self, ctx:Python3Parser.Star_named_expressionsContext): + pass + + + # Enter a parse tree produced by Python3Parser#star_named_expression. + def enterStar_named_expression(self, ctx:Python3Parser.Star_named_expressionContext): + pass + + # Exit a parse tree produced by Python3Parser#star_named_expression. + def exitStar_named_expression(self, ctx:Python3Parser.Star_named_expressionContext): + pass + + + # Enter a parse tree produced by Python3Parser#case_block. + def enterCase_block(self, ctx:Python3Parser.Case_blockContext): + pass + + # Exit a parse tree produced by Python3Parser#case_block. + def exitCase_block(self, ctx:Python3Parser.Case_blockContext): + pass + + + # Enter a parse tree produced by Python3Parser#guard. + def enterGuard(self, ctx:Python3Parser.GuardContext): + pass + + # Exit a parse tree produced by Python3Parser#guard. + def exitGuard(self, ctx:Python3Parser.GuardContext): + pass + + + # Enter a parse tree produced by Python3Parser#patterns. + def enterPatterns(self, ctx:Python3Parser.PatternsContext): + pass + + # Exit a parse tree produced by Python3Parser#patterns. + def exitPatterns(self, ctx:Python3Parser.PatternsContext): + pass + + + # Enter a parse tree produced by Python3Parser#pattern. + def enterPattern(self, ctx:Python3Parser.PatternContext): + pass + + # Exit a parse tree produced by Python3Parser#pattern. + def exitPattern(self, ctx:Python3Parser.PatternContext): + pass + + + # Enter a parse tree produced by Python3Parser#as_pattern. + def enterAs_pattern(self, ctx:Python3Parser.As_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#as_pattern. + def exitAs_pattern(self, ctx:Python3Parser.As_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#or_pattern. + def enterOr_pattern(self, ctx:Python3Parser.Or_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#or_pattern. + def exitOr_pattern(self, ctx:Python3Parser.Or_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#closed_pattern. + def enterClosed_pattern(self, ctx:Python3Parser.Closed_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#closed_pattern. + def exitClosed_pattern(self, ctx:Python3Parser.Closed_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#literal_pattern. + def enterLiteral_pattern(self, ctx:Python3Parser.Literal_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#literal_pattern. + def exitLiteral_pattern(self, ctx:Python3Parser.Literal_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#literal_expr. + def enterLiteral_expr(self, ctx:Python3Parser.Literal_exprContext): + pass + + # Exit a parse tree produced by Python3Parser#literal_expr. + def exitLiteral_expr(self, ctx:Python3Parser.Literal_exprContext): + pass + + + # Enter a parse tree produced by Python3Parser#complex_number. + def enterComplex_number(self, ctx:Python3Parser.Complex_numberContext): + pass + + # Exit a parse tree produced by Python3Parser#complex_number. + def exitComplex_number(self, ctx:Python3Parser.Complex_numberContext): + pass + + + # Enter a parse tree produced by Python3Parser#signed_number. + def enterSigned_number(self, ctx:Python3Parser.Signed_numberContext): + pass + + # Exit a parse tree produced by Python3Parser#signed_number. + def exitSigned_number(self, ctx:Python3Parser.Signed_numberContext): + pass + + + # Enter a parse tree produced by Python3Parser#signed_real_number. + def enterSigned_real_number(self, ctx:Python3Parser.Signed_real_numberContext): + pass + + # Exit a parse tree produced by Python3Parser#signed_real_number. + def exitSigned_real_number(self, ctx:Python3Parser.Signed_real_numberContext): + pass + + + # Enter a parse tree produced by Python3Parser#real_number. + def enterReal_number(self, ctx:Python3Parser.Real_numberContext): + pass + + # Exit a parse tree produced by Python3Parser#real_number. + def exitReal_number(self, ctx:Python3Parser.Real_numberContext): + pass + + + # Enter a parse tree produced by Python3Parser#imaginary_number. + def enterImaginary_number(self, ctx:Python3Parser.Imaginary_numberContext): + pass + + # Exit a parse tree produced by Python3Parser#imaginary_number. + def exitImaginary_number(self, ctx:Python3Parser.Imaginary_numberContext): + pass + + + # Enter a parse tree produced by Python3Parser#capture_pattern. + def enterCapture_pattern(self, ctx:Python3Parser.Capture_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#capture_pattern. + def exitCapture_pattern(self, ctx:Python3Parser.Capture_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#pattern_capture_target. + def enterPattern_capture_target(self, ctx:Python3Parser.Pattern_capture_targetContext): + pass + + # Exit a parse tree produced by Python3Parser#pattern_capture_target. + def exitPattern_capture_target(self, ctx:Python3Parser.Pattern_capture_targetContext): + pass + + + # Enter a parse tree produced by Python3Parser#wildcard_pattern. + def enterWildcard_pattern(self, ctx:Python3Parser.Wildcard_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#wildcard_pattern. + def exitWildcard_pattern(self, ctx:Python3Parser.Wildcard_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#value_pattern. + def enterValue_pattern(self, ctx:Python3Parser.Value_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#value_pattern. + def exitValue_pattern(self, ctx:Python3Parser.Value_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#attr. + def enterAttr(self, ctx:Python3Parser.AttrContext): + pass + + # Exit a parse tree produced by Python3Parser#attr. + def exitAttr(self, ctx:Python3Parser.AttrContext): + pass + + + # Enter a parse tree produced by Python3Parser#name_or_attr. + def enterName_or_attr(self, ctx:Python3Parser.Name_or_attrContext): + pass + + # Exit a parse tree produced by Python3Parser#name_or_attr. + def exitName_or_attr(self, ctx:Python3Parser.Name_or_attrContext): + pass + + + # Enter a parse tree produced by Python3Parser#group_pattern. + def enterGroup_pattern(self, ctx:Python3Parser.Group_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#group_pattern. + def exitGroup_pattern(self, ctx:Python3Parser.Group_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#sequence_pattern. + def enterSequence_pattern(self, ctx:Python3Parser.Sequence_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#sequence_pattern. + def exitSequence_pattern(self, ctx:Python3Parser.Sequence_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#open_sequence_pattern. + def enterOpen_sequence_pattern(self, ctx:Python3Parser.Open_sequence_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#open_sequence_pattern. + def exitOpen_sequence_pattern(self, ctx:Python3Parser.Open_sequence_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#maybe_sequence_pattern. + def enterMaybe_sequence_pattern(self, ctx:Python3Parser.Maybe_sequence_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#maybe_sequence_pattern. + def exitMaybe_sequence_pattern(self, ctx:Python3Parser.Maybe_sequence_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#maybe_star_pattern. + def enterMaybe_star_pattern(self, ctx:Python3Parser.Maybe_star_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#maybe_star_pattern. + def exitMaybe_star_pattern(self, ctx:Python3Parser.Maybe_star_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#star_pattern. + def enterStar_pattern(self, ctx:Python3Parser.Star_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#star_pattern. + def exitStar_pattern(self, ctx:Python3Parser.Star_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#mapping_pattern. + def enterMapping_pattern(self, ctx:Python3Parser.Mapping_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#mapping_pattern. + def exitMapping_pattern(self, ctx:Python3Parser.Mapping_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#items_pattern. + def enterItems_pattern(self, ctx:Python3Parser.Items_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#items_pattern. + def exitItems_pattern(self, ctx:Python3Parser.Items_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#key_value_pattern. + def enterKey_value_pattern(self, ctx:Python3Parser.Key_value_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#key_value_pattern. + def exitKey_value_pattern(self, ctx:Python3Parser.Key_value_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#double_star_pattern. + def enterDouble_star_pattern(self, ctx:Python3Parser.Double_star_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#double_star_pattern. + def exitDouble_star_pattern(self, ctx:Python3Parser.Double_star_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#class_pattern. + def enterClass_pattern(self, ctx:Python3Parser.Class_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#class_pattern. + def exitClass_pattern(self, ctx:Python3Parser.Class_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#positional_patterns. + def enterPositional_patterns(self, ctx:Python3Parser.Positional_patternsContext): + pass + + # Exit a parse tree produced by Python3Parser#positional_patterns. + def exitPositional_patterns(self, ctx:Python3Parser.Positional_patternsContext): + pass + + + # Enter a parse tree produced by Python3Parser#keyword_patterns. + def enterKeyword_patterns(self, ctx:Python3Parser.Keyword_patternsContext): + pass + + # Exit a parse tree produced by Python3Parser#keyword_patterns. + def exitKeyword_patterns(self, ctx:Python3Parser.Keyword_patternsContext): + pass + + + # Enter a parse tree produced by Python3Parser#keyword_pattern. + def enterKeyword_pattern(self, ctx:Python3Parser.Keyword_patternContext): + pass + + # Exit a parse tree produced by Python3Parser#keyword_pattern. + def exitKeyword_pattern(self, ctx:Python3Parser.Keyword_patternContext): + pass + + + # Enter a parse tree produced by Python3Parser#test. + def enterTest(self, ctx:Python3Parser.TestContext): + pass + + # Exit a parse tree produced by Python3Parser#test. + def exitTest(self, ctx:Python3Parser.TestContext): + pass + + + # Enter a parse tree produced by Python3Parser#test_nocond. + def enterTest_nocond(self, ctx:Python3Parser.Test_nocondContext): + pass + + # Exit a parse tree produced by Python3Parser#test_nocond. + def exitTest_nocond(self, ctx:Python3Parser.Test_nocondContext): + pass + + + # Enter a parse tree produced by Python3Parser#lambdef. + def enterLambdef(self, ctx:Python3Parser.LambdefContext): + pass + + # Exit a parse tree produced by Python3Parser#lambdef. + def exitLambdef(self, ctx:Python3Parser.LambdefContext): + pass + + + # Enter a parse tree produced by Python3Parser#lambdef_nocond. + def enterLambdef_nocond(self, ctx:Python3Parser.Lambdef_nocondContext): + pass + + # Exit a parse tree produced by Python3Parser#lambdef_nocond. + def exitLambdef_nocond(self, ctx:Python3Parser.Lambdef_nocondContext): + pass + + + # Enter a parse tree produced by Python3Parser#or_test. + def enterOr_test(self, ctx:Python3Parser.Or_testContext): + pass + + # Exit a parse tree produced by Python3Parser#or_test. + def exitOr_test(self, ctx:Python3Parser.Or_testContext): + pass + + + # Enter a parse tree produced by Python3Parser#and_test. + def enterAnd_test(self, ctx:Python3Parser.And_testContext): + pass + + # Exit a parse tree produced by Python3Parser#and_test. + def exitAnd_test(self, ctx:Python3Parser.And_testContext): + pass + + + # Enter a parse tree produced by Python3Parser#not_test. + def enterNot_test(self, ctx:Python3Parser.Not_testContext): + pass + + # Exit a parse tree produced by Python3Parser#not_test. + def exitNot_test(self, ctx:Python3Parser.Not_testContext): + pass + + + # Enter a parse tree produced by Python3Parser#comparison. + def enterComparison(self, ctx:Python3Parser.ComparisonContext): + pass + + # Exit a parse tree produced by Python3Parser#comparison. + def exitComparison(self, ctx:Python3Parser.ComparisonContext): + pass + + + # Enter a parse tree produced by Python3Parser#comp_op. + def enterComp_op(self, ctx:Python3Parser.Comp_opContext): + pass + + # Exit a parse tree produced by Python3Parser#comp_op. + def exitComp_op(self, ctx:Python3Parser.Comp_opContext): + pass + + + # Enter a parse tree produced by Python3Parser#star_expr. + def enterStar_expr(self, ctx:Python3Parser.Star_exprContext): + pass + + # Exit a parse tree produced by Python3Parser#star_expr. + def exitStar_expr(self, ctx:Python3Parser.Star_exprContext): + pass + + + # Enter a parse tree produced by Python3Parser#expr. + def enterExpr(self, ctx:Python3Parser.ExprContext): + pass + + # Exit a parse tree produced by Python3Parser#expr. + def exitExpr(self, ctx:Python3Parser.ExprContext): + pass + + + # Enter a parse tree produced by Python3Parser#atom_expr. + def enterAtom_expr(self, ctx:Python3Parser.Atom_exprContext): + pass + + # Exit a parse tree produced by Python3Parser#atom_expr. + def exitAtom_expr(self, ctx:Python3Parser.Atom_exprContext): + pass + + + # Enter a parse tree produced by Python3Parser#atom. + def enterAtom(self, ctx:Python3Parser.AtomContext): + pass + + # Exit a parse tree produced by Python3Parser#atom. + def exitAtom(self, ctx:Python3Parser.AtomContext): + pass + + + # Enter a parse tree produced by Python3Parser#name. + def enterName(self, ctx:Python3Parser.NameContext): + pass + + # Exit a parse tree produced by Python3Parser#name. + def exitName(self, ctx:Python3Parser.NameContext): + pass + + + # Enter a parse tree produced by Python3Parser#testlist_comp. + def enterTestlist_comp(self, ctx:Python3Parser.Testlist_compContext): + pass + + # Exit a parse tree produced by Python3Parser#testlist_comp. + def exitTestlist_comp(self, ctx:Python3Parser.Testlist_compContext): + pass + + + # Enter a parse tree produced by Python3Parser#trailer. + def enterTrailer(self, ctx:Python3Parser.TrailerContext): + pass + + # Exit a parse tree produced by Python3Parser#trailer. + def exitTrailer(self, ctx:Python3Parser.TrailerContext): + pass + + + # Enter a parse tree produced by Python3Parser#subscriptlist. + def enterSubscriptlist(self, ctx:Python3Parser.SubscriptlistContext): + pass + + # Exit a parse tree produced by Python3Parser#subscriptlist. + def exitSubscriptlist(self, ctx:Python3Parser.SubscriptlistContext): + pass + + + # Enter a parse tree produced by Python3Parser#subscript_. + def enterSubscript_(self, ctx:Python3Parser.Subscript_Context): + pass + + # Exit a parse tree produced by Python3Parser#subscript_. + def exitSubscript_(self, ctx:Python3Parser.Subscript_Context): + pass + + + # Enter a parse tree produced by Python3Parser#sliceop. + def enterSliceop(self, ctx:Python3Parser.SliceopContext): + pass + + # Exit a parse tree produced by Python3Parser#sliceop. + def exitSliceop(self, ctx:Python3Parser.SliceopContext): + pass + + + # Enter a parse tree produced by Python3Parser#exprlist. + def enterExprlist(self, ctx:Python3Parser.ExprlistContext): + pass + + # Exit a parse tree produced by Python3Parser#exprlist. + def exitExprlist(self, ctx:Python3Parser.ExprlistContext): + pass + + + # Enter a parse tree produced by Python3Parser#testlist. + def enterTestlist(self, ctx:Python3Parser.TestlistContext): + pass + + # Exit a parse tree produced by Python3Parser#testlist. + def exitTestlist(self, ctx:Python3Parser.TestlistContext): + pass + + + # Enter a parse tree produced by Python3Parser#dictorsetmaker. + def enterDictorsetmaker(self, ctx:Python3Parser.DictorsetmakerContext): + pass + + # Exit a parse tree produced by Python3Parser#dictorsetmaker. + def exitDictorsetmaker(self, ctx:Python3Parser.DictorsetmakerContext): + pass + + + # Enter a parse tree produced by Python3Parser#classdef. + def enterClassdef(self, ctx:Python3Parser.ClassdefContext): + pass + + # Exit a parse tree produced by Python3Parser#classdef. + def exitClassdef(self, ctx:Python3Parser.ClassdefContext): + pass + + + # Enter a parse tree produced by Python3Parser#arglist. + def enterArglist(self, ctx:Python3Parser.ArglistContext): + pass + + # Exit a parse tree produced by Python3Parser#arglist. + def exitArglist(self, ctx:Python3Parser.ArglistContext): + pass + + + # Enter a parse tree produced by Python3Parser#argument. + def enterArgument(self, ctx:Python3Parser.ArgumentContext): + pass + + # Exit a parse tree produced by Python3Parser#argument. + def exitArgument(self, ctx:Python3Parser.ArgumentContext): + pass + + + # Enter a parse tree produced by Python3Parser#comp_iter. + def enterComp_iter(self, ctx:Python3Parser.Comp_iterContext): + pass + + # Exit a parse tree produced by Python3Parser#comp_iter. + def exitComp_iter(self, ctx:Python3Parser.Comp_iterContext): + pass + + + # Enter a parse tree produced by Python3Parser#comp_for. + def enterComp_for(self, ctx:Python3Parser.Comp_forContext): + pass + + # Exit a parse tree produced by Python3Parser#comp_for. + def exitComp_for(self, ctx:Python3Parser.Comp_forContext): + pass + + + # Enter a parse tree produced by Python3Parser#comp_if. + def enterComp_if(self, ctx:Python3Parser.Comp_ifContext): + pass + + # Exit a parse tree produced by Python3Parser#comp_if. + def exitComp_if(self, ctx:Python3Parser.Comp_ifContext): + pass + + + # Enter a parse tree produced by Python3Parser#encoding_decl. + def enterEncoding_decl(self, ctx:Python3Parser.Encoding_declContext): + pass + + # Exit a parse tree produced by Python3Parser#encoding_decl. + def exitEncoding_decl(self, ctx:Python3Parser.Encoding_declContext): + pass + + + # Enter a parse tree produced by Python3Parser#yield_expr. + def enterYield_expr(self, ctx:Python3Parser.Yield_exprContext): + pass + + # Exit a parse tree produced by Python3Parser#yield_expr. + def exitYield_expr(self, ctx:Python3Parser.Yield_exprContext): + pass + + + # Enter a parse tree produced by Python3Parser#yield_arg. + def enterYield_arg(self, ctx:Python3Parser.Yield_argContext): + pass + + # Exit a parse tree produced by Python3Parser#yield_arg. + def exitYield_arg(self, ctx:Python3Parser.Yield_argContext): + pass + + + # Enter a parse tree produced by Python3Parser#strings. + def enterStrings(self, ctx:Python3Parser.StringsContext): + pass + + # Exit a parse tree produced by Python3Parser#strings. + def exitStrings(self, ctx:Python3Parser.StringsContext): + pass + + + +del Python3Parser \ No newline at end of file diff --git a/module_programming_ast/module_programming_ast/convert_code_to_ast/method_node.py b/module_programming_ast/module_programming_ast/convert_code_to_ast/method_node.py new file mode 100644 index 000000000..5f2bd6d2b --- /dev/null +++ b/module_programming_ast/module_programming_ast/convert_code_to_ast/method_node.py @@ -0,0 +1,15 @@ +from dataclasses import dataclass +from typing import Any + + +#TODO Extract the datanode to here +@dataclass +class MethodNode: + line_start: int + line_end: int + source_code: str + name: str + ast: Any + + def __str__(self): + return f"MethodNode({self.name}, lines {self.line_start} to {self.line_end})" diff --git a/module_programming_ast/module_programming_ast/feedback_suggestions/__init__.py b/module_programming_ast/module_programming_ast/feedback_suggestions/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/module_programming_ast/module_programming_ast/feedback_suggestions/ap_ted_computer.py b/module_programming_ast/module_programming_ast/feedback_suggestions/ap_ted_computer.py new file mode 100644 index 000000000..c07a17ef6 --- /dev/null +++ b/module_programming_ast/module_programming_ast/feedback_suggestions/ap_ted_computer.py @@ -0,0 +1,105 @@ +from dataclasses import dataclass +from typing import Dict, Tuple, Union, cast + +from apted import APTED, Config # pylint: disable=import-error + + +class FeedbackFocusedConfig(Config): + def rename(self, node1, node2): + # Adjusting the renaming costs depending on the node type + if 'Var' in node1.name and 'Var' in node2.name: + return 0 # Ignore variable renaming + if 'Literal' in node1.name and 'Literal' in node2.name: + return 0.1 # Low costs for changes in literals + if 'Comment' in node1.name and 'Comment' in node2.name: + return 0 # Ignore commmets + return 1 if node1.name != node2.name else 0 # Standardkosten für andere Typen + + def insert(self, node): + # Higher costs for inserting new control structures + if 'Control' in node.name: + return 2 + return 1 + + def delete(self, node): + # Higher costs for deleting new control structures + if 'Control' in node.name: + return 2 + return 1 + + +def remove_whitespace(s: str) -> str: + return "".join(s.split()) + + +def cache_key(code1: str, code2: str) -> Tuple[str, str]: + return remove_whitespace(code1), remove_whitespace(code2) + + +@dataclass +class UncomputedComparison: + code1: str + tree1: str + code2: str + tree2: str + + +@dataclass +class SimilarityScore: + distance: float + + def __repr__(self): + return f"SimilarityScore(distance={self.distance})" + + def __str__(self): + return f"distance={self.distance}" + + +class CodeSimilarityComputer: + """ + Takes multiple pairs of code snippets and their corresponding tree representations, + and computes their similarity scores using AP-TED. It also caches the similarity + scores for faster computation and auto-assigns a similarity of 0.0 distance to + identical code snippets (ignoring whitespace). + """ + + def __init__(self) -> None: + # keys are with all whitespace removed + self.cache: Dict[Tuple[str, str], Union[SimilarityScore, UncomputedComparison]] = {} + + def add_comparison(self, code1: str, tree1: str, code2: str, tree2: str): + """Add a comparison to later compute.""" + key = cache_key(code1, code2) + if key in self.cache: + return + if remove_whitespace(code1) == remove_whitespace(code2): + # identical code snippets in almost all cases + self.cache[key] = SimilarityScore(0.0) # perfect match (distance is 0) + else: + self.cache[key] = UncomputedComparison(code1, tree1, code2, tree2) + + def compute_similarity_scores(self): + """Compute the similarity scores for all comparisons.""" + wanted_comparisons = [] + + for value in self.cache.values(): + if isinstance(value, UncomputedComparison): + wanted_comparisons.append((value.code1, value.tree1, value.code2, value.tree2)) + + if not wanted_comparisons: + return + + for code1, tree1, code2, tree2 in wanted_comparisons: + apted = APTED(tree1, tree2, FeedbackFocusedConfig()) + distance = apted.compute_edit_distance() + mapping = apted.compute_edit_mapping() # TODO: Not needed now, but maybe for the config + self.cache[cache_key(code1, code2)] = SimilarityScore(distance) + + def get_similarity_score(self, code1: str, code2: str) -> SimilarityScore: + """Get the similarity score for a comparison.""" + key = cache_key(code1, code2) + if key not in self.cache: + raise ValueError("Similarity score not yet computed. Call compute_similarity_scores() first.") + if isinstance(self.cache[key], UncomputedComparison): + raise ValueError("Similarity score not yet computed. Call compute_similarity_scores() first.") + return cast(SimilarityScore, self.cache[key]) \ No newline at end of file diff --git a/module_programming_ast/module_programming_ast/feedback_suggestions/batch.py b/module_programming_ast/module_programming_ast/feedback_suggestions/batch.py new file mode 100644 index 000000000..4c99ff8c2 --- /dev/null +++ b/module_programming_ast/module_programming_ast/feedback_suggestions/batch.py @@ -0,0 +1,14 @@ +from itertools import islice, zip_longest + +# https://docs.python.org/3/library/itertools.html#itertools-recipes + +#TODO Move this to module athena, since this is just copied from ThemisML +def batched(iterable, n): + """Batch data into lists of length n. The last batch may be shorter.""" + # batched('ABCDEFG', 3) --> ABC DEF G + it = iter(iterable) + while True: + batch = list(islice(it, n)) + if not batch: + return + yield batch \ No newline at end of file diff --git a/module_programming_ast/module_programming_ast/feedback_suggestions/feedback_suggestions.py b/module_programming_ast/module_programming_ast/feedback_suggestions/feedback_suggestions.py new file mode 100644 index 000000000..b60e4e35a --- /dev/null +++ b/module_programming_ast/module_programming_ast/feedback_suggestions/feedback_suggestions.py @@ -0,0 +1,138 @@ +from typing import Dict, Iterable, List +import gc + +from athena.helpers.programming.feedback import format_feedback_title +from athena.logger import logger +from athena.programming import Feedback, Submission + +from module_programming_ast.convert_code_to_ast.extract_method_and_ast import parse +from module_programming_ast.convert_code_to_ast.method_node import MethodNode +from module_programming_ast.feedback_suggestions.ap_ted_computer import CodeSimilarityComputer +from module_programming_ast.feedback_suggestions.batch import batched + + +APTED_THRESHOLD = 10 # TODO Needs to be adapted + + +def make_feedback_suggestion_from(feedback: Feedback, submission: Submission, + submission_method: MethodNode) -> Feedback: + suggestion = feedback.copy(deep=True) + # add meta information for debugging + suggestion.meta["original_feedback_id"] = feedback.id + suggestion.meta["original_method_code"] = suggestion.meta["method_code"] + suggestion.meta["method_code"] = submission_method.source_code + # adjust for submission + suggestion.submission_id = submission.id + suggestion.line_start = submission_method.line_start + suggestion.line_end = submission_method.line_end + # regenerate title from filename and line numbers + suggestion.title = format_feedback_title(suggestion.file_path, suggestion.line_start, suggestion.line_end) + # remove ID + suggestion.id = None + return suggestion + + +class CodeComparisonWithCorrespondingSuggestions: + """A pair of code snippets with a corresponding suggestions if their similarity is high enough.""" + + def __init__(self, code1: str, code2: str, tree1: str, tree2: str, suggestion: Feedback) -> None: + self.code1 = code1 + self.code2 = code2 + self.tree1 = tree1 + self.tree2 = tree2 + self.suggestion = suggestion + + def has_same_code(self, other) -> bool: + return self.code1 == other.code1 and self.code2 == other.code2 + + +def group_feedbacks_by_file_path(feedbacks: List[Feedback]) -> Dict[str, List[Feedback]]: + """Groups feedbacks by file path for faster access.""" + feedbacks_by_file_path: Dict[str, List[Feedback]] = {} + for feedback in feedbacks: + if feedback.file_path not in feedbacks_by_file_path: + feedbacks_by_file_path[str(feedback.file_path)] = [] + feedbacks_by_file_path[str(feedback.file_path)].append(feedback) + return feedbacks_by_file_path + + + +def create_comparisons_with_suggestions( + submissions: List[Submission], + feedbacks: List[Feedback], + programming_language: str, +) -> Iterable[CodeComparisonWithCorrespondingSuggestions]: + """Creates code comparisons and corresponding feedback suggestions as a generator.""" + if len(feedbacks) == 0: + return + # group feedbacks by file path for faster access + logger.debug("Grouping %d feedbacks by file path", len(feedbacks)) + feedbacks_by_file_path = group_feedbacks_by_file_path(feedbacks) + for submission in submissions: + for file_path, file_feedbacks in feedbacks_by_file_path.items(): + # read file from submission + try: + code = submission.get_code(file_path) + except KeyError: # KeyError is for when the file is not in the zip + logger.debug("File %s not found in submission %d.", file_path, submission.id) + continue + except UnicodeDecodeError: + logger.warning("File %s in submission %d is not UTF-8 encoded.", file_path, submission.id) + continue + # get all methods in the file of the submission + submission_methods = parse(code, programming_language) + # get all feedbacks that match methods in the submission + for s_method in submission_methods: + for feedback in file_feedbacks: + if feedback.submission_id == submission.id: + # don't compare feedback with itself + continue + if feedback.meta["method_name"] == s_method.name: + # compare code (later) and add feedback as a possible suggestion (also later) + suggestion = make_feedback_suggestion_from(feedback, submission, s_method) + yield CodeComparisonWithCorrespondingSuggestions(s_method.source_code, + feedback.meta["method_code"], s_method.ast, + feedback.meta["method_ast"], suggestion) + + +def create_feedback_suggestions( + submissions: List[Submission], + feedbacks: List[Feedback], + programming_language: str, +) -> List[Feedback]: + """ + Get a list of all submissions that the given feedback could also apply to (similar code in same method). + Then generate feedback suggestions for those submissions. + """ + if len(feedbacks) == 0: + return [] # nothing to do + + suggestions: List[Feedback] = [] + + # create code comparisons and corresponding feedback suggestions in batches for less memory usage + for idx, comparisons_with_suggestions in enumerate( + batched(create_comparisons_with_suggestions(submissions, feedbacks, programming_language), 128)): + # compute similarity scores for all comparisons at once + sim_computer = CodeSimilarityComputer() + for s_comp in comparisons_with_suggestions: + sim_computer.add_comparison(s_comp.code1, s_comp.code2, s_comp.tree1, s_comp.tree2) + logger.debug("Computing similarity scores for %d code comparisons (batch #%d)", + len(comparisons_with_suggestions), idx) + sim_computer.compute_similarity_scores() # compute all at once, enables vectorization + + # create suggestions + for s_comp in comparisons_with_suggestions: + similarity = sim_computer.get_similarity_score(s_comp.code1, s_comp.code2) + if similarity.distance <= APTED_THRESHOLD: + # found similar code -> create feedback suggestion + logger.info("Found similar code with AP-TE distance of %d", similarity.distance) + # add meta information for debugging + s_comp.suggestion.meta["distance"] = similarity.distance + # add to suggestions + suggestions.append(s_comp.suggestion) + # clear memory to prevent being killed by OOM killer + del sim_computer + del comparisons_with_suggestions + gc.collect() + + return suggestions diff --git a/module_programming_ast/module_programming_ast/test_files/output_ast.txt b/module_programming_ast/module_programming_ast/test_files/output_ast.txt new file mode 100644 index 000000000..4faee634a --- /dev/null +++ b/module_programming_ast/module_programming_ast/test_files/output_ast.txt @@ -0,0 +1,203 @@ +{ + "node_type": "CompilationUnit", + "children": [ + { + "node_type": "CompilationUnit", + "role": null, + "value": null, + "children": [ + { + "node_type": "ClassDeclaration", + "role": null, + "value": null, + "children": [ + { + "node_type": "MethodDeclaration", + "role": null, + "value": null, + "children": [ + { + "node_type": "FormalParameter", + "role": null, + "value": null, + "children": [ + { + "node_type": "ReferenceType", + "role": null, + "value": null, + "children": [] + } + ] + }, + { + "node_type": "StatementExpression", + "role": null, + "value": null, + "children": [ + { + "node_type": "MethodInvocation", + "role": null, + "value": null, + "children": [ + { + "node_type": "Literal", + "role": null, + "value": "\"Hello, world!\"", + "children": [] + } + ] + } + ] + }, + { + "node_type": "LocalVariableDeclaration", + "role": null, + "value": null, + "children": [ + { + "node_type": "BasicType", + "role": null, + "value": null, + "children": [] + }, + { + "node_type": "VariableDeclarator", + "role": null, + "value": null, + "children": [ + { + "node_type": "Literal", + "role": null, + "value": "5", + "children": [] + } + ] + } + ] + }, + { + "node_type": "ForStatement", + "role": null, + "value": null, + "children": [ + { + "node_type": "ForControl", + "role": null, + "value": null, + "children": [ + { + "node_type": "VariableDeclaration", + "role": null, + "value": null, + "children": [ + { + "node_type": "BasicType", + "role": null, + "value": null, + "children": [] + }, + { + "node_type": "VariableDeclarator", + "role": null, + "value": null, + "children": [ + { + "node_type": "Literal", + "role": null, + "value": "0", + "children": [] + } + ] + } + ] + }, + { + "node_type": "BinaryOperation", + "role": null, + "value": null, + "children": [ + { + "node_type": "MemberReference", + "role": null, + "value": null, + "children": [] + }, + { + "node_type": "Literal", + "role": null, + "value": "10", + "children": [] + } + ] + }, + { + "node_type": "MemberReference", + "role": null, + "value": null, + "children": [] + } + ] + }, + { + "node_type": "BlockStatement", + "role": null, + "value": null, + "children": [ + { + "node_type": "LocalVariableDeclaration", + "role": null, + "value": null, + "children": [ + { + "node_type": "ReferenceType", + "role": null, + "value": null, + "children": [] + }, + { + "node_type": "VariableDeclarator", + "role": null, + "value": null, + "children": [ + { + "node_type": "Literal", + "role": null, + "value": "\"Test\"", + "children": [] + } + ] + } + ] + }, + { + "node_type": "StatementExpression", + "role": null, + "value": null, + "children": [ + { + "node_type": "MethodInvocation", + "role": null, + "value": null, + "children": [ + { + "node_type": "MemberReference", + "role": null, + "value": null, + "children": [] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/module_programming_ast/module_programming_ast/test_files/test.java b/module_programming_ast/module_programming_ast/test_files/test.java new file mode 100644 index 000000000..b86f9cc1f --- /dev/null +++ b/module_programming_ast/module_programming_ast/test_files/test.java @@ -0,0 +1,56 @@ +package de.tum.in.ase.pse; + +import de.tum.in.ase.pse.buildables.Builder; +import de.tum.in.ase.pse.buildables.burgeringredients.*; + +public class BurgerRestaurant { + + public void buildStandardBeefBurger(Builder builder) { + // the standard beef burger should have only one beef patty and only ketchup as a sauce, as well as American cheese as cheese, iceberg lettuce, a cornichon pickle, and a brioche bun + builder + .reset() + .addPatty(Patty.BEEF_PATTY) + .addSauce(Sauce.KETCHUP) + .addCheese(Cheese.AMERICAN_CHEESE) + .addLettuce(Lettuce.ICEBERG_LETTUCE) + .addPickle(Pickle.CORNICHON) + .addBun(Bun.BRIOCHE_BUN) + .addOnion(Onion.CARAMELIZED_ONION) + .addTomato(Tomato.BEEFSTEAK_TOMATO); + } + + public void buildSpecialBeefBurger(Builder builder) { + // special beef burger requires an additional beef patty, ketchup, mayo and bbq sauce. It also comes with two slices of cheese: Brie and Cheddar cheese. The special beef burger should have a sesame bun, a spicy sour pickle, and romaine lettuce. Both beef burgers should have caramelized onions and beefsteak tomatoes + builder + .reset() + .addPatty(Patty.BEEF_PATTY) + .addPatty(Patty.BEEF_PATTY) + .addSauce(Sauce.MAYO) + .addSauce(Sauce.KETCHUP) + .addSauce(Sauce.BBQ_SAUCE) + .addCheese(Cheese.BRIE_CHEESE) + .addCheese(Cheese.CHEDDAR_CHEESE) + .addBun(Bun.SESAME_BUN) + .addPickle(Pickle.SPICY_SOUR_PICKLE) + .addLettuce(Lettuce.ROMAINE_LETTUCE) + .addOnion(Onion.CARAMELIZED_ONION) + .addTomato(Tomato.BEEFSTEAK_TOMATO); + } + + public void buildStandardChickenBurger(Builder builder) { + // standard chicken burger is different to the beef burgers, however.It has a chicken patty, a deep fried onion, a cherry tomato, a ciabatta bun, green leaf lettuce, a full sour pickle, gouda cheese, and yellow mustard as a sauce as well as chimichurri sauce + builder + .reset() + .addPatty(Patty.CHICKEN_PATTY) + .addOnion(Onion.DEEP_FRIED_ONION) + .addTomato(Tomato.CHERRY_TOMATO) + .addBun(Bun.CIABATTA_BUN) + .addLettuce(Lettuce.GREEN_LEAF_LETTUCE) + .addPickle(Pickle.FULL_SOUR_PICKLE) + .addCheese(Cheese.GOUDA_CHEESE) + .addSauce(Sauce.YELLOW_MUSTARD) + .addSauce(Sauce.CHIMICHURRI_SAUCE); + } + +} + diff --git a/module_programming_ast/module_programming_ast/test_files/test2.java b/module_programming_ast/module_programming_ast/test_files/test2.java new file mode 100644 index 000000000..2b6873bc4 --- /dev/null +++ b/module_programming_ast/module_programming_ast/test_files/test2.java @@ -0,0 +1,11 @@ + public class HelloWorld { + public static void main(String[] args) { + System.out.println("Hello, world!"); + int test = 5; + for(int i = 0; i < 10; i++) { + //Das ist ein Kommentar + String foooler = "Test"; + System.out.println(i); + } + } + } \ No newline at end of file diff --git a/module_programming_ast/module_programming_ast/test_files/test3.java b/module_programming_ast/module_programming_ast/test_files/test3.java new file mode 100644 index 000000000..75d4a35b1 --- /dev/null +++ b/module_programming_ast/module_programming_ast/test_files/test3.java @@ -0,0 +1,11 @@ + public class HelloWorld { + public static void main(String[] args) { + System.out.println("Hello, world Marlon!"); + int test = 9; + for(int i = 0; i < 10; i++) { + String foo = "Testeeeeeeed"; + int marlon = 7; + System.out.println(i); + } + } + } \ No newline at end of file diff --git a/module_programming_ast/module_programming_ast/test_files/test_java_1.java b/module_programming_ast/module_programming_ast/test_files/test_java_1.java new file mode 100644 index 000000000..b0c49abda --- /dev/null +++ b/module_programming_ast/module_programming_ast/test_files/test_java_1.java @@ -0,0 +1,10 @@ + public class HelloWorld { + public static void main(String[] args) { + System.out.println("Hello, world!"); + int test = 5; + for(int i = 0; i < 10; i++) { + String foo = "Test"; + System.out.println(i); + } + } + } \ No newline at end of file diff --git a/module_programming_ast/module_programming_ast/test_files/test_java_2.java b/module_programming_ast/module_programming_ast/test_files/test_java_2.java new file mode 100644 index 000000000..63ba6c701 --- /dev/null +++ b/module_programming_ast/module_programming_ast/test_files/test_java_2.java @@ -0,0 +1,10 @@ + public class HelloWorld { + public static void main(String[] args) { + System.out.println("Hello, world!"); + int test = 7; + for(int i = 0; i < 10; i++) { + String foo = "Test"; + System.out.println(i); + } + } + } \ No newline at end of file diff --git a/module_programming_ast/module_programming_ast/test_files/test_python_1.py b/module_programming_ast/module_programming_ast/test_files/test_python_1.py new file mode 100644 index 000000000..d9076843a --- /dev/null +++ b/module_programming_ast/module_programming_ast/test_files/test_python_1.py @@ -0,0 +1,11 @@ +def process_numbers(numbers): + total = 0 + for number in numbers: + if number % 2 == 1: + total += number + else: + total -= number + if total > 0: + print("Positive total:", total) + else: + print("Non-positive total:", total) diff --git a/module_programming_ast/module_programming_ast/test_files/test_python_2.py b/module_programming_ast/module_programming_ast/test_files/test_python_2.py new file mode 100644 index 000000000..a8e351bad --- /dev/null +++ b/module_programming_ast/module_programming_ast/test_files/test_python_2.py @@ -0,0 +1,11 @@ +def process_numbers(numbers): + total = 1 + for number in numbers: + if number % 2 == 0: + total += number + else: + total -= number + if total > 0: + print("Positive total:", total) + else: + print("Non-positive total:", total) diff --git a/module_programming_ast/module_programming_ast/test_files/test_swift_1.swift b/module_programming_ast/module_programming_ast/test_files/test_swift_1.swift new file mode 100644 index 000000000..3eff326c0 --- /dev/null +++ b/module_programming_ast/module_programming_ast/test_files/test_swift_1.swift @@ -0,0 +1,6 @@ +func square(of number: Int) -> Int { + return number * number +} + +let result = square(of: 5) +print("Das Quadrat von 5 ist \(result).") \ No newline at end of file diff --git a/module_programming_ast/module_programming_ast/test_files/test_swift_2.swift b/module_programming_ast/module_programming_ast/test_files/test_swift_2.swift new file mode 100644 index 000000000..a165b3fd5 --- /dev/null +++ b/module_programming_ast/module_programming_ast/test_files/test_swift_2.swift @@ -0,0 +1,6 @@ +func square(of number: Int) -> Int { + return number * number +} + +let result = square(of: 3) +print("Das Quadrat von 3 ist \(result).") \ No newline at end of file diff --git a/module_programming_ast/poetry.lock b/module_programming_ast/poetry.lock index 39ef9f6b5..5631b15c1 100644 --- a/module_programming_ast/poetry.lock +++ b/module_programming_ast/poetry.lock @@ -1,5 +1,16 @@ # This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +[[package]] +name = "antlr4-python3-runtime" +version = "4.13.1" +description = "ANTLR 4.13.1 runtime for Python 3" +optional = false +python-versions = "*" +files = [ + {file = "antlr4-python3-runtime-4.13.1.tar.gz", hash = "sha256:3cd282f5ea7cfb841537fe01f143350fdb1c0b1ce7981443a2fa8513fddb6d1a"}, + {file = "antlr4_python3_runtime-4.13.1-py3-none-any.whl", hash = "sha256:78ec57aad12c97ac039ca27403ad61cb98aaec8a3f9bb8144f889aa0fa28b943"}, +] + [[package]] name = "anyio" version = "4.2.0" @@ -20,6 +31,17 @@ doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphin test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] trio = ["trio (>=0.23)"] +[[package]] +name = "apted" +version = "1.0.3" +description = "APTED algorithm for the Tree Edit Distance" +optional = false +python-versions = "*" +files = [ + {file = "apted-1.0.3-py3-none-any.whl", hash = "sha256:74193369d023649d335269e67c4df07f922959e5ac2597de1b79af4e694150e8"}, + {file = "apted-1.0.3.tar.gz", hash = "sha256:befa5181e2d4457fa88e54995a82604ee048bb2fbc781ea97d8e1856b4715ce9"}, +] + [[package]] name = "athena" version = "1.0.0" @@ -264,6 +286,24 @@ files = [ {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, ] +[[package]] +name = "javalang" +version = "0.13.0" +description = "Pure Python Java parser and tools" +optional = false +python-versions = "*" +files = [] +develop = false + +[package.dependencies] +six = "*" + +[package.source] +type = "git" +url = "https://github.com/c2nes/javalang" +reference = "HEAD" +resolved_reference = "566963547575e93d305871d9cb26ce47ff1a036e" + [[package]] name = "mypy" version = "1.8.0" @@ -395,6 +435,17 @@ typing-extensions = ">=4.2.0" dotenv = ["python-dotenv (>=0.10.4)"] email = ["email-validator (>=1.0.3)"] +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] + [[package]] name = "smmap" version = "5.0.1" @@ -554,4 +605,4 @@ standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", [metadata] lock-version = "2.0" python-versions = "3.11.*" -content-hash = "f024e7d202dff0e82c241659ea183b74cab1a472b72b64e1b24f948246b7f457" +content-hash = "f4f78378483224fc06593d2ac4140e7df3895fe990d3309ced6cba3af3eb9e43" diff --git a/module_programming_ast/pyproject.toml b/module_programming_ast/pyproject.toml index 4abe20c37..53254496e 100644 --- a/module_programming_ast/pyproject.toml +++ b/module_programming_ast/pyproject.toml @@ -8,6 +8,9 @@ license = "MIT" [tool.poetry.dependencies] python = "3.11.*" athena = {path = "../athena", develop = true} +apted = "^1.0.3" +antlr4-python3-runtime = "^4.13.1" +javalang = {git = "https://github.com/c2nes/javalang"} [tool.poetry.scripts] module = "athena:run_module"