diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5421f58b..f95051a4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,9 @@ jobs: java-version: '11' distribution: 'temurin' + - name: Generate Grammar Source + run: ./gradlew generateGrammarSource + - name: Run Tests run: ./gradlew check @@ -31,5 +34,32 @@ jobs: name: tests-result path: ${{ github.workspace }}/build/reports/tests + verify: + name: Verify Plugin + needs: [ build ] + runs-on: ubuntu-latest + steps: + - name: Maximize Build Space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + large-packages: false + + - name: Fetch Sources + uses: actions/checkout@v3 + + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + - name: Run Plugin Verification tasks - run: ./gradlew runPluginVerifier \ No newline at end of file + run: ./gradlew runPluginVerifier + + - name: Collect Plugin Verifier Result + if: ${{ always() }} + uses: actions/upload-artifact@v3 + with: + name: pluginVerifier-result + path: ${{ github.workspace }}/build/reports/pluginVerifier diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..fc3a5ecc --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,91 @@ +# Changelog +All notable changes to this project will be documented in this file. +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [2.0.5] - 2023-06-12 + +### Fixed +- Tool window not opening on editor actions (#157) + +### Added +- Support for changing the editor action behaviour (#157) +- Support for overriding completions request parameters (#152) +- User text area autofocus on creating a new chat (#155) +- Keymap tool window actions (#148) + +## [2.0.4] - 2023-05-27 + +### Fixed +- TypeScript and C# code highlighting +- ToolWindow usability when virtual space option turned ON (#125) + +### Added +- ToolWindow code editor copy/replace header actions +- Custom prompt main editor action (#144) +- Support for 2023.2 EAP builds (#149) + +## [2.0.3] - 2023-05-18 + +### Fixed +- Empty editor context menu item text (#137) +- Temp file path resolving (#130) + +### Improved +- Response streaming + +### Added +- Reset chat window toolbar action (#138) + +## [2.0.2] - 2023-05-16 + +### Fixed +- Settings deserialization error + +### Improved +- Memory consumption by disposing unused editors which are no longer needed + +### Removed +- Main editor focus stealing on response streaming + +## [2.0.1] - 2023-05-14 + +### Added +- New GPT-3.5-16k model + +### Fixed +- NPE when `displayName` couldn't be fetched + +### Improved +- Proxy support by disabling the default trustmanager + +### Removed +- Off-screen rendering setting option +- Automatic textarea focus on stream completion (#126) + +## [2.0.0] - 2023-05-03 + +### Added +- Automatic retry logic on stream timeouts + +### Improved +- Input prompt text field UI/UX (height grows with the content) + +### Removed +- Custom prompt editor action (users can now provide custom actions within the chat window itself) + +### Replaced +- ToolWindow HTML content with native Swing components + +### Secured +- `OPENAI_API_KEY` persistence, key is saved in the OS password safe from now on + +[Unreleased]: https://github.com/carlrobertoh/CodeGPT/compare/v2.0.5...HEAD +[2.0.5]: https://github.com/carlrobertoh/CodeGPT/compare/v2.0.4...v2.0.5 +[2.0.4]: https://github.com/carlrobertoh/CodeGPT/compare/v2.0.3...v2.0.4 +[2.0.3]: https://github.com/carlrobertoh/CodeGPT/compare/v2.0.2...v2.0.3 +[2.0.2]: https://github.com/carlrobertoh/CodeGPT/compare/v2.0.1...v2.0.2 +[2.0.1]: https://github.com/carlrobertoh/CodeGPT/commits/v2.0.1 +[2.0.0]: https://github.com/carlrobertoh/CodeGPT/commits/v2.0.0 diff --git a/DESCRIPTION.md b/DESCRIPTION.md new file mode 100644 index 00000000..f45c5293 --- /dev/null +++ b/DESCRIPTION.md @@ -0,0 +1,58 @@ + + +**ChatGPT as your copilot to level up your developer experience.** + +This is the perfect assistant for any programmer who wants to improve their coding skills +and make more efficient use of the time. + +## Getting Started + +### Prerequisites + +In order to use the extension, you need to have the API key configured. You can find the API key in +your [User settings](https://platform.openai.com/account/api-keys). + +### API Key Configuration + +After the plugin has been successfully installed, the API key needs to be configured. + +You can configure the key by going to the plugin's settings via the **File | Settings/Preferences | Tools | CodeGPT**. On the settings panel simply +click +on the API key field, paste the key obtained from the OpenAI website and click **Apply/OK**. + +## Features + +The plugin provides several key features, such as: + +### Ask Anything + +Ask anything you'd like. + +animated + +### Select and Ask + +Ask anything related to your selected code. + +animated + +### Replace Generated Code + +Instantly replace a selected code block in the editor with suggested code generated by AI. + +animated + +### Regenerate Response + +Expected a different answer? Re-generate any response of your choosing. + +animated + +## Other features + +- **Conversation History** - View recent conversation history and restore previous sessions, making it easy to pick up where you left off +- **Concurrent conversations** - Chat with the AI in multiple tabs simultaneously +- **Seamless conversations** - Chat with the AI regardless of the maximum token limitations +- **Predefined Actions** - Create your own editor actions or override the existing ones, saving time rewriting the same prompt repeatedly + + diff --git a/README.md b/README.md index 880378a0..8cae89eb 100644 --- a/README.md +++ b/README.md @@ -116,21 +116,20 @@ Expected a different answer? Re-generate any response of your choosing. - **Seamless conversations** - Chat with the AI regardless of the maximum token limitations - **Predefined Actions** - Create your own editor actions or override the existing ones, saving time rewriting the same prompt repeatedly -## Roadmap +## Running locally -- [x] Add proxy support -- [ ] Add conversation history - - [x] Ability to start/restore sessions - - [ ] Ability to export conversations in Markdown/JSON format -- [ ] Add codex and user's fine-tuned models -- [x] Ability to have a seamless conversation despite to token limitation -- [x] Add support for copying and replacing generated code snippets -- [x] Add support for deleting previous conversations -- [x] Add support for overriding prompts and request params -- [x] Add Azure OpenAI service support -- [x] Add action key mappings -- [ ] Add support for code search using embeddings -- [ ] Add support for model fine-tuning +Build the plugin +```shell +./gradlew generateGrammarSource +./gradlew buildPlugin +``` + +Run the plugin +```shell +./gradlew runIde +``` + +## Issues See the [open issues][open-issues] for a full list of proposed features (and known issues). diff --git a/build.gradle.kts b/build.gradle.kts index 4ac0f4cd..8d225e9d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,68 +1,136 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat +import org.jetbrains.changelog.Changelog +import org.jetbrains.changelog.markdownToHTML + +fun properties(key: String) = providers.gradleProperty(key) +fun environment(key: String) = providers.environmentVariable(key) plugins { - id("java") - id("org.jetbrains.intellij") version "1.13.3" + id("java") + id("antlr") + id("org.jetbrains.intellij") version "1.15.0" + id("org.jetbrains.kotlin.jvm") version "1.8.21" + id("org.jetbrains.changelog") version "2.1.0" } -group = "ee.carlrobert" -version = "1.10.8" +group = properties("pluginGroup").get() +version = properties("pluginVersion").get() repositories { - mavenCentral() + mavenCentral() + gradlePluginPortal() } intellij { - version.set("2022.2") - type.set("IC") - plugins.set(listOf()) + pluginName.set(properties("pluginName")) + version.set(properties("platformVersion")) + type.set(properties("platformType")) + plugins.set(listOf()) +} + +changelog { + groups.empty() + repositoryUrl.set(properties("pluginRepositoryUrl")) } dependencies { - implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.14.2") - implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.2") - implementation("com.fifesoft:rsyntaxtextarea:3.3.2") - implementation("com.vladsch.flexmark:flexmark-all:0.64.0") - implementation("org.apache.commons:commons-text:1.10.0") - implementation("ee.carlrobert:openai-client:1.1.2") - implementation("com.knuddels:jtokkit:0.2.0") + antlr("org.antlr:antlr4:4.5") + implementation("org.antlr:antlr4-runtime:4.7.1") - testImplementation("org.assertj:assertj-core:3.24.2") - testImplementation("org.awaitility:awaitility:4.2.0") - testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.6.1") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.6.1") - testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.6.1") + implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.14.2") + implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.2") + implementation("com.vladsch.flexmark:flexmark-all:0.64.0") { + // vulnerable transitive dependency + exclude(group = "org.jsoup", module = "jsoup") + } + implementation("org.jsoup:jsoup:1.16.1") + implementation("org.apache.commons:commons-text:1.10.0") + implementation("ee.carlrobert:openai-client:1.2.0") + implementation("com.knuddels:jtokkit:0.2.0") + implementation("io.socket:socket.io-client:2.1.0") { + // vulnerable transitive dependency + exclude(group = "org.json", module = "json") + } + implementation("org.json:json:20230618") + implementation("org.quartz-scheduler:quartz:2.3.2") + implementation("com.github.jelmerk:hnswlib-core:1.1.0") + implementation("com.github.jelmerk:hnswlib-utils:1.1.0") + + testImplementation("org.assertj:assertj-core:3.24.2") + testImplementation("org.awaitility:awaitility:4.2.0") + testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.6.1") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.6.1") + testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.6.1") } java { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } tasks { - patchPluginXml { - sinceBuild.set("213") - untilBuild.set("231.*") - } + wrapper { + gradleVersion = properties("gradleVersion").get() + } - signPlugin { - certificateChain.set(System.getenv("CERTIFICATE_CHAIN")) - privateKey.set(System.getenv("PRIVATE_KEY")) - password.set(System.getenv("PRIVATE_KEY_PASSWORD")) - } + generateGrammarSource { + outputDirectory = file("src/main/java/grammar") + arguments = arguments + listOf("-package", "grammar") + } - publishPlugin { - token.set(System.getenv("PUBLISH_TOKEN")) - } -} + patchPluginXml { + version.set(properties("pluginVersion")) + sinceBuild.set(properties("pluginSinceBuild")) + untilBuild.set(properties("pluginUntilBuild")) -tasks { - test { - useJUnitPlatform() - testLogging { - events("passed", "skipped", "failed") - exceptionFormat = TestExceptionFormat.FULL - showStandardStreams = true + pluginDescription.set(providers.fileContents(layout.projectDirectory.file("DESCRIPTION.md")).asText.map { + val start = "" + val end = "" + + with(it.lines()) { + if (!containsAll(listOf(start, end))) { + throw GradleException("Plugin description section not found in DESCRIPTION.md:\n$start ... $end") } + subList(indexOf(start) + 1, indexOf(end)).joinToString("\n").let(::markdownToHTML) + } + }) + + val changelog = project.changelog // local variable for configuration cache compatibility + // Get the latest available change notes from the changelog file + changeNotes.set(properties("pluginVersion").map { pluginVersion -> + with(changelog) { + renderItem( + (getOrNull(pluginVersion) ?: getUnreleased()) + .withHeader(false) + .withEmptySections(false), + Changelog.OutputType.HTML, + ) + } + }) + } + + signPlugin { + certificateChain.set(System.getenv("CERTIFICATE_CHAIN")) + privateKey.set(System.getenv("PRIVATE_KEY")) + password.set(System.getenv("PRIVATE_KEY_PASSWORD")) + } + + publishPlugin { + dependsOn("patchChangelog") + token.set(System.getenv("PUBLISH_TOKEN")) + channels.set(listOf("stable")) + } + + runIde { + environment("ENVIRONMENT", "LOCAL") + } + + test { + useJUnitPlatform() + testLogging { + events("passed", "skipped", "failed") + exceptionFormat = TestExceptionFormat.FULL + showStandardStreams = true } -} + } +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000..8c14a57c --- /dev/null +++ b/gradle.properties @@ -0,0 +1,37 @@ +# IntelliJ Platform Artifacts Repositories -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html + +pluginGroup = ee.carlrobert +pluginName = CodeGPT +pluginRepositoryUrl = https://github.com/carlrobertoh/CodeGPT +# SemVer format -> https://semver.org +pluginVersion = 2.0.5 + +# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html +pluginSinceBuild = 213 +pluginUntilBuild = 232.* + +# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension +platformType = IC +platformVersion = 2022.2 + +# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html +# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22 +platformPlugins = + +# Gradle Releases -> https://github.com/gradle/gradle/releases +gradleVersion = 7.6 + +# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib +kotlin.stdlib.default.dependency = false + +# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html +org.gradle.configuration-cache = true + +# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html +org.gradle.caching = true + +# Enable Gradle Kotlin DSL Lazy Property Assignment -> https://docs.gradle.org/current/userguide/kotlin_dsl.html#kotdsl:assignment +systemProp.org.gradle.unsafe.kotlin.assignment = true + +# Temporary workaround for Kotlin Compiler OutOfMemoryError -> https://jb.gg/intellij-platform-kotlin-oom +kotlin.incremental.useClasspathSnapshot = false \ No newline at end of file diff --git a/gradlew.bat b/gradlew.bat index ac1b06f9..a6ff45ac 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -9,7 +9,7 @@ @rem @rem Unless required by applicable law or agreed to in writing, software @rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either index or implied. @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem diff --git a/src/main/antlr/JSON.g4 b/src/main/antlr/JSON.g4 new file mode 100644 index 00000000..3a67ccbc --- /dev/null +++ b/src/main/antlr/JSON.g4 @@ -0,0 +1,82 @@ + +/** Taken from "The Definitive ANTLR 4 Reference" by Terence Parr */ + +// Derived from https://json.org +grammar JSON; + +json + : value EOF + ; + +obj + : '{' pair (',' pair)* '}' + | '{' '}' + ; + +pair + : STRING ':' value + ; + +arr + : '[' value (',' value)* ']' + | '[' ']' + ; + +value + : STRING + | NUMBER + | obj + | arr + | 'true' + | 'false' + | 'null' + ; + + +STRING + : '"' (ESC | SAFECODEPOINT)* '"' + ; + + +fragment ESC + : '\\' (["\\/bfnrt] | UNICODE) + ; + + +fragment UNICODE + : 'u' HEX HEX HEX HEX + ; + + +fragment HEX + : [0-9a-fA-F] + ; + + +fragment SAFECODEPOINT + : ~ ["\\\u0000-\u001F] + ; + + +NUMBER + : '-'? INT ('.' [0-9] +)? EXP? + ; + + +fragment INT + // integer part forbis leading 0s (e.g. `01`) + : '0' | [1-9] [0-9]* + ; + +// no leading zeros + +fragment EXP + // exponent number permits leading 0s (e.g. `1e01`) + : [Ee] [+\-]? [0-9]+ + ; + +// \- since - means "range" inside [...] + +WS + : [ \t\n\r] + -> skip + ; diff --git a/src/main/antlr/JavaLexer.g4 b/src/main/antlr/JavaLexer.g4 new file mode 100644 index 00000000..a340c6ab --- /dev/null +++ b/src/main/antlr/JavaLexer.g4 @@ -0,0 +1,241 @@ +/* + [The "BSD licence"] + Copyright (c) 2013 Terence Parr, Sam Harwell + Copyright (c) 2017 Ivan Kochurkin (upgrade to Java 8) + Copyright (c) 2021 Michał Lorek (upgrade to Java 11) + Copyright (c) 2022 Michał Lorek (upgrade to Java 17) + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +lexer grammar JavaLexer; + +// Keywords + +ABSTRACT: 'abstract'; +ASSERT: 'assert'; +BOOLEAN: 'boolean'; +BREAK: 'break'; +BYTE: 'byte'; +CASE: 'case'; +CATCH: 'catch'; +CHAR: 'char'; +CLASS: 'class'; +CONST: 'const'; +CONTINUE: 'continue'; +DEFAULT: 'default'; +DO: 'do'; +DOUBLE: 'double'; +ELSE: 'else'; +ENUM: 'enum'; +EXTENDS: 'extends'; +FINAL: 'final'; +FINALLY: 'finally'; +FLOAT: 'float'; +FOR: 'for'; +IF: 'if'; +GOTO: 'goto'; +IMPLEMENTS: 'implements'; +IMPORT: 'import'; +INSTANCEOF: 'instanceof'; +INT: 'int'; +INTERFACE: 'interface'; +LONG: 'long'; +NATIVE: 'native'; +NEW: 'new'; +PACKAGE: 'package'; +PRIVATE: 'private'; +PROTECTED: 'protected'; +PUBLIC: 'public'; +RETURN: 'return'; +SHORT: 'short'; +STATIC: 'static'; +STRICTFP: 'strictfp'; +SUPER: 'super'; +SWITCH: 'switch'; +SYNCHRONIZED: 'synchronized'; +THIS: 'this'; +THROW: 'throw'; +THROWS: 'throws'; +TRANSIENT: 'transient'; +TRY: 'try'; +VOID: 'void'; +VOLATILE: 'volatile'; +WHILE: 'while'; + +// Module related keywords +MODULE: 'module'; +OPEN: 'open'; +REQUIRES: 'requires'; +EXPORTS: 'exports'; +OPENS: 'opens'; +TO: 'to'; +USES: 'uses'; +PROVIDES: 'provides'; +WITH: 'with'; +TRANSITIVE: 'transitive'; + +// Local Variable Type Inference +VAR: 'var'; // reserved type name + +// Switch Expressions +YIELD: 'yield'; // reserved type name from Java 14 + +// Records +RECORD: 'record'; + +// Sealed Classes +SEALED: 'sealed'; +PERMITS: 'permits'; +NON_SEALED: 'non-sealed'; + +// Literals + +DECIMAL_LITERAL: ('0' | [1-9] (Digits? | '_'+ Digits)) [lL]?; +HEX_LITERAL: '0' [xX] [0-9a-fA-F] ([0-9a-fA-F_]* [0-9a-fA-F])? [lL]?; +OCT_LITERAL: '0' '_'* [0-7] ([0-7_]* [0-7])? [lL]?; +BINARY_LITERAL: '0' [bB] [01] ([01_]* [01])? [lL]?; + +FLOAT_LITERAL: (Digits '.' Digits? | '.' Digits) ExponentPart? [fFdD]? + | Digits (ExponentPart [fFdD]? | [fFdD]) + ; + +HEX_FLOAT_LITERAL: '0' [xX] (HexDigits '.'? | HexDigits? '.' HexDigits) [pP] [+-]? Digits [fFdD]?; + +BOOL_LITERAL: 'true' + | 'false' + ; + +CHAR_LITERAL: '\'' (~['\\\r\n] | EscapeSequence) '\''; + +STRING_LITERAL: '"' (~["\\\r\n] | EscapeSequence)* '"'; + +TEXT_BLOCK: '"""' [ \t]* [\r\n] (. | EscapeSequence)*? '"""'; + +NULL_LITERAL: 'null'; + +// Separators + +LPAREN: '('; +RPAREN: ')'; +LBRACE: '{'; +RBRACE: '}'; +LBRACK: '['; +RBRACK: ']'; +SEMI: ';'; +COMMA: ','; +DOT: '.'; + +// Operators + +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: '>>>='; + +// Java 8 tokens + +ARROW: '->'; +COLONCOLON: '::'; + +// Additional symbols not defined in the lexical specification + +AT: '@'; +ELLIPSIS: '...'; + +// Whitespace and comments + +WS: [ \t\r\n\u000C]+ -> channel(HIDDEN); +COMMENT: '/*' .*? '*/' -> channel(HIDDEN); +LINE_COMMENT: '//' ~[\r\n]* -> channel(HIDDEN); + +// Identifiers + +IDENTIFIER: Letter LetterOrDigit*; + +// Fragment rules + +fragment ExponentPart + : [eE] [+-]? Digits + ; + +fragment EscapeSequence + : '\\' 'u005c'? [btnfr"'\\] + | '\\' 'u005c'? ([0-3]? [0-7])? [0-7] + | '\\' 'u'+ HexDigit HexDigit HexDigit HexDigit + ; + +fragment HexDigits + : HexDigit ((HexDigit | '_')* HexDigit)? + ; + +fragment HexDigit + : [0-9a-fA-F] + ; + +fragment Digits + : [0-9] ([0-9_]* [0-9])? + ; + +fragment LetterOrDigit + : Letter + | [0-9] + ; + +fragment Letter + : [a-zA-Z$_] // these are the "java letters" below 0x7F + | ~[\u0000-\u007F\uD800-\uDBFF] // covers all characters above 0x7F which are not a surrogate + | [\uD800-\uDBFF] [\uDC00-\uDFFF] // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF + ; diff --git a/src/main/antlr/JavaParser.g4 b/src/main/antlr/JavaParser.g4 new file mode 100644 index 00000000..bc249c89 --- /dev/null +++ b/src/main/antlr/JavaParser.g4 @@ -0,0 +1,780 @@ +/* + [The "BSD licence"] + Copyright (c) 2013 Terence Parr, Sam Harwell + Copyright (c) 2017 Ivan Kochurkin (upgrade to Java 8) + Copyright (c) 2021 Michał Lorek (upgrade to Java 11) + Copyright (c) 2022 Michał Lorek (upgrade to Java 17) + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +parser grammar JavaParser; + +options { tokenVocab=JavaLexer; } + +compilationUnit + : packageDeclaration? (importDeclaration | ';')* (typeDeclaration | ';')* + | moduleDeclaration EOF + ; + +packageDeclaration + : annotation* PACKAGE qualifiedName ';' + ; + +importDeclaration + : IMPORT STATIC? qualifiedName ('.' '*')? ';' + ; + +typeDeclaration + : classOrInterfaceModifier* + (classDeclaration | enumDeclaration | interfaceDeclaration | annotationTypeDeclaration | recordDeclaration) + ; + +modifier + : classOrInterfaceModifier + | NATIVE + | SYNCHRONIZED + | TRANSIENT + | VOLATILE + ; + +classOrInterfaceModifier + : annotation + | PUBLIC + | PROTECTED + | PRIVATE + | STATIC + | ABSTRACT + | FINAL // FINAL for class only -- does not apply to interfaces + | STRICTFP + | SEALED // Java17 + | NON_SEALED // Java17 + ; + +variableModifier + : FINAL + | annotation + ; + +classDeclaration + : CLASS identifier typeParameters? + (EXTENDS typeType)? + (IMPLEMENTS typeList)? + (PERMITS typeList)? // Java17 + classBody + ; + +typeParameters + : '<' typeParameter (',' typeParameter)* '>' + ; + +typeParameter + : annotation* identifier (EXTENDS annotation* typeBound)? + ; + +typeBound + : typeType ('&' typeType)* + ; + +enumDeclaration + : ENUM identifier (IMPLEMENTS typeList)? '{' enumConstants? ','? enumBodyDeclarations? '}' + ; + +enumConstants + : enumConstant (',' enumConstant)* + ; + +enumConstant + : annotation* identifier arguments? classBody? + ; + +enumBodyDeclarations + : ';' classBodyDeclaration* + ; + +interfaceDeclaration + : INTERFACE identifier typeParameters? (EXTENDS typeList)? (PERMITS typeList)? interfaceBody + ; + +classBody + : '{' classBodyDeclaration* '}' + ; + +interfaceBody + : '{' interfaceBodyDeclaration* '}' + ; + +classBodyDeclaration + : ';' + | STATIC? block + | modifier* memberDeclaration + ; + +memberDeclaration + : recordDeclaration //Java17 + | methodDeclaration + | genericMethodDeclaration + | fieldDeclaration + | constructorDeclaration + | genericConstructorDeclaration + | interfaceDeclaration + | annotationTypeDeclaration + | classDeclaration + | enumDeclaration + ; + +/* We use rule this even for void methods which cannot have [] after parameters. + This simplifies grammar and we can consider void to be a type, which + renders the [] matching as a context-sensitive issue or a semantic check + for invalid return type after parsing. + */ +methodDeclaration + : typeTypeOrVoid identifier formalParameters ('[' ']')* + (THROWS qualifiedNameList)? + methodBody + ; + +methodBody + : block + | ';' + ; + +typeTypeOrVoid + : typeType + | VOID + ; + +genericMethodDeclaration + : typeParameters methodDeclaration + ; + +genericConstructorDeclaration + : typeParameters constructorDeclaration + ; + +constructorDeclaration + : identifier formalParameters (THROWS qualifiedNameList)? constructorBody=block + ; + +compactConstructorDeclaration + : modifier* identifier constructorBody=block + ; + +fieldDeclaration + : typeType variableDeclarators ';' + ; + +interfaceBodyDeclaration + : modifier* interfaceMemberDeclaration + | ';' + ; + +interfaceMemberDeclaration + : recordDeclaration // Java17 + | constDeclaration + | interfaceMethodDeclaration + | genericInterfaceMethodDeclaration + | interfaceDeclaration + | annotationTypeDeclaration + | classDeclaration + | enumDeclaration + ; + +constDeclaration + : typeType constantDeclarator (',' constantDeclarator)* ';' + ; + +constantDeclarator + : identifier ('[' ']')* '=' variableInitializer + ; + +// Early versions of Java allows brackets after the method name, eg. +// public int[] return2DArray() [] { ... } +// is the same as +// public int[][] return2DArray() { ... } +interfaceMethodDeclaration + : interfaceMethodModifier* interfaceCommonBodyDeclaration + ; + +// Java8 +interfaceMethodModifier + : annotation + | PUBLIC + | ABSTRACT + | DEFAULT + | STATIC + | STRICTFP + ; + +genericInterfaceMethodDeclaration + : interfaceMethodModifier* typeParameters interfaceCommonBodyDeclaration + ; + +interfaceCommonBodyDeclaration + : annotation* typeTypeOrVoid identifier formalParameters ('[' ']')* (THROWS qualifiedNameList)? methodBody + ; + +variableDeclarators + : variableDeclarator (',' variableDeclarator)* + ; + +variableDeclarator + : variableDeclaratorId ('=' variableInitializer)? + ; + +variableDeclaratorId + : identifier ('[' ']')* + ; + +variableInitializer + : arrayInitializer + | expression + ; + +arrayInitializer + : '{' (variableInitializer (',' variableInitializer)* ','? )? '}' + ; + +classOrInterfaceType + : (identifier typeArguments? '.')* typeIdentifier typeArguments? + ; + +typeArgument + : typeType + | annotation* '?' ((EXTENDS | SUPER) typeType)? + ; + +qualifiedNameList + : qualifiedName (',' qualifiedName)* + ; + +formalParameters + : '(' ( receiverParameter? + | receiverParameter (',' formalParameterList)? + | formalParameterList? + ) ')' + ; + +receiverParameter + : typeType (identifier '.')* THIS + ; + +formalParameterList + : formalParameter (',' formalParameter)* (',' lastFormalParameter)? + | lastFormalParameter + ; + +formalParameter + : variableModifier* typeType variableDeclaratorId + ; + +lastFormalParameter + : variableModifier* typeType annotation* '...' variableDeclaratorId + ; + +// local variable type inference +lambdaLVTIList + : lambdaLVTIParameter (',' lambdaLVTIParameter)* + ; + +lambdaLVTIParameter + : variableModifier* VAR identifier + ; + +qualifiedName + : identifier ('.' identifier)* + ; + +literal + : integerLiteral + | floatLiteral + | CHAR_LITERAL + | STRING_LITERAL + | BOOL_LITERAL + | NULL_LITERAL + | TEXT_BLOCK // Java17 + ; + +integerLiteral + : DECIMAL_LITERAL + | HEX_LITERAL + | OCT_LITERAL + | BINARY_LITERAL + ; + +floatLiteral + : FLOAT_LITERAL + | HEX_FLOAT_LITERAL + ; + +// ANNOTATIONS +altAnnotationQualifiedName + : (identifier DOT)* '@' identifier + ; + +annotation + : ('@' qualifiedName | altAnnotationQualifiedName) ('(' ( elementValuePairs | elementValue )? ')')? + ; + +elementValuePairs + : elementValuePair (',' elementValuePair)* + ; + +elementValuePair + : identifier '=' elementValue + ; + +elementValue + : expression + | annotation + | elementValueArrayInitializer + ; + +elementValueArrayInitializer + : '{' (elementValue (',' elementValue)*)? ','? '}' + ; + +annotationTypeDeclaration + : '@' INTERFACE identifier annotationTypeBody + ; + +annotationTypeBody + : '{' annotationTypeElementDeclaration* '}' + ; + +annotationTypeElementDeclaration + : modifier* annotationTypeElementRest + | ';' // this is not allowed by the grammar, but apparently allowed by the actual compiler + ; + +annotationTypeElementRest + : typeType annotationMethodOrConstantRest ';' + | classDeclaration ';'? + | interfaceDeclaration ';'? + | enumDeclaration ';'? + | annotationTypeDeclaration ';'? + | recordDeclaration ';'? // Java17 + ; + +annotationMethodOrConstantRest + : annotationMethodRest + | annotationConstantRest + ; + +annotationMethodRest + : identifier '(' ')' defaultValue? + ; + +annotationConstantRest + : variableDeclarators + ; + +defaultValue + : DEFAULT elementValue + ; + +// MODULES - Java9 + +moduleDeclaration + : OPEN? MODULE qualifiedName moduleBody + ; + +moduleBody + : '{' moduleDirective* '}' + ; + +moduleDirective + : REQUIRES requiresModifier* qualifiedName ';' + | EXPORTS qualifiedName (TO qualifiedName)? ';' + | OPENS qualifiedName (TO qualifiedName)? ';' + | USES qualifiedName ';' + | PROVIDES qualifiedName WITH qualifiedName ';' + ; + +requiresModifier + : TRANSITIVE + | STATIC + ; + +// RECORDS - Java 17 + +recordDeclaration + : RECORD identifier typeParameters? recordHeader + (IMPLEMENTS typeList)? + recordBody + ; + +recordHeader + : '(' recordComponentList? ')' + ; + +recordComponentList + : recordComponent (',' recordComponent)* + ; + +recordComponent + : typeType identifier + ; + +recordBody + : '{' (classBodyDeclaration | compactConstructorDeclaration)* '}' + ; + +// STATEMENTS / BLOCKS + +block + : '{' blockStatement* '}' + ; + +blockStatement + : localVariableDeclaration ';' + | localTypeDeclaration + | statement + ; + +localVariableDeclaration + : variableModifier* (VAR identifier '=' expression | typeType variableDeclarators) + ; + +identifier + : IDENTIFIER + | MODULE + | OPEN + | REQUIRES + | EXPORTS + | OPENS + | TO + | USES + | PROVIDES + | WITH + | TRANSITIVE + | YIELD + | SEALED + | PERMITS + | RECORD + | VAR + ; + +typeIdentifier // Identifiers that are not restricted for type declarations + : IDENTIFIER + | MODULE + | OPEN + | REQUIRES + | EXPORTS + | OPENS + | TO + | USES + | PROVIDES + | WITH + | TRANSITIVE + | SEALED + | PERMITS + | RECORD + ; + +localTypeDeclaration + : classOrInterfaceModifier* + (classDeclaration | interfaceDeclaration | recordDeclaration) + ; + +statement + : blockLabel=block + | ASSERT expression (':' expression)? ';' + | IF parExpression statement (ELSE statement)? + | FOR '(' forControl ')' statement + | WHILE parExpression statement + | DO statement WHILE parExpression ';' + | TRY block (catchClause+ finallyBlock? | finallyBlock) + | TRY resourceSpecification block catchClause* finallyBlock? + | SWITCH parExpression '{' switchBlockStatementGroup* switchLabel* '}' + | SYNCHRONIZED parExpression block + | RETURN expression? ';' + | THROW expression ';' + | BREAK identifier? ';' + | CONTINUE identifier? ';' + | YIELD expression ';' // Java17 + | SEMI + | statementExpression=expression ';' + | switchExpression ';'? // Java17 + | identifierLabel=identifier ':' statement + ; + +catchClause + : CATCH '(' variableModifier* catchType identifier ')' block + ; + +catchType + : qualifiedName ('|' qualifiedName)* + ; + +finallyBlock + : FINALLY block + ; + +resourceSpecification + : '(' resources ';'? ')' + ; + +resources + : resource (';' resource)* + ; + +resource + : variableModifier* ( classOrInterfaceType variableDeclaratorId | VAR identifier ) '=' expression + | qualifiedName + ; + +/** Matches cases then statements, both of which are mandatory. + * To handle empty cases at the end, we add switchLabel* to statement. + */ +switchBlockStatementGroup + : switchLabel+ blockStatement+ + ; + +switchLabel + : CASE (constantExpression=expression | enumConstantName=IDENTIFIER | typeType varName=identifier) ':' + | DEFAULT ':' + ; + +forControl + : enhancedForControl + | forInit? ';' expression? ';' forUpdate=expressionList? + ; + +forInit + : localVariableDeclaration + | expressionList + ; + +enhancedForControl + : variableModifier* (typeType | VAR) variableDeclaratorId ':' expression + ; + +// EXPRESSIONS + +parExpression + : '(' expression ')' + ; + +expressionList + : expression (',' expression)* + ; + +methodCall + : (identifier | THIS | SUPER) arguments + ; + +expression + // Expression order in accordance with https://introcs.cs.princeton.edu/java/11precedence/ + // Level 16, Primary, array and member access + : primary + | expression '[' expression ']' + | expression bop='.' + ( + identifier + | methodCall + | THIS + | NEW nonWildcardTypeArguments? innerCreator + | SUPER superSuffix + | explicitGenericInvocation + ) + // Method calls and method references are part of primary, and hence level 16 precedence + | methodCall + | expression '::' typeArguments? identifier + | typeType '::' (typeArguments? identifier | NEW) + | classType '::' typeArguments? NEW + + | switchExpression // Java17 + + // Level 15 Post-increment/decrement operators + | expression postfix=('++' | '--') + + // Level 14, Unary operators + | prefix=('+'|'-'|'++'|'--'|'~'|'!') expression + + // Level 13 Cast and object creation + | '(' annotation* typeType ('&' typeType)* ')' expression + | NEW creator + + // Level 12 to 1, Remaining operators + | expression bop=('*'|'/'|'%') expression // Level 12, Multiplicative operators + | expression bop=('+'|'-') expression // Level 11, Additive operators + | expression ('<' '<' | '>' '>' '>' | '>' '>') expression // Level 10, Shift operators + | expression bop=('<=' | '>=' | '>' | '<') expression // Level 9, Relational operators + | expression bop=INSTANCEOF (typeType | pattern) + | expression bop=('==' | '!=') expression // Level 8, Equality Operators + | expression bop='&' expression // Level 7, Bitwise AND + | expression bop='^' expression // Level 6, Bitwise XOR + | expression bop='|' expression // Level 5, Bitwise OR + | expression bop='&&' expression // Level 4, Logic AND + | expression bop='||' expression // Level 3, Logic OR + | expression bop='?' expression ':' expression // Level 2, Ternary + // Level 1, Assignment + | expression + bop=('=' | '+=' | '-=' | '*=' | '/=' | '&=' | '|=' | '^=' | '>>=' | '>>>=' | '<<=' | '%=') + expression + + // Level 0, Lambda Expression + | lambdaExpression // Java8 + ; + +// Java17 +pattern + : variableModifier* typeType annotation* identifier + ; + +// Java8 +lambdaExpression + : lambdaParameters '->' lambdaBody + ; + +// Java8 +lambdaParameters + : identifier + | '(' formalParameterList? ')' + | '(' identifier (',' identifier)* ')' + | '(' lambdaLVTIList? ')' + ; + +// Java8 +lambdaBody + : expression + | block + ; + +primary + : '(' expression ')' + | THIS + | SUPER + | literal + | identifier + | typeTypeOrVoid '.' CLASS + | nonWildcardTypeArguments (explicitGenericInvocationSuffix | THIS arguments) + ; + +// Java17 +switchExpression + : SWITCH parExpression '{' switchLabeledRule* '}' + ; + +// Java17 +switchLabeledRule + : CASE (expressionList | NULL_LITERAL | guardedPattern) (ARROW | COLON) switchRuleOutcome + | DEFAULT (ARROW | COLON) switchRuleOutcome + ; + +// Java17 +guardedPattern + : '(' guardedPattern ')' + | variableModifier* typeType annotation* identifier ('&&' expression)* + | guardedPattern '&&' expression + ; + +// Java17 +switchRuleOutcome + : block + | blockStatement* + ; + +classType + : (classOrInterfaceType '.')? annotation* identifier typeArguments? + ; + +creator + : nonWildcardTypeArguments? createdName classCreatorRest + | createdName arrayCreatorRest + ; + +createdName + : identifier typeArgumentsOrDiamond? ('.' identifier typeArgumentsOrDiamond?)* + | primitiveType + ; + +innerCreator + : identifier nonWildcardTypeArgumentsOrDiamond? classCreatorRest + ; + +arrayCreatorRest + : ('[' ']')+ arrayInitializer + | ('[' expression ']')+ ('[' ']')* + ; + +classCreatorRest + : arguments classBody? + ; + +explicitGenericInvocation + : nonWildcardTypeArguments explicitGenericInvocationSuffix + ; + +typeArgumentsOrDiamond + : '<' '>' + | typeArguments + ; + +nonWildcardTypeArgumentsOrDiamond + : '<' '>' + | nonWildcardTypeArguments + ; + +nonWildcardTypeArguments + : '<' typeList '>' + ; + +typeList + : typeType (',' typeType)* + ; + +typeType + : annotation* (classOrInterfaceType | primitiveType) (annotation* '[' ']')* + ; + +primitiveType + : BOOLEAN + | CHAR + | BYTE + | SHORT + | INT + | LONG + | FLOAT + | DOUBLE + ; + +typeArguments + : '<' typeArgument (',' typeArgument)* '>' + ; + +superSuffix + : arguments + | '.' typeArguments? identifier arguments? + ; + +explicitGenericInvocationSuffix + : SUPER superSuffix + | identifier arguments + ; + +arguments + : '(' expressionList? ')' + ; diff --git a/src/main/antlr/KotlinLexer.g4 b/src/main/antlr/KotlinLexer.g4 new file mode 100644 index 00000000..98663a79 --- /dev/null +++ b/src/main/antlr/KotlinLexer.g4 @@ -0,0 +1,587 @@ +/** + * Kotlin Grammar for ANTLR v4 + * + * Based on: + * http://jetbrains.github.io/kotlin-spec/#_grammars_and_parsing + * and + * http://kotlinlang.org/docs/reference/grammar.html + * + * Tested on + * https://github.com/JetBrains/kotlin/tree/master/compiler/testData/psi + */ + +lexer grammar KotlinLexer; + +import UnicodeClasses; + +ShebangLine + : '#!' ~[\u000A\u000D]* + -> channel(HIDDEN) + ; + +DelimitedComment + : '/*' ( DelimitedComment | . )*? '*/' + -> channel(HIDDEN) + ; + +LineComment + : '//' ~[\u000A\u000D]* + -> channel(HIDDEN) + ; + +WS + : [\u0020\u0009\u000C] + -> skip + ; + +NL: '\u000A' | '\u000D' '\u000A' ; + +//SEPARATORS & OPERATIONS + +RESERVED: '...' ; +DOT: '.' ; +COMMA: ',' ; +LPAREN: '(' -> pushMode(Inside) ; +RPAREN: ')' ; +LSQUARE: '[' -> pushMode(Inside) ; +RSQUARE: ']' ; +LCURL: '{' ; +RCURL: '}' ; +MULT: '*' ; +MOD: '%' ; +DIV: '/' ; +ADD: '+' ; +SUB: '-' ; +INCR: '++' ; +DECR: '--' ; +CONJ: '&&' ; +DISJ: '||' ; +EXCL: '!' ; +COLON: ':' ; +SEMICOLON: ';' ; +ASSIGNMENT: '=' ; +ADD_ASSIGNMENT: '+=' ; +SUB_ASSIGNMENT: '-=' ; +MULT_ASSIGNMENT: '*=' ; +DIV_ASSIGNMENT: '/=' ; +MOD_ASSIGNMENT: '%=' ; +ARROW: '->' ; +DOUBLE_ARROW: '=>' ; +RANGE: '..' ; +COLONCOLON: '::' ; +Q_COLONCOLON: '?::' ; +DOUBLE_SEMICOLON: ';;' ; +HASH: '#' ; +AT: '@' ; +QUEST: '?' ; +ELVIS: '?:' ; +LANGLE: '<' ; +RANGLE: '>' ; +LE: '<=' ; +GE: '>=' ; +EXCL_EQ: '!=' ; +EXCL_EQEQ: '!==' ; +AS_SAFE: 'as?' ; +EQEQ: '==' ; +EQEQEQ: '===' ; +SINGLE_QUOTE: '\'' ; + +//KEYWORDS + +RETURN_AT: 'return@' Identifier ; +CONTINUE_AT: 'continue@' Identifier ; +BREAK_AT: 'break@' Identifier ; + +FILE: '@file' ; +PACKAGE: 'package' ; +IMPORT: 'import' ; +CLASS: 'class' ; +INTERFACE: 'interface' ; +FUN: 'fun' ; +OBJECT: 'object' ; +VAL: 'val' ; +VAR: 'var' ; +TYPE_ALIAS: 'typealias' ; +CONSTRUCTOR: 'constructor' ; +BY: 'by' ; +COMPANION: 'companion' ; +INIT: 'init' ; +THIS: 'this' ; +SUPER: 'super' ; +TYPEOF: 'typeof' ; +WHERE: 'where' ; +IF: 'if' ; +ELSE: 'else' ; +WHEN: 'when' ; +TRY: 'try' ; +CATCH: 'catch' ; +FINALLY: 'finally' ; +FOR: 'for' ; +DO: 'do' ; +WHILE: 'while' ; +THROW: 'throw' ; +RETURN: 'return' ; +CONTINUE: 'continue' ; +BREAK: 'break' ; +AS: 'as' ; +IS: 'is' ; +IN: 'in' ; +NOT_IS: '!is' (WS | NL)+ ; +NOT_IN: '!in' (WS | NL)+ ; +OUT: 'out' ; +FIELD: '@field' ; +PROPERTY: '@property' ; +GET: '@get' ; +SET: '@set' ; +GETTER: 'get' ; +SETTER: 'set' ; +RECEIVER: '@receiver' ; +PARAM: '@param' ; +SETPARAM: '@setparam' ; +DELEGATE: '@delegate' ; +DYNAMIC: 'dynamic' ; + +//MODIFIERS + +PUBLIC: 'public' ; +PRIVATE: 'private' ; +PROTECTED: 'protected' ; +INTERNAL: 'internal' ; +ENUM: 'enum' ; +SEALED: 'sealed' ; +ANNOTATION: 'annotation' ; +DATA: 'data' ; +INNER: 'inner' ; +TAILREC: 'tailrec' ; +OPERATOR: 'operator' ; +INLINE: 'inline' ; +INFIX: 'infix' ; +EXTERNAL: 'external' ; +SUSPEND: 'suspend' ; +OVERRIDE: 'override' ; +ABSTRACT: 'abstract' ; +FINAL: 'final' ; +OPEN: 'open' ; +CONST: 'const' ; +LATEINIT: 'lateinit' ; +VARARG: 'vararg' ; +NOINLINE: 'noinline' ; +CROSSINLINE: 'crossinline' ; +REIFIED: 'reified' ; + +// + +QUOTE_OPEN: '"' -> pushMode(LineString) ; +TRIPLE_QUOTE_OPEN: '"""' -> pushMode(MultiLineString) ; + +RealLiteral + : FloatLiteral + | DoubleLiteral + ; + +FloatLiteral + : (DoubleLiteral | IntegerLiteral) [fF] + ; + +DoubleLiteral + : ( (DecDigitNoZero DecDigit* | '0')? '.' + | (DecDigitNoZero (DecDigit | '_')* DecDigit)? '.') + ( DecDigit+ + | DecDigit (DecDigit | '_')+ DecDigit + | DecDigit+ [eE] ('+' | '-')? DecDigit+ + | DecDigit+ [eE] ('+' | '-')? DecDigit (DecDigit | '_')+ DecDigit + | DecDigit (DecDigit | '_')+ DecDigit [eE] ('+' | '-')? DecDigit+ + | DecDigit (DecDigit | '_')+ DecDigit [eE] ('+' | '-')? DecDigit (DecDigit | '_')+ DecDigit + ) + ; + +LongLiteral + : (IntegerLiteral | HexLiteral | BinLiteral) 'L' + ; + +IntegerLiteral + : ('0' + | DecDigitNoZero DecDigit* + | DecDigitNoZero (DecDigit | '_')+ DecDigit + | DecDigitNoZero DecDigit* [eE] ('+' | '-')? DecDigit+ + | DecDigitNoZero DecDigit* [eE] ('+' | '-')? DecDigit (DecDigit | '_')+ DecDigit + | DecDigitNoZero (DecDigit | '_')+ DecDigit [eE] ('+' | '-')? DecDigit+ + | DecDigitNoZero (DecDigit | '_')+ DecDigit [eE] ('+' | '-')? DecDigit (DecDigit | '_')+ DecDigit + ) + ; + +fragment DecDigit + : UNICODE_CLASS_ND + ; + +fragment DecDigitNoZero + : UNICODE_CLASS_ND_NoZeros + ; + +fragment UNICODE_CLASS_ND_NoZeros + : '\u0031'..'\u0039' + | '\u0661'..'\u0669' + | '\u06f1'..'\u06f9' + | '\u07c1'..'\u07c9' + | '\u0967'..'\u096f' + | '\u09e7'..'\u09ef' + | '\u0a67'..'\u0a6f' + | '\u0ae7'..'\u0aef' + | '\u0b67'..'\u0b6f' + | '\u0be7'..'\u0bef' + | '\u0c67'..'\u0c6f' + | '\u0ce7'..'\u0cef' + | '\u0d67'..'\u0d6f' + | '\u0de7'..'\u0def' + | '\u0e51'..'\u0e59' + | '\u0ed1'..'\u0ed9' + | '\u0f21'..'\u0f29' + | '\u1041'..'\u1049' + | '\u1091'..'\u1099' + | '\u17e1'..'\u17e9' + | '\u1811'..'\u1819' + | '\u1947'..'\u194f' + | '\u19d1'..'\u19d9' + | '\u1a81'..'\u1a89' + | '\u1a91'..'\u1a99' + | '\u1b51'..'\u1b59' + | '\u1bb1'..'\u1bb9' + | '\u1c41'..'\u1c49' + | '\u1c51'..'\u1c59' + | '\ua621'..'\ua629' + | '\ua8d1'..'\ua8d9' + | '\ua901'..'\ua909' + | '\ua9d1'..'\ua9d9' + | '\ua9f1'..'\ua9f9' + | '\uaa51'..'\uaa59' + | '\uabf1'..'\uabf9' + | '\uff11'..'\uff19' + ; + +HexLiteral + : '0' [xX] HexDigit (HexDigit | '_')* + ; + +fragment HexDigit + : [0-9a-fA-F] + ; + +BinLiteral + : '0' [bB] BinDigit (BinDigit | '_')* + ; + +fragment BinDigit + : [01] + ; + +BooleanLiteral + : 'true' + | 'false' + ; + +NullLiteral + : 'null' + ; + +Identifier + : (Letter | '_') (Letter | '_' | DecDigit)* + | '`' ~('`')+ '`' + ; + +LabelReference + : '@' Identifier + ; + +LabelDefinition + : Identifier '@' + ; + +FieldIdentifier + : '$' Identifier + ; + +CharacterLiteral + : '\'' (EscapeSeq | .) '\'' + ; + +fragment EscapeSeq + : UniCharacterLiteral + | EscapedIdentifier + ; + +fragment UniCharacterLiteral + : '\\' 'u' HexDigit HexDigit HexDigit HexDigit + ; + +fragment EscapedIdentifier + : '\\' ('t' | 'b' | 'r' | 'n' | '\'' | '"' | '\\' | '$') + ; + +fragment Letter + : UNICODE_CLASS_LL + | UNICODE_CLASS_LM + | UNICODE_CLASS_LO + | UNICODE_CLASS_LT + | UNICODE_CLASS_LU + | UNICODE_CLASS_NL + ; + + +mode Inside ; + +Inside_RPAREN: ')' -> popMode, type(RPAREN) ; +Inside_RSQUARE: ']' -> popMode, type(RSQUARE); + +Inside_LPAREN: LPAREN -> pushMode(Inside), type(LPAREN) ; +Inside_LSQUARE: LSQUARE -> pushMode(Inside), type(LSQUARE) ; + +Inside_LCURL: LCURL -> type(LCURL) ; +Inside_RCURL: RCURL -> type(RCURL) ; +Inside_DOT: DOT -> type(DOT) ; +Inside_COMMA: COMMA -> type(COMMA) ; +Inside_MULT: MULT -> type(MULT) ; +Inside_MOD: MOD -> type(MOD) ; +Inside_DIV: DIV -> type(DIV) ; +Inside_ADD: ADD -> type(ADD) ; +Inside_SUB: SUB -> type(SUB) ; +Inside_INCR: INCR -> type(INCR) ; +Inside_DECR: DECR -> type(DECR) ; +Inside_CONJ: CONJ -> type(CONJ) ; +Inside_DISJ: DISJ -> type(DISJ) ; +Inside_EXCL: EXCL -> type(EXCL) ; +Inside_COLON: COLON -> type(COLON) ; +Inside_SEMICOLON: SEMICOLON -> type(SEMICOLON) ; +Inside_ASSIGNMENT: ASSIGNMENT -> type(ASSIGNMENT) ; +Inside_ADD_ASSIGNMENT: ADD_ASSIGNMENT -> type(ADD_ASSIGNMENT) ; +Inside_SUB_ASSIGNMENT: SUB_ASSIGNMENT -> type(SUB_ASSIGNMENT) ; +Inside_MULT_ASSIGNMENT: MULT_ASSIGNMENT -> type(MULT_ASSIGNMENT) ; +Inside_DIV_ASSIGNMENT: DIV_ASSIGNMENT -> type(DIV_ASSIGNMENT) ; +Inside_MOD_ASSIGNMENT: MOD_ASSIGNMENT -> type(MOD_ASSIGNMENT) ; +Inside_ARROW: ARROW -> type(ARROW) ; +Inside_DOUBLE_ARROW: DOUBLE_ARROW -> type(DOUBLE_ARROW) ; +Inside_RANGE: RANGE -> type(RANGE) ; +Inside_RESERVED: RESERVED -> type(RESERVED) ; +Inside_COLONCOLON: COLONCOLON -> type(COLONCOLON) ; +Inside_Q_COLONCOLON: Q_COLONCOLON -> type(Q_COLONCOLON) ; +Inside_DOUBLE_SEMICOLON: DOUBLE_SEMICOLON -> type(DOUBLE_SEMICOLON) ; +Inside_HASH: HASH -> type(HASH) ; +Inside_AT: AT -> type(AT) ; +Inside_QUEST: QUEST -> type(QUEST) ; +Inside_ELVIS: ELVIS -> type(ELVIS) ; +Inside_LANGLE: LANGLE -> type(LANGLE) ; +Inside_RANGLE: RANGLE -> type(RANGLE) ; +Inside_LE: LE -> type(LE) ; +Inside_GE: GE -> type(GE) ; +Inside_EXCL_EQ: EXCL_EQ -> type(EXCL_EQ) ; +Inside_EXCL_EQEQ: EXCL_EQEQ -> type(EXCL_EQEQ) ; +Inside_NOT_IS: NOT_IS -> type(NOT_IS) ; +Inside_NOT_IN: NOT_IN -> type(NOT_IN) ; +Inside_AS_SAFE: AS_SAFE -> type(AS_SAFE) ; +Inside_EQEQ: EQEQ -> type(EQEQ) ; +Inside_EQEQEQ: EQEQEQ -> type(EQEQEQ) ; +Inside_SINGLE_QUOTE: SINGLE_QUOTE -> type(SINGLE_QUOTE) ; +Inside_QUOTE_OPEN: QUOTE_OPEN -> pushMode(LineString), type(QUOTE_OPEN) ; +Inside_TRIPLE_QUOTE_OPEN: TRIPLE_QUOTE_OPEN -> pushMode(MultiLineString), type(TRIPLE_QUOTE_OPEN) ; + +Inside_VAL: VAL -> type(VAL) ; +Inside_VAR: VAR -> type(VAR) ; +Inside_OBJECT: OBJECT -> type(OBJECT) ; +Inside_SUPER: SUPER -> type(SUPER) ; +Inside_IN: IN -> type(IN) ; +Inside_OUT: OUT -> type(OUT) ; +Inside_FIELD: FIELD -> type(FIELD) ; +Inside_FILE: FILE -> type(FILE) ; +Inside_PROPERTY: PROPERTY -> type(PROPERTY) ; +Inside_GET: GET -> type(GET) ; +Inside_SET: SET -> type(SET) ; +Inside_RECEIVER: RECEIVER -> type(RECEIVER) ; +Inside_PARAM: PARAM -> type(PARAM) ; +Inside_SETPARAM: SETPARAM -> type(SETPARAM) ; +Inside_DELEGATE: DELEGATE -> type(DELEGATE) ; +Inside_THROW: THROW -> type(THROW) ; +Inside_RETURN: RETURN -> type(RETURN) ; +Inside_CONTINUE: CONTINUE -> type(CONTINUE) ; +Inside_BREAK: BREAK -> type(BREAK) ; +Inside_RETURN_AT: RETURN_AT -> type(RETURN_AT) ; +Inside_CONTINUE_AT: CONTINUE_AT -> type(CONTINUE_AT) ; +Inside_BREAK_AT: BREAK_AT -> type(BREAK_AT) ; +Inside_IF: IF -> type(IF) ; +Inside_ELSE: ELSE -> type(ELSE) ; +Inside_WHEN: WHEN -> type(WHEN) ; +Inside_TRY: TRY -> type(TRY) ; +Inside_CATCH: CATCH -> type(CATCH) ; +Inside_FINALLY: FINALLY -> type(FINALLY) ; +Inside_FOR: FOR -> type(FOR) ; +Inside_DO: DO -> type(DO) ; +Inside_WHILE: WHILE -> type(WHILE) ; + +Inside_PUBLIC: PUBLIC -> type(PUBLIC) ; +Inside_PRIVATE: PRIVATE -> type(PRIVATE) ; +Inside_PROTECTED: PROTECTED -> type(PROTECTED) ; +Inside_INTERNAL: INTERNAL -> type(INTERNAL) ; +Inside_ENUM: ENUM -> type(ENUM) ; +Inside_SEALED: SEALED -> type(SEALED) ; +Inside_ANNOTATION: ANNOTATION -> type(ANNOTATION) ; +Inside_DATA: DATA -> type(DATA) ; +Inside_INNER: INNER -> type(INNER) ; +Inside_TAILREC: TAILREC -> type(TAILREC) ; +Inside_OPERATOR: OPERATOR -> type(OPERATOR) ; +Inside_INLINE: INLINE -> type(INLINE) ; +Inside_INFIX: INFIX -> type(INFIX) ; +Inside_EXTERNAL: EXTERNAL -> type(EXTERNAL) ; +Inside_SUSPEND: SUSPEND -> type(SUSPEND) ; +Inside_OVERRIDE: OVERRIDE -> type(OVERRIDE) ; +Inside_ABSTRACT: ABSTRACT -> type(ABSTRACT) ; +Inside_FINAL: FINAL -> type(FINAL) ; +Inside_OPEN: OPEN -> type(OPEN) ; +Inside_CONST: CONST -> type(CONST) ; +Inside_LATEINIT: LATEINIT -> type(LATEINIT) ; +Inside_VARARG: VARARG -> type(VARARG) ; +Inside_NOINLINE: NOINLINE -> type(NOINLINE) ; +Inside_CROSSINLINE: CROSSINLINE -> type(CROSSINLINE) ; +Inside_REIFIED: REIFIED -> type(REIFIED) ; + +Inside_BooleanLiteral: BooleanLiteral -> type(BooleanLiteral) ; +Inside_IntegerLiteral: IntegerLiteral -> type(IntegerLiteral) ; +Inside_HexLiteral: HexLiteral -> type(HexLiteral) ; +Inside_BinLiteral: BinLiteral -> type(BinLiteral) ; +Inside_CharacterLiteral: CharacterLiteral -> type(CharacterLiteral) ; +Inside_RealLiteral: RealLiteral -> type(RealLiteral) ; +Inside_NullLiteral: NullLiteral -> type(NullLiteral) ; + +Inside_LongLiteral: LongLiteral -> type(LongLiteral) ; + +Inside_Identifier: Identifier -> type(Identifier) ; +Inside_LabelReference: LabelReference -> type(LabelReference) ; +Inside_LabelDefinition: LabelDefinition -> type(LabelDefinition) ; +Inside_Comment: (LineComment | DelimitedComment) -> channel(HIDDEN) ; +Inside_WS: WS -> skip ; +Inside_NL: NL -> skip ; + + +mode LineString ; + +QUOTE_CLOSE + : '"' -> popMode + ; + +LineStrRef + : FieldIdentifier + ; + +LineStrText + : ~('\\' | '"' | '$')+ | '$' + ; + +LineStrEscapedChar + : '\\' . + | UniCharacterLiteral + ; + +LineStrExprStart + : '${' -> pushMode(StringExpression) + ; + + +mode MultiLineString ; + +TRIPLE_QUOTE_CLOSE + : MultiLineStringQuote? '"""' -> popMode + ; + +MultiLineStringQuote + : '"'+ + ; + +MultiLineStrRef + : FieldIdentifier + ; + +MultiLineStrText + : ~('\\' | '"' | '$')+ | '$' + ; + +MultiLineStrEscapedChar + : '\\' . + ; + +MultiLineStrExprStart + : '${' -> pushMode(StringExpression) + ; + +MultiLineNL: NL -> skip ; + + +mode StringExpression ; + +StrExpr_RCURL: RCURL -> popMode, type(RCURL) ; + +StrExpr_LPAREN: LPAREN -> pushMode(Inside), type(LPAREN) ; +StrExpr_LSQUARE: LSQUARE -> pushMode(Inside), type(LSQUARE) ; + +StrExpr_RPAREN: ')' -> type(RPAREN) ; +StrExpr_RSQUARE: ']' -> type(RSQUARE); +StrExpr_LCURL: LCURL -> pushMode(StringExpression), type(LCURL) ; +StrExpr_DOT: DOT -> type(DOT) ; +StrExpr_COMMA: COMMA -> type(COMMA) ; +StrExpr_MULT: MULT -> type(MULT) ; +StrExpr_MOD: MOD -> type(MOD) ; +StrExpr_DIV: DIV -> type(DIV) ; +StrExpr_ADD: ADD -> type(ADD) ; +StrExpr_SUB: SUB -> type(SUB) ; +StrExpr_INCR: INCR -> type(INCR) ; +StrExpr_DECR: DECR -> type(DECR) ; +StrExpr_CONJ: CONJ -> type(CONJ) ; +StrExpr_DISJ: DISJ -> type(DISJ) ; +StrExpr_EXCL: EXCL -> type(EXCL) ; +StrExpr_COLON: COLON -> type(COLON) ; +StrExpr_SEMICOLON: SEMICOLON -> type(SEMICOLON) ; +StrExpr_ASSIGNMENT: ASSIGNMENT -> type(ASSIGNMENT) ; +StrExpr_ADD_ASSIGNMENT: ADD_ASSIGNMENT -> type(ADD_ASSIGNMENT) ; +StrExpr_SUB_ASSIGNMENT: SUB_ASSIGNMENT -> type(SUB_ASSIGNMENT) ; +StrExpr_MULT_ASSIGNMENT: MULT_ASSIGNMENT -> type(MULT_ASSIGNMENT) ; +StrExpr_DIV_ASSIGNMENT: DIV_ASSIGNMENT -> type(DIV_ASSIGNMENT) ; +StrExpr_MOD_ASSIGNMENT: MOD_ASSIGNMENT -> type(MOD_ASSIGNMENT) ; +StrExpr_ARROW: ARROW -> type(ARROW) ; +StrExpr_DOUBLE_ARROW: DOUBLE_ARROW -> type(DOUBLE_ARROW) ; +StrExpr_RANGE: RANGE -> type(RANGE) ; +StrExpr_COLONCOLON: COLONCOLON -> type(COLONCOLON) ; +StrExpr_Q_COLONCOLON: Q_COLONCOLON -> type(Q_COLONCOLON) ; +StrExpr_DOUBLE_SEMICOLON: DOUBLE_SEMICOLON -> type(DOUBLE_SEMICOLON) ; +StrExpr_HASH: HASH -> type(HASH) ; +StrExpr_AT: AT -> type(AT) ; +StrExpr_QUEST: QUEST -> type(QUEST) ; +StrExpr_ELVIS: ELVIS -> type(ELVIS) ; +StrExpr_LANGLE: LANGLE -> type(LANGLE) ; +StrExpr_RANGLE: RANGLE -> type(RANGLE) ; +StrExpr_LE: LE -> type(LE) ; +StrExpr_GE: GE -> type(GE) ; +StrExpr_EXCL_EQ: EXCL_EQ -> type(EXCL_EQ) ; +StrExpr_EXCL_EQEQ: EXCL_EQEQ -> type(EXCL_EQEQ) ; +StrExpr_AS: AS -> type(IS) ; +StrExpr_IS: IS -> type(IN) ; +StrExpr_IN: IN ; +StrExpr_NOT_IS: NOT_IS -> type(NOT_IS) ; +StrExpr_NOT_IN: NOT_IN -> type(NOT_IN) ; +StrExpr_AS_SAFE: AS_SAFE -> type(AS_SAFE) ; +StrExpr_EQEQ: EQEQ -> type(EQEQ) ; +StrExpr_EQEQEQ: EQEQEQ -> type(EQEQEQ) ; +StrExpr_SINGLE_QUOTE: SINGLE_QUOTE -> type(SINGLE_QUOTE) ; +StrExpr_QUOTE_OPEN: QUOTE_OPEN -> pushMode(LineString), type(QUOTE_OPEN) ; +StrExpr_TRIPLE_QUOTE_OPEN: TRIPLE_QUOTE_OPEN -> pushMode(MultiLineString), type(TRIPLE_QUOTE_OPEN) ; + +StrExpr_BooleanLiteral: BooleanLiteral -> type(BooleanLiteral) ; +StrExpr_IntegerLiteral: IntegerLiteral -> type(IntegerLiteral) ; +StrExpr_HexLiteral: HexLiteral -> type(HexLiteral) ; +StrExpr_BinLiteral: BinLiteral -> type(BinLiteral) ; +StrExpr_CharacterLiteral: CharacterLiteral -> type(CharacterLiteral) ; +StrExpr_RealLiteral: RealLiteral -> type(RealLiteral) ; +StrExpr_NullLiteral: NullLiteral -> type(NullLiteral) ; +StrExpr_LongLiteral: LongLiteral -> type(LongLiteral) ; + +StrExpr_Identifier: Identifier -> type(Identifier) ; +StrExpr_LabelReference: LabelReference -> type(LabelReference) ; +StrExpr_LabelDefinition: LabelDefinition -> type(LabelDefinition) ; +StrExpr_Comment: (LineComment | DelimitedComment) -> channel(HIDDEN) ; +StrExpr_WS: WS -> skip ; +StrExpr_NL: NL -> skip ; diff --git a/src/main/antlr/KotlinParser.g4 b/src/main/antlr/KotlinParser.g4 new file mode 100644 index 00000000..147f0a3b --- /dev/null +++ b/src/main/antlr/KotlinParser.g4 @@ -0,0 +1,796 @@ +/** + * Kotlin Grammar for ANTLR v4 + * + * Based on: + * http://jetbrains.github.io/kotlin-spec/#_grammars_and_parsing + * and + * http://kotlinlang.org/docs/reference/grammar.html + * + * Tested on + * https://github.com/JetBrains/kotlin/tree/master/compiler/testData/psi + */ + +parser grammar KotlinParser; + +options { tokenVocab = KotlinLexer; } + +kotlinFile + : NL* preamble anysemi* (topLevelObject (anysemi+ topLevelObject?)*)? EOF + ; + +script + : NL* preamble anysemi* (expression (anysemi+ expression?)*)? EOF + ; + +preamble + : fileAnnotations? packageHeader importList + ; + +fileAnnotations + : fileAnnotation+ + ; + +fileAnnotation + : (FILE COLON (LSQUARE unescapedAnnotation+ RSQUARE | unescapedAnnotation) semi?)+ + ; + +packageHeader + : (modifierList? PACKAGE identifier semi?)? + ; + +importList + : importHeader* + ; + +importHeader + : IMPORT identifier (DOT MULT | importAlias)? semi? + ; + +importAlias + : AS simpleIdentifier + ; + +topLevelObject + : classDeclaration + | objectDeclaration + | functionDeclaration + | propertyDeclaration + | typeAlias + ; + +classDeclaration + : modifierList? (CLASS | INTERFACE) NL* simpleIdentifier + (NL* typeParameters)? (NL* primaryConstructor)? + (NL* COLON NL* delegationSpecifiers)? + (NL* typeConstraints)? + (NL* classBody | NL* enumClassBody)? + ; + +primaryConstructor + : modifierList? (CONSTRUCTOR NL*)? classParameters + ; + +classParameters + : LPAREN (classParameter (COMMA classParameter)* COMMA?)? RPAREN + ; + +classParameter + : modifierList? (VAL | VAR)? simpleIdentifier COLON type (ASSIGNMENT expression)? + ; + +delegationSpecifiers + : annotations* delegationSpecifier (NL* COMMA NL* annotations* delegationSpecifier)* + ; + +delegationSpecifier + : constructorInvocation + | userType + | explicitDelegation + ; + +constructorInvocation + : userType callSuffix + ; + +explicitDelegation + : userType NL* BY NL* expression + ; + +classBody + : LCURL NL* classMemberDeclaration* NL* RCURL + ; + +classMemberDeclaration + : (classDeclaration + | functionDeclaration + | objectDeclaration + | companionObject + | propertyDeclaration + | anonymousInitializer + | secondaryConstructor + | typeAlias) anysemi+ + ; + +anonymousInitializer + : INIT NL* block + ; + +secondaryConstructor + : modifierList? CONSTRUCTOR NL* functionValueParameters (NL* COLON NL* constructorDelegationCall)? NL* block? + ; + +constructorDelegationCall + : THIS NL* valueArguments + | SUPER NL* valueArguments + ; + +enumClassBody + : LCURL NL* enumEntries? (NL* SEMICOLON NL* classMemberDeclaration*)? NL* RCURL + ; + +enumEntries + : (enumEntry NL*)+ SEMICOLON? + ; + +enumEntry + : annotations* simpleIdentifier (NL* valueArguments)? (NL* classBody)? (NL* COMMA)? + ; + +functionDeclaration + : modifierList? FUN + (NL* type NL* DOT)? + (NL* typeParameters)? + (NL* receiverType NL* DOT)? + (NL* identifier)? + NL* functionValueParameters + (NL* COLON NL* type)? + (NL* typeConstraints)? + (NL* functionBody)? + ; + +functionValueParameters + : LPAREN (functionValueParameter (COMMA functionValueParameter)* COMMA?)? RPAREN + ; + +functionValueParameter + : modifierList? parameter (ASSIGNMENT expression)? + ; + +parameter + : simpleIdentifier COLON type + ; + +receiverType + : typeModifierList? (parenthesizedType | nullableType | typeReference) + ; + +functionBody + : block + | ASSIGNMENT NL* expression + ; + +objectDeclaration + : modifierList? OBJECT + NL* simpleIdentifier + (NL* primaryConstructor)? + (NL* COLON NL* delegationSpecifiers)? + (NL* classBody)? + ; + +companionObject + : modifierList? COMPANION NL* modifierList? OBJECT + (NL* simpleIdentifier)? + (NL* COLON NL* delegationSpecifiers)? + (NL* classBody)? + ; + +propertyDeclaration + : modifierList? (VAL | VAR) + (NL* typeParameters)? + (NL* type NL* DOT)? + (NL* (multiVariableDeclaration | variableDeclaration)) + (NL* typeConstraints)? + (NL* (BY | ASSIGNMENT) NL* expression)? + (NL* getter (semi setter)? | NL* setter (semi getter)?)? + ; + +multiVariableDeclaration + : LPAREN variableDeclaration (COMMA variableDeclaration)* RPAREN + ; + +variableDeclaration + : simpleIdentifier (COLON type)? + ; + +getter + : modifierList? GETTER + | modifierList? GETTER NL* LPAREN RPAREN (NL* COLON NL* type)? NL* (block | ASSIGNMENT NL* expression) + ; + +setter + : modifierList? SETTER + | modifierList? SETTER NL* LPAREN (annotations | parameterModifier)* (simpleIdentifier | parameter) RPAREN NL* functionBody + ; + +typeAlias + : modifierList? TYPE_ALIAS NL* simpleIdentifier (NL* typeParameters)? NL* ASSIGNMENT NL* type + ; + +typeParameters + : LANGLE NL* typeParameter (NL* COMMA NL* typeParameter)* (NL* COMMA)? NL* RANGLE + ; + +typeParameter + : modifierList? NL* (simpleIdentifier | MULT) (NL* COLON NL* type)? + ; + +type + : typeModifierList? + ( functionType + | parenthesizedType + | nullableType + | typeReference) + ; + +typeModifierList + : (annotations | SUSPEND NL*)+ + ; + +parenthesizedType + : LPAREN type RPAREN + ; + +nullableType + : (typeReference | parenthesizedType) NL* QUEST+ + ; + +typeReference + : LPAREN typeReference RPAREN + | userType + | DYNAMIC + ; + +functionType + : (functionTypeReceiver NL* DOT NL*)? functionTypeParameters NL* ARROW (NL* type) + ; + +functionTypeReceiver + : parenthesizedType + | nullableType + | typeReference + ; + +userType + : simpleUserType (NL* DOT NL* simpleUserType)* + ; + +simpleUserType + : simpleIdentifier (NL* typeArguments)? + ; + +//parameters for functionType +functionTypeParameters + : LPAREN NL* (parameter | type)? (NL* COMMA NL* (parameter | type))* (NL* COMMA)? NL* RPAREN + ; + +typeConstraints + : WHERE NL* typeConstraint (NL* COMMA NL* typeConstraint)* + ; + +typeConstraint + : annotations* simpleIdentifier NL* COLON NL* type + ; + +block + : LCURL statements RCURL + ; + +statements + : anysemi* (statement (anysemi+ statement?)*)? + ; + +statement + : declaration + | blockLevelExpression + ; + +blockLevelExpression + : annotations* NL* expression + ; + +declaration + : labelDefinition* + ( classDeclaration + | functionDeclaration + | propertyDeclaration + | typeAlias) + ; + +expression + : disjunction (assignmentOperator disjunction)* + ; + +disjunction + : conjunction (NL* DISJ NL* conjunction)* + ; + +conjunction + : equalityComparison (NL* CONJ NL* equalityComparison)* + ; + +equalityComparison + : comparison (equalityOperation NL* comparison)* + ; + +comparison + : namedInfix (comparisonOperator NL* namedInfix)? + ; + +namedInfix + : elvisExpression ((inOperator NL* elvisExpression)+ | (isOperator NL* type))? + ; + +elvisExpression + : infixFunctionCall (NL* ELVIS NL* infixFunctionCall)* + ; + +infixFunctionCall + : rangeExpression (simpleIdentifier NL* rangeExpression)* + ; + +rangeExpression + : additiveExpression (RANGE NL* additiveExpression)* + ; + +additiveExpression + : multiplicativeExpression (additiveOperator NL* multiplicativeExpression)* + ; + +multiplicativeExpression + : typeRHS (multiplicativeOperation NL* typeRHS)* + ; + +typeRHS + : prefixUnaryExpression (NL* typeOperation prefixUnaryExpression)* + ; + +prefixUnaryExpression + : prefixUnaryOperation* postfixUnaryExpression + ; + +postfixUnaryExpression + : (atomicExpression | callableReference) postfixUnaryOperation* + ; + +atomicExpression + : parenthesizedExpression + | literalConstant + | functionLiteral + | thisExpression // THIS labelReference? + | superExpression // SUPER (LANGLE type RANGLE)? labelReference? + | conditionalExpression // ifExpression, whenExpression + | tryExpression + | objectLiteral + | jumpExpression + | loopExpression + | collectionLiteral + | simpleIdentifier + | VAL identifier + ; + +parenthesizedExpression + : LPAREN expression RPAREN + ; + +callSuffix + : typeArguments valueArguments? annotatedLambda* + | valueArguments annotatedLambda* + | annotatedLambda+ + ; + +annotatedLambda + : unescapedAnnotation* LabelDefinition? NL* functionLiteral + ; + +arrayAccess + : LSQUARE (expression (COMMA expression)*)? RSQUARE + ; + +valueArguments + : LPAREN (valueArgument (COMMA valueArgument)* (NL* COMMA)?)? RPAREN + ; + +typeArguments + : LANGLE NL* typeProjection (NL* COMMA typeProjection)* (NL* COMMA)? NL* RANGLE QUEST? + ; + +typeProjection + : typeProjectionModifierList? type | MULT + ; + +typeProjectionModifierList + : varianceAnnotation+ + ; + +valueArgument + : (simpleIdentifier NL* ASSIGNMENT NL*)? MULT? NL* expression + ; + +literalConstant + : BooleanLiteral + | IntegerLiteral + | stringLiteral + | HexLiteral + | BinLiteral + | CharacterLiteral + | RealLiteral + | NullLiteral + | LongLiteral + ; + +stringLiteral + : lineStringLiteral + | multiLineStringLiteral + ; + +lineStringLiteral + : QUOTE_OPEN (lineStringContent | lineStringExpression)* QUOTE_CLOSE + ; + +multiLineStringLiteral + : TRIPLE_QUOTE_OPEN (multiLineStringContent | multiLineStringExpression | lineStringLiteral | MultiLineStringQuote)* TRIPLE_QUOTE_CLOSE + ; + +lineStringContent + : LineStrText + | LineStrEscapedChar + | LineStrRef + ; + +lineStringExpression + : LineStrExprStart expression RCURL + ; + +multiLineStringContent + : MultiLineStrText + | MultiLineStrEscapedChar + | MultiLineStrRef + ; + +multiLineStringExpression + : MultiLineStrExprStart expression RCURL + ; + +functionLiteral + : annotations* + ( LCURL NL* statements NL* RCURL + | LCURL NL* lambdaParameters NL* ARROW NL* statements NL* RCURL ) + ; + +lambdaParameters + : lambdaParameter? (NL* COMMA NL* lambdaParameter)* + ; + +lambdaParameter + : variableDeclaration + | multiVariableDeclaration (NL* COLON NL* type)? + ; + +// https://kotlinlang.org/docs/reference/grammar.html#objectLiteral +objectLiteral + : OBJECT (NL* COLON NL* delegationSpecifiers)? NL* classBody? + ; + +collectionLiteral + : LSQUARE expression? (COMMA expression)* RSQUARE + ; + +thisExpression + : THIS LabelReference? + ; + +superExpression + : SUPER (LANGLE NL* type NL* RANGLE)? LabelReference? + ; + +conditionalExpression + : ifExpression + | whenExpression + ; + +ifExpression + : IF NL* LPAREN expression RPAREN NL* controlStructureBody? SEMICOLON? + (NL* ELSE NL* controlStructureBody?)? + ; + +controlStructureBody + : block + | expression + ; + +whenExpression + : WHEN NL* (LPAREN expression RPAREN)? NL* LCURL NL* (whenEntry NL*)* NL* RCURL + ; + +whenEntry + : whenCondition (NL* COMMA NL* whenCondition)* NL* ARROW NL* controlStructureBody semi? + | ELSE NL* ARROW NL* controlStructureBody + ; + +whenCondition + : expression + | rangeTest + | typeTest + ; + +rangeTest + : inOperator NL* expression + ; + +typeTest + : isOperator NL* type + ; + +tryExpression + : TRY NL* block (NL* catchBlock)* (NL* finallyBlock)? + ; + +catchBlock + : CATCH NL* LPAREN annotations* simpleIdentifier COLON userType RPAREN NL* block + ; + +finallyBlock + : FINALLY NL* block + ; + +loopExpression + : forExpression + | whileExpression + | doWhileExpression + ; + +forExpression + : FOR NL* LPAREN annotations* (variableDeclaration | multiVariableDeclaration) IN expression RPAREN NL* controlStructureBody? + ; + +whileExpression + : WHILE NL* LPAREN expression RPAREN NL* controlStructureBody? + ; + +doWhileExpression + : DO NL* controlStructureBody? NL* WHILE NL* LPAREN expression RPAREN + ; + +jumpExpression + : THROW NL* expression + | (RETURN | RETURN_AT) expression? + | CONTINUE | CONTINUE_AT + | BREAK | BREAK_AT + ; + +callableReference + : (userType (QUEST NL*)*)? NL* (COLONCOLON | Q_COLONCOLON) NL* (identifier | CLASS) + | THIS NL* COLONCOLON NL* CLASS + ; + +assignmentOperator + : ASSIGNMENT + | ADD_ASSIGNMENT + | SUB_ASSIGNMENT + | MULT_ASSIGNMENT + | DIV_ASSIGNMENT + | MOD_ASSIGNMENT + ; + +equalityOperation + : EXCL_EQ + | EXCL_EQEQ + | EQEQ + | EQEQEQ + ; + +comparisonOperator + : LANGLE + | RANGLE + | LE + | GE + ; + +inOperator + : IN | NOT_IN + ; + +isOperator + : IS | NOT_IS + ; + +additiveOperator + : ADD | SUB + ; + +multiplicativeOperation + : MULT + | DIV + | MOD + ; + +typeOperation + : AS + | AS_SAFE + | COLON + ; + +prefixUnaryOperation + : INCR + | DECR + | ADD + | SUB + | EXCL + | annotations + | labelDefinition + ; + +postfixUnaryOperation + : INCR | DECR | EXCL EXCL + | callSuffix + | arrayAccess + | NL* memberAccessOperator postfixUnaryExpression + ; + +memberAccessOperator + : DOT | QUEST DOT + ; + +modifierList + : (annotations | modifier)+ + ; + +modifier + : (classModifier + | memberModifier + | visibilityModifier + | varianceAnnotation + | functionModifier + | propertyModifier + | inheritanceModifier + | parameterModifier + | typeParameterModifier) NL* + ; + +classModifier + : ENUM + | SEALED + | ANNOTATION + | DATA + | INNER + ; + +memberModifier + : OVERRIDE + | LATEINIT + ; + +visibilityModifier + : PUBLIC + | PRIVATE + | INTERNAL + | PROTECTED + ; + +varianceAnnotation + : IN | OUT + ; + +functionModifier + : TAILREC + | OPERATOR + | INFIX + | INLINE + | EXTERNAL + | SUSPEND + ; + +propertyModifier + : CONST + ; + +inheritanceModifier + : ABSTRACT + | FINAL + | OPEN + ; + +parameterModifier + : VARARG + | NOINLINE + | CROSSINLINE + ; + +typeParameterModifier + : REIFIED + ; + +labelDefinition + : LabelDefinition NL* + ; + +annotations + : (annotation | annotationList) NL* + ; + +annotation + : annotationUseSiteTarget NL* COLON NL* unescapedAnnotation + | LabelReference (NL* DOT NL* simpleIdentifier)* (NL* typeArguments)? (NL* valueArguments)? + ; + +annotationList + : annotationUseSiteTarget COLON LSQUARE unescapedAnnotation+ RSQUARE + | AT LSQUARE unescapedAnnotation+ RSQUARE + ; + +annotationUseSiteTarget + : FIELD + | FILE + | PROPERTY + | GET + | SET + | RECEIVER + | PARAM + | SETPARAM + | DELEGATE + ; + +unescapedAnnotation + : identifier typeArguments? valueArguments? + ; + +identifier + : simpleIdentifier (NL* DOT simpleIdentifier)* + ; + +simpleIdentifier + : Identifier + //soft keywords: + | ABSTRACT + | ANNOTATION + | BY + | CATCH + | COMPANION + | CONSTRUCTOR + | CROSSINLINE + | DATA + | DYNAMIC + | ENUM + | EXTERNAL + | FINAL + | FINALLY + | GETTER + | IMPORT + | INFIX + | INIT + | INLINE + | INNER + | INTERNAL + | LATEINIT + | NOINLINE + | OPEN + | OPERATOR + | OUT + | OVERRIDE + | PRIVATE + | PROTECTED + | PUBLIC + | REIFIED + | SEALED + | TAILREC + | SETTER + | VARARG + | WHERE + //strong keywords + | CONST + | SUSPEND + ; + +semi: NL+ | NL* SEMICOLON NL*; + +anysemi: NL | SEMICOLON; diff --git a/src/main/antlr/PythonLexer.g4 b/src/main/antlr/PythonLexer.g4 new file mode 100644 index 00000000..afc5d5fc --- /dev/null +++ b/src/main/antlr/PythonLexer.g4 @@ -0,0 +1,759 @@ +/* +Python grammar. +The MIT License (MIT). +Copyright (c) 2014, Bart Kiers, bart@big-o.nl +Copyright (c) 2019, Dmitriy Litovchenko, Dmitry.Litovchenko1@yandex.ru, Positive Technologies +Copyright (c) 2019, Nikita Subbotin, sub.nik.and@gmail.com, Positive Technologies +Copyright (c) 2019, Ivan Kochurkin, kvanttt@gmail.com, Positive Technologies + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +lexer grammar PythonLexer; + +options { superClass=PythonLexerBase; } + +// Insert here @header for C++ lexer. + +// Artificial tokens only for parser purposes + +tokens { INDENT, DEDENT, LINE_BREAK } + +// Keywords + +DEF : 'def'; +RETURN : 'return'; +RAISE : 'raise'; +FROM : 'from'; +IMPORT : 'import'; +NONLOCAL : 'nonlocal'; +AS : 'as'; +GLOBAL : 'global'; +ASSERT : 'assert'; +IF : 'if'; +ELIF : 'elif'; +ELSE : 'else'; +WHILE : 'while'; +FOR : 'for'; +IN : 'in'; +TRY : 'try'; +NONE : 'None'; +FINALLY : 'finally'; +WITH : 'with'; +EXCEPT : 'except'; +LAMBDA : 'lambda'; +OR : 'or'; +AND : 'and'; +NOT : 'not'; +IS : 'is'; +CLASS : 'class'; +YIELD : 'yield'; +DEL : 'del'; +PASS : 'pass'; +CONTINUE : 'continue'; +BREAK : 'break'; +ASYNC : 'async'; +AWAIT : 'await'; +PRINT : 'print'; +EXEC : 'exec'; +TRUE : 'True'; +FALSE : 'False'; + +// Operators + +DOT : '.'; +ELLIPSIS : '...'; +REVERSE_QUOTE : '`'; +STAR : '*'; +COMMA : ','; +COLON : ':'; +SEMI_COLON : ';'; +POWER : '**'; +ASSIGN : '='; +OR_OP : '|'; +XOR : '^'; +AND_OP : '&'; +LEFT_SHIFT : '<<'; +RIGHT_SHIFT : '>>'; +ADD : '+'; +MINUS : '-'; +DIV : '/'; +MOD : '%'; +IDIV : '//'; +NOT_OP : '~'; +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 : '//='; + +STRING : ([uU] | [fF] [rR]? | [rR] [fF]?)? (SHORT_STRING | LONG_STRING) + | ([bB] [rR]? | [rR] [bB]) (SHORT_BYTES | LONG_BYTES) + ; + +DECIMAL_INTEGER : [1-9] [0-9]* + | '0'+ + ; +OCT_INTEGER : '0' [oO] [0-7]+; +HEX_INTEGER : '0' [xX] [0-9a-fA-F]+; +BIN_INTEGER : '0' [bB] [01]+; + +IMAG_NUMBER : (EXPONENT_OR_POINT_FLOAT | [0-9]+) [jJ]; +FLOAT_NUMBER : EXPONENT_OR_POINT_FLOAT; + +OPEN_PAREN : '(' {this.IncIndentLevel();}; +CLOSE_PAREN : ')' {this.DecIndentLevel();}; +OPEN_BRACE : '{' {this.IncIndentLevel();}; +CLOSE_BRACE : '}' {this.DecIndentLevel();}; +OPEN_BRACKET : '[' {this.IncIndentLevel();}; +CLOSE_BRACKET : ']' {this.DecIndentLevel();}; + +NAME : ID_START ID_CONTINUE*; + +LINE_JOIN : '\\' [ \t]* RN -> channel(HIDDEN); +NEWLINE : RN {this.HandleNewLine();} -> channel(HIDDEN); +WS : [ \t]+ {this.HandleSpaces();} -> channel(HIDDEN); +COMMENT : '#' ~[\r\n\f]* -> channel(HIDDEN); + +// Fragments + +fragment SHORT_STRING + : '\'' ('\\' (RN | .) | ~[\\\r\n'])* '\'' + | '"' ('\\' (RN | .) | ~[\\\r\n"])* '"' + ; + +fragment LONG_STRING + : '\'\'\'' LONG_STRING_ITEM*? '\'\'\'' + | '"""' LONG_STRING_ITEM*? '"""' + ; + +fragment LONG_STRING_ITEM + : ~'\\' + | '\\' (RN | .) + ; + +fragment RN + : '\r'? '\n' + ; + +fragment EXPONENT_OR_POINT_FLOAT + : ([0-9]+ | POINT_FLOAT) [eE] [+-]? [0-9]+ + | POINT_FLOAT + ; + +fragment POINT_FLOAT + : [0-9]* '.' [0-9]+ + | [0-9]+ '.' + ; + +fragment SHORT_BYTES + : '\'' (SHORT_BYTES_CHAR_NO_SINGLE_QUOTE | BYTES_ESCAPE_SEQ)* '\'' + | '"' (SHORT_BYTES_CHAR_NO_DOUBLE_QUOTE | BYTES_ESCAPE_SEQ)* '"' + ; + +fragment LONG_BYTES + : '\'\'\'' LONG_BYTES_ITEM*? '\'\'\'' + | '"""' LONG_BYTES_ITEM*? '"""' + ; + +fragment LONG_BYTES_ITEM + : LONG_BYTES_CHAR + | BYTES_ESCAPE_SEQ + ; + +fragment SHORT_BYTES_CHAR_NO_SINGLE_QUOTE + : [\u0000-\u0009] + | [\u000B-\u000C] + | [\u000E-\u0026] + | [\u0028-\u005B] + | [\u005D-\u007F] + ; + +fragment SHORT_BYTES_CHAR_NO_DOUBLE_QUOTE + : [\u0000-\u0009] + | [\u000B-\u000C] + | [\u000E-\u0021] + | [\u0023-\u005B] + | [\u005D-\u007F] + ; + +/// Any ASCII character except "\" +fragment LONG_BYTES_CHAR + : [\u0000-\u005B] + | [\u005D-\u007F] + ; + +/// "\" +fragment BYTES_ESCAPE_SEQ + : '\\' [\u0000-\u007F] + ; + +/// All characters in id_start, plus characters in the categories Mn, Mc, Nd, Pc and others with the Other_ID_Continue property +fragment ID_CONTINUE + : ID_START + | [0-9] + | [\u0300-\u036F] + | [\u0483-\u0486] + | [\u0591-\u05B9] + | [\u05BB-\u05BD] + | '\u05BF' + | [\u05C1-\u05C2] + | [\u05C4-\u05C5] + | '\u05C7' + | [\u0610-\u0615] + | [\u064B-\u065E] + | [\u0660-\u0669] + | '\u0670' + | [\u06D6-\u06DC] + | [\u06DF-\u06E4] + | [\u06E7-\u06E8] + | [\u06EA-\u06ED] + | [\u06F0-\u06F9] + | '\u0711' + | [\u0730-\u074A] + | [\u07A6-\u07B0] + | [\u0901-\u0902] + | '\u0903' + | '\u093C' + | [\u093E-\u0940] + | [\u0941-\u0948] + | [\u0949-\u094C] + | '\u094D' + | [\u0951-\u0954] + | [\u0962-\u0963] + | [\u0966-\u096F] + | '\u0981' + | [\u0982-\u0983] + | '\u09BC' + | [\u09BE-\u09C0] + | [\u09C1-\u09C4] + | [\u09C7-\u09C8] + | [\u09CB-\u09CC] + | '\u09CD' + | '\u09D7' + | [\u09E2-\u09E3] + | [\u09E6-\u09EF] + | [\u0A01-\u0A02] + | '\u0A03' + | '\u0A3C' + | [\u0A3E-\u0A40] + | [\u0A41-\u0A42] + | [\u0A47-\u0A48] + | [\u0A4B-\u0A4D] + | [\u0A66-\u0A6F] + | [\u0A70-\u0A71] + | [\u0A81-\u0A82] + | '\u0A83' + | '\u0ABC' + | [\u0ABE-\u0AC0] + | [\u0AC1-\u0AC5] + | [\u0AC7-\u0AC8] + | '\u0AC9' + | [\u0ACB-\u0ACC] + | '\u0ACD' + | [\u0AE2-\u0AE3] + | [\u0AE6-\u0AEF] + | '\u0B01' + | [\u0B02-\u0B03] + | '\u0B3C' + | '\u0B3E' + | '\u0B3F' + | '\u0B40' + | [\u0B41-\u0B43] + | [\u0B47-\u0B48] + | [\u0B4B-\u0B4C] + | '\u0B4D' + | '\u0B56' + | '\u0B57' + | [\u0B66-\u0B6F] + | '\u0B82' + | [\u0BBE-\u0BBF] + | '\u0BC0' + | [\u0BC1-\u0BC2] + | [\u0BC6-\u0BC8] + | [\u0BCA-\u0BCC] + | '\u0BCD' + | '\u0BD7' + | [\u0BE6-\u0BEF] + | [\u0C01-\u0C03] + | [\u0C3E-\u0C40] + | [\u0C41-\u0C44] + | [\u0C46-\u0C48] + | [\u0C4A-\u0C4D] + | [\u0C55-\u0C56] + | [\u0C66-\u0C6F] + | [\u0C82-\u0C83] + | '\u0CBC' + | '\u0CBE' + | '\u0CBF' + | [\u0CC0-\u0CC4] + | '\u0CC6' + | [\u0CC7-\u0CC8] + | [\u0CCA-\u0CCB] + | [\u0CCC-\u0CCD] + | [\u0CD5-\u0CD6] + | [\u0CE6-\u0CEF] + | [\u0D02-\u0D03] + | [\u0D3E-\u0D40] + | [\u0D41-\u0D43] + | [\u0D46-\u0D48] + | [\u0D4A-\u0D4C] + | '\u0D4D' + | '\u0D57' + | [\u0D66-\u0D6F] + | [\u0D82-\u0D83] + | '\u0DCA' + | [\u0DCF-\u0DD1] + | [\u0DD2-\u0DD4] + | '\u0DD6' + | [\u0DD8-\u0DDF] + | [\u0DF2-\u0DF3] + | '\u0E31' + | [\u0E34-\u0E3A] + | [\u0E47-\u0E4E] + | [\u0E50-\u0E59] + | '\u0EB1' + | [\u0EB4-\u0EB9] + | [\u0EBB-\u0EBC] + | [\u0EC8-\u0ECD] + | [\u0ED0-\u0ED9] + | [\u0F18-\u0F19] + | [\u0F20-\u0F29] + | '\u0F35' + | '\u0F37' + | '\u0F39' + | [\u0F3E-\u0F3F] + | [\u0F71-\u0F7E] + | '\u0F7F' + | [\u0F80-\u0F84] + | [\u0F86-\u0F87] + | [\u0F90-\u0F97] + | [\u0F99-\u0FBC] + | '\u0FC6' + | '\u102C' + | [\u102D-\u1030] + | '\u1031' + | '\u1032' + | [\u1036-\u1037] + | '\u1038' + | '\u1039' + | [\u1040-\u1049] + | [\u1056-\u1057] + | [\u1058-\u1059] + | '\u135F' + | [\u1369-\u1371] + | [\u1712-\u1714] + | [\u1732-\u1734] + | [\u1752-\u1753] + | [\u1772-\u1773] + | '\u17B6' + | [\u17B7-\u17BD] + | [\u17BE-\u17C5] + | '\u17C6' + | [\u17C7-\u17C8] + | [\u17C9-\u17D3] + | '\u17DD' + | [\u17E0-\u17E9] + | [\u180B-\u180D] + | [\u1810-\u1819] + | '\u18A9' + | [\u1920-\u1922] + | [\u1923-\u1926] + | [\u1927-\u1928] + | [\u1929-\u192B] + | [\u1930-\u1931] + | '\u1932' + | [\u1933-\u1938] + | [\u1939-\u193B] + | [\u1946-\u194F] + | [\u19B0-\u19C0] + | [\u19C8-\u19C9] + | [\u19D0-\u19D9] + | [\u1A17-\u1A18] + | [\u1A19-\u1A1B] + | [\u1DC0-\u1DC3] + | [\u203F-\u2040] + | '\u2054' + | [\u20D0-\u20DC] + | '\u20E1' + | [\u20E5-\u20EB] + | [\u302A-\u302F] + | [\u3099-\u309A] + | '\uA802' + | '\uA806' + | '\uA80B' + | [\uA823-\uA824] + | [\uA825-\uA826] + | '\uA827' + | '\uFB1E' + | [\uFE00-\uFE0F] + | [\uFE20-\uFE23] + | [\uFE33-\uFE34] + | [\uFE4D-\uFE4F] + | [\uFF10-\uFF19] + | '\uFF3F' + ; + +/// All characters in general categories Lu, Ll, Lt, Lm, Lo, Nl, the underscore, and characters with the Other_ID_Start property +fragment ID_START + : '_' + | [A-Z] + | [a-z] + | '\u00AA' + | '\u00B5' + | '\u00BA' + | [\u00C0-\u00D6] + | [\u00D8-\u00F6] + | [\u00F8-\u01BA] + | '\u01BB' + | [\u01BC-\u01BF] + | [\u01C0-\u01C3] + | [\u01C4-\u0241] + | [\u0250-\u02AF] + | [\u02B0-\u02C1] + | [\u02C6-\u02D1] + | [\u02E0-\u02E4] + | '\u02EE' + | '\u037A' + | '\u0386' + | [\u0388-\u038A] + | '\u038C' + | [\u038E-\u03A1] + | [\u03A3-\u03CE] + | [\u03D0-\u03F5] + | [\u03F7-\u0481] + | [\u048A-\u04CE] + | [\u04D0-\u04F9] + | [\u0500-\u050F] + | [\u0531-\u0556] + | '\u0559' + | [\u0561-\u0587] + | [\u05D0-\u05EA] + | [\u05F0-\u05F2] + | [\u0621-\u063A] + | '\u0640' + | [\u0641-\u064A] + | [\u066E-\u066F] + | [\u0671-\u06D3] + | '\u06D5' + | [\u06E5-\u06E6] + | [\u06EE-\u06EF] + | [\u06FA-\u06FC] + | '\u06FF' + | '\u0710' + | [\u0712-\u072F] + | [\u074D-\u076D] + | [\u0780-\u07A5] + | '\u07B1' + | [\u0904-\u0939] + | '\u093D' + | '\u0950' + | [\u0958-\u0961] + | '\u097D' + | [\u0985-\u098C] + | [\u098F-\u0990] + | [\u0993-\u09A8] + | [\u09AA-\u09B0] + | '\u09B2' + | [\u09B6-\u09B9] + | '\u09BD' + | '\u09CE' + | [\u09DC-\u09DD] + | [\u09DF-\u09E1] + | [\u09F0-\u09F1] + | [\u0A05-\u0A0A] + | [\u0A0F-\u0A10] + | [\u0A13-\u0A28] + | [\u0A2A-\u0A30] + | [\u0A32-\u0A33] + | [\u0A35-\u0A36] + | [\u0A38-\u0A39] + | [\u0A59-\u0A5C] + | '\u0A5E' + | [\u0A72-\u0A74] + | [\u0A85-\u0A8D] + | [\u0A8F-\u0A91] + | [\u0A93-\u0AA8] + | [\u0AAA-\u0AB0] + | [\u0AB2-\u0AB3] + | [\u0AB5-\u0AB9] + | '\u0ABD' + | '\u0AD0' + | [\u0AE0-\u0AE1] + | [\u0B05-\u0B0C] + | [\u0B0F-\u0B10] + | [\u0B13-\u0B28] + | [\u0B2A-\u0B30] + | [\u0B32-\u0B33] + | [\u0B35-\u0B39] + | '\u0B3D' + | [\u0B5C-\u0B5D] + | [\u0B5F-\u0B61] + | '\u0B71' + | '\u0B83' + | [\u0B85-\u0B8A] + | [\u0B8E-\u0B90] + | [\u0B92-\u0B95] + | [\u0B99-\u0B9A] + | '\u0B9C' + | [\u0B9E-\u0B9F] + | [\u0BA3-\u0BA4] + | [\u0BA8-\u0BAA] + | [\u0BAE-\u0BB9] + | [\u0C05-\u0C0C] + | [\u0C0E-\u0C10] + | [\u0C12-\u0C28] + | [\u0C2A-\u0C33] + | [\u0C35-\u0C39] + | [\u0C60-\u0C61] + | [\u0C85-\u0C8C] + | [\u0C8E-\u0C90] + | [\u0C92-\u0CA8] + | [\u0CAA-\u0CB3] + | [\u0CB5-\u0CB9] + | '\u0CBD' + | '\u0CDE' + | [\u0CE0-\u0CE1] + | [\u0D05-\u0D0C] + | [\u0D0E-\u0D10] + | [\u0D12-\u0D28] + | [\u0D2A-\u0D39] + | [\u0D60-\u0D61] + | [\u0D85-\u0D96] + | [\u0D9A-\u0DB1] + | [\u0DB3-\u0DBB] + | '\u0DBD' + | [\u0DC0-\u0DC6] + | [\u0E01-\u0E30] + | [\u0E32-\u0E33] + | [\u0E40-\u0E45] + | '\u0E46' + | [\u0E81-\u0E82] + | '\u0E84' + | [\u0E87-\u0E88] + | '\u0E8A' + | '\u0E8D' + | [\u0E94-\u0E97] + | [\u0E99-\u0E9F] + | [\u0EA1-\u0EA3] + | '\u0EA5' + | '\u0EA7' + | [\u0EAA-\u0EAB] + | [\u0EAD-\u0EB0] + | [\u0EB2-\u0EB3] + | '\u0EBD' + | [\u0EC0-\u0EC4] + | '\u0EC6' + | [\u0EDC-\u0EDD] + | '\u0F00' + | [\u0F40-\u0F47] + | [\u0F49-\u0F6A] + | [\u0F88-\u0F8B] + | [\u1000-\u1021] + | [\u1023-\u1027] + | [\u1029-\u102A] + | [\u1050-\u1055] + | [\u10A0-\u10C5] + | [\u10D0-\u10FA] + | '\u10FC' + | [\u1100-\u1159] + | [\u115F-\u11A2] + | [\u11A8-\u11F9] + | [\u1200-\u1248] + | [\u124A-\u124D] + | [\u1250-\u1256] + | '\u1258' + | [\u125A-\u125D] + | [\u1260-\u1288] + | [\u128A-\u128D] + | [\u1290-\u12B0] + | [\u12B2-\u12B5] + | [\u12B8-\u12BE] + | '\u12C0' + | [\u12C2-\u12C5] + | [\u12C8-\u12D6] + | [\u12D8-\u1310] + | [\u1312-\u1315] + | [\u1318-\u135A] + | [\u1380-\u138F] + | [\u13A0-\u13F4] + | [\u1401-\u166C] + | [\u166F-\u1676] + | [\u1681-\u169A] + | [\u16A0-\u16EA] + | [\u16EE-\u16F0] + | [\u1700-\u170C] + | [\u170E-\u1711] + | [\u1720-\u1731] + | [\u1740-\u1751] + | [\u1760-\u176C] + | [\u176E-\u1770] + | [\u1780-\u17B3] + | '\u17D7' + | '\u17DC' + | [\u1820-\u1842] + | '\u1843' + | [\u1844-\u1877] + | [\u1880-\u18A8] + | [\u1900-\u191C] + | [\u1950-\u196D] + | [\u1970-\u1974] + | [\u1980-\u19A9] + | [\u19C1-\u19C7] + | [\u1A00-\u1A16] + | [\u1D00-\u1D2B] + | [\u1D2C-\u1D61] + | [\u1D62-\u1D77] + | '\u1D78' + | [\u1D79-\u1D9A] + | [\u1D9B-\u1DBF] + | [\u1E00-\u1E9B] + | [\u1EA0-\u1EF9] + | [\u1F00-\u1F15] + | [\u1F18-\u1F1D] + | [\u1F20-\u1F45] + | [\u1F48-\u1F4D] + | [\u1F50-\u1F57] + | '\u1F59' + | '\u1F5B' + | '\u1F5D' + | [\u1F5F-\u1F7D] + | [\u1F80-\u1FB4] + | [\u1FB6-\u1FBC] + | '\u1FBE' + | [\u1FC2-\u1FC4] + | [\u1FC6-\u1FCC] + | [\u1FD0-\u1FD3] + | [\u1FD6-\u1FDB] + | [\u1FE0-\u1FEC] + | [\u1FF2-\u1FF4] + | [\u1FF6-\u1FFC] + | '\u2071' + | '\u207F' + | [\u2090-\u2094] + | '\u2102' + | '\u2107' + | [\u210A-\u2113] + | '\u2115' + | '\u2118' + | [\u2119-\u211D] + | '\u2124' + | '\u2126' + | '\u2128' + | [\u212A-\u212D] + | '\u212E' + | [\u212F-\u2131] + | [\u2133-\u2134] + | [\u2135-\u2138] + | '\u2139' + | [\u213C-\u213F] + | [\u2145-\u2149] + | [\u2160-\u2183] + | [\u2C00-\u2C2E] + | [\u2C30-\u2C5E] + | [\u2C80-\u2CE4] + | [\u2D00-\u2D25] + | [\u2D30-\u2D65] + | '\u2D6F' + | [\u2D80-\u2D96] + | [\u2DA0-\u2DA6] + | [\u2DA8-\u2DAE] + | [\u2DB0-\u2DB6] + | [\u2DB8-\u2DBE] + | [\u2DC0-\u2DC6] + | [\u2DC8-\u2DCE] + | [\u2DD0-\u2DD6] + | [\u2DD8-\u2DDE] + | '\u3005' + | '\u3006' + | '\u3007' + | [\u3021-\u3029] + | [\u3031-\u3035] + | [\u3038-\u303A] + | '\u303B' + | '\u303C' + | [\u3041-\u3096] + | [\u309B-\u309C] + | [\u309D-\u309E] + | '\u309F' + | [\u30A1-\u30FA] + | [\u30FC-\u30FE] + | '\u30FF' + | [\u3105-\u312C] + | [\u3131-\u318E] + | [\u31A0-\u31B7] + | [\u31F0-\u31FF] + | [\u3400-\u4DB5] + | [\u4E00-\u9FBB] + | [\uA000-\uA014] + | '\uA015' + | [\uA016-\uA48C] + | [\uA800-\uA801] + | [\uA803-\uA805] + | [\uA807-\uA80A] + | [\uA80C-\uA822] + | [\uAC00-\uD7A3] + | [\uF900-\uFA2D] + | [\uFA30-\uFA6A] + | [\uFA70-\uFAD9] + | [\uFB00-\uFB06] + | [\uFB13-\uFB17] + | '\uFB1D' + | [\uFB1F-\uFB28] + | [\uFB2A-\uFB36] + | [\uFB38-\uFB3C] + | '\uFB3E' + | [\uFB40-\uFB41] + | [\uFB43-\uFB44] + | [\uFB46-\uFBB1] + | [\uFBD3-\uFD3D] + | [\uFD50-\uFD8F] + | [\uFD92-\uFDC7] + | [\uFDF0-\uFDFB] + | [\uFE70-\uFE74] + | [\uFE76-\uFEFC] + | [\uFF21-\uFF3A] + | [\uFF41-\uFF5A] + | [\uFF66-\uFF6F] + | '\uFF70' + | [\uFF71-\uFF9D] + | [\uFF9E-\uFF9F] + | [\uFFA0-\uFFBE] + | [\uFFC2-\uFFC7] + | [\uFFCA-\uFFCF] + | [\uFFD2-\uFFD7] + | [\uFFDA-\uFFDC] + ; diff --git a/src/main/antlr/PythonParser.g4 b/src/main/antlr/PythonParser.g4 new file mode 100644 index 00000000..d192bce3 --- /dev/null +++ b/src/main/antlr/PythonParser.g4 @@ -0,0 +1,386 @@ +/* +Python grammar. +The MIT License (MIT). +Copyright (c) 2014, Bart Kiers, bart@big-o.nl +Copyright (c) 2019, Dmitriy Litovchenko, Dmitry.Litovchenko1@yandex.ru, Positive Technologies +Copyright (c) 2019, Nikita Subbotin, sub.nik.and@gmail.com, Positive Technologies +Copyright (c) 2019, Ivan Kochurkin, kvanttt@gmail.com, Positive Technologies + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +parser grammar PythonParser; + +// Insert here @header for C++ parser. + +options { tokenVocab=PythonLexer; superClass=PythonParserBase; } + +root + : (single_input + | file_input + | eval_input)? EOF + ; + +// A single interactive statement; +single_input + : LINE_BREAK + | simple_stmt + | compound_stmt LINE_BREAK + ; + +// A module or sequence of commands read from an input file +file_input + : (LINE_BREAK | stmt)+ + ; + +// An input for the eval() and input() functions +eval_input + : testlist LINE_BREAK* + ; + +stmt + : simple_stmt + | compound_stmt + ; + +compound_stmt + : IF cond=test COLON suite elif_clause* else_clause? #if_stmt + | WHILE test COLON suite else_clause? #while_stmt + | ASYNC? FOR exprlist IN testlist COLON suite else_clause? #for_stmt + | TRY COLON suite (except_clause+ else_clause? finally_clause? | finally_clause) #try_stmt + | ASYNC? WITH with_item (COMMA with_item)* COLON suite #with_stmt + | decorator* (classdef | funcdef) #class_or_func_def_stmt + ; + +suite + : simple_stmt + | LINE_BREAK INDENT stmt+ DEDENT + ; + +decorator + : AT dotted_name (OPEN_PAREN arglist? CLOSE_PAREN)? LINE_BREAK + ; + +elif_clause + : ELIF test COLON suite + ; + +else_clause + : ELSE COLON suite + ; + +finally_clause + : FINALLY COLON suite + ; + +with_item + // NB compile.c makes sure that the default except clause is last + : test (AS expr)? + ; + +// Python 2 : EXCEPT test COMMA name +// Python 3 : EXCEPT test AS name +except_clause + : EXCEPT (test ({this.CheckVersion(2)}? COMMA name {this.SetVersion(2);} | {this.CheckVersion(3)}? AS name {this.SetVersion(3);})?)? COLON suite + ; + +classdef + : CLASS name (OPEN_PAREN arglist? CLOSE_PAREN)? COLON suite + ; + +funcdef + : ASYNC? DEF name OPEN_PAREN typedargslist? CLOSE_PAREN (ARROW test)? COLON suite + ; + +// python 3 paramters +// parameters list may have a trailing comma +typedargslist + : (def_parameters COMMA)? (args (COMMA def_parameters)? (COMMA kwargs)? | kwargs) COMMA? + | def_parameters COMMA? + ; + +args + : STAR named_parameter + ; + +kwargs + : POWER named_parameter + ; + +def_parameters + : def_parameter (COMMA def_parameter)* + ; + +// TODO: bare STAR parameter must follow named ones +def_parameter + : named_parameter (ASSIGN test)? + | STAR + ; + +named_parameter + : name (COLON test)? + ; + +simple_stmt + : small_stmt (SEMI_COLON small_stmt)* SEMI_COLON? (LINE_BREAK | EOF) + ; + +// TODO 1: left part augmented assignment should be `test` only, no stars or lists +// TODO 2: semantically annotated declaration is not an assignment +small_stmt + : testlist_star_expr assign_part? #expr_stmt + | {this.CheckVersion(2)}? PRINT ((test (COMMA test)* COMMA?) + | RIGHT_SHIFT test ((COMMA test)+ COMMA?)) {this.SetVersion(2);} #print_stmt // Python 2 + | DEL exprlist #del_stmt + | PASS #pass_stmt + | BREAK #break_stmt + | CONTINUE #continue_stmt + | RETURN testlist? #return_stmt + | RAISE (test (COMMA test (COMMA test)?)?)? (FROM test)? #raise_stmt + | yield_expr #yield_stmt + | IMPORT dotted_as_names #import_stmt + | FROM ((DOT | ELLIPSIS)* dotted_name | (DOT | ELLIPSIS)+) + IMPORT (STAR | OPEN_PAREN import_as_names CLOSE_PAREN | import_as_names) #from_stmt + | GLOBAL name (COMMA name)* #global_stmt + | {this.CheckVersion(2)}? EXEC expr (IN test (COMMA test)?)? {this.SetVersion(2);} #exec_stmt // Python 2 + | ASSERT test (COMMA test)? #assert_stmt + | {this.CheckVersion(3)}? NONLOCAL name (COMMA name)* {this.SetVersion(3);} #nonlocal_stmt // Python 3 + ; + +testlist_star_expr + : ((test | star_expr) COMMA)+ (test | star_expr)? + | testlist + ; + +star_expr + : STAR expr + ; + +assign_part + // if left expression in assign is bool literal, it's mean that is Python 2 here + : ASSIGN ( testlist_star_expr (ASSIGN testlist_star_expr)* (ASSIGN yield_expr)? + | yield_expr) + | {this.CheckVersion(3)}? COLON test (ASSIGN testlist)? {this.SetVersion(3);} // annassign Python3 rule + | op=( 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 + ) + (yield_expr | testlist) + ; + +exprlist + : expr (COMMA expr)* COMMA? + ; + +import_as_names + : import_as_name (COMMA import_as_name)* COMMA? + ; + +// TODO: that means we can use keyword True as the name here: `from foo import bar as True` -- no +import_as_name + : name (AS name)? + ; + +dotted_as_names + : dotted_as_name (COMMA dotted_as_name)* + ; + +dotted_as_name + : dotted_name (AS name)? + ; + +/* + * Warning! + * According to https://docs.python.org/3/reference/expressions.html#lambda LAMBDA should be followed by + * `parameter_list` (in our case it is `typedargslist`) + * But that's not true! `typedargslist` may have parameters with type hinting, but that's not permitted in lambda + * definition + */ +// https://docs.python.org/3/reference/expressions.html#operator-precedence +test + : logical_test (IF logical_test ELSE test)? + | LAMBDA varargslist? COLON test + ; + +// the same as `typedargslist`, but with no types +varargslist + : (vardef_parameters COMMA)? (varargs (COMMA vardef_parameters)? (COMMA varkwargs)? | varkwargs) COMMA? + | vardef_parameters COMMA? + ; + +vardef_parameters + : vardef_parameter (COMMA vardef_parameter)* + ; + +// TODO: bare STAR parameter must follow named ones +vardef_parameter + : name (ASSIGN test)? + | STAR + ; + +varargs + : STAR name + ; + +varkwargs + : POWER name + ; + +logical_test + : comparison + | NOT logical_test + | logical_test op=AND logical_test + | logical_test op=OR logical_test + ; + +comparison + : comparison (LESS_THAN | GREATER_THAN | EQUALS | GT_EQ | LT_EQ | NOT_EQ_1 | NOT_EQ_2 | optional=NOT? IN | IS optional=NOT?) comparison + | expr + ; + +expr + : AWAIT? atom trailer* + | expr op=POWER expr + | op=(ADD | MINUS | NOT_OP) expr + | expr op=(STAR | DIV | MOD | IDIV | AT) expr + | expr op=(ADD | MINUS) expr + | expr op=(LEFT_SHIFT | RIGHT_SHIFT) expr + | expr op=AND_OP expr + | expr op=XOR expr + | expr op=OR_OP expr + ; + +atom + : OPEN_PAREN (yield_expr | testlist_comp)? CLOSE_PAREN + | OPEN_BRACKET testlist_comp? CLOSE_BRACKET + | OPEN_BRACE dictorsetmaker? CLOSE_BRACE + | REVERSE_QUOTE testlist COMMA? REVERSE_QUOTE + | ELLIPSIS + | name + | PRINT + | EXEC + | MINUS? number + | NONE + | STRING+ + ; + +dictorsetmaker + : (test COLON test | POWER expr) (COMMA (test COLON test | POWER expr))* COMMA? // key_datum_list + | test COLON test comp_for // dict_comprehension + | testlist_comp + ; + +testlist_comp + : (test | star_expr) (comp_for | (COMMA (test | star_expr))* COMMA?) + ; + +testlist + : test (COMMA test)* COMMA? + ; + +dotted_name + : dotted_name DOT name + | name + ; + +name + : NAME + | TRUE + | FALSE + ; + +number + : integer + | IMAG_NUMBER + | FLOAT_NUMBER + ; + +integer + : DECIMAL_INTEGER + | OCT_INTEGER + | HEX_INTEGER + | BIN_INTEGER + ; + +yield_expr + : YIELD yield_arg? + ; + +yield_arg + : FROM test + | testlist + ; + +// TODO: this way we can pass: `f(x for x in i, a)`, but it's invalid. +// See: https://docs.python.org/3/reference/expressions.html#calls +trailer + : DOT name arguments? + | arguments + ; + +arguments + : OPEN_PAREN arglist? CLOSE_PAREN + | OPEN_BRACKET subscriptlist CLOSE_BRACKET + ; + +arglist + // The reason that keywords are test nodes instead of name is that using name + // results in an ambiguity. ast.c makes sure it's a name. + : argument (COMMA argument)* COMMA? + ; + +argument + : test (comp_for | ASSIGN test)? + | (POWER | STAR) test + ; + +// TODO: maybe inline? +subscriptlist + : subscript (COMMA subscript)* COMMA? + ; + +subscript + : ELLIPSIS + | test (COLON test? sliceop?)? + | COLON test? sliceop? + ; + +// TODO: maybe inline? +sliceop + : COLON test? + ; + +comp_for + : FOR exprlist IN logical_test comp_iter? + ; + +comp_iter + : comp_for + | IF test comp_iter? + ; diff --git a/src/main/antlr/TypeScriptLexer.g4 b/src/main/antlr/TypeScriptLexer.g4 new file mode 100644 index 00000000..3d71fe67 --- /dev/null +++ b/src/main/antlr/TypeScriptLexer.g4 @@ -0,0 +1,308 @@ +lexer grammar TypeScriptLexer; + +channels { ERROR } + +options { + superClass=TypeScriptLexerBase; +} + + +MultiLineComment: '/*' .*? '*/' -> channel(HIDDEN); +SingleLineComment: '//' ~[\r\n\u2028\u2029]* -> channel(HIDDEN); +RegularExpressionLiteral: '/' RegularExpressionFirstChar RegularExpressionChar* {this.IsRegexPossible()}? '/' IdentifierPart*; + +OpenBracket: '['; +CloseBracket: ']'; +OpenParen: '('; +CloseParen: ')'; +OpenBrace: '{' {this.ProcessOpenBrace();}; +TemplateCloseBrace: {this.IsInTemplateString()}? '}' -> popMode; +CloseBrace: '}' {this.ProcessCloseBrace();}; +SemiColon: ';'; +Comma: ','; +Assign: '='; +QuestionMark: '?'; +Colon: ':'; +Ellipsis: '...'; +Dot: '.'; +PlusPlus: '++'; +MinusMinus: '--'; +Plus: '+'; +Minus: '-'; +BitNot: '~'; +Not: '!'; +Multiply: '*'; +Divide: '/'; +Modulus: '%'; +RightShiftArithmetic: '>>'; +LeftShiftArithmetic: '<<'; +RightShiftLogical: '>>>'; +LessThan: '<'; +MoreThan: '>'; +LessThanEquals: '<='; +GreaterThanEquals: '>='; +Equals_: '=='; +NotEquals: '!='; +IdentityEquals: '==='; +IdentityNotEquals: '!=='; +BitAnd: '&'; +BitXOr: '^'; +BitOr: '|'; +And: '&&'; +Or: '||'; +MultiplyAssign: '*='; +DivideAssign: '/='; +ModulusAssign: '%='; +PlusAssign: '+='; +MinusAssign: '-='; +LeftShiftArithmeticAssign: '<<='; +RightShiftArithmeticAssign: '>>='; +RightShiftLogicalAssign: '>>>='; +BitAndAssign: '&='; +BitXorAssign: '^='; +BitOrAssign: '|='; +ARROW: '=>'; + +/// Null Literals + +NullLiteral: 'null'; + +/// Boolean Literals + +BooleanLiteral: 'true' + | 'false'; + +/// Numeric Literals + +DecimalLiteral: DecimalIntegerLiteral '.' [0-9]* ExponentPart? + | '.' [0-9]+ ExponentPart? + | DecimalIntegerLiteral ExponentPart? + ; + +/// Numeric Literals + +HexIntegerLiteral: '0' [xX] HexDigit+; +OctalIntegerLiteral: '0' [0-7]+ {!this.IsStrictMode()}?; +OctalIntegerLiteral2: '0' [oO] [0-7]+; +BinaryIntegerLiteral: '0' [bB] [01]+; + +/// Keywords + +Break: 'break'; +Do: 'do'; +Instanceof: 'instanceof'; +Typeof: 'typeof'; +Case: 'case'; +Else: 'else'; +New: 'new'; +Var: 'var'; +Catch: 'catch'; +Finally: 'finally'; +Return: 'return'; +Void: 'void'; +Continue: 'continue'; +For: 'for'; +Switch: 'switch'; +While: 'while'; +Debugger: 'debugger'; +Function_: 'function'; +This: 'this'; +With: 'with'; +Default: 'default'; +If: 'if'; +Throw: 'throw'; +Delete: 'delete'; +In: 'in'; +Try: 'try'; +As: 'as'; +From: 'from'; +ReadOnly: 'readonly'; +Async: 'async'; + +/// Future Reserved Words + +Class: 'class'; +Enum: 'enum'; +Extends: 'extends'; +Super: 'super'; +Const: 'const'; +Export: 'export'; +Import: 'import'; + +/// The following tokens are also considered to be FutureReservedWords +/// when parsing strict mode + +Implements: 'implements' ; +Let: 'let' ; +Private: 'private' ; +Public: 'public' ; +Interface: 'interface' ; +Package: 'package' ; +Protected: 'protected' ; +Static: 'static' ; +Yield: 'yield' ; + +//keywords: + +Any : 'any'; +Number: 'number'; +Boolean: 'boolean'; +String: 'string'; +Symbol: 'symbol'; + + +TypeAlias : 'type'; + +Get: 'get'; +Set: 'set'; + +Constructor: 'constructor'; +Namespace: 'namespace'; +Require: 'require'; +Module: 'module'; +Declare: 'declare'; + +Abstract: 'abstract'; + +Is: 'is'; + +// +// Ext.2 Additions to 1.8: Decorators +// +At: '@'; + +/// Identifier Names and Identifiers + +Identifier: IdentifierStart IdentifierPart*; + +/// String Literals +StringLiteral: ('"' DoubleStringCharacter* '"' + | '\'' SingleStringCharacter* '\'') {this.ProcessStringLiteral();} + ; + +BackTick: '`' {this.IncreaseTemplateDepth();} -> pushMode(TEMPLATE); + +WhiteSpaces: [\t\u000B\u000C\u0020\u00A0]+ -> channel(HIDDEN); + +LineTerminator: [\r\n\u2028\u2029] -> channel(HIDDEN); + +/// Comments + + +HtmlComment: '' -> channel(HIDDEN); +CDataComment: '' -> channel(HIDDEN); +UnexpectedCharacter: . -> channel(ERROR); + +mode TEMPLATE; + +TemplateStringEscapeAtom: '\\' .; +BackTickInside: '`' {this.DecreaseTemplateDepth();} -> type(BackTick), popMode; +TemplateStringStartExpression: '${' {this.StartTemplateString();} -> pushMode(DEFAULT_MODE); +TemplateStringAtom: ~[`\\]; + +// Fragment rules + +fragment DoubleStringCharacter + : ~["\\\r\n] + | '\\' EscapeSequence + | LineContinuation + ; + +fragment SingleStringCharacter + : ~['\\\r\n] + | '\\' EscapeSequence + | LineContinuation + ; + +fragment EscapeSequence + : CharacterEscapeSequence + | '0' // no digit ahead! TODO + | HexEscapeSequence + | UnicodeEscapeSequence + | ExtendedUnicodeEscapeSequence + ; + +fragment CharacterEscapeSequence + : SingleEscapeCharacter + | NonEscapeCharacter + ; + +fragment HexEscapeSequence + : 'x' HexDigit HexDigit + ; + +fragment UnicodeEscapeSequence + : 'u' HexDigit HexDigit HexDigit HexDigit + ; + +fragment ExtendedUnicodeEscapeSequence + : 'u' '{' HexDigit+ '}' + ; + +fragment SingleEscapeCharacter + : ['"\\bfnrtv] + ; + +fragment NonEscapeCharacter + : ~['"\\bfnrtv0-9xu\r\n] + ; + +fragment EscapeCharacter + : SingleEscapeCharacter + | [0-9] + | [xu] + ; + +fragment LineContinuation + : '\\' [\r\n\u2028\u2029] + ; + +fragment HexDigit + : [0-9a-fA-F] + ; + +fragment DecimalIntegerLiteral + : '0' + | [1-9] [0-9]* + ; + +fragment ExponentPart + : [eE] [+-]? [0-9]+ + ; + +fragment IdentifierPart + : IdentifierStart + | [\p{Mn}] + | [\p{Nd}] + | [\p{Pc}] + | '\u200C' + | '\u200D' + ; + +fragment IdentifierStart + : [\p{L}] + | [$_] + | '\\' UnicodeEscapeSequence + ; + +fragment RegularExpressionFirstChar + : ~[*\r\n\u2028\u2029\\/[] + | RegularExpressionBackslashSequence + | '[' RegularExpressionClassChar* ']' + ; + +fragment RegularExpressionChar + : ~[\r\n\u2028\u2029\\/[] + | RegularExpressionBackslashSequence + | '[' RegularExpressionClassChar* ']' + ; + +fragment RegularExpressionClassChar + : ~[\r\n\u2028\u2029\]\\] + | RegularExpressionBackslashSequence + ; + +fragment RegularExpressionBackslashSequence + : '\\' ~[\r\n\u2028\u2029] + ; + diff --git a/src/main/antlr/TypeScriptParser.g4 b/src/main/antlr/TypeScriptParser.g4 new file mode 100644 index 00000000..6e81b63e --- /dev/null +++ b/src/main/antlr/TypeScriptParser.g4 @@ -0,0 +1,854 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2014 by Bart Kiers (original author) and Alexandre Vitorelli (contributor -> ported to CSharp) + * Copyright (c) 2017 by Ivan Kochurkin (Positive Technologies): + added ECMAScript 6 support, cleared and transformed to the universal grammar. + * Copyright (c) 2018 by Juan Alvarez (contributor -> ported to Go) + * Copyright (c) 2019 by Andrii Artiushok (contributor -> added TypeScript support) + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ +parser grammar TypeScriptParser; + +options { + tokenVocab=TypeScriptLexer; + superClass=TypeScriptParserBase; +} + +// SupportSyntax + +initializer + : '=' singleExpression + ; + +bindingPattern + : (arrayLiteral | objectLiteral) + ; + +// TypeScript SPart +// A.1 Types + +typeParameters + : '<' typeParameterList? '>' + ; + +typeParameterList + : typeParameter (',' typeParameter)* + ; + +typeParameter + : Identifier constraint? + | typeParameters + ; + +constraint + : 'extends' type_ + ; + +typeArguments + : '<' typeArgumentList? '>' + ; + +typeArgumentList + : typeArgument (',' typeArgument)* + ; + +typeArgument + : type_ + ; + +type_ + : unionOrIntersectionOrPrimaryType + | functionType + | constructorType + | typeGeneric + | StringLiteral + ; + +unionOrIntersectionOrPrimaryType + : unionOrIntersectionOrPrimaryType '|' unionOrIntersectionOrPrimaryType #Union + | unionOrIntersectionOrPrimaryType '&' unionOrIntersectionOrPrimaryType #Intersection + | primaryType #Primary + ; + +primaryType + : '(' type_ ')' #ParenthesizedPrimType + | predefinedType #PredefinedPrimType + | typeReference #ReferencePrimType + | objectType #ObjectPrimType + | primaryType {notLineTerminator()}? '[' ']' #ArrayPrimType + | '[' tupleElementTypes ']' #TuplePrimType + | typeQuery #QueryPrimType + | This #ThisPrimType + | typeReference Is primaryType #RedefinitionOfType + ; + +predefinedType + : Any + | Number + | Boolean + | String + | Symbol + | Void + ; + +typeReference + : typeName nestedTypeGeneric? + ; + +nestedTypeGeneric + : typeIncludeGeneric + | typeGeneric + ; + +// I tried recursive include, but it's not working. +// typeGeneric +// : '<' typeArgumentList typeGeneric?'>' +// ; +// +// TODO: Fix recursive +// +typeGeneric + : '<' typeArgumentList '>' + ; + +typeIncludeGeneric + :'<' typeArgumentList '<' typeArgumentList ('>' bindingPattern '>' | '>>') + ; + +typeName + : Identifier + | namespaceName + ; + +objectType + : '{' typeBody? '}' + ; + +typeBody + : typeMemberList (SemiColon | ',')? + ; + +typeMemberList + : typeMember ((SemiColon | ',') typeMember)* + ; + +typeMember + : propertySignatur + | callSignature + | constructSignature + | indexSignature + | methodSignature ('=>' type_)? + ; + +arrayType + : primaryType {notLineTerminator()}? '[' ']' + ; + +tupleType + : '[' tupleElementTypes ']' + ; + +tupleElementTypes + : type_ (',' type_)* + ; + +functionType + : typeParameters? '(' parameterList? ')' '=>' type_ + ; + +constructorType + : 'new' typeParameters? '(' parameterList? ')' '=>' type_ + ; + +typeQuery + : 'typeof' typeQueryExpression + ; + +typeQueryExpression + : Identifier + | (identifierName '.')+ identifierName + ; + +propertySignatur + : ReadOnly? propertyName '?'? typeAnnotation? ('=>' type_)? + ; + +typeAnnotation + : ':' type_ + ; + +callSignature + : typeParameters? '(' parameterList? ')' typeAnnotation? + ; + +parameterList + : restParameter + | parameter (',' parameter)* (',' restParameter)? + ; + +requiredParameterList + : requiredParameter (',' requiredParameter)* + ; + +parameter + : requiredParameter + | optionalParameter + ; + +optionalParameter + : decoratorList? ( accessibilityModifier? identifierOrPattern ('?' typeAnnotation? | typeAnnotation? initializer)) + ; + +restParameter + : '...' singleExpression typeAnnotation? + ; + +requiredParameter + : decoratorList? accessibilityModifier? identifierOrPattern typeAnnotation? + ; + +accessibilityModifier + : Public + | Private + | Protected + ; + +identifierOrPattern + : identifierName + | bindingPattern + ; + +constructSignature + : 'new' typeParameters? '(' parameterList? ')' typeAnnotation? + ; + +indexSignature + : '[' Identifier ':' (Number|String) ']' typeAnnotation + ; + +methodSignature + : propertyName '?'? callSignature + ; + +typeAliasDeclaration + : 'type' Identifier typeParameters? '=' type_ SemiColon + ; + +constructorDeclaration + : accessibilityModifier? Constructor '(' formalParameterList? ')' ( ('{' functionBody '}') | SemiColon)? + ; + +// A.5 Interface + +interfaceDeclaration + : Export? Declare? Interface Identifier typeParameters? interfaceExtendsClause? objectType SemiColon? + ; + +interfaceExtendsClause + : Extends classOrInterfaceTypeList + ; + +classOrInterfaceTypeList + : typeReference (',' typeReference)* + ; + +// A.7 Interface + +enumDeclaration + : Const? Enum Identifier '{' enumBody? '}' + ; + +enumBody + : enumMemberList ','? + ; + +enumMemberList + : enumMember (',' enumMember)* + ; + +enumMember + : propertyName ('=' singleExpression)? + ; + +// A.8 Namespaces + +namespaceDeclaration + : Namespace namespaceName '{' statementList? '}' + ; + +namespaceName + : Identifier ('.'+ Identifier)* + ; + +importAliasDeclaration + : Identifier '=' namespaceName SemiColon + ; + +// Ext.2 Additions to 1.8: Decorators + +decoratorList + : decorator+ ; + +decorator + : '@' (decoratorMemberExpression | decoratorCallExpression) + ; + +decoratorMemberExpression + : Identifier + | decoratorMemberExpression '.' identifierName + | '(' singleExpression ')' + ; + +decoratorCallExpression + : decoratorMemberExpression arguments; + +// ECMAPart +program + : sourceElements? EOF + ; + +sourceElement + : Export? statement + ; + +statement + : block + | importStatement + | exportStatement + | emptyStatement_ + | abstractDeclaration //ADDED + | classDeclaration + | interfaceDeclaration //ADDED + | namespaceDeclaration //ADDED + | ifStatement + | iterationStatement + | continueStatement + | breakStatement + | returnStatement + | yieldStatement + | withStatement + | labelledStatement + | switchStatement + | throwStatement + | tryStatement + | debuggerStatement + | functionDeclaration + | arrowFunctionDeclaration + | generatorFunctionDeclaration + | variableStatement + | typeAliasDeclaration //ADDED + | enumDeclaration //ADDED + | expressionStatement + | Export statement + ; + +block + : '{' statementList? '}' + ; + +statementList + : statement+ + ; + +abstractDeclaration + : Abstract (Identifier callSignature | variableStatement) eos + ; + +importStatement + : Import (fromBlock | importAliasDeclaration) + ; + +fromBlock + : (Multiply | multipleImportStatement) (As identifierName)? From StringLiteral eos + ; + +multipleImportStatement + : (identifierName ',')? '{' identifierName (',' identifierName)* '}' + ; + +exportStatement + : Export Default? (fromBlock | statement) + ; + +variableStatement + : bindingPattern typeAnnotation? initializer SemiColon? + | accessibilityModifier? varModifier? ReadOnly? variableDeclarationList SemiColon? + | Declare varModifier? variableDeclarationList SemiColon? + ; + +variableDeclarationList + : variableDeclaration (',' variableDeclaration)* + ; + +variableDeclaration + : ( identifierOrKeyWord | arrayLiteral | objectLiteral) typeAnnotation? singleExpression? ('=' typeParameters? singleExpression)? // ECMAScript 6: Array & Object Matching + ; + +emptyStatement_ + : SemiColon + ; + +expressionStatement + : {this.notOpenBraceAndNotFunction()}? expressionSequence SemiColon? + ; + +ifStatement + : If '(' expressionSequence ')' statement (Else statement)? + ; + + +iterationStatement + : Do statement While '(' expressionSequence ')' eos # DoStatement + | While '(' expressionSequence ')' statement # WhileStatement + | For '(' expressionSequence? SemiColon expressionSequence? SemiColon expressionSequence? ')' statement # ForStatement + | For '(' varModifier variableDeclarationList SemiColon expressionSequence? SemiColon expressionSequence? ')' + statement # ForVarStatement + | For '(' singleExpression (In | Identifier{this.p("of")}?) expressionSequence ')' statement # ForInStatement + | For '(' varModifier variableDeclaration (In | Identifier{this.p("of")}?) expressionSequence ')' statement # ForVarInStatement + ; + +varModifier + : Var + | Let + | Const + ; + +continueStatement + : Continue ({this.notLineTerminator()}? Identifier)? eos + ; + +breakStatement + : Break ({this.notLineTerminator()}? Identifier)? eos + ; + +returnStatement + : Return ({this.notLineTerminator()}? expressionSequence)? eos + ; + +yieldStatement + : Yield ({this.notLineTerminator()}? expressionSequence)? eos + ; + +withStatement + : With '(' expressionSequence ')' statement + ; + +switchStatement + : Switch '(' expressionSequence ')' caseBlock + ; + +caseBlock + : '{' caseClauses? (defaultClause caseClauses?)? '}' + ; + +caseClauses + : caseClause+ + ; + +caseClause + : Case expressionSequence ':' statementList? + ; + +defaultClause + : Default ':' statementList? + ; + +labelledStatement + : Identifier ':' statement + ; + +throwStatement + : Throw {this.notLineTerminator()}? expressionSequence eos + ; + +tryStatement + : Try block (catchProduction finallyProduction? | finallyProduction) + ; + +catchProduction + : Catch '(' Identifier ')' block + ; + +finallyProduction + : Finally block + ; + +debuggerStatement + : Debugger eos + ; + +functionDeclaration + : Function_ Identifier callSignature ( ('{' functionBody '}') | SemiColon) + ; + +//Ovveride ECMA +classDeclaration + : decoratorList? (Export Default?)? Abstract? Class Identifier typeParameters? classHeritage classTail + ; + +classHeritage + : classExtendsClause? implementsClause? + ; + +classTail + : '{' classElement* '}' + ; + +classExtendsClause + : Extends typeReference + ; + +implementsClause + : Implements classOrInterfaceTypeList + ; + +// Classes modified +classElement + : constructorDeclaration + | decoratorList? propertyMemberDeclaration + | indexMemberDeclaration + | statement + ; + +propertyMemberDeclaration + : propertyMemberBase propertyName '?'? typeAnnotation? initializer? SemiColon # PropertyDeclarationExpression + | propertyMemberBase propertyName callSignature ( ('{' functionBody '}') | SemiColon) # MethodDeclarationExpression + | propertyMemberBase (getAccessor | setAccessor) # GetterSetterDeclarationExpression + | abstractDeclaration # AbstractMemberDeclaration + ; + +propertyMemberBase + : accessibilityModifier? Async? Static? ReadOnly? + ; + +indexMemberDeclaration + : indexSignature SemiColon + ; + +generatorMethod + : '*'? Identifier '(' formalParameterList? ')' '{' functionBody '}' + ; + +generatorFunctionDeclaration + : Function_ '*' Identifier? '(' formalParameterList? ')' '{' functionBody '}' + ; + +generatorBlock + : '{' generatorDefinition (',' generatorDefinition)* ','? '}' + ; + +generatorDefinition + : '*' iteratorDefinition + ; + +iteratorBlock + : '{' iteratorDefinition (',' iteratorDefinition)* ','? '}' + ; + +iteratorDefinition + : '[' singleExpression ']' '(' formalParameterList? ')' '{' functionBody '}' + ; + +formalParameterList + : formalParameterArg (',' formalParameterArg)* (',' lastFormalParameterArg)? + | lastFormalParameterArg + | arrayLiteral // ECMAScript 6: Parameter Context Matching + | objectLiteral (':' formalParameterList)? // ECMAScript 6: Parameter Context Matching + ; + +formalParameterArg + : decorator? accessibilityModifier? identifierOrKeyWord '?'? typeAnnotation? ('=' singleExpression)? // ECMAScript 6: Initialization + ; + +lastFormalParameterArg // ECMAScript 6: Rest Parameter + : Ellipsis Identifier typeAnnotation? + ; + +functionBody + : sourceElements? + ; + +sourceElements + : sourceElement+ + ; + +arrayLiteral + : ('[' elementList? ']') + ; + +elementList + : arrayElement (','+ arrayElement)* + ; + +arrayElement // ECMAScript 6: Spread Operator + : Ellipsis? (singleExpression | Identifier) ','? + ; + +objectLiteral + : '{' (propertyAssignment (',' propertyAssignment)* ','?)? '}' + ; + +// MODIFIED +propertyAssignment + : propertyName (':' |'=') singleExpression # PropertyExpressionAssignment + | '[' singleExpression ']' ':' singleExpression # ComputedPropertyExpressionAssignment + | getAccessor # PropertyGetter + | setAccessor # PropertySetter + | generatorMethod # MethodProperty + | identifierOrKeyWord # PropertyShorthand + | restParameter # RestParameterInObject + ; + +getAccessor + : getter '(' ')' typeAnnotation? '{' functionBody '}' + ; + +setAccessor + : setter '(' ( Identifier | bindingPattern) typeAnnotation? ')' '{' functionBody '}' + ; + +propertyName + : identifierName + | StringLiteral + | numericLiteral + ; + +arguments + : '(' (argumentList ','?)? ')' + ; + +argumentList + : argument (',' argument)* + ; + +argument // ECMAScript 6: Spread Operator + : Ellipsis? (singleExpression | Identifier) + ; + +expressionSequence + : singleExpression (',' singleExpression)* + ; + +functionExpressionDeclaration + : Function_ Identifier? '(' formalParameterList? ')' typeAnnotation? '{' functionBody '}' + ; + +singleExpression + : functionExpressionDeclaration # FunctionExpression + | arrowFunctionDeclaration # ArrowFunctionExpression // ECMAScript 6 + | singleExpression '[' expressionSequence ']' # MemberIndexExpression + | singleExpression '!'? '.' identifierName nestedTypeGeneric? # MemberDotExpression + // Split to try `new Date()` first, then `new Date`. + | New singleExpression typeArguments? arguments # NewExpression + | New singleExpression typeArguments? # NewExpression + | singleExpression arguments # ArgumentsExpression + | singleExpression {this.notLineTerminator()}? '++' # PostIncrementExpression + | singleExpression {this.notLineTerminator()}? '--' # PostDecreaseExpression + | Delete singleExpression # DeleteExpression + | Void singleExpression # VoidExpression + | Typeof singleExpression # TypeofExpression + | '++' singleExpression # PreIncrementExpression + | '--' singleExpression # PreDecreaseExpression + | '+' singleExpression # UnaryPlusExpression + | '-' singleExpression # UnaryMinusExpression + | '~' singleExpression # BitNotExpression + | '!' singleExpression # NotExpression + | singleExpression ('*' | '/' | '%') singleExpression # MultiplicativeExpression + | singleExpression ('+' | '-') singleExpression # AdditiveExpression + | singleExpression ('<<' | '>>' | '>>>') singleExpression # BitShiftExpression + | singleExpression ('<' | '>' | '<=' | '>=') singleExpression # RelationalExpression + | singleExpression Instanceof singleExpression # InstanceofExpression + | singleExpression In singleExpression # InExpression + | singleExpression ('==' | '!=' | '===' | '!==') singleExpression # EqualityExpression + | singleExpression '&' singleExpression # BitAndExpression + | singleExpression '^' singleExpression # BitXOrExpression + | singleExpression '|' singleExpression # BitOrExpression + | singleExpression '&&' singleExpression # LogicalAndExpression + | singleExpression '||' singleExpression # LogicalOrExpression + | singleExpression '?' singleExpression ':' singleExpression # TernaryExpression + | singleExpression '=' singleExpression # AssignmentExpression + | singleExpression assignmentOperator singleExpression # AssignmentOperatorExpression + | singleExpression templateStringLiteral # TemplateStringExpression // ECMAScript 6 + | iteratorBlock # IteratorsExpression // ECMAScript 6 + | generatorBlock # GeneratorsExpression // ECMAScript 6 + | generatorFunctionDeclaration # GeneratorsFunctionExpression // ECMAScript 6 + | yieldStatement # YieldExpression // ECMAScript 6 + | This # ThisExpression + | identifierName singleExpression? # IdentifierExpression + | Super # SuperExpression + | literal # LiteralExpression + | arrayLiteral # ArrayLiteralExpression + | objectLiteral # ObjectLiteralExpression + | '(' expressionSequence ')' # ParenthesizedExpression + | typeArguments expressionSequence? # GenericTypes + | singleExpression As asExpression # CastAsExpression + ; + +asExpression + : predefinedType ('[' ']')? + | singleExpression + ; + +arrowFunctionDeclaration + : Async? arrowFunctionParameters typeAnnotation? '=>' arrowFunctionBody + ; + +arrowFunctionParameters + : Identifier + | '(' formalParameterList? ')' + ; + +arrowFunctionBody + : singleExpression + | '{' functionBody '}' + ; + +assignmentOperator + : '*=' + | '/=' + | '%=' + | '+=' + | '-=' + | '<<=' + | '>>=' + | '>>>=' + | '&=' + | '^=' + | '|=' + ; + +literal + : NullLiteral + | BooleanLiteral + | StringLiteral + | templateStringLiteral + | RegularExpressionLiteral + | numericLiteral + ; + +templateStringLiteral + : BackTick templateStringAtom* BackTick + ; + +templateStringAtom + : TemplateStringAtom + | TemplateStringStartExpression singleExpression TemplateCloseBrace + | TemplateStringEscapeAtom + ; + +numericLiteral + : DecimalLiteral + | HexIntegerLiteral + | OctalIntegerLiteral + | OctalIntegerLiteral2 + | BinaryIntegerLiteral + ; + +identifierName + : Identifier + | reservedWord + ; + +identifierOrKeyWord + : Identifier + | TypeAlias + | Require + ; + +reservedWord + : keyword + | NullLiteral + | BooleanLiteral + ; + +keyword + : Break + | Do + | Instanceof + | Typeof + | Case + | Else + | New + | Var + | Catch + | Finally + | Return + | Void + | Continue + | For + | Switch + | While + | Debugger + | Function_ + | This + | With + | Default + | If + | Throw + | Delete + | In + | Try + | ReadOnly + | Async + | From + | Class + | Enum + | Extends + | Super + | Const + | Export + | Import + | Implements + | Let + | Private + | Public + | Interface + | Package + | Protected + | Static + | Yield + | Get + | Set + | Require + | TypeAlias + | String + | Boolean + | Number + | Module + ; + +getter + : Get propertyName + ; + +setter + : Set propertyName + ; + +eos + : SemiColon + | EOF + | {this.lineTerminatorAhead()}? + | {this.closeBrace()}? + ; diff --git a/src/main/antlr/UnicodeClasses.g4 b/src/main/antlr/UnicodeClasses.g4 new file mode 100644 index 00000000..14d1caeb --- /dev/null +++ b/src/main/antlr/UnicodeClasses.g4 @@ -0,0 +1,1647 @@ +/** + * Taken from http://www.antlr3.org/grammar/1345144569663/AntlrUnicode.txt + */ + +lexer grammar UnicodeClasses; + +UNICODE_CLASS_LL: + '\u0061'..'\u007A' | + '\u00B5' | + '\u00DF'..'\u00F6' | + '\u00F8'..'\u00FF' | + '\u0101' | + '\u0103' | + '\u0105' | + '\u0107' | + '\u0109' | + '\u010B' | + '\u010D' | + '\u010F' | + '\u0111' | + '\u0113' | + '\u0115' | + '\u0117' | + '\u0119' | + '\u011B' | + '\u011D' | + '\u011F' | + '\u0121' | + '\u0123' | + '\u0125' | + '\u0127' | + '\u0129' | + '\u012B' | + '\u012D' | + '\u012F' | + '\u0131' | + '\u0133' | + '\u0135' | + '\u0137' | + '\u0138' | + '\u013A' | + '\u013C' | + '\u013E' | + '\u0140' | + '\u0142' | + '\u0144' | + '\u0146' | + '\u0148' | + '\u0149' | + '\u014B' | + '\u014D' | + '\u014F' | + '\u0151' | + '\u0153' | + '\u0155' | + '\u0157' | + '\u0159' | + '\u015B' | + '\u015D' | + '\u015F' | + '\u0161' | + '\u0163' | + '\u0165' | + '\u0167' | + '\u0169' | + '\u016B' | + '\u016D' | + '\u016F' | + '\u0171' | + '\u0173' | + '\u0175' | + '\u0177' | + '\u017A' | + '\u017C' | + '\u017E'..'\u0180' | + '\u0183' | + '\u0185' | + '\u0188' | + '\u018C' | + '\u018D' | + '\u0192' | + '\u0195' | + '\u0199'..'\u019B' | + '\u019E' | + '\u01A1' | + '\u01A3' | + '\u01A5' | + '\u01A8' | + '\u01AA' | + '\u01AB' | + '\u01AD' | + '\u01B0' | + '\u01B4' | + '\u01B6' | + '\u01B9' | + '\u01BA' | + '\u01BD'..'\u01BF' | + '\u01C6' | + '\u01C9' | + '\u01CC' | + '\u01CE' | + '\u01D0' | + '\u01D2' | + '\u01D4' | + '\u01D6' | + '\u01D8' | + '\u01DA' | + '\u01DC' | + '\u01DD' | + '\u01DF' | + '\u01E1' | + '\u01E3' | + '\u01E5' | + '\u01E7' | + '\u01E9' | + '\u01EB' | + '\u01ED' | + '\u01EF' | + '\u01F0' | + '\u01F3' | + '\u01F5' | + '\u01F9' | + '\u01FB' | + '\u01FD' | + '\u01FF' | + '\u0201' | + '\u0203' | + '\u0205' | + '\u0207' | + '\u0209' | + '\u020B' | + '\u020D' | + '\u020F' | + '\u0211' | + '\u0213' | + '\u0215' | + '\u0217' | + '\u0219' | + '\u021B' | + '\u021D' | + '\u021F' | + '\u0221' | + '\u0223' | + '\u0225' | + '\u0227' | + '\u0229' | + '\u022B' | + '\u022D' | + '\u022F' | + '\u0231' | + '\u0233'..'\u0239' | + '\u023C' | + '\u023F' | + '\u0240' | + '\u0242' | + '\u0247' | + '\u0249' | + '\u024B' | + '\u024D' | + '\u024F'..'\u0293' | + '\u0295'..'\u02AF' | + '\u0371' | + '\u0373' | + '\u0377' | + '\u037B'..'\u037D' | + '\u0390' | + '\u03AC'..'\u03CE' | + '\u03D0' | + '\u03D1' | + '\u03D5'..'\u03D7' | + '\u03D9' | + '\u03DB' | + '\u03DD' | + '\u03DF' | + '\u03E1' | + '\u03E3' | + '\u03E5' | + '\u03E7' | + '\u03E9' | + '\u03EB' | + '\u03ED' | + '\u03EF'..'\u03F3' | + '\u03F5' | + '\u03F8' | + '\u03FB' | + '\u03FC' | + '\u0430'..'\u045F' | + '\u0461' | + '\u0463' | + '\u0465' | + '\u0467' | + '\u0469' | + '\u046B' | + '\u046D' | + '\u046F' | + '\u0471' | + '\u0473' | + '\u0475' | + '\u0477' | + '\u0479' | + '\u047B' | + '\u047D' | + '\u047F' | + '\u0481' | + '\u048B' | + '\u048D' | + '\u048F' | + '\u0491' | + '\u0493' | + '\u0495' | + '\u0497' | + '\u0499' | + '\u049B' | + '\u049D' | + '\u049F' | + '\u04A1' | + '\u04A3' | + '\u04A5' | + '\u04A7' | + '\u04A9' | + '\u04AB' | + '\u04AD' | + '\u04AF' | + '\u04B1' | + '\u04B3' | + '\u04B5' | + '\u04B7' | + '\u04B9' | + '\u04BB' | + '\u04BD' | + '\u04BF' | + '\u04C2' | + '\u04C4' | + '\u04C6' | + '\u04C8' | + '\u04CA' | + '\u04CC' | + '\u04CE' | + '\u04CF' | + '\u04D1' | + '\u04D3' | + '\u04D5' | + '\u04D7' | + '\u04D9' | + '\u04DB' | + '\u04DD' | + '\u04DF' | + '\u04E1' | + '\u04E3' | + '\u04E5' | + '\u04E7' | + '\u04E9' | + '\u04EB' | + '\u04ED' | + '\u04EF' | + '\u04F1' | + '\u04F3' | + '\u04F5' | + '\u04F7' | + '\u04F9' | + '\u04FB' | + '\u04FD' | + '\u04FF' | + '\u0501' | + '\u0503' | + '\u0505' | + '\u0507' | + '\u0509' | + '\u050B' | + '\u050D' | + '\u050F' | + '\u0511' | + '\u0513' | + '\u0515' | + '\u0517' | + '\u0519' | + '\u051B' | + '\u051D' | + '\u051F' | + '\u0521' | + '\u0523' | + '\u0525' | + '\u0527' | + '\u0561'..'\u0587' | + '\u1D00'..'\u1D2B' | + '\u1D6B'..'\u1D77' | + '\u1D79'..'\u1D9A' | + '\u1E01' | + '\u1E03' | + '\u1E05' | + '\u1E07' | + '\u1E09' | + '\u1E0B' | + '\u1E0D' | + '\u1E0F' | + '\u1E11' | + '\u1E13' | + '\u1E15' | + '\u1E17' | + '\u1E19' | + '\u1E1B' | + '\u1E1D' | + '\u1E1F' | + '\u1E21' | + '\u1E23' | + '\u1E25' | + '\u1E27' | + '\u1E29' | + '\u1E2B' | + '\u1E2D' | + '\u1E2F' | + '\u1E31' | + '\u1E33' | + '\u1E35' | + '\u1E37' | + '\u1E39' | + '\u1E3B' | + '\u1E3D' | + '\u1E3F' | + '\u1E41' | + '\u1E43' | + '\u1E45' | + '\u1E47' | + '\u1E49' | + '\u1E4B' | + '\u1E4D' | + '\u1E4F' | + '\u1E51' | + '\u1E53' | + '\u1E55' | + '\u1E57' | + '\u1E59' | + '\u1E5B' | + '\u1E5D' | + '\u1E5F' | + '\u1E61' | + '\u1E63' | + '\u1E65' | + '\u1E67' | + '\u1E69' | + '\u1E6B' | + '\u1E6D' | + '\u1E6F' | + '\u1E71' | + '\u1E73' | + '\u1E75' | + '\u1E77' | + '\u1E79' | + '\u1E7B' | + '\u1E7D' | + '\u1E7F' | + '\u1E81' | + '\u1E83' | + '\u1E85' | + '\u1E87' | + '\u1E89' | + '\u1E8B' | + '\u1E8D' | + '\u1E8F' | + '\u1E91' | + '\u1E93' | + '\u1E95'..'\u1E9D' | + '\u1E9F' | + '\u1EA1' | + '\u1EA3' | + '\u1EA5' | + '\u1EA7' | + '\u1EA9' | + '\u1EAB' | + '\u1EAD' | + '\u1EAF' | + '\u1EB1' | + '\u1EB3' | + '\u1EB5' | + '\u1EB7' | + '\u1EB9' | + '\u1EBB' | + '\u1EBD' | + '\u1EBF' | + '\u1EC1' | + '\u1EC3' | + '\u1EC5' | + '\u1EC7' | + '\u1EC9' | + '\u1ECB' | + '\u1ECD' | + '\u1ECF' | + '\u1ED1' | + '\u1ED3' | + '\u1ED5' | + '\u1ED7' | + '\u1ED9' | + '\u1EDB' | + '\u1EDD' | + '\u1EDF' | + '\u1EE1' | + '\u1EE3' | + '\u1EE5' | + '\u1EE7' | + '\u1EE9' | + '\u1EEB' | + '\u1EED' | + '\u1EEF' | + '\u1EF1' | + '\u1EF3' | + '\u1EF5' | + '\u1EF7' | + '\u1EF9' | + '\u1EFB' | + '\u1EFD' | + '\u1EFF'..'\u1F07' | + '\u1F10'..'\u1F15' | + '\u1F20'..'\u1F27' | + '\u1F30'..'\u1F37' | + '\u1F40'..'\u1F45' | + '\u1F50'..'\u1F57' | + '\u1F60'..'\u1F67' | + '\u1F70'..'\u1F7D' | + '\u1F80'..'\u1F87' | + '\u1F90'..'\u1F97' | + '\u1FA0'..'\u1FA7' | + '\u1FB0'..'\u1FB4' | + '\u1FB6' | + '\u1FB7' | + '\u1FBE' | + '\u1FC2'..'\u1FC4' | + '\u1FC6' | + '\u1FC7' | + '\u1FD0'..'\u1FD3' | + '\u1FD6' | + '\u1FD7' | + '\u1FE0'..'\u1FE7' | + '\u1FF2'..'\u1FF4' | + '\u1FF6' | + '\u1FF7' | + '\u210A' | + '\u210E' | + '\u210F' | + '\u2113' | + '\u212F' | + '\u2134' | + '\u2139' | + '\u213C' | + '\u213D' | + '\u2146'..'\u2149' | + '\u214E' | + '\u2184' | + '\u2C30'..'\u2C5E' | + '\u2C61' | + '\u2C65' | + '\u2C66' | + '\u2C68' | + '\u2C6A' | + '\u2C6C' | + '\u2C71' | + '\u2C73' | + '\u2C74' | + '\u2C76'..'\u2C7B' | + '\u2C81' | + '\u2C83' | + '\u2C85' | + '\u2C87' | + '\u2C89' | + '\u2C8B' | + '\u2C8D' | + '\u2C8F' | + '\u2C91' | + '\u2C93' | + '\u2C95' | + '\u2C97' | + '\u2C99' | + '\u2C9B' | + '\u2C9D' | + '\u2C9F' | + '\u2CA1' | + '\u2CA3' | + '\u2CA5' | + '\u2CA7' | + '\u2CA9' | + '\u2CAB' | + '\u2CAD' | + '\u2CAF' | + '\u2CB1' | + '\u2CB3' | + '\u2CB5' | + '\u2CB7' | + '\u2CB9' | + '\u2CBB' | + '\u2CBD' | + '\u2CBF' | + '\u2CC1' | + '\u2CC3' | + '\u2CC5' | + '\u2CC7' | + '\u2CC9' | + '\u2CCB' | + '\u2CCD' | + '\u2CCF' | + '\u2CD1' | + '\u2CD3' | + '\u2CD5' | + '\u2CD7' | + '\u2CD9' | + '\u2CDB' | + '\u2CDD' | + '\u2CDF' | + '\u2CE1' | + '\u2CE3' | + '\u2CE4' | + '\u2CEC' | + '\u2CEE' | + '\u2CF3' | + '\u2D00'..'\u2D25' | + '\u2D27' | + '\u2D2D' | + '\uA641' | + '\uA643' | + '\uA645' | + '\uA647' | + '\uA649' | + '\uA64B' | + '\uA64D' | + '\uA64F' | + '\uA651' | + '\uA653' | + '\uA655' | + '\uA657' | + '\uA659' | + '\uA65B' | + '\uA65D' | + '\uA65F' | + '\uA661' | + '\uA663' | + '\uA665' | + '\uA667' | + '\uA669' | + '\uA66B' | + '\uA66D' | + '\uA681' | + '\uA683' | + '\uA685' | + '\uA687' | + '\uA689' | + '\uA68B' | + '\uA68D' | + '\uA68F' | + '\uA691' | + '\uA693' | + '\uA695' | + '\uA697' | + '\uA723' | + '\uA725' | + '\uA727' | + '\uA729' | + '\uA72B' | + '\uA72D' | + '\uA72F'..'\uA731' | + '\uA733' | + '\uA735' | + '\uA737' | + '\uA739' | + '\uA73B' | + '\uA73D' | + '\uA73F' | + '\uA741' | + '\uA743' | + '\uA745' | + '\uA747' | + '\uA749' | + '\uA74B' | + '\uA74D' | + '\uA74F' | + '\uA751' | + '\uA753' | + '\uA755' | + '\uA757' | + '\uA759' | + '\uA75B' | + '\uA75D' | + '\uA75F' | + '\uA761' | + '\uA763' | + '\uA765' | + '\uA767' | + '\uA769' | + '\uA76B' | + '\uA76D' | + '\uA76F' | + '\uA771'..'\uA778' | + '\uA77A' | + '\uA77C' | + '\uA77F' | + '\uA781' | + '\uA783' | + '\uA785' | + '\uA787' | + '\uA78C' | + '\uA78E' | + '\uA791' | + '\uA793' | + '\uA7A1' | + '\uA7A3' | + '\uA7A5' | + '\uA7A7' | + '\uA7A9' | + '\uA7FA' | + '\uFB00'..'\uFB06' | + '\uFB13'..'\uFB17' | + '\uFF41'..'\uFF5A'; + +UNICODE_CLASS_LM: + '\u02B0'..'\u02C1' | + '\u02C6'..'\u02D1' | + '\u02E0'..'\u02E4' | + '\u02EC' | + '\u02EE' | + '\u0374' | + '\u037A' | + '\u0559' | + '\u0640' | + '\u06E5' | + '\u06E6' | + '\u07F4' | + '\u07F5' | + '\u07FA' | + '\u081A' | + '\u0824' | + '\u0828' | + '\u0971' | + '\u0E46' | + '\u0EC6' | + '\u10FC' | + '\u17D7' | + '\u1843' | + '\u1AA7' | + '\u1C78'..'\u1C7D' | + '\u1D2C'..'\u1D6A' | + '\u1D78' | + '\u1D9B'..'\u1DBF' | + '\u2071' | + '\u207F' | + '\u2090'..'\u209C' | + '\u2C7C' | + '\u2C7D' | + '\u2D6F' | + '\u2E2F' | + '\u3005' | + '\u3031'..'\u3035' | + '\u303B' | + '\u309D' | + '\u309E' | + '\u30FC'..'\u30FE' | + '\uA015' | + '\uA4F8'..'\uA4FD' | + '\uA60C' | + '\uA67F' | + '\uA717'..'\uA71F' | + '\uA770' | + '\uA788' | + '\uA7F8' | + '\uA7F9' | + '\uA9CF' | + '\uAA70' | + '\uAADD' | + '\uAAF3' | + '\uAAF4' | + '\uFF70' | + '\uFF9E' | + '\uFF9F'; + +UNICODE_CLASS_LO: + '\u00AA' | + '\u00BA' | + '\u01BB' | + '\u01C0'..'\u01C3' | + '\u0294' | + '\u05D0'..'\u05EA' | + '\u05F0'..'\u05F2' | + '\u0620'..'\u063F' | + '\u0641'..'\u064A' | + '\u066E' | + '\u066F' | + '\u0671'..'\u06D3' | + '\u06D5' | + '\u06EE' | + '\u06EF' | + '\u06FA'..'\u06FC' | + '\u06FF' | + '\u0710' | + '\u0712'..'\u072F' | + '\u074D'..'\u07A5' | + '\u07B1' | + '\u07CA'..'\u07EA' | + '\u0800'..'\u0815' | + '\u0840'..'\u0858' | + '\u08A0' | + '\u08A2'..'\u08AC' | + '\u0904'..'\u0939' | + '\u093D' | + '\u0950' | + '\u0958'..'\u0961' | + '\u0972'..'\u0977' | + '\u0979'..'\u097F' | + '\u0985'..'\u098C' | + '\u098F' | + '\u0990' | + '\u0993'..'\u09A8' | + '\u09AA'..'\u09B0' | + '\u09B2' | + '\u09B6'..'\u09B9' | + '\u09BD' | + '\u09CE' | + '\u09DC' | + '\u09DD' | + '\u09DF'..'\u09E1' | + '\u09F0' | + '\u09F1' | + '\u0A05'..'\u0A0A' | + '\u0A0F' | + '\u0A10' | + '\u0A13'..'\u0A28' | + '\u0A2A'..'\u0A30' | + '\u0A32' | + '\u0A33' | + '\u0A35' | + '\u0A36' | + '\u0A38' | + '\u0A39' | + '\u0A59'..'\u0A5C' | + '\u0A5E' | + '\u0A72'..'\u0A74' | + '\u0A85'..'\u0A8D' | + '\u0A8F'..'\u0A91' | + '\u0A93'..'\u0AA8' | + '\u0AAA'..'\u0AB0' | + '\u0AB2' | + '\u0AB3' | + '\u0AB5'..'\u0AB9' | + '\u0ABD' | + '\u0AD0' | + '\u0AE0' | + '\u0AE1' | + '\u0B05'..'\u0B0C' | + '\u0B0F' | + '\u0B10' | + '\u0B13'..'\u0B28' | + '\u0B2A'..'\u0B30' | + '\u0B32' | + '\u0B33' | + '\u0B35'..'\u0B39' | + '\u0B3D' | + '\u0B5C' | + '\u0B5D' | + '\u0B5F'..'\u0B61' | + '\u0B71' | + '\u0B83' | + '\u0B85'..'\u0B8A' | + '\u0B8E'..'\u0B90' | + '\u0B92'..'\u0B95' | + '\u0B99' | + '\u0B9A' | + '\u0B9C' | + '\u0B9E' | + '\u0B9F' | + '\u0BA3' | + '\u0BA4' | + '\u0BA8'..'\u0BAA' | + '\u0BAE'..'\u0BB9' | + '\u0BD0' | + '\u0C05'..'\u0C0C' | + '\u0C0E'..'\u0C10' | + '\u0C12'..'\u0C28' | + '\u0C2A'..'\u0C33' | + '\u0C35'..'\u0C39' | + '\u0C3D' | + '\u0C58' | + '\u0C59' | + '\u0C60' | + '\u0C61' | + '\u0C85'..'\u0C8C' | + '\u0C8E'..'\u0C90' | + '\u0C92'..'\u0CA8' | + '\u0CAA'..'\u0CB3' | + '\u0CB5'..'\u0CB9' | + '\u0CBD' | + '\u0CDE' | + '\u0CE0' | + '\u0CE1' | + '\u0CF1' | + '\u0CF2' | + '\u0D05'..'\u0D0C' | + '\u0D0E'..'\u0D10' | + '\u0D12'..'\u0D3A' | + '\u0D3D' | + '\u0D4E' | + '\u0D60' | + '\u0D61' | + '\u0D7A'..'\u0D7F' | + '\u0D85'..'\u0D96' | + '\u0D9A'..'\u0DB1' | + '\u0DB3'..'\u0DBB' | + '\u0DBD' | + '\u0DC0'..'\u0DC6' | + '\u0E01'..'\u0E30' | + '\u0E32' | + '\u0E33' | + '\u0E40'..'\u0E45' | + '\u0E81' | + '\u0E82' | + '\u0E84' | + '\u0E87' | + '\u0E88' | + '\u0E8A' | + '\u0E8D' | + '\u0E94'..'\u0E97' | + '\u0E99'..'\u0E9F' | + '\u0EA1'..'\u0EA3' | + '\u0EA5' | + '\u0EA7' | + '\u0EAA' | + '\u0EAB' | + '\u0EAD'..'\u0EB0' | + '\u0EB2' | + '\u0EB3' | + '\u0EBD' | + '\u0EC0'..'\u0EC4' | + '\u0EDC'..'\u0EDF' | + '\u0F00' | + '\u0F40'..'\u0F47' | + '\u0F49'..'\u0F6C' | + '\u0F88'..'\u0F8C' | + '\u1000'..'\u102A' | + '\u103F' | + '\u1050'..'\u1055' | + '\u105A'..'\u105D' | + '\u1061' | + '\u1065' | + '\u1066' | + '\u106E'..'\u1070' | + '\u1075'..'\u1081' | + '\u108E' | + '\u10D0'..'\u10FA' | + '\u10FD'..'\u1248' | + '\u124A'..'\u124D' | + '\u1250'..'\u1256' | + '\u1258' | + '\u125A'..'\u125D' | + '\u1260'..'\u1288' | + '\u128A'..'\u128D' | + '\u1290'..'\u12B0' | + '\u12B2'..'\u12B5' | + '\u12B8'..'\u12BE' | + '\u12C0' | + '\u12C2'..'\u12C5' | + '\u12C8'..'\u12D6' | + '\u12D8'..'\u1310' | + '\u1312'..'\u1315' | + '\u1318'..'\u135A' | + '\u1380'..'\u138F' | + '\u13A0'..'\u13F4' | + '\u1401'..'\u166C' | + '\u166F'..'\u167F' | + '\u1681'..'\u169A' | + '\u16A0'..'\u16EA' | + '\u1700'..'\u170C' | + '\u170E'..'\u1711' | + '\u1720'..'\u1731' | + '\u1740'..'\u1751' | + '\u1760'..'\u176C' | + '\u176E'..'\u1770' | + '\u1780'..'\u17B3' | + '\u17DC' | + '\u1820'..'\u1842' | + '\u1844'..'\u1877' | + '\u1880'..'\u18A8' | + '\u18AA' | + '\u18B0'..'\u18F5' | + '\u1900'..'\u191C' | + '\u1950'..'\u196D' | + '\u1970'..'\u1974' | + '\u1980'..'\u19AB' | + '\u19C1'..'\u19C7' | + '\u1A00'..'\u1A16' | + '\u1A20'..'\u1A54' | + '\u1B05'..'\u1B33' | + '\u1B45'..'\u1B4B' | + '\u1B83'..'\u1BA0' | + '\u1BAE' | + '\u1BAF' | + '\u1BBA'..'\u1BE5' | + '\u1C00'..'\u1C23' | + '\u1C4D'..'\u1C4F' | + '\u1C5A'..'\u1C77' | + '\u1CE9'..'\u1CEC' | + '\u1CEE'..'\u1CF1' | + '\u1CF5' | + '\u1CF6' | + '\u2135'..'\u2138' | + '\u2D30'..'\u2D67' | + '\u2D80'..'\u2D96' | + '\u2DA0'..'\u2DA6' | + '\u2DA8'..'\u2DAE' | + '\u2DB0'..'\u2DB6' | + '\u2DB8'..'\u2DBE' | + '\u2DC0'..'\u2DC6' | + '\u2DC8'..'\u2DCE' | + '\u2DD0'..'\u2DD6' | + '\u2DD8'..'\u2DDE' | + '\u3006' | + '\u303C' | + '\u3041'..'\u3096' | + '\u309F' | + '\u30A1'..'\u30FA' | + '\u30FF' | + '\u3105'..'\u312D' | + '\u3131'..'\u318E' | + '\u31A0'..'\u31BA' | + '\u31F0'..'\u31FF' | + '\u3400' | + '\u4DB5' | + '\u4E00' | + '\u9FCC' | + '\uA000'..'\uA014' | + '\uA016'..'\uA48C' | + '\uA4D0'..'\uA4F7' | + '\uA500'..'\uA60B' | + '\uA610'..'\uA61F' | + '\uA62A' | + '\uA62B' | + '\uA66E' | + '\uA6A0'..'\uA6E5' | + '\uA7FB'..'\uA801' | + '\uA803'..'\uA805' | + '\uA807'..'\uA80A' | + '\uA80C'..'\uA822' | + '\uA840'..'\uA873' | + '\uA882'..'\uA8B3' | + '\uA8F2'..'\uA8F7' | + '\uA8FB' | + '\uA90A'..'\uA925' | + '\uA930'..'\uA946' | + '\uA960'..'\uA97C' | + '\uA984'..'\uA9B2' | + '\uAA00'..'\uAA28' | + '\uAA40'..'\uAA42' | + '\uAA44'..'\uAA4B' | + '\uAA60'..'\uAA6F' | + '\uAA71'..'\uAA76' | + '\uAA7A' | + '\uAA80'..'\uAAAF' | + '\uAAB1' | + '\uAAB5' | + '\uAAB6' | + '\uAAB9'..'\uAABD' | + '\uAAC0' | + '\uAAC2' | + '\uAADB' | + '\uAADC' | + '\uAAE0'..'\uAAEA' | + '\uAAF2' | + '\uAB01'..'\uAB06' | + '\uAB09'..'\uAB0E' | + '\uAB11'..'\uAB16' | + '\uAB20'..'\uAB26' | + '\uAB28'..'\uAB2E' | + '\uABC0'..'\uABE2' | + '\uAC00' | + '\uD7A3' | + '\uD7B0'..'\uD7C6' | + '\uD7CB'..'\uD7FB' | + '\uF900'..'\uFA6D' | + '\uFA70'..'\uFAD9' | + '\uFB1D' | + '\uFB1F'..'\uFB28' | + '\uFB2A'..'\uFB36' | + '\uFB38'..'\uFB3C' | + '\uFB3E' | + '\uFB40' | + '\uFB41' | + '\uFB43' | + '\uFB44' | + '\uFB46'..'\uFBB1' | + '\uFBD3'..'\uFD3D' | + '\uFD50'..'\uFD8F' | + '\uFD92'..'\uFDC7' | + '\uFDF0'..'\uFDFB' | + '\uFE70'..'\uFE74' | + '\uFE76'..'\uFEFC' | + '\uFF66'..'\uFF6F' | + '\uFF71'..'\uFF9D' | + '\uFFA0'..'\uFFBE' | + '\uFFC2'..'\uFFC7' | + '\uFFCA'..'\uFFCF' | + '\uFFD2'..'\uFFD7' | + '\uFFDA'..'\uFFDC'; + +UNICODE_CLASS_LT: + '\u01C5' | + '\u01C8' | + '\u01CB' | + '\u01F2' | + '\u1F88'..'\u1F8F' | + '\u1F98'..'\u1F9F' | + '\u1FA8'..'\u1FAF' | + '\u1FBC' | + '\u1FCC' | + '\u1FFC'; + +UNICODE_CLASS_LU: + '\u0041'..'\u005A' | + '\u00C0'..'\u00D6' | + '\u00D8'..'\u00DE' | + '\u0100' | + '\u0102' | + '\u0104' | + '\u0106' | + '\u0108' | + '\u010A' | + '\u010C' | + '\u010E' | + '\u0110' | + '\u0112' | + '\u0114' | + '\u0116' | + '\u0118' | + '\u011A' | + '\u011C' | + '\u011E' | + '\u0120' | + '\u0122' | + '\u0124' | + '\u0126' | + '\u0128' | + '\u012A' | + '\u012C' | + '\u012E' | + '\u0130' | + '\u0132' | + '\u0134' | + '\u0136' | + '\u0139' | + '\u013B' | + '\u013D' | + '\u013F' | + '\u0141' | + '\u0143' | + '\u0145' | + '\u0147' | + '\u014A' | + '\u014C' | + '\u014E' | + '\u0150' | + '\u0152' | + '\u0154' | + '\u0156' | + '\u0158' | + '\u015A' | + '\u015C' | + '\u015E' | + '\u0160' | + '\u0162' | + '\u0164' | + '\u0166' | + '\u0168' | + '\u016A' | + '\u016C' | + '\u016E' | + '\u0170' | + '\u0172' | + '\u0174' | + '\u0176' | + '\u0178' | + '\u0179' | + '\u017B' | + '\u017D' | + '\u0181' | + '\u0182' | + '\u0184' | + '\u0186' | + '\u0187' | + '\u0189'..'\u018B' | + '\u018E'..'\u0191' | + '\u0193' | + '\u0194' | + '\u0196'..'\u0198' | + '\u019C' | + '\u019D' | + '\u019F' | + '\u01A0' | + '\u01A2' | + '\u01A4' | + '\u01A6' | + '\u01A7' | + '\u01A9' | + '\u01AC' | + '\u01AE' | + '\u01AF' | + '\u01B1'..'\u01B3' | + '\u01B5' | + '\u01B7' | + '\u01B8' | + '\u01BC' | + '\u01C4' | + '\u01C7' | + '\u01CA' | + '\u01CD' | + '\u01CF' | + '\u01D1' | + '\u01D3' | + '\u01D5' | + '\u01D7' | + '\u01D9' | + '\u01DB' | + '\u01DE' | + '\u01E0' | + '\u01E2' | + '\u01E4' | + '\u01E6' | + '\u01E8' | + '\u01EA' | + '\u01EC' | + '\u01EE' | + '\u01F1' | + '\u01F4' | + '\u01F6'..'\u01F8' | + '\u01FA' | + '\u01FC' | + '\u01FE' | + '\u0200' | + '\u0202' | + '\u0204' | + '\u0206' | + '\u0208' | + '\u020A' | + '\u020C' | + '\u020E' | + '\u0210' | + '\u0212' | + '\u0214' | + '\u0216' | + '\u0218' | + '\u021A' | + '\u021C' | + '\u021E' | + '\u0220' | + '\u0222' | + '\u0224' | + '\u0226' | + '\u0228' | + '\u022A' | + '\u022C' | + '\u022E' | + '\u0230' | + '\u0232' | + '\u023A' | + '\u023B' | + '\u023D' | + '\u023E' | + '\u0241' | + '\u0243'..'\u0246' | + '\u0248' | + '\u024A' | + '\u024C' | + '\u024E' | + '\u0370' | + '\u0372' | + '\u0376' | + '\u0386' | + '\u0388'..'\u038A' | + '\u038C' | + '\u038E' | + '\u038F' | + '\u0391'..'\u03A1' | + '\u03A3'..'\u03AB' | + '\u03CF' | + '\u03D2'..'\u03D4' | + '\u03D8' | + '\u03DA' | + '\u03DC' | + '\u03DE' | + '\u03E0' | + '\u03E2' | + '\u03E4' | + '\u03E6' | + '\u03E8' | + '\u03EA' | + '\u03EC' | + '\u03EE' | + '\u03F4' | + '\u03F7' | + '\u03F9' | + '\u03FA' | + '\u03FD'..'\u042F' | + '\u0460' | + '\u0462' | + '\u0464' | + '\u0466' | + '\u0468' | + '\u046A' | + '\u046C' | + '\u046E' | + '\u0470' | + '\u0472' | + '\u0474' | + '\u0476' | + '\u0478' | + '\u047A' | + '\u047C' | + '\u047E' | + '\u0480' | + '\u048A' | + '\u048C' | + '\u048E' | + '\u0490' | + '\u0492' | + '\u0494' | + '\u0496' | + '\u0498' | + '\u049A' | + '\u049C' | + '\u049E' | + '\u04A0' | + '\u04A2' | + '\u04A4' | + '\u04A6' | + '\u04A8' | + '\u04AA' | + '\u04AC' | + '\u04AE' | + '\u04B0' | + '\u04B2' | + '\u04B4' | + '\u04B6' | + '\u04B8' | + '\u04BA' | + '\u04BC' | + '\u04BE' | + '\u04C0' | + '\u04C1' | + '\u04C3' | + '\u04C5' | + '\u04C7' | + '\u04C9' | + '\u04CB' | + '\u04CD' | + '\u04D0' | + '\u04D2' | + '\u04D4' | + '\u04D6' | + '\u04D8' | + '\u04DA' | + '\u04DC' | + '\u04DE' | + '\u04E0' | + '\u04E2' | + '\u04E4' | + '\u04E6' | + '\u04E8' | + '\u04EA' | + '\u04EC' | + '\u04EE' | + '\u04F0' | + '\u04F2' | + '\u04F4' | + '\u04F6' | + '\u04F8' | + '\u04FA' | + '\u04FC' | + '\u04FE' | + '\u0500' | + '\u0502' | + '\u0504' | + '\u0506' | + '\u0508' | + '\u050A' | + '\u050C' | + '\u050E' | + '\u0510' | + '\u0512' | + '\u0514' | + '\u0516' | + '\u0518' | + '\u051A' | + '\u051C' | + '\u051E' | + '\u0520' | + '\u0522' | + '\u0524' | + '\u0526' | + '\u0531'..'\u0556' | + '\u10A0'..'\u10C5' | + '\u10C7' | + '\u10CD' | + '\u1E00' | + '\u1E02' | + '\u1E04' | + '\u1E06' | + '\u1E08' | + '\u1E0A' | + '\u1E0C' | + '\u1E0E' | + '\u1E10' | + '\u1E12' | + '\u1E14' | + '\u1E16' | + '\u1E18' | + '\u1E1A' | + '\u1E1C' | + '\u1E1E' | + '\u1E20' | + '\u1E22' | + '\u1E24' | + '\u1E26' | + '\u1E28' | + '\u1E2A' | + '\u1E2C' | + '\u1E2E' | + '\u1E30' | + '\u1E32' | + '\u1E34' | + '\u1E36' | + '\u1E38' | + '\u1E3A' | + '\u1E3C' | + '\u1E3E' | + '\u1E40' | + '\u1E42' | + '\u1E44' | + '\u1E46' | + '\u1E48' | + '\u1E4A' | + '\u1E4C' | + '\u1E4E' | + '\u1E50' | + '\u1E52' | + '\u1E54' | + '\u1E56' | + '\u1E58' | + '\u1E5A' | + '\u1E5C' | + '\u1E5E' | + '\u1E60' | + '\u1E62' | + '\u1E64' | + '\u1E66' | + '\u1E68' | + '\u1E6A' | + '\u1E6C' | + '\u1E6E' | + '\u1E70' | + '\u1E72' | + '\u1E74' | + '\u1E76' | + '\u1E78' | + '\u1E7A' | + '\u1E7C' | + '\u1E7E' | + '\u1E80' | + '\u1E82' | + '\u1E84' | + '\u1E86' | + '\u1E88' | + '\u1E8A' | + '\u1E8C' | + '\u1E8E' | + '\u1E90' | + '\u1E92' | + '\u1E94' | + '\u1E9E' | + '\u1EA0' | + '\u1EA2' | + '\u1EA4' | + '\u1EA6' | + '\u1EA8' | + '\u1EAA' | + '\u1EAC' | + '\u1EAE' | + '\u1EB0' | + '\u1EB2' | + '\u1EB4' | + '\u1EB6' | + '\u1EB8' | + '\u1EBA' | + '\u1EBC' | + '\u1EBE' | + '\u1EC0' | + '\u1EC2' | + '\u1EC4' | + '\u1EC6' | + '\u1EC8' | + '\u1ECA' | + '\u1ECC' | + '\u1ECE' | + '\u1ED0' | + '\u1ED2' | + '\u1ED4' | + '\u1ED6' | + '\u1ED8' | + '\u1EDA' | + '\u1EDC' | + '\u1EDE' | + '\u1EE0' | + '\u1EE2' | + '\u1EE4' | + '\u1EE6' | + '\u1EE8' | + '\u1EEA' | + '\u1EEC' | + '\u1EEE' | + '\u1EF0' | + '\u1EF2' | + '\u1EF4' | + '\u1EF6' | + '\u1EF8' | + '\u1EFA' | + '\u1EFC' | + '\u1EFE' | + '\u1F08'..'\u1F0F' | + '\u1F18'..'\u1F1D' | + '\u1F28'..'\u1F2F' | + '\u1F38'..'\u1F3F' | + '\u1F48'..'\u1F4D' | + '\u1F59' | + '\u1F5B' | + '\u1F5D' | + '\u1F5F' | + '\u1F68'..'\u1F6F' | + '\u1FB8'..'\u1FBB' | + '\u1FC8'..'\u1FCB' | + '\u1FD8'..'\u1FDB' | + '\u1FE8'..'\u1FEC' | + '\u1FF8'..'\u1FFB' | + '\u2102' | + '\u2107' | + '\u210B'..'\u210D' | + '\u2110'..'\u2112' | + '\u2115' | + '\u2119'..'\u211D' | + '\u2124' | + '\u2126' | + '\u2128' | + '\u212A'..'\u212D' | + '\u2130'..'\u2133' | + '\u213E' | + '\u213F' | + '\u2145' | + '\u2183' | + '\u2C00'..'\u2C2E' | + '\u2C60' | + '\u2C62'..'\u2C64' | + '\u2C67' | + '\u2C69' | + '\u2C6B' | + '\u2C6D'..'\u2C70' | + '\u2C72' | + '\u2C75' | + '\u2C7E'..'\u2C80' | + '\u2C82' | + '\u2C84' | + '\u2C86' | + '\u2C88' | + '\u2C8A' | + '\u2C8C' | + '\u2C8E' | + '\u2C90' | + '\u2C92' | + '\u2C94' | + '\u2C96' | + '\u2C98' | + '\u2C9A' | + '\u2C9C' | + '\u2C9E' | + '\u2CA0' | + '\u2CA2' | + '\u2CA4' | + '\u2CA6' | + '\u2CA8' | + '\u2CAA' | + '\u2CAC' | + '\u2CAE' | + '\u2CB0' | + '\u2CB2' | + '\u2CB4' | + '\u2CB6' | + '\u2CB8' | + '\u2CBA' | + '\u2CBC' | + '\u2CBE' | + '\u2CC0' | + '\u2CC2' | + '\u2CC4' | + '\u2CC6' | + '\u2CC8' | + '\u2CCA' | + '\u2CCC' | + '\u2CCE' | + '\u2CD0' | + '\u2CD2' | + '\u2CD4' | + '\u2CD6' | + '\u2CD8' | + '\u2CDA' | + '\u2CDC' | + '\u2CDE' | + '\u2CE0' | + '\u2CE2' | + '\u2CEB' | + '\u2CED' | + '\u2CF2' | + '\uA640' | + '\uA642' | + '\uA644' | + '\uA646' | + '\uA648' | + '\uA64A' | + '\uA64C' | + '\uA64E' | + '\uA650' | + '\uA652' | + '\uA654' | + '\uA656' | + '\uA658' | + '\uA65A' | + '\uA65C' | + '\uA65E' | + '\uA660' | + '\uA662' | + '\uA664' | + '\uA666' | + '\uA668' | + '\uA66A' | + '\uA66C' | + '\uA680' | + '\uA682' | + '\uA684' | + '\uA686' | + '\uA688' | + '\uA68A' | + '\uA68C' | + '\uA68E' | + '\uA690' | + '\uA692' | + '\uA694' | + '\uA696' | + '\uA722' | + '\uA724' | + '\uA726' | + '\uA728' | + '\uA72A' | + '\uA72C' | + '\uA72E' | + '\uA732' | + '\uA734' | + '\uA736' | + '\uA738' | + '\uA73A' | + '\uA73C' | + '\uA73E' | + '\uA740' | + '\uA742' | + '\uA744' | + '\uA746' | + '\uA748' | + '\uA74A' | + '\uA74C' | + '\uA74E' | + '\uA750' | + '\uA752' | + '\uA754' | + '\uA756' | + '\uA758' | + '\uA75A' | + '\uA75C' | + '\uA75E' | + '\uA760' | + '\uA762' | + '\uA764' | + '\uA766' | + '\uA768' | + '\uA76A' | + '\uA76C' | + '\uA76E' | + '\uA779' | + '\uA77B' | + '\uA77D' | + '\uA77E' | + '\uA780' | + '\uA782' | + '\uA784' | + '\uA786' | + '\uA78B' | + '\uA78D' | + '\uA790' | + '\uA792' | + '\uA7A0' | + '\uA7A2' | + '\uA7A4' | + '\uA7A6' | + '\uA7A8' | + '\uA7AA' | + '\uFF21'..'\uFF3A'; + +UNICODE_CLASS_ND: + '\u0030'..'\u0039' | + '\u0660'..'\u0669' | + '\u06F0'..'\u06F9' | + '\u07C0'..'\u07C9' | + '\u0966'..'\u096F' | + '\u09E6'..'\u09EF' | + '\u0A66'..'\u0A6F' | + '\u0AE6'..'\u0AEF' | + '\u0B66'..'\u0B6F' | + '\u0BE6'..'\u0BEF' | + '\u0C66'..'\u0C6F' | + '\u0CE6'..'\u0CEF' | + '\u0D66'..'\u0D6F' | + '\u0E50'..'\u0E59' | + '\u0ED0'..'\u0ED9' | + '\u0F20'..'\u0F29' | + '\u1040'..'\u1049' | + '\u1090'..'\u1099' | + '\u17E0'..'\u17E9' | + '\u1810'..'\u1819' | + '\u1946'..'\u194F' | + '\u19D0'..'\u19D9' | + '\u1A80'..'\u1A89' | + '\u1A90'..'\u1A99' | + '\u1B50'..'\u1B59' | + '\u1BB0'..'\u1BB9' | + '\u1C40'..'\u1C49' | + '\u1C50'..'\u1C59' | + '\uA620'..'\uA629' | + '\uA8D0'..'\uA8D9' | + '\uA900'..'\uA909' | + '\uA9D0'..'\uA9D9' | + '\uAA50'..'\uAA59' | + '\uABF0'..'\uABF9' | + '\uFF10'..'\uFF19'; + +UNICODE_CLASS_NL: + '\u16EE'..'\u16F0' | + '\u2160'..'\u2182' | + '\u2185'..'\u2188' | + '\u3007' | + '\u3021'..'\u3029' | + '\u3038'..'\u303A' | + '\uA6E6'..'\uA6EF'; \ No newline at end of file diff --git a/src/main/java/ee/carlrobert/codegpt/CodeGPTBundle.java b/src/main/java/ee/carlrobert/codegpt/CodeGPTBundle.java new file mode 100644 index 00000000..896c3cfb --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/CodeGPTBundle.java @@ -0,0 +1,22 @@ +package ee.carlrobert.codegpt; + +import com.intellij.DynamicBundle; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.PropertyKey; + +public class CodeGPTBundle extends DynamicBundle { + + private static final CodeGPTBundle INSTANCE = new CodeGPTBundle(); + + private CodeGPTBundle() { + super("messages.codegpt"); + } + + public static String get(@NotNull @PropertyKey(resourceBundle = "messages.codegpt") String key) { + return INSTANCE.getMessage(key); + } + + public static String get(@NotNull @PropertyKey(resourceBundle = "messages.codegpt") String key, Object... params) { + return INSTANCE.getMessage(key, params); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/CodeGPTPlugin.java b/src/main/java/ee/carlrobert/codegpt/CodeGPTPlugin.java new file mode 100644 index 00000000..c0380109 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/CodeGPTPlugin.java @@ -0,0 +1,39 @@ +package ee.carlrobert.codegpt; + +import static java.util.Objects.requireNonNull; + +import com.intellij.ide.plugins.PluginManagerCore; +import com.intellij.openapi.application.PathManager; +import com.intellij.openapi.extensions.PluginId; +import com.intellij.openapi.project.Project; +import java.io.File; +import java.nio.file.Path; +import org.jetbrains.annotations.NotNull; + +public final class CodeGPTPlugin { + + public static final PluginId CODEGPT_ID = PluginId.getId("ee.carlrobert.chatgpt"); + + private CodeGPTPlugin() { + } + + public static @NotNull Path getPluginBasePath() { + return requireNonNull(PluginManagerCore.getPlugin(CODEGPT_ID)).getPluginPath(); + } + + public static @NotNull String getPluginOptionsPath() { + return PathManager.getOptionsPath() + File.separator + "CodeGPT"; + } + + public static @NotNull String getIndexStorePath() { + return getPluginOptionsPath() + File.separator + "indexes"; + } + + public static @NotNull String getProjectIndexStorePath(@NotNull Project project) { + return getIndexStorePath() + File.separator + project.getName(); + } + + public static @NotNull String getProjectIndexPath(@NotNull Project project) { + return getProjectIndexStorePath(project) + File.separator + "hnsw.index"; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/EncodingManager.java b/src/main/java/ee/carlrobert/codegpt/EncodingManager.java index 83abdb95..3328d026 100644 --- a/src/main/java/ee/carlrobert/codegpt/EncodingManager.java +++ b/src/main/java/ee/carlrobert/codegpt/EncodingManager.java @@ -1,14 +1,16 @@ package ee.carlrobert.codegpt; +import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.components.Service; import com.knuddels.jtokkit.Encodings; import com.knuddels.jtokkit.api.Encoding; import com.knuddels.jtokkit.api.EncodingRegistry; -import ee.carlrobert.codegpt.state.settings.SettingsState; +import ee.carlrobert.codegpt.settings.SettingsState; import ee.carlrobert.openai.client.completion.chat.request.ChatCompletionMessage; -public class EncodingManager { +@Service +public final class EncodingManager { - private static final EncodingManager instance = new EncodingManager(); private final EncodingRegistry registry = Encodings.newDefaultEncodingRegistry(); private Encoding encoding; @@ -18,7 +20,7 @@ public class EncodingManager { } public static EncodingManager getInstance() { - return instance; + return ApplicationManager.getApplication().getService(EncodingManager.class); } public void setEncoding(String modelName) { @@ -29,4 +31,8 @@ public class EncodingManager { var tokensPerMessage = 4; // every message follows <|start|>{role/name}\n{content}<|end|>\n return encoding.countTokens(message.getRole() + message.getContent()) + tokensPerMessage; } + + public int countTokens(String text) { + return encoding.countTokens(text); + } } diff --git a/src/main/java/ee/carlrobert/codegpt/Icons.java b/src/main/java/ee/carlrobert/codegpt/Icons.java new file mode 100644 index 00000000..2157343f --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/Icons.java @@ -0,0 +1,18 @@ +package ee.carlrobert.codegpt; + +import com.intellij.openapi.util.IconLoader; +import java.util.Objects; +import javax.swing.Icon; +import javax.swing.ImageIcon; + +public final class Icons { + + public static final Icon DefaultIcon = IconLoader.getIcon("/icons/codegpt.svg", Icons.class); + public static final Icon DefaultSmallIcon = IconLoader.getIcon("/icons/codegpt-small.svg", Icons.class); + public static final Icon SendIcon = IconLoader.getIcon("/icons/send.svg", Icons.class); + public static final ImageIcon DefaultImageIcon = getImageIcon("/icons/chatgpt.png"); + + private static ImageIcon getImageIcon(String path) { + return new ImageIcon(Objects.requireNonNull(Icons.class.getResource(path))); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/PluginStartupActivity.java b/src/main/java/ee/carlrobert/codegpt/PluginStartupActivity.java index e9b25770..0d567897 100644 --- a/src/main/java/ee/carlrobert/codegpt/PluginStartupActivity.java +++ b/src/main/java/ee/carlrobert/codegpt/PluginStartupActivity.java @@ -1,22 +1,107 @@ package ee.carlrobert.codegpt; +import com.intellij.notification.NotificationType; +import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; +import com.intellij.openapi.project.ProjectManager; +import com.intellij.openapi.project.ProjectManagerListener; import com.intellij.openapi.startup.StartupActivity; -import ee.carlrobert.codegpt.action.ActionsUtil; -import ee.carlrobert.codegpt.client.ClientProvider; -import ee.carlrobert.codegpt.state.settings.SettingsState; +import ee.carlrobert.codegpt.actions.editor.EditorActionsUtil; +import ee.carlrobert.codegpt.credentials.UserCredentialsManager; +import ee.carlrobert.codegpt.settings.SettingsState; +import ee.carlrobert.codegpt.user.UserManager; +import ee.carlrobert.codegpt.user.auth.AuthenticationHandler; +import ee.carlrobert.codegpt.user.auth.AuthenticationService; +import ee.carlrobert.codegpt.user.auth.SessionVerificationJob; +import ee.carlrobert.codegpt.util.OverlayUtils; import org.jetbrains.annotations.NotNull; +import org.quartz.JobBuilder; +import org.quartz.Scheduler; +import org.quartz.SchedulerException; +import org.quartz.SimpleScheduleBuilder; +import org.quartz.TriggerBuilder; +import org.quartz.impl.StdSchedulerFactory; public class PluginStartupActivity implements StartupActivity { + private static final Logger LOG = Logger.getInstance(PluginStartupActivity.class); + private Scheduler scheduler; + @Override public void runActivity(@NotNull Project project) { - ActionsUtil.refreshActions(); + EditorActionsUtil.refreshActions(); + + var userManager = UserManager.getInstance(); + var session = userManager.getSession(); + if (session == null || session.isExpired()) { + handleAuthentication(project); + } else { + startSessionVerificationJob(); + } + + ProjectManager.getInstance().addProjectManagerListener(project, new ProjectManagerListener() { + @Override + public void projectClosing(@NotNull Project project) { + if (scheduler != null) { + try { + scheduler.shutdown(); + } catch (SchedulerException e) { + LOG.error("Could not shut down scheduler.", e); + } + } + } + }); + } + + private void startSessionVerificationJob() { + try { + scheduler = StdSchedulerFactory.getDefaultScheduler(); + scheduler.start(); + + var job = JobBuilder.newJob(SessionVerificationJob.class) + .withIdentity("authenticationVerifierJob", "authenticationVerifier") + .build(); + var trigger = TriggerBuilder.newTrigger() + .forJob(job) + .withIdentity("authenticationVerifierTrigger", "authenticationVerifier") + .withSchedule(SimpleScheduleBuilder.simpleSchedule() + .withIntervalInMinutes(30) + .repeatForever()) + .startNow() + .build(); + + scheduler.scheduleJob(job, trigger); + } catch (SchedulerException e) { + LOG.error("Couldn't start authentication verifier job", e); + } + } + + private void handleAuthentication(Project project) { var settings = SettingsState.getInstance(); - if (!settings.getApiKey().isEmpty() && settings.useOpenAIAccountName) { - ClientProvider.getDashboardClient() - .getSubscriptionAsync(subscription -> - settings.displayName = subscription.getAccountName()); + if (settings == null || !settings.previouslySignedIn) { + return; + } + + var password = UserCredentialsManager.getInstance().getAccountPassword(); + if (!settings.email.isEmpty() && password != null && !password.isEmpty()) { + AuthenticationService.getInstance() + .signInAsync(settings.email, password, new AuthenticationHandler() { + @Override + public void handleAuthenticated() { + OverlayUtils.showNotification("Authentication successful.", NotificationType.INFORMATION); + startSessionVerificationJob(); + } + + @Override + public void handleInvalidCredentials() { + OverlayUtils.showNotification("Authentication unsuccessful. Invalid credentials provided.", NotificationType.ERROR); + } + + @Override + public void handleGenericError() { + OverlayUtils.showNotification("Something went wrong while trying to authenticate.", NotificationType.ERROR); + } + }); } } } diff --git a/src/main/java/ee/carlrobert/codegpt/action/CustomPromptAction.java b/src/main/java/ee/carlrobert/codegpt/action/CustomPromptAction.java deleted file mode 100644 index 85e5d7a2..00000000 --- a/src/main/java/ee/carlrobert/codegpt/action/CustomPromptAction.java +++ /dev/null @@ -1,29 +0,0 @@ -package ee.carlrobert.codegpt.action; - -import com.intellij.icons.AllIcons; -import com.intellij.openapi.actionSystem.ActionManager; -import com.intellij.openapi.editor.Editor; -import com.intellij.openapi.editor.impl.EditorImpl; -import com.intellij.openapi.project.Project; -import ee.carlrobert.codegpt.util.FileUtils; -import javax.swing.SwingUtilities; - -public class CustomPromptAction extends BaseAction { - - public CustomPromptAction() { - super("Custom Prompt", "Custom prompt description", AllIcons.Actions.Run_anything); - } - - private static String previousUserPrompt = ""; - - protected void actionPerformed(Project project, Editor editor, String selectedText) { - if (selectedText != null && !selectedText.isEmpty()) { - var fileExtension = FileUtils.getFileExtension(((EditorImpl) editor).getVirtualFile().getName()); - var dialog = new CustomPromptDialog(selectedText, fileExtension, previousUserPrompt); - if (dialog.showAndGet()) { - previousUserPrompt = dialog.getUserPrompt(); - SwingUtilities.invokeLater(() -> sendMessage(project, dialog.getFullPrompt())); - } - } - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/action/CustomPromptDialog.java b/src/main/java/ee/carlrobert/codegpt/action/CustomPromptDialog.java deleted file mode 100644 index 00c7d6f3..00000000 --- a/src/main/java/ee/carlrobert/codegpt/action/CustomPromptDialog.java +++ /dev/null @@ -1,62 +0,0 @@ -package ee.carlrobert.codegpt.action; - -import static ee.carlrobert.codegpt.util.SwingUtils.addShiftEnterInputMap; -import static java.lang.String.format; - -import com.intellij.openapi.ui.DialogWrapper; -import com.intellij.util.ui.FormBuilder; -import com.intellij.util.ui.JBUI; -import com.intellij.util.ui.UI; -import javax.annotation.Nullable; -import javax.swing.JComponent; -import javax.swing.JTextArea; - -public class CustomPromptDialog extends DialogWrapper { - - private final String selectedText; - private final String fileExtension; - private final JTextArea userPromptTextArea; - - public CustomPromptDialog(String selectedText, String fileExtension, String previousUserPrompt) { - super(true); - this.selectedText = selectedText; - this.fileExtension = fileExtension; - this.userPromptTextArea = new JTextArea(previousUserPrompt); - this.userPromptTextArea.setCaretPosition(previousUserPrompt.length()); - setTitle("Custom Prompt"); - setSize(400, getRootPane().getPreferredSize().height); - init(); - } - - @Nullable - public JComponent getPreferredFocusedComponent() { - return userPromptTextArea; - } - - @Nullable - @Override - protected JComponent createCenterPanel() { - userPromptTextArea.setLineWrap(true); - userPromptTextArea.setWrapStyleWord(true); - userPromptTextArea.setMargin(JBUI.insets(5)); - addShiftEnterInputMap(userPromptTextArea, this::clickDefaultButton); - - return FormBuilder.createFormBuilder() - .addComponent(UI.PanelFactory.panel(userPromptTextArea) - .withLabel("Prefix:") - .moveLabelOnTop() - .withComment( - "Example: Find bugs in the following code") - .createPanel()) - .getPanel(); - } - - public String getFullPrompt() { - return userPromptTextArea.getText() + format("\n```%s\n%s\n```", fileExtension, selectedText); - } - - public String getUserPrompt() { - return userPromptTextArea.getText(); - } -} - diff --git a/src/main/java/ee/carlrobert/codegpt/actions/CodebaseIndexingAction.java b/src/main/java/ee/carlrobert/codegpt/actions/CodebaseIndexingAction.java new file mode 100644 index 00000000..ad2d22b2 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/actions/CodebaseIndexingAction.java @@ -0,0 +1,30 @@ +package ee.carlrobert.codegpt.actions; + +import static com.intellij.openapi.ui.DialogWrapper.OK_EXIT_CODE; + +import com.intellij.icons.AllIcons; +import com.intellij.openapi.actionSystem.AnAction; +import com.intellij.openapi.actionSystem.AnActionEvent; +import ee.carlrobert.codegpt.embeddings.CodebaseIndexingTask; +import ee.carlrobert.codegpt.embeddings.FolderStructureTreePanel; +import ee.carlrobert.codegpt.util.OverlayUtils; +import org.jetbrains.annotations.NotNull; + +public class CodebaseIndexingAction extends AnAction { + + public CodebaseIndexingAction() { + super("Update Indexes", "Update indexes", AllIcons.Actions.Refresh); + } + + @Override + public void actionPerformed(@NotNull AnActionEvent event) { + var project = event.getProject(); + if (project != null) { + var folderStructureTreePanel = new FolderStructureTreePanel(project); + var show = OverlayUtils.showFileStructureDialog(project, folderStructureTreePanel); + if (show == OK_EXIT_CODE) { + new CodebaseIndexingTask(project, folderStructureTreePanel.getCheckedFiles()).run(); + } + } + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/action/AskAction.java b/src/main/java/ee/carlrobert/codegpt/actions/editor/AskAction.java similarity index 62% rename from src/main/java/ee/carlrobert/codegpt/action/AskAction.java rename to src/main/java/ee/carlrobert/codegpt/actions/editor/AskAction.java index 1c4a3e66..481cc876 100644 --- a/src/main/java/ee/carlrobert/codegpt/action/AskAction.java +++ b/src/main/java/ee/carlrobert/codegpt/actions/editor/AskAction.java @@ -1,17 +1,17 @@ -package ee.carlrobert.codegpt.action; +package ee.carlrobert.codegpt.actions.editor; import com.intellij.icons.AllIcons; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; -import ee.carlrobert.codegpt.state.conversations.ConversationsState; -import ee.carlrobert.codegpt.toolwindow.chat.ChatContentManagerService; +import ee.carlrobert.codegpt.conversations.ConversationsState; +import ee.carlrobert.codegpt.toolwindow.chat.standard.StandardChatToolWindowContentManager; import org.jetbrains.annotations.NotNull; public class AskAction extends AnAction { public AskAction() { - super("Ask ChatGPT", "Ask ChatGPT description", AllIcons.Actions.Find); - ActionsUtil.registerOrReplaceAction(this); + super("Ask CodeGPT", "Chat with CodeGPT", AllIcons.Actions.Find); + EditorActionsUtil.registerOrReplaceAction(this); } @Override @@ -24,7 +24,7 @@ public class AskAction extends AnAction { var project = event.getProject(); if (project != null) { ConversationsState.getInstance().setCurrentConversation(null); - var tabPanel = project.getService(ChatContentManagerService.class).createNewTabPanel(); + var tabPanel = StandardChatToolWindowContentManager.getInstance(project).createNewTabPanel(); if (tabPanel != null) { tabPanel.displayLandingView(); } diff --git a/src/main/java/ee/carlrobert/codegpt/action/BaseAction.java b/src/main/java/ee/carlrobert/codegpt/actions/editor/BaseEditorAction.java similarity index 72% rename from src/main/java/ee/carlrobert/codegpt/action/BaseAction.java rename to src/main/java/ee/carlrobert/codegpt/actions/editor/BaseEditorAction.java index ff8a3fbf..ac15947c 100644 --- a/src/main/java/ee/carlrobert/codegpt/action/BaseAction.java +++ b/src/main/java/ee/carlrobert/codegpt/actions/editor/BaseEditorAction.java @@ -1,4 +1,4 @@ -package ee.carlrobert.codegpt.action; +package ee.carlrobert.codegpt.actions.editor; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; @@ -6,23 +6,21 @@ import com.intellij.openapi.actionSystem.PlatformDataKeys; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.NlsActions; -import ee.carlrobert.codegpt.state.conversations.message.Message; -import ee.carlrobert.codegpt.toolwindow.chat.ChatContentManagerService; import javax.swing.Icon; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -public abstract class BaseAction extends AnAction { +abstract class BaseEditorAction extends AnAction { - public BaseAction( + BaseEditorAction( @Nullable @NlsActions.ActionText String text, @Nullable @NlsActions.ActionDescription String description, @Nullable Icon icon) { super(text, description, icon); - ActionsUtil.registerOrReplaceAction(this); + EditorActionsUtil.registerOrReplaceAction(this); } - public BaseAction( + BaseEditorAction( @Nullable @NlsActions.ActionText String text, @Nullable @NlsActions.ActionDescription String description) { this(text, description, null); @@ -47,11 +45,4 @@ public abstract class BaseAction extends AnAction { } event.getPresentation().setEnabled(menuAllowed); } - - protected void sendMessage(@NotNull Project project, String prompt) { - var newTabPanel = project.getService(ChatContentManagerService.class).createNewTabPanel(); - if (newTabPanel != null) { - newTabPanel.startNewConversation(new Message(prompt)); - } - } } diff --git a/src/main/java/ee/carlrobert/codegpt/actions/editor/CustomPromptAction.java b/src/main/java/ee/carlrobert/codegpt/actions/editor/CustomPromptAction.java new file mode 100644 index 00000000..def2c8d9 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/actions/editor/CustomPromptAction.java @@ -0,0 +1,83 @@ +package ee.carlrobert.codegpt.actions.editor; + +import static java.lang.String.format; + +import com.intellij.icons.AllIcons; +import com.intellij.openapi.editor.Editor; +import com.intellij.openapi.editor.impl.EditorImpl; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.ui.DialogWrapper; +import com.intellij.util.ui.FormBuilder; +import com.intellij.util.ui.JBUI; +import com.intellij.util.ui.UI; +import ee.carlrobert.codegpt.conversations.message.Message; +import ee.carlrobert.codegpt.toolwindow.chat.standard.StandardChatToolWindowContentManager; +import ee.carlrobert.codegpt.util.FileUtils; +import ee.carlrobert.codegpt.util.SwingUtils; +import javax.swing.JComponent; +import javax.swing.JTextArea; +import javax.swing.SwingUtilities; +import org.jetbrains.annotations.Nullable; + +class CustomPromptAction extends BaseEditorAction { + + private static String previousUserPrompt = ""; + + CustomPromptAction() { + super("Custom Prompt", "Custom prompt description", AllIcons.Actions.Run_anything); + EditorActionsUtil.registerOrReplaceAction(this); + } + + @Override + protected void actionPerformed(Project project, Editor editor, String selectedText) { + if (selectedText != null && !selectedText.isEmpty()) { + var fileExtension = FileUtils.getFileExtension(((EditorImpl) editor).getVirtualFile().getName()); + var dialog = new CustomPromptDialog(previousUserPrompt); + if (dialog.showAndGet()) { + previousUserPrompt = dialog.getUserPrompt(); + var message = new Message(format("%s\n```%s\n%s\n```", previousUserPrompt, fileExtension, selectedText)); + message.setUserMessage(previousUserPrompt); + SwingUtilities.invokeLater(() -> StandardChatToolWindowContentManager.getInstance(project).sendMessage(message)); + } + } + } + + private static class CustomPromptDialog extends DialogWrapper { + private final JTextArea userPromptTextArea; + + public CustomPromptDialog(String previousUserPrompt) { + super(true); + this.userPromptTextArea = new JTextArea(previousUserPrompt); + this.userPromptTextArea.setCaretPosition(previousUserPrompt.length()); + setTitle("Custom Prompt"); + setSize(400, getRootPane().getPreferredSize().height); + init(); + } + + @Nullable + public JComponent getPreferredFocusedComponent() { + return userPromptTextArea; + } + + @Nullable + @Override + protected JComponent createCenterPanel() { + userPromptTextArea.setLineWrap(true); + userPromptTextArea.setWrapStyleWord(true); + userPromptTextArea.setMargin(JBUI.insets(5)); + SwingUtils.addShiftEnterInputMap(userPromptTextArea, this::clickDefaultButton); + + return FormBuilder.createFormBuilder() + .addComponent(UI.PanelFactory.panel(userPromptTextArea) + .withLabel("Prefix:") + .moveLabelOnTop() + .withComment("Example: Find bugs in the following code") + .createPanel()) + .getPanel(); + } + + public String getUserPrompt() { + return userPromptTextArea.getText(); + } + } +} \ No newline at end of file diff --git a/src/main/java/ee/carlrobert/codegpt/action/ActionsUtil.java b/src/main/java/ee/carlrobert/codegpt/actions/editor/EditorActionsUtil.java similarity index 58% rename from src/main/java/ee/carlrobert/codegpt/action/ActionsUtil.java rename to src/main/java/ee/carlrobert/codegpt/actions/editor/EditorActionsUtil.java index cef33098..b0977b12 100644 --- a/src/main/java/ee/carlrobert/codegpt/action/ActionsUtil.java +++ b/src/main/java/ee/carlrobert/codegpt/actions/editor/EditorActionsUtil.java @@ -1,4 +1,4 @@ -package ee.carlrobert.codegpt.action; +package ee.carlrobert.codegpt.actions.editor; import static java.lang.String.format; import static java.util.stream.Collectors.toList; @@ -10,38 +10,39 @@ import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.impl.EditorImpl; import com.intellij.openapi.extensions.PluginId; import com.intellij.openapi.project.Project; -import ee.carlrobert.codegpt.state.settings.configuration.ConfigurationState; +import ee.carlrobert.codegpt.conversations.message.Message; +import ee.carlrobert.codegpt.settings.configuration.ConfigurationState; +import ee.carlrobert.codegpt.toolwindow.chat.standard.StandardChatToolWindowContentManager; import ee.carlrobert.codegpt.util.FileUtils; import java.util.LinkedHashMap; import java.util.Map; import org.apache.commons.text.CaseUtils; -public class ActionsUtil { +public class EditorActionsUtil { public static Map DEFAULT_ACTIONS = new LinkedHashMap<>(Map.of( - "Find Bugs", "Find bugs in the following code: {{selectedCode}}", - "Write Tests", "Write Tests for the following code: {{selectedCode}}", - "Explain", "Explain the following code: {{selectedCode}}", - "Refactor", "Refactor the following code: {{selectedCode}}", - "Optimize", "Optimize the following code: {{selectedCode}}")); + "Find Bugs", "Find bugs in the selected code {{selectedCode}}", + "Write Tests", "Write Tests for the selected code {{selectedCode}}", + "Explain", "Explain the selected code {{selectedCode}}", + "Refactor", "Refactor the selected code {{selectedCode}}", + "Optimize", "Optimize the selected code {{selectedCode}}")); public static String[][] DEFAULT_ACTIONS_ARRAY = toArray(DEFAULT_ACTIONS); public static String[][] toArray(Map actionsMap) { return actionsMap.entrySet() .stream() - .map((entry) -> new String[]{entry.getKey(), entry.getValue()}) + .map((entry) -> new String[] {entry.getKey(), entry.getValue()}) .collect(toList()) .toArray(new String[0][0]); } public static void refreshActions() { - AnAction actionGroup = ActionManager.getInstance().getAction("codegpt.EditorActionGroup"); + AnAction actionGroup = ActionManager.getInstance().getAction("action.editor.group.EditorActionGroup"); if (actionGroup instanceof DefaultActionGroup) { DefaultActionGroup group = (DefaultActionGroup) actionGroup; group.removeAll(); group.add(new AskAction()); - group.addSeparator(); group.add(new CustomPromptAction()); group.addSeparator(); @@ -49,14 +50,22 @@ public class ActionsUtil { configuredActions.forEach((label, prompt) -> { // using label as action description to prevent com.intellij.diagnostic.PluginException // https://github.com/carlrobertoh/CodeGPT/issues/95 - var action = new BaseAction(label, label) { + var action = new BaseEditorAction(label, label) { @Override protected void actionPerformed(Project project, Editor editor, String selectedText) { - var fileExtension = FileUtils.getFileExtension( - ((EditorImpl) editor).getVirtualFile().getName()); - // TODO: Requires more sophisticated language parsing(can't always rely on the file extension) - sendMessage(project, prompt.replace("{{selectedCode}}", - format("\n```%s\n%s\n```", fileExtension, selectedText))); + var fileExtension = FileUtils.getFileExtension(((EditorImpl) editor).getVirtualFile().getName()); + var message = new Message(prompt.replace("{{selectedCode}}", format("\n```%s\n%s\n```", fileExtension, selectedText))); + message.setUserMessage(prompt.replace("{{selectedCode}}", "")); + var toolWindowContentManager = StandardChatToolWindowContentManager.getInstance(project); + var toolWindow = toolWindowContentManager.getToolWindow(); + if (toolWindow != null) { + toolWindow.show(); + + if (ConfigurationState.getInstance().createNewChatOnEachAction) { + toolWindowContentManager.createNewTabPanel(); + } + } + toolWindowContentManager.sendMessage(message); } }; group.add(action); diff --git a/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/ClearChatWindowAction.java b/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/ClearChatWindowAction.java new file mode 100644 index 00000000..1fb0efb5 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/ClearChatWindowAction.java @@ -0,0 +1,32 @@ +package ee.carlrobert.codegpt.actions.toolwindow; + +import com.intellij.icons.AllIcons; +import com.intellij.openapi.actionSystem.AnAction; +import com.intellij.openapi.actionSystem.AnActionEvent; +import ee.carlrobert.codegpt.actions.editor.EditorActionsUtil; +import ee.carlrobert.codegpt.conversations.ConversationsState; +import org.jetbrains.annotations.NotNull; + +public class ClearChatWindowAction extends AnAction { + + private final Runnable onActionPerformed; + + public ClearChatWindowAction(Runnable onActionPerformed) { + super("Clear Window", "Clears a chat window", AllIcons.General.Reset); + this.onActionPerformed = onActionPerformed; + EditorActionsUtil.registerOrReplaceAction(this); + } + + @Override + public void update(@NotNull AnActionEvent event) { + super.update(event); + var currentConversation = ConversationsState.getCurrentConversation(); + var isEnabled = currentConversation != null && !currentConversation.getMessages().isEmpty(); + event.getPresentation().setEnabled(isEnabled); + } + + @Override + public void actionPerformed(@NotNull AnActionEvent event) { + onActionPerformed.run(); + } +} \ No newline at end of file diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/actions/CreateNewConversationAction.java b/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/CreateNewConversationAction.java similarity index 69% rename from src/main/java/ee/carlrobert/codegpt/toolwindow/chat/actions/CreateNewConversationAction.java rename to src/main/java/ee/carlrobert/codegpt/actions/toolwindow/CreateNewConversationAction.java index 5439d3aa..95a3866e 100644 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/actions/CreateNewConversationAction.java +++ b/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/CreateNewConversationAction.java @@ -1,8 +1,11 @@ -package ee.carlrobert.codegpt.toolwindow.chat.actions; +package ee.carlrobert.codegpt.actions.toolwindow; import com.intellij.icons.AllIcons; +import com.intellij.openapi.actionSystem.ActionManager; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.openapi.extensions.PluginId; +import ee.carlrobert.codegpt.actions.editor.EditorActionsUtil; import org.jetbrains.annotations.NotNull; public class CreateNewConversationAction extends AnAction { @@ -12,6 +15,7 @@ public class CreateNewConversationAction extends AnAction { public CreateNewConversationAction(Runnable onCreate) { super("Create New Chat", "Create new chat", AllIcons.General.Add); this.onCreate = onCreate; + EditorActionsUtil.registerOrReplaceAction(this); } @Override diff --git a/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/DeleteAllConversationsAction.java b/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/DeleteAllConversationsAction.java new file mode 100644 index 00000000..32e0c7f7 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/DeleteAllConversationsAction.java @@ -0,0 +1,45 @@ +package ee.carlrobert.codegpt.actions.toolwindow; + +import static ee.carlrobert.codegpt.Icons.DefaultImageIcon; + +import com.intellij.icons.AllIcons; +import com.intellij.openapi.actionSystem.AnAction; +import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.openapi.ui.Messages; +import ee.carlrobert.codegpt.actions.editor.EditorActionsUtil; +import ee.carlrobert.codegpt.conversations.ConversationService; +import ee.carlrobert.codegpt.toolwindow.chat.standard.StandardChatToolWindowContentManager; +import org.jetbrains.annotations.NotNull; + +public class DeleteAllConversationsAction extends AnAction { + + private final Runnable onRefresh; + + public DeleteAllConversationsAction(Runnable onRefresh) { + super("Delete All", "Delete all conversations", AllIcons.Actions.GC); + this.onRefresh = onRefresh; + EditorActionsUtil.registerOrReplaceAction(this); + } + + @Override + public void update(@NotNull AnActionEvent event) { + var project = event.getProject(); + if (project != null) { + var sortedConversations = ConversationService.getInstance().getSortedConversations(); + event.getPresentation().setEnabled(!sortedConversations.isEmpty()); + } + } + + @Override + public void actionPerformed(@NotNull AnActionEvent event) { + int answer = Messages.showYesNoDialog("Are you sure you want to delete all conversations?", "Clear History", DefaultImageIcon); + if (answer == Messages.YES) { + var project = event.getProject(); + if (project != null) { + ConversationService.getInstance().clearAll(); + StandardChatToolWindowContentManager.getInstance(project).resetTabbedPane(); + } + this.onRefresh.run(); + } + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/actions/DeleteConversationAction.java b/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/DeleteConversationAction.java similarity index 51% rename from src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/actions/DeleteConversationAction.java rename to src/main/java/ee/carlrobert/codegpt/actions/toolwindow/DeleteConversationAction.java index c186b992..3bf84f81 100644 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/actions/DeleteConversationAction.java +++ b/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/DeleteConversationAction.java @@ -1,12 +1,13 @@ -package ee.carlrobert.codegpt.toolwindow.conversations.actions; - -import static icons.Icons.DefaultImageIcon; +package ee.carlrobert.codegpt.actions.toolwindow; import com.intellij.icons.AllIcons; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.ui.Messages; -import ee.carlrobert.codegpt.state.conversations.ConversationsState; +import ee.carlrobert.codegpt.actions.editor.EditorActionsUtil; +import ee.carlrobert.codegpt.conversations.ConversationService; +import ee.carlrobert.codegpt.conversations.ConversationsState; +import ee.carlrobert.codegpt.util.OverlayUtils; import org.jetbrains.annotations.NotNull; public class DeleteConversationAction extends AnAction { @@ -16,6 +17,7 @@ public class DeleteConversationAction extends AnAction { public DeleteConversationAction(Runnable onRefresh) { super("Delete Conversation", "Delete single conversation", AllIcons.General.Remove); this.onRefresh = onRefresh; + EditorActionsUtil.registerOrReplaceAction(this); } @Override @@ -24,11 +26,13 @@ public class DeleteConversationAction extends AnAction { } @Override - public void actionPerformed(@NotNull AnActionEvent e) { - int answer = Messages.showYesNoDialog("Are you sure you want to delete this conversation?", "Delete Converation", DefaultImageIcon); - if (answer == Messages.YES) { - ConversationsState.getInstance().deleteSelectedConversation(); - onRefresh.run(); + public void actionPerformed(@NotNull AnActionEvent event) { + if (OverlayUtils.showDeleteConversationDialog() == Messages.YES) { + var project = event.getProject(); + if (project != null) { + ConversationService.getInstance().deleteSelectedConversation(); + onRefresh.run(); + } } } } diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/actions/MoveAction.java b/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/MoveAction.java similarity index 50% rename from src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/actions/MoveAction.java rename to src/main/java/ee/carlrobert/codegpt/actions/toolwindow/MoveAction.java index 58587f8c..50dd2b57 100644 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/actions/MoveAction.java +++ b/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/MoveAction.java @@ -1,9 +1,10 @@ -package ee.carlrobert.codegpt.toolwindow.conversations.actions; +package ee.carlrobert.codegpt.actions.toolwindow; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; -import ee.carlrobert.codegpt.state.conversations.Conversation; -import ee.carlrobert.codegpt.state.conversations.ConversationsState; +import com.intellij.openapi.project.Project; +import ee.carlrobert.codegpt.conversations.Conversation; +import ee.carlrobert.codegpt.conversations.ConversationsState; import java.util.Optional; import javax.swing.Icon; import org.jetbrains.annotations.NotNull; @@ -12,7 +13,7 @@ public abstract class MoveAction extends AnAction { private final Runnable onRefresh; - protected abstract Optional getConversation(); + protected abstract Optional getConversation(@NotNull Project project); protected MoveAction(String text, String description, Icon icon, Runnable onRefresh) { super(text, description, icon); @@ -25,11 +26,14 @@ public abstract class MoveAction extends AnAction { } @Override - public void actionPerformed(@NotNull AnActionEvent e) { - getConversation() - .ifPresent(conversation -> { - ConversationsState.getInstance().setCurrentConversation(conversation); - onRefresh.run(); - }); + public void actionPerformed(@NotNull AnActionEvent event) { + var project = event.getProject(); + if (project != null) { + getConversation(project) + .ifPresent(conversation -> { + ConversationsState.getInstance().setCurrentConversation(conversation); + onRefresh.run(); + }); + } } } diff --git a/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/MoveDownAction.java b/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/MoveDownAction.java new file mode 100644 index 00000000..fa311f94 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/MoveDownAction.java @@ -0,0 +1,28 @@ +package ee.carlrobert.codegpt.actions.toolwindow; + +import com.intellij.icons.AllIcons; +import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.openapi.project.Project; +import ee.carlrobert.codegpt.actions.editor.EditorActionsUtil; +import ee.carlrobert.codegpt.conversations.Conversation; +import ee.carlrobert.codegpt.conversations.ConversationService; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +public class MoveDownAction extends MoveAction { + + public MoveDownAction(Runnable onRefresh) { + super("Move Down", "Move Down", AllIcons.Actions.MoveDown, onRefresh); + EditorActionsUtil.registerOrReplaceAction(this); + } + + @Override + public void update(@NotNull AnActionEvent event) { + super.update(event); + } + + @Override + protected Optional getConversation(@NotNull Project project) { + return ConversationService.getInstance().getPreviousConversation(); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/MoveUpAction.java b/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/MoveUpAction.java new file mode 100644 index 00000000..dac5db4e --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/MoveUpAction.java @@ -0,0 +1,28 @@ +package ee.carlrobert.codegpt.actions.toolwindow; + +import com.intellij.icons.AllIcons; +import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.openapi.project.Project; +import ee.carlrobert.codegpt.actions.editor.EditorActionsUtil; +import ee.carlrobert.codegpt.conversations.Conversation; +import ee.carlrobert.codegpt.conversations.ConversationService; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +public class MoveUpAction extends MoveAction { + + public MoveUpAction(Runnable onRefresh) { + super("Move Up", "Move up", AllIcons.Actions.MoveUp, onRefresh); + EditorActionsUtil.registerOrReplaceAction(this); + } + + @Override + public void update(@NotNull AnActionEvent event) { + super.update(event); + } + + @Override + protected Optional getConversation(@NotNull Project project) { + return project.getService(ConversationService.class).getPreviousConversation(); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/actions/OpenInEditorAction.java b/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/OpenInEditorAction.java similarity index 89% rename from src/main/java/ee/carlrobert/codegpt/toolwindow/chat/actions/OpenInEditorAction.java rename to src/main/java/ee/carlrobert/codegpt/actions/toolwindow/OpenInEditorAction.java index dc2a8e44..9e79129f 100644 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/actions/OpenInEditorAction.java +++ b/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/OpenInEditorAction.java @@ -1,4 +1,4 @@ -package ee.carlrobert.codegpt.toolwindow.chat.actions; +package ee.carlrobert.codegpt.actions.toolwindow; import static java.util.Objects.requireNonNull; @@ -9,7 +9,8 @@ import com.intellij.openapi.fileEditor.FileEditorManager; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.wm.ToolWindowManager; import com.intellij.testFramework.LightVirtualFile; -import ee.carlrobert.codegpt.state.conversations.ConversationsState; +import ee.carlrobert.codegpt.actions.editor.EditorActionsUtil; +import ee.carlrobert.codegpt.conversations.ConversationsState; import java.time.format.DateTimeFormatter; import java.util.stream.Collectors; import org.jetbrains.annotations.NotNull; @@ -18,6 +19,7 @@ public class OpenInEditorAction extends AnAction { public OpenInEditorAction() { super("Open In Editor", "Open conversation in editor", AllIcons.Actions.SplitVertically); + EditorActionsUtil.registerOrReplaceAction(this); } @Override diff --git a/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/ReplaceCodeInMainEditorAction.java b/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/ReplaceCodeInMainEditorAction.java new file mode 100644 index 00000000..a96dcdbe --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/actions/toolwindow/ReplaceCodeInMainEditorAction.java @@ -0,0 +1,35 @@ +package ee.carlrobert.codegpt.actions.toolwindow; + +import static java.util.Objects.requireNonNull; + +import com.intellij.icons.AllIcons; +import com.intellij.openapi.actionSystem.AnAction; +import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.openapi.actionSystem.PlatformDataKeys; +import ee.carlrobert.codegpt.actions.editor.EditorActionsUtil; +import ee.carlrobert.codegpt.util.EditorUtils; +import org.jetbrains.annotations.NotNull; + +public class ReplaceCodeInMainEditorAction extends AnAction { + + public ReplaceCodeInMainEditorAction() { + super("Replace in Main Editor", "Replace code in main editor", AllIcons.Actions.Replace); + EditorActionsUtil.registerOrReplaceAction(this); + } + + @Override + public void update(@NotNull AnActionEvent event) { + event.getPresentation().setEnabled( + EditorUtils.isMainEditorTextSelected(requireNonNull(event.getProject())) && + EditorUtils.hasSelection(event.getData(PlatformDataKeys.EDITOR))); + } + + @Override + public void actionPerformed(@NotNull AnActionEvent event) { + var project = event.getProject(); + var toolWindowEditor = event.getData(PlatformDataKeys.EDITOR); + if (project != null && toolWindowEditor != null) { + EditorUtils.replaceMainEditorSelection(project, requireNonNull(toolWindowEditor.getSelectionModel().getSelectedText())); + } + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/client/ActionListener.java b/src/main/java/ee/carlrobert/codegpt/client/ActionListener.java deleted file mode 100644 index a1a76025..00000000 --- a/src/main/java/ee/carlrobert/codegpt/client/ActionListener.java +++ /dev/null @@ -1,17 +0,0 @@ -package ee.carlrobert.codegpt.client; - -import ee.carlrobert.openai.client.completion.ErrorDetails; - -interface ActionListener { - default void handleComplete() { - } - - default void handleError(ErrorDetails error) { - } - - default void handleMessage(String message, String fullMessage) { - } - - default void handleTokensExceeded() { - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/client/ClientProvider.java b/src/main/java/ee/carlrobert/codegpt/client/ClientProvider.java deleted file mode 100644 index cfdb70e4..00000000 --- a/src/main/java/ee/carlrobert/codegpt/client/ClientProvider.java +++ /dev/null @@ -1,90 +0,0 @@ -package ee.carlrobert.codegpt.client; - -import com.intellij.openapi.application.Application; -import com.intellij.openapi.application.ApplicationManager; -import ee.carlrobert.codegpt.state.settings.SettingsState; -import ee.carlrobert.codegpt.state.settings.advanced.AdvancedSettingsState; -import ee.carlrobert.openai.client.AzureClient; -import ee.carlrobert.openai.client.Client; -import ee.carlrobert.openai.client.OpenAIClient; -import ee.carlrobert.openai.client.ProxyAuthenticator; -import ee.carlrobert.openai.client.azure.AzureClientRequestParams; -import ee.carlrobert.openai.client.completion.CompletionClient; -import ee.carlrobert.openai.client.dashboard.DashboardClient; -import java.net.InetSocketAddress; -import java.net.Proxy; -import java.util.concurrent.TimeUnit; - -public class ClientProvider { - - public static DashboardClient getDashboardClient() { - return getOpenAIClientBuilder(false).buildDashboardClient(); - } - - public static CompletionClient getChatCompletionClient(SettingsState settings) { - return getClientBuilder(settings).buildChatCompletionClient(); - } - - public static CompletionClient getTextCompletionClient(SettingsState settings) { - return getClientBuilder(settings).buildTextCompletionClient(); - } - - private static Client.Builder getClientBuilder(SettingsState settings) { - return settings.useAzureService ? getAzureClientBuilder() : getOpenAIClientBuilder(); - } - - private static OpenAIClient.Builder getOpenAIClientBuilder() { - return getOpenAIClientBuilder(true); - } - - private static OpenAIClient.Builder getOpenAIClientBuilder(boolean isCustomServiceEnabled) { - var settings = SettingsState.getInstance(); - var builder = new OpenAIClient.Builder(settings.getApiKey()); - - if (settings.useOpenAIService) { - builder.setOrganization(settings.organization); - } - - return (OpenAIClient.Builder) addDefaultClientParams(builder, isCustomServiceEnabled); - } - - private static AzureClient.Builder getAzureClientBuilder() { - var settings = SettingsState.getInstance(); - var params = new AzureClientRequestParams( - settings.resourceName, settings.deploymentId, settings.apiVersion); - var builder = new AzureClient.Builder(settings.getApiKey(), params) - .setActiveDirectoryAuthentication(settings.useActiveDirectoryAuthentication); - return (AzureClient.Builder) addDefaultClientParams(builder, true); - } - - private static Client.Builder addDefaultClientParams( - Client.Builder builder, boolean isCustomServiceEnabled) { - var settings = SettingsState.getInstance(); - var advancedSettings = AdvancedSettingsState.getInstance(); - var proxyHost = advancedSettings.proxyHost; - var proxyPort = advancedSettings.proxyPort; - if (!proxyHost.isEmpty() && proxyPort != 0) { - builder.setProxy( - new Proxy(advancedSettings.proxyType, new InetSocketAddress(proxyHost, proxyPort))); - if (advancedSettings.isProxyAuthSelected) { - builder.setProxyAuthenticator( - new ProxyAuthenticator(advancedSettings.proxyUsername, advancedSettings.proxyPassword)); - } - } - - if (isUnitTestingMode() || (isCustomServiceEnabled && settings.useCustomService)) { - builder.setHost(settings.customHost); - } - - return builder - .setConnectTimeout(120L, TimeUnit.SECONDS) - .setReadTimeout(60L, TimeUnit.SECONDS); - } - - private static boolean isUnitTestingMode() { - Application app = ApplicationManager.getApplication(); - return app != null && app.isUnitTestMode(); - } -} - - diff --git a/src/main/java/ee/carlrobert/codegpt/client/CompletionRequestProvider.java b/src/main/java/ee/carlrobert/codegpt/client/CompletionRequestProvider.java deleted file mode 100644 index 6cf6b1c9..00000000 --- a/src/main/java/ee/carlrobert/codegpt/client/CompletionRequestProvider.java +++ /dev/null @@ -1,122 +0,0 @@ -package ee.carlrobert.codegpt.client; - -import static java.util.stream.Collectors.toList; - -import ee.carlrobert.codegpt.EncodingManager; -import ee.carlrobert.codegpt.state.conversations.Conversation; -import ee.carlrobert.codegpt.state.conversations.ConversationsState; -import ee.carlrobert.codegpt.state.settings.SettingsState; -import ee.carlrobert.openai.client.completion.chat.ChatCompletionModel; -import ee.carlrobert.openai.client.completion.chat.request.ChatCompletionMessage; -import ee.carlrobert.openai.client.completion.chat.request.ChatCompletionRequest; -import ee.carlrobert.openai.client.completion.text.TextCompletionModel; -import ee.carlrobert.openai.client.completion.text.request.TextCompletionRequest; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -class CompletionRequestProvider { - - private static final int MAX_COMPLETION_TOKENS = 1000; - - private final EncodingManager encodingManager = EncodingManager.getInstance(); - private final String prompt; - private final Conversation conversation; - - CompletionRequestProvider(String prompt, Conversation conversation) { - this.prompt = prompt; - this.conversation = conversation; - } - - public ChatCompletionRequest buildChatCompletionRequest(String model) { - return (ChatCompletionRequest) new ChatCompletionRequest.Builder(buildMessages(model)) - .setModel(model) - .setMaxTokens(MAX_COMPLETION_TOKENS) - .build(); - } - - public TextCompletionRequest buildTextCompletionRequest(String model) { - return (TextCompletionRequest) new TextCompletionRequest.Builder(buildPrompt(model)) - .setStop(List.of(" Human:", " AI:")) - .setModel(model) - .setMaxTokens(MAX_COMPLETION_TOKENS) - .build(); - } - - private List buildMessages(String model) { - var messages = new ArrayList(); - messages.add(new ChatCompletionMessage( - "system", - "You are ChatGPT, a large language model trained by OpenAI. Answer as concisely as possible. Include code language in markdown snippets whenever possible.")); - conversation.getMessages().forEach(message -> { - messages.add(new ChatCompletionMessage("user", message.getPrompt())); - messages.add(new ChatCompletionMessage("assistant", message.getResponse())); - }); - messages.add(new ChatCompletionMessage("user", prompt)); - - // Do not calculate total usage for custom services - if (SettingsState.getInstance().useCustomService) { - return messages; - } - - int totalUsage = messages.parallelStream() - .mapToInt(encodingManager::countMessageTokens) - .sum() + MAX_COMPLETION_TOKENS; - int modelMaxTokens = ChatCompletionModel.findByCode(model).getMaxTokens(); - - if (totalUsage <= modelMaxTokens) { - return messages; - } - - return tryReducingMessagesOrThrow(messages, totalUsage, modelMaxTokens); - } - - private List tryReducingMessagesOrThrow( - List messages, int totalUsage, int modelMaxTokens) { - if (!ConversationsState.getInstance().discardAllTokenLimits) { - if (!conversation.isDiscardTokenLimit()) { - throw new TotalUsageExceededException(); - } - } - - // skip the system prompt - for (int i = 1; i < messages.size(); i++) { - if (totalUsage <= modelMaxTokens) { - break; - } - - totalUsage -= encodingManager.countMessageTokens(messages.get(i)); - messages.set(i, null); - } - - return messages.stream().filter(Objects::nonNull).collect(toList()); - } - - private StringBuilder getBasePrompt(String model) { - var isDavinciModel = TextCompletionModel.DAVINCI.getCode().equals(model); - if (isDavinciModel) { - return new StringBuilder( - "You are ChatGPT, a large language model trained by OpenAI.\n" + - "Answer in a markdown language, code blocks should contain language whenever possible.\n"); - } - return new StringBuilder( - "The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly.\n\n"); - } - - private String buildPrompt(String model) { - var basePrompt = getBasePrompt(model); - conversation.getMessages().forEach(message -> - basePrompt.append("Human: ") - .append(message.getPrompt()) - .append("\n") - .append("AI: ") - .append(message.getResponse()) - .append("\n")); - basePrompt.append("Human: ") - .append(prompt) - .append("\n") - .append("AI: ") - .append("\n"); - return basePrompt.toString(); - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/client/EventListener.java b/src/main/java/ee/carlrobert/codegpt/client/EventListener.java deleted file mode 100644 index e0b7c398..00000000 --- a/src/main/java/ee/carlrobert/codegpt/client/EventListener.java +++ /dev/null @@ -1,52 +0,0 @@ -package ee.carlrobert.codegpt.client; - -import ee.carlrobert.codegpt.state.conversations.Conversation; -import ee.carlrobert.codegpt.state.conversations.ConversationsState; -import ee.carlrobert.codegpt.state.conversations.message.Message; -import ee.carlrobert.openai.client.completion.CompletionEventListener; -import ee.carlrobert.openai.client.completion.ErrorDetails; -import java.util.function.Consumer; - -class EventListener implements CompletionEventListener { - - private final Conversation conversation; - private final Message message; - private final Consumer errorListener; - private final Runnable completeListener; - private final boolean isRetry; - - EventListener( - Conversation conversation, - Message message, - Runnable completeListener, - Consumer errorListener, - boolean isRetry) { - this.conversation = conversation; - this.completeListener = completeListener; - this.errorListener = errorListener; - this.message = message; - this.isRetry = isRetry; - } - - @Override - public void onComplete(StringBuilder messageBuilder) { - saveConversation(messageBuilder.toString()); - completeListener.run(); - } - - @Override - public void onError(ErrorDetails errorDetails) { - errorListener.accept(errorDetails); - } - - private void saveConversation(String response) { - var conversationMessages = conversation.getMessages(); - if (isRetry && !conversationMessages.isEmpty()) { - conversationMessages.remove(conversationMessages.size() - 1); - } - - message.setResponse(response); - conversation.addMessage(message); - ConversationsState.getInstance().saveConversation(conversation); - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/client/RequestHandler.java b/src/main/java/ee/carlrobert/codegpt/client/RequestHandler.java deleted file mode 100644 index 355c838a..00000000 --- a/src/main/java/ee/carlrobert/codegpt/client/RequestHandler.java +++ /dev/null @@ -1,72 +0,0 @@ -package ee.carlrobert.codegpt.client; - -import ee.carlrobert.codegpt.state.conversations.Conversation; -import ee.carlrobert.codegpt.state.conversations.message.Message; -import ee.carlrobert.codegpt.state.settings.SettingsState; -import java.util.List; -import javax.swing.SwingWorker; -import okhttp3.sse.EventSource; - -public class RequestHandler implements ActionListener { - - private final Conversation conversation; - private final StringBuilder messageBuilder = new StringBuilder(); - private SwingWorker swingWorker; - private EventSource eventSource; - - public RequestHandler(Conversation conversation) { - this.conversation = conversation; - } - - public void call(Message message, boolean isRetry) { - swingWorker = new SwingWorker<>() { - protected Void doInBackground() { - var eventListener = new EventListener( - conversation, - message, - RequestHandler.this::handleComplete, - RequestHandler.this::handleError, - isRetry) { - public void onMessage(String message) { - publish(message); - } - }; - - try { - eventSource = startCall(message, eventListener); - } catch (TotalUsageExceededException e) { - handleTokensExceeded(); - } - return null; - } - - protected void process(List chunks) { - message.setResponse(messageBuilder.toString()); - for (String text : chunks) { - messageBuilder.append(text); - handleMessage(text, messageBuilder.toString()); - } - } - }; - swingWorker.execute(); - } - - public void cancel() { - eventSource.cancel(); - swingWorker.cancel(true); - } - - private EventSource startCall(Message message, EventListener eventListener) { - var settings = SettingsState.getInstance(); - var requestProvider = new CompletionRequestProvider(message.getPrompt(), conversation); - - if (settings.isChatCompletionOptionSelected) { - return ClientProvider.getChatCompletionClient(settings).stream( - requestProvider.buildChatCompletionRequest(settings.getChatCompletionModel()), - eventListener); - } - return ClientProvider.getTextCompletionClient(settings).stream( - requestProvider.buildTextCompletionRequest(settings.getTextCompletionModel()), - eventListener); - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/client/TotalUsageExceededException.java b/src/main/java/ee/carlrobert/codegpt/client/TotalUsageExceededException.java deleted file mode 100644 index 795db78d..00000000 --- a/src/main/java/ee/carlrobert/codegpt/client/TotalUsageExceededException.java +++ /dev/null @@ -1,4 +0,0 @@ -package ee.carlrobert.codegpt.client; - -public class TotalUsageExceededException extends RuntimeException { -} diff --git a/src/main/java/ee/carlrobert/codegpt/completions/CompletionClientProvider.java b/src/main/java/ee/carlrobert/codegpt/completions/CompletionClientProvider.java new file mode 100644 index 00000000..e90143a7 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/completions/CompletionClientProvider.java @@ -0,0 +1,88 @@ +package ee.carlrobert.codegpt.completions; + +import ee.carlrobert.codegpt.credentials.AzureCredentialsManager; +import ee.carlrobert.codegpt.credentials.OpenAICredentialsManager; +import ee.carlrobert.codegpt.settings.SettingsState; +import ee.carlrobert.codegpt.settings.advanced.AdvancedSettingsState; +import ee.carlrobert.openai.client.AzureClient; +import ee.carlrobert.openai.client.Client; +import ee.carlrobert.openai.client.OpenAIClient; +import ee.carlrobert.openai.client.ProxyAuthenticator; +import ee.carlrobert.openai.client.azure.AzureClientRequestParams; +import ee.carlrobert.openai.client.completion.CompletionClient; +import ee.carlrobert.openai.client.embeddings.EmbeddingsClient; +import java.net.InetSocketAddress; +import java.net.Proxy; +import java.util.concurrent.TimeUnit; + +public class CompletionClientProvider { + + public static EmbeddingsClient getEmbeddingsClient() { + var settings = SettingsState.getInstance(); + + if (settings.useOpenAIService) { + var baseHost = SettingsState.getInstance().openAIBaseHost; + return ((OpenAIClient.Builder) getOpenAIClientBuilder().setHost(baseHost)).buildEmbeddingsClient(); + } + + return null; // TODO + } + + public static CompletionClient getChatCompletionClient(SettingsState settings) { + return getClientBuilder(settings).buildChatCompletionClient(); + } + + @Deprecated + public static CompletionClient getTextCompletionClient(SettingsState settings) { + return getClientBuilder(settings).buildTextCompletionClient(); + } + + public static Client.Builder getClientBuilder(SettingsState settings) { + return settings.useAzureService ? + getAzureClientBuilder().setHost(settings.azureBaseHost) : + getOpenAIClientBuilder().setHost(settings.openAIBaseHost); + } + + private static OpenAIClient.Builder getOpenAIClientBuilder() { + var settings = SettingsState.getInstance(); + var builder = new OpenAIClient.Builder(OpenAICredentialsManager.getInstance().getApiKey()); + + if (settings.useOpenAIService) { + builder.setOrganization(settings.openAIOrganization); + } + + return (OpenAIClient.Builder) addDefaultClientParams(builder); + } + + private static AzureClient.Builder getAzureClientBuilder() { + var settings = SettingsState.getInstance(); + var params = new AzureClientRequestParams(settings.azureResourceName, settings.azureDeploymentId, settings.azureApiVersion); + var azureCredentials = AzureCredentialsManager.getInstance(); + var secret = settings.useAzureActiveDirectoryAuthentication ? + azureCredentials.getAzureActiveDirectoryToken() : + azureCredentials.getAzureOpenAIApiKey(); + var builder = new AzureClient.Builder(secret, params).setActiveDirectoryAuthentication(settings.useAzureActiveDirectoryAuthentication); + return (AzureClient.Builder) addDefaultClientParams(builder); + } + + private static Client.Builder addDefaultClientParams(Client.Builder builder) { + var advancedSettings = AdvancedSettingsState.getInstance(); + var proxyHost = advancedSettings.proxyHost; + var proxyPort = advancedSettings.proxyPort; + if (!proxyHost.isEmpty() && proxyPort != 0) { + builder.setProxy( + new Proxy(advancedSettings.proxyType, new InetSocketAddress(proxyHost, proxyPort))); + if (advancedSettings.isProxyAuthSelected) { + builder.setProxyAuthenticator( + new ProxyAuthenticator(advancedSettings.proxyUsername, advancedSettings.proxyPassword)); + } + } + + return builder + .setConnectTimeout((long) advancedSettings.connectTimeout, TimeUnit.SECONDS) + .setReadTimeout((long) advancedSettings.readTimeout, TimeUnit.SECONDS) + .setRetryOnReadTimeout(true); + } +} + + diff --git a/src/main/java/ee/carlrobert/codegpt/completions/CompletionRequestHandler.java b/src/main/java/ee/carlrobert/codegpt/completions/CompletionRequestHandler.java new file mode 100644 index 00000000..7b445a01 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/completions/CompletionRequestHandler.java @@ -0,0 +1,121 @@ +package ee.carlrobert.codegpt.completions; + +import com.intellij.openapi.project.Project; +import ee.carlrobert.codegpt.conversations.Conversation; +import ee.carlrobert.codegpt.conversations.message.Message; +import ee.carlrobert.codegpt.settings.SettingsState; +import ee.carlrobert.openai.client.completion.CompletionEventListener; +import ee.carlrobert.openai.client.completion.ErrorDetails; +import java.util.List; +import java.util.function.BiConsumer; +import java.util.function.Consumer; +import javax.swing.SwingWorker; +import okhttp3.sse.EventSource; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public class CompletionRequestHandler { + + private final Project project; + private final StringBuilder messageBuilder = new StringBuilder(); + private SwingWorker swingWorker; + private EventSource eventSource; + private @Nullable Consumer messageListener; + private @Nullable BiConsumer errorListener; + private @Nullable Consumer completedListener; + private @Nullable Runnable tokensExceededListener; + private boolean useContextualSearch; + + public CompletionRequestHandler(@NotNull Project project) { + this.project = project; + } + + public CompletionRequestHandler withContextualSearch(boolean useContextualSearch) { + this.useContextualSearch = useContextualSearch; + return this; + } + + public void addMessageListener(Consumer messageListener) { + this.messageListener = messageListener; + } + + public void addErrorListener(BiConsumer errorListener) { + this.errorListener = errorListener; + } + + public void addRequestCompletedListener(Consumer completedListener) { + this.completedListener = completedListener; + } + + public void addTokensExceededListener(Runnable tokensExceededListener) { + this.tokensExceededListener = tokensExceededListener; + } + + public void call(Conversation conversation, Message message, boolean isRetry) { + swingWorker = new SwingWorker<>() { + protected Void doInBackground() { + try { + eventSource = startCall(conversation, message, isRetry, new CompletionEventListener() { + @Override + public void onMessage(String message) { + publish(message); + } + + @Override + public void onComplete(StringBuilder messageBuilder) { + if (completedListener != null) { + completedListener.accept(messageBuilder.toString()); + } + } + + @Override + public void onError(ErrorDetails error, Throwable ex) { + if (errorListener != null) { + errorListener.accept(error, ex); + } + } + }); + } catch (TotalUsageExceededException e) { + if (tokensExceededListener != null) { + tokensExceededListener.run(); + } + } + return null; + } + + protected void process(List chunks) { + message.setResponse(messageBuilder.toString()); + for (String text : chunks) { + messageBuilder.append(text); + if (messageListener != null) { + messageListener.accept(text); + } + } + } + }; + swingWorker.execute(); + } + + public void cancel() { + if (eventSource != null) { + eventSource.cancel(); + } + swingWorker.cancel(true); + } + + private EventSource startCall( + @NotNull Conversation conversation, + @NotNull Message message, + boolean isRetry, + CompletionEventListener eventListener) { + var settings = SettingsState.getInstance(); + var requestProvider = new CompletionRequestProvider(project, conversation); + + if (settings.isChatCompletionOptionSelected) { + return CompletionClientProvider.getChatCompletionClient(settings).stream( + requestProvider.buildChatCompletionRequest(settings.getChatCompletionModel(), message, isRetry, useContextualSearch), eventListener); + } + return CompletionClientProvider.getTextCompletionClient(settings).stream( + requestProvider.buildTextCompletionRequest(settings.getTextCompletionModel(), message, isRetry), eventListener); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/completions/CompletionRequestProvider.java b/src/main/java/ee/carlrobert/codegpt/completions/CompletionRequestProvider.java new file mode 100644 index 00000000..498d01ce --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/completions/CompletionRequestProvider.java @@ -0,0 +1,160 @@ +package ee.carlrobert.codegpt.completions; + +import static java.util.stream.Collectors.toList; + +import com.intellij.openapi.diagnostic.Logger; +import com.intellij.openapi.project.Project; +import ee.carlrobert.codegpt.EncodingManager; +import ee.carlrobert.codegpt.conversations.Conversation; +import ee.carlrobert.codegpt.conversations.ConversationsState; +import ee.carlrobert.codegpt.conversations.message.Message; +import ee.carlrobert.codegpt.embeddings.EmbeddingsService; +import ee.carlrobert.codegpt.settings.configuration.ConfigurationState; +import ee.carlrobert.codegpt.util.FileUtils; +import ee.carlrobert.openai.client.completion.chat.ChatCompletionModel; +import ee.carlrobert.openai.client.completion.chat.request.ChatCompletionMessage; +import ee.carlrobert.openai.client.completion.chat.request.ChatCompletionRequest; +import ee.carlrobert.openai.client.completion.text.TextCompletionModel; +import ee.carlrobert.openai.client.completion.text.request.TextCompletionRequest; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +public class CompletionRequestProvider { + + private static final Logger LOG = Logger.getInstance(CompletionRequestProvider.class); + + public static final String COMPLETION_SYSTEM_PROMPT = "You are an AI programming assistant.\n" + + "When asked for you name, you must respond with \"CodeGPT\".\n" + + "Follow the user's requirements carefully & to the letter.\n" + + "Your responses should be informative and logical.\n" + + "You should always adhere to technical information.\n" + + "If the user asks for code or technical questions, you must provide code suggestions and adhere to technical information.\n" + + "If the question is related to a developer, CodeGPT must respond with content related to a developer.\n" + + "First think step-by-step - describe your plan for what to build in pseudocode, written out in great detail.\n" + + "Then output the code in a single code block.\n" + + "Minimize any other prose.\n" + + "Keep your answers short and impersonal.\n" + + "Use Markdown formatting in your answers.\n" + + "Make sure to include the programming language name at the start of the Markdown code blocks.\n" + + "Avoid wrapping the whole response in triple backticks.\n" + + "The user works in an IDE built by JetBrains which has a concept for editors with open files, integrated unit test support, " + + "and output pane that shows the output of running the code as well as an integrated terminal.\n" + + "You can only give one reply for each conversation turn."; + + private final EncodingManager encodingManager = EncodingManager.getInstance(); + private final EmbeddingsService embeddingsService; + private final Conversation conversation; + + public CompletionRequestProvider(Project project, Conversation conversation) { + this.embeddingsService = EmbeddingsService.getInstance(project); + this.conversation = conversation; + } + + public ChatCompletionRequest buildChatCompletionRequest(String model, Message message, boolean isRetry) { + return buildChatCompletionRequest(model, message, isRetry, false); + } + + public ChatCompletionRequest buildChatCompletionRequest(String model, Message message, boolean isRetry, boolean useContextualSearch) { + return (ChatCompletionRequest) new ChatCompletionRequest.Builder(buildMessages(model, message, isRetry, useContextualSearch)) + .setModel(model) + .setMaxTokens(ConfigurationState.getInstance().maxTokens) + .setTemperature(ConfigurationState.getInstance().temperature) + .build(); + } + + public TextCompletionRequest buildTextCompletionRequest(String model, Message message, boolean isRetry) { + return (TextCompletionRequest) new TextCompletionRequest.Builder(buildPrompt(model, message, isRetry)) + .setStop(List.of(" Human:", " AI:")) + .setModel(model) + .setMaxTokens(ConfigurationState.getInstance().maxTokens) + .setTemperature(ConfigurationState.getInstance().temperature) + .build(); + } + + private List buildMessages(String model, Message message, boolean isRetry, boolean useContextualSearch) { + var messages = new ArrayList(); + if (useContextualSearch) { + var context = embeddingsService.buildRelevantContext(message.getPrompt()); + var prompt = FileUtils.getResourceContent("/prompts/retrieval-prompt.txt") + .replace("{prompt}", message.getPrompt()) + .replace("{context}", context.getContext()); + + LOG.info("Retrieved context:\n" + prompt); + messages.add(new ChatCompletionMessage("user", prompt)); + } else { + var systemPrompt = ConfigurationState.getInstance().systemPrompt; + messages.add(new ChatCompletionMessage("system", + systemPrompt.isEmpty() ? COMPLETION_SYSTEM_PROMPT : systemPrompt)); + + for (var prevMessage : conversation.getMessages()) { + if (isRetry && prevMessage.getId().equals(message.getId())) { + break; + } + messages.add(new ChatCompletionMessage("user", prevMessage.getPrompt())); + messages.add(new ChatCompletionMessage("assistant", prevMessage.getResponse())); + } + messages.add(new ChatCompletionMessage("user", message.getPrompt())); + } + + int totalUsage = messages.parallelStream() + .mapToInt(encodingManager::countMessageTokens) + .sum() + ConfigurationState.getInstance().maxTokens; + int modelMaxTokens = ChatCompletionModel.findByCode(model).getMaxTokens(); + + if (totalUsage <= modelMaxTokens) { + return messages; + } + + return tryReducingMessagesOrThrow(messages, totalUsage, modelMaxTokens); + } + + private List tryReducingMessagesOrThrow(List messages, int totalUsage, int modelMaxTokens) { + if (!ConversationsState.getInstance().discardAllTokenLimits) { + if (!conversation.isDiscardTokenLimit()) { + throw new TotalUsageExceededException(); + } + } + + // skip the system prompt + for (int i = 1; i < messages.size(); i++) { + if (totalUsage <= modelMaxTokens) { + break; + } + + totalUsage -= encodingManager.countMessageTokens(messages.get(i)); + messages.set(i, null); + } + + return messages.stream().filter(Objects::nonNull).collect(toList()); + } + + private StringBuilder getBasePrompt(String model) { + var isDavinciModel = TextCompletionModel.DAVINCI.getCode().equals(model); + if (isDavinciModel) { + return new StringBuilder( + "You are ChatGPT, a large language model trained by OpenAI.\n" + + "Answer in a markdown language, code blocks should contain language whenever possible.\n"); + } + return new StringBuilder( + "The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly.\n\n"); + } + + private String buildPrompt(String model, Message message, boolean isRetry) { + var systemPrompt = ConfigurationState.getInstance().systemPrompt; + var basePrompt = systemPrompt.isEmpty() ? getBasePrompt(model) : new StringBuilder(systemPrompt + "\n"); + conversation.getMessages().forEach(prevMessage -> + basePrompt.append("Human: ") + .append(prevMessage.getPrompt()) + .append("\n") + .append("AI: ") + .append(prevMessage.getResponse()) + .append("\n")); + basePrompt.append("Human: ") + .append(message.getPrompt()) + .append("\n") + .append("AI: ") + .append("\n"); + return basePrompt.toString(); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/completions/TotalUsageExceededException.java b/src/main/java/ee/carlrobert/codegpt/completions/TotalUsageExceededException.java new file mode 100644 index 00000000..ffdfbf08 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/completions/TotalUsageExceededException.java @@ -0,0 +1,4 @@ +package ee.carlrobert.codegpt.completions; + +class TotalUsageExceededException extends RuntimeException { +} diff --git a/src/main/java/ee/carlrobert/codegpt/state/conversations/Conversation.java b/src/main/java/ee/carlrobert/codegpt/conversations/Conversation.java similarity index 93% rename from src/main/java/ee/carlrobert/codegpt/state/conversations/Conversation.java rename to src/main/java/ee/carlrobert/codegpt/conversations/Conversation.java index 5e9e016c..10ccb20d 100644 --- a/src/main/java/ee/carlrobert/codegpt/state/conversations/Conversation.java +++ b/src/main/java/ee/carlrobert/codegpt/conversations/Conversation.java @@ -1,8 +1,8 @@ -package ee.carlrobert.codegpt.state.conversations; +package ee.carlrobert.codegpt.conversations; import static java.util.stream.Collectors.toList; -import ee.carlrobert.codegpt.state.conversations.message.Message; +import ee.carlrobert.codegpt.conversations.message.Message; import ee.carlrobert.openai.client.ClientCode; import java.time.LocalDateTime; import java.util.ArrayList; diff --git a/src/main/java/ee/carlrobert/codegpt/state/conversations/ConversationsState.java b/src/main/java/ee/carlrobert/codegpt/conversations/ConversationService.java similarity index 52% rename from src/main/java/ee/carlrobert/codegpt/state/conversations/ConversationsState.java rename to src/main/java/ee/carlrobert/codegpt/conversations/ConversationService.java index f73e08fc..934ed48b 100644 --- a/src/main/java/ee/carlrobert/codegpt/state/conversations/ConversationsState.java +++ b/src/main/java/ee/carlrobert/codegpt/conversations/ConversationService.java @@ -1,14 +1,9 @@ -package ee.carlrobert.codegpt.state.conversations; +package ee.carlrobert.codegpt.conversations; -import com.intellij.openapi.application.ApplicationManager; -import com.intellij.openapi.components.PersistentStateComponent; -import com.intellij.openapi.components.State; -import com.intellij.openapi.components.Storage; -import com.intellij.util.xmlb.XmlSerializerUtil; -import com.intellij.util.xmlb.annotations.OptionTag; -import ee.carlrobert.codegpt.state.conversations.converter.ConversationConverter; -import ee.carlrobert.codegpt.state.conversations.converter.ConversationsConverter; -import ee.carlrobert.codegpt.state.settings.SettingsState; +import static java.util.stream.Collectors.toList; + +import ee.carlrobert.codegpt.conversations.message.Message; +import ee.carlrobert.codegpt.settings.SettingsState; import ee.carlrobert.openai.client.ClientCode; import java.time.LocalDateTime; import java.util.ArrayList; @@ -16,59 +11,30 @@ import java.util.Comparator; import java.util.List; import java.util.Optional; import java.util.UUID; -import java.util.stream.Collectors; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -@State( - name = "ee.carlrobert.codegpt.state.conversations.ConversationsState", - storages = @Storage("ChatGPTConversations_170.xml") -) -public class ConversationsState implements PersistentStateComponent { +public class ConversationService { - @OptionTag(converter = ConversationsConverter.class) - public ConversationsContainer conversationsContainer = new ConversationsContainer(); + private static ConversationService instance; + private final ConversationsState conversationState = ConversationsState.getInstance(); - @OptionTag(converter = ConversationConverter.class) - public Conversation currentConversation; - - public boolean discardAllTokenLimits; - - public static ConversationsState getInstance() { - return ApplicationManager.getApplication().getService(ConversationsState.class); + private ConversationService() { } - @Nullable - @Override - public ConversationsState getState() { - return this; - } - - @Override - public void loadState(@NotNull ConversationsState state) { - XmlSerializerUtil.copyBean(state, this); - } - - public void discardAllTokenLimits() { - this.discardAllTokenLimits = true; - } - - public void setCurrentConversation(@Nullable Conversation conversation) { - this.currentConversation = conversation; - } - - public static @Nullable Conversation getCurrentConversation() { - return getInstance().currentConversation; + public static ConversationService getInstance() { + if (instance == null) { + instance = new ConversationService(); + } + return instance; } public List getSortedConversations() { - return conversationsContainer - .getConversationsMapping() + return conversationState.getConversationsMapping() .values() .stream() .flatMap(List::stream) .sorted(Comparator.comparing(Conversation::getUpdatedOn).reversed()) - .collect(Collectors.toList()); + .collect(toList()); } public Conversation createConversation(ClientCode clientCode) { @@ -85,7 +51,7 @@ public class ConversationsState implements PersistentStateComponent(); @@ -94,9 +60,45 @@ public class ConversationsState implements PersistentStateComponent item.getId().equals(message.getId())) + .findFirst().orElseThrow(); + messageToBeSaved.setResponse(response); + saveConversation(conversation); + return; + } + + message.setResponse(response); + conversation.addMessage(message); + saveConversation(conversation); + } + + public void saveMessage(@NotNull Conversation conversation, @NotNull Message message) { + conversation.setUpdatedOn(LocalDateTime.now()); + var iterator = conversationState.getConversationsMapping() + .get(conversation.getClientCode()) + .listIterator(); + while (iterator.hasNext()) { + var next = iterator.next(); + next.setMessages( + next.getMessages().stream().map(item -> { + if (item.getId() == message.getId()) { + return message; + } + return item; + }).collect(toList())); + if (next.getId().equals(conversation.getId())) { + iterator.set(conversation); + } + } + } + public void saveConversation(Conversation conversation) { conversation.setUpdatedOn(LocalDateTime.now()); - var iterator = conversationsContainer.getConversationsMapping() + var iterator = conversationState.getConversationsMapping() .get(conversation.getClientCode()) .listIterator(); while (iterator.hasNext()) { @@ -105,21 +107,21 @@ public class ConversationsState implements PersistentStateComponent getPreviousConversation() { @@ -131,6 +133,7 @@ public class ConversationsState implements PersistentStateComponent tryGetNextOrPreviousConversation(boolean isPrevious) { + var currentConversation = ConversationsState.getCurrentConversation(); if (currentConversation != null) { var sortedConversations = getSortedConversations(); for (int i = 0; i < sortedConversations.size(); i++) { @@ -147,23 +150,36 @@ public class ConversationsState implements PersistentStateComponent { + + @OptionTag(converter = ConversationsConverter.class) + public ConversationsContainer conversationsContainer = new ConversationsContainer(); + + @OptionTag(converter = ConversationConverter.class) + public Conversation currentConversation; + + public boolean discardAllTokenLimits; + + public static ConversationsState getInstance() { + return ApplicationManager.getApplication().getService(ConversationsState.class); + } + + @Nullable + @Override + public ConversationsState getState() { + return this; + } + + @Override + public void loadState(@NotNull ConversationsState state) { + XmlSerializerUtil.copyBean(state, this); + } + + public void discardAllTokenLimits() { + this.discardAllTokenLimits = true; + } + + public void setCurrentConversation(@Nullable Conversation conversation) { + this.currentConversation = conversation; + } + + public static @Nullable Conversation getCurrentConversation() { + return getInstance().currentConversation; + } + + public Map> getConversationsMapping() { + return conversationsContainer.getConversationsMapping(); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/state/conversations/converter/BaseConverter.java b/src/main/java/ee/carlrobert/codegpt/conversations/converter/BaseConverter.java similarity index 94% rename from src/main/java/ee/carlrobert/codegpt/state/conversations/converter/BaseConverter.java rename to src/main/java/ee/carlrobert/codegpt/conversations/converter/BaseConverter.java index 65ba9a31..b2fceb35 100644 --- a/src/main/java/ee/carlrobert/codegpt/state/conversations/converter/BaseConverter.java +++ b/src/main/java/ee/carlrobert/codegpt/conversations/converter/BaseConverter.java @@ -1,4 +1,4 @@ -package ee.carlrobert.codegpt.state.conversations.converter; +package ee.carlrobert.codegpt.conversations.converter; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/src/main/java/ee/carlrobert/codegpt/state/conversations/converter/ConversationConverter.java b/src/main/java/ee/carlrobert/codegpt/conversations/converter/ConversationConverter.java similarity index 54% rename from src/main/java/ee/carlrobert/codegpt/state/conversations/converter/ConversationConverter.java rename to src/main/java/ee/carlrobert/codegpt/conversations/converter/ConversationConverter.java index b624efa1..41ccc9fe 100644 --- a/src/main/java/ee/carlrobert/codegpt/state/conversations/converter/ConversationConverter.java +++ b/src/main/java/ee/carlrobert/codegpt/conversations/converter/ConversationConverter.java @@ -1,6 +1,6 @@ -package ee.carlrobert.codegpt.state.conversations.converter; +package ee.carlrobert.codegpt.conversations.converter; -import ee.carlrobert.codegpt.state.conversations.Conversation; +import ee.carlrobert.codegpt.conversations.Conversation; public class ConversationConverter extends BaseConverter { diff --git a/src/main/java/ee/carlrobert/codegpt/state/conversations/converter/ConversationsConverter.java b/src/main/java/ee/carlrobert/codegpt/conversations/converter/ConversationsConverter.java similarity index 55% rename from src/main/java/ee/carlrobert/codegpt/state/conversations/converter/ConversationsConverter.java rename to src/main/java/ee/carlrobert/codegpt/conversations/converter/ConversationsConverter.java index 3425a866..38ad2618 100644 --- a/src/main/java/ee/carlrobert/codegpt/state/conversations/converter/ConversationsConverter.java +++ b/src/main/java/ee/carlrobert/codegpt/conversations/converter/ConversationsConverter.java @@ -1,6 +1,6 @@ -package ee.carlrobert.codegpt.state.conversations.converter; +package ee.carlrobert.codegpt.conversations.converter; -import ee.carlrobert.codegpt.state.conversations.ConversationsContainer; +import ee.carlrobert.codegpt.conversations.ConversationsContainer; public class ConversationsConverter extends BaseConverter { diff --git a/src/main/java/ee/carlrobert/codegpt/state/conversations/message/Message.java b/src/main/java/ee/carlrobert/codegpt/conversations/message/Message.java similarity index 56% rename from src/main/java/ee/carlrobert/codegpt/state/conversations/message/Message.java rename to src/main/java/ee/carlrobert/codegpt/conversations/message/Message.java index fa8a9a0f..941529c0 100644 --- a/src/main/java/ee/carlrobert/codegpt/state/conversations/message/Message.java +++ b/src/main/java/ee/carlrobert/codegpt/conversations/message/Message.java @@ -1,7 +1,8 @@ -package ee.carlrobert.codegpt.state.conversations.message; +package ee.carlrobert.codegpt.conversations.message; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; import java.util.UUID; public class Message { @@ -9,6 +10,7 @@ public class Message { private final UUID id; private final String prompt; private String response; + private String userMessage; public Message(String prompt, String response) { this(prompt); @@ -36,4 +38,29 @@ public class Message { public void setResponse(String response) { this.response = response; } + + public String getUserMessage() { + return userMessage; + } + + public void setUserMessage(String userMessage) { + this.userMessage = userMessage; + } + + @Override + public boolean equals(Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Message)) { + return false; + } + Message other = (Message) obj; + return Objects.equals(id, other.id); + } + + @Override + public int hashCode() { + return Objects.hash(id, prompt); + } } diff --git a/src/main/java/ee/carlrobert/codegpt/credentials/AzureCredentialsManager.java b/src/main/java/ee/carlrobert/codegpt/credentials/AzureCredentialsManager.java new file mode 100644 index 00000000..794009a0 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/credentials/AzureCredentialsManager.java @@ -0,0 +1,63 @@ +package ee.carlrobert.codegpt.credentials; + +import com.intellij.credentialStore.CredentialAttributes; +import ee.carlrobert.codegpt.settings.SettingsState; +import org.jetbrains.annotations.Nullable; + +public class AzureCredentialsManager { + + private static final CredentialAttributes azureOpenAIApiKeyCredentialAttributes = + CredentialsUtil.createCredentialAttributes("AZURE_OPENAI_API_KEY"); + private static final CredentialAttributes azureActiveDirectoryTokenCredentialAttributes = + CredentialsUtil.createCredentialAttributes("AZURE_ACTIVE_DIRECTORY_TOKEN"); + private static AzureCredentialsManager instance; + + private String azureOpenAIApiKey; + private String azureActiveDirectoryToken; + + private AzureCredentialsManager() { + azureOpenAIApiKey = CredentialsUtil.getPassword(azureOpenAIApiKeyCredentialAttributes); + azureActiveDirectoryToken = CredentialsUtil.getPassword(azureActiveDirectoryTokenCredentialAttributes); + } + + public static AzureCredentialsManager getInstance() { + if (instance == null) { + instance = new AzureCredentialsManager(); + } + return instance; + } + + public @Nullable String getAzureOpenAIApiKey() { + return azureOpenAIApiKey; + } + + public void setApiKey(String azureOpenAIApiKey) { + this.azureOpenAIApiKey = azureOpenAIApiKey; + CredentialsUtil.setPassword(azureOpenAIApiKeyCredentialAttributes, azureOpenAIApiKey); + } + + public @Nullable String getAzureActiveDirectoryToken() { + return azureActiveDirectoryToken; + } + + public void setAzureActiveDirectoryToken(String azureActiveDirectoryToken) { + this.azureActiveDirectoryToken = azureActiveDirectoryToken; + CredentialsUtil.setPassword(azureActiveDirectoryTokenCredentialAttributes, azureActiveDirectoryToken); + } + + public boolean isCredentialSet() { + var settings = SettingsState.getInstance(); + if (settings.useAzureApiKeyAuthentication) { + return isKeySet(); + } + return isTokenSet(); + } + + private boolean isTokenSet() { + return azureActiveDirectoryToken != null && !azureActiveDirectoryToken.isEmpty(); + } + + private boolean isKeySet() { + return azureOpenAIApiKey != null && !azureOpenAIApiKey.isEmpty(); + } +} \ No newline at end of file diff --git a/src/main/java/ee/carlrobert/codegpt/credentials/CredentialsUtil.java b/src/main/java/ee/carlrobert/codegpt/credentials/CredentialsUtil.java new file mode 100644 index 00000000..bf187d85 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/credentials/CredentialsUtil.java @@ -0,0 +1,23 @@ +package ee.carlrobert.codegpt.credentials; + +import com.intellij.credentialStore.CredentialAttributes; +import com.intellij.credentialStore.CredentialAttributesKt; +import com.intellij.ide.passwordSafe.PasswordSafe; +import org.jetbrains.annotations.Nullable; + +public class CredentialsUtil { + + private static final PasswordSafe passwordSafe = PasswordSafe.getInstance(); + + public static CredentialAttributes createCredentialAttributes(String key) { + return new CredentialAttributes(CredentialAttributesKt.generateServiceName("CodeGPT", key)); + } + + public static void setPassword(CredentialAttributes credentialAttributes, String password) { + passwordSafe.setPassword(credentialAttributes, password); + } + + public static @Nullable String getPassword(CredentialAttributes credentialAttributes) { + return passwordSafe.getPassword(credentialAttributes); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/credentials/OpenAICredentialsManager.java b/src/main/java/ee/carlrobert/codegpt/credentials/OpenAICredentialsManager.java new file mode 100644 index 00000000..aee0216f --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/credentials/OpenAICredentialsManager.java @@ -0,0 +1,36 @@ +package ee.carlrobert.codegpt.credentials; + +import com.intellij.credentialStore.CredentialAttributes; +import org.jetbrains.annotations.Nullable; + +public class OpenAICredentialsManager { + + private static final CredentialAttributes openAIApiKeyCredentialAttributes = CredentialsUtil.createCredentialAttributes("OPENAI_API_KEY"); + private static OpenAICredentialsManager instance; + + private String openAIApiKey; + + private OpenAICredentialsManager() { + openAIApiKey = CredentialsUtil.getPassword(openAIApiKeyCredentialAttributes); + } + + public static OpenAICredentialsManager getInstance() { + if (instance == null) { + instance = new OpenAICredentialsManager(); + } + return instance; + } + + public boolean isApiKeySet() { + return openAIApiKey != null && !openAIApiKey.isEmpty(); + } + + public @Nullable String getApiKey() { + return openAIApiKey; + } + + public void setApiKey(String openAIApiKey) { + this.openAIApiKey = openAIApiKey; + CredentialsUtil.setPassword(openAIApiKeyCredentialAttributes, openAIApiKey); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/credentials/UserCredentialsManager.java b/src/main/java/ee/carlrobert/codegpt/credentials/UserCredentialsManager.java new file mode 100644 index 00000000..fdf6ba29 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/credentials/UserCredentialsManager.java @@ -0,0 +1,33 @@ +package ee.carlrobert.codegpt.credentials; + +import com.intellij.credentialStore.CredentialAttributes; +import org.jetbrains.annotations.Nullable; + +public class UserCredentialsManager { + + private static final CredentialAttributes accountPasswordCredentialAttributes = CredentialsUtil.createCredentialAttributes("ACCOUNT_PASSWORD"); + + private static UserCredentialsManager instance; + + private String accountPassword; + + private UserCredentialsManager() { + accountPassword = CredentialsUtil.getPassword(accountPasswordCredentialAttributes); + } + + public static UserCredentialsManager getInstance() { + if (instance == null) { + instance = new UserCredentialsManager(); + } + return instance; + } + + public @Nullable String getAccountPassword() { + return accountPassword; + } + + public void setAccountPassword(String accountPassword) { + this.accountPassword = accountPassword; + CredentialsUtil.setPassword(accountPasswordCredentialAttributes, accountPassword); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/embeddings/CheckedFile.java b/src/main/java/ee/carlrobert/codegpt/embeddings/CheckedFile.java new file mode 100644 index 00000000..39bded5e --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/embeddings/CheckedFile.java @@ -0,0 +1,35 @@ +package ee.carlrobert.codegpt.embeddings; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class CheckedFile { + + private final String fileName; + private final String filePath; + private final String fileContent; + + public CheckedFile(File file) { + this.fileName = file.getName(); + this.filePath = file.getPath(); + try { + this.fileContent = new String(Files.readAllBytes(Paths.get(filePath))); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + public String getFileName() { + return fileName; + } + + public String getFilePath() { + return filePath; + } + + public String getFileContent() { + return fileContent; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/embeddings/CodebaseIndexingCompletedNotifier.java b/src/main/java/ee/carlrobert/codegpt/embeddings/CodebaseIndexingCompletedNotifier.java new file mode 100644 index 00000000..455964b6 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/embeddings/CodebaseIndexingCompletedNotifier.java @@ -0,0 +1,11 @@ +package ee.carlrobert.codegpt.embeddings; + +import com.intellij.util.messages.Topic; + +public interface CodebaseIndexingCompletedNotifier { + + Topic INDEXING_COMPLETED_TOPIC = + Topic.create("codebaseIndexingCompleted", CodebaseIndexingCompletedNotifier.class); + + void indexingCompleted(); +} diff --git a/src/main/java/ee/carlrobert/codegpt/embeddings/CodebaseIndexingTask.java b/src/main/java/ee/carlrobert/codegpt/embeddings/CodebaseIndexingTask.java new file mode 100644 index 00000000..7c564b18 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/embeddings/CodebaseIndexingTask.java @@ -0,0 +1,71 @@ +package ee.carlrobert.codegpt.embeddings; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.intellij.notification.NotificationType; +import com.intellij.openapi.diagnostic.Logger; +import com.intellij.openapi.progress.ProgressIndicator; +import com.intellij.openapi.progress.ProgressManager; +import com.intellij.openapi.progress.Task; +import com.intellij.openapi.progress.impl.BackgroundableProcessIndicator; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.util.io.FileUtil; +import ee.carlrobert.codegpt.CodeGPTBundle; +import ee.carlrobert.codegpt.CodeGPTPlugin; +import ee.carlrobert.codegpt.util.FileUtils; +import ee.carlrobert.codegpt.util.OverlayUtils; +import java.util.List; +import java.util.Map; +import org.jetbrains.annotations.NotNull; + +public class CodebaseIndexingTask extends Task.Backgroundable { + + private static final Logger LOG = Logger.getInstance(CodebaseIndexingTask.class); + private final Project project; + private final List checkedFiles; + + public CodebaseIndexingTask(Project project, List checkedFiles) { + super(project, CodeGPTBundle.get("codebaseIndexing.task.title"), true); + this.project = project; + this.checkedFiles = checkedFiles; + } + + public void run() { + ProgressManager.getInstance() + .runProcessWithProgressAsynchronously(this, new BackgroundableProcessIndicator(this)); + } + + @Override + public void run(@NotNull ProgressIndicator indicator) { + LOG.info("Indexing started"); + + String fileContent; + try { + fileContent = new ObjectMapper().writeValueAsString(Map.of("content", checkedFiles)); + } catch (JsonProcessingException e) { + throw new RuntimeException("Unable to serialize json file"); + } + + if (!FileUtil.exists(CodeGPTPlugin.getIndexStorePath())) { + FileUtils.tryCreateDirectory(CodeGPTPlugin.getIndexStorePath()); + } + FileUtils.createFile(CodeGPTPlugin.getProjectIndexStorePath(project), "index.json", fileContent); + + try { + indicator.setFraction(0); + var embeddings = EmbeddingsService.getInstance(project).createEmbeddings(checkedFiles, indicator); + VectorStore.getInstance(project).save(embeddings); + OverlayUtils.showNotification("Indexing completed", NotificationType.INFORMATION); + + project.getMessageBus() + .syncPublisher(CodebaseIndexingCompletedNotifier.INDEXING_COMPLETED_TOPIC) + .indexingCompleted(); + } catch (RuntimeException e) { + LOG.error("Something went wrong while indexing the codebase", e); + } finally { + if (indicator.isRunning()) { + indicator.stop(); + } + } + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/embeddings/EmbeddingsService.java b/src/main/java/ee/carlrobert/codegpt/embeddings/EmbeddingsService.java new file mode 100644 index 00000000..713bfb97 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/embeddings/EmbeddingsService.java @@ -0,0 +1,134 @@ +package ee.carlrobert.codegpt.embeddings; + +import static com.github.jelmerk.knn.util.VectorUtils.normalize; +import static java.util.stream.Collectors.toList; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.github.jelmerk.knn.Item; +import com.github.jelmerk.knn.SearchResult; +import com.intellij.openapi.diagnostic.Logger; +import com.intellij.openapi.progress.ProgressIndicator; +import com.intellij.openapi.project.Project; +import ee.carlrobert.codegpt.completions.CompletionClientProvider; +import ee.carlrobert.codegpt.embeddings.splitter.SplitterFactory; +import ee.carlrobert.codegpt.settings.SettingsState; +import ee.carlrobert.codegpt.util.FileUtils; +import ee.carlrobert.openai.client.completion.chat.ChatCompletionModel; +import ee.carlrobert.openai.client.completion.chat.request.ChatCompletionMessage; +import ee.carlrobert.openai.client.completion.chat.request.ChatCompletionRequest; +import ee.carlrobert.openai.client.completion.chat.response.ChatCompletionResponse; +import ee.carlrobert.openai.client.embeddings.EmbeddingsClient; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.stream.Collectors; +import org.jetbrains.annotations.Nullable; + +public class EmbeddingsService { + + private static final Logger LOG = Logger.getInstance(EmbeddingsService.class); + private static EmbeddingsService instance; + + private final VectorStore vectorStore; + private final EmbeddingsClient embeddingsClient; + + private EmbeddingsService(Project project) { + this.vectorStore = VectorStore.getInstance(project); + this.embeddingsClient = CompletionClientProvider.getEmbeddingsClient(); + } + + public static EmbeddingsService getInstance(Project project) { + if (instance == null) { + instance = new EmbeddingsService(project); + } + return instance; + } + + public List getEmbeddings(List chunks) { + return embeddingsClient.getEmbeddings(chunks); + } + + public GeneratedContextDetails buildRelevantContext(String prompt) { + try { + var inputEmbedding = embeddingsClient.getEmbedding(getSearchQuery(prompt)); + var sortedResult = vectorStore.loadIndex() + .findNearest(normalize(inputEmbedding), 10) + .stream() + .map(SearchResult::item) + .sorted(Comparator.comparing(Word::getMeta)) + .collect(toList()); + + var context = sortedResult.stream().map(Word::id).collect(Collectors.joining()); + var fileNames = sortedResult.stream().map(Word::getMeta).collect(Collectors.toSet()); + + return new GeneratedContextDetails(context, fileNames); + } catch (IOException e) { + LOG.error("Unable to load vector index", e); + return new GeneratedContextDetails(prompt, Collections.emptySet()); + } + } + + public List> createEmbeddings(List listOfCheckedFileDetails, @Nullable ProgressIndicator indicator) { + var words = new ArrayList>(); + for (int i = 0; i < listOfCheckedFileDetails.size(); i++) { + try { + var fileDetails = listOfCheckedFileDetails.get(i); + addEmbeddings(fileDetails.getFileName(), fileDetails.getFileContent(), words); + + if (indicator != null) { + indicator.setFraction((double) i / listOfCheckedFileDetails.size()); + } + } catch (Throwable t) { + // ignore + } + } + return words; + } + + private String getSearchQuery(String userPrompt) throws JsonProcessingException { + var message = new ChatCompletionMessage("user", FileUtils.getResourceContent("/prompts/text-generator.txt").replace("{prompt}", userPrompt)); + var request = new ChatCompletionRequest.Builder(List.of(message)) + .setModel(ChatCompletionModel.GPT_4) + .setMaxTokens(400) + .setTemperature(0.1) + .setStream(false) + .build(); + + return new ObjectMapper() + .readValue(CompletionClientProvider.getChatCompletionClient(SettingsState.getInstance()).call(request), ChatCompletionResponse.class) + .getChoices() + .get(0) + .getMessage() + .getContent(); + } + + private void addEmbeddings(String fileName, String fileContent, List> prevEmbeddings) { + var fileExtension = FileUtils.getFileExtension(fileName); + var codeSplitter = SplitterFactory.getCodeSplitter(fileExtension); + if (codeSplitter != null) { + var chunks = codeSplitter.split(fileName, fileContent); + var embeddings = embeddingsClient.getEmbeddings(chunks); + for (int i = 0; i < chunks.size(); i++) { + prevEmbeddings.add(new Word(chunks.get(i), fileName, normalize(embeddings.get(i)))); + } + } else { + var chunks = splitText(fileContent, 400); + var embeddings = getEmbeddings(chunks); + for (int i = 0; i < chunks.size(); i++) { + prevEmbeddings.add(new Word(chunks.get(i), fileName, normalize(embeddings.get(i)))); + } + } + } + + private static List splitText(String str, int chunkSize) { + int len = str.length(); + var chunks = new ArrayList(); + for (int i = 0; i < len; i += chunkSize) { + chunks.add(str.substring(i, Math.min(len, i + chunkSize))); + } + return chunks; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/embeddings/FolderStructureTreePanel.java b/src/main/java/ee/carlrobert/codegpt/embeddings/FolderStructureTreePanel.java new file mode 100644 index 00000000..33483029 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/embeddings/FolderStructureTreePanel.java @@ -0,0 +1,248 @@ +package ee.carlrobert.codegpt.embeddings; + +import static java.util.stream.Collectors.toList; + +import com.intellij.icons.AllIcons; +import com.intellij.openapi.fileTypes.FileTypeManager; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.project.ProjectUtil; +import com.intellij.openapi.vcs.changes.ChangeListManager; +import com.intellij.openapi.vcs.changes.VcsIgnoreManager; +import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl; +import com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl; +import com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry; +import com.intellij.ui.CheckboxTree; +import com.intellij.ui.CheckboxTreeListener; +import com.intellij.ui.CheckedTreeNode; +import com.intellij.ui.ScrollPaneFactory; +import com.intellij.ui.components.JBLabel; +import com.intellij.util.ui.AsyncProcessIcon; +import com.intellij.util.ui.JBUI; +import ee.carlrobert.codegpt.util.FileUtils; +import java.awt.BorderLayout; +import java.awt.FlowLayout; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.io.File; +import java.text.DecimalFormat; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import javax.swing.JPanel; +import javax.swing.JTree; +import javax.swing.SwingUtilities; +import org.jetbrains.annotations.NotNull; + +public class FolderStructureTreePanel { + + private CheckboxTree checkboxTree; + private final AsyncProcessIcon loadingFilesSpinner; + private final JPanel rootPanelContainer; + private final VcsIgnoreManager ignoreManager; + private final ChangeListManager changeListManager; + private long totalSize = 0; + + public FolderStructureTreePanel(@NotNull Project project) { + this.ignoreManager = VcsIgnoreManager.getInstance(project); + this.loadingFilesSpinner = new AsyncProcessIcon("loading_files"); + this.changeListManager = ChangeListManager.getInstance(project); + + var projectDirectory = ProjectUtil.guessProjectDir(project); + if (projectDirectory == null) { + throw new RuntimeException("Couldn't find project directory"); + } + + var rootNode = new CheckedTreeNode(projectDirectory); + rootPanelContainer = new JPanel(new BorderLayout()); + + CompletableFuture + .runAsync(() -> traverseDirectory(rootNode, projectDirectory)) + .thenRun(() -> SwingUtilities.invokeLater(() -> { + checkboxTree = createCheckboxTree(rootNode, true); + loadingFilesSpinner.setVisible(false); + updatePanel(); + })); + + checkboxTree = createCheckboxTree(rootNode, false); + + rootPanelContainer.add(createRootPanel()); + rootPanelContainer.add(createFooterPanel(), BorderLayout.SOUTH); + } + + private CheckboxTree createCheckboxTree(CheckedTreeNode rootNode, boolean enabled) { + checkboxTree = new CheckboxTree(createFileTypesRenderer(), rootNode); + checkboxTree.setEditable(enabled); + checkboxTree.setEnabled(enabled); + checkboxTree.addCheckboxTreeListener(new CheckboxTreeListener() { + @Override + public void nodeStateChanged(@NotNull CheckedTreeNode node) { + try { + var length = ((VirtualFileImpl) node.getUserObject()).getLength(); + if (node.isChecked()) { + totalSize += length; + } else { + totalSize -= length; + } + } catch (Throwable ignored) { + } + } + }); + checkboxTree.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + updatePanel(); + } + }); + return checkboxTree; + } + + private void updatePanel() { + rootPanelContainer.removeAll(); + rootPanelContainer.add(createRootPanel()); + rootPanelContainer.add(createFooterPanel(), BorderLayout.SOUTH); + rootPanelContainer.revalidate(); + rootPanelContainer.repaint(); + } + + public JPanel getPanel() { + return rootPanelContainer; + } + + private JPanel createRootPanel() { + var scrollPane = ScrollPaneFactory.createScrollPane(checkboxTree); + scrollPane.setPreferredSize(JBUI.size(250, 375)); + return JBUI.Panels.simplePanel().addToCenter(scrollPane); + } + + private JPanel createFooterPanel() { + var panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 8)); + if (loadingFilesSpinner.isVisible()) { + panel.add(new JBLabel("Total size:")); + panel.add(loadingFilesSpinner); + } else { + panel.add(new JBLabel("Total size: " + + convertFileSize(totalSize) + " ~ " + + (convertLongValue(totalSize / 4)) + " tokens " + " ~ " + + new DecimalFormat("#.##").format(((double) (totalSize / 4) / 1000) * 0.0001) + " $")); + } + return panel; + } + + public List getCheckedFiles() { + return getCheckedVirtualFiles().stream() + .map(item -> new CheckedFile(new File(item.getPath()))) + .collect(toList()); + } + + private List getCheckedVirtualFiles() { + return Arrays.stream(checkboxTree.getCheckedNodes(VirtualFileSystemEntry.class, node -> node instanceof VirtualFileImpl)) + .map(entry -> (VirtualFileImpl) entry) + .collect(toList()); + } + + private void processChildFile(@NotNull CheckedTreeNode node, @NotNull VirtualFile file) { + long fileSize = file.getLength(); + + try { + if (node.isChecked()) { + node.setChecked(!changeListManager.isIgnoredFile(file) && + !ignoreManager.isPotentiallyIgnoredFile(file) && + FileUtils.isUtf8File(file.getPath()) && + fileSize < Math.pow(1024, 2)); + } + + if (node.isChecked()) { + totalSize += fileSize; + } + } catch (RuntimeException ignored) { + } + } + + private void traverseDirectory(@NotNull CheckedTreeNode parentNode, @NotNull VirtualFile projectDirectory) { + for (VirtualFile childFile : projectDirectory.getChildren()) { + var node = new CheckedTreeNode(childFile); + parentNode.add(node); + + if (!parentNode.isChecked() || ignoredFileDirectories.parallelStream().anyMatch(it -> it.equalsIgnoreCase(childFile.getName()))) { + node.setChecked(false); + } + + if (childFile.isDirectory()) { + traverseDirectory(node, childFile); + } else { + processChildFile(node, childFile); + } + } + } + + private @NotNull CheckboxTree.CheckboxTreeCellRenderer createFileTypesRenderer() { + return new CheckboxTree.CheckboxTreeCellRenderer() { + @Override + public void customizeRenderer(JTree t, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean focus) { + if (!(value instanceof CheckedTreeNode)) { + return; + } + + var node = (CheckedTreeNode) value; + var userObject = node.getUserObject(); + + if (userObject instanceof VirtualFileSystemEntry) { + getTextRenderer().append(((VirtualFileSystemEntry) userObject).getName()); + + if (userObject instanceof VirtualDirectoryImpl) { + getTextRenderer().setIcon(AllIcons.Nodes.Folder); + } else { + var fileType = FileTypeManager.getInstance().getFileTypeByFile((VirtualFileSystemEntry) userObject); + getTextRenderer().setIcon(fileType.getIcon()); + getTextRenderer().append(" - " + convertFileSize(((VirtualFileSystemEntry) userObject).getLength())); + } + } + } + }; + } + + private static String convertFileSize(long fileSizeInBytes) { + String[] units = {"B", "KB", "MB", "GB"}; + int unitIndex = 0; + double fileSize = fileSizeInBytes; + + while (fileSize >= 1024 && unitIndex < units.length - 1) { + fileSize /= 1024; + unitIndex++; + } + + return new DecimalFormat("#.##").format(fileSize) + " " + units[unitIndex]; + } + + private static String convertLongValue(long value) { + if (value >= 1_000_000) { + return value / 1_000_000 + "M"; + } + if (value >= 1_000) { + return value / 1_000 + "K"; + } + + return String.valueOf(value); + } + + private static final List ignoredFileDirectories = List.of( + "node_modules", + ".git", + ".svn", + ".bzr", + ".cvs", + ".m2", + ".idea", + ".vscode", + ".project", + ".settings", + "node_modules", + "vendor", + "lib", + "build", + "target", + "media", + "logs", + "uploads"); +} diff --git a/src/main/java/ee/carlrobert/codegpt/embeddings/GeneratedContextDetails.java b/src/main/java/ee/carlrobert/codegpt/embeddings/GeneratedContextDetails.java new file mode 100644 index 00000000..b3573f93 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/embeddings/GeneratedContextDetails.java @@ -0,0 +1,22 @@ +package ee.carlrobert.codegpt.embeddings; + +import java.util.Set; + +public class GeneratedContextDetails { + + private final String context; + private final Set fileNames; + + public GeneratedContextDetails(String context, Set fileNames) { + this.context = context; + this.fileNames = fileNames; + } + + public String getContext() { + return context; + } + + public Set getFileNames() { + return fileNames; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/embeddings/VectorStore.java b/src/main/java/ee/carlrobert/codegpt/embeddings/VectorStore.java new file mode 100644 index 00000000..9def939f --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/embeddings/VectorStore.java @@ -0,0 +1,64 @@ +package ee.carlrobert.codegpt.embeddings; + +import com.github.jelmerk.knn.DistanceFunctions; +import com.github.jelmerk.knn.Item; +import com.github.jelmerk.knn.hnsw.HnswIndex; +import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.util.io.FileUtil; +import ee.carlrobert.codegpt.CodeGPTPlugin; +import java.io.File; +import java.io.IOException; +import java.util.List; + +public class VectorStore { + + private static VectorStore instance; + + private final String indexPath; + private final Project project; + + private VectorStore(Project project) { + this.project = project; + this.indexPath = getIndexStorePath(project); + } + + public static VectorStore getInstance(Project project) { + if (instance == null) { + instance = new VectorStore(project); + } + return instance; + } + + public HnswIndex loadIndex() throws IOException { + return loadIndex(indexPath); + } + + public HnswIndex loadIndex(String path) throws IOException { + return HnswIndex.load(new File(path), this.getClass().getClassLoader()); + } + + public void save(List> words) { + var hnswIndex = HnswIndex + .newBuilder(words.get(0).vector().length, DistanceFunctions.DOUBLE_COSINE_DISTANCE, words.size()) + .build(); + try { + hnswIndex.addAll(words); + hnswIndex.save(new File(indexPath)); + } catch (IOException | InterruptedException e) { + throw new RuntimeException(e); + } + } + + public boolean isIndexExists() { + return FileUtil.exists(CodeGPTPlugin.getProjectIndexPath(project)); + } + + private String getIndexStorePath(Project project) { + var basePath = CodeGPTPlugin.getProjectIndexStorePath(project); + if (ApplicationManager.getApplication().isUnitTestMode()) { + basePath = new File("src/test/resources/indexes").getAbsolutePath(); + } + return basePath + File.separator + "hnsw.index"; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/embeddings/Word.java b/src/main/java/ee/carlrobert/codegpt/embeddings/Word.java new file mode 100644 index 00000000..33d69765 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/embeddings/Word.java @@ -0,0 +1,46 @@ +package ee.carlrobert.codegpt.embeddings; + +import com.github.jelmerk.knn.Item; +import java.util.Arrays; + +public class Word implements Item { + + private static final long serialVersionUID = 1L; + + private final String id; + private final String meta; + private final double[] vector; + + public Word(String id, String meta, double[] vector) { + this.id = id; + this.meta = meta; + this.vector = vector; + } + + @Override + public String id() { + return id; + } + + @Override + public double[] vector() { + return vector; + } + + @Override + public int dimensions() { + return vector.length; + } + + @Override + public String toString() { + return "Word{" + + "id='" + id + '\'' + + ", vector=" + Arrays.toString(vector) + + '}'; + } + + public String getMeta() { + return meta; + } +} \ No newline at end of file diff --git a/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/CodeSplitter.java b/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/CodeSplitter.java new file mode 100644 index 00000000..84c6692e --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/CodeSplitter.java @@ -0,0 +1,32 @@ +package ee.carlrobert.codegpt.embeddings.splitter; + +import java.util.ArrayList; +import java.util.List; +import org.antlr.v4.runtime.CharStreams; +import org.antlr.v4.runtime.CodePointCharStream; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.misc.Interval; +import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.runtime.tree.ParseTreeListener; +import org.antlr.v4.runtime.tree.ParseTreeWalker; + +abstract class CodeSplitter implements Splitter { + + protected List chunks = new ArrayList<>(); + + protected abstract ParseTree getParseTree(CodePointCharStream charStream); + + protected abstract ParseTreeListener getParseTreeListener(); + + protected String parseContext(ParserRuleContext ctx) { + return ctx.start.getInputStream().getText( + new Interval(ctx.start.getStartIndex(), ctx.stop.getStopIndex())); + } + + @Override + public List split(String fileName, String content) { + chunks = new ArrayList<>(); + ParseTreeWalker.DEFAULT.walk(getParseTreeListener(), getParseTree(CharStreams.fromString(content))); + return chunks; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/JavaCodeSplitter.java b/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/JavaCodeSplitter.java new file mode 100644 index 00000000..2e4f51b8 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/JavaCodeSplitter.java @@ -0,0 +1,32 @@ +package ee.carlrobert.codegpt.embeddings.splitter; + +import grammar.JavaLexer; +import grammar.JavaParser; +import grammar.JavaParserBaseListener; +import org.antlr.v4.runtime.CodePointCharStream; +import org.antlr.v4.runtime.CommonTokenStream; +import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.runtime.tree.ParseTreeListener; + +public class JavaCodeSplitter extends CodeSplitter { + + @Override + protected ParseTree getParseTree(CodePointCharStream charStream) { + return new JavaParser(new CommonTokenStream(new JavaLexer(charStream))).compilationUnit(); + } + + @Override + protected ParseTreeListener getParseTreeListener() { + return new JavaParserBaseListener() { + @Override + public void enterConstructorDeclaration(JavaParser.ConstructorDeclarationContext ctx) { + chunks.add(parseContext(ctx)); + } + + @Override + public void enterMethodDeclaration(JavaParser.MethodDeclarationContext ctx) { + chunks.add(parseContext(ctx)); + } + }; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/JsonSplitter.java b/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/JsonSplitter.java new file mode 100644 index 00000000..6af51f55 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/JsonSplitter.java @@ -0,0 +1,28 @@ +package ee.carlrobert.codegpt.embeddings.splitter; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.intellij.openapi.diagnostic.Logger; +import java.util.ArrayList; +import java.util.List; +import org.json.JSONObject; + +public class JsonSplitter implements Splitter { + + private static final Logger LOG = Logger.getInstance(JsonSplitter.class); + + @Override + public List split(String fileName, String content) { + var chunks = new ArrayList(); + + try { + // TODO: Switch to ObjectMapper + for (var entry : new JSONObject(content).toMap().entrySet()) { + chunks.add(new ObjectMapper().writeValueAsString(entry)); + } + } catch (JsonProcessingException e) { + LOG.error("Something went wrong while chunking the json", e); + } + return chunks; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/PythonCodeSplitter.java b/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/PythonCodeSplitter.java new file mode 100644 index 00000000..14362451 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/PythonCodeSplitter.java @@ -0,0 +1,27 @@ +package ee.carlrobert.codegpt.embeddings.splitter; + +import grammar.PythonLexer; +import grammar.PythonParser; +import grammar.PythonParserBaseListener; +import org.antlr.v4.runtime.CodePointCharStream; +import org.antlr.v4.runtime.CommonTokenStream; +import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.runtime.tree.ParseTreeListener; + +public class PythonCodeSplitter extends CodeSplitter { + + @Override + protected ParseTree getParseTree(CodePointCharStream charStream) { + return new PythonParser(new CommonTokenStream(new PythonLexer(charStream))).file_input(); + } + + @Override + protected ParseTreeListener getParseTreeListener() { + return new PythonParserBaseListener() { + @Override + public void enterClass_or_func_def_stmt(PythonParser.Class_or_func_def_stmtContext ctx) { + chunks.add(parseContext(ctx)); + } + }; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/Splitter.java b/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/Splitter.java new file mode 100644 index 00000000..2d2e74aa --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/Splitter.java @@ -0,0 +1,8 @@ +package ee.carlrobert.codegpt.embeddings.splitter; + +import java.util.List; + +public interface Splitter { + + List split(String fileName, String content); +} diff --git a/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/SplitterFactory.java b/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/SplitterFactory.java new file mode 100644 index 00000000..be347bf7 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/SplitterFactory.java @@ -0,0 +1,22 @@ +package ee.carlrobert.codegpt.embeddings.splitter; + +import org.jetbrains.annotations.Nullable; + +public class SplitterFactory { + + public static @Nullable Splitter getCodeSplitter(String fileExtension) { + switch (fileExtension) { + case "java": + return new JavaCodeSplitter(); + case "py": + return new PythonCodeSplitter(); + case "json": + return new JsonSplitter(); + case "ts": + case "tsx": + return new TypeScriptCodeSplitter(); + default: + return null; + } + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/TypeScriptCodeSplitter.java b/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/TypeScriptCodeSplitter.java new file mode 100644 index 00000000..2f87524c --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/embeddings/splitter/TypeScriptCodeSplitter.java @@ -0,0 +1,22 @@ +package ee.carlrobert.codegpt.embeddings.splitter; + +import grammar.TypeScriptLexer; +import grammar.TypeScriptParser; +import grammar.TypeScriptParserBaseListener; +import org.antlr.v4.runtime.CodePointCharStream; +import org.antlr.v4.runtime.CommonTokenStream; +import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.runtime.tree.ParseTreeListener; + +public class TypeScriptCodeSplitter extends CodeSplitter { + + @Override + protected ParseTree getParseTree(CodePointCharStream charStream) { + return new TypeScriptParser(new CommonTokenStream(new TypeScriptLexer(charStream))).program(); + } + + @Override + protected ParseTreeListener getParseTreeListener() { + return new TypeScriptParserBaseListener() {}; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/state/settings/BaseModelComboBox.java b/src/main/java/ee/carlrobert/codegpt/settings/BaseModelComboBox.java similarity index 95% rename from src/main/java/ee/carlrobert/codegpt/state/settings/BaseModelComboBox.java rename to src/main/java/ee/carlrobert/codegpt/settings/BaseModelComboBox.java index a8f104a8..293d2d7f 100644 --- a/src/main/java/ee/carlrobert/codegpt/state/settings/BaseModelComboBox.java +++ b/src/main/java/ee/carlrobert/codegpt/settings/BaseModelComboBox.java @@ -1,4 +1,4 @@ -package ee.carlrobert.codegpt.state.settings; +package ee.carlrobert.codegpt.settings; import com.intellij.openapi.ui.ComboBox; import ee.carlrobert.openai.client.completion.CompletionModel; diff --git a/src/main/java/ee/carlrobert/codegpt/state/settings/components/ModelSelectionForm.java b/src/main/java/ee/carlrobert/codegpt/settings/ModelSelectionForm.java similarity index 57% rename from src/main/java/ee/carlrobert/codegpt/state/settings/components/ModelSelectionForm.java rename to src/main/java/ee/carlrobert/codegpt/settings/ModelSelectionForm.java index 012e3593..c4041790 100644 --- a/src/main/java/ee/carlrobert/codegpt/state/settings/components/ModelSelectionForm.java +++ b/src/main/java/ee/carlrobert/codegpt/settings/ModelSelectionForm.java @@ -1,66 +1,77 @@ -package ee.carlrobert.codegpt.state.settings.components; +package ee.carlrobert.codegpt.settings; +import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.ui.ComboBox; import com.intellij.ui.components.JBRadioButton; -import com.intellij.ui.components.JBTextField; import com.intellij.util.ui.FormBuilder; import com.intellij.util.ui.JBUI; -import ee.carlrobert.codegpt.state.settings.BaseModelComboBox; -import ee.carlrobert.codegpt.state.settings.SettingsState; +import ee.carlrobert.codegpt.CodeGPTBundle; import ee.carlrobert.codegpt.util.SwingUtils; import ee.carlrobert.openai.client.completion.CompletionModel; import ee.carlrobert.openai.client.completion.chat.ChatCompletionModel; import ee.carlrobert.openai.client.completion.text.TextCompletionModel; +import java.util.NoSuchElementException; import javax.swing.ButtonGroup; import javax.swing.JPanel; public class ModelSelectionForm { + private static final Logger LOG = Logger.getInstance(ModelSelectionForm.class); + + private static final String modelSelectionLabel = CodeGPTBundle.get("settingsConfigurable.section.model.selectionFieldLabel"); + private final ComboBox chatCompletionBaseModelComboBox; private final ComboBox textCompletionBaseModelComboBox; - private final JBTextField customChatCompletionModelField; - private final JBTextField customTextCompletionModelField; private final JBRadioButton useChatCompletionRadioButton; private final JBRadioButton useTextCompletionRadioButton; private final JPanel chatCompletionModelsPanel; - private final JPanel customChatCompletionModelPanel; - private final JPanel customTextCompletionModelPanel; private final JPanel textCompletionModelsPanel; + private CompletionModel findChatCompletionModelOrGetDefault(SettingsState settings) { + try { + return ChatCompletionModel.findByCode(settings.chatCompletionBaseModel); + } catch (NoSuchElementException e) { + LOG.warn("Couldn't find completion model with code: " + settings.chatCompletionBaseModel); + return ChatCompletionModel.GPT_3_5; + } + } + + private CompletionModel findTextCompletionModelOrGetDefault(SettingsState settings) { + try { + return TextCompletionModel.findByCode(settings.textCompletionBaseModel); + } catch (NoSuchElementException e) { + LOG.warn("Couldn't find completion model with code: " + settings.textCompletionBaseModel); + return TextCompletionModel.DAVINCI; + } + } + public ModelSelectionForm(SettingsState settings) { chatCompletionBaseModelComboBox = new BaseModelComboBox( - new ChatCompletionModel[]{ + new ChatCompletionModel[] { ChatCompletionModel.GPT_3_5, - ChatCompletionModel.GPT_3_5_SNAPSHOT, + ChatCompletionModel.GPT_3_5_16k, ChatCompletionModel.GPT_4, ChatCompletionModel.GPT_4_32k }, - ChatCompletionModel.findByCode(settings.chatCompletionBaseModel)); + findChatCompletionModelOrGetDefault(settings)); chatCompletionModelsPanel = SwingUtils.createPanel( - chatCompletionBaseModelComboBox, "Model:", false); + chatCompletionBaseModelComboBox, modelSelectionLabel, false); chatCompletionModelsPanel.setBorder(JBUI.Borders.emptyLeft(16)); textCompletionBaseModelComboBox = new BaseModelComboBox( - new TextCompletionModel[]{ + new TextCompletionModel[] { TextCompletionModel.DAVINCI, TextCompletionModel.CURIE, TextCompletionModel.BABBAGE, TextCompletionModel.ADA, }, - TextCompletionModel.findByCode(settings.textCompletionBaseModel)); - customChatCompletionModelField = new JBTextField(settings.customChatCompletionModel, 20); - customChatCompletionModelPanel = SwingUtils.createPanel( - customChatCompletionModelField, "Model:", false); - customChatCompletionModelPanel.setBorder(JBUI.Borders.emptyLeft(16)); - customTextCompletionModelField = new JBTextField(settings.customTextCompletionModel, 20); - customTextCompletionModelPanel = SwingUtils.createPanel( - customTextCompletionModelField, "Model:", false); - customTextCompletionModelPanel.setBorder(JBUI.Borders.emptyLeft(16)); - textCompletionModelsPanel = SwingUtils.createPanel( - textCompletionBaseModelComboBox, "Model:", false); + findTextCompletionModelOrGetDefault(settings)); + textCompletionModelsPanel = SwingUtils.createPanel(textCompletionBaseModelComboBox, modelSelectionLabel); textCompletionModelsPanel.setBorder(JBUI.Borders.emptyLeft(16)); - useChatCompletionRadioButton = new JBRadioButton("Use chat completion", + useChatCompletionRadioButton = new JBRadioButton( + CodeGPTBundle.get("settingsConfigurable.section.model.useChatCompletionRadioButtonLabel"), settings.isChatCompletionOptionSelected); - useTextCompletionRadioButton = new JBRadioButton("Use text completion", + useTextCompletionRadioButton = new JBRadioButton( + CodeGPTBundle.get("settingsConfigurable.section.model.useTextCompletionRadioButtonLabel"), settings.isTextCompletionOptionSelected); registerFields(); @@ -68,23 +79,14 @@ public class ModelSelectionForm { } public JPanel getForm() { - var panel = FormBuilder.createFormBuilder() + var form = FormBuilder.createFormBuilder() .addComponent(useChatCompletionRadioButton) - .addComponent(customChatCompletionModelPanel) .addComponent(chatCompletionModelsPanel) .addComponent(useTextCompletionRadioButton) - .addComponent(customTextCompletionModelPanel) .addComponent(textCompletionModelsPanel) .getPanel(); - panel.setBorder(JBUI.Borders.emptyLeft(16)); - return panel; - } - - public void changeModelPanelsVisibility(boolean isCustomModelsVisible) { - chatCompletionModelsPanel.setVisible(!isCustomModelsVisible); - textCompletionModelsPanel.setVisible(!isCustomModelsVisible); - customChatCompletionModelPanel.setVisible(isCustomModelsVisible); - customTextCompletionModelPanel.setVisible(isCustomModelsVisible); + form.setBorder(JBUI.Borders.emptyLeft(16)); + return form; } public boolean isChatCompletionOptionSelected() { @@ -119,22 +121,6 @@ public class ModelSelectionForm { chatCompletionBaseModelComboBox.setSelectedItem(ChatCompletionModel.findByCode(modelCode)); } - public String getCustomChatCompletionModel() { - return customChatCompletionModelField.getText(); - } - - public void setCustomChatCompletionModel(String model) { - customChatCompletionModelField.setText(model); - } - - public String getCustomTextCompletionModel() { - return customTextCompletionModelField.getText(); - } - - public void setCustomTextCompletionModel(String model) { - customTextCompletionModelField.setText(model); - } - private void registerRadioButtons() { var completionButtonGroup = new ButtonGroup(); completionButtonGroup.add(useChatCompletionRadioButton); @@ -149,8 +135,6 @@ public class ModelSelectionForm { private void enableModelFields(boolean isChatCompletionModel) { chatCompletionBaseModelComboBox.setEnabled(isChatCompletionModel); - customChatCompletionModelField.setEnabled(isChatCompletionModel); textCompletionBaseModelComboBox.setEnabled(!isChatCompletionModel); - customTextCompletionModelField.setEnabled(!isChatCompletionModel); } } diff --git a/src/main/java/ee/carlrobert/codegpt/settings/ServiceSelectionForm.java b/src/main/java/ee/carlrobert/codegpt/settings/ServiceSelectionForm.java new file mode 100644 index 00000000..2e162205 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/settings/ServiceSelectionForm.java @@ -0,0 +1,295 @@ +package ee.carlrobert.codegpt.settings; + +import com.intellij.ui.TitledSeparator; +import com.intellij.ui.components.JBPasswordField; +import com.intellij.ui.components.JBRadioButton; +import com.intellij.ui.components.JBTextField; +import com.intellij.util.ui.FormBuilder; +import com.intellij.util.ui.JBUI; +import com.intellij.util.ui.UI; +import ee.carlrobert.codegpt.CodeGPTBundle; +import ee.carlrobert.codegpt.credentials.AzureCredentialsManager; +import ee.carlrobert.codegpt.credentials.OpenAICredentialsManager; +import ee.carlrobert.codegpt.util.SwingUtils; +import java.util.Map; +import javax.swing.ButtonGroup; +import javax.swing.JPanel; + +public class ServiceSelectionForm { + + private final JBRadioButton useOpenAIServiceRadioButton; + private final JBRadioButton useAzureServiceRadioButton; + + private final JBPasswordField openAIApiKey; + private final JBTextField openAIBaseHostField; + private final JBTextField openAIOrganizationField; + private final JPanel openAIServiceSectionPanel; + + private final JBRadioButton useAzureApiKeyAuthenticationRadioButton; + private final JBPasswordField azureApiKeyField; + private final JPanel azureApiKeyFieldPanel; + private final JBRadioButton useAzureActiveDirectoryAuthenticationRadioButton; + private final JBPasswordField azureActiveDirectoryTokenField; + private final JPanel azureActiveDirectoryTokenFieldPanel; + private final JBTextField azureBaseHostField; + private final JBTextField azureResourceNameField; + private final JBTextField azureDeploymentIdField; + private final JBTextField azureApiVersionField; + private final JPanel azureServiceSectionPanel; + + public ServiceSelectionForm(SettingsState settings) { + openAIApiKey = new JBPasswordField(); + openAIApiKey.setColumns(30); + openAIApiKey.setText(OpenAICredentialsManager.getInstance().getApiKey()); + + azureApiKeyField = new JBPasswordField(); + azureApiKeyField.setColumns(30); + azureApiKeyField.setText(AzureCredentialsManager.getInstance().getAzureOpenAIApiKey()); + + azureApiKeyFieldPanel = UI.PanelFactory.panel(azureApiKeyField) + .withLabel("API key:") + .resizeX(false) + .createPanel(); + + azureActiveDirectoryTokenField = new JBPasswordField(); + azureActiveDirectoryTokenField.setColumns(30); + azureActiveDirectoryTokenField.setText(AzureCredentialsManager.getInstance().getAzureActiveDirectoryToken()); + + azureActiveDirectoryTokenFieldPanel = UI.PanelFactory.panel(azureActiveDirectoryTokenField) + .withLabel("Bearer token:") + .resizeX(false) + .createPanel(); + + useAzureApiKeyAuthenticationRadioButton = new JBRadioButton( + "Use API Key authentication", + settings.useAzureApiKeyAuthentication); + useAzureActiveDirectoryAuthenticationRadioButton = new JBRadioButton( + "Use Active Directory authentication", + settings.useAzureActiveDirectoryAuthentication); + + useOpenAIServiceRadioButton = new JBRadioButton( + CodeGPTBundle.get("settingsConfigurable.section.service.useOpenAIServiceRadioButtonLabel"), settings.useOpenAIService); + useAzureServiceRadioButton = new JBRadioButton( + CodeGPTBundle.get("settingsConfigurable.section.service.useAzureServiceRadioButtonLabel"), settings.useAzureService); + + openAIBaseHostField = new JBTextField(settings.openAIBaseHost, 30); + openAIOrganizationField = new JBTextField(settings.openAIOrganization, 30); + + azureBaseHostField = new JBTextField(settings.azureBaseHost, 30); + azureResourceNameField = new JBTextField(settings.azureResourceName, 30); + azureDeploymentIdField = new JBTextField(settings.azureDeploymentId, 30); + azureApiVersionField = new JBTextField(settings.azureApiVersion, 30); + + openAIServiceSectionPanel = createOpenAIServiceSectionPanel(); + azureServiceSectionPanel = createAzureServiceSectionPanel(); + + registerPanelsVisibility(settings); + registerRadioButtons(); + } + + public JPanel getForm() { + var form = FormBuilder.createFormBuilder() + .addComponent(useOpenAIServiceRadioButton) + .addComponent(openAIServiceSectionPanel) + .addComponent(useAzureServiceRadioButton) + .addComponent(azureServiceSectionPanel) + .getPanel(); + form.setBorder(JBUI.Borders.emptyLeft(16)); + return form; + } + + public void setOpenAIServiceSelected(boolean selected) { + useOpenAIServiceRadioButton.setSelected(selected); + } + + public boolean isOpenAIServiceSelected() { + return useOpenAIServiceRadioButton.isSelected(); + } + + public void setAzureServiceSelected(boolean selected) { + useAzureServiceRadioButton.setSelected(selected); + } + + public boolean isAzureServiceSelected() { + return useAzureServiceRadioButton.isSelected(); + } + + public void setOpenAIApiKey(String apiKey) { + openAIApiKey.setText(apiKey); + } + + public String getOpenAIApiKey() { + return new String(openAIApiKey.getPassword()); + } + + public void setOpenAIBaseHost(String baseHost) { + openAIBaseHostField.setText(baseHost); + } + + public String getOpenAIBaseHost() { + return openAIBaseHostField.getText(); + } + + public void setOpenAIOrganization(String organization) { + openAIOrganizationField.setText(organization); + } + + public String getOpenAIOrganization() { + return openAIOrganizationField.getText(); + } + + public void setAzureActiveDirectoryAuthenticationSelected(boolean selected) { + useAzureActiveDirectoryAuthenticationRadioButton.setSelected(selected); + } + + public boolean isAzureActiveDirectoryAuthenticationSelected() { + return useAzureActiveDirectoryAuthenticationRadioButton.isSelected(); + } + + public void setAzureActiveDirectoryToken(String bearerToken) { + azureActiveDirectoryTokenField.setText(bearerToken); + } + + public String getAzureActiveDirectoryToken() { + return new String(azureActiveDirectoryTokenField.getPassword()); + } + + public void setAzureApiKeyAuthenticationSelected(boolean selected) { + useAzureApiKeyAuthenticationRadioButton.setSelected(selected); + } + + public boolean isAzureApiKeyAuthenticationSelected() { + return useAzureApiKeyAuthenticationRadioButton.isSelected(); + } + + public void setAzureApiKey(String apiKey) { + azureApiKeyField.setText(apiKey); + } + + public String getAzureOpenAIApiKey() { + return new String(azureApiKeyField.getPassword()); + } + + public void setAzureResourceName(String resourceName) { + azureResourceNameField.setText(resourceName); + } + + public String getAzureResourceName() { + return azureResourceNameField.getText(); + } + + public void setAzureDeploymentId(String deploymentId) { + azureDeploymentIdField.setText(deploymentId); + } + + public String getAzureDeploymentId() { + return azureDeploymentIdField.getText(); + } + + public void setAzureApiVersion(String apiVersion) { + azureApiVersionField.setText(apiVersion); + } + + public String getAzureApiVersion() { + return azureApiVersionField.getText(); + } + + public void setAzureBaseHost(String baseHost) { + azureBaseHostField.setText(baseHost); + } + + public String getAzureBaseHost() { + return azureBaseHostField.getText(); + } + + private JPanel createOpenAIServiceSectionPanel() { + var panel = UI.PanelFactory.grid() + .add(UI.PanelFactory.panel(openAIApiKey) + .withLabel(CodeGPTBundle.get("settingsConfigurable.section.integration.apiKeyField.label")) + .resizeX(false) + .withComment(CodeGPTBundle.get("settingsConfigurable.section.integration.apiKeyField.comment")) + .withCommentHyperlinkListener(SwingUtils::handleHyperlinkClicked)) + .add(UI.PanelFactory.panel(openAIOrganizationField) + .withLabel(CodeGPTBundle.get("settingsConfigurable.section.service.openai.organizationField.label")) + .resizeX(false) + .withComment(CodeGPTBundle.get("settingsConfigurable.section.service.openai.organizationField.comment"))) + .add(UI.PanelFactory.panel(openAIBaseHostField) + .withLabel("Base host:") + .resizeX(false)) + .createPanel(); + panel.setBorder(JBUI.Borders.emptyLeft(16)); + return panel; + } + + private JPanel createAzureServiceSectionPanel() { + var gridPanel = UI.PanelFactory.grid() + .add(UI.PanelFactory.panel(azureResourceNameField) + .withLabel(CodeGPTBundle.get("settingsConfigurable.section.service.azure.resourceNameField.label")) + .resizeX(false) + .withComment(CodeGPTBundle.get("settingsConfigurable.section.service.azure.resourceNameField.comment"))) + .add(UI.PanelFactory.panel(azureDeploymentIdField) + .withLabel(CodeGPTBundle.get("settingsConfigurable.section.service.azure.deploymentIdField.label")) + .resizeX(false) + .withComment(CodeGPTBundle.get("settingsConfigurable.section.service.azure.deploymentIdField.comment"))) + .add(UI.PanelFactory.panel(azureApiVersionField) + .withLabel(CodeGPTBundle.get("settingsConfigurable.section.service.azure.apiVersionField.label")) + .resizeX(false) + .withComment(CodeGPTBundle.get("settingsConfigurable.section.service.azure.apiVersionField.comment"))) + .add(UI.PanelFactory.panel(azureBaseHostField) + .withLabel("Base host:") + .resizeX(false)) + .createPanel(); + gridPanel.setBorder(JBUI.Borders.emptyLeft(16)); + + azureApiKeyFieldPanel.setBorder(JBUI.Borders.emptyLeft(16)); + azureActiveDirectoryTokenFieldPanel.setBorder(JBUI.Borders.emptyLeft(16)); + + var authenticationPanel = FormBuilder.createFormBuilder() + .addComponent(UI.PanelFactory.panel(useAzureApiKeyAuthenticationRadioButton).resizeX(false).createPanel()) + .addComponent(azureApiKeyFieldPanel) + .addComponent(UI.PanelFactory.panel(useAzureActiveDirectoryAuthenticationRadioButton).resizeX(false).createPanel()) + .addComponent(azureActiveDirectoryTokenFieldPanel) + .getPanel(); + authenticationPanel.setBorder(JBUI.Borders.emptyLeft(16)); + + var form = FormBuilder.createFormBuilder() + .addComponent(new TitledSeparator("Authentication")) + .addComponent(authenticationPanel) + .addComponent(new TitledSeparator("Request Configuration")) + .addComponent(gridPanel) + .getPanel(); + form.setBorder(JBUI.Borders.emptyLeft(16)); + return form; + } + + private void registerPanelsVisibility(SettingsState settings) { + openAIServiceSectionPanel.setVisible(settings.useOpenAIService); + azureServiceSectionPanel.setVisible(settings.useAzureService); + azureApiKeyFieldPanel.setVisible(settings.useAzureApiKeyAuthentication); + azureActiveDirectoryTokenFieldPanel.setVisible(settings.useAzureActiveDirectoryAuthentication); + } + + private void registerRadioButtons() { + registerRadioButtons( + Map.entry(useOpenAIServiceRadioButton, openAIServiceSectionPanel), + Map.entry(useAzureServiceRadioButton, azureServiceSectionPanel)); + registerRadioButtons( + Map.entry(useAzureApiKeyAuthenticationRadioButton, azureApiKeyFieldPanel), + Map.entry(useAzureActiveDirectoryAuthenticationRadioButton, azureActiveDirectoryTokenFieldPanel)); + } + + private void registerRadioButtons(Map.Entry firstEntry, Map.Entry secondEntry) { + var buttonGroup = new ButtonGroup(); + buttonGroup.add(firstEntry.getKey()); + buttonGroup.add(secondEntry.getKey()); + + firstEntry.getKey().addActionListener(e -> { + firstEntry.getValue().setVisible(true); + secondEntry.getValue().setVisible(false); + }); + secondEntry.getKey().addActionListener(e -> { + firstEntry.getValue().setVisible(false); + secondEntry.getValue().setVisible(true); + }); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/settings/SettingsComponent.java b/src/main/java/ee/carlrobert/codegpt/settings/SettingsComponent.java new file mode 100644 index 00000000..35148ab4 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/settings/SettingsComponent.java @@ -0,0 +1,78 @@ +package ee.carlrobert.codegpt.settings; + +import com.intellij.openapi.Disposable; +import com.intellij.ui.TitledSeparator; +import com.intellij.ui.components.JBTextField; +import com.intellij.util.ui.FormBuilder; +import com.intellij.util.ui.UI; +import ee.carlrobert.codegpt.CodeGPTBundle; +import javax.swing.JComponent; +import javax.swing.JPanel; + +public class SettingsComponent { + + private final JPanel mainPanel; + private final JBTextField displayNameField; + private final ServiceSelectionForm serviceSelectionForm; + private final ModelSelectionForm modelSelectionForm; + private final UserDetailsSettingsPanel userDetailsSettingsPanel; + + public SettingsComponent(Disposable parentDisposable, SettingsState settings) { + modelSelectionForm = new ModelSelectionForm(settings); + serviceSelectionForm = new ServiceSelectionForm(settings); + + displayNameField = new JBTextField(settings.displayName, 20); + + userDetailsSettingsPanel = new UserDetailsSettingsPanel(parentDisposable, settings); + + mainPanel = FormBuilder.createFormBuilder() + // .addComponent(userDetailsSettingsPanel) + .addComponent(UI.PanelFactory.panel(displayNameField) + .withLabel(CodeGPTBundle.get("settingsConfigurable.section.integration.displayNameFieldLabel")) + .resizeX(false) + .createPanel()) + .addComponent(new TitledSeparator(CodeGPTBundle.get("settingsConfigurable.section.service.title"))) + .addComponent(serviceSelectionForm.getForm()) + .addVerticalGap(8) + .addComponent(new TitledSeparator(CodeGPTBundle.get("settingsConfigurable.section.model.title"))) + .addComponent(modelSelectionForm.getForm()) + .addComponentFillVertically(new JPanel(), 0) + .getPanel(); + } + + public JPanel getPanel() { + return mainPanel; + } + + public JComponent getPreferredFocusedComponent() { + return displayNameField; + } + + public String getEmail() { + return userDetailsSettingsPanel.getEmail(); + } + + public void setEmail(String email) { + userDetailsSettingsPanel.setEmail(email); + } + + public String getPassword() { + return userDetailsSettingsPanel.getPassword(); + } + + public ServiceSelectionForm getServiceSelectionForm() { + return serviceSelectionForm; + } + + public ModelSelectionForm getModelSelectionForm() { + return modelSelectionForm; + } + + public String getDisplayName() { + return displayNameField.getText(); + } + + public void setDisplayName(String displayName) { + displayNameField.setText(displayName); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/settings/SettingsConfigurable.java b/src/main/java/ee/carlrobert/codegpt/settings/SettingsConfigurable.java new file mode 100644 index 00000000..be286768 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/settings/SettingsConfigurable.java @@ -0,0 +1,176 @@ +package ee.carlrobert.codegpt.settings; + +import com.intellij.openapi.Disposable; +import com.intellij.openapi.options.Configurable; +import ee.carlrobert.codegpt.CodeGPTBundle; +import ee.carlrobert.codegpt.EncodingManager; +import ee.carlrobert.codegpt.conversations.ConversationsState; +import ee.carlrobert.codegpt.credentials.AzureCredentialsManager; +import ee.carlrobert.codegpt.credentials.OpenAICredentialsManager; +import ee.carlrobert.codegpt.credentials.UserCredentialsManager; +import ee.carlrobert.codegpt.toolwindow.chat.standard.StandardChatToolWindowContentManager; +import ee.carlrobert.codegpt.toolwindow.chat.standard.StandardChatToolWindowTabPanel; +import ee.carlrobert.codegpt.util.ApplicationUtils; +import javax.swing.JComponent; +import org.jetbrains.annotations.Nls; +import org.jetbrains.annotations.Nullable; + +public class SettingsConfigurable implements Configurable, Disposable { + + private SettingsComponent settingsComponent; + + @Nls(capitalization = Nls.Capitalization.Title) + @Override + public String getDisplayName() { + return CodeGPTBundle.get("settings.displayName"); + } + + @Override + public JComponent getPreferredFocusedComponent() { + return settingsComponent.getPreferredFocusedComponent(); + } + + @Nullable + @Override + public JComponent createComponent() { + var settings = SettingsState.getInstance(); + settingsComponent = new SettingsComponent(this, settings); + return settingsComponent.getPanel(); + } + + @Override + public boolean isModified() { + var settings = SettingsState.getInstance(); + var serviceSelectionForm = settingsComponent.getServiceSelectionForm(); + return !settingsComponent.getEmail().equals(settings.email) || + !settingsComponent.getDisplayName().equals(settings.displayName) || + + serviceSelectionForm.isOpenAIServiceSelected() != settings.useOpenAIService || + serviceSelectionForm.isAzureServiceSelected() != settings.useAzureService || + !serviceSelectionForm.getOpenAIApiKey().equals(OpenAICredentialsManager.getInstance().getApiKey()) || + !serviceSelectionForm.getOpenAIOrganization().equals(settings.openAIOrganization) || + !serviceSelectionForm.getOpenAIBaseHost().equals(settings.openAIBaseHost) || + + serviceSelectionForm.isAzureActiveDirectoryAuthenticationSelected() != settings.useAzureActiveDirectoryAuthentication || + serviceSelectionForm.isAzureApiKeyAuthenticationSelected() != settings.useAzureApiKeyAuthentication || + !serviceSelectionForm.getAzureActiveDirectoryToken().equals(AzureCredentialsManager.getInstance().getAzureActiveDirectoryToken()) || + !serviceSelectionForm.getAzureOpenAIApiKey().equals(AzureCredentialsManager.getInstance().getAzureOpenAIApiKey()) || + !serviceSelectionForm.getAzureResourceName().equals(settings.azureResourceName) || + !serviceSelectionForm.getAzureDeploymentId().equals(settings.azureDeploymentId) || + !serviceSelectionForm.getAzureApiVersion().equals(settings.azureApiVersion) || + !serviceSelectionForm.getAzureBaseHost().equals(settings.azureBaseHost) || + + isModelChanged(settings) || + isCompletionOptionChanged(settings); + } + + @Override + public void apply() { + var settings = SettingsState.getInstance(); + var isModelChanged = isModelChanged(settings); + + if (isModelChanged) { + EncodingManager.getInstance() + .setEncoding(settings.isChatCompletionOptionSelected ? settings.chatCompletionBaseModel + : settings.textCompletionBaseModel); + } + + if (isCompletionOptionChanged(settings) || isModelChanged) { + ConversationsState.getInstance().setCurrentConversation(null); + var project = ApplicationUtils.findCurrentProject(); + if (project == null) { + throw new RuntimeException("Could not find current project."); + } + + StandardChatToolWindowContentManager.getInstance(project) + .tryFindChatTabbedPane() + .ifPresent(tabbedPane -> { + tabbedPane.clearAll(); + var tabPanel = new StandardChatToolWindowTabPanel(project); + tabPanel.displayLandingView(); + tabbedPane.addNewTab(tabPanel); + }); + } + + var serviceSelectionForm = settingsComponent.getServiceSelectionForm(); + var modelSelectionForm = settingsComponent.getModelSelectionForm(); + + UserCredentialsManager.getInstance().setAccountPassword(settingsComponent.getPassword()); + OpenAICredentialsManager.getInstance().setApiKey(serviceSelectionForm.getOpenAIApiKey()); + AzureCredentialsManager.getInstance().setApiKey(serviceSelectionForm.getAzureOpenAIApiKey()); + AzureCredentialsManager.getInstance().setAzureActiveDirectoryToken(serviceSelectionForm.getAzureActiveDirectoryToken()); + + settings.email = settingsComponent.getEmail(); + settings.displayName = settingsComponent.getDisplayName(); + + settings.useOpenAIService = serviceSelectionForm.isOpenAIServiceSelected(); + settings.useAzureService = serviceSelectionForm.isAzureServiceSelected(); + + settings.openAIOrganization = serviceSelectionForm.getOpenAIOrganization(); + settings.openAIBaseHost = serviceSelectionForm.getOpenAIBaseHost(); + + settings.useAzureActiveDirectoryAuthentication = serviceSelectionForm.isAzureActiveDirectoryAuthenticationSelected(); + settings.useAzureApiKeyAuthentication = serviceSelectionForm.isAzureApiKeyAuthenticationSelected(); + settings.azureResourceName = serviceSelectionForm.getAzureResourceName(); + settings.azureDeploymentId = serviceSelectionForm.getAzureDeploymentId(); + settings.azureApiVersion = serviceSelectionForm.getAzureApiVersion(); + settings.azureBaseHost = serviceSelectionForm.getAzureBaseHost(); + + settings.chatCompletionBaseModel = modelSelectionForm.getChatCompletionBaseModel().getCode(); + settings.textCompletionBaseModel = modelSelectionForm.getTextCompletionBaseModel().getCode(); + settings.isChatCompletionOptionSelected = modelSelectionForm.isChatCompletionOptionSelected(); + settings.isTextCompletionOptionSelected = modelSelectionForm.isTextCompletionOptionSelected(); + } + + @Override + public void reset() { + var settings = SettingsState.getInstance(); + var serviceSelectionForm = settingsComponent.getServiceSelectionForm(); + var modelSelectionForm = settingsComponent.getModelSelectionForm(); + + settingsComponent.setEmail(settings.email); + settingsComponent.setDisplayName(settings.displayName); + + serviceSelectionForm.setOpenAIServiceSelected(settings.useAzureService); + serviceSelectionForm.setAzureServiceSelected(settings.useAzureService); + + serviceSelectionForm.setOpenAIApiKey(OpenAICredentialsManager.getInstance().getApiKey()); + serviceSelectionForm.setOpenAIOrganization(settings.openAIOrganization); + serviceSelectionForm.setOpenAIBaseHost(settings.openAIBaseHost); + + serviceSelectionForm.setAzureApiKeyAuthenticationSelected(settings.useAzureApiKeyAuthentication); + serviceSelectionForm.setAzureApiKey(AzureCredentialsManager.getInstance().getAzureOpenAIApiKey()); + serviceSelectionForm.setAzureActiveDirectoryAuthenticationSelected(settings.useAzureActiveDirectoryAuthentication); + serviceSelectionForm.setAzureActiveDirectoryToken(AzureCredentialsManager.getInstance().getAzureActiveDirectoryToken()); + serviceSelectionForm.setAzureResourceName(settings.azureResourceName); + serviceSelectionForm.setAzureDeploymentId(settings.azureDeploymentId); + serviceSelectionForm.setAzureApiVersion(settings.azureApiVersion); + serviceSelectionForm.setAzureBaseHost(settings.azureBaseHost); + + modelSelectionForm.setUseChatCompletionSelected(settings.isChatCompletionOptionSelected); + modelSelectionForm.setUseTextCompletionSelected(settings.isTextCompletionOptionSelected); + modelSelectionForm.setChatCompletionBaseModel(settings.chatCompletionBaseModel); + modelSelectionForm.setTextCompletionBaseModel(settings.textCompletionBaseModel); + } + + @Override + public void disposeUIResources() { + settingsComponent = null; + } + + private boolean isCompletionOptionChanged(SettingsState settings) { + var modelSelectionForm = settingsComponent.getModelSelectionForm(); + return modelSelectionForm.isChatCompletionOptionSelected() != settings.isChatCompletionOptionSelected || + modelSelectionForm.isTextCompletionOptionSelected() != settings.isTextCompletionOptionSelected; + } + + private boolean isModelChanged(SettingsState settings) { + var modelSelectionForm = settingsComponent.getModelSelectionForm(); + return !modelSelectionForm.getChatCompletionBaseModel().getCode().equals(settings.chatCompletionBaseModel) || + !modelSelectionForm.getTextCompletionBaseModel().getCode().equals(settings.textCompletionBaseModel); + } + + @Override + public void dispose() { + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/state/settings/SettingsState.java b/src/main/java/ee/carlrobert/codegpt/settings/SettingsState.java similarity index 57% rename from src/main/java/ee/carlrobert/codegpt/state/settings/SettingsState.java rename to src/main/java/ee/carlrobert/codegpt/settings/SettingsState.java index 0c4de4cf..8ae39b52 100644 --- a/src/main/java/ee/carlrobert/codegpt/state/settings/SettingsState.java +++ b/src/main/java/ee/carlrobert/codegpt/settings/SettingsState.java @@ -1,11 +1,11 @@ -package ee.carlrobert.codegpt.state.settings; +package ee.carlrobert.codegpt.settings; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.components.PersistentStateComponent; import com.intellij.openapi.components.State; import com.intellij.openapi.components.Storage; import com.intellij.util.xmlb.XmlSerializerUtil; -import ee.carlrobert.codegpt.state.conversations.Conversation; +import ee.carlrobert.codegpt.conversations.Conversation; import ee.carlrobert.openai.client.ClientCode; import ee.carlrobert.openai.client.completion.chat.ChatCompletionModel; import ee.carlrobert.openai.client.completion.text.TextCompletionModel; @@ -14,27 +14,25 @@ import org.jetbrains.annotations.Nullable; @State( name = "ee.carlrobert.codegpt.state.settings.SettingsState", - storages = @Storage("CodeGPTSettings_170.xml") + storages = @Storage("CodeGPTSettings_210.xml") ) public class SettingsState implements PersistentStateComponent { - public String apiKey = ""; - public boolean useApiKeyFromEnvVar = false; + public String email = ""; + public boolean previouslySignedIn; public boolean useOpenAIService = true; public boolean useAzureService; - public boolean useCustomService; - public String resourceName = ""; - public String deploymentId = ""; - public String apiVersion = ""; - public boolean useActiveDirectoryAuthentication; - public String organization = ""; - public String customHost = ""; - public String displayName = getDisplayName(); - public boolean useOpenAIAccountName = true; + public String azureResourceName = ""; + public String azureDeploymentId = ""; + public String azureApiVersion = ""; + public String azureBaseHost = "https://%s.openai.azure.com"; + public boolean useAzureApiKeyAuthentication = true; + public boolean useAzureActiveDirectoryAuthentication; + public String openAIOrganization = ""; + public String openAIBaseHost = "https://api.openai.com"; + public String displayName = ""; public String textCompletionBaseModel = TextCompletionModel.DAVINCI.getCode(); public String chatCompletionBaseModel = ChatCompletionModel.GPT_3_5.getCode(); - public String customChatCompletionModel = ""; - public String customTextCompletionModel = ""; public boolean isChatCompletionOptionSelected = true; public boolean isTextCompletionOptionSelected; @@ -57,46 +55,30 @@ public class SettingsState implements PersistentStateComponent { var isChatCompletions = ClientCode.CHAT_COMPLETION.equals(conversation.getClientCode()); var model = conversation.getModel(); if (isChatCompletions) { - if (useCustomService) { - customChatCompletionModel = model; - } else { - chatCompletionBaseModel = model; - } + chatCompletionBaseModel = model; } else { - if (useCustomService) { - customTextCompletionModel = model; - } else { - textCompletionBaseModel = model; - } + textCompletionBaseModel = model; } isChatCompletionOptionSelected = isChatCompletions; isTextCompletionOptionSelected = !isChatCompletions; } - public String getApiKey() { - if (useApiKeyFromEnvVar) { - var envApiKey = System.getenv("OPENAI_API_KEY"); - return envApiKey == null ? "" : envApiKey; - } - return apiKey; - } - public String getChatCompletionModel() { - if (useCustomService) { - return customChatCompletionModel; - } return chatCompletionBaseModel; } public String getTextCompletionModel() { - if (useCustomService) { - return customTextCompletionModel; - } return textCompletionBaseModel; } - private String getDisplayName() { - var name = System.getProperty("user.name"); - return name == null || name.isEmpty() ? "User" : name; + public String getDisplayName() { + if (displayName == null || displayName.isEmpty()) { + var systemUserName = System.getProperty("user.name"); + if (systemUserName == null || systemUserName.isEmpty()) { + return "User"; + } + return systemUserName; + } + return displayName; } } diff --git a/src/main/java/ee/carlrobert/codegpt/settings/UserDetailsSettingsPanel.java b/src/main/java/ee/carlrobert/codegpt/settings/UserDetailsSettingsPanel.java new file mode 100644 index 00000000..db382548 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/settings/UserDetailsSettingsPanel.java @@ -0,0 +1,221 @@ +package ee.carlrobert.codegpt.settings; + +import com.intellij.openapi.Disposable; +import com.intellij.openapi.ui.ComponentValidator; +import com.intellij.openapi.ui.ValidationInfo; +import com.intellij.openapi.util.text.StringUtil; +import com.intellij.ui.JBColor; +import com.intellij.ui.TitledSeparator; +import com.intellij.ui.components.JBLabel; +import com.intellij.ui.components.JBPasswordField; +import com.intellij.ui.components.JBTextField; +import com.intellij.util.ui.AsyncProcessIcon; +import com.intellij.util.ui.FormBuilder; +import com.intellij.util.ui.JBFont; +import com.intellij.util.ui.JBUI; +import ee.carlrobert.codegpt.CodeGPTBundle; +import ee.carlrobert.codegpt.credentials.UserCredentialsManager; +import ee.carlrobert.codegpt.user.UserManager; +import ee.carlrobert.codegpt.user.auth.AuthenticationHandler; +import ee.carlrobert.codegpt.user.auth.AuthenticationService; +import ee.carlrobert.codegpt.util.SwingUtils; +import java.awt.BorderLayout; +import java.awt.FlowLayout; +import javax.swing.JButton; +import javax.swing.JComponent; +import javax.swing.JPanel; +import javax.swing.JPasswordField; +import javax.swing.JTextPane; +import javax.swing.SwingUtilities; + +public class UserDetailsSettingsPanel extends JPanel { + + private final JBTextField emailField; + private final JBPasswordField passwordField; + private final JButton signInButton; + private final JTextPane signUpTextPane; + private final AsyncProcessIcon loadingSpinner; + + public UserDetailsSettingsPanel(Disposable parentDisposable, SettingsState settings) { + super(new BorderLayout()); + emailField = new JBTextField(settings.email, 25); + passwordField = new JBPasswordField(); + passwordField.setColumns(25); + if (!settings.email.isEmpty()) { + passwordField.setText(UserCredentialsManager.getInstance().getAccountPassword()); + } + signInButton = new JButton(CodeGPTBundle.get("settingsConfigurable.section.userAuthentication.signIn.label")); + signUpTextPane = createSignUpTextPane(); + loadingSpinner = new AsyncProcessIcon("sign_in_spinner"); + loadingSpinner.setBorder(JBUI.Borders.emptyLeft(8)); + loadingSpinner.setVisible(false); + + var emailValidator = createInputValidator(parentDisposable, emailField); + var passwordValidator = createInputValidator(parentDisposable, passwordField); + + signInButton.addActionListener(e -> { + emailValidator.revalidate(); + passwordValidator.revalidate(); + if (emailValidator.getValidationInfo() == null && passwordValidator.getValidationInfo() == null) { + loadingSpinner.resume(); + loadingSpinner.setVisible(true); + AuthenticationService.getInstance() + .signInAsync(emailField.getText(), new String(passwordField.getPassword()), new UserAuthenticationHandler()); + } + }); + + if (UserManager.getInstance().getSession() == null) { + add(createUserAuthenticationPanel(emailField, passwordField, false)); + } else { + add(createUserInformationPanel()); + } + } + + public String getEmail() { + return emailField.getText(); + } + + public void setEmail(String email) { + emailField.setText(email); + } + + public String getPassword() { + return new String(passwordField.getPassword()); + } + + private ComponentValidator createInputValidator(Disposable parentDisposable, JComponent component) { + var validator = new ComponentValidator(parentDisposable) + .withValidator(() -> { + String value; + if (component instanceof JBTextField) { + value = ((JBTextField) component).getText(); + } else { + value = new String(((JPasswordField) component).getPassword()); + } + + if (StringUtil.isEmpty(value)) { + return new ValidationInfo("This field is required.", component).withOKEnabled(); + } + + return null; + }) + .andStartOnFocusLost() + .installOn(component); + validator.enableValidation(); + return validator; + } + + private JTextPane createSignUpTextPane() { + var textPane = createTextPane( + "Don't have an account? Sign up"); + textPane.setBorder(JBUI.Borders.emptyLeft(4)); + return textPane; + } + + private JTextPane createTextPane(String htmlContent) { + var textPane = new JTextPane(); + textPane.setContentType("text/html"); + textPane.putClientProperty(JTextPane.HONOR_DISPLAY_PROPERTIES, true); + textPane.setText(htmlContent); + textPane.addHyperlinkListener(SwingUtils::handleHyperlinkClicked); + textPane.setEditable(false); + return textPane; + } + + private JPanel createFooterPanel() { + var panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); + panel.setBorder(JBUI.Borders.empty()); + panel.add(signInButton); + panel.add(signUpTextPane); + panel.add(loadingSpinner); + return panel; + } + + private JPanel createUserAuthenticationPanel(JBTextField emailAddressField, JBPasswordField passwordField, boolean withInvalidCredentials) { + var contentPanelBuilder = FormBuilder.createFormBuilder() + .addVerticalGap(8) + .addLabeledComponent("Email address:", emailAddressField) + .addLabeledComponent("Password:", passwordField) + .addVerticalGap(4) + .addComponentToRightColumn(createFooterPanel()) + .addVerticalGap(4); + + if (withInvalidCredentials) { + var invalidCredentialsLabel = new JBLabel("Invalid login credentials"); + invalidCredentialsLabel.setForeground(JBColor.red); + invalidCredentialsLabel.setBorder(JBUI.Borders.emptyLeft(4)); + + contentPanelBuilder.addComponentToRightColumn(invalidCredentialsLabel); + } + + return FormBuilder.createFormBuilder() + .addComponent(new TitledSeparator(CodeGPTBundle.get("settingsConfigurable.section.userAuthentication.title"))) + .addComponent(JBUI.Panels + .simplePanel(contentPanelBuilder.getPanel()) + .withBorder(JBUI.Borders.emptyLeft(16))) + .getPanel(); + } + + private JPanel createUserInformationPanel() { + var userManager = UserManager.getInstance(); + var contentPanelBuilder = FormBuilder.createFormBuilder() + .addLabeledComponent("Email address:", + new JBLabel(userManager.getSession() + .getUser() + .getEmail()).withFont(JBFont.label().asBold())); + + if (userManager.isSubscribed()) { + contentPanelBuilder.addLabeledComponent("Subscription:", + new JBLabel(userManager.getSubscription() + .getPrices() + .getProducts() + .getName()).withFont(JBFont.label().asBold())); + } else { + contentPanelBuilder.addComponent(createTextPane( + "You haven't subscribed to any plan yet. Subscribe now.")); + } + + var signOutButton = new JButton("Sign Out"); + signOutButton.addActionListener(e -> { + userManager.clearSession(); + refreshView(createUserAuthenticationPanel(emailField, passwordField, false)); + }); + + return FormBuilder.createFormBuilder() + .addComponent(new TitledSeparator(CodeGPTBundle.get("settingsConfigurable.section.userInformation.title"))) + .addVerticalGap(8) + .addComponent(JBUI.Panels + .simplePanel(contentPanelBuilder.addVerticalGap(4) + .addComponent(signOutButton) + .getPanel()) + .withBorder(JBUI.Borders.emptyLeft(16))) + .getPanel(); + } + + class UserAuthenticationHandler implements AuthenticationHandler { + + @Override + public void handleAuthenticated() { + SwingUtilities.invokeLater(() -> refreshView(createUserInformationPanel())); + } + + @Override + public void handleInvalidCredentials() { + SwingUtilities.invokeLater(() -> refreshView(createUserAuthenticationPanel(emailField, passwordField, true))); + } + + @Override + public void handleGenericError() { + // TODO + } + } + + private void refreshView(JPanel contentPanel) { + loadingSpinner.suspend(); + loadingSpinner.setVisible(false); + removeAll(); + add(contentPanel); + revalidate(); + repaint(); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/state/settings/advanced/AdvancedSettingsComponent.java b/src/main/java/ee/carlrobert/codegpt/settings/advanced/AdvancedSettingsComponent.java similarity index 67% rename from src/main/java/ee/carlrobert/codegpt/state/settings/advanced/AdvancedSettingsComponent.java rename to src/main/java/ee/carlrobert/codegpt/settings/advanced/AdvancedSettingsComponent.java index b09d1f24..d2a2ab34 100644 --- a/src/main/java/ee/carlrobert/codegpt/state/settings/advanced/AdvancedSettingsComponent.java +++ b/src/main/java/ee/carlrobert/codegpt/settings/advanced/AdvancedSettingsComponent.java @@ -1,4 +1,4 @@ -package ee.carlrobert.codegpt.state.settings.advanced; +package ee.carlrobert.codegpt.settings.advanced; import com.intellij.openapi.ui.ComboBox; import com.intellij.ui.PortField; @@ -9,6 +9,7 @@ import com.intellij.ui.components.JBTextField; import com.intellij.util.ui.FormBuilder; import com.intellij.util.ui.JBUI; import com.intellij.util.ui.UI; +import ee.carlrobert.codegpt.CodeGPTBundle; import ee.carlrobert.codegpt.util.SwingUtils; import java.awt.event.ItemEvent; import java.net.Proxy; @@ -25,7 +26,8 @@ public class AdvancedSettingsComponent { private final JBCheckBox proxyAuthCheckbox; private final JBTextField proxyAuthUsername; private final JBPasswordField proxyAuthPassword; - private final JBCheckBox offScreenRenderingCheckbox; + private final PortField connectionTimeoutField; + private final PortField readTimeoutField; public AdvancedSettingsComponent(AdvancedSettingsState advancedSettings) { proxyTypeComboBox = new ComboBox<>(new Proxy.Type[] { @@ -36,7 +38,7 @@ public class AdvancedSettingsComponent { proxyTypeComboBox.setSelectedItem(advancedSettings.proxyType); proxyHostField = new JBTextField(advancedSettings.proxyHost, 20); proxyPortField = new PortField(); - proxyAuthCheckbox = new JBCheckBox("Proxy authentication"); + proxyAuthCheckbox = new JBCheckBox(CodeGPTBundle.get("advancedSettingsConfigurable.section.proxy.authCheckBoxField.label")); proxyAuthUsername = new JBTextField(20); proxyAuthUsername.setEnabled(advancedSettings.isProxyAuthSelected); proxyAuthPassword = new JBPasswordField(); @@ -46,18 +48,29 @@ public class AdvancedSettingsComponent { proxyAuthUsername.setEnabled(itemEvent.getStateChange() == ItemEvent.SELECTED); proxyAuthPassword.setEnabled(itemEvent.getStateChange() == ItemEvent.SELECTED); }); - offScreenRenderingCheckbox = new JBCheckBox("Use off-screen browser rendering"); + connectionTimeoutField = new PortField(advancedSettings.connectTimeout); + readTimeoutField = new PortField(advancedSettings.readTimeout); mainPanel = FormBuilder.createFormBuilder() - .addComponent(new TitledSeparator("HTTP/SOCKS Proxy")) - .addVerticalGap(8) + .addComponent(new TitledSeparator(CodeGPTBundle.get("advancedSettingsConfigurable.section.proxy.title"))) .addComponent(createProxySettingsForm()) - .addComponent(new TitledSeparator("Browser Settings")) - .addComponent(createBrowserSettingsForm()) + .addVerticalGap(4) + .addComponent(new TitledSeparator("Connection Settings")) + .addComponent(createConnectionSettingsForm()) .addComponentFillVertically(new JPanel(), 0) .getPanel(); } + private JPanel createConnectionSettingsForm() { + var panel = FormBuilder.createFormBuilder() + .addVerticalGap(4) + .addLabeledComponent("Connection timeout (s):", connectionTimeoutField) + .addLabeledComponent("Read timeout (s):", readTimeoutField) + .getPanel(); + panel.setBorder(JBUI.Borders.emptyLeft(16)); + return panel; + } + public JPanel getPanel() { return mainPanel; } @@ -110,12 +123,20 @@ public class AdvancedSettingsComponent { proxyAuthPassword.setText(proxyPassword); } - public boolean isUseOffScreenRendering() { - return offScreenRenderingCheckbox.isSelected(); + public int getConnectionTimeout() { + return connectionTimeoutField.getNumber(); } - public void setUseOffScreenRendering(boolean isUseOffscreenRendering) { - offScreenRenderingCheckbox.setSelected(isUseOffscreenRendering); + public void setConnectionTimeoutField(int timeout) { + connectionTimeoutField.setNumber(timeout); + } + + public int getReadTimeout() { + return readTimeoutField.getNumber(); + } + + public void setReadTimeout(int timeout) { + readTimeoutField.setNumber(timeout); } private JComponent createProxySettingsForm() { @@ -123,9 +144,18 @@ public class AdvancedSettingsComponent { proxyPanel.setBorder(JBUI.Borders.emptyLeft(16)); proxyPanel.setLayout(new BoxLayout(proxyPanel, BoxLayout.PAGE_AXIS)); - var proxyTypePanel = SwingUtils.createPanel(proxyTypeComboBox, "Proxy:", false); - var proxyHostPanel = SwingUtils.createPanel(proxyHostField, "Host name:", false); - var proxyPortPanel = SwingUtils.createPanel(proxyPortField, "Port:", false); + var proxyTypePanel = SwingUtils.createPanel( + proxyTypeComboBox, + CodeGPTBundle.get("advancedSettingsConfigurable.section.proxy.typeComboBoxField.label"), + false); + var proxyHostPanel = SwingUtils.createPanel( + proxyHostField, + CodeGPTBundle.get("advancedSettingsConfigurable.section.proxy.hostField.label"), + false); + var proxyPortPanel = SwingUtils.createPanel( + proxyPortField, + CodeGPTBundle.get("advancedSettingsConfigurable.section.proxy.portField.label"), + false); SwingUtils.setEqualLabelWidths(proxyTypePanel, proxyHostPanel); SwingUtils.setEqualLabelWidths(proxyPortPanel, proxyHostPanel); @@ -136,12 +166,16 @@ public class AdvancedSettingsComponent { .panel(proxyAuthCheckbox) .createPanel()); - var proxyUsernamePanel = SwingUtils.createPanel(proxyAuthUsername, "Username:", false); - var proxyPasswordPanel = SwingUtils.createPanel(proxyAuthPassword, "Password:", false); + var proxyUsernamePanel = SwingUtils.createPanel(proxyAuthUsername, + CodeGPTBundle.get("advancedSettingsConfigurable.section.proxy.usernameField.label"), + false); + var proxyPasswordPanel = SwingUtils.createPanel(proxyAuthPassword, + CodeGPTBundle.get("advancedSettingsConfigurable.section.proxy.passwordField.label"), + false); SwingUtils.setEqualLabelWidths(proxyPasswordPanel, proxyUsernamePanel); var proxyAuthPanel = FormBuilder.createFormBuilder() - .addVerticalGap(8) + .addVerticalGap(4) .addComponent(proxyUsernamePanel) .addComponent(proxyPasswordPanel) .getPanel(); @@ -150,14 +184,4 @@ public class AdvancedSettingsComponent { return proxyPanel; } - - private JComponent createBrowserSettingsForm() { - var panel = FormBuilder.createFormBuilder() - .addComponent(FormBuilder.createFormBuilder() - .addComponent(offScreenRenderingCheckbox) - .getPanel()) - .getPanel(); - panel.setBorder(JBUI.Borders.emptyLeft(16)); - return panel; - } } diff --git a/src/main/java/ee/carlrobert/codegpt/state/settings/advanced/AdvancedSettingsConfigurable.java b/src/main/java/ee/carlrobert/codegpt/settings/advanced/AdvancedSettingsConfigurable.java similarity index 79% rename from src/main/java/ee/carlrobert/codegpt/state/settings/advanced/AdvancedSettingsConfigurable.java rename to src/main/java/ee/carlrobert/codegpt/settings/advanced/AdvancedSettingsConfigurable.java index 4630b43b..a1e5dbb4 100644 --- a/src/main/java/ee/carlrobert/codegpt/state/settings/advanced/AdvancedSettingsConfigurable.java +++ b/src/main/java/ee/carlrobert/codegpt/settings/advanced/AdvancedSettingsConfigurable.java @@ -1,6 +1,7 @@ -package ee.carlrobert.codegpt.state.settings.advanced; +package ee.carlrobert.codegpt.settings.advanced; import com.intellij.openapi.options.Configurable; +import ee.carlrobert.codegpt.CodeGPTBundle; import javax.swing.JComponent; import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.Nullable; @@ -12,7 +13,7 @@ public class AdvancedSettingsConfigurable implements Configurable { @Nls(capitalization = Nls.Capitalization.Title) @Override public String getDisplayName() { - return "CodeGPT: Advanced Settings"; + return CodeGPTBundle.get("advancedSettingsConfigurable.displayName"); } @Nullable @@ -32,7 +33,8 @@ public class AdvancedSettingsConfigurable implements Configurable { advancedSettingsComponent.isProxyAuthSelected() != advancedSettings.isProxyAuthSelected || !advancedSettingsComponent.getProxyAuthUsername().equals(advancedSettings.proxyUsername) || !advancedSettingsComponent.getProxyAuthPassword().equals(advancedSettings.proxyPassword) || - advancedSettingsComponent.isUseOffScreenRendering() != advancedSettings.useOffScreenRendering; + advancedSettingsComponent.getConnectionTimeout() != advancedSettings.connectTimeout || + advancedSettingsComponent.getReadTimeout() != advancedSettings.readTimeout; } @Override @@ -44,7 +46,8 @@ public class AdvancedSettingsConfigurable implements Configurable { advancedSettings.isProxyAuthSelected = advancedSettingsComponent.isProxyAuthSelected(); advancedSettings.proxyUsername = advancedSettingsComponent.getProxyAuthUsername(); advancedSettings.proxyPassword = advancedSettingsComponent.getProxyAuthPassword(); - advancedSettings.useOffScreenRendering = advancedSettingsComponent.isUseOffScreenRendering(); + advancedSettings.connectTimeout = advancedSettingsComponent.getConnectionTimeout(); + advancedSettings.readTimeout = advancedSettingsComponent.getReadTimeout(); } @Override @@ -56,7 +59,8 @@ public class AdvancedSettingsConfigurable implements Configurable { advancedSettingsComponent.setUseProxyAuthentication(advancedSettings.isProxyAuthSelected); advancedSettingsComponent.setProxyUsername(advancedSettings.proxyUsername); advancedSettingsComponent.setProxyPassword(advancedSettings.proxyPassword); - advancedSettingsComponent.setUseOffScreenRendering(advancedSettings.useOffScreenRendering); + advancedSettingsComponent.setConnectionTimeoutField(advancedSettings.connectTimeout); + advancedSettingsComponent.setReadTimeout(advancedSettings.readTimeout); } @Override diff --git a/src/main/java/ee/carlrobert/codegpt/state/settings/advanced/AdvancedSettingsState.java b/src/main/java/ee/carlrobert/codegpt/settings/advanced/AdvancedSettingsState.java similarity index 91% rename from src/main/java/ee/carlrobert/codegpt/state/settings/advanced/AdvancedSettingsState.java rename to src/main/java/ee/carlrobert/codegpt/settings/advanced/AdvancedSettingsState.java index d256681e..9b075397 100644 --- a/src/main/java/ee/carlrobert/codegpt/state/settings/advanced/AdvancedSettingsState.java +++ b/src/main/java/ee/carlrobert/codegpt/settings/advanced/AdvancedSettingsState.java @@ -1,4 +1,4 @@ -package ee.carlrobert.codegpt.state.settings.advanced; +package ee.carlrobert.codegpt.settings.advanced; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.components.PersistentStateComponent; @@ -21,7 +21,8 @@ public class AdvancedSettingsState implements PersistentStateComponent getTableData() { + var model = getModel(); + Map data = new LinkedHashMap<>(); + for (int count = 0; count < model.getRowCount(); count++) { + data.put( + model.getValueAt(count, 0).toString(), + model.getValueAt(count, 1).toString()); + } + return data; + } + + private JPanel createTablePanel() { + return ToolbarDecorator.createDecorator(table) + .setPreferredSize(new Dimension(table.getPreferredSize().width, 140)) + .setAddAction(anActionButton -> getModel().addRow(new Object[] {"", ""})) + .setRemoveAction(anActionButton -> getModel().removeRow(table.getSelectedRow())) + .disableUpAction() + .disableDownAction() + .addExtraAction(new RevertToDefaultsActionButton()) + .addExtraAction(new KeymapActionButton()) + .createPanel(); + } + + // Formatted keys are not referenced in the messages bundle file + private void addAssistantFormLabeledComponent(FormBuilder formBuilder, String labelKey, String commentKey, JComponent component) { + formBuilder.addLabeledComponent( + new JBLabel(CodeGPTBundle.get(labelKey)) + .withBorder(JBUI.Borders.emptyLeft(2)), + UI.PanelFactory.panel(component) + .resizeX(false) + .withComment(CodeGPTBundle.get(commentKey)) + .withCommentHyperlinkListener(SwingUtils::handleHyperlinkClicked) + .createPanel(), + true + ); + } + + private JPanel createAssistantConfigurationForm() { + var formBuilder = FormBuilder.createFormBuilder(); + addAssistantFormLabeledComponent( + formBuilder, + "configurationConfigurable.section.assistant.systemPromptField.label", + "configurationConfigurable.section.assistant.systemPromptField.comment", + JBUI.Panels + .simplePanel(systemPromptTextArea) + .withBorder(JBUI.Borders.customLine( + JBUI.CurrentTheme.CustomFrameDecorations.separatorForeground()))); + formBuilder.addVerticalGap(8); + addAssistantFormLabeledComponent( + formBuilder, + "configurationConfigurable.section.assistant.temperatureField.label", + "configurationConfigurable.section.assistant.temperatureField.comment", + temperatureField); + addAssistantFormLabeledComponent( + formBuilder, + "configurationConfigurable.section.assistant.maxTokensField.label", + "configurationConfigurable.section.assistant.maxTokensField.comment", + maxTokensField); + + var form = formBuilder.getPanel(); + form.setBorder(JBUI.Borders.emptyLeft(16)); + return form; + } + + private ComponentValidator createInputValidator(Disposable parentDisposable, JBTextField component) { + var validator = new ComponentValidator(parentDisposable) + .withValidator(() -> { + var valueText = component.getText(); + try { + var value = Double.parseDouble(valueText); + if (value > 1.0 || value < 0.0) { + return new ValidationInfo("Value must be between 0 and 1.", component); + } + } catch (NumberFormatException e) { + return new ValidationInfo("Value must be number.", component); + } + + return null; + }) + .andStartOnFocusLost() + .installOn(component); + validator.enableValidation(); + return validator; + } + + private DefaultTableModel getModel() { + return (DefaultTableModel) table.getModel(); + } + + public void setTableData(Map tableData) { + var model = getModel(); + model.setNumRows(0); + tableData.forEach((action, prompt) -> model.addRow(new Object[] {action, prompt})); + } + + public void setSystemPrompt(String systemPrompt) { + systemPromptTextArea.setText(systemPrompt); + } + + public String getSystemPrompt() { + return systemPromptTextArea.getText(); + } + + public double getTemperature() { + return Double.parseDouble(temperatureField.getText()); + } + + public void setTemperature(double temperature) { + temperatureField.setText(String.valueOf(temperature)); + } + + public int getMaxTokens() { + return maxTokensField.getValue(); + } + + public void setMaxTokens(int maxTokens) { + maxTokensField.setValue(maxTokens); + } + + public boolean isCreateNewChatOnEachAction() { + return openNewTabCheckBox.isSelected(); + } + + public void setCreateNewChatOnEachAction(boolean createNewChatOnEachAction) { + openNewTabCheckBox.setSelected(createNewChatOnEachAction); + } + + class RevertToDefaultsActionButton extends AnActionButton { + + RevertToDefaultsActionButton() { + super(CodeGPTBundle.get("configurationConfigurable.table.action.revertToDefaults.text"), AllIcons.Actions.Rollback); + } + + @Override + public void actionPerformed(@NotNull AnActionEvent e) { + var model = getModel(); + model.setRowCount(0); + Arrays.stream(DEFAULT_ACTIONS_ARRAY).forEach(model::addRow); + EditorActionsUtil.refreshActions(); + } + } + + class KeymapActionButton extends AnActionButton { + + KeymapActionButton() { + super(CodeGPTBundle.get("configurationConfigurable.table.action.addKeymap.text"), Nodes.KeymapEditor); + } + + @Override + public void actionPerformed(@NotNull AnActionEvent e) { + var actionId = "codegpt.AskChatgpt"; + var selectedRow = table.getSelectedRow(); + if (selectedRow != -1) { + var label = getModel() + .getDataVector() + .get(selectedRow) + .get(0); + if (label != null && !label.toString().isEmpty()) { + actionId = EditorActionsUtil.convertToId(label.toString()); + } + } + new EditKeymapsDialog(e.getProject(), actionId, false).show(); + } + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/settings/configuration/ConfigurationConfigurable.java b/src/main/java/ee/carlrobert/codegpt/settings/configuration/ConfigurationConfigurable.java new file mode 100644 index 00000000..6b1626ce --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/settings/configuration/ConfigurationConfigurable.java @@ -0,0 +1,69 @@ +package ee.carlrobert.codegpt.settings.configuration; + +import com.intellij.openapi.Disposable; +import com.intellij.openapi.options.Configurable; +import ee.carlrobert.codegpt.CodeGPTBundle; +import ee.carlrobert.codegpt.actions.editor.EditorActionsUtil; +import javax.swing.JComponent; +import org.jetbrains.annotations.Nls; +import org.jetbrains.annotations.Nullable; + +public class ConfigurationConfigurable implements Configurable, Disposable { + + private ConfigurationComponent configurationComponent; + + @Nls(capitalization = Nls.Capitalization.Title) + @Override + public String getDisplayName() { + return CodeGPTBundle.get("configurationConfigurable.displayName"); + } + + @Nullable + @Override + public JComponent createComponent() { + var configuration = ConfigurationState.getInstance(); + configurationComponent = new ConfigurationComponent(this, configuration); + return configurationComponent.getPanel(); + } + + @Override + public boolean isModified() { + var configuration = ConfigurationState.getInstance(); + return !configurationComponent.getTableData().equals(configuration.tableData) || + configurationComponent.getMaxTokens() != configuration.maxTokens || + configurationComponent.getTemperature() != configuration.temperature || + !configurationComponent.getSystemPrompt().equals(configuration.systemPrompt) || + configurationComponent.isCreateNewChatOnEachAction() != configuration.createNewChatOnEachAction; + } + + @Override + public void apply() { + var configuration = ConfigurationState.getInstance(); + configuration.tableData = configurationComponent.getTableData(); + configuration.maxTokens = configurationComponent.getMaxTokens(); + configuration.temperature = configurationComponent.getTemperature(); + configuration.systemPrompt = configurationComponent.getSystemPrompt(); + configuration.createNewChatOnEachAction = configurationComponent.isCreateNewChatOnEachAction(); + EditorActionsUtil.refreshActions(); + } + + @Override + public void reset() { + var configuration = ConfigurationState.getInstance(); + configurationComponent.setTableData(configuration.tableData); + configurationComponent.setMaxTokens(configuration.maxTokens); + configurationComponent.setTemperature(configuration.temperature); + configurationComponent.setSystemPrompt(configuration.systemPrompt); + configurationComponent.setCreateNewChatOnEachAction(configuration.createNewChatOnEachAction); + EditorActionsUtil.refreshActions(); + } + + @Override + public void disposeUIResources() { + configurationComponent = null; + } + + @Override + public void dispose() { + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/state/settings/configuration/ConfigurationState.java b/src/main/java/ee/carlrobert/codegpt/settings/configuration/ConfigurationState.java similarity index 74% rename from src/main/java/ee/carlrobert/codegpt/state/settings/configuration/ConfigurationState.java rename to src/main/java/ee/carlrobert/codegpt/settings/configuration/ConfigurationState.java index 39245b36..285a4151 100644 --- a/src/main/java/ee/carlrobert/codegpt/state/settings/configuration/ConfigurationState.java +++ b/src/main/java/ee/carlrobert/codegpt/settings/configuration/ConfigurationState.java @@ -1,11 +1,11 @@ -package ee.carlrobert.codegpt.state.settings.configuration; +package ee.carlrobert.codegpt.settings.configuration; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.components.PersistentStateComponent; import com.intellij.openapi.components.State; import com.intellij.openapi.components.Storage; import com.intellij.util.xmlb.XmlSerializerUtil; -import ee.carlrobert.codegpt.action.ActionsUtil; +import ee.carlrobert.codegpt.actions.editor.EditorActionsUtil; import java.util.Map; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -16,7 +16,12 @@ import org.jetbrains.annotations.Nullable; ) public class ConfigurationState implements PersistentStateComponent { - public Map tableData = ActionsUtil.DEFAULT_ACTIONS; + public String systemPrompt = ""; + public int maxTokens = 1000; + public double temperature = 0.2; + public boolean createNewChatOnEachAction; + + public Map tableData = EditorActionsUtil.DEFAULT_ACTIONS; public static ConfigurationState getInstance() { return ApplicationManager.getApplication().getService(ConfigurationState.class); diff --git a/src/main/java/ee/carlrobert/codegpt/state/settings/SettingsComponent.java b/src/main/java/ee/carlrobert/codegpt/state/settings/SettingsComponent.java deleted file mode 100644 index 3296135c..00000000 --- a/src/main/java/ee/carlrobert/codegpt/state/settings/SettingsComponent.java +++ /dev/null @@ -1,156 +0,0 @@ -package ee.carlrobert.codegpt.state.settings; - -import com.intellij.ui.TitledSeparator; -import com.intellij.ui.components.JBCheckBox; -import com.intellij.ui.components.JBTextField; -import com.intellij.util.ui.FormBuilder; -import com.intellij.util.ui.JBUI; -import com.intellij.util.ui.UI; -import ee.carlrobert.codegpt.state.settings.components.ModelSelectionForm; -import ee.carlrobert.codegpt.state.settings.components.ServiceSelectionForm; -import ee.carlrobert.codegpt.util.SwingUtils; -import java.awt.Desktop; -import java.awt.event.ItemEvent; -import java.io.IOException; -import java.net.URISyntaxException; -import javax.swing.JComponent; -import javax.swing.JPanel; -import javax.swing.event.HyperlinkEvent; - -public class SettingsComponent { - - private final JPanel mainPanel; - private final JBTextField apiKeyField; - private final JBTextField displayNameField; - private final JBCheckBox useApiKeyFromEnvVarCheckBox; - private final JBCheckBox useOpenAIAccountNameCheckBox; - private final ServiceSelectionForm serviceSelectionForm; - private final ModelSelectionForm modelSelectionForm; - - public SettingsComponent(SettingsState settings) { - modelSelectionForm = new ModelSelectionForm(settings); - serviceSelectionForm = new ServiceSelectionForm(settings, modelSelectionForm); - - apiKeyField = new JBTextField(settings.apiKey, 40); - displayNameField = new JBTextField(settings.displayName, 20); - useApiKeyFromEnvVarCheckBox = new JBCheckBox( - "Use API Key from Environment Variable (recommended)", settings.useApiKeyFromEnvVar); - useOpenAIAccountNameCheckBox = new JBCheckBox( - "Use OpenAI account name", settings.useOpenAIAccountName); - - mainPanel = FormBuilder.createFormBuilder() - .addComponent(new TitledSeparator("Integration Preference")) - .addVerticalGap(8) - .addComponent(createMainSelectionForm()) - .addVerticalGap(8) - .addComponent(new TitledSeparator("Service Preference")) - .addVerticalGap(8) - .addComponent(serviceSelectionForm.getForm()) - .addVerticalGap(8) - .addComponent(new TitledSeparator("Model Preference")) - .addVerticalGap(8) - .addComponent(modelSelectionForm.getForm()) - .addComponentFillVertically(new JPanel(), 0) - .getPanel(); - - registerFields(); - } - - public JPanel getPanel() { - return mainPanel; - } - - public JComponent getPreferredFocusedComponent() { - return apiKeyField; - } - - public ServiceSelectionForm getServiceSelectionForm() { - return serviceSelectionForm; - } - - public ModelSelectionForm getModelSelectionForm() { - return modelSelectionForm; - } - - public String getApiKey() { - return apiKeyField.getText(); - } - - public void setApiKey(String apiKey) { - apiKeyField.setText(apiKey); - } - - public String getDisplayName() { - return displayNameField.getText(); - } - - public void setDisplayName(String displayName) { - displayNameField.setText(displayName); - } - - public void setUseApiKeyFromEnvVarCheckBox(boolean selected) { - useApiKeyFromEnvVarCheckBox.setSelected(selected); - } - - public boolean isUseApiKeyFromEnvVar() { - return useApiKeyFromEnvVarCheckBox.isSelected(); - } - - public void setUseOpenAIAccountNameCheckBox(boolean selected) { - useOpenAIAccountNameCheckBox.setSelected(selected); - } - - public boolean isUseOpenAIAccountName() { - return useOpenAIAccountNameCheckBox.isSelected(); - } - - private JPanel createMainSelectionForm() { - var apiKeyFieldPanel = UI.PanelFactory.panel(apiKeyField) - .withLabel("API key:") - .resizeX(false) - .withComment( - "You can find your Secret API key in your User settings.") - .withCommentHyperlinkListener(this::handleHyperlinkClicked) - .createPanel(); - var displayNameFieldPanel = SwingUtils.createPanel(displayNameField, "Display name:", false); - var apiKeyEnvVarFromCheckboxFieldPanel = UI.PanelFactory.panel(useApiKeyFromEnvVarCheckBox) - .resizeX(false) - .withComment( - "Set your OpenAI API key as OPENAI_API_KEY in environment variables.") - .withCommentHyperlinkListener(this::handleHyperlinkClicked) - .createPanel(); - - SwingUtils.setEqualLabelWidths(apiKeyFieldPanel, displayNameFieldPanel); - - useApiKeyFromEnvVarCheckBox.addItemListener(event -> - apiKeyField.setEnabled(event.getStateChange() != ItemEvent.SELECTED)); - - var panel = FormBuilder.createFormBuilder() - .addComponent(FormBuilder.createFormBuilder() - .addComponent(apiKeyEnvVarFromCheckboxFieldPanel) - .addComponent(apiKeyFieldPanel) - .addVerticalGap(8) - .addComponent(displayNameFieldPanel) - .addComponent(useOpenAIAccountNameCheckBox) - .getPanel()) - .getPanel(); - panel.setBorder(JBUI.Borders.emptyLeft(16)); - return panel; - } - - private void registerFields() { - apiKeyField.setEnabled(!useApiKeyFromEnvVarCheckBox.isSelected()); - } - - private void handleHyperlinkClicked(HyperlinkEvent event) { - if (HyperlinkEvent.EventType.ACTIVATED.equals(event.getEventType())) { - if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { - try { - Desktop.getDesktop().browse(event.getURL().toURI()); - } catch (IOException | URISyntaxException e) { - throw new RuntimeException("Couldn't open the browser.", e); - } - } - } - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/state/settings/SettingsConfigurable.java b/src/main/java/ee/carlrobert/codegpt/state/settings/SettingsConfigurable.java deleted file mode 100644 index 592e1688..00000000 --- a/src/main/java/ee/carlrobert/codegpt/state/settings/SettingsConfigurable.java +++ /dev/null @@ -1,160 +0,0 @@ -package ee.carlrobert.codegpt.state.settings; - -import com.intellij.openapi.options.Configurable; -import com.intellij.openapi.project.ProjectUtil; -import ee.carlrobert.codegpt.EncodingManager; -import ee.carlrobert.codegpt.state.conversations.ConversationsState; -import ee.carlrobert.codegpt.toolwindow.chat.ChatContentManagerService; -import ee.carlrobert.codegpt.toolwindow.chat.ToolWindowTabPanelFactory; -import javax.swing.JComponent; -import org.jetbrains.annotations.Nls; -import org.jetbrains.annotations.Nullable; - -public class SettingsConfigurable implements Configurable { - - private SettingsComponent settingsComponent; - - @Nls(capitalization = Nls.Capitalization.Title) - @Override - public String getDisplayName() { - return "CodeGPT: Settings"; - } - - @Override - public JComponent getPreferredFocusedComponent() { - return settingsComponent.getPreferredFocusedComponent(); - } - - @Nullable - @Override - public JComponent createComponent() { - var settings = SettingsState.getInstance(); - settingsComponent = new SettingsComponent(settings); - return settingsComponent.getPanel(); - } - - @Override - public boolean isModified() { - var settings = SettingsState.getInstance(); - var serviceSelectionForm = settingsComponent.getServiceSelectionForm(); - var modelSelectionForm = settingsComponent.getModelSelectionForm(); - return !settingsComponent.getApiKey().equals(settings.apiKey) || - !settingsComponent.getDisplayName().equals(settings.displayName) || - settingsComponent.isUseApiKeyFromEnvVar() != settings.useApiKeyFromEnvVar || - settingsComponent.isUseOpenAIAccountName() != settings.useOpenAIAccountName || - serviceSelectionForm.isUseOpenAIService() != settings.useOpenAIService || - serviceSelectionForm.isUseAzureService() != settings.useAzureService || - serviceSelectionForm.isUseCustomService() != settings.useCustomService || - serviceSelectionForm.isUseActiveDirectoryAuthentication() != - settings.useActiveDirectoryAuthentication || - !serviceSelectionForm.getCustomHost().equals(settings.customHost) || - !serviceSelectionForm.getResourceName().equals(settings.resourceName) || - !serviceSelectionForm.getDeploymentId().equals(settings.deploymentId) || - !serviceSelectionForm.getApiVersion().equals(settings.apiVersion) || - !serviceSelectionForm.getOrganization().equals(settings.organization) || - !modelSelectionForm.getCustomChatCompletionModel() - .equals(settings.customChatCompletionModel) || - !modelSelectionForm.getCustomTextCompletionModel() - .equals(settings.customTextCompletionModel) || - isModelChanged(settings) || - isCompletionOptionChanged(settings); - } - - @Override - public void apply() { - var settings = SettingsState.getInstance(); - var isModelChanged = isModelChanged(settings); - - if (isModelChanged) { - EncodingManager.getInstance() - .setEncoding(settings.isChatCompletionOptionSelected ? settings.chatCompletionBaseModel - : settings.textCompletionBaseModel); - } - - if (isCompletionOptionChanged(settings) || isModelChanged) { - ConversationsState.getInstance().setCurrentConversation(null); - var project = ProjectUtil.guessCurrentProject( - settingsComponent.getPanel()); // TODO: Find a better way - project.getService(ChatContentManagerService.class) - .tryFindChatTabbedPane() - .ifPresent(tabbedPane -> { - tabbedPane.clearAll(); - var tabPanel = ToolWindowTabPanelFactory.getTabPanel(project); - tabPanel.displayLandingView(); - tabbedPane.addNewTab(tabPanel); - }); - } - - var serviceSelectionForm = settingsComponent.getServiceSelectionForm(); - var modelSelectionForm = settingsComponent.getModelSelectionForm(); - - settings.apiKey = settingsComponent.getApiKey(); - settings.displayName = settingsComponent.getDisplayName(); - settings.useApiKeyFromEnvVar = settingsComponent.isUseApiKeyFromEnvVar(); - settings.useOpenAIAccountName = settingsComponent.isUseOpenAIAccountName(); - settings.useOpenAIService = serviceSelectionForm.isUseOpenAIService(); - settings.useAzureService = serviceSelectionForm.isUseAzureService(); - settings.useCustomService = serviceSelectionForm.isUseCustomService(); - settings.customHost = serviceSelectionForm.getCustomHost(); - settings.useActiveDirectoryAuthentication = serviceSelectionForm.isUseActiveDirectoryAuthentication(); - settings.resourceName = serviceSelectionForm.getResourceName(); - settings.deploymentId = serviceSelectionForm.getDeploymentId(); - settings.apiVersion = serviceSelectionForm.getApiVersion(); - settings.organization = serviceSelectionForm.getOrganization(); - settings.chatCompletionBaseModel = modelSelectionForm.getChatCompletionBaseModel().getCode(); - settings.textCompletionBaseModel = modelSelectionForm.getTextCompletionBaseModel().getCode(); - settings.customChatCompletionModel = modelSelectionForm.getCustomChatCompletionModel(); - settings.customTextCompletionModel = modelSelectionForm.getCustomTextCompletionModel(); - settings.isChatCompletionOptionSelected = modelSelectionForm.isChatCompletionOptionSelected(); - settings.isTextCompletionOptionSelected = modelSelectionForm.isTextCompletionOptionSelected(); - } - - @Override - public void reset() { - var settings = SettingsState.getInstance(); - var serviceSelectionForm = settingsComponent.getServiceSelectionForm(); - var modelSelectionForm = settingsComponent.getModelSelectionForm(); - - settingsComponent.setApiKey(settings.apiKey); - settingsComponent.setUseApiKeyFromEnvVarCheckBox(settings.useApiKeyFromEnvVar); - settingsComponent.setDisplayName(settings.displayName); - settingsComponent.setUseOpenAIAccountNameCheckBox(settings.useOpenAIAccountName); - serviceSelectionForm.setUseOpenAIServiceSelected(settings.useAzureService); - serviceSelectionForm.setUseAzureServiceSelected(settings.useAzureService); - serviceSelectionForm.setUseCustomServiceSelected(settings.useCustomService); - serviceSelectionForm.setCustomHost(settings.customHost); - serviceSelectionForm.setUseActiveDirectoryAuthenticationSelected( - settings.useActiveDirectoryAuthentication); - serviceSelectionForm.setResourceName(settings.resourceName); - serviceSelectionForm.setDeploymentId(settings.deploymentId); - serviceSelectionForm.setApiVersionField(settings.apiVersion); - serviceSelectionForm.setOrganization(settings.organization); - modelSelectionForm.setUseChatCompletionSelected(settings.isChatCompletionOptionSelected); - modelSelectionForm.setUseTextCompletionSelected(settings.isTextCompletionOptionSelected); - modelSelectionForm.setChatCompletionBaseModel(settings.chatCompletionBaseModel); - modelSelectionForm.setTextCompletionBaseModel(settings.textCompletionBaseModel); - modelSelectionForm.setCustomChatCompletionModel(settings.customChatCompletionModel); - modelSelectionForm.setCustomTextCompletionModel(settings.customTextCompletionModel); - } - - @Override - public void disposeUIResources() { - settingsComponent = null; - } - - private boolean isCompletionOptionChanged(SettingsState settings) { - var modelSelectionForm = settingsComponent.getModelSelectionForm(); - return modelSelectionForm.isChatCompletionOptionSelected() - != settings.isChatCompletionOptionSelected || - modelSelectionForm.isTextCompletionOptionSelected() - != settings.isTextCompletionOptionSelected; - } - - private boolean isModelChanged(SettingsState settings) { - var modelSelectionForm = settingsComponent.getModelSelectionForm(); - return !modelSelectionForm.getChatCompletionBaseModel().getCode() - .equals(settings.chatCompletionBaseModel) || - !modelSelectionForm.getTextCompletionBaseModel().getCode() - .equals(settings.textCompletionBaseModel); - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/state/settings/components/ServiceSelectionForm.java b/src/main/java/ee/carlrobert/codegpt/state/settings/components/ServiceSelectionForm.java deleted file mode 100644 index 0c654d4f..00000000 --- a/src/main/java/ee/carlrobert/codegpt/state/settings/components/ServiceSelectionForm.java +++ /dev/null @@ -1,234 +0,0 @@ -package ee.carlrobert.codegpt.state.settings.components; - -import com.intellij.ui.components.JBCheckBox; -import com.intellij.ui.components.JBRadioButton; -import com.intellij.ui.components.JBTextField; -import com.intellij.util.ui.FormBuilder; -import com.intellij.util.ui.JBUI; -import com.intellij.util.ui.JBUI.Borders; -import com.intellij.util.ui.UI; -import ee.carlrobert.codegpt.state.settings.SettingsState; -import ee.carlrobert.codegpt.util.SwingUtils; -import javax.swing.ButtonGroup; -import javax.swing.JComponent; -import javax.swing.JPanel; - -public class ServiceSelectionForm { - - private final SettingsState settings; - private final JBTextField openAIOrganizationField; - private final JBTextField azureResourceNameField; - private final JBTextField azureDeploymentIdField; - private final JBTextField azureApiVersionField; - private final JBTextField customHostField; - private final JBCheckBox useActiveDirectoryAuthenticationCheckBox; - private final JBRadioButton useCustomServiceRadioButton; - private final JBRadioButton useAzureServiceRadioButton; - private final JBRadioButton useOpenAIServiceRadioButton; - private final JPanel openAIServiceSectionPanel; - private final JPanel azureServiceSectionPanel; - private final JPanel customServiceSectionPanel; - private final ModelSelectionForm modelSelectionForm; - - public ServiceSelectionForm(SettingsState settings, ModelSelectionForm modelSelectionForm) { - this.settings = settings; - this.modelSelectionForm = modelSelectionForm; - useOpenAIServiceRadioButton = new JBRadioButton( - "Use OpenAI service API", settings.useOpenAIService); - useAzureServiceRadioButton = new JBRadioButton( - "Use Azure OpenAI service API", settings.useAzureService); - useCustomServiceRadioButton = new JBRadioButton( - "Use custom service", settings.useCustomService); - - useActiveDirectoryAuthenticationCheckBox = new JBCheckBox( - "Use Azure Active Directory authentication", settings.useActiveDirectoryAuthentication); - - openAIOrganizationField = new JBTextField(settings.organization, 40); - azureResourceNameField = new JBTextField(settings.resourceName, 40); - azureDeploymentIdField = new JBTextField(settings.deploymentId, 40); - azureApiVersionField = new JBTextField(settings.apiVersion, 40); - customHostField = new JBTextField(settings.customHost, 40); - - openAIServiceSectionPanel = createOpenAIServiceSectionPanel(); - azureServiceSectionPanel = createAzureServiceSectionPanel(); - customServiceSectionPanel = createCustomServiceSectionPanel(); - - registerSectionPanels(); - registerRadioButtons(); - } - - public JPanel getForm() { - var panel = FormBuilder.createFormBuilder() - .addComponent(useOpenAIServiceRadioButton) - .addComponent(openAIServiceSectionPanel) - .addVerticalGap(8) - .addComponent(useAzureServiceRadioButton) - .addComponent(azureServiceSectionPanel) - .addVerticalGap(8) - .addComponent(useCustomServiceRadioButton) - .addComponent(customServiceSectionPanel) - .getPanel(); - panel.setBorder(JBUI.Borders.emptyLeft(16)); - return panel; - } - - public void setUseOpenAIServiceSelected(boolean selected) { - useOpenAIServiceRadioButton.setSelected(selected); - } - - public boolean isUseOpenAIService() { - return useOpenAIServiceRadioButton.isSelected(); - } - - public void setUseAzureServiceSelected(boolean selected) { - useAzureServiceRadioButton.setSelected(selected); - } - - public boolean isUseActiveDirectoryAuthentication() { - return useActiveDirectoryAuthenticationCheckBox.isSelected(); - } - - public void setUseActiveDirectoryAuthenticationSelected(boolean selected) { - useActiveDirectoryAuthenticationCheckBox.setSelected(selected); - } - - public boolean isUseAzureService() { - return useAzureServiceRadioButton.isSelected(); - } - - public void setUseCustomServiceSelected(boolean selected) { - useCustomServiceRadioButton.setSelected(selected); - } - - public boolean isUseCustomService() { - return useCustomServiceRadioButton.isSelected(); - } - - public String getCustomHost() { - return customHostField.getText(); - } - - public void setCustomHost(String customHost) { - customHostField.setText(customHost); - } - - public String getResourceName() { - return azureResourceNameField.getText(); - } - - public void setResourceName(String resourceName) { - azureResourceNameField.setText(resourceName); - } - - public String getDeploymentId() { - return azureDeploymentIdField.getText(); - } - - public void setDeploymentId(String deploymentId) { - azureDeploymentIdField.setText(deploymentId); - } - - public String getApiVersion() { - return azureApiVersionField.getText(); - } - - public void setApiVersionField(String apiVersion) { - azureApiVersionField.setText(apiVersion); - } - - public String getOrganization() { - return openAIOrganizationField.getText(); - } - - public void setOrganization(String organization) { - openAIOrganizationField.setText(organization); - } - - private JPanel createPanel(JComponent component, String label, String comment) { - return UI.PanelFactory.panel(component) - .withLabel(label) - .resizeX(false) - .withComment(comment) - .createPanel(); - } - - private JPanel createOpenAIServiceSectionPanel() { - var organizationFieldPanel = UI.PanelFactory.panel(openAIOrganizationField) - .withLabel("Organization:") - .resizeX(false) - .withComment( - "Useful when you are part of multiple organizations optional") - .createPanel(); - organizationFieldPanel.setBorder(JBUI.Borders.empty(8, 16, 0, 0)); - return organizationFieldPanel; - } - - private JPanel createAzureServiceSectionPanel() { - var resourceNameFieldPanel = createPanel( - azureResourceNameField, "Resource name:", "Azure OpenAI Service resource name"); - var deploymentIdFieldPanel = createPanel( - azureDeploymentIdField, "Deployment ID:", "Azure OpenAI Service deployment ID"); - var apiVersionFieldPanel = createPanel( - azureApiVersionField, "API version:", "API version to be used for Azure OpenAI Service"); - var authFieldPanel = UI.PanelFactory.panel(useActiveDirectoryAuthenticationCheckBox) - .resizeX(false) - .createPanel(); - - var azureRelatedFieldsPanel = FormBuilder.createFormBuilder() - .addVerticalGap(8) - .addComponent(resourceNameFieldPanel) - .addComponent(deploymentIdFieldPanel) - .addComponent(apiVersionFieldPanel) - .addComponent(authFieldPanel) - .getPanel(); - azureRelatedFieldsPanel.setBorder(Borders.emptyLeft(16)); - - SwingUtils.setEqualLabelWidths(deploymentIdFieldPanel, resourceNameFieldPanel); - SwingUtils.setEqualLabelWidths(apiVersionFieldPanel, resourceNameFieldPanel); - - return azureRelatedFieldsPanel; - } - - private JPanel createCustomServiceSectionPanel() { - var customHostFieldPanel = UI.PanelFactory.panel(customHostField) - .withLabel("Custom host:") - .withComment("Example: http://localhost:8080") - .resizeX(false) - .createPanel(); - customHostFieldPanel.setBorder(JBUI.Borders.empty(8, 16, 0, 0)); - return customHostFieldPanel; - } - - private void registerSectionPanels() { - openAIServiceSectionPanel.setVisible(settings.useOpenAIService); - azureServiceSectionPanel.setVisible(settings.useAzureService); - customServiceSectionPanel.setVisible(settings.useCustomService); - modelSelectionForm.changeModelPanelsVisibility(settings.useCustomService); - } - - private void registerRadioButtons() { - var serviceButtonGroup = new ButtonGroup(); - serviceButtonGroup.add(useOpenAIServiceRadioButton); - serviceButtonGroup.add(useAzureServiceRadioButton); - serviceButtonGroup.add(useCustomServiceRadioButton); - - useOpenAIServiceRadioButton.addActionListener(e -> { - openAIServiceSectionPanel.setVisible(true); - azureServiceSectionPanel.setVisible(false); - customServiceSectionPanel.setVisible(false); - modelSelectionForm.changeModelPanelsVisibility(false); - }); - useAzureServiceRadioButton.addActionListener(e -> { - openAIServiceSectionPanel.setVisible(false); - azureServiceSectionPanel.setVisible(true); - customServiceSectionPanel.setVisible(false); - modelSelectionForm.changeModelPanelsVisibility(false); - }); - useCustomServiceRadioButton.addActionListener(e -> { - openAIServiceSectionPanel.setVisible(false); - azureServiceSectionPanel.setVisible(false); - customServiceSectionPanel.setVisible(true); - modelSelectionForm.changeModelPanelsVisibility(true); - }); - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/state/settings/configuration/ConfigurationComponent.java b/src/main/java/ee/carlrobert/codegpt/state/settings/configuration/ConfigurationComponent.java deleted file mode 100644 index 775403f4..00000000 --- a/src/main/java/ee/carlrobert/codegpt/state/settings/configuration/ConfigurationComponent.java +++ /dev/null @@ -1,121 +0,0 @@ -package ee.carlrobert.codegpt.state.settings.configuration; - -import static ee.carlrobert.codegpt.action.ActionsUtil.DEFAULT_ACTIONS_ARRAY; - -import com.intellij.icons.AllIcons; -import com.intellij.icons.AllIcons.Nodes; -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.keymap.impl.ui.EditKeymapsDialog; -import com.intellij.ui.AnActionButton; -import com.intellij.ui.TitledSeparator; -import com.intellij.ui.ToolbarDecorator; -import com.intellij.ui.table.JBTable; -import com.intellij.util.ui.FormBuilder; -import ee.carlrobert.codegpt.action.ActionsUtil; -import java.awt.Dimension; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.swing.BorderFactory; -import javax.swing.JPanel; -import javax.swing.table.DefaultTableModel; -import org.jetbrains.annotations.NotNull; - -public class ConfigurationComponent { - - private final JPanel mainPanel; - private final JBTable table; - - public ConfigurationComponent(ConfigurationState configuration) { - table = new JBTable(new DefaultTableModel( - ActionsUtil.toArray(configuration.tableData), - new String[]{"Action", "Prompt"})); - table.getColumnModel().getColumn(0).setPreferredWidth(60); - table.getColumnModel().getColumn(1).setPreferredWidth(240); - table.getEmptyText().setText("No actions configured"); - var tablePanel = createTablePanel(); - tablePanel.setBorder(BorderFactory.createTitledBorder("Action prompts")); - - mainPanel = FormBuilder.createFormBuilder() - .addComponent(new TitledSeparator("Configuration Preference")) - .addVerticalGap(8) - .addComponent(tablePanel) - .addComponentFillVertically(new JPanel(), 0) - .getPanel(); - } - - public JPanel getPanel() { - return mainPanel; - } - - public Map getTableData() { - var model = getModel(); - Map data = new LinkedHashMap<>(); - for (int count = 0; count < model.getRowCount(); count++) { - data.put( - model.getValueAt(count, 0).toString(), - model.getValueAt(count, 1).toString()); - } - return data; - } - - private JPanel createTablePanel() { - return ToolbarDecorator.createDecorator(table) - .setPreferredSize(new Dimension(table.getPreferredSize().width, 160)) - .setAddAction(anActionButton -> getModel().addRow(new Object[]{"", ""})) - .setRemoveAction(anActionButton -> getModel().removeRow(table.getSelectedRow())) - .disableUpAction() - .disableDownAction() - .addExtraAction(new RevertToDefaultsActionButton()) - .addExtraAction(new KeymapActionButton()) - .createPanel(); - } - - private DefaultTableModel getModel() { - return (DefaultTableModel) table.getModel(); - } - - public void setTableData(Map tableData) { - var model = getModel(); - model.setNumRows(0); - tableData.forEach((action, prompt) -> model.addRow(new Object[]{action, prompt})); - } - - class RevertToDefaultsActionButton extends AnActionButton { - - RevertToDefaultsActionButton() { - super("Revert to Defaults", AllIcons.Actions.Rollback); - } - - @Override - public void actionPerformed(@NotNull AnActionEvent e) { - var model = getModel(); - model.setRowCount(0); - Arrays.stream(DEFAULT_ACTIONS_ARRAY).forEach(model::addRow); - ActionsUtil.refreshActions(); - } - } - - class KeymapActionButton extends AnActionButton { - - KeymapActionButton() { - super("Add Shortcut", Nodes.KeymapEditor); - } - - @Override - public void actionPerformed(@NotNull AnActionEvent e) { - var actionId = "codegpt.AskChatgpt"; - var selectedRow = table.getSelectedRow(); - if (selectedRow != -1) { - var label = getModel() - .getDataVector() - .get(selectedRow) - .get(0); - if (label != null && !label.toString().isEmpty()) { - actionId = ActionsUtil.convertToId(label.toString()); - } - } - new EditKeymapsDialog(e.getProject(), actionId, false).show(); - } - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/state/settings/configuration/ConfigurationConfigurable.java b/src/main/java/ee/carlrobert/codegpt/state/settings/configuration/ConfigurationConfigurable.java deleted file mode 100644 index 92f6ffe7..00000000 --- a/src/main/java/ee/carlrobert/codegpt/state/settings/configuration/ConfigurationConfigurable.java +++ /dev/null @@ -1,51 +0,0 @@ -package ee.carlrobert.codegpt.state.settings.configuration; - -import com.intellij.openapi.options.Configurable; -import ee.carlrobert.codegpt.action.ActionsUtil; -import javax.swing.JComponent; -import org.jetbrains.annotations.Nls; -import org.jetbrains.annotations.Nullable; - -public class ConfigurationConfigurable implements Configurable { - - private ConfigurationComponent configurationComponent; - - @Nls(capitalization = Nls.Capitalization.Title) - @Override - public String getDisplayName() { - return "CodeGPT: Configuration"; - } - - @Nullable - @Override - public JComponent createComponent() { - var configuration = ConfigurationState.getInstance(); - configurationComponent = new ConfigurationComponent(configuration); - return configurationComponent.getPanel(); - } - - @Override - public boolean isModified() { - var configuration = ConfigurationState.getInstance(); - return !configurationComponent.getTableData().equals(configuration.tableData); - } - - @Override - public void apply() { - var configuration = ConfigurationState.getInstance(); - configuration.tableData = configurationComponent.getTableData(); - ActionsUtil.refreshActions(); - } - - @Override - public void reset() { - var configuration = ConfigurationState.getInstance(); - configurationComponent.setTableData(configuration.tableData); - ActionsUtil.refreshActions(); - } - - @Override - public void disposeUIResources() { - configurationComponent = null; - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/IconActionButton.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/IconActionButton.java new file mode 100644 index 00000000..5a735f94 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/IconActionButton.java @@ -0,0 +1,24 @@ +package ee.carlrobert.codegpt.toolwindow; + +import com.intellij.openapi.actionSystem.ActionPlaces; +import com.intellij.openapi.actionSystem.ActionToolbar; +import com.intellij.openapi.actionSystem.AnAction; +import com.intellij.openapi.actionSystem.Presentation; +import com.intellij.openapi.actionSystem.impl.ActionButton; +import javax.swing.Icon; + +public class IconActionButton extends ActionButton { + + public IconActionButton(String tooltipText, Icon icon, AnAction onAction) { + super(onAction, + getPresentation(tooltipText, icon), + ActionPlaces.TOOLWINDOW_CONTENT, + ActionToolbar.DEFAULT_MINIMUM_BUTTON_SIZE); + } + + private static Presentation getPresentation(String tooltipText, Icon icon) { + var presentation = new Presentation(tooltipText); + presentation.setIcon(icon); + return presentation; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/ProjectToolWindowFactory.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/ProjectToolWindowFactory.java index ff109cfd..da67c80f 100644 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/ProjectToolWindowFactory.java +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/ProjectToolWindowFactory.java @@ -6,7 +6,7 @@ import com.intellij.openapi.wm.ToolWindow; import com.intellij.openapi.wm.ToolWindowFactory; import com.intellij.ui.content.ContentManagerEvent; import com.intellij.ui.content.ContentManagerListener; -import ee.carlrobert.codegpt.toolwindow.chat.ChatToolWindowPanel; +import ee.carlrobert.codegpt.toolwindow.chat.standard.StandardChatToolWindowPanel; import ee.carlrobert.codegpt.toolwindow.conversations.ConversationsToolWindow; import javax.swing.JComponent; import org.jetbrains.annotations.NotNull; @@ -14,15 +14,17 @@ import org.jetbrains.annotations.NotNull; public class ProjectToolWindowFactory implements ToolWindowFactory, DumbAware { public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) { + var chatToolWindowPanel = new StandardChatToolWindowPanel(project, toolWindow.getDisposable()); + // var contextualChatToolWindowPanel = new ContextualChatToolWindowPanel(project, toolWindow.getDisposable()); var conversationsToolWindow = new ConversationsToolWindow(project); - var chatToolWindowPanel = new ChatToolWindowPanel(project); addContent(toolWindow, chatToolWindowPanel, "Chat"); - addContent(toolWindow, conversationsToolWindow.getContent(), "Conversation History"); + // addContent(toolWindow, contextualChatToolWindowPanel, "Contextual Chat"); + addContent(toolWindow, conversationsToolWindow.getContent(), "Chat History"); toolWindow.addContentManagerListener(new ContentManagerListener() { public void selectionChanged(@NotNull ContentManagerEvent event) { var content = event.getContent(); - if ("Conversation History".equals(content.getTabName()) && content.isSelected()) { + if ("Chat History".equals(content.getTabName()) && content.isSelected()) { conversationsToolWindow.refresh(); } } @@ -31,7 +33,6 @@ public class ProjectToolWindowFactory implements ToolWindowFactory, DumbAware { public void addContent(ToolWindow toolWindow, JComponent panel, String displayName) { var contentManager = toolWindow.getContentManager(); - var content = contentManager.getFactory().createContent(panel, displayName, false); - contentManager.addContent(content); + contentManager.addContent(contentManager.getFactory().createContent(panel, displayName, false)); } } diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/BaseChatToolWindowTabPanel.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/BaseChatToolWindowTabPanel.java new file mode 100644 index 00000000..20695630 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/BaseChatToolWindowTabPanel.java @@ -0,0 +1,275 @@ +package ee.carlrobert.codegpt.toolwindow.chat; + +import static com.intellij.openapi.ui.Messages.OK; +import static ee.carlrobert.codegpt.util.ThemeUtils.getPanelBackgroundColor; +import static java.lang.String.format; + +import com.intellij.openapi.editor.impl.EditorImpl; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.roots.ui.componentsList.components.ScrollablePanel; +import com.intellij.ui.JBColor; +import com.intellij.ui.components.JBScrollPane; +import com.intellij.util.ui.JBUI; +import ee.carlrobert.codegpt.completions.CompletionRequestHandler; +import ee.carlrobert.codegpt.conversations.Conversation; +import ee.carlrobert.codegpt.conversations.ConversationService; +import ee.carlrobert.codegpt.conversations.message.Message; +import ee.carlrobert.codegpt.credentials.AzureCredentialsManager; +import ee.carlrobert.codegpt.credentials.OpenAICredentialsManager; +import ee.carlrobert.codegpt.settings.SettingsState; +import ee.carlrobert.codegpt.util.EditorUtils; +import ee.carlrobert.codegpt.util.FileUtils; +import ee.carlrobert.codegpt.util.OverlayUtils; +import java.awt.BorderLayout; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import javax.swing.BoxLayout; +import javax.swing.JComponent; +import javax.swing.JPanel; +import javax.swing.ScrollPaneConstants; +import javax.swing.SwingUtilities; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public abstract class BaseChatToolWindowTabPanel implements ChatToolWindowTabPanel { + + private final boolean useContextualSearch; + private final JPanel rootPanel; + private final ScrollablePanel scrollablePanel; + private final Map visibleMessagePanels = new HashMap<>(); + + protected final Project project; + protected final UserTextArea userTextArea; + protected final ConversationService conversationService; + protected @Nullable Conversation conversation; + + protected abstract JComponent getLandingView(); + + public BaseChatToolWindowTabPanel(@NotNull Project project, boolean useContextualSearch) { + this.project = project; + this.useContextualSearch = useContextualSearch; + this.conversationService = ConversationService.getInstance(); + this.rootPanel = new JPanel(new GridBagLayout()); + this.scrollablePanel = new ScrollablePanel(); + this.userTextArea = new UserTextArea(this::handleSubmit); + init(); + } + + public void requestFocusForTextArea() { + userTextArea.focus(); + } + + @Override + public JPanel getContent() { + return rootPanel; + } + + @Override + public @Nullable Conversation getConversation() { + return conversation; + } + + @Override + public void setConversation(@Nullable Conversation conversation) { + this.conversation = conversation; + } + + @Override + public void displayLandingView() { + scrollablePanel.removeAll(); + scrollablePanel.add(getLandingView()); + scrollablePanel.repaint(); + scrollablePanel.revalidate(); + } + + @Override + public void startNewConversation(Message message) { + conversation = conversationService.startConversation(); + sendMessage(message); + } + + @Override + public void sendMessage(Message message) { + if (conversation == null) { + conversation = conversationService.startConversation(); + } + + var messageWrapper = createNewMessageWrapper(message.getId()); + messageWrapper.add(new UserMessagePanel(project, message, message.getUserMessage() != null, this)); + var responsePanel = new ResponsePanel() + .withReloadAction(() -> reloadMessage(message, conversation)) + .withDeleteAction(() -> deleteMessage(message.getId(), messageWrapper, conversation)) + .addContent(new ChatMessageResponseBody(project, true, this)); + messageWrapper.add(responsePanel); + call(conversation, message, responsePanel, false); + } + + @Override + public void dispose() { + } + + private boolean isCredentialSet() { + if (SettingsState.getInstance().useAzureService) { + return AzureCredentialsManager.getInstance().isCredentialSet(); + } + return OpenAICredentialsManager.getInstance().isApiKeySet(); + } + + private void call(Conversation conversation, Message message, ResponsePanel responsePanel, boolean isRetry) { + ChatMessageResponseBody responseContainer = (ChatMessageResponseBody) responsePanel.getContent(); + + if (!isCredentialSet()) { + responseContainer.displayMissingCredential(); + return; + } + + var requestHandler = new CompletionRequestHandler(project); + requestHandler.withContextualSearch(useContextualSearch); + requestHandler.addMessageListener(partialMessage -> { + try { + responseContainer.update(partialMessage); + } catch (Exception e) { + responseContainer.displayDefaultError(); + throw new RuntimeException("Error while updating the content", e); + } + }); + requestHandler.addRequestCompletedListener(completeMessage -> { + responsePanel.enableActions(); + conversationService.saveMessage(completeMessage, message, conversation, isRetry); + stopStreaming(responseContainer); + }); + requestHandler.addTokensExceededListener(() -> SwingUtilities.invokeLater(() -> { + var answer = OverlayUtils.showTokenLimitExceededDialog(); + if (answer == OK) { + conversationService.discardTokenLimits(conversation); + requestHandler.call(conversation, message, true); + } else { + stopStreaming(responseContainer); + } + })); + requestHandler.addErrorListener((error, ex) -> { + responsePanel.enableActions(); + responseContainer.displayError(error.getMessage()); + stopStreaming(responseContainer); + }); + userTextArea.setRequestHandler(requestHandler); + userTextArea.setSubmitEnabled(false); + requestHandler.call(conversation, message, isRetry); + } + + protected void reloadMessage(Message message, Conversation conversation) { + ResponsePanel responsePanel = null; + try { + responsePanel = (ResponsePanel) Arrays.stream(visibleMessagePanels.get(message.getId()).getComponents()) + .filter(component -> component instanceof ResponsePanel) + .findFirst().orElseThrow(); + ((ChatMessageResponseBody) responsePanel.getContent()).clear(); + scrollablePanel.revalidate(); + scrollablePanel.repaint(); + } catch (Exception e) { + throw new RuntimeException("Couldn't reload message", e); + } finally { + if (responsePanel != null) { + message.setResponse(""); + conversationService.saveMessage(conversation, message); + call(conversation, message, responsePanel, true); + } + } + } + + protected void deleteMessage(UUID messageId, JPanel messageWrapper, Conversation conversation) { + scrollablePanel.remove(messageWrapper); + scrollablePanel.repaint(); + scrollablePanel.revalidate(); + + visibleMessagePanels.remove(messageId); + conversation.removeMessage(messageId); + conversationService.saveConversation(conversation); + + if (conversation.getMessages().isEmpty()) { + conversationService.deleteConversation(conversation); + setConversation(null); + displayLandingView(); + } + } + + protected JPanel createNewMessageWrapper(UUID messageId) { + var messageWrapper = new JPanel(); + messageWrapper.setLayout(new BoxLayout(messageWrapper, BoxLayout.PAGE_AXIS)); + scrollablePanel.add(messageWrapper); + scrollablePanel.repaint(); + scrollablePanel.revalidate(); + visibleMessagePanels.put(messageId, messageWrapper); + return messageWrapper; + } + + protected void clearWindow() { + scrollablePanel.removeAll(); + scrollablePanel.revalidate(); + scrollablePanel.repaint(); + } + + private void stopStreaming(ChatMessageResponseBody responseContainer) { + SwingUtilities.invokeLater(() -> { + userTextArea.setSubmitEnabled(true); + responseContainer.hideCarets(); + }); + } + + private void handleSubmit(String text) { + var message = new Message(text); + var editor = EditorUtils.getSelectedEditor(project); + if (editor != null) { + var selectionModel = editor.getSelectionModel(); + var selectedText = selectionModel.getSelectedText(); + if (selectedText != null && !selectedText.isEmpty()) { + var fileExtension = FileUtils.getFileExtension(((EditorImpl) editor).getVirtualFile().getName()); + message = new Message(text + format("\n```%s\n%s\n```", fileExtension, selectedText)); + message.setUserMessage(text); + selectionModel.removeSelection(); + } + } + + if (conversation == null) { + startNewConversation(message); + } else { + sendMessage(message); + } + } + + private void init() { + var gbc = new GridBagConstraints(); + gbc.fill = GridBagConstraints.BOTH; + gbc.weighty = 1; + gbc.weightx = 1; + gbc.gridx = 0; + gbc.gridy = 0; + + scrollablePanel.setLayout(new BoxLayout(scrollablePanel, BoxLayout.Y_AXIS)); + JBScrollPane scrollPane = new JBScrollPane(scrollablePanel); + scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + scrollPane.setBorder(null); + scrollPane.setViewportBorder(null); + rootPanel.add(scrollPane, gbc); + new SmartScroller(scrollPane); + + gbc.weighty = 0; + gbc.fill = GridBagConstraints.HORIZONTAL; + gbc.gridy = 1; + + // JBUI.Panels.simplePanel(8, 0).add(); + JPanel chatTextAreaWrapper = new JPanel(new BorderLayout()); + chatTextAreaWrapper.setBorder(JBUI.Borders.compound( + JBUI.Borders.customLine(JBColor.border(), 1, 0, 0, 0), + JBUI.Borders.empty(8))); + chatTextAreaWrapper.setBackground(getPanelBackgroundColor()); + chatTextAreaWrapper.add(userTextArea, BorderLayout.SOUTH); + rootPanel.add(chatTextAreaWrapper, gbc); + userTextArea.requestFocusInWindow(); + userTextArea.requestFocus(); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ChatContentManagerService.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ChatContentManagerService.java deleted file mode 100644 index 7cc86e3a..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ChatContentManagerService.java +++ /dev/null @@ -1,74 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.chat; - -import static java.util.Objects.requireNonNull; - -import com.intellij.openapi.components.Service; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.wm.ToolWindow; -import com.intellij.openapi.wm.ToolWindowManager; -import com.intellij.ui.content.Content; -import java.util.Arrays; -import java.util.Optional; - -@Service(Service.Level.PROJECT) -public class ChatContentManagerService { - - private final Project project; - - public ChatContentManagerService(Project project) { - this.project = project; - } - - public ToolWindowTabPanel createNewTabPanel() { - displayChatTab(); - var tabbedPane = tryFindChatTabbedPane(); - if (tabbedPane.isPresent()) { - var panel = ToolWindowTabPanelFactory.getTabPanel(project); - tabbedPane.get().addNewTab(panel); - return panel; - } - return null; - } - - public void displayChatTab() { - var toolWindow = getToolWindow(); - toolWindow.show(); - var contentManager = toolWindow.getContentManager(); - tryFindChatTabContent().ifPresentOrElse( - contentManager::setSelectedContent, - () -> contentManager.setSelectedContent(requireNonNull(contentManager.getContent(0))) - ); - } - - public Optional tryFindChatTabbedPane() { - var chatTabContent = tryFindChatTabContent(); - if (chatTabContent.isPresent()) { - var tabbedPane = Arrays.stream(chatTabContent.get().getComponent().getComponents()) - .filter(component -> component instanceof ChatTabbedPane) - .findFirst(); - if (tabbedPane.isPresent()) { - return Optional.of((ChatTabbedPane) tabbedPane.get()); - } - } - return Optional.empty(); - } - - public void resetTabbedPane() { - tryFindChatTabbedPane().ifPresent(tabbedPane -> { - tabbedPane.clearAll(); - var tabPanel = ToolWindowTabPanelFactory.getTabPanel(project); - tabPanel.displayLandingView(); - tabbedPane.addNewTab(tabPanel); - }); - } - - private Optional tryFindChatTabContent() { - return Arrays.stream(getToolWindow().getContentManager().getContents()) - .filter(content -> "Chat".equals(content.getTabName())) - .findFirst(); - } - - private ToolWindow getToolWindow() { - return requireNonNull(ToolWindowManager.getInstance(project).getToolWindow("CodeGPT")); - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ChatMessageResponseBody.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ChatMessageResponseBody.java new file mode 100644 index 00000000..a7093281 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ChatMessageResponseBody.java @@ -0,0 +1,248 @@ +package ee.carlrobert.codegpt.toolwindow.chat; + +import static ee.carlrobert.codegpt.util.ThemeUtils.getPanelBackgroundColor; +import static java.lang.String.format; +import static javax.swing.event.HyperlinkEvent.EventType.ACTIVATED; + +import com.intellij.openapi.Disposable; +import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.command.WriteCommandAction; +import com.intellij.openapi.editor.ex.EditorEx; +import com.intellij.openapi.fileEditor.FileEditorManager; +import com.intellij.openapi.options.ShowSettingsUtil; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.util.io.FileUtil; +import com.intellij.openapi.vfs.LocalFileSystem; +import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.util.ui.JBUI; +import com.vladsch.flexmark.ast.FencedCodeBlock; +import com.vladsch.flexmark.html.HtmlRenderer; +import com.vladsch.flexmark.parser.Parser; +import com.vladsch.flexmark.util.data.MutableDataSet; +import ee.carlrobert.codegpt.settings.SettingsConfigurable; +import ee.carlrobert.codegpt.util.MarkdownUtils; +import ee.carlrobert.codegpt.util.SwingUtils; +import java.awt.BorderLayout; +import java.awt.Color; +import java.util.Objects; +import javax.swing.BoxLayout; +import javax.swing.JPanel; +import javax.swing.JTextPane; +import javax.swing.UIManager; + +public class ChatMessageResponseBody extends JPanel { + + private final Project project; + private final Disposable parentDisposable; + private final StreamParser streamParser; + private JPanel currentlyProcessedElement; + private ChatToolWindowTabPanelEditor currentlyProcessedEditor; + private JTextPane currentlyProcessedTextPane; + private boolean responseReceived; + + public ChatMessageResponseBody(Project project, Disposable parentDisposable) { + this(project, getPanelBackgroundColor(), false, parentDisposable); + } + + public ChatMessageResponseBody(Project project, boolean withGhostText, Disposable parentDisposable) { + this(project, getPanelBackgroundColor(), withGhostText, parentDisposable); + } + + public ChatMessageResponseBody(Project project, Color backgroundColor, boolean withGhostText, Disposable parentDisposable) { + super(new BorderLayout()); + this.project = project; + this.parentDisposable = parentDisposable; + this.streamParser = new StreamParser(); + setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS)); + setBackground(backgroundColor); + + if (withGhostText) { + prepareProcessingTextResponse(); + currentlyProcessedTextPane.setText("

"); + } + + UIManager.addPropertyChangeListener(propertyChangeEvent -> setBackground(backgroundColor)); + } + + public ChatMessageResponseBody withResponse(String response) { + for (var message : MarkdownUtils.splitCodeBlocks(response)) { + boolean isCodeResponse = message.startsWith("```"); + if (isCodeResponse) { + currentlyProcessedEditor = null; + } + processResponse(message, isCodeResponse); + } + hideCarets(); + + return this; + } + + public void update(String partialMessage) { + for (var item : streamParser.parse(partialMessage)) { + processResponse(item.getResponse(), StreamResponseType.CODE.equals(item.getType())); + } + } + + public void displayMissingCredential() { + currentlyProcessedTextPane.setText( + "

API key not provided. Open Settings to set one.

"); + currentlyProcessedTextPane.addHyperlinkListener(e -> { + if (e.getEventType() == ACTIVATED) { + ShowSettingsUtil.getInstance().showSettingsDialog(project, SettingsConfigurable.class); + } + }); + currentlyProcessedTextPane.getCaret().setVisible(false); + } + + public void hideCarets() { + if (currentlyProcessedEditor != null) { + ((EditorEx) currentlyProcessedEditor.getEditor()).setCaretVisible(false); + ((EditorEx) currentlyProcessedEditor.getEditor()).setCaretEnabled(false); + } + if (currentlyProcessedTextPane != null && currentlyProcessedTextPane.getCaret().isVisible()) { + currentlyProcessedTextPane.getCaret().setVisible(false); + } + } + + + public void displayError(String message) { + var errorText = format("

%s

", message); + if (responseReceived) { + var errorPane = createTextPane(); + errorPane.setText(errorText); + add(new ResponseWrapper().add(errorPane)); + } else { + currentlyProcessedTextPane.setText(errorText); + } + } + + public void displayDefaultError() { + displayError("Something went wrong."); + } + + public void clear() { + removeAll(); + + streamParser.clear(); + // TODO: First message might be code block + prepareProcessingTextResponse(); + currentlyProcessedTextPane.setText("

"); + + repaint(); + revalidate(); + } + + private void processResponse(String markdownInput, boolean isCodeResponse) { + responseReceived = true; + + if (isCodeResponse) { + processCode(markdownInput); + } else { + processText(markdownInput); + } + } + + private void processCode(String markdownCode) { + var document = Parser.builder().build().parse(markdownCode); + var codeBlock = document.getChildOfType(FencedCodeBlock.class); + if (codeBlock != null) { + var code = ((FencedCodeBlock) codeBlock).getContentChars().unescape(); + var language = ((FencedCodeBlock) codeBlock).getInfo(); + if (!code.isEmpty()) { + if (currentlyProcessedEditor == null) { + prepareProcessingCodeResponse(code, language.unescape()); + } + updateEditorDocument(code); + } + } + } + + private void processText(String markdownText) { + if (currentlyProcessedTextPane == null) { + prepareProcessingTextResponse(); + } + currentlyProcessedTextPane.setText(convertMdToHtml(markdownText)); + } + + private void prepareProcessingTextResponse() { + hideCarets(); + currentlyProcessedEditor = null; + currentlyProcessedTextPane = createTextPane(); + currentlyProcessedElement = new ResponseWrapper(); + currentlyProcessedElement.add(currentlyProcessedTextPane); + add(currentlyProcessedElement); + } + + private void prepareProcessingCodeResponse(String code, String language) { + hideCarets(); + currentlyProcessedTextPane = null; + currentlyProcessedEditor = new ChatToolWindowTabPanelEditor(project, code, language, parentDisposable); + currentlyProcessedElement = new ResponseWrapper(); + + currentlyProcessedElement.add(currentlyProcessedEditor.getComponent()); + add(currentlyProcessedElement); + } + + private void updateEditorDocument(String code) { + var editor = currentlyProcessedEditor.getEditor(); + var document = editor.getDocument(); + var application = ApplicationManager.getApplication(); + Runnable updateDocumentRunnable = () -> { + application.runWriteAction(() -> + WriteCommandAction.runWriteCommandAction(project, () -> { + document.replaceString(0, document.getTextLength(), code); + editor.getCaretModel().moveToOffset(code.length()); + editor.getComponent().revalidate(); + editor.getComponent().repaint(); + })); + }; + + if (application.isUnitTestMode()) { + application.invokeAndWait(updateDocumentRunnable); + } else { + application.invokeLater(updateDocumentRunnable); + } + } + + private JTextPane createTextPane() { + var textPane = new JTextPane(); + textPane.addHyperlinkListener(event -> { + if (FileUtil.exists(event.getDescription()) && ACTIVATED.equals(event.getEventType())) { + VirtualFile file = LocalFileSystem.getInstance().findFileByPath(event.getDescription()); + FileEditorManager.getInstance(project).openFile(Objects.requireNonNull(file), true); + return; + } + + SwingUtils.handleHyperlinkClicked(event); + }); + textPane.setContentType("text/html"); + textPane.putClientProperty(JTextPane.HONOR_DISPLAY_PROPERTIES, true); + textPane.setCaretPosition(textPane.getDocument().getLength()); + textPane.setBackground(getBackground()); + textPane.setFocusable(true); + textPane.getCaret().setVisible(true); + textPane.setEditable(false); + textPane.setBorder(JBUI.Borders.empty()); + return textPane; + } + + private String convertMdToHtml(String message) { + MutableDataSet options = new MutableDataSet(); + var document = Parser.builder(options).build().parse(message); + return HtmlRenderer.builder(options) + .nodeRendererFactory(new ResponseNodeRenderer.Factory()) + .build() + .render(document); + } + + private static class ResponseWrapper extends JPanel { + + ResponseWrapper() { + super(new BorderLayout()); + setBorder(JBUI.Borders.empty()); + setBackground(getBackground()); + + UIManager.addPropertyChangeListener(propertyChangeEvent -> setBackground(getBackground())); + } + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ChatTabbedPane.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ChatTabbedPane.java deleted file mode 100644 index 7f8468e5..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ChatTabbedPane.java +++ /dev/null @@ -1,111 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.chat; - -import com.intellij.ui.components.JBTabbedPane; -import ee.carlrobert.codegpt.state.conversations.ConversationsState; -import ee.carlrobert.codegpt.state.settings.SettingsState; -import ee.carlrobert.codegpt.toolwindow.chat.html.ChatToolWindowTabHtmlPanel; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.util.Map; -import java.util.Optional; -import java.util.TreeMap; -import java.util.UUID; -import javax.swing.JPanel; - -public class ChatTabbedPane extends JBTabbedPane { - - private final Map activeTabMapping = new TreeMap<>((o1, o2) -> { - int n1 = Integer.parseInt(o1.replaceAll("\\D", "")); - int n2 = Integer.parseInt(o2.replaceAll("\\D", "")); - return Integer.compare(n1, n2); - }); - - public ChatTabbedPane() { - setTabComponentInsets(null); - addChangeListener(e -> refreshTabState()); - } - - public void addNewTab(ToolWindowTabPanel toolWindowPanel) { - var tabIndices = activeTabMapping.keySet().toArray(new String[0]); - var nextIndex = 0; - for (String title : tabIndices) { - int tabNum = Integer.parseInt(title.replaceAll("\\D+", "")); - if ((tabNum - 1) == nextIndex) { - nextIndex++; - } else { - break; - } - } - - var title = "Chat " + (nextIndex + 1); - super.insertTab(title, null, toolWindowPanel.getContent(), null, nextIndex); - activeTabMapping.put(title, toolWindowPanel); - super.setSelectedIndex(nextIndex); - - if (nextIndex > 0) { - setTabComponentAt(nextIndex, createCloseableTabButtonPanel(title)); - } - } - - public Optional tryFindActiveConversationTitle(UUID conversationId) { - return activeTabMapping.entrySet().stream() - .filter(entry -> { - var panelConversation = entry.getValue().getConversation(); - return panelConversation != null && conversationId.equals(panelConversation.getId()); - }) - .findFirst() - .map(Map.Entry::getKey); - } - - private void refreshTabState() { - var selectedIndex = getSelectedIndex(); - if (selectedIndex == -1) { - return; - } - - var toolWindowPanel = activeTabMapping.get(getTitleAt(selectedIndex)); - if (toolWindowPanel != null) { - if (toolWindowPanel instanceof ChatToolWindowTabHtmlPanel) { - ((ChatToolWindowTabHtmlPanel) toolWindowPanel).refreshMarkdownPanel(); - } - var conversation = toolWindowPanel.getConversation(); - if (conversation != null) { - ConversationsState.getInstance().setCurrentConversation(conversation); - SettingsState.getInstance().syncSettings(conversation); - } - } - } - - private JPanel createCloseableTabButtonPanel(String title) { - var button = new CloseableTabButton(title); - button.addActionListener(new CloseActionListener(title)); - return button.getComponent(); - } - - class CloseActionListener implements ActionListener { - - private final String title; - - public CloseActionListener(String title) { - this.title = title; - } - - public void actionPerformed(ActionEvent evt) { - var tabIndex = indexOfTab(title); - if (tabIndex >= 0) { - var toolWindowPanel = activeTabMapping.get(title); - if (toolWindowPanel instanceof ChatToolWindowTabHtmlPanel) { - ((ChatToolWindowTabHtmlPanel) toolWindowPanel).dispose(); - } - - removeTabAt(tabIndex); - activeTabMapping.remove(title); - } - } - } - - public void clearAll() { - removeAll(); - activeTabMapping.clear(); - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ChatToolWindowPanel.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ChatToolWindowPanel.java deleted file mode 100644 index aabc08fb..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ChatToolWindowPanel.java +++ /dev/null @@ -1,59 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.chat; - -import com.intellij.openapi.actionSystem.ActionManager; -import com.intellij.openapi.actionSystem.ActionToolbar; -import com.intellij.openapi.actionSystem.DefaultActionGroup; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.ui.SimpleToolWindowPanel; -import ee.carlrobert.codegpt.state.conversations.ConversationsState; -import ee.carlrobert.codegpt.toolwindow.chat.actions.CreateNewConversationAction; -import ee.carlrobert.codegpt.toolwindow.chat.actions.OpenInEditorAction; -import org.jetbrains.annotations.NotNull; - -public class ChatToolWindowPanel extends SimpleToolWindowPanel { - - public ChatToolWindowPanel(@NotNull Project project) { - super(true); - initialize(project); - } - - private void initialize(Project project) { - var tabPanel = ToolWindowTabPanelFactory.getTabPanel(project); - var conversation = ConversationsState.getCurrentConversation(); - if (conversation == null) { - tabPanel.displayLandingView(); - } else { - tabPanel.displayConversation(conversation); - } - - var tabbedPane = createTabbedPane(tabPanel); - setToolbar(createActionToolbar(project, tabbedPane).getComponent()); - setContent(tabbedPane); - } - - private ActionToolbar createActionToolbar(Project project, ChatTabbedPane tabbedPane) { - var actionGroup = new DefaultActionGroup("TOOLBAR_ACTION_GROUP", false); - actionGroup.add(new CreateNewConversationAction(() -> { - var panel = ToolWindowTabPanelFactory.getTabPanel(project); - panel.displayLandingView(); - tabbedPane.addNewTab(panel); - repaint(); - revalidate(); - })); - actionGroup.add(new OpenInEditorAction()); - actionGroup.addSeparator(); - // actionGroup.addSeparator(); - // actionGroup.add(new TokenToolbarLabelAction()); - - var toolbar = ActionManager.getInstance() - .createActionToolbar("NAVIGATION_BAR_TOOLBAR", actionGroup, false); - toolbar.setTargetComponent(this); - return toolbar; - } - - private ChatTabbedPane createTabbedPane(ToolWindowTabPanel tabPanel) { - var tabbedPane = new ChatTabbedPane(); - tabbedPane.addNewTab(tabPanel); - return tabbedPane; - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ChatToolWindowTabPanel.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ChatToolWindowTabPanel.java new file mode 100644 index 00000000..6d00d33b --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ChatToolWindowTabPanel.java @@ -0,0 +1,25 @@ +package ee.carlrobert.codegpt.toolwindow.chat; + +import com.intellij.openapi.Disposable; +import ee.carlrobert.codegpt.conversations.Conversation; +import ee.carlrobert.codegpt.conversations.message.Message; +import javax.swing.JPanel; +import org.jetbrains.annotations.Nullable; + +public interface ChatToolWindowTabPanel extends Disposable { + + JPanel getContent(); + + @Nullable Conversation getConversation(); + + void setConversation(@Nullable Conversation conversation); + + void displayLandingView(); + + void displayConversation(Conversation conversation); + + void startNewConversation(Message message); + + void sendMessage(Message message); + void requestFocusForTextArea(); +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ChatToolWindowTabPanelEditor.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ChatToolWindowTabPanelEditor.java new file mode 100644 index 00000000..626827e0 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ChatToolWindowTabPanelEditor.java @@ -0,0 +1,157 @@ +package ee.carlrobert.codegpt.toolwindow.chat; + +import static ee.carlrobert.codegpt.util.FileUtils.findFileNameExtensionMapping; + +import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer; +import com.intellij.icons.AllIcons; +import com.intellij.openapi.Disposable; +import com.intellij.openapi.actionSystem.ActionGroup; +import com.intellij.openapi.actionSystem.ActionManager; +import com.intellij.openapi.actionSystem.AnAction; +import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.openapi.actionSystem.DefaultActionGroup; +import com.intellij.openapi.application.PathManager; +import com.intellij.openapi.editor.Document; +import com.intellij.openapi.editor.Editor; +import com.intellij.openapi.editor.EditorFactory; +import com.intellij.openapi.editor.EditorKind; +import com.intellij.openapi.editor.colors.EditorColorsManager; +import com.intellij.openapi.editor.ex.EditorEx; +import com.intellij.openapi.editor.impl.ContextMenuPopupHandler; +import com.intellij.openapi.fileEditor.FileDocumentManager; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.util.Disposer; +import com.intellij.psi.PsiDocumentManager; +import com.intellij.testFramework.LightVirtualFile; +import com.intellij.ui.JBColor; +import com.intellij.ui.components.JBLabel; +import com.intellij.util.ui.JBUI; +import ee.carlrobert.codegpt.actions.toolwindow.ReplaceCodeInMainEditorAction; +import ee.carlrobert.codegpt.toolwindow.IconActionButton; +import ee.carlrobert.codegpt.util.EditorUtils; +import ee.carlrobert.codegpt.util.OverlayUtils; +import java.awt.BorderLayout; +import java.awt.FlowLayout; +import java.awt.Toolkit; +import java.awt.datatransfer.Clipboard; +import java.awt.datatransfer.StringSelection; +import java.awt.event.MouseEvent; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Map; +import javax.swing.Box; +import javax.swing.JComponent; +import javax.swing.JPanel; +import org.jetbrains.annotations.NotNull; + +public class ChatToolWindowTabPanelEditor implements Disposable { + + private final Project project; + private final Editor editor; + private final Map.Entry fileNameExtensionMapping; + + public ChatToolWindowTabPanelEditor(Project project, String code, String language, Disposable disposableParent) { + this.project = project; + this.fileNameExtensionMapping = findFileNameExtensionMapping(language); + + var fileName = "temp_" + DateTimeFormatter.ofPattern("yyyyMMddHHmmss").format(LocalDateTime.now()) + fileNameExtensionMapping.getValue(); + var lightVirtualFile = new LightVirtualFile(String.format("%s/%s", PathManager.getTempPath(), fileName), code); + var document = FileDocumentManager.getInstance().getDocument(lightVirtualFile); + if (document == null) { + document = EditorFactory.getInstance().createDocument(code); + } + disableHighlighting(document); + editor = EditorFactory.getInstance().createEditor(document, project, lightVirtualFile, true, EditorKind.UNTYPED); + String originalGroupId = ((EditorEx) editor).getContextMenuGroupId(); + AnAction originalGroup = originalGroupId == null ? null : ActionManager.getInstance().getAction(originalGroupId); + DefaultActionGroup group = new DefaultActionGroup(); + if (originalGroup instanceof ActionGroup) { + group.addAll(((ActionGroup) originalGroup).getChildren(null)); + } + group.add(new ReplaceCodeInMainEditorAction()); + + var editorEx = ((EditorEx) editor); + editorEx.installPopupHandler(new ContextMenuPopupHandler.Simple(group)); + editorEx.setColorsScheme(EditorColorsManager.getInstance().getSchemeForCurrentUITheme()); + + var settings = editor.getSettings(); + settings.setAdditionalColumnsCount(0); + settings.setAdditionalLinesCount(0); + settings.setAdditionalPageAtBottom(false); + settings.setVirtualSpace(false); + settings.setUseSoftWraps(false); + + Disposer.register(disposableParent, this); + } + + public JComponent getComponent() { + var wrapper = new JPanel(new BorderLayout()); + wrapper.add(createHeaderComponent(fileNameExtensionMapping.getKey()), BorderLayout.NORTH); + wrapper.add(editor.getComponent(), BorderLayout.SOUTH); + return wrapper; + } + + public Editor getEditor() { + return editor; + } + + private void disableHighlighting(Document document) { + var psiFile = PsiDocumentManager.getInstance(project).getPsiFile(document); + if (psiFile != null) { + DaemonCodeAnalyzer.getInstance(project).setHighlightingEnabled(psiFile, false); + } + } + + private JPanel createHeaderComponent(String language) { + var headerComponent = new JPanel(new BorderLayout()); + headerComponent.setBorder(JBUI.Borders.compound( + JBUI.Borders.customLine(JBColor.border(), 1, 1, 1, 1), + JBUI.Borders.empty(8))); + headerComponent.add(new JBLabel(language), BorderLayout.LINE_START); + headerComponent.add(createHeaderActions(), BorderLayout.LINE_END); + return headerComponent; + } + + private JPanel createHeaderActions() { + var wrapper = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); + wrapper.add(new IconActionButton("Copy", AllIcons.Actions.Copy, new AnAction() { + @Override + public void actionPerformed(@NotNull AnActionEvent event) { + StringSelection stringSelection = new StringSelection(editor.getDocument().getText()); + Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); + clipboard.setContents(stringSelection, null); + + var locationOnScreen = ((MouseEvent) event.getInputEvent()).getLocationOnScreen(); + locationOnScreen.y = locationOnScreen.y - 16; + + OverlayUtils.showInfoBalloon("Code copied!", locationOnScreen); + } + })); + wrapper.add(Box.createHorizontalStrut(8)); + wrapper.add(new IconActionButton("Replace in Main Editor", AllIcons.Actions.Replace, new AnAction() { + @Override + public void actionPerformed(@NotNull AnActionEvent event) { + var project = event.getProject(); + if (project != null) { + if (EditorUtils.isMainEditorTextSelected(project)) { + EditorUtils.replaceMainEditorSelection(project, editor.getDocument().getText()); + } else { + var locationOnScreen = ((MouseEvent) event.getInputEvent()).getLocationOnScreen(); + locationOnScreen.y = locationOnScreen.y - 16; + + OverlayUtils.showWarningBalloon( + EditorUtils.getSelectedEditor(project) == null ? "Unable to locate a selected editor" : "Please select a target code before proceeding", + locationOnScreen); + } + } + } + })); + return wrapper; + } + + + @Override + public void dispose() { + EditorFactory.getInstance().releaseEditor(editor); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/CloseableTabButton.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/CloseableTabButton.java deleted file mode 100644 index be951383..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/CloseableTabButton.java +++ /dev/null @@ -1,45 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.chat; - -import com.intellij.icons.AllIcons; -import com.intellij.util.ui.JBUI; -import java.awt.Dimension; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import javax.swing.BorderFactory; -import javax.swing.Icon; -import javax.swing.JButton; -import javax.swing.JLabel; -import javax.swing.JPanel; - -public class CloseableTabButton extends JButton { - - private static final Icon closeIcon = AllIcons.Actions.Close; - private final String title; - - public CloseableTabButton(String title) { - super(closeIcon); - this.title = title; - setBorder(BorderFactory.createEmptyBorder()); - setContentAreaFilled(false); - setPreferredSize(new Dimension(closeIcon.getIconWidth(), closeIcon.getIconHeight())); - setToolTipText("Close"); - setRolloverIcon(AllIcons.Actions.CloseHovered); - } - - public JPanel getComponent() { - var panel = new JPanel(new GridBagLayout()); - panel.setOpaque(false); - - var constraints = new GridBagConstraints(); - constraints.gridx = 0; - constraints.gridy = 0; - constraints.weightx = 1; - panel.add(new JLabel(title), constraints); - - constraints.gridx++; - constraints.weightx = 0; - constraints.insets = JBUI.insetsLeft(8); - panel.add(this, constraints); - return panel; - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ResponseNodeRenderer.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ResponseNodeRenderer.java new file mode 100644 index 00000000..b747dde0 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ResponseNodeRenderer.java @@ -0,0 +1,50 @@ +package ee.carlrobert.codegpt.toolwindow.chat; + +import com.intellij.ui.JBColor; +import com.vladsch.flexmark.ast.BulletListItem; +import com.vladsch.flexmark.ast.Code; +import com.vladsch.flexmark.ast.OrderedListItem; +import com.vladsch.flexmark.ast.Paragraph; +import com.vladsch.flexmark.html.HtmlWriter; +import com.vladsch.flexmark.html.renderer.NodeRenderer; +import com.vladsch.flexmark.html.renderer.NodeRendererContext; +import com.vladsch.flexmark.html.renderer.NodeRendererFactory; +import com.vladsch.flexmark.html.renderer.NodeRenderingHandler; +import com.vladsch.flexmark.util.data.DataHolder; +import ee.carlrobert.codegpt.util.ThemeUtils; +import java.util.Set; +import org.jetbrains.annotations.NotNull; + +public class ResponseNodeRenderer implements NodeRenderer { + + @Override + public Set> getNodeRenderingHandlers() { + return Set.of( + new NodeRenderingHandler<>(Paragraph.class, this::renderParagraph), + new NodeRenderingHandler<>(Code.class, this::renderCode) + ); + } + + private void renderCode(Code node, NodeRendererContext context, HtmlWriter html) { + html.attr("style", "color: " + ThemeUtils.getRGB(new JBColor(0x00627A, 0xCC7832))); + context.delegateRender(); + } + + private void renderParagraph(Paragraph node, NodeRendererContext context, HtmlWriter html) { + if (node.getParent() instanceof BulletListItem || node.getParent() instanceof OrderedListItem) { + html.attr("style", "margin: 0; padding:0;"); + } else { + html.attr("style", "margin-top: 4px; margin-bottom: 4px;"); + } + context.delegateRender(); + } + + public static class Factory implements NodeRendererFactory { + + @NotNull + @Override + public NodeRenderer apply(@NotNull DataHolder options) { + return new ResponseNodeRenderer(); + } + } +} \ No newline at end of file diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ResponsePanel.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ResponsePanel.java new file mode 100644 index 00000000..37a5ff15 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ResponsePanel.java @@ -0,0 +1,137 @@ +package ee.carlrobert.codegpt.toolwindow.chat; + +import static ee.carlrobert.codegpt.util.ThemeUtils.getPanelBackgroundColor; + +import com.intellij.icons.AllIcons.Actions; +import com.intellij.openapi.actionSystem.AnAction; +import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.ui.JBColor; +import com.intellij.ui.components.JBLabel; +import com.intellij.util.ui.JBFont; +import com.intellij.util.ui.JBUI; +import ee.carlrobert.codegpt.Icons; +import ee.carlrobert.codegpt.toolwindow.IconActionButton; +import java.awt.BorderLayout; +import java.awt.FlowLayout; +import javax.swing.JComponent; +import javax.swing.JPanel; +import javax.swing.SwingConstants; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public class ResponsePanel extends JPanel { + + private final Header header; + private final Body body; + + public ResponsePanel() { + super(new BorderLayout()); + header = new Header(); + body = new Body(); + add(header, BorderLayout.NORTH); + add(body, BorderLayout.SOUTH); + } + + public void enableActions() { + header.enableActions(true); + } + + public ResponsePanel withReloadAction(Runnable onReload) { + header.addReloadAction(onReload); + return this; + } + + public ResponsePanel withDeleteAction(Runnable onDelete) { + header.addDeleteAction(onDelete); + return this; + } + + public ResponsePanel addContent(JComponent content) { + body.addContent(content); + return this; + } + + public void updateContent(JComponent content) { + body.updateContent(content); + } + + public JComponent getContent() { + return body.getContent(); + } + + static class Header extends JPanel { + + private final JPanel iconsWrapper; + + Header() { + super(new BorderLayout()); + setBackground(getPanelBackgroundColor()); + setBorder(JBUI.Borders.empty(12, 8, 4, 8)); + add(getIconLabel(), BorderLayout.LINE_START); + + iconsWrapper = new JPanel(new FlowLayout(FlowLayout.LEFT, 8, 0)); + iconsWrapper.setBackground(getBackground()); + add(iconsWrapper, BorderLayout.LINE_END); + } + + public void enableActions(boolean enabled) { + for (var iconButton : iconsWrapper.getComponents()) { + iconButton.setEnabled(enabled); + } + } + + public void addReloadAction(Runnable onReload) { + iconsWrapper.add(new IconActionButton("Reload response", Actions.Refresh, new AnAction() { + @Override + public void actionPerformed(@NotNull AnActionEvent e) { + enableActions(false); + onReload.run(); + } + })); + } + + public void addDeleteAction(Runnable onDelete) { + iconsWrapper.add(new IconActionButton("Delete response", Actions.GC, new AnAction() { + @Override + public void actionPerformed(@NotNull AnActionEvent e) { + onDelete.run(); + } + })); + } + + private JBLabel getIconLabel() { + return new JBLabel("CodeGPT", Icons.DefaultIcon, SwingConstants.LEADING) + .setAllowAutoWrapping(true) + .withFont(JBFont.label().asBold()); + } + } + + static class Body extends JPanel { + + private @Nullable JComponent content; + + Body() { + super(new BorderLayout()); + setBackground(getPanelBackgroundColor()); + setBorder(JBUI.Borders.compound( + JBUI.Borders.customLine(JBColor.border(), 0, 0, 1, 0), + JBUI.Borders.empty(4, 8, 8, 8))); + } + + public void addContent(JComponent content) { + this.content = content; + add(content); + } + + public void updateContent(JComponent content) { + removeAll(); + revalidate(); + repaint(); + addContent(content); + } + + public @Nullable JComponent getContent() { + return content; + } + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/SmartScroller.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/SmartScroller.java new file mode 100644 index 00000000..b7044904 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/SmartScroller.java @@ -0,0 +1,171 @@ +package ee.carlrobert.codegpt.toolwindow.chat; + +import java.awt.Component; +import java.awt.event.AdjustmentEvent; +import java.awt.event.AdjustmentListener; +import javax.swing.BoundedRangeModel; +import javax.swing.JScrollBar; +import javax.swing.JScrollPane; +import javax.swing.SwingUtilities; +import javax.swing.text.DefaultCaret; +import javax.swing.text.JTextComponent; + +/** + * The SmartScroller will attempt to keep the viewport positioned based on + * the users interaction with the scrollbar. The normal behaviour is to keep + * the viewport positioned to see new data as it is dynamically added. + *

+ * Assuming vertical scrolling and data is added to the bottom: + *

+ * - when the viewport is at the bottom and new data is added, + * then automatically scroll the viewport to the bottom + * - when the viewport is not at the bottom and new data is added, + * then do nothing with the viewport + *

+ * Assuming vertical scrolling and data is added to the top: + *

+ * - when the viewport is at the top and new data is added, + * then do nothing with the viewport + * - when the viewport is not at the top and new data is added, then adjust + * the viewport to the relative position it was at before the data was added + *

+ * Similiar logic would apply for horizontal scrolling. + */ +public class SmartScroller implements AdjustmentListener { + public final static int HORIZONTAL = 0; + public final static int VERTICAL = 1; + + public final static int START = 0; + public final static int END = 1; + + private int viewportPosition; + + private JScrollBar scrollBar; + private boolean adjustScrollBar = true; + + private int previousValue = -1; + private int previousMaximum = -1; + + /** + * Convenience constructor. + * Scroll direction is VERTICAL and viewport position is at the END. + * + * @param scrollPane the scroll pane to monitor + */ + public SmartScroller(JScrollPane scrollPane) { + this(scrollPane, VERTICAL, END); + } + + /** + * Convenience constructor. + * Scroll direction is VERTICAL. + * + * @param scrollPane the scroll pane to monitor + * @param viewportPosition valid values are START and END + */ + public SmartScroller(JScrollPane scrollPane, int viewportPosition) { + this(scrollPane, VERTICAL, viewportPosition); + } + + /** + * Specify how the SmartScroller will function. + * + * @param scrollPane the scroll pane to monitor + * @param scrollDirection indicates which JScrollBar to monitor. + * Valid values are HORIZONTAL and VERTICAL. + * @param viewportPosition indicates where the viewport will normally be + * positioned as data is added. + * Valid values are START and END + */ + public SmartScroller(JScrollPane scrollPane, int scrollDirection, int viewportPosition) { + if (scrollDirection != HORIZONTAL + && scrollDirection != VERTICAL) { + throw new IllegalArgumentException("invalid scroll direction specified"); + } + + if (viewportPosition != START + && viewportPosition != END) { + throw new IllegalArgumentException("invalid viewport position specified"); + } + + this.viewportPosition = viewportPosition; + + if (scrollDirection == HORIZONTAL) { + scrollBar = scrollPane.getHorizontalScrollBar(); + } else { + scrollBar = scrollPane.getVerticalScrollBar(); + } + + scrollBar.addAdjustmentListener(this); + + // Turn off automatic scrolling for text components + + Component view = scrollPane.getViewport().getView(); + + if (view instanceof JTextComponent) { + JTextComponent textComponent = (JTextComponent) view; + DefaultCaret caret = (DefaultCaret) textComponent.getCaret(); + caret.setUpdatePolicy(DefaultCaret.NEVER_UPDATE); + } + } + + @Override + public void adjustmentValueChanged(final AdjustmentEvent e) { + SwingUtilities.invokeLater(new Runnable() { + public void run() { + checkScrollBar(e); + } + }); + } + + /* + * Analyze every adjustment event to determine when the viewport + * needs to be repositioned. + */ + private void checkScrollBar(AdjustmentEvent e) { + // The scroll bar listModel contains information needed to determine + // whether the viewport should be repositioned or not. + + JScrollBar scrollBar = (JScrollBar) e.getSource(); + BoundedRangeModel listModel = scrollBar.getModel(); + int value = listModel.getValue(); + int extent = listModel.getExtent(); + int maximum = listModel.getMaximum(); + + boolean valueChanged = previousValue != value; + boolean maximumChanged = previousMaximum != maximum; + + // Check if the user has manually repositioned the scrollbar + + if (valueChanged && !maximumChanged) { + if (viewportPosition == START) { + adjustScrollBar = value != 0; + } else { + adjustScrollBar = value + extent >= maximum; + } + } + + // Reset the "value" so we can reposition the viewport and + // distinguish between a user scroll and a program scroll. + // (ie. valueChanged will be false on a program scroll) + + if (adjustScrollBar && viewportPosition == END) { + // Scroll the viewport to the end. + scrollBar.removeAdjustmentListener(this); + value = maximum - extent; + scrollBar.setValue(value); + scrollBar.addAdjustmentListener(this); + } + + if (adjustScrollBar && viewportPosition == START) { + // Keep the viewport at the same relative viewportPosition + scrollBar.removeAdjustmentListener(this); + value = value + maximum - previousMaximum; + scrollBar.setValue(value); + scrollBar.addAdjustmentListener(this); + } + + previousValue = value; + previousMaximum = maximum; + } +} \ No newline at end of file diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/StreamParseResponse.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/StreamParseResponse.java new file mode 100644 index 00000000..f98f45c3 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/StreamParseResponse.java @@ -0,0 +1,20 @@ +package ee.carlrobert.codegpt.toolwindow.chat; + +public class StreamParseResponse { + + private final StreamResponseType type; + private final String response; + + public StreamParseResponse(StreamResponseType type, String response) { + this.type = type; + this.response = response; + } + + public StreamResponseType getType() { + return type; + } + + public String getResponse() { + return response; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/StreamParser.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/StreamParser.java new file mode 100644 index 00000000..10dacffe --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/StreamParser.java @@ -0,0 +1,49 @@ +package ee.carlrobert.codegpt.toolwindow.chat; + +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class StreamParser { + + private static final String CODE_BLOCK_STARTING_REGEX = "```[a-zA-Z]*\n"; + private final StringBuilder messageBuilder = new StringBuilder(); + private boolean isProcessingCode; + + public List parse(String message) { + messageBuilder.append(message); + + Pattern pattern = Pattern.compile(CODE_BLOCK_STARTING_REGEX); + Matcher matcher = pattern.matcher(messageBuilder.toString()); + if (!isProcessingCode && matcher.find()) { + isProcessingCode = true; + + var startingIndex = messageBuilder.indexOf(matcher.group()); + var prevMessage = messageBuilder.substring(0, startingIndex); + messageBuilder.delete(0, messageBuilder.indexOf(matcher.group())); + + return List.of( + new StreamParseResponse(StreamResponseType.TEXT, prevMessage), + new StreamParseResponse(StreamResponseType.CODE, messageBuilder.toString())); + } + + var endingIndex = messageBuilder.indexOf("```\n", 1); + if (isProcessingCode && endingIndex > 0) { + isProcessingCode = false; + + var codeResponse = messageBuilder.substring(0, endingIndex + 3); + messageBuilder.delete(0, endingIndex + 3); + + return List.of( + new StreamParseResponse(StreamResponseType.CODE, codeResponse), + new StreamParseResponse(StreamResponseType.TEXT, messageBuilder.toString())); + } + + return List.of(new StreamParseResponse(isProcessingCode ? StreamResponseType.CODE : StreamResponseType.TEXT, messageBuilder.toString())); + } + + public void clear() { + messageBuilder.setLength(0); + isProcessingCode = false; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/StreamResponseType.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/StreamResponseType.java new file mode 100644 index 00000000..3982aa5a --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/StreamResponseType.java @@ -0,0 +1,6 @@ +package ee.carlrobert.codegpt.toolwindow.chat; + +public enum StreamResponseType { + CODE, + TEXT +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ToolWindowTabPanel.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ToolWindowTabPanel.java deleted file mode 100644 index e700e2c8..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ToolWindowTabPanel.java +++ /dev/null @@ -1,20 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.chat; - -import ee.carlrobert.codegpt.state.conversations.Conversation; -import ee.carlrobert.codegpt.state.conversations.message.Message; -import javax.swing.JPanel; - -public interface ToolWindowTabPanel { - - JPanel getContent(); - - Conversation getConversation(); - - void displayLandingView(); - - void displayConversation(Conversation conversation); - - void startNewConversation(Message message); - - void startConversation(Message message, boolean isRetry); -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ToolWindowTabPanelFactory.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ToolWindowTabPanelFactory.java deleted file mode 100644 index 94785f85..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/ToolWindowTabPanelFactory.java +++ /dev/null @@ -1,17 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.chat; - -import com.intellij.openapi.project.Project; -import com.intellij.ui.jcef.JBCefApp; -import ee.carlrobert.codegpt.toolwindow.chat.html.ChatToolWindowTabHtmlPanel; -import ee.carlrobert.codegpt.toolwindow.chat.swing.ChatToolWindowTabPanel; -import org.jetbrains.annotations.NotNull; - -public class ToolWindowTabPanelFactory { - - public static ToolWindowTabPanel getTabPanel(@NotNull Project project) { - if (JBCefApp.isSupported()) { - return new ChatToolWindowTabHtmlPanel(project); - } - return new ChatToolWindowTabPanel(project); - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/UserMessagePanel.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/UserMessagePanel.java new file mode 100644 index 00000000..0dcc419a --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/UserMessagePanel.java @@ -0,0 +1,41 @@ +package ee.carlrobert.codegpt.toolwindow.chat; + +import com.intellij.openapi.Disposable; +import com.intellij.openapi.project.Project; +import com.intellij.ui.JBColor; +import com.intellij.ui.components.JBLabel; +import com.intellij.util.ui.JBFont; +import com.intellij.util.ui.JBUI; +import com.intellij.util.ui.UIUtil; +import ee.carlrobert.codegpt.conversations.message.Message; +import ee.carlrobert.codegpt.settings.SettingsState; +import java.awt.BorderLayout; +import javax.swing.JPanel; + +public class UserMessagePanel extends JPanel { + + public UserMessagePanel(Project project, Message message, boolean displayEditorMessage, Disposable parentDisposable) { + super(new BorderLayout()); + setBorder(JBUI.Borders.compound( + JBUI.Borders.customLine(JBColor.border(), 0, 0, 1, 0), + JBUI.Borders.empty(12, 8, 8, 8))); + add(createDisplayNameWrapper(), BorderLayout.NORTH); + add(createUserMessageTextPane(project, message, displayEditorMessage, parentDisposable), BorderLayout.SOUTH); + } + + private JPanel createDisplayNameWrapper() { + return JBUI.Panels.simplePanel() + .withBorder(JBUI.Borders.emptyBottom(6)) + .addToLeft(new JBLabel(SettingsState.getInstance().getDisplayName()) + .setAllowAutoWrapping(true) + .withFont(JBFont.label().asBold())); + } + + private JPanel createUserMessageTextPane(Project project, Message message, boolean displayEditorMessage, Disposable parentDisposable) { + var prompt = message.getPrompt(); + if (displayEditorMessage && message.getUserMessage() != null) { + prompt = message.getUserMessage(); + } + return new ChatMessageResponseBody(project, UIUtil.getPanelBackground(), false, parentDisposable).withResponse(prompt); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/UserTextArea.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/UserTextArea.java new file mode 100644 index 00000000..d7d70d93 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/UserTextArea.java @@ -0,0 +1,186 @@ +package ee.carlrobert.codegpt.toolwindow.chat; + +import com.intellij.icons.AllIcons; +import com.intellij.openapi.editor.ex.util.EditorUtil; +import com.intellij.openapi.util.registry.Registry; +import com.intellij.ui.JBColor; +import com.intellij.ui.components.JBTextArea; +import com.intellij.util.ui.JBUI; +import com.intellij.util.ui.UIUtil; +import ee.carlrobert.codegpt.Icons; +import ee.carlrobert.codegpt.completions.CompletionRequestHandler; +import ee.carlrobert.codegpt.util.SwingUtils; +import java.awt.BasicStroke; +import java.awt.BorderLayout; +import java.awt.Cursor; +import java.awt.FlowLayout; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Insets; +import java.awt.RenderingHints; +import java.awt.event.ActionEvent; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; +import java.util.function.Consumer; +import javax.swing.AbstractAction; +import javax.swing.Icon; +import javax.swing.JButton; +import javax.swing.JPanel; +import javax.swing.KeyStroke; +import javax.swing.UIManager; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public class UserTextArea extends JPanel { + + private static final String TEXT_SUBMIT = "text-submit"; + private static final String INSERT_BREAK = "insert-break"; + private static final JBColor BACKGROUND_COLOR = JBColor.namedColor("Editor.SearchField.background", UIUtil.getTextFieldBackground()); + + private final JBTextArea textArea; + + private final int textAreaRadius = 16; + private final Consumer onSubmit; + private JButton stopButton; + private JPanel iconsPanel; + private boolean submitEnabled = true; + + public UserTextArea(Consumer onSubmit) { + this.onSubmit = onSubmit; + + textArea = new JBTextArea(); + textArea.setOpaque(false); + textArea.setBackground(BACKGROUND_COLOR); + textArea.setLineWrap(true); + textArea.getEmptyText().setText("Ask me anything"); + textArea.setBorder(JBUI.Borders.empty(8, 4)); + var input = textArea.getInputMap(); + input.put(KeyStroke.getKeyStroke("ENTER"), TEXT_SUBMIT); + input.put(KeyStroke.getKeyStroke("shift ENTER"), INSERT_BREAK); + textArea.getActionMap().put(TEXT_SUBMIT, new AbstractAction() { + @Override + public void actionPerformed(ActionEvent e) { + handleSubmit(); + } + }); + textArea.addFocusListener(new FocusListener() { + @Override + public void focusGained(FocusEvent e) { + UserTextArea.super.paintBorder(UserTextArea.super.getGraphics()); + } + + @Override + public void focusLost(FocusEvent e) { + UserTextArea.super.paintBorder(UserTextArea.super.getGraphics()); + } + }); + textArea.getDocument().addDocumentListener(new DocumentListener() { + @Override + public void removeUpdate(DocumentEvent e) { + if (e.getDocument().getLength() == 0) { + iconsPanel.getComponents()[0].setEnabled(false); + } + } + + @Override + public void insertUpdate(DocumentEvent e) { + if (e.getDocument().getLength() == 1) { + iconsPanel.getComponents()[0].setEnabled(true); + } + } + + @Override + public void changedUpdate(DocumentEvent e) { + } + }); + updateFont(); + init(); + } + + public void focus() { + textArea.requestFocus(); + textArea.requestFocusInWindow(); + } + + @Override + protected void paintComponent(Graphics g) { + Graphics2D g2 = (Graphics2D) g.create(); + g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + g2.setColor(getBackground()); + g2.fillRoundRect(0, 0, getWidth() - 1, getHeight() - 1, textAreaRadius, textAreaRadius); + super.paintComponent(g); + } + + @Override + protected void paintBorder(Graphics g) { + Graphics2D g2 = (Graphics2D) g.create(); + g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + g2.setColor(JBUI.CurrentTheme.ActionButton.focusedBorder()); + if (textArea.isFocusOwner()) { + g2.setStroke(new BasicStroke(1.5F)); + } + g2.drawRoundRect(0, 0, getWidth() - 1, getHeight() - 1, textAreaRadius, textAreaRadius); + } + + @Override + public Insets getInsets() { + return JBUI.insets(6, 12, 6, 6); + } + + public void setSubmitEnabled(boolean submitEnabled) { + this.submitEnabled = submitEnabled; + stopButton.setEnabled(!submitEnabled); + } + + public void setTextAreaEnabled(boolean textAreaEnabled) { + textArea.setEnabled(textAreaEnabled); + } + + private void handleSubmit() { + if (submitEnabled && textArea.getText().length() > 0) { + // Replacing each newline with two newlines to ensure proper Markdown formatting + var text = textArea.getText().replace("\n", "\n\n"); + onSubmit.accept(text); + textArea.setText(""); + } + } + + private void init() { + setOpaque(false); + setLayout(new BorderLayout()); + add(textArea, BorderLayout.CENTER); + + stopButton = createIconButton(AllIcons.Actions.Suspend, null); + + var flowLayout = new FlowLayout(FlowLayout.RIGHT); + flowLayout.setHgap(8); + iconsPanel = new JPanel(flowLayout); + iconsPanel.add(createIconButton(Icons.SendIcon, this::handleSubmit)); + iconsPanel.add(stopButton); + add(JBUI.Panels.simplePanel().addToBottom(iconsPanel), BorderLayout.EAST); + } + + private void updateFont() { + if (Registry.is("ide.find.use.editor.font", false)) { + textArea.setFont(EditorUtil.getEditorFont()); + } else { + textArea.setFont(UIManager.getFont("TextField.font")); + } + } + + private JButton createIconButton(Icon icon, @Nullable Runnable submitListener) { + var button = SwingUtils.createIconButton(icon); + if (submitListener != null) { + button.addActionListener((e) -> handleSubmit()); + } + button.setCursor(new Cursor(Cursor.HAND_CURSOR)); + button.setEnabled(false); + return button; + } + + public void setRequestHandler(@NotNull CompletionRequestHandler requestService) { + stopButton.addActionListener(e -> requestService.cancel()); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/contextual/ContextualChatToolWindowLandingPanel.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/contextual/ContextualChatToolWindowLandingPanel.java new file mode 100644 index 00000000..cc0cbdb8 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/contextual/ContextualChatToolWindowLandingPanel.java @@ -0,0 +1,131 @@ +package ee.carlrobert.codegpt.toolwindow.chat.contextual; + +import static com.intellij.openapi.ui.DialogWrapper.OK_EXIT_CODE; +import static ee.carlrobert.codegpt.util.ThemeUtils.getPanelBackgroundColor; +import static javax.swing.event.HyperlinkEvent.EventType.ACTIVATED; + +import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.diagnostic.Logger; +import com.intellij.openapi.options.ShowSettingsUtil; +import com.intellij.openapi.project.Project; +import ee.carlrobert.codegpt.user.UserManager; +import ee.carlrobert.codegpt.user.auth.AuthenticationNotifier; +import ee.carlrobert.codegpt.user.auth.SignedOutNotifier; +import ee.carlrobert.codegpt.embeddings.CodebaseIndexingCompletedNotifier; +import ee.carlrobert.codegpt.embeddings.CodebaseIndexingTask; +import ee.carlrobert.codegpt.embeddings.FolderStructureTreePanel; +import ee.carlrobert.codegpt.embeddings.VectorStore; +import ee.carlrobert.codegpt.settings.SettingsConfigurable; +import ee.carlrobert.codegpt.toolwindow.chat.ResponsePanel; +import ee.carlrobert.codegpt.util.OverlayUtils; +import ee.carlrobert.codegpt.util.SwingUtils; +import javax.swing.JTextPane; +import javax.swing.event.HyperlinkEvent; + +@FunctionalInterface +interface ActionEvent { + void handleAction(String prompt); +} + +class ContextualChatToolWindowLandingPanel extends ResponsePanel { + + private static final Logger LOG = Logger.getInstance(ContextualChatToolWindowLandingPanel.class); + private final Project project; + private final ActionEvent actionEvent; + + ContextualChatToolWindowLandingPanel(Project project, ActionEvent actionEvent) { + this.project = project; + this.actionEvent = actionEvent; + addContent(createContent()); + + project.getMessageBus() + .connect() + .subscribe(CodebaseIndexingCompletedNotifier.INDEXING_COMPLETED_TOPIC, + (CodebaseIndexingCompletedNotifier) () -> updateContent(createContent())); + + var messageBusConnection = ApplicationManager.getApplication().getMessageBus().connect(); + messageBusConnection.subscribe(AuthenticationNotifier.AUTHENTICATION_TOPIC, (AuthenticationNotifier) () -> updateContent(createContent())); + messageBusConnection.subscribe(SignedOutNotifier.SIGNED_OUT_TOPIC, (SignedOutNotifier) () -> updateContent(createContent())); + } + + private JTextPane createContent() { + var description = createTextPane(); + var userManager = UserManager.getInstance(); + + if (userManager.getSession() == null) { + description.setText("" + + "

It looks like you haven't logged in. Please log in to use the feature.

" + + ""); + return description; + } + + if (!userManager.isSubscribed()) { + description.setText("" + + "

You are not currently subscribed to any plan.

" + + ""); + return description; + } + + if (project.getService(VectorStore.class).isIndexExists()) { + description.setText("" + + "

Feel free to ask me anything about your codebase, and I'll be your helpful guide, dedicated to providing you with the best answers possible!

" + + "

Here are a few examples of how I might be helpful:

" + + "
    " + + "
  • List all the dependencies that the project usesAre there any scheduled tasks or background jobs running in our codebase, and if so, what are they responsible for?
  • " + + "
  • Can you provide an overview of the authentication and authorization mechanism implemented in our application?
  • " + + ""); + } else { + description.setText("" + + "

    It looks like you haven't indexed your codebase yet.

    " + + "

    Start indexing your codebase to get access to contextual chat experience.

    " + + ""); + } + + return description; + } + + private JTextPane createTextPane() { + var textPane = new JTextPane(); + textPane.addHyperlinkListener(this::handleHyperlinkClicked); + textPane.setBackground(getPanelBackgroundColor()); + textPane.setContentType("text/html"); + textPane.putClientProperty(JTextPane.HONOR_DISPLAY_PROPERTIES, true); + textPane.setFocusable(false); + textPane.setEditable(false); + return textPane; + } + + private void handleHyperlinkClicked(HyperlinkEvent event) { + if (ACTIVATED.equals(event.getEventType())) { + if (event.getURL() == null) { + switch (event.getDescription()) { + case "LOGIN": + ShowSettingsUtil.getInstance().showSettingsDialog(project, SettingsConfigurable.class); + break; + case "LIST_DEPENDENCIES": + actionEvent.handleAction("List all the dependencies that the project uses"); + break; + case "SCHEDULED_TASKS": + actionEvent.handleAction( + "Are there any scheduled tasks or background jobs running in our codebase, and if so, what are they responsible for?"); + break; + case "AUTHENTICATION_MECHANISM": + actionEvent.handleAction("Can you provide an overview of the authentication and authorization mechanism implemented in our application?"); + break; + case "START_INDEXING": + var folderStructureTreePanel = new FolderStructureTreePanel(project); + var show = OverlayUtils.showFileStructureDialog(project, folderStructureTreePanel); + if (show == OK_EXIT_CODE) { + new CodebaseIndexingTask(project, folderStructureTreePanel.getCheckedFiles()).run(); + } + break; + default: + LOG.error("Could not trigger action {}", event.getDescription()); + } + } else { + SwingUtils.handleHyperlinkClicked(event); + } + } + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/contextual/ContextualChatToolWindowPanel.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/contextual/ContextualChatToolWindowPanel.java new file mode 100644 index 00000000..86f6b726 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/contextual/ContextualChatToolWindowPanel.java @@ -0,0 +1,44 @@ +package ee.carlrobert.codegpt.toolwindow.chat.contextual; + +import com.intellij.openapi.Disposable; +import com.intellij.openapi.actionSystem.ActionManager; +import com.intellij.openapi.actionSystem.ActionToolbar; +import com.intellij.openapi.actionSystem.DefaultActionGroup; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.ui.SimpleToolWindowPanel; +import com.intellij.openapi.util.Disposer; +import ee.carlrobert.codegpt.actions.CodebaseIndexingAction; +import ee.carlrobert.codegpt.actions.toolwindow.ClearChatWindowAction; +import org.jetbrains.annotations.NotNull; + +public class ContextualChatToolWindowPanel extends SimpleToolWindowPanel { + + public ContextualChatToolWindowPanel(@NotNull Project project, @NotNull Disposable parentDisposable) { + super(true); + initialize(project, parentDisposable); + } + + private void initialize(Project project, Disposable parentDisposable) { + var tabPanel = new ContextualChatToolWindowTabPanel(project); + + setToolbar(createActionToolbar(tabPanel).getComponent()); + setContent(tabPanel.getContent()); + + Disposer.register(parentDisposable, tabPanel); + } + + private ActionToolbar createActionToolbar(ContextualChatToolWindowTabPanel tabPanel) { + var actionGroup = new DefaultActionGroup("TOOLBAR_ACTION_GROUP", false); + actionGroup.add(new ClearChatWindowAction(() -> { + tabPanel.displayLandingView(); + tabPanel.setConversation(null); + })); + actionGroup.addSeparator(); + actionGroup.add(new CodebaseIndexingAction()); + + var toolbar = ActionManager.getInstance() + .createActionToolbar("NAVIGATION_BAR_TOOLBAR", actionGroup, false); + toolbar.setTargetComponent(this); + return toolbar; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/contextual/ContextualChatToolWindowTabPanel.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/contextual/ContextualChatToolWindowTabPanel.java new file mode 100644 index 00000000..269dd7ec --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/contextual/ContextualChatToolWindowTabPanel.java @@ -0,0 +1,48 @@ +package ee.carlrobert.codegpt.toolwindow.chat.contextual; + +import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.project.Project; +import ee.carlrobert.codegpt.user.UserManager; +import ee.carlrobert.codegpt.user.auth.AuthenticationNotifier; +import ee.carlrobert.codegpt.user.auth.SignedOutNotifier; +import ee.carlrobert.codegpt.conversations.Conversation; +import ee.carlrobert.codegpt.conversations.message.Message; +import ee.carlrobert.codegpt.embeddings.CodebaseIndexingCompletedNotifier; +import ee.carlrobert.codegpt.toolwindow.chat.BaseChatToolWindowTabPanel; +import javax.swing.JComponent; +import org.jetbrains.annotations.NotNull; + +public class ContextualChatToolWindowTabPanel extends BaseChatToolWindowTabPanel { + + public ContextualChatToolWindowTabPanel(@NotNull Project project) { + super(project, true); + displayLandingView(); + userTextArea.setTextAreaEnabled(UserManager.getInstance().isSubscribed()); + + project.getMessageBus() + .connect() + .subscribe(CodebaseIndexingCompletedNotifier.INDEXING_COMPLETED_TOPIC, + (CodebaseIndexingCompletedNotifier) () -> userTextArea.setTextAreaEnabled(UserManager.getInstance().isSubscribed())); + + var messageBusConnection = ApplicationManager.getApplication().getMessageBus().connect(); + messageBusConnection.subscribe(AuthenticationNotifier.AUTHENTICATION_TOPIC, + (AuthenticationNotifier) () -> userTextArea.setTextAreaEnabled(UserManager.getInstance().isSubscribed())); + messageBusConnection.subscribe(SignedOutNotifier.SIGNED_OUT_TOPIC, (SignedOutNotifier) () -> userTextArea.setTextAreaEnabled(false)); + } + + @Override + protected JComponent getLandingView() { + return new ContextualChatToolWindowLandingPanel(project, (prompt) -> { + var message = new Message(prompt); + if (conversation == null) { + startNewConversation(message); + } else { + sendMessage(message); + } + }); + } + + @Override + public void displayConversation(Conversation conversation) { + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/BrowserContentManager.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/BrowserContentManager.java deleted file mode 100644 index 7d89f033..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/BrowserContentManager.java +++ /dev/null @@ -1,91 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.chat.html; - -import static icons.Icons.getHtmlSvgIcon; -import static org.apache.commons.text.StringEscapeUtils.escapeEcmaScript; - -import com.vladsch.flexmark.html.HtmlRenderer; -import com.vladsch.flexmark.parser.Parser; -import com.vladsch.flexmark.util.data.MutableDataSet; -import ee.carlrobert.codegpt.state.conversations.message.Message; -import java.util.UUID; -import org.cef.browser.CefBrowser; - -public class BrowserContentManager { - - private final CefBrowser browser; - - BrowserContentManager(CefBrowser browser) { - this.browser = browser; - } - - public void displayUserMessage(String accountName, Message message) { - executeJS("window.CodeGPTBridge.prepareMessage(?);", message.getId()); - executeJS("window.CodeGPTBridge.displayUserMessage(?, ?, ?, ?);", message.getId(), accountName, convertToHtml(message.getPrompt()), getHtmlSvgIcon("delete-icon")); - } - - public void displayResponse(UUID messageId, UUID responseId, boolean animate) { - executeJS("window.CodeGPTBridge.displayResponse(?, ?, ?, ?);", messageId, responseId, animate, getHtmlSvgIcon("codegpt-icon")); - } - - public void replaceResponseContent(UUID responseId, String message) { - executeJS("window.CodeGPTBridge.replaceResponseContent(?, ?);", responseId, convertToHtml(message)); - } - - public void displayLandingView() { - executeJS("window.CodeGPTBridge.displayLandingView();"); - } - - public void displayErrorMessage(UUID responseId, String errorMessage) { - executeJS("window.CodeGPTBridge.displayErrorMessage(?, ?);", responseId, convertToHtml(errorMessage)); - } - - public void displayMissingCredential(UUID responseId) { - executeJS("window.CodeGPTBridge.displayMissingCredential(?);", responseId); - } - - public void stopTyping() { - executeJS("window.CodeGPTBridge.stopTyping();"); - } - - public void clearResponse(UUID responseId) { - executeJS("window.CodeGPTBridge.clearResponse(?);", responseId); - } - - public void animateSvg(UUID responseId) { - executeJS("window.CodeGPTBridge.animateCodeGPTSvg(?);", responseId); - } - - public void updateRegenerateButton(String title, boolean isDisabled) { - executeJS("window.CodeGPTBridge.updateRegenerateButton(?, ?);", title, isDisabled); - } - - public void deleteMessage(UUID messageId) { - executeJS("window.CodeGPTBridge.deleteMessage(?);", messageId); - } - - private void executeJS(String query, Object... params) { - browser.executeJavaScript(formatQuery(query, params), null, 0); - } - - private String formatQuery(String query, Object... params) { - var tokens = query.split("\\?"); - StringBuilder queryBuilder = new StringBuilder(); - for (int i = 0; i < params.length; i++) { - var param = "\"" + escapeEcmaScript(params[i].toString()) + "\""; - if (params[i] instanceof Boolean) { - param = params[i].toString(); - } - queryBuilder.append(tokens[i]).append(param); - } - return queryBuilder.append(tokens[params.length]).toString(); - } - - private String convertToHtml(String message) { - MutableDataSet options = new MutableDataSet(); - var document = Parser.builder(options).build().parse(message); - return HtmlRenderer.builder(options) - .nodeRendererFactory(new CodeBlockNodeRenderer.Factory()) - .build() - .render(document); - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/ChatToolWindowTabHtmlPanel.form b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/ChatToolWindowTabHtmlPanel.form deleted file mode 100644 index ed76bbdf..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/ChatToolWindowTabHtmlPanel.form +++ /dev/null @@ -1,45 +0,0 @@ - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/ChatToolWindowTabHtmlPanel.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/ChatToolWindowTabHtmlPanel.java deleted file mode 100644 index 89524881..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/ChatToolWindowTabHtmlPanel.java +++ /dev/null @@ -1,224 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.chat.html; - -import static com.intellij.openapi.ui.Messages.CANCEL; -import static com.intellij.openapi.ui.Messages.OK; -import static icons.Icons.DefaultImageIcon; - -import com.intellij.execution.ExecutionBundle; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.ui.DoNotAskOption; -import com.intellij.openapi.ui.MessageDialogBuilder; -import com.intellij.ui.JBColor; -import com.intellij.ui.components.JBScrollPane; -import ee.carlrobert.codegpt.client.RequestHandler; -import ee.carlrobert.codegpt.state.conversations.Conversation; -import ee.carlrobert.codegpt.state.conversations.ConversationsState; -import ee.carlrobert.codegpt.state.conversations.message.Message; -import ee.carlrobert.codegpt.state.settings.SettingsState; -import ee.carlrobert.codegpt.toolwindow.chat.ToolWindowTabPanel; -import ee.carlrobert.codegpt.toolwindow.components.GenerateButton; -import ee.carlrobert.codegpt.toolwindow.components.TextArea; -import ee.carlrobert.openai.client.completion.ErrorDetails; -import java.awt.BorderLayout; -import java.awt.Dimension; -import javax.swing.BorderFactory; -import javax.swing.JButton; -import javax.swing.JPanel; -import javax.swing.JScrollBar; -import javax.swing.JScrollPane; -import javax.swing.JTextArea; -import javax.swing.SwingUtilities; -import org.jetbrains.annotations.NotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class ChatToolWindowTabHtmlPanel implements ToolWindowTabPanel { - - private static final Logger LOG = LoggerFactory.getLogger(ChatToolWindowTabHtmlPanel.class); - private final Project project; - - private JPanel rootPanel; - private JTextArea textArea; - private JScrollPane textAreaScrollPane; - private JPanel contentPanel; - private JButton reloadResponseButton; - private Conversation conversation; - private MarkdownJCEFHtmlPanel markdownHtmlPanel; - - public ChatToolWindowTabHtmlPanel(@NotNull Project project) { - this.project = project; - } - - @Override - public JPanel getContent() { - return rootPanel; - } - - @Override - public Conversation getConversation() { - return conversation; - } - - @Override - public void displayLandingView() { - markdownHtmlPanel.displayLandingView(); - } - - @Override - public void displayConversation(Conversation conversation) { - this.conversation = conversation; - markdownHtmlPanel.displayConversation(conversation); - } - - @Override - public void startNewConversation(Message message) { - markdownHtmlPanel.runWhenLoaded(() -> { - conversation = ConversationsState.getInstance().startConversation(); - startConversation(message, false); - }); - } - - @Override - public void startConversation(Message message, boolean isRetry) { - markdownHtmlPanel.runWhenLoaded(() -> { - markdownHtmlPanel.displayUserMessage(message); - var settings = SettingsState.getInstance(); - if (settings.getApiKey().isEmpty()) { - markdownHtmlPanel.displayMissingCredential(message.getId()); - } else { - SwingUtilities.invokeLater(() -> call(message, isRetry)); - } - }); - } - - // Ugly workaround for focusing JBCefBrowser on tab changes - public void refreshMarkdownPanel() { - contentPanel.removeAll(); - contentPanel.add(markdownHtmlPanel.getComponent(), BorderLayout.CENTER); - contentPanel.setPreferredSize(markdownHtmlPanel.getComponent().getPreferredSize()); - contentPanel.repaint(); - contentPanel.revalidate(); - } - - public void dispose() { - markdownHtmlPanel.dispose(); - } - - private void call(Message message, boolean isRetry) { - if (conversation == null) { - conversation = ConversationsState.getInstance().startConversation(); - } - - var responseId = markdownHtmlPanel.prepareResponse(message.getId(), true, isRetry); - var requestService = new RequestHandler(conversation) { - public void handleMessage(String response, String fullMessage) { - try { - markdownHtmlPanel.replaceHtml(responseId, fullMessage); - } catch (Exception e) { - LOG.error("Error while replacing the html content", e); - markdownHtmlPanel.displayErrorMessage(); - throw new RuntimeException(e); - } - } - - public void handleComplete() { - stop(); - } - - public void handleTokensExceeded() { - SwingUtilities.invokeLater(() -> { - var answer = showTokenLimitExceededDialog(); - if (answer == OK) { - conversation.discardTokenLimits(); - ConversationsState.getInstance().saveConversation(conversation); - call(message, true); - } else { - stop(); - } - }); - } - - public void handleError(ErrorDetails error) { - stop(); - markdownHtmlPanel.displayErrorMessage(error.getMessage()); - } - - private void stop() { - stopGenerating(message); - markdownHtmlPanel.stopTyping(); - markdownHtmlPanel.updateReplaceButton(); - } - }; - requestService.call(message, isRetry); - displayReloadResponseButton(requestService::cancel); - } - - private void handleSubmit() { - startConversation(new Message(textArea.getText()), false); - textArea.setText(""); - } - - private void displayReloadResponseButton(Runnable onClick) { - var button = getReloadResponseButton(); - button.setVisible(true); - button.setMode(GenerateButton.Mode.STOP, onClick); - } - - private void stopGenerating(Message message) { - getReloadResponseButton().setMode(GenerateButton.Mode.REFRESH, () -> call(message, true)); - } - - private GenerateButton getReloadResponseButton() { - return ((GenerateButton) reloadResponseButton); - } - - private int showTokenLimitExceededDialog() { - return MessageDialogBuilder.okCancel("Token Limit Exceeded", - "The maximum default token limit has been reached. Do you want to proceed with the conversation despite the higher messaging cost?") - .yesText("Continue") - .noText("Cancel") - .icon(DefaultImageIcon) - .doNotAsk(new DoNotAskOption.Adapter() { - @Override - public void rememberChoice(boolean isSelected, int exitCode) { - if (isSelected) { - ConversationsState.getInstance().discardAllTokenLimits(); - } - } - - @NotNull - @Override - public String getDoNotShowMessage() { - return ExecutionBundle.message("don.t.ask.again"); - } - - @Override - public boolean shouldSaveOptionsOnCancel() { - return true; - } - }) - .guessWindowAndAsk() ? OK : CANCEL; - } - - private void createUIComponents() { - textAreaScrollPane = new JBScrollPane() { - public JScrollBar createVerticalScrollBar() { - JScrollBar verticalScrollBar = new JScrollPane.ScrollBar(1); - verticalScrollBar.setPreferredSize(new Dimension(0, 0)); - return verticalScrollBar; - } - }; - textAreaScrollPane.setBorder(null); - textAreaScrollPane.setViewportBorder(null); - textAreaScrollPane.setBorder(BorderFactory.createCompoundBorder( - BorderFactory.createMatteBorder(1, 0, 0, 0, JBColor.border()), - BorderFactory.createEmptyBorder(0, 5, 0, 10))); - textArea = new TextArea(this::handleSubmit, textAreaScrollPane); - textAreaScrollPane.setViewportView(textArea); - markdownHtmlPanel = new MarkdownJCEFHtmlPanel(project); - contentPanel = new JPanel(new BorderLayout()); - contentPanel.add(markdownHtmlPanel.getComponent(), BorderLayout.CENTER); - contentPanel.setPreferredSize(markdownHtmlPanel.getComponent().getPreferredSize()); - reloadResponseButton = new GenerateButton(); - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/CodeBlockNodeRenderer.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/CodeBlockNodeRenderer.java deleted file mode 100644 index 40321216..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/CodeBlockNodeRenderer.java +++ /dev/null @@ -1,61 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.chat.html; - -import static org.apache.commons.text.StringEscapeUtils.escapeEcmaScript; - -import com.vladsch.flexmark.ast.FencedCodeBlock; -import com.vladsch.flexmark.html.HtmlWriter; -import com.vladsch.flexmark.html.renderer.NodeRenderer; -import com.vladsch.flexmark.html.renderer.NodeRendererContext; -import com.vladsch.flexmark.html.renderer.NodeRendererFactory; -import com.vladsch.flexmark.html.renderer.NodeRenderingHandler; -import com.vladsch.flexmark.util.data.DataHolder; -import java.util.Set; -import org.jetbrains.annotations.NotNull; - -public class CodeBlockNodeRenderer implements NodeRenderer { - - @Override - public Set> getNodeRenderingHandlers() { - return Set.of(new NodeRenderingHandler<>(FencedCodeBlock.class, this::render)); - } - - private void render(FencedCodeBlock node, NodeRendererContext context, HtmlWriter html) { - var code = String.join("", node.getContentLines()); - - html.attr("class", "code-header") - .withAttr().tag("div") - .attr("class", "lang") - .withAttr().tag("span") - .text(node.getInfo()) - .tag("/span") - .attr("class", "actions") - .withAttr().tag("div") - .attr("class", "copy-button") - .attr("onclick", String.format("window.JavaPanelBridge.copyCode('%s')", escapeEcmaScript(code))) - .withAttr().tag("button") - .text("Copy") - .tag("/button"); - html.attr("class", "replace-button") - .attr("disabled", "") - .attr("title", "Please wait until the response has been generated") - .attr("onclick", String.format("window.JavaPanelBridge.replaceCode('%s')", escapeEcmaScript(code))) - .withAttr().tag("button") - .text("Replace Selection") - .tag("/button"); - html.tag("/div") - .tag("/div") - .attr("class", "code-wrapper") - .withAttr().tag("div"); - context.delegateRender(); - html.tag("/div"); - } - - public static class Factory implements NodeRendererFactory { - - @NotNull - @Override - public NodeRenderer apply(@NotNull DataHolder options) { - return new CodeBlockNodeRenderer(); - } - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/HtmlPanelPopupMenu.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/HtmlPanelPopupMenu.java deleted file mode 100644 index af1d1c16..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/HtmlPanelPopupMenu.java +++ /dev/null @@ -1,36 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.chat.html; - -import com.intellij.icons.AllIcons; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import javax.swing.JMenuItem; -import javax.swing.JPopupMenu; -import org.cef.browser.CefBrowser; - -class HtmlPanelPopupMenu extends JPopupMenu { - - HtmlPanelPopupMenu(CefBrowser cefBrowser) { - super(); - var copyMenuItem = new JMenuItem("Copy", AllIcons.Actions.Copy); - copyMenuItem.addActionListener(e -> { - cefBrowser.executeJavaScript("window.JavaPanelBridge.copyCode(window.getSelection().toString());", null, 0); - }); - add(copyMenuItem); - } - - MouseAdapter getMouseAdapter() { - return new MouseAdapter() { - public void mousePressed(MouseEvent e) { - if (e.isPopupTrigger()) { - show(getComponent(), e.getX(), e.getY()); - } - } - - public void mouseReleased(MouseEvent e) { - if (e.isPopupTrigger()) { - show(getComponent(), e.getX(), e.getY()); - } - } - }; - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/MarkdownJCEFHtmlPanel.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/MarkdownJCEFHtmlPanel.java deleted file mode 100644 index e01a4f3a..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/MarkdownJCEFHtmlPanel.java +++ /dev/null @@ -1,238 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.chat.html; - -import static ee.carlrobert.codegpt.util.ThemeUtils.getBackgroundColorRGB; -import static ee.carlrobert.codegpt.util.ThemeUtils.getButtonBackgroundColorRGB; -import static ee.carlrobert.codegpt.util.ThemeUtils.getDisabledButtonBackgroundColorRGB; -import static ee.carlrobert.codegpt.util.ThemeUtils.getDisabledTextColorRGB; -import static ee.carlrobert.codegpt.util.ThemeUtils.getFontColorRGB; -import static ee.carlrobert.codegpt.util.ThemeUtils.getFontSize; -import static ee.carlrobert.codegpt.util.ThemeUtils.getPanelBackgroundColorRGB; -import static ee.carlrobert.codegpt.util.ThemeUtils.getScrollBarForegroundColorRGB; -import static ee.carlrobert.codegpt.util.ThemeUtils.getScrollBarRadius; -import static ee.carlrobert.codegpt.util.ThemeUtils.getSeparatorColorRGB; -import static icons.Icons.DefaultImageIcon; -import static java.lang.String.format; - -import com.intellij.openapi.application.ApplicationManager; -import com.intellij.openapi.fileEditor.FileEditorManager; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.ui.Messages; -import com.intellij.ui.jcef.JBCefApp; -import com.intellij.ui.jcef.JBCefBrowserBase; -import com.intellij.ui.jcef.JBCefJSQuery; -import com.intellij.ui.jcef.JCEFHtmlPanel; -import com.intellij.util.ui.UIUtil; -import ee.carlrobert.codegpt.state.conversations.Conversation; -import ee.carlrobert.codegpt.state.conversations.ConversationsState; -import ee.carlrobert.codegpt.state.conversations.message.Message; -import ee.carlrobert.codegpt.state.settings.SettingsState; -import ee.carlrobert.codegpt.state.settings.advanced.AdvancedSettingsState; -import ee.carlrobert.codegpt.util.FileUtils; -import java.awt.Toolkit; -import java.awt.datatransfer.Clipboard; -import java.awt.datatransfer.StringSelection; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; -import java.util.Map; -import java.util.UUID; -import java.util.concurrent.CompletableFuture; -import java.util.stream.Collectors; -import javax.swing.SwingUtilities; -import javax.swing.UIManager; -import org.cef.browser.CefBrowser; -import org.cef.browser.CefFrame; -import org.cef.handler.CefLoadHandlerAdapter; -import org.jetbrains.annotations.NotNull; - -public class MarkdownJCEFHtmlPanel extends JCEFHtmlPanel { - - private final CompletableFuture isLoaded = new CompletableFuture<>(); - private final JBCefJSQuery copyCodeQuery = JBCefJSQuery.create((JBCefBrowserBase) this); - private final JBCefJSQuery deleteMessageQuery = JBCefJSQuery.create((JBCefBrowserBase) this); - private final JBCefJSQuery replaceInEditorQuery; - private final BrowserContentManager browserContentManager; - private final Project project; - private UUID previousResponseId; - - public MarkdownJCEFHtmlPanel(@NotNull Project project) { - super(AdvancedSettingsState.getInstance().useOffScreenRendering, - JBCefApp.getInstance().createClient(), null); - this.project = project; - this.browserContentManager = new BrowserContentManager(getCefBrowser()); - this.replaceInEditorQuery = new ReplaceInEditorQuery( - project, this, editor -> updateReplaceButton()).getQuery(); - this.copyCodeQuery.addHandler((text) -> { - StringSelection stringSelection = new StringSelection(text); - Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); - clipboard.setContents(stringSelection, null); - return null; - }); - this.deleteMessageQuery.addHandler((messageId) -> { - SwingUtilities.invokeLater(() -> { - int answer = Messages.showYesNoDialog( - "Are you sure you want to delete this message?", "Delete Message", DefaultImageIcon); - if (answer == Messages.YES) { - browserContentManager.deleteMessage(UUID.fromString(messageId)); - var conversation = ConversationsState.getCurrentConversation(); - if (conversation != null) { - conversation.removeMessage(UUID.fromString(messageId)); - ConversationsState.getInstance().saveConversation(conversation); - } - } - }); - return null; - }); - - setHtml(getIndexContent()); - addBrowserLoadHandler(); - addLookAndFeelChangeListener(); - addPopupMenu(); - } - - public void displayUserMessage(Message message) { - var name = SettingsState.getInstance().displayName; - browserContentManager.displayUserMessage( - name == null || name.isEmpty() ? "User" : name, message); - } - - public UUID prepareResponse(UUID messageId) { - return prepareResponse(messageId, false, false); - } - - public UUID prepareResponse(UUID messageId, boolean animate, boolean isRetry) { - if (isRetry) { - browserContentManager.clearResponse(previousResponseId); - browserContentManager.animateSvg(previousResponseId); - } else { - previousResponseId = UUID.randomUUID(); - browserContentManager.displayResponse(messageId, previousResponseId, animate); - } - return previousResponseId; - } - - public void displayConversation(Conversation conversation) { - runWhenLoaded(() -> { - conversation.getMessages().forEach(message -> { - displayUserMessage(message); - replaceHtml(prepareResponse(message.getId()), message.getResponse()); - }); - updateReplaceButton(); - }); - } - - public void displayErrorMessage() { - displayErrorMessage("Something went wrong. Please try again later."); - } - - public void displayErrorMessage(String errorMessage) { - browserContentManager.displayErrorMessage(previousResponseId, errorMessage); - } - - public void displayMissingCredential(UUID messageId) { - browserContentManager.displayMissingCredential(prepareResponse(messageId)); - } - - public void displayLandingView() { - runWhenLoaded(browserContentManager::displayLandingView); - } - - public void replaceHtml(UUID responseId, String message) { - browserContentManager.replaceResponseContent(responseId, message); - } - - public void stopTyping() { - browserContentManager.stopTyping(); - } - - public void updateReplaceButton() { - ApplicationManager.getApplication().invokeLater(() -> { - var editor = FileEditorManager.getInstance(project).getSelectedTextEditor(); - if (editor == null) { - browserContentManager.updateRegenerateButton("Active editor not found", true); - } else { - var selectedText = editor.getSelectionModel().getSelectedText(); - var isDisabled = selectedText == null || selectedText.isEmpty(); - browserContentManager.updateRegenerateButton( - isDisabled ? "No text highlighted" : "", isDisabled); - } - }); - } - - public void runWhenLoaded(Runnable runnable) { - isLoaded.thenRun(runnable); - } - - private String getIndexContent() { - return FileUtils.getResource("/html/index.html") - .replace("[prism-theme]", UIUtil.isUnderDarcula() ? "prism-darcula" : "prism-vs") - .replace("[bg]", getBackgroundColorRGB()) - .replace("[font-color]", getFontColorRGB()) - .replace("[font-size]", String.valueOf(getFontSize())) - .replace("[separator-color]", getSeparatorColorRGB()) - .replace("[disabled-color]", getDisabledTextColorRGB()) - .replace("[scrollbar-color]", getScrollBarForegroundColorRGB()) - .replace("[scrollbar-radius]", String.valueOf(getScrollBarRadius())) - .replace("[panel-background-color]", getPanelBackgroundColorRGB()) - .replace("[button-background-color]", getButtonBackgroundColorRGB()) - .replace("[button-disabled-background-color]", getDisabledButtonBackgroundColorRGB()); - } - - private void addBrowserLoadHandler() { - getJBCefClient().addLoadHandler(new CefLoadHandlerAdapter() { - public void onLoadEnd(CefBrowser browser, CefFrame frame, int httpStatusCode) { - if (httpStatusCode == 200) { - myCefBrowser.executeJavaScript( - "window.JavaPanelBridge = {" + - "copyCode : function(code) {" + - copyCodeQuery.inject("code") + - "}," + - "replaceCode : function(code) {" + - replaceInEditorQuery.inject("code") + - "}," + - "deleteMessage : function(messageId) {" + - deleteMessageQuery.inject("messageId") + - "}" + - "};", - myCefBrowser.getURL(), 0); - myCefBrowser.executeJavaScript( - FileUtils.getResource("/html/js/main.js"), myCefBrowser.getURL(), 0); - isLoaded.complete(null); - } - } - }, getCefBrowser()); - } - - private void addLookAndFeelChangeListener() { - UIManager.addPropertyChangeListener(new PropertyChangeListener() { - @Override - public void propertyChange(PropertyChangeEvent propertyChangeEvent) { - // TODO: Handle prism theme change - execute(Map.of( - "--bg", getBackgroundColorRGB(), - "--font-color", getFontColorRGB(), - "--font-size", getFontSize() + "px", - "--separator-color", getSeparatorColorRGB(), - "--disabled-color", getDisabledTextColorRGB(), - "--panel-background-color", getPanelBackgroundColorRGB(), - "--button-background-color", getButtonBackgroundColorRGB(), - "--button-disabled-background-color", getDisabledButtonBackgroundColorRGB() - )); - } - - private void execute(Map params) { - var query = params.entrySet() - .stream() - .map((entry) -> format("document.documentElement.style.setProperty('%s', '%s');", - entry.getKey(), entry.getValue())) - .collect(Collectors.joining()); - getCefBrowser().executeJavaScript(query, null, 0); - } - }); - } - - private void addPopupMenu() { - var popupMenu = new HtmlPanelPopupMenu(getCefBrowser()); - getComponent().addMouseListener(popupMenu.getMouseAdapter()); - getComponent().setComponentPopupMenu(popupMenu); - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/ReplaceInEditorQuery.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/ReplaceInEditorQuery.java deleted file mode 100644 index 32cf9889..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/html/ReplaceInEditorQuery.java +++ /dev/null @@ -1,83 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.chat.html; - -import com.intellij.openapi.application.ApplicationManager; -import com.intellij.openapi.command.WriteCommandAction; -import com.intellij.openapi.editor.Editor; -import com.intellij.openapi.editor.event.SelectionEvent; -import com.intellij.openapi.editor.event.SelectionListener; -import com.intellij.openapi.fileEditor.FileEditor; -import com.intellij.openapi.fileEditor.FileEditorManager; -import com.intellij.openapi.fileEditor.FileEditorManagerEvent; -import com.intellij.openapi.fileEditor.FileEditorManagerListener; -import com.intellij.openapi.fileEditor.FileEditorProvider; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.Pair; -import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.ui.jcef.JBCefBrowserBase; -import com.intellij.ui.jcef.JBCefJSQuery; -import java.util.function.Consumer; -import java.util.function.Function; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -class ReplaceInEditorQuery { - - private final Function replaceCodeInEditorHandler; - private final JBCefJSQuery replaceCodeQuery; - - ReplaceInEditorQuery(@NotNull Project project, @NotNull JBCefBrowserBase browserBase, Consumer onSelectionChanged) { - this.replaceCodeQuery = JBCefJSQuery.create(browserBase); - this.replaceCodeInEditorHandler = getReplaceCodeInEditorHandler(project); - addEditorListener(FileEditorManager.getInstance(project).getSelectedTextEditor(), onSelectionChanged); - project.getMessageBus() - .connect(browserBase) - .subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER, new FileEditorManagerListener() { - @Override - public void fileOpenedSync( - @NotNull FileEditorManager source, @NotNull VirtualFile file, - @NotNull Pair editors) { - addEditorListener(source.getSelectedTextEditor(), onSelectionChanged); - } - - @Override - public void selectionChanged(@NotNull FileEditorManagerEvent event) { - addEditorListener(event.getManager().getSelectedTextEditor(), onSelectionChanged); - } - }); - } - - JBCefJSQuery getQuery() { - return replaceCodeQuery; - } - - private void addEditorListener(@Nullable Editor editor, Consumer onSelectionChanged) { - if (editor != null) { - ApplicationManager.getApplication().runReadAction(() -> - editor.getSelectionModel().addSelectionListener(new SelectionListener() { - @Override - public void selectionChanged(@NotNull SelectionEvent e) { - SelectionListener.super.selectionChanged(e); - onSelectionChanged.accept(editor); - } - })); - replaceCodeQuery.removeHandler(replaceCodeInEditorHandler); - replaceCodeQuery.addHandler(replaceCodeInEditorHandler); - } - } - - private Function getReplaceCodeInEditorHandler(Project project) { - return (content) -> { - var application = ApplicationManager.getApplication(); - application.invokeLater(() -> - application.runWriteAction(() -> WriteCommandAction.runWriteCommandAction(project, () -> { - var editor = FileEditorManager.getInstance(project).getSelectedTextEditor(); - if (editor != null) { - var selectionModel = editor.getSelectionModel(); - editor.getDocument().replaceString(selectionModel.getSelectionStart(), selectionModel.getSelectionEnd(), content); - editor.getContentComponent().requestFocus(); - } - }))); - return null; - }; - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/EditorAction.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/EditorAction.java new file mode 100644 index 00000000..85479ac7 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/EditorAction.java @@ -0,0 +1,31 @@ +package ee.carlrobert.codegpt.toolwindow.chat.standard; + +enum EditorAction { + FIND_BUGS("Find Bugs", "Find bugs in the following code", "Find bugs in the following code: {{selectedCode}}"), + WRITE_TESTS("Write Tests", "Write Tests for the following code", "Write Tests for the following code: {{selectedCode}}"), + EXPLAIN("Explain", "Explain the following code", "Explain the following code: {{selectedCode}}"), + REFACTOR("Refactor", "Refactor the following code", "Refactor the following code: {{selectedCode}}"), + OPTIMIZE("Optimize", "Optimize the following code", "Optimize the following code: {{selectedCode}}"); + + private final String label; + private final String userMessage; + private final String prompt; + + EditorAction(String label, String userMessage, String prompt) { + this.label = label; + this.userMessage = userMessage; + this.prompt = prompt; + } + + public String getLabel() { + return label; + } + + public String getPrompt() { + return prompt; + } + + public String getUserMessage() { + return userMessage; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/EditorActionEvent.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/EditorActionEvent.java new file mode 100644 index 00000000..4adb28fe --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/EditorActionEvent.java @@ -0,0 +1,8 @@ +package ee.carlrobert.codegpt.toolwindow.chat.standard; + +import java.awt.Point; + +@FunctionalInterface +public interface EditorActionEvent { + void handleAction(EditorAction action, Point locationOnScreen); +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/StandardChatToolWindowContentManager.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/StandardChatToolWindowContentManager.java new file mode 100644 index 00000000..0fa4e0f6 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/StandardChatToolWindowContentManager.java @@ -0,0 +1,111 @@ +package ee.carlrobert.codegpt.toolwindow.chat.standard; + +import static java.util.Objects.requireNonNull; + +import com.intellij.openapi.project.Project; +import com.intellij.openapi.wm.ToolWindow; +import com.intellij.openapi.wm.ToolWindowManager; +import com.intellij.ui.content.Content; +import ee.carlrobert.codegpt.conversations.ConversationsState; +import ee.carlrobert.codegpt.conversations.message.Message; +import ee.carlrobert.codegpt.settings.configuration.ConfigurationState; +import ee.carlrobert.codegpt.toolwindow.chat.ChatToolWindowTabPanel; +import java.util.Arrays; +import java.util.Optional; + +public class StandardChatToolWindowContentManager { + + private static StandardChatToolWindowContentManager instance; + + private final Project project; + + private StandardChatToolWindowContentManager(Project project) { + this.project = project; + } + + public static StandardChatToolWindowContentManager getInstance(Project project) { + if (instance == null) { + instance = new StandardChatToolWindowContentManager(project); + } + return instance; + } + + public void sendMessage(Message message) { + var chatTabbedPane = tryFindChatTabbedPane(); + if (chatTabbedPane.isPresent()) { + var activeTabPanel = chatTabbedPane.get().tryFindActiveTabPanel(); + if (activeTabPanel.isPresent()) { + sendMessage(activeTabPanel.get(), message); + return; + } + } + sendMessage(createNewTabPanel(), message); + } + + public void sendMessage(ChatToolWindowTabPanel toolWindowTabPanel, Message message) { + var toolWindow = getToolWindow(); + if (toolWindow != null) { + toolWindow.show(); + } + + if (ConfigurationState.getInstance().createNewChatOnEachAction || ConversationsState.getCurrentConversation() == null) { + toolWindowTabPanel.startNewConversation(message); + } else { + toolWindowTabPanel.sendMessage(message); + } + } + + public StandardChatToolWindowTabPanel createNewTabPanel() { + displayChatTab(); + var tabbedPane = tryFindChatTabbedPane(); + if (tabbedPane.isPresent()) { + var panel = new StandardChatToolWindowTabPanel(project); + tabbedPane.get().addNewTab(panel); + return panel; + } + return null; + } + + public void displayChatTab() { + var toolWindow = getToolWindow(); + toolWindow.show(); + + var contentManager = toolWindow.getContentManager(); + tryFindChatTabContent().ifPresentOrElse( + contentManager::setSelectedContent, + () -> contentManager.setSelectedContent(requireNonNull(contentManager.getContent(0))) + ); + } + + public Optional tryFindChatTabbedPane() { + var chatTabContent = tryFindChatTabContent(); + if (chatTabContent.isPresent()) { + var tabbedPane = Arrays.stream(chatTabContent.get().getComponent().getComponents()) + .filter(component -> component instanceof StandardChatToolWindowTabbedPane) + .findFirst(); + if (tabbedPane.isPresent()) { + return Optional.of((StandardChatToolWindowTabbedPane) tabbedPane.get()); + } + } + return Optional.empty(); + } + + public void resetTabbedPane() { + tryFindChatTabbedPane().ifPresent(tabbedPane -> { + tabbedPane.clearAll(); + var tabPanel = new StandardChatToolWindowTabPanel(project); + tabPanel.displayLandingView(); + tabbedPane.addNewTab(tabPanel); + }); + } + + public ToolWindow getToolWindow() { + return requireNonNull(ToolWindowManager.getInstance(project).getToolWindow("CodeGPT")); + } + + private Optional tryFindChatTabContent() { + return Arrays.stream(getToolWindow().getContentManager().getContents()) + .filter(content -> "Chat".equals(content.getTabName())) + .findFirst(); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/StandardChatToolWindowLandingPanel.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/StandardChatToolWindowLandingPanel.java new file mode 100644 index 00000000..57a84140 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/StandardChatToolWindowLandingPanel.java @@ -0,0 +1,77 @@ +package ee.carlrobert.codegpt.toolwindow.chat.standard; + +import static ee.carlrobert.codegpt.util.ThemeUtils.getPanelBackgroundColor; +import static javax.swing.event.HyperlinkEvent.EventType.ACTIVATED; + +import com.intellij.openapi.diagnostic.Logger; +import ee.carlrobert.codegpt.settings.SettingsState; +import ee.carlrobert.codegpt.toolwindow.chat.ResponsePanel; +import ee.carlrobert.codegpt.util.SwingUtils; +import java.awt.event.MouseEvent; +import javax.swing.JTextPane; +import javax.swing.event.HyperlinkEvent; + +class StandardChatToolWindowLandingPanel extends ResponsePanel { + + private static final Logger LOG = Logger.getInstance(StandardChatToolWindowLandingPanel.class); + + private final EditorActionEvent onAction; + + StandardChatToolWindowLandingPanel(EditorActionEvent onAction) { + this.onAction = onAction; + addContent(createContent()); + } + + private JTextPane createContent() { + var description = createTextPane(); + description.setText("" + + String.format( + "

    Welcome %s, I'm your intelligent code companion, here to be your partner-in-crime for getting things done in a flash. Together, we'll tackle tasks swiftly and efficiently, making your coding experience a joy.

    ", + SettingsState.getInstance().getDisplayName()) + + "

    Feel free to ask me anything you'd like, but my true superpower lies in assisting you with your code! Here are a few examples of how I can assist you:

    " + + "
      " + + "
    • Generate unit tests for the selected codeExplain the selected code
    • " + + "
    • Find bugs in the selected code
    • " + + "Being an AI-powered assistant, I may occasionally have surprises or make mistakes. Therefore, it's wise to double-check any code or suggestions I provide.

      " + + ""); + + return description; + } + + private JTextPane createTextPane() { + var textPane = new JTextPane(); + textPane.addHyperlinkListener(this::handleHyperlinkClicked); + textPane.setBackground(getPanelBackgroundColor()); + textPane.setContentType("text/html"); + textPane.putClientProperty(JTextPane.HONOR_DISPLAY_PROPERTIES, true); + textPane.setFocusable(false); + textPane.setEditable(false); + return textPane; + } + + private void handleHyperlinkClicked(HyperlinkEvent event) { + if (ACTIVATED.equals(event.getEventType())) { + if (event.getURL() == null) { + var mouseLocation = ((MouseEvent) event.getInputEvent()).getLocationOnScreen(); + mouseLocation.y = mouseLocation.y - 10; + switch (event.getDescription()) { + case "GENERATE_UNIT_TESTS": + onAction.handleAction(EditorAction.WRITE_TESTS, mouseLocation); + break; + case "EXPLAIN_CODE": + onAction.handleAction(EditorAction.EXPLAIN, mouseLocation); + break; + case "FIND_BUGS": + onAction.handleAction(EditorAction.FIND_BUGS, mouseLocation); + break; + default: + LOG.error("Could not trigger action {}", event.getDescription()); + } + } else { + SwingUtils.handleHyperlinkClicked(event); + } + } + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/StandardChatToolWindowPanel.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/StandardChatToolWindowPanel.java new file mode 100644 index 00000000..ba8053bb --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/StandardChatToolWindowPanel.java @@ -0,0 +1,63 @@ +package ee.carlrobert.codegpt.toolwindow.chat.standard; + +import com.intellij.openapi.Disposable; +import com.intellij.openapi.actionSystem.ActionManager; +import com.intellij.openapi.actionSystem.ActionToolbar; +import com.intellij.openapi.actionSystem.DefaultActionGroup; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.ui.SimpleToolWindowPanel; +import com.intellij.openapi.util.Disposer; +import ee.carlrobert.codegpt.actions.toolwindow.ClearChatWindowAction; +import ee.carlrobert.codegpt.actions.toolwindow.CreateNewConversationAction; +import ee.carlrobert.codegpt.actions.toolwindow.OpenInEditorAction; +import ee.carlrobert.codegpt.conversations.ConversationsState; +import org.jetbrains.annotations.NotNull; + +public class StandardChatToolWindowPanel extends SimpleToolWindowPanel { + + public StandardChatToolWindowPanel(@NotNull Project project, @NotNull Disposable parentDisposable) { + super(true); + initialize(project, parentDisposable); + } + + private void initialize(Project project, Disposable parentDisposable) { + var tabPanel = new StandardChatToolWindowTabPanel(project); + var conversation = ConversationsState.getCurrentConversation(); + if (conversation == null) { + tabPanel.displayLandingView(); + } else { + tabPanel.displayConversation(conversation); + } + + var tabbedPane = createTabbedPane(tabPanel, parentDisposable); + setToolbar(createActionToolbar(project, tabbedPane).getComponent()); + setContent(tabbedPane); + + Disposer.register(parentDisposable, tabPanel); + } + + private ActionToolbar createActionToolbar(Project project, StandardChatToolWindowTabbedPane tabbedPane) { + var actionGroup = new DefaultActionGroup("TOOLBAR_ACTION_GROUP", false); + actionGroup.add(new CreateNewConversationAction(() -> { + var panel = new StandardChatToolWindowTabPanel(project); + panel.displayLandingView(); + tabbedPane.addNewTab(panel); + repaint(); + revalidate(); + })); + actionGroup.add(new ClearChatWindowAction(tabbedPane::resetCurrentlyActiveTabPanel)); + actionGroup.addSeparator(); + actionGroup.add(new OpenInEditorAction()); + + var toolbar = ActionManager.getInstance() + .createActionToolbar("NAVIGATION_BAR_TOOLBAR", actionGroup, false); + toolbar.setTargetComponent(this); + return toolbar; + } + + private StandardChatToolWindowTabbedPane createTabbedPane(StandardChatToolWindowTabPanel tabPanel, Disposable parentDisposable) { + var tabbedPane = new StandardChatToolWindowTabbedPane(parentDisposable); + tabbedPane.addNewTab(tabPanel); + return tabbedPane; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/StandardChatToolWindowTabPanel.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/StandardChatToolWindowTabPanel.java new file mode 100644 index 00000000..4e1ff95e --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/StandardChatToolWindowTabPanel.java @@ -0,0 +1,63 @@ +package ee.carlrobert.codegpt.toolwindow.chat.standard; + +import static java.lang.String.format; + +import com.intellij.openapi.editor.impl.EditorImpl; +import com.intellij.openapi.project.Project; +import ee.carlrobert.codegpt.conversations.Conversation; +import ee.carlrobert.codegpt.conversations.message.Message; +import ee.carlrobert.codegpt.toolwindow.chat.BaseChatToolWindowTabPanel; +import ee.carlrobert.codegpt.toolwindow.chat.ChatMessageResponseBody; +import ee.carlrobert.codegpt.toolwindow.chat.ResponsePanel; +import ee.carlrobert.codegpt.toolwindow.chat.UserMessagePanel; +import ee.carlrobert.codegpt.util.EditorUtils; +import ee.carlrobert.codegpt.util.FileUtils; +import ee.carlrobert.codegpt.util.OverlayUtils; +import javax.swing.JComponent; +import org.jetbrains.annotations.NotNull; + +public class StandardChatToolWindowTabPanel extends BaseChatToolWindowTabPanel { + + public StandardChatToolWindowTabPanel(@NotNull Project project) { + super(project, false); + } + + @Override + protected JComponent getLandingView() { + return new StandardChatToolWindowLandingPanel((action, locationOnScreen) -> { + var editor = EditorUtils.getSelectedEditor(project); + if (editor == null || !editor.getSelectionModel().hasSelection()) { + OverlayUtils.showWarningBalloon( + editor == null ? "Unable to locate a selected editor" : "Please select a target code before proceeding", + locationOnScreen); + return; + } + + var fileExtension = FileUtils.getFileExtension(((EditorImpl) editor).getVirtualFile().getName()); + var message = new Message(action.getPrompt().replace( + "{{selectedCode}}", + format("\n```%s\n%s\n```", fileExtension, editor.getSelectionModel().getSelectedText()))); + message.setUserMessage(action.getUserMessage()); + + if (conversation == null) { + startNewConversation(message); + } else { + sendMessage(message); + } + }); + } + + @Override + public void displayConversation(@NotNull Conversation conversation) { + clearWindow(); + conversation.getMessages().forEach(message -> { + var messageWrapper = createNewMessageWrapper(message.getId()); + messageWrapper.add(new UserMessagePanel(project, message, false, this)); + messageWrapper.add(new ResponsePanel() + .withReloadAction(() -> reloadMessage(message, conversation)) + .withDeleteAction(() -> deleteMessage(message.getId(), messageWrapper, conversation)) + .addContent(new ChatMessageResponseBody(project, this).withResponse(message.getResponse()))); + }); + setConversation(conversation); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/StandardChatToolWindowTabbedPane.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/StandardChatToolWindowTabbedPane.java new file mode 100644 index 00000000..1dcb242e --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/standard/StandardChatToolWindowTabbedPane.java @@ -0,0 +1,190 @@ +package ee.carlrobert.codegpt.toolwindow.chat.standard; + +import com.intellij.icons.AllIcons; +import com.intellij.openapi.Disposable; +import com.intellij.openapi.ui.JBMenuItem; +import com.intellij.openapi.util.Disposer; +import com.intellij.ui.components.JBLabel; +import com.intellij.ui.components.JBTabbedPane; +import com.intellij.util.ui.JBUI; +import ee.carlrobert.codegpt.conversations.ConversationsState; +import ee.carlrobert.codegpt.settings.SettingsState; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.Map; +import java.util.Optional; +import java.util.TreeMap; +import java.util.UUID; +import javax.swing.BorderFactory; +import javax.swing.JButton; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JPopupMenu; +import javax.swing.SwingUtilities; + +public class StandardChatToolWindowTabbedPane extends JBTabbedPane { + + private final Map activeTabMapping = new TreeMap<>((o1, o2) -> { + int n1 = Integer.parseInt(o1.replaceAll("\\D", "")); + int n2 = Integer.parseInt(o2.replaceAll("\\D", "")); + return Integer.compare(n1, n2); + }); + private final Disposable parentDisposable; + + public StandardChatToolWindowTabbedPane(Disposable parentDisposable) { + this.parentDisposable = parentDisposable; + setTabComponentInsets(null); + setComponentPopupMenu(new TabPopupMenu()); + + addChangeListener(e -> refreshTabState()); + } + + public Map getActiveTabMapping() { + return activeTabMapping; + } + + public void addNewTab(StandardChatToolWindowTabPanel toolWindowPanel) { + var tabIndices = activeTabMapping.keySet().toArray(new String[0]); + var nextIndex = 0; + for (String title : tabIndices) { + int tabNum = Integer.parseInt(title.replaceAll("\\D+", "")); + if ((tabNum - 1) == nextIndex) { + nextIndex++; + } else { + break; + } + } + + var title = "Chat " + (nextIndex + 1); + super.insertTab(title, null, toolWindowPanel.getContent(), null, nextIndex); + activeTabMapping.put(title, toolWindowPanel); + super.setSelectedIndex(nextIndex); + + if (nextIndex > 0) { + setTabComponentAt(nextIndex, createCloseableTabButtonPanel(title)); + SwingUtilities.invokeLater(toolWindowPanel::requestFocusForTextArea); + } + + Disposer.register(parentDisposable, toolWindowPanel); + } + + public Optional tryFindActiveConversationTitle(UUID conversationId) { + return activeTabMapping.entrySet().stream() + .filter(entry -> { + var panelConversation = entry.getValue().getConversation(); + return panelConversation != null && conversationId.equals(panelConversation.getId()); + }) + .findFirst() + .map(Map.Entry::getKey); + } + + public Optional tryFindActiveTabPanel() { + var selectedIndex = getSelectedIndex(); + if (selectedIndex == -1) { + return Optional.empty(); + } + + return Optional.ofNullable(activeTabMapping.get(getTitleAt(selectedIndex))); + } + + public void clearAll() { + removeAll(); + activeTabMapping.clear(); + } + + private void refreshTabState() { + var selectedIndex = getSelectedIndex(); + if (selectedIndex == -1) { + return; + } + + var toolWindowPanel = activeTabMapping.get(getTitleAt(selectedIndex)); + if (toolWindowPanel != null) { + var conversation = toolWindowPanel.getConversation(); + if (conversation != null) { + ConversationsState.getInstance().setCurrentConversation(conversation); + SettingsState.getInstance().syncSettings(conversation); + } + } + } + + public void resetCurrentlyActiveTabPanel() { + tryFindActiveTabPanel().ifPresent(tabPanel -> { + tabPanel.displayLandingView(); + tabPanel.setConversation(null); + }); + ConversationsState.getInstance().setCurrentConversation(null); + } + + private JPanel createCloseableTabButtonPanel(String title) { + var closeIcon = AllIcons.Actions.Close; + var button = new JButton(closeIcon); + button.addActionListener(new CloseActionListener(title)); + button.setPreferredSize(new Dimension(closeIcon.getIconWidth(), closeIcon.getIconHeight())); + button.setBorder(BorderFactory.createEmptyBorder()); + button.setContentAreaFilled(false); + button.setToolTipText("Close Chat"); + button.setRolloverIcon(AllIcons.Actions.CloseHovered); + + var panel = JBUI.Panels.simplePanel(4, 0) + .addToLeft(new JBLabel(title)) + .addToRight(button); + panel.setOpaque(false); + return panel; + } + + class CloseActionListener implements ActionListener { + + private final String title; + + public CloseActionListener(String title) { + this.title = title; + } + + public void actionPerformed(ActionEvent evt) { + var tabIndex = indexOfTab(title); + if (tabIndex >= 0) { + Disposer.dispose(activeTabMapping.get(title)); + removeTabAt(tabIndex); + activeTabMapping.remove(title); + } + } + } + + class TabPopupMenu extends JPopupMenu { + + private int selectedPopupTabIndex = -1; + + TabPopupMenu() { + add(createPopupMenuItem("Close", e -> { + if (selectedPopupTabIndex > 0) { + activeTabMapping.remove(getTitleAt(selectedPopupTabIndex)); + removeTabAt(selectedPopupTabIndex); + } + })); + add(createPopupMenuItem("Close Other Tabs", e -> { + var selectedPopupTabTitle = getTitleAt(selectedPopupTabIndex); + var tabPanel = activeTabMapping.get(selectedPopupTabTitle); + + clearAll(); + addNewTab(tabPanel); + })); + } + + @Override + public void show(Component invoker, int x, int y) { + selectedPopupTabIndex = StandardChatToolWindowTabbedPane.this.getUI().tabForCoordinate(StandardChatToolWindowTabbedPane.this, x, y); + if (selectedPopupTabIndex > 0) { + super.show(invoker, x, y); + } + } + + private JBMenuItem createPopupMenuItem(String label, ActionListener listener) { + var menuItem = new JBMenuItem(label); + menuItem.addActionListener(listener); + return menuItem; + } + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/swing/ChatToolWindowTabPanel.form b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/swing/ChatToolWindowTabPanel.form deleted file mode 100644 index 868003dc..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/swing/ChatToolWindowTabPanel.form +++ /dev/null @@ -1,45 +0,0 @@ - -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/swing/ChatToolWindowTabPanel.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/swing/ChatToolWindowTabPanel.java deleted file mode 100644 index 55f8af28..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/swing/ChatToolWindowTabPanel.java +++ /dev/null @@ -1,269 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.chat.swing; - -import static ee.carlrobert.codegpt.util.SwingUtils.createIconLabel; -import static ee.carlrobert.codegpt.util.SwingUtils.createTextPane; -import static ee.carlrobert.codegpt.util.SwingUtils.justifyLeft; -import static java.lang.String.format; - -import com.intellij.icons.AllIcons; -import com.intellij.openapi.options.ShowSettingsUtil; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.roots.ui.componentsList.components.ScrollablePanel; -import com.intellij.ui.JBColor; -import com.intellij.ui.components.JBScrollPane; -import ee.carlrobert.codegpt.client.RequestHandler; -import ee.carlrobert.codegpt.state.conversations.Conversation; -import ee.carlrobert.codegpt.state.conversations.ConversationsState; -import ee.carlrobert.codegpt.state.conversations.message.Message; -import ee.carlrobert.codegpt.state.settings.SettingsConfigurable; -import ee.carlrobert.codegpt.state.settings.SettingsState; -import ee.carlrobert.codegpt.toolwindow.chat.ToolWindowTabPanel; -import ee.carlrobert.codegpt.toolwindow.components.GenerateButton; -import ee.carlrobert.codegpt.toolwindow.components.TextArea; -import ee.carlrobert.openai.client.completion.ErrorDetails; -import icons.Icons; -import java.awt.Cursor; -import java.awt.Dimension; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.util.ArrayList; -import java.util.List; -import javax.swing.BorderFactory; -import javax.swing.Box; -import javax.swing.BoxLayout; -import javax.swing.Icon; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JScrollBar; -import javax.swing.JScrollPane; -import javax.swing.JTextArea; -import javax.swing.SwingUtilities; -import org.fife.ui.rsyntaxtextarea.SyntaxConstants; -import org.jetbrains.annotations.NotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class ChatToolWindowTabPanel implements ToolWindowTabPanel { - - private static final Logger LOG = LoggerFactory.getLogger(ChatToolWindowTabPanel.class); - - private final List textAreas = new ArrayList<>(); - private final Project project; - private JPanel chatGptToolWindowContent; - private ScrollPane scrollPane; - private ScrollablePanel scrollablePanel; - private JTextArea textArea; - private JScrollPane textAreaScrollPane; - private GenerateButton generateButton; - private boolean isLandingViewVisible; - private Conversation conversation; - - public ChatToolWindowTabPanel(@NotNull Project project) { - this.project = project; - } - - @Override - public JPanel getContent() { - return chatGptToolWindowContent; - } - - @Override - public Conversation getConversation() { - return conversation; - } - - @Override - public void displayLandingView() { - if (!isLandingViewVisible) { - SwingUtilities.invokeLater(() -> { - clearWindow(); - isLandingViewVisible = true; - - addSpacing(16); - var landingView = new LandingView(); - scrollablePanel.add(landingView.createImageIconPanel()); - addSpacing(16); - landingView.getQuestionPanels().forEach(panel -> { - scrollablePanel.add(panel); - addSpacing(16); - }); - scrollablePanel.revalidate(); - scrollablePanel.repaint(); - }); - } - } - - @Override - public void displayConversation(Conversation conversation) { - setConversation(conversation); - clearWindow(); - conversation.getMessages().forEach(message -> { - displayUserMessage(message.getPrompt()); - addIconLabel(Icons.DefaultImageIcon, "ChatGPT"); - var textArea = new SyntaxTextArea(true, false, SyntaxConstants.SYNTAX_STYLE_MARKDOWN); - textArea.setText(message.getResponse()); - textArea.displayCopyButton(); - scrollablePanel.add(textArea); - textAreas.add(textArea); - }); - scrollToBottom(); - scrollablePanel.revalidate(); - scrollablePanel.repaint(); - } - - @Override - public void startNewConversation(Message message) { - conversation = ConversationsState.getInstance().startConversation(); - startConversation(message, false); - } - - @Override - public void startConversation(Message message, boolean isRetry) { - if (!isRetry) { - addIconLabel(Icons.DefaultImageIcon, "ChatGPT"); - } - - var settings = SettingsState.getInstance(); - if (settings.getApiKey().isEmpty()) { - notifyMissingCredential(project, "API key not provided."); - } else { - SyntaxTextArea textArea; - if (isRetry) { - textArea = textAreas.get(textAreas.size() - 1); - textArea.clear(); - } else { - textArea = new SyntaxTextArea(true, true, SyntaxConstants.SYNTAX_STYLE_MARKDOWN); - scrollablePanel.add(textArea); - textAreas.add(textArea); - } - call(textArea, message, isRetry); - } - } - - public void setConversation(Conversation conversation) { - this.conversation = conversation; - } - - public void displayUserMessage(String userMessage) { - addIconLabel(AllIcons.General.User, SettingsState.getInstance().displayName); - scrollablePanel.add(createTextPane(userMessage)); - scrollablePanel.revalidate(); - scrollablePanel.repaint(); - } - - public void call(SyntaxTextArea textArea, Message message, boolean isRetry) { - if (conversation == null) { - conversation = ConversationsState.getInstance().startConversation(); - } - - var requestService = new RequestHandler(conversation) { - public void handleMessage(String message, String fullMessage) { - try { - textArea.append(message); - scrollToBottom(); - } catch (Exception e) { - LOG.error("Error while appending the content", e); - textArea.append("Something went wrong. Please try again later."); - throw new RuntimeException(e); - } - } - - public void handleComplete() { - stopGenerating(message, textArea); - } - - public void handleError(ErrorDetails error) { - textArea.append("\n" + error.getMessage()); - } - }; - requestService.call(message, isRetry); - displayGenerateButton(requestService::cancel); - } - - public void clearWindow() { - isLandingViewVisible = false; - generateButton.setVisible(false); - textAreas.clear(); - scrollablePanel.removeAll(); - } - - public void addSpacing(int height) { - scrollablePanel.add(Box.createVerticalStrut(height)); - } - - public void addIconLabel(Icon icon, String text) { - addSpacing(8); - scrollablePanel.add(justifyLeft(createIconLabel(icon, text))); - addSpacing(8); - } - - public void notifyMissingCredential(Project project, String text) { - var label = new JLabel(format( - "%s Open Settings to set one.", text)); - label.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); - label.addMouseListener(new MouseAdapter() { - public void mouseClicked(MouseEvent e) { - ShowSettingsUtil.getInstance().showSettingsDialog(project, SettingsConfigurable.class); - } - }); - scrollablePanel.add(justifyLeft(label)); - } - - public void displayGenerateButton(Runnable onClick) { - generateButton.setVisible(true); - generateButton.setMode(GenerateButton.Mode.STOP, onClick); - } - - public void stopGenerating(Message message, SyntaxTextArea textArea) { - generateButton.setMode(GenerateButton.Mode.REFRESH, () -> { - startConversation(message, true); - scrollToBottom(); - }); - textArea.displayCopyButton(); - textArea.getCaret().setVisible(false); - scrollToBottom(); - } - - public void scrollToBottom() { - scrollPane.scrollToBottom(); - } - - private void handleSubmit() { - var message = new Message(textArea.getText()); - if (isLandingViewVisible) { - clearWindow(); - } - if (ConversationsState.getCurrentConversation() == null) { - setConversation(ConversationsState.getInstance().startConversation()); - } - displayUserMessage(message.getPrompt()); - startNewConversation(message); - textArea.setText(""); - scrollToBottom(); - scrollablePanel.revalidate(); - scrollablePanel.repaint(); - } - - private void createUIComponents() { - textAreaScrollPane = new JBScrollPane() { - public JScrollBar createVerticalScrollBar() { - JScrollBar verticalScrollBar = new JScrollPane.ScrollBar(1); - verticalScrollBar.setPreferredSize(new Dimension(0, 0)); - return verticalScrollBar; - } - }; - textAreaScrollPane.setBorder(null); - textAreaScrollPane.setViewportBorder(null); - textAreaScrollPane.setBorder(BorderFactory.createCompoundBorder( - BorderFactory.createMatteBorder(1, 0, 0, 0, JBColor.border()), - BorderFactory.createEmptyBorder(0, 5, 0, 10))); - textArea = new TextArea(this::handleSubmit, textAreaScrollPane); - textAreaScrollPane.setViewportView(textArea); - - scrollablePanel = new ScrollablePanel(); - scrollablePanel.setLayout(new BoxLayout(scrollablePanel, BoxLayout.Y_AXIS)); - scrollPane = new ScrollPane(scrollablePanel); - - generateButton = new GenerateButton(); - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/swing/LandingView.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/swing/LandingView.java deleted file mode 100644 index 241c5ad3..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/swing/LandingView.java +++ /dev/null @@ -1,42 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.chat.swing; - -import static java.util.stream.Collectors.toList; - -import icons.Icons; -import java.awt.GridBagLayout; -import java.util.List; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.SwingConstants; - -public class LandingView { - - private static final List questions = List.of("How do I make an HTTP request in Javascript?", - "What is the difference between px, dip, dp, and sp?", - "How do I undo the most recent local commits in Git?", - "What is the difference between stack and heap?"); - - public List getQuestionPanels() { - return questions.stream() - .map(this::createQuestionPanel) - .collect(toList()); - } - - public JPanel createImageIconPanel() { - var imageIconPanel = new JPanel(); - imageIconPanel.setLayout(new GridBagLayout()); - var imageIconLabel = new JLabel(Icons.SunImageIcon); - imageIconLabel.setHorizontalAlignment(JLabel.CENTER); - imageIconPanel.add(imageIconLabel); - return imageIconPanel; - } - - private JPanel createQuestionPanel(String question) { - var panel = new JPanel(); - panel.setLayout(new GridBagLayout()); - var label = new JLabel(question, SwingConstants.CENTER); - label.setHorizontalAlignment(JLabel.CENTER); - panel.add(label); - return panel; - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/swing/ScrollPane.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/swing/ScrollPane.java deleted file mode 100644 index 9356fda9..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/swing/ScrollPane.java +++ /dev/null @@ -1,30 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.chat.swing; - -import com.intellij.ui.components.JBScrollPane; -import java.awt.Adjustable; -import java.awt.event.AdjustmentEvent; -import java.awt.event.AdjustmentListener; -import javax.swing.JComponent; -import javax.swing.JScrollBar; -import javax.swing.ScrollPaneConstants; - -public class ScrollPane extends JBScrollPane { - - public ScrollPane(JComponent scrollablePanel) { - super(scrollablePanel); - setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); - setBorder(null); - setViewportBorder(null); - } - - public void scrollToBottom() { - JScrollBar verticalBar = getVerticalScrollBar(); - verticalBar.addAdjustmentListener(new AdjustmentListener() { - public void adjustmentValueChanged(AdjustmentEvent e) { - Adjustable adjustable = e.getAdjustable(); - adjustable.setValue(adjustable.getMaximum()); - verticalBar.removeAdjustmentListener(this); - } - }); - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/swing/SyntaxTextArea.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/swing/SyntaxTextArea.java deleted file mode 100644 index 6da9d10a..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/chat/swing/SyntaxTextArea.java +++ /dev/null @@ -1,88 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.chat.swing; - -import static ee.carlrobert.codegpt.util.SwingUtils.createIconButton; - -import com.intellij.icons.AllIcons; -import com.intellij.util.ui.JBFont; -import com.intellij.util.ui.JBUI; -import com.intellij.util.ui.UIUtil; -import ee.carlrobert.codegpt.toolwindow.components.ComponentBorder; -import java.awt.Toolkit; -import java.awt.datatransfer.Clipboard; -import java.awt.datatransfer.StringSelection; -import java.io.IOException; -import javax.swing.JButton; -import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; -import org.fife.ui.rsyntaxtextarea.Theme; -import org.fife.ui.rtextarea.CaretStyle; - -public class SyntaxTextArea extends RSyntaxTextArea { - - private JButton copyButton; - - public SyntaxTextArea(boolean isReadOnly, boolean withBlockCaret, String syntax) { - super(""); - setStyles(isReadOnly, withBlockCaret, syntax); - } - - public void displayCopyButton() { - if (copyButton == null) { - copyButton = createCopyButton(); - ComponentBorder cb = new ComponentBorder(copyButton); - cb.setAlignment(TOP_ALIGNMENT); - cb.setAdjustInsets(true); - cb.install(this); - } else { - copyButton.setVisible(true); - } - } - - public void changeStyleViaThemeXml() { - var baseThemePath = "/org/fife/ui/rsyntaxtextarea/themes/"; - try { - Theme theme = Theme.load(getClass().getResourceAsStream( - UIUtil.isUnderDarcula() ? baseThemePath + "dark.xml" : baseThemePath + "idea.xml")); - theme.baseFont = JBFont.regular(); - theme.apply(this); - } catch (IOException e) { - e.printStackTrace(); - } - } - - public void clear() { - setText(""); - copyButton.setVisible(false); - getCaret().setVisible(true); - } - - private void setStyles(boolean isReadOnly, boolean withBlockCaret, String syntax) { - setMargin(JBUI.insets(5)); - setAntiAliasingEnabled(true); - setEnabled(true); - setEditable(!isReadOnly); - setPaintTabLines(false); - setHighlightCurrentLine(false); - setLineWrap(true); - if (withBlockCaret) { - setCaretStyle(0, CaretStyle.BLOCK_STYLE); - getCaret().setVisible(true); - } - setSyntaxEditingStyle(syntax); - changeStyleViaThemeXml(); - } - - private void copyToClipboard() { - StringSelection stringSelection = new StringSelection(getText().trim()); - Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); - clipboard.setContents(stringSelection, null); - } - - private JButton createCopyButton() { - var button = createIconButton(AllIcons.General.InlineCopy); - button.addActionListener(e -> { - copyToClipboard(); - button.setIcon(AllIcons.General.InspectionsOK); - }); - return button; - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/components/ComponentBorder.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/components/ComponentBorder.java deleted file mode 100644 index fe3433ae..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/components/ComponentBorder.java +++ /dev/null @@ -1,299 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.components; - -import java.awt.*; -import javax.swing.*; -import javax.swing.border.*; - -// https://tips4java.wordpress.com/2009/09/27/component-border/ -/** - * The ComponentBorder class allows you to place a real component in - * the space reserved for painting the Border of a component. - * - * This class takes advantage of the knowledge that all Swing components are - * also Containers. By default the layout manager is null, so we should be - * able to place a child component anywhere in the parent component. In order - * to prevent the child component from painting over top of the parent - * component a Border is added to the parent componet such that the insets of - * the Border will reserve space for the child component to be painted without - * affecting the parent component. - */ -public class ComponentBorder implements Border -{ - public enum Edge - { - TOP, - LEFT, - BOTTOM, - RIGHT; - } - - public static final float LEADING = 0.0f; - public static final float CENTER = 0.5f; - public static final float TRAILING = 1.0f; - - private JComponent parent; - private JComponent component; - private Edge edge; - private float alignment; - private int gap = 5; - private boolean adjustInsets = true; - private Insets borderInsets = new Insets(0, 0, 0, 0); - - /** - * Convenience constructor that uses the default edge (Edge.RIGHT) and - * alignment (CENTER). - * - * @param component the component to be added in the Border area - */ - public ComponentBorder(JComponent component) - { - this(component, Edge.RIGHT); - } - - /** - * Convenience constructor that uses the default alignment (CENTER). - * - * @param component the component to be added in the Border area - * @param edge a valid Edge enum of TOP, LEFT, BOTTOM, RIGHT - */ - public ComponentBorder(JComponent component, Edge edge) - { - this(component, edge, CENTER); - } - - /** - * Main constructor to create a ComponentBorder. - * - * @param component the component to be added in the Border area - * @param edge a valid Edge enum of TOP, LEFT, BOTTOM, RIGHT - * @param alignment the alignment of the component along the - * specified Edge. Must be in the range 0 - 1.0. - */ - public ComponentBorder(JComponent component, Edge edge, float alignment ) - { - this.component = component; - component.setSize( component.getPreferredSize() ); - component.setCursor(Cursor.getDefaultCursor()); - setEdge( edge ); - setAlignment( alignment ); - } - - public boolean isAdjustInsets() - { - return adjustInsets; - } - - public void setAdjustInsets(boolean adjustInsets) - { - this.adjustInsets = adjustInsets; - } - - /** - * Get the component alignment along the Border Edge - * - * @return the alignment - */ - public float getAlignment() - { - return alignment; - } - - /** - * Set the component alignment along the Border Edge - * - * @param alignment a value in the range 0 - 1.0. Standard values would be - * CENTER (default), LEFT and RIGHT. - */ - public void setAlignment(float alignment) - { - this.alignment = alignment > 1.0f ? 1.0f : alignment < 0.0f ? 0.0f : alignment; - } - - /** - * Get the Edge the component is positioned along - * - * @return the Edge - */ - public Edge getEdge() - { - return edge; - } - - /** - * Set the Edge the component is positioned along - * - * @param edge the Edge the component is position on. - */ - public void setEdge(Edge edge) - { - this.edge = edge; - } - - /** - * Get the gap between the border component and the parent component - * - * @return the gap in pixels. - */ - public int getGap() - { - return gap; - } - - /** - * Set the gap between the border component and the parent component - * - * @param gap the gap in pixels (default is 5) - */ - public void setGap(int gap) - { - this.gap = gap; - } - -// -// Implement the Border interface -// - - public Insets getBorderInsets(Component c) - { - return borderInsets; - } - - public boolean isBorderOpaque() - { - return false; - } - - /** - * In this case a real component is to be painted. Setting the location - * of the component will cause it to be painted at that location. - */ - public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) - { - float x2 = (width - component.getWidth()) * component.getAlignmentX() + x; - float y2 = (height - component.getHeight()) * component.getAlignmentY() + y; - component.setLocation((int)x2, (int)y2); - } - - /* - * Install this Border on the specified component by replacing the - * existing Border with a CompoundBorder containing the original Border - * and our ComponentBorder - * - * This method should only be invoked once all the properties of this - * class have been set. Installing the Border more than once will cause - * unpredictable results. - */ - public void install(JComponent parent) - { - this.parent = parent; - - determineInsetsAndAlignment(); - - // Add this Border to the parent - - Border current = parent.getBorder(); - - if (current == null) - { - parent.setBorder(this); - } - else - { - CompoundBorder compound = new CompoundBorder(current, this); - parent.setBorder(compound); - } - - // Add component to the parent - - parent.add(component); - } - - /** - * The insets need to be determined so they are included in the preferred - * size of the component the Border is attached to. - * - * The alignment of the component is determined here so it doesn't need - * to be recalculated every time the Border is painted. - */ - private void determineInsetsAndAlignment() - { - borderInsets = new Insets(0, 0, 0, 0); - - // The insets will only be updated for the edge the component will be - // diplayed on. - // - // The X, Y alignment of the component is controlled by both the edge - // and alignment parameters - - if (edge == Edge.TOP) - { - borderInsets.top = component.getPreferredSize().height + gap; - component.setAlignmentX(alignment); - component.setAlignmentY(0.0f); - } - else if (edge == Edge.BOTTOM) - { - borderInsets.bottom = component.getPreferredSize().height + gap; - component.setAlignmentX(alignment); - component.setAlignmentY(1.0f); - } - else if (edge == Edge.LEFT) - { - borderInsets.left = component.getPreferredSize().width + gap; - component.setAlignmentX(0.0f); - component.setAlignmentY(alignment); - } - else if (edge == Edge.RIGHT) - { - borderInsets.right = component.getPreferredSize().width + gap; - component.setAlignmentX(1.0f); - component.setAlignmentY(alignment); - } - - if (adjustInsets) - adjustBorderInsets(); - } - - /* - * The complimentary edges of the Border may need to be adjusted to allow - * the component to fit completely in the bounds of the parent component. - */ - private void adjustBorderInsets() - { - Insets parentInsets = parent.getInsets(); - - // May need to adust the height of the parent component to fit - // the component in the Border - - if (edge == Edge.RIGHT || edge == Edge.LEFT) - { - int parentHeight = parent.getPreferredSize().height - parentInsets.top - parentInsets.bottom; - int diff = component.getHeight() - parentHeight; - - if (diff > 0) - { - int topDiff = (int)(diff * alignment); - int bottomDiff = diff - topDiff; - borderInsets.top += topDiff; - borderInsets.bottom += bottomDiff; - } - } - - // May need to adust the width of the parent component to fit - // the component in the Border - - if (edge == Edge.TOP || edge == Edge.BOTTOM) - { - int parentWidth = parent.getPreferredSize().width - parentInsets.left - parentInsets.right; - int diff = component.getWidth() - parentWidth; - - if (diff > 0) - { - int leftDiff = (int)(diff * alignment); - int rightDiff = diff - leftDiff; - borderInsets.left += leftDiff; - borderInsets.right += rightDiff; - } - } - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/components/GenerateButton.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/components/GenerateButton.java deleted file mode 100644 index 712301fc..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/components/GenerateButton.java +++ /dev/null @@ -1,35 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.components; - -import com.intellij.icons.AllIcons; -import javax.swing.JButton; -import javax.swing.SwingConstants; - -public class GenerateButton extends JButton { - - public GenerateButton() { - initialize(); - } - - public void setMode(Mode mode, Runnable onClick) { - var isStopMode = mode == Mode.STOP; - setIcon(isStopMode ? AllIcons.Actions.Suspend : AllIcons.Actions.Refresh); - setText(isStopMode ? "Stop generating" : "Regenerate response"); - for (var listener : getActionListeners()) { - removeActionListener(listener); - } - addActionListener(e -> onClick.run()); - } - - private void initialize() { - setVerticalTextPosition(SwingConstants.CENTER); - setHorizontalTextPosition(SwingConstants.RIGHT); - setVerticalAlignment(SwingConstants.CENTER); - setAlignmentY(0.5f); - setVisible(false); - } - - public enum Mode { - STOP, - REFRESH - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/components/TextArea.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/components/TextArea.java deleted file mode 100644 index 7f91551c..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/components/TextArea.java +++ /dev/null @@ -1,35 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.components; - -import static ee.carlrobert.codegpt.util.SwingUtils.addShiftEnterInputMap; -import static ee.carlrobert.codegpt.util.SwingUtils.createIconButton; - -import com.intellij.ui.components.JBTextArea; -import com.intellij.util.ui.JBUI; -import icons.Icons; -import java.awt.event.ActionListener; -import javax.swing.JButton; -import javax.swing.JScrollPane; - -public class TextArea extends JBTextArea { - - public TextArea(Runnable onSubmit, JScrollPane textAreaScrollPane) { - super(); - getEmptyText().setText("Ask me anything..."); - setMargin(JBUI.insets(5)); - addSubmitButton(onSubmit, textAreaScrollPane); - addShiftEnterInputMap(this, onSubmit); - } - - private void addSubmitButton(Runnable onSubmit, JScrollPane textAreaScrollPane) { - var button = createSubmitButton(e -> onSubmit.run()); - ComponentBorder cb = new ComponentBorder(button); - cb.setAdjustInsets(true); - cb.install(textAreaScrollPane); - } - - private JButton createSubmitButton(ActionListener submitButtonListener) { - var button = createIconButton(Icons.SendImageIcon); - button.addActionListener(submitButtonListener); - return button; - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/ConversationPanel.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/ConversationPanel.java index d838a0b1..8f0fbac8 100644 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/ConversationPanel.java +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/ConversationPanel.java @@ -5,7 +5,7 @@ import static ee.carlrobert.codegpt.util.SwingUtils.justifyLeft; import com.intellij.icons.AllIcons; import com.intellij.ui.JBColor; import com.intellij.util.ui.JBUI; -import ee.carlrobert.codegpt.state.conversations.Conversation; +import ee.carlrobert.codegpt.conversations.Conversation; import java.awt.Cursor; import java.awt.Font; import java.awt.GridBagConstraints; diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/ConversationsToolWindow.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/ConversationsToolWindow.java index a86f5549..4acc57c4 100644 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/ConversationsToolWindow.java +++ b/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/ConversationsToolWindow.java @@ -8,15 +8,16 @@ import com.intellij.openapi.ui.SimpleToolWindowPanel; import com.intellij.ui.components.JBScrollPane; import com.intellij.util.ui.JBFont; import com.intellij.util.ui.JBUI; -import ee.carlrobert.codegpt.state.conversations.Conversation; -import ee.carlrobert.codegpt.state.conversations.ConversationsState; -import ee.carlrobert.codegpt.state.settings.SettingsState; -import ee.carlrobert.codegpt.toolwindow.chat.ChatContentManagerService; -import ee.carlrobert.codegpt.toolwindow.chat.ToolWindowTabPanelFactory; -import ee.carlrobert.codegpt.toolwindow.conversations.actions.ClearAllConversationsAction; -import ee.carlrobert.codegpt.toolwindow.conversations.actions.DeleteConversationAction; -import ee.carlrobert.codegpt.toolwindow.conversations.actions.MoveDownAction; -import ee.carlrobert.codegpt.toolwindow.conversations.actions.MoveUpAction; +import ee.carlrobert.codegpt.actions.toolwindow.DeleteAllConversationsAction; +import ee.carlrobert.codegpt.actions.toolwindow.DeleteConversationAction; +import ee.carlrobert.codegpt.actions.toolwindow.MoveDownAction; +import ee.carlrobert.codegpt.actions.toolwindow.MoveUpAction; +import ee.carlrobert.codegpt.conversations.Conversation; +import ee.carlrobert.codegpt.conversations.ConversationService; +import ee.carlrobert.codegpt.conversations.ConversationsState; +import ee.carlrobert.codegpt.settings.SettingsState; +import ee.carlrobert.codegpt.toolwindow.chat.standard.StandardChatToolWindowContentManager; +import ee.carlrobert.codegpt.toolwindow.chat.standard.StandardChatToolWindowTabPanel; import javax.swing.BoxLayout; import javax.swing.JLabel; import javax.swing.JPanel; @@ -27,12 +28,14 @@ import org.jetbrains.annotations.NotNull; public class ConversationsToolWindow { private final Project project; + private final ConversationService conversationService; private JPanel conversationsToolWindowContent; private JScrollPane scrollPane; private ScrollablePanel scrollablePanel; public ConversationsToolWindow(@NotNull Project project) { this.project = project; + this.conversationService = ConversationService.getInstance(); refresh(); } @@ -45,7 +48,7 @@ public class ConversationsToolWindow { actionGroup.add(new MoveUpAction(this::refresh)); actionGroup.addSeparator(); actionGroup.add(new DeleteConversationAction(this::refresh)); - actionGroup.add(new ClearAllConversationsAction(this::refresh)); + actionGroup.add(new DeleteAllConversationsAction(this::refresh)); var toolbar = ActionManager.getInstance() .createActionToolbar("NAVIGATION_BAR_TOOLBAR", actionGroup, true); @@ -57,7 +60,7 @@ public class ConversationsToolWindow { public void refresh() { scrollablePanel.removeAll(); - var sortedConversations = ConversationsState.getInstance().getSortedConversations(); + var sortedConversations = conversationService.getSortedConversations(); if (sortedConversations.isEmpty()) { var emptyLabel = new JLabel("No conversations exist."); emptyLabel.setFont(JBFont.h2()); @@ -75,14 +78,14 @@ public class ConversationsToolWindow { var mainPanel = new RootConversationPanel(() -> { SettingsState.getInstance().syncSettings(conversation); - var contentManagerService = project.getService(ChatContentManagerService.class); - contentManagerService.displayChatTab(); - contentManagerService.tryFindChatTabbedPane() + var toolWindowContentManager = StandardChatToolWindowContentManager.getInstance(project); + toolWindowContentManager.displayChatTab(); + toolWindowContentManager.tryFindChatTabbedPane() .ifPresent(tabbedPane -> tabbedPane.tryFindActiveConversationTitle(conversation.getId()) .ifPresentOrElse( title -> tabbedPane.setSelectedIndex(tabbedPane.indexOfTab(title)), () -> { - var panel = ToolWindowTabPanelFactory.getTabPanel(project); + var panel = new StandardChatToolWindowTabPanel(project); panel.displayConversation(conversation); tabbedPane.addNewTab(panel); })); diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/actions/ClearAllConversationsAction.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/actions/ClearAllConversationsAction.java deleted file mode 100644 index 98b95e3f..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/actions/ClearAllConversationsAction.java +++ /dev/null @@ -1,39 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.conversations.actions; - -import static icons.Icons.DefaultImageIcon; - -import com.intellij.icons.AllIcons; -import com.intellij.openapi.actionSystem.AnAction; -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.ui.Messages; -import ee.carlrobert.codegpt.state.conversations.ConversationsState; -import ee.carlrobert.codegpt.toolwindow.chat.ChatContentManagerService; -import org.jetbrains.annotations.NotNull; - -public class ClearAllConversationsAction extends AnAction { - - private final Runnable onRefresh; - - public ClearAllConversationsAction(Runnable onRefresh) { - super("Delete All", "Delete all conversations", AllIcons.Actions.GC); - this.onRefresh = onRefresh; - } - - @Override - public void update(@NotNull AnActionEvent event) { - event.getPresentation().setEnabled(!ConversationsState.getInstance().getSortedConversations().isEmpty()); - } - - @Override - public void actionPerformed(@NotNull AnActionEvent event) { - int answer = Messages.showYesNoDialog("Are you sure you want to delete all conversations?", "Clear History", DefaultImageIcon); - if (answer == Messages.YES) { - ConversationsState.getInstance().clearAll(); - var project = event.getProject(); - if (project != null) { - project.getService(ChatContentManagerService.class).resetTabbedPane(); - } - this.onRefresh.run(); - } - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/actions/MoveDownAction.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/actions/MoveDownAction.java deleted file mode 100644 index e6e7b510..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/actions/MoveDownAction.java +++ /dev/null @@ -1,25 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.conversations.actions; - -import com.intellij.icons.AllIcons; -import com.intellij.openapi.actionSystem.AnActionEvent; -import ee.carlrobert.codegpt.state.conversations.Conversation; -import ee.carlrobert.codegpt.state.conversations.ConversationsState; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -public class MoveDownAction extends MoveAction { - - public MoveDownAction(Runnable onRefresh) { - super("Move Down", "Move Down", AllIcons.Actions.MoveDown, onRefresh); - } - - @Override - public void update(@NotNull AnActionEvent event) { - super.update(event); - } - - @Override - protected Optional getConversation() { - return ConversationsState.getInstance().getPreviousConversation(); - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/actions/MoveUpAction.java b/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/actions/MoveUpAction.java deleted file mode 100644 index 5ef65937..00000000 --- a/src/main/java/ee/carlrobert/codegpt/toolwindow/conversations/actions/MoveUpAction.java +++ /dev/null @@ -1,25 +0,0 @@ -package ee.carlrobert.codegpt.toolwindow.conversations.actions; - -import com.intellij.icons.AllIcons; -import com.intellij.openapi.actionSystem.AnActionEvent; -import ee.carlrobert.codegpt.state.conversations.Conversation; -import ee.carlrobert.codegpt.state.conversations.ConversationsState; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -public class MoveUpAction extends MoveAction { - - public MoveUpAction(Runnable onRefresh) { - super("Move Up", "Move up", AllIcons.Actions.MoveUp, onRefresh); - } - - @Override - public void update(@NotNull AnActionEvent event) { - super.update(event); - } - - @Override - protected Optional getConversation() { - return ConversationsState.getInstance().getNextConversation(); - } -} diff --git a/src/main/java/ee/carlrobert/codegpt/user/ApiClient.java b/src/main/java/ee/carlrobert/codegpt/user/ApiClient.java new file mode 100644 index 00000000..f0260d70 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/user/ApiClient.java @@ -0,0 +1,84 @@ +package ee.carlrobert.codegpt.user; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.components.Service; +import ee.carlrobert.codegpt.user.subscription.Subscription; +import java.io.IOException; +import java.util.Map; +import okhttp3.Callback; +import okhttp3.MediaType; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import org.jetbrains.annotations.Nullable; + +@Service +public final class ApiClient { + + private static final String API_BASE_URL = "http://localhost:8000/api"; + private final OkHttpClient httpClient; + + private ApiClient() { + httpClient = new OkHttpClient(); + } + + public static ApiClient getInstance() { + return ApplicationManager.getApplication().getService(ApiClient.class); + } + + public @Nullable Subscription getSubscription(String accessToken) { + try { + var body = httpClient.newCall(new Request.Builder() + .url(API_BASE_URL + "/subscriptions") + .header("Authorization", accessToken) + .get() + .build()) + .execute() + .body(); + if (body == null) { + return null; + } + return new ObjectMapper().readValue(body.string(), new TypeReference<>() {}); + } catch (IOException e) { + throw new RuntimeException("Unable to obtain subscriptions", e); + } + } + + public void authenticate(String email, String password, Callback callback) { + try { + httpClient.newCall(new Request.Builder() + .url(API_BASE_URL + "/auth") + .post(RequestBody.create( + new ObjectMapper() + .writerWithDefaultPrettyPrinter() + .writeValueAsString(Map.of( + "email", email, + "password", password)), + MediaType.parse("application/json"))) + .build()) + .enqueue(callback); + } catch (JsonProcessingException e) { + throw new RuntimeException("Could not process request", e); + } + } + + public void refreshToken(String refreshToken, Callback callback) { + try { + httpClient.newCall(new Request.Builder() + .url(API_BASE_URL + "/refresh-token") + .patch(RequestBody.create( + new ObjectMapper() + .writerWithDefaultPrettyPrinter() + .writeValueAsString(Map.of( + "refreshToken", refreshToken)), + MediaType.parse("application/json"))) + .build()) + .enqueue(callback); + } catch (JsonProcessingException e) { + throw new RuntimeException("Unable to refresh token", e); + } + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/user/UserManager.java b/src/main/java/ee/carlrobert/codegpt/user/UserManager.java new file mode 100644 index 00000000..41ddee3f --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/user/UserManager.java @@ -0,0 +1,51 @@ +package ee.carlrobert.codegpt.user; + +import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.components.Service; +import ee.carlrobert.codegpt.user.auth.Session; +import ee.carlrobert.codegpt.user.auth.SignedOutNotifier; +import ee.carlrobert.codegpt.user.subscription.Subscription; +import org.jetbrains.annotations.Nullable; + +@Service +public final class UserManager { + + private Session session; + private Subscription subscription; + + private UserManager() { + } + + public static UserManager getInstance() { + return ApplicationManager.getApplication().getService(UserManager.class); + } + + public @Nullable Session getSession() { + return session; + } + + public void setSession(@Nullable Session session) { + this.session = session; + } + + public void clearSession() { + session = null; + subscription = null; + + ApplicationManager.getApplication().getMessageBus() + .syncPublisher(SignedOutNotifier.SIGNED_OUT_TOPIC) + .signedOut(); + } + + public @Nullable Subscription getSubscription() { + return subscription; + } + + public void setSubscription(@Nullable Subscription subscription) { + this.subscription = subscription; + } + + public boolean isSubscribed() { + return session != null && subscription != null; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/user/auth/AuthenticationHandler.java b/src/main/java/ee/carlrobert/codegpt/user/auth/AuthenticationHandler.java new file mode 100644 index 00000000..1b2241a9 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/user/auth/AuthenticationHandler.java @@ -0,0 +1,10 @@ +package ee.carlrobert.codegpt.user.auth; + +public interface AuthenticationHandler { + + void handleAuthenticated(); + + void handleInvalidCredentials(); + + void handleGenericError(); +} diff --git a/src/main/java/ee/carlrobert/codegpt/user/auth/AuthenticationNotifier.java b/src/main/java/ee/carlrobert/codegpt/user/auth/AuthenticationNotifier.java new file mode 100644 index 00000000..9bf05001 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/user/auth/AuthenticationNotifier.java @@ -0,0 +1,10 @@ +package ee.carlrobert.codegpt.user.auth; + +import com.intellij.util.messages.Topic; + +public interface AuthenticationNotifier { + + Topic AUTHENTICATION_TOPIC = Topic.create("authenticationTopic", AuthenticationNotifier.class); + + void authenticationSuccessful(); +} diff --git a/src/main/java/ee/carlrobert/codegpt/user/auth/AuthenticationService.java b/src/main/java/ee/carlrobert/codegpt/user/auth/AuthenticationService.java new file mode 100644 index 00000000..70b896e0 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/user/auth/AuthenticationService.java @@ -0,0 +1,128 @@ +package ee.carlrobert.codegpt.user.auth; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.intellij.notification.NotificationType; +import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.components.Service; +import com.intellij.openapi.diagnostic.Logger; +import ee.carlrobert.codegpt.credentials.UserCredentialsManager; +import ee.carlrobert.codegpt.settings.SettingsState; +import ee.carlrobert.codegpt.user.ApiClient; +import ee.carlrobert.codegpt.user.UserManager; +import ee.carlrobert.codegpt.util.OverlayUtils; +import java.io.IOException; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Response; +import org.jetbrains.annotations.NotNull; + +@Service +public final class AuthenticationService { + + private static final Logger LOG = Logger.getInstance(AuthenticationService.class); + private static final ApiClient client = ApiClient.getInstance(); + + private AuthenticationService() { + } + + public static AuthenticationService getInstance() { + return ApplicationManager.getApplication().getService(AuthenticationService.class); + } + + public void signInAsync(String email, String password, AuthenticationHandler authenticationHandler) { + client.authenticate(email, password, new AuthenticationCallback(authenticationHandler, email, password)); + } + + public void refreshToken() { + var userManager = UserManager.getInstance(); + var session = userManager.getSession(); + + if (session == null) { + throw new IllegalStateException("Tried to revalidate unauthenticated user"); + } + + client.refreshToken(session.getRefreshToken(), new Callback() { + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + userManager.clearSession(); + } + + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) { + if (response.code() == 200) { + var body = response.body(); + if (body != null) { + try { + handleSuccessfulAuthentication(new ObjectMapper().readValue(body.string(), Session.class)); + return; + } catch (IOException e) { + throw new RuntimeException("Unable to deserialize session", e); + } + } + } + + userManager.clearSession(); + throw new RuntimeException("Internal server error. " + response.message()); + } + }); + } + + private void handleSuccessfulAuthentication(Session session) { + SettingsState.getInstance().previouslySignedIn = true; + + var userManager = UserManager.getInstance(); + userManager.setSession(session); + + var subscription = client.getSubscription(session.getAccessToken()); + if (subscription != null) { + userManager.setSubscription(subscription); + } + ApplicationManager.getApplication().getMessageBus() + .syncPublisher(AuthenticationNotifier.AUTHENTICATION_TOPIC) + .authenticationSuccessful(); + } + + class AuthenticationCallback implements Callback { + + private final AuthenticationHandler authenticationHandler; + private final String email; + private final String password; + + public AuthenticationCallback(AuthenticationHandler authenticationHandler, String email, String password) { + this.authenticationHandler = authenticationHandler; + this.email = email; + this.password = password; + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + OverlayUtils.showNotification("Authentication failed.", NotificationType.ERROR); + LOG.error("Unable to retrieve session", e); + } + + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) { + if (response.code() == 401) { + authenticationHandler.handleInvalidCredentials(); + } + if (response.code() == 200) { + var body = response.body(); + if (body != null) { + try { + var session = new ObjectMapper().readValue(body.string(), Session.class); + handleSuccessfulAuthentication(session); + SettingsState.getInstance().email = email; + UserCredentialsManager.getInstance().setAccountPassword(password); + authenticationHandler.handleAuthenticated(); + return; + } catch (IOException e) { + throw new RuntimeException("Unable to deserialize session", e); + } + } + } + + authenticationHandler.handleGenericError(); + throw new RuntimeException("Internal server error. " + response.message()); + } + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/user/auth/Session.java b/src/main/java/ee/carlrobert/codegpt/user/auth/Session.java new file mode 100644 index 00000000..1b8a0934 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/user/auth/Session.java @@ -0,0 +1,43 @@ +package ee.carlrobert.codegpt.user.auth; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.LocalDateTime; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class Session { + + private final String accessToken; + private final String refreshToken; + private final SessionUser user; + private final long expiresIn; + private final LocalDateTime createdAt; + + public Session( + @JsonProperty("access_token") String accessToken, + @JsonProperty("refresh_token") String refreshToken, + @JsonProperty("user") SessionUser user, + @JsonProperty("expires_in") long expiresIn) { + this.accessToken = accessToken; + this.refreshToken = refreshToken; + this.user = user; + this.expiresIn = expiresIn; + this.createdAt = LocalDateTime.now(); + } + + public String getAccessToken() { + return accessToken; + } + + public String getRefreshToken() { + return refreshToken; + } + + public SessionUser getUser() { + return user; + } + + public boolean isExpired() { + return LocalDateTime.now().isAfter(createdAt.plusSeconds(expiresIn)); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/user/auth/SessionUser.java b/src/main/java/ee/carlrobert/codegpt/user/auth/SessionUser.java new file mode 100644 index 00000000..be3411ac --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/user/auth/SessionUser.java @@ -0,0 +1,34 @@ +package ee.carlrobert.codegpt.user.auth; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.UUID; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class SessionUser { + + private final UUID id; + private final String role; + private final String email; + + public SessionUser( + @JsonProperty("id") UUID id, + @JsonProperty("role") String role, + @JsonProperty("email") String email) { + this.id = id; + this.role = role; + this.email = email; + } + + public UUID getId() { + return id; + } + + public String getRole() { + return role; + } + + public String getEmail() { + return email; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/user/auth/SessionVerificationJob.java b/src/main/java/ee/carlrobert/codegpt/user/auth/SessionVerificationJob.java new file mode 100644 index 00000000..d431a995 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/user/auth/SessionVerificationJob.java @@ -0,0 +1,22 @@ +package ee.carlrobert.codegpt.user.auth; + +import com.intellij.openapi.diagnostic.Logger; +import ee.carlrobert.codegpt.user.UserManager; +import java.time.LocalDateTime; +import org.quartz.Job; +import org.quartz.JobExecutionContext; + +public class SessionVerificationJob implements Job { + + private static final Logger LOG = Logger.getInstance(SessionVerificationJob.class); + + @Override + public void execute(JobExecutionContext context) { + LOG.info("Refreshing token: " + LocalDateTime.now()); + + var session = UserManager.getInstance().getSession(); + if (session != null && session.isExpired()) { + AuthenticationService.getInstance().refreshToken(); + } + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/user/auth/SignedOutNotifier.java b/src/main/java/ee/carlrobert/codegpt/user/auth/SignedOutNotifier.java new file mode 100644 index 00000000..ca2633ce --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/user/auth/SignedOutNotifier.java @@ -0,0 +1,10 @@ +package ee.carlrobert.codegpt.user.auth; + +import com.intellij.util.messages.Topic; + +public interface SignedOutNotifier { + + Topic SIGNED_OUT_TOPIC = Topic.create("signedOutTopic", SignedOutNotifier.class); + + void signedOut(); +} \ No newline at end of file diff --git a/src/main/java/ee/carlrobert/codegpt/user/subscription/Subscription.java b/src/main/java/ee/carlrobert/codegpt/user/subscription/Subscription.java new file mode 100644 index 00000000..ec63bf88 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/user/subscription/Subscription.java @@ -0,0 +1,47 @@ +package ee.carlrobert.codegpt.user.subscription; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class Subscription { + + private final String id; + private final String userId; + private final String status; + private final String priceId; + private final SubscriptionPrice prices; + + public Subscription( + @JsonProperty("id") String id, + @JsonProperty("user_id") String userId, + @JsonProperty("status") String status, + @JsonProperty("price_id") String priceId, + @JsonProperty("prices") SubscriptionPrice prices) { + this.id = id; + this.userId = userId; + this.status = status; + this.priceId = priceId; + this.prices = prices; + } + + public String getId() { + return id; + } + + public String getUserId() { + return userId; + } + + public String getStatus() { + return status; + } + + public String getPriceId() { + return priceId; + } + + public SubscriptionPrice getPrices() { + return prices; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/user/subscription/SubscriptionPrice.java b/src/main/java/ee/carlrobert/codegpt/user/subscription/SubscriptionPrice.java new file mode 100644 index 00000000..17d7f47e --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/user/subscription/SubscriptionPrice.java @@ -0,0 +1,40 @@ +package ee.carlrobert.codegpt.user.subscription; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class SubscriptionPrice { + + private final String id; + private final String productId; + private final boolean active; + private final SubscriptionProduct products; + + public SubscriptionPrice( + @JsonProperty("id") String id, + @JsonProperty("product_id") String productId, + @JsonProperty("active") boolean active, + @JsonProperty("products") SubscriptionProduct products) { + this.id = id; + this.productId = productId; + this.active = active; + this.products = products; + } + + public String getId() { + return id; + } + + public String getProductId() { + return productId; + } + + public boolean isActive() { + return active; + } + + public SubscriptionProduct getProducts() { + return products; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/user/subscription/SubscriptionProduct.java b/src/main/java/ee/carlrobert/codegpt/user/subscription/SubscriptionProduct.java new file mode 100644 index 00000000..0b83c2f1 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/user/subscription/SubscriptionProduct.java @@ -0,0 +1,40 @@ +package ee.carlrobert.codegpt.user.subscription; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class SubscriptionProduct { + + private final String id; + private final boolean active; + private final String name; + private final String description; + + public SubscriptionProduct( + @JsonProperty("id") String id, + @JsonProperty("active") boolean active, + @JsonProperty("name") String name, + @JsonProperty("description") String description) { + this.id = id; + this.active = active; + this.name = name; + this.description = description; + } + + public String getId() { + return id; + } + + public boolean isActive() { + return active; + } + + public String getName() { + return name; + } + + public String getDescription() { + return description; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/util/ApplicationUtils.java b/src/main/java/ee/carlrobert/codegpt/util/ApplicationUtils.java new file mode 100644 index 00000000..93fe0ba0 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/util/ApplicationUtils.java @@ -0,0 +1,40 @@ +package ee.carlrobert.codegpt.util; + +import com.intellij.openapi.application.Application; +import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.project.ProjectManager; +import com.intellij.openapi.wm.IdeFocusManager; +import com.intellij.openapi.wm.IdeFrame; +import org.jetbrains.annotations.Nullable; + +public class ApplicationUtils { + + public static boolean isUnitTestingMode() { + Application app = ApplicationManager.getApplication(); + return app != null && app.isUnitTestMode(); + } + + @Nullable + public static Project findCurrentProject() { + IdeFrame frame = IdeFocusManager.getGlobalInstance().getLastFocusedFrame(); + Project project = frame != null ? frame.getProject() : null; + if (isValidProject(project)) { + return project; + } + return findProjectFromOpenProjects(); + } + + private static Project findProjectFromOpenProjects() { + for (Project project : ProjectManager.getInstance().getOpenProjects()) { + if (isValidProject(project)) { + return project; + } + } + return null; + } + + private static boolean isValidProject(@Nullable Project project) { + return project != null && !project.isDisposed() && !project.isDefault(); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/util/EditorUtils.java b/src/main/java/ee/carlrobert/codegpt/util/EditorUtils.java new file mode 100644 index 00000000..7a7e25fe --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/util/EditorUtils.java @@ -0,0 +1,39 @@ +package ee.carlrobert.codegpt.util; + +import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.command.WriteCommandAction; +import com.intellij.openapi.editor.Editor; +import com.intellij.openapi.fileEditor.FileEditorManager; +import com.intellij.openapi.project.Project; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public final class EditorUtils { + + public static boolean hasSelection(@Nullable Editor editor) { + return editor != null && editor.getSelectionModel().hasSelection(); + } + + public static @Nullable Editor getSelectedEditor(@NotNull Project project) { + FileEditorManager editorManager = FileEditorManager.getInstance(project); + return editorManager != null ? editorManager.getSelectedTextEditor() : null; + } + + public static boolean isMainEditorTextSelected(@NotNull Project project) { + return hasSelection(getSelectedEditor(project)); + } + + public static void replaceMainEditorSelection(@NotNull Project project, @NotNull String text) { + var application = ApplicationManager.getApplication(); + application.invokeLater(() -> + application.runWriteAction(() -> WriteCommandAction.runWriteCommandAction(project, () -> { + var editor = getSelectedEditor(project); + if (editor != null) { + var selectionModel = editor.getSelectionModel(); + editor.getDocument().replaceString(selectionModel.getSelectionStart(), selectionModel.getSelectionEnd(), text); + editor.getContentComponent().requestFocus(); + selectionModel.removeSelection(); + } + }))); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/util/FileExtensionLanguageDetails.java b/src/main/java/ee/carlrobert/codegpt/util/FileExtensionLanguageDetails.java new file mode 100644 index 00000000..60c553d1 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/util/FileExtensionLanguageDetails.java @@ -0,0 +1,23 @@ +package ee.carlrobert.codegpt.util; + +public class FileExtensionLanguageDetails { + + private String extension; + private String value; + + public String getExtension() { + return extension; + } + + public void setExtension(String extension) { + this.extension = extension; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/util/FileUtils.java b/src/main/java/ee/carlrobert/codegpt/util/FileUtils.java index 2c5cfa93..82dd1418 100644 --- a/src/main/java/ee/carlrobert/codegpt/util/FileUtils.java +++ b/src/main/java/ee/carlrobert/codegpt/util/FileUtils.java @@ -1,21 +1,51 @@ package ee.carlrobert.codegpt.util; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.intellij.openapi.diagnostic.Logger; +import com.intellij.openapi.util.io.FileUtil; +import java.io.File; import java.io.IOException; +import java.io.Writer; import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; +import java.util.List; +import java.util.Map; import java.util.Objects; +import java.util.Optional; import java.util.regex.Matcher; import java.util.regex.Pattern; public class FileUtils { - public static String getResource(String name) { - try (var stream = Objects.requireNonNull(FileUtils.class.getResourceAsStream(name))) { - return new String(stream.readAllBytes(), StandardCharsets.UTF_8); + private static final Logger LOG = Logger.getInstance(FileUtils.class); + + public static File createFile(String directoryPath, String fileName, String fileContent) { + try { + tryCreateDirectory(directoryPath); + return Files.writeString(Path.of(directoryPath, fileName), fileContent, StandardOpenOption.CREATE).toFile(); } catch (IOException e) { - throw new RuntimeException("Unable to read resource", e); + throw new RuntimeException("Failed to create file", e); } } + public static void tryCreateDirectory(String directoryPath) { + try { + if (!FileUtil.exists(directoryPath)) { + if (!FileUtil.createDirectory(Path.of(directoryPath).toFile())) { + throw new IOException("Failed to create directory: " + directoryPath); + } + } + } catch (IOException e) { + throw new RuntimeException("Failed to create directory", e); + } + } + + public static String getFileExtension(String filename) { Pattern pattern = Pattern.compile("[^.]+$"); Matcher matcher = pattern.matcher(filename); @@ -25,4 +55,56 @@ public class FileUtils { } return ""; } + + public static Map.Entry findFileNameExtensionMapping(String language) { + var defaultValue = Map.entry("Text", ".txt"); + var mapper = new ObjectMapper(); + + List fileExtensionLanguageMappings; + List languageFileExtensionMappings; + try { + fileExtensionLanguageMappings = mapper.readValue(getResourceContent("/fileExtensionLanguageMappings.json"), new TypeReference<>() {}); + languageFileExtensionMappings = mapper.readValue(getResourceContent("/languageFileExtensionMappings.json"), new TypeReference<>() {}); + } catch (JsonProcessingException e) { + LOG.error("Unable to extract file extension", e); + return defaultValue; + } + + return findFirstExtension(languageFileExtensionMappings, language) + .orElseGet(() -> fileExtensionLanguageMappings.stream() + .filter(it -> it.getExtension().equalsIgnoreCase(language)) + .findFirst() + .map(it -> findFirstExtension(languageFileExtensionMappings, it.getValue()).orElse(defaultValue)) + .orElse(defaultValue)); + } + + public static boolean isUtf8File(String filePath) { + var path = Paths.get(filePath); + try (var reader = Files.newBufferedReader(path)) { + int c = reader.read(); + if (c >= 0) { + reader.transferTo(Writer.nullWriter()); + } + return true; + } catch (Exception e) { + return false; + } + } + + public static String getResourceContent(String name) { + try (var stream = Objects.requireNonNull(FileUtils.class.getResourceAsStream(name))) { + return new String(stream.readAllBytes(), StandardCharsets.UTF_8); + } catch (IOException e) { + throw new RuntimeException("Unable to read resource", e); + } + } + + private static Optional> findFirstExtension( + List languageFileExtensionMappings, + String language) { + return languageFileExtensionMappings.stream() + .filter(item -> language.equalsIgnoreCase(item.getName())) + .findFirst() + .map(it -> Map.entry(it.getName(), it.getExtensions().get(0))); + } } diff --git a/src/main/java/ee/carlrobert/codegpt/util/LanguageFileExtensionDetails.java b/src/main/java/ee/carlrobert/codegpt/util/LanguageFileExtensionDetails.java new file mode 100644 index 00000000..17365764 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/util/LanguageFileExtensionDetails.java @@ -0,0 +1,34 @@ +package ee.carlrobert.codegpt.util; + +import java.util.List; + +public class LanguageFileExtensionDetails { + + private String name; + private String type; + private List extensions; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public List getExtensions() { + return extensions; + } + + public void setExtensions(List extensions) { + this.extensions = extensions; + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/util/MarkdownUtils.java b/src/main/java/ee/carlrobert/codegpt/util/MarkdownUtils.java new file mode 100644 index 00000000..9f9ed0cf --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/util/MarkdownUtils.java @@ -0,0 +1,32 @@ +package ee.carlrobert.codegpt.util; + +import static java.util.stream.Collectors.toList; + +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class MarkdownUtils { + + /** + * Splits a given string into a list of strings where each element is either a code block surrounded by triple backticks + * or a non-code block text. + * + * @param inputMarkdown The input markdown formatted string to be split. + * @return A list of strings where each element is a code block or a non-code block text from the input string. + */ + public static List splitCodeBlocks(String inputMarkdown) { + List result = new ArrayList<>(); + Pattern pattern = Pattern.compile("(?s)```.*?```"); + Matcher matcher = pattern.matcher(inputMarkdown); + int start = 0; + while (matcher.find()) { + result.add(inputMarkdown.substring(start, matcher.start())); + result.add(matcher.group()); + start = matcher.end(); + } + result.add(inputMarkdown.substring(start)); + return result.stream().filter(item -> !item.isBlank()).collect(toList()); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/util/OverlayUtils.java b/src/main/java/ee/carlrobert/codegpt/util/OverlayUtils.java new file mode 100644 index 00000000..b73e38e8 --- /dev/null +++ b/src/main/java/ee/carlrobert/codegpt/util/OverlayUtils.java @@ -0,0 +1,106 @@ +package ee.carlrobert.codegpt.util; + +import static com.intellij.openapi.ui.Messages.CANCEL; +import static com.intellij.openapi.ui.Messages.OK; +import static ee.carlrobert.codegpt.Icons.DefaultImageIcon; + +import com.intellij.execution.ExecutionBundle; +import com.intellij.notification.Notification; +import com.intellij.notification.NotificationType; +import com.intellij.notification.Notifications; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.ui.DialogBuilder; +import com.intellij.openapi.ui.DoNotAskOption; +import com.intellij.openapi.ui.MessageDialogBuilder; +import com.intellij.openapi.ui.MessageType; +import com.intellij.openapi.ui.Messages; +import com.intellij.openapi.ui.popup.Balloon; +import com.intellij.openapi.ui.popup.JBPopupFactory; +import com.intellij.ui.awt.RelativePoint; +import com.intellij.ui.components.JBLabel; +import com.intellij.util.ui.JBFont; +import com.intellij.util.ui.JBUI; +import ee.carlrobert.codegpt.CodeGPTBundle; +import ee.carlrobert.codegpt.conversations.ConversationsState; +import ee.carlrobert.codegpt.embeddings.FolderStructureTreePanel; +import java.awt.Point; +import org.jetbrains.annotations.NotNull; + +public class OverlayUtils { + + public static void showNotification(String content, NotificationType type) { + Notifications.Bus.notify(new Notification("CodeGPT Notification Group", "CodeGPT", content, type)); + } + + public static int showFileStructureDialog(Project project, FolderStructureTreePanel folderStructureTreePanel) { + var dialogBuilder = new DialogBuilder(project); + dialogBuilder.setNorthPanel(JBUI.Panels.simplePanel(new JBLabel( + "" + + "

      Indexing files enables direct queries related to your codebase.

      " + + "
      " + + "

      File indexing occurs locally on your computer; no files are sent to any 3rd party services.

      " + + "

      For additional information, refer to the CodeGPT documentation.

      " + + "") + .setCopyable(true) + .setAllowAutoWrapping(true) + .withFont(JBFont.medium())) + .withBorder(JBUI.Borders.emptyBottom(12))); + dialogBuilder.setCenterPanel(folderStructureTreePanel.getPanel()); + dialogBuilder.addOkAction().setText("Start Indexing"); + dialogBuilder.addCancelAction(); + dialogBuilder.setTitle("Choose Files for Indexing"); + return dialogBuilder.show(); + } + + public static int showDeleteConversationDialog() { + return Messages.showYesNoDialog( + CodeGPTBundle.get("dialog.deleteConversation.description"), + CodeGPTBundle.get("dialog.deleteConversation.title"), + DefaultImageIcon); + } + + public static int showTokenLimitExceededDialog() { + return MessageDialogBuilder.okCancel( + CodeGPTBundle.get("dialog.tokenLimitExceeded.title"), + CodeGPTBundle.get("dialog.tokenLimitExceeded.description")) + .yesText(CodeGPTBundle.get("dialog.tokenLimitExceeded.continue")) + .noText(CodeGPTBundle.get("dialog.tokenLimitExceeded.cancel")) + .icon(DefaultImageIcon) + .doNotAsk(new DoNotAskOption.Adapter() { + @Override + public void rememberChoice(boolean isSelected, int exitCode) { + if (isSelected) { + ConversationsState.getInstance().discardAllTokenLimits(); + } + } + + @NotNull + @Override + public String getDoNotShowMessage() { + return ExecutionBundle.message("don.t.ask.again"); + } + + @Override + public boolean shouldSaveOptionsOnCancel() { + return true; + } + }) + .guessWindowAndAsk() ? OK : CANCEL; + } + + public static void showWarningBalloon(String content, Point locationOnScreen) { + showBalloon(content, MessageType.WARNING, locationOnScreen); + } + + public static void showInfoBalloon(String content, Point locationOnScreen) { + showBalloon(content, MessageType.INFO, locationOnScreen); + } + + private static void showBalloon(String content, MessageType messageType, Point locationOnScreen) { + JBPopupFactory.getInstance() + .createHtmlTextBalloonBuilder(content, messageType, null) + .setFadeoutTime(2500) + .createBalloon() + .show(RelativePoint.fromScreen(locationOnScreen), Balloon.Position.above); + } +} diff --git a/src/main/java/ee/carlrobert/codegpt/util/SwingUtils.java b/src/main/java/ee/carlrobert/codegpt/util/SwingUtils.java index e9e653ae..72c42a95 100644 --- a/src/main/java/ee/carlrobert/codegpt/util/SwingUtils.java +++ b/src/main/java/ee/carlrobert/codegpt/util/SwingUtils.java @@ -1,12 +1,14 @@ package ee.carlrobert.codegpt.util; -import com.intellij.ui.JBColor; -import com.intellij.util.ui.JBFont; -import com.intellij.util.ui.JBUI; +import static javax.swing.event.HyperlinkEvent.EventType.ACTIVATED; + import com.intellij.util.ui.UI; import java.awt.Component; +import java.awt.Desktop; import java.awt.Dimension; import java.awt.event.ActionEvent; +import java.io.IOException; +import java.net.URISyntaxException; import javax.swing.AbstractAction; import javax.swing.BorderFactory; import javax.swing.Box; @@ -16,29 +18,11 @@ import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextArea; -import javax.swing.JTextPane; import javax.swing.KeyStroke; +import javax.swing.event.HyperlinkEvent; public class SwingUtils { - public static JTextPane createTextPane(String selectedText) { - var textPane = new JTextPane(); - textPane.setText(selectedText); - textPane.setEditable(false); - textPane.setBackground(JBColor.PanelBackground); - textPane.setBorder(JBUI.Borders.emptyLeft(4)); - return textPane; - } - - public static JLabel createIconLabel(Icon icon, String text) { - var iconLabel = new JLabel(icon); - iconLabel.setText(text); - iconLabel.setFont(JBFont.h4()); - iconLabel.setIconTextGap(8); - iconLabel.setBorder(JBUI.Borders.emptyLeft(4)); - return iconLabel; - } - public static JButton createIconButton(Icon icon) { var button = new JButton(icon); button.setBorder(BorderFactory.createEmptyBorder()); @@ -54,21 +38,6 @@ public class SwingUtils { return box; } - public static void addShiftEnterInputMap(JTextArea textArea, Runnable onEnter) { - var input = textArea.getInputMap(); - var enterStroke = KeyStroke.getKeyStroke("ENTER"); - var shiftEnterStroke = KeyStroke.getKeyStroke("shift ENTER"); - input.put(shiftEnterStroke, "insert-break"); - input.put(enterStroke, "text-submit"); - - var actions = textArea.getActionMap(); - actions.put("text-submit", new AbstractAction() { - public void actionPerformed(ActionEvent e) { - onEnter.run(); - } - }); - } - public static void setEqualLabelWidths(JPanel firstPanel, JPanel secondPanel) { var firstLabel = firstPanel.getComponents()[0]; var secondLabel = secondPanel.getComponents()[0]; @@ -77,11 +46,39 @@ public class SwingUtils { } } + public static JPanel createPanel(JComponent component, String label) { + return createPanel(component, label, false); + } + public static JPanel createPanel(JComponent component, String label, boolean resizeX) { return UI.PanelFactory.panel(component) .withLabel(label) .resizeX(resizeX) .createPanel(); } + + public static void handleHyperlinkClicked(HyperlinkEvent event) { + if (ACTIVATED.equals(event.getEventType()) && event.getURL() != null) { + if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { + try { + Desktop.getDesktop().browse(event.getURL().toURI()); + } catch (IOException | URISyntaxException e) { + throw new RuntimeException("Couldn't open the browser.", e); + } + } + } + } + + public static void addShiftEnterInputMap(JTextArea textArea, Runnable onSubmit) { + var enterStroke = KeyStroke.getKeyStroke("ENTER"); + var shiftEnterStroke = KeyStroke.getKeyStroke("shift ENTER"); + textArea.getInputMap().put(shiftEnterStroke, "insert-break"); + textArea.getInputMap().put(enterStroke, "text-submit"); + textArea.getActionMap().put("text-submit", new AbstractAction() { + public void actionPerformed(ActionEvent e) { + onSubmit.run(); + } + }); + } } diff --git a/src/main/java/ee/carlrobert/codegpt/util/ThemeUtils.java b/src/main/java/ee/carlrobert/codegpt/util/ThemeUtils.java index 5432b8e7..78f821bd 100644 --- a/src/main/java/ee/carlrobert/codegpt/util/ThemeUtils.java +++ b/src/main/java/ee/carlrobert/codegpt/util/ThemeUtils.java @@ -2,56 +2,14 @@ package ee.carlrobert.codegpt.util; import static java.lang.String.format; -import com.intellij.openapi.editor.colors.EditorColorsManager; -import com.intellij.openapi.util.SystemInfo; -import com.intellij.util.ui.JBFont; -import com.intellij.util.ui.JBUI; import com.intellij.util.ui.UIUtil; import java.awt.Color; -import javax.swing.UIManager; public class ThemeUtils { - public static String getBackgroundColorRGB() { - return getRGB(UIUtil.getPanelBackground()); - } - - public static String getFontColorRGB() { - return getRGB( - EditorColorsManager.getInstance().getSchemeForCurrentUITheme().getDefaultForeground()); - } - - public static String getSeparatorColorRGB() { - return getRGB(JBUI.CurrentTheme.CustomFrameDecorations.separatorForeground()); - } - - public static String getDisabledTextColorRGB() { - return getRGB(UIUtil.getInactiveTextColor()); - } - - public static String getPanelBackgroundColorRGB() { + public static Color getPanelBackgroundColor() { var panelBg = UIUtil.getPanelBackground(); - return getRGB(UIUtil.isUnderDarcula() ? toDarker(panelBg) : panelBg.brighter()); - } - - public static String getButtonBackgroundColorRGB() { - return getRGB(UIManager.getColor("Button.background")); - } - - public static String getDisabledButtonBackgroundColorRGB() { - return getRGB(UIUtil.getInactiveTextFieldBackgroundColor()); - } - - public static int getFontSize() { - return JBFont.regular().getSize(); - } - - public static String getScrollBarForegroundColorRGB() { - return "rgb(187, 187, 187, 0.8)"; // TODO: Get theme's scrollbar color - } - - public static int getScrollBarRadius() { - return SystemInfo.isMac ? 10 : 0; + return UIUtil.isUnderDarcula() ? toDarker(panelBg) : panelBg.brighter(); } private static Color toDarker(Color color) { @@ -63,7 +21,7 @@ public class ThemeUtils { color.getAlpha()); } - private static String getRGB(Color color) { + public static String getRGB(Color color) { return format("rgb(%d, %d, %d)", color.getRed(), color.getGreen(), color.getBlue()); } } diff --git a/src/main/java/grammar/JSON.tokens b/src/main/java/grammar/JSON.tokens new file mode 100644 index 00000000..997088ff --- /dev/null +++ b/src/main/java/grammar/JSON.tokens @@ -0,0 +1,21 @@ +T__0=1 +T__1=2 +T__2=3 +T__3=4 +T__4=5 +T__5=6 +T__6=7 +T__7=8 +T__8=9 +STRING=10 +NUMBER=11 +WS=12 +'{'=1 +','=2 +'}'=3 +':'=4 +'['=5 +']'=6 +'true'=7 +'false'=8 +'null'=9 diff --git a/src/main/java/grammar/JSONBaseListener.java b/src/main/java/grammar/JSONBaseListener.java new file mode 100644 index 00000000..113a670a --- /dev/null +++ b/src/main/java/grammar/JSONBaseListener.java @@ -0,0 +1,100 @@ +// Generated from JSON.g4 by ANTLR 4.5 +package grammar; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ErrorNode; +import org.antlr.v4.runtime.tree.TerminalNode; + +/** + * This class provides an empty implementation of {@link JSONListener}, + * which can be extended to create a listener which only needs to handle a subset + * of the available methods. + */ +public class JSONBaseListener implements JSONListener { + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterJson(JSONParser.JsonContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitJson(JSONParser.JsonContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterObj(JSONParser.ObjContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitObj(JSONParser.ObjContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPair(JSONParser.PairContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPair(JSONParser.PairContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArr(JSONParser.ArrContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArr(JSONParser.ArrContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterValue(JSONParser.ValueContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitValue(JSONParser.ValueContext ctx) { } + + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void visitTerminal(TerminalNode node) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void visitErrorNode(ErrorNode node) { } +} \ No newline at end of file diff --git a/src/main/java/grammar/JSONLexer.java b/src/main/java/grammar/JSONLexer.java new file mode 100644 index 00000000..86069a82 --- /dev/null +++ b/src/main/java/grammar/JSONLexer.java @@ -0,0 +1,138 @@ +// Generated from JSON.g4 by ANTLR 4.5 +package grammar; +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class JSONLexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.5", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9, + STRING=10, NUMBER=11, WS=12; + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + public static final String[] ruleNames = { + "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8", + "STRING", "ESC", "UNICODE", "HEX", "SAFECODEPOINT", "NUMBER", "INT", "EXP", + "WS" + }; + + private static final String[] _LITERAL_NAMES = { + null, "'{'", "','", "'}'", "':'", "'['", "']'", "'true'", "'false'", "'null'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, null, null, null, null, null, null, null, null, null, "STRING", + "NUMBER", "WS" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + + public JSONLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "JSON.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\16\u0085\b\1\4\2"+ + "\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4"+ + "\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+ + "\t\22\4\23\t\23\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5\3\6\3\6\3\7\3\7\3\b\3"+ + "\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3"+ + "\13\7\13G\n\13\f\13\16\13J\13\13\3\13\3\13\3\f\3\f\3\f\5\fQ\n\f\3\r\3"+ + "\r\3\r\3\r\3\r\3\r\3\16\3\16\3\17\3\17\3\20\5\20^\n\20\3\20\3\20\3\20"+ + "\6\20c\n\20\r\20\16\20d\5\20g\n\20\3\20\5\20j\n\20\3\21\3\21\3\21\7\21"+ + "o\n\21\f\21\16\21r\13\21\5\21t\n\21\3\22\3\22\5\22x\n\22\3\22\6\22{\n"+ + "\22\r\22\16\22|\3\23\6\23\u0080\n\23\r\23\16\23\u0081\3\23\3\23\2\2\24"+ + "\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\2\31\2\33\2\35\2\37"+ + "\r!\2#\2%\16\3\2\n\n\2$$\61\61^^ddhhppttvv\5\2\62;CHch\5\2\2!$$^^\3\2"+ + "\62;\3\2\63;\4\2GGgg\4\2--//\5\2\13\f\17\17\"\"\u008a\2\3\3\2\2\2\2\5"+ + "\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2"+ + "\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\37\3\2\2\2\2%\3\2\2\2\3\'\3"+ + "\2\2\2\5)\3\2\2\2\7+\3\2\2\2\t-\3\2\2\2\13/\3\2\2\2\r\61\3\2\2\2\17\63"+ + "\3\2\2\2\218\3\2\2\2\23>\3\2\2\2\25C\3\2\2\2\27M\3\2\2\2\31R\3\2\2\2\33"+ + "X\3\2\2\2\35Z\3\2\2\2\37]\3\2\2\2!s\3\2\2\2#u\3\2\2\2%\177\3\2\2\2\'("+ + "\7}\2\2(\4\3\2\2\2)*\7.\2\2*\6\3\2\2\2+,\7\177\2\2,\b\3\2\2\2-.\7<\2\2"+ + ".\n\3\2\2\2/\60\7]\2\2\60\f\3\2\2\2\61\62\7_\2\2\62\16\3\2\2\2\63\64\7"+ + "v\2\2\64\65\7t\2\2\65\66\7w\2\2\66\67\7g\2\2\67\20\3\2\2\289\7h\2\29:"+ + "\7c\2\2:;\7n\2\2;<\7u\2\2<=\7g\2\2=\22\3\2\2\2>?\7p\2\2?@\7w\2\2@A\7n"+ + "\2\2AB\7n\2\2B\24\3\2\2\2CH\7$\2\2DG\5\27\f\2EG\5\35\17\2FD\3\2\2\2FE"+ + "\3\2\2\2GJ\3\2\2\2HF\3\2\2\2HI\3\2\2\2IK\3\2\2\2JH\3\2\2\2KL\7$\2\2L\26"+ + "\3\2\2\2MP\7^\2\2NQ\t\2\2\2OQ\5\31\r\2PN\3\2\2\2PO\3\2\2\2Q\30\3\2\2\2"+ + "RS\7w\2\2ST\5\33\16\2TU\5\33\16\2UV\5\33\16\2VW\5\33\16\2W\32\3\2\2\2"+ + "XY\t\3\2\2Y\34\3\2\2\2Z[\n\4\2\2[\36\3\2\2\2\\^\7/\2\2]\\\3\2\2\2]^\3"+ + "\2\2\2^_\3\2\2\2_f\5!\21\2`b\7\60\2\2ac\t\5\2\2ba\3\2\2\2cd\3\2\2\2db"+ + "\3\2\2\2de\3\2\2\2eg\3\2\2\2f`\3\2\2\2fg\3\2\2\2gi\3\2\2\2hj\5#\22\2i"+ + "h\3\2\2\2ij\3\2\2\2j \3\2\2\2kt\7\62\2\2lp\t\6\2\2mo\t\5\2\2nm\3\2\2\2"+ + "or\3\2\2\2pn\3\2\2\2pq\3\2\2\2qt\3\2\2\2rp\3\2\2\2sk\3\2\2\2sl\3\2\2\2"+ + "t\"\3\2\2\2uw\t\7\2\2vx\t\b\2\2wv\3\2\2\2wx\3\2\2\2xz\3\2\2\2y{\t\5\2"+ + "\2zy\3\2\2\2{|\3\2\2\2|z\3\2\2\2|}\3\2\2\2}$\3\2\2\2~\u0080\t\t\2\2\177"+ + "~\3\2\2\2\u0080\u0081\3\2\2\2\u0081\177\3\2\2\2\u0081\u0082\3\2\2\2\u0082"+ + "\u0083\3\2\2\2\u0083\u0084\b\23\2\2\u0084&\3\2\2\2\17\2FHP]dfipsw|\u0081"+ + "\3\b\2\2"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/src/main/java/grammar/JSONLexer.tokens b/src/main/java/grammar/JSONLexer.tokens new file mode 100644 index 00000000..997088ff --- /dev/null +++ b/src/main/java/grammar/JSONLexer.tokens @@ -0,0 +1,21 @@ +T__0=1 +T__1=2 +T__2=3 +T__3=4 +T__4=5 +T__5=6 +T__6=7 +T__7=8 +T__8=9 +STRING=10 +NUMBER=11 +WS=12 +'{'=1 +','=2 +'}'=3 +':'=4 +'['=5 +']'=6 +'true'=7 +'false'=8 +'null'=9 diff --git a/src/main/java/grammar/JSONListener.java b/src/main/java/grammar/JSONListener.java new file mode 100644 index 00000000..3eec0a51 --- /dev/null +++ b/src/main/java/grammar/JSONListener.java @@ -0,0 +1,61 @@ +// Generated from JSON.g4 by ANTLR 4.5 +package grammar; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link JSONParser}. + */ +public interface JSONListener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link JSONParser#json}. + * @param ctx the parse tree + */ + void enterJson(JSONParser.JsonContext ctx); + /** + * Exit a parse tree produced by {@link JSONParser#json}. + * @param ctx the parse tree + */ + void exitJson(JSONParser.JsonContext ctx); + /** + * Enter a parse tree produced by {@link JSONParser#obj}. + * @param ctx the parse tree + */ + void enterObj(JSONParser.ObjContext ctx); + /** + * Exit a parse tree produced by {@link JSONParser#obj}. + * @param ctx the parse tree + */ + void exitObj(JSONParser.ObjContext ctx); + /** + * Enter a parse tree produced by {@link JSONParser#pair}. + * @param ctx the parse tree + */ + void enterPair(JSONParser.PairContext ctx); + /** + * Exit a parse tree produced by {@link JSONParser#pair}. + * @param ctx the parse tree + */ + void exitPair(JSONParser.PairContext ctx); + /** + * Enter a parse tree produced by {@link JSONParser#arr}. + * @param ctx the parse tree + */ + void enterArr(JSONParser.ArrContext ctx); + /** + * Exit a parse tree produced by {@link JSONParser#arr}. + * @param ctx the parse tree + */ + void exitArr(JSONParser.ArrContext ctx); + /** + * Enter a parse tree produced by {@link JSONParser#value}. + * @param ctx the parse tree + */ + void enterValue(JSONParser.ValueContext ctx); + /** + * Exit a parse tree produced by {@link JSONParser#value}. + * @param ctx the parse tree + */ + void exitValue(JSONParser.ValueContext ctx); +} \ No newline at end of file diff --git a/src/main/java/grammar/JSONParser.java b/src/main/java/grammar/JSONParser.java new file mode 100644 index 00000000..75d5acd2 --- /dev/null +++ b/src/main/java/grammar/JSONParser.java @@ -0,0 +1,442 @@ +// Generated from JSON.g4 by ANTLR 4.5 +package grammar; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.misc.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; +import java.util.Iterator; +import java.util.ArrayList; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class JSONParser extends Parser { + static { RuntimeMetaData.checkVersion("4.5", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9, + STRING=10, NUMBER=11, WS=12; + public static final int + RULE_json = 0, RULE_obj = 1, RULE_pair = 2, RULE_arr = 3, RULE_value = 4; + public static final String[] ruleNames = { + "json", "obj", "pair", "arr", "value" + }; + + private static final String[] _LITERAL_NAMES = { + null, "'{'", "','", "'}'", "':'", "'['", "']'", "'true'", "'false'", "'null'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, null, null, null, null, null, null, null, null, null, "STRING", + "NUMBER", "WS" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + @Override + public String getGrammarFileName() { return "JSON.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public JSONParser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + public static class JsonContext extends ParserRuleContext { + public ValueContext value() { + return getRuleContext(ValueContext.class,0); + } + public TerminalNode EOF() { return getToken(JSONParser.EOF, 0); } + public JsonContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_json; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JSONListener ) ((JSONListener)listener).enterJson(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JSONListener ) ((JSONListener)listener).exitJson(this); + } + } + + public final JsonContext json() throws RecognitionException { + JsonContext _localctx = new JsonContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_json); + try { + enterOuterAlt(_localctx, 1); + { + setState(10); + value(); + setState(11); + match(EOF); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ObjContext extends ParserRuleContext { + public List pair() { + return getRuleContexts(PairContext.class); + } + public PairContext pair(int i) { + return getRuleContext(PairContext.class,i); + } + public ObjContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_obj; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JSONListener ) ((JSONListener)listener).enterObj(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JSONListener ) ((JSONListener)listener).exitObj(this); + } + } + + public final ObjContext obj() throws RecognitionException { + ObjContext _localctx = new ObjContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_obj); + int _la; + try { + setState(26); + switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(13); + match(T__0); + setState(14); + pair(); + setState(19); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__1) { + { + { + setState(15); + match(T__1); + setState(16); + pair(); + } + } + setState(21); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(22); + match(T__2); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(24); + match(T__0); + setState(25); + match(T__2); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PairContext extends ParserRuleContext { + public TerminalNode STRING() { return getToken(JSONParser.STRING, 0); } + public ValueContext value() { + return getRuleContext(ValueContext.class,0); + } + public PairContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_pair; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JSONListener ) ((JSONListener)listener).enterPair(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JSONListener ) ((JSONListener)listener).exitPair(this); + } + } + + public final PairContext pair() throws RecognitionException { + PairContext _localctx = new PairContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_pair); + try { + enterOuterAlt(_localctx, 1); + { + setState(28); + match(STRING); + setState(29); + match(T__3); + setState(30); + value(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrContext extends ParserRuleContext { + public List value() { + return getRuleContexts(ValueContext.class); + } + public ValueContext value(int i) { + return getRuleContext(ValueContext.class,i); + } + public ArrContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arr; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JSONListener ) ((JSONListener)listener).enterArr(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JSONListener ) ((JSONListener)listener).exitArr(this); + } + } + + public final ArrContext arr() throws RecognitionException { + ArrContext _localctx = new ArrContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_arr); + int _la; + try { + setState(45); + switch ( getInterpreter().adaptivePredict(_input,3,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(32); + match(T__4); + setState(33); + value(); + setState(38); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__1) { + { + { + setState(34); + match(T__1); + setState(35); + value(); + } + } + setState(40); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(41); + match(T__5); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(43); + match(T__4); + setState(44); + match(T__5); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ValueContext extends ParserRuleContext { + public TerminalNode STRING() { return getToken(JSONParser.STRING, 0); } + public TerminalNode NUMBER() { return getToken(JSONParser.NUMBER, 0); } + public ObjContext obj() { + return getRuleContext(ObjContext.class,0); + } + public ArrContext arr() { + return getRuleContext(ArrContext.class,0); + } + public ValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_value; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JSONListener ) ((JSONListener)listener).enterValue(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JSONListener ) ((JSONListener)listener).exitValue(this); + } + } + + public final ValueContext value() throws RecognitionException { + ValueContext _localctx = new ValueContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_value); + try { + setState(54); + switch (_input.LA(1)) { + case STRING: + enterOuterAlt(_localctx, 1); + { + setState(47); + match(STRING); + } + break; + case NUMBER: + enterOuterAlt(_localctx, 2); + { + setState(48); + match(NUMBER); + } + break; + case T__0: + enterOuterAlt(_localctx, 3); + { + setState(49); + obj(); + } + break; + case T__4: + enterOuterAlt(_localctx, 4); + { + setState(50); + arr(); + } + break; + case T__6: + enterOuterAlt(_localctx, 5); + { + setState(51); + match(T__6); + } + break; + case T__7: + enterOuterAlt(_localctx, 6); + { + setState(52); + match(T__7); + } + break; + case T__8: + enterOuterAlt(_localctx, 7); + { + setState(53); + match(T__8); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\16;\4\2\t\2\4\3\t"+ + "\3\4\4\t\4\4\5\t\5\4\6\t\6\3\2\3\2\3\2\3\3\3\3\3\3\3\3\7\3\24\n\3\f\3"+ + "\16\3\27\13\3\3\3\3\3\3\3\3\3\5\3\35\n\3\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3"+ + "\5\7\5\'\n\5\f\5\16\5*\13\5\3\5\3\5\3\5\3\5\5\5\60\n\5\3\6\3\6\3\6\3\6"+ + "\3\6\3\6\3\6\5\69\n\6\3\6\2\2\7\2\4\6\b\n\2\2?\2\f\3\2\2\2\4\34\3\2\2"+ + "\2\6\36\3\2\2\2\b/\3\2\2\2\n8\3\2\2\2\f\r\5\n\6\2\r\16\7\2\2\3\16\3\3"+ + "\2\2\2\17\20\7\3\2\2\20\25\5\6\4\2\21\22\7\4\2\2\22\24\5\6\4\2\23\21\3"+ + "\2\2\2\24\27\3\2\2\2\25\23\3\2\2\2\25\26\3\2\2\2\26\30\3\2\2\2\27\25\3"+ + "\2\2\2\30\31\7\5\2\2\31\35\3\2\2\2\32\33\7\3\2\2\33\35\7\5\2\2\34\17\3"+ + "\2\2\2\34\32\3\2\2\2\35\5\3\2\2\2\36\37\7\f\2\2\37 \7\6\2\2 !\5\n\6\2"+ + "!\7\3\2\2\2\"#\7\7\2\2#(\5\n\6\2$%\7\4\2\2%\'\5\n\6\2&$\3\2\2\2\'*\3\2"+ + "\2\2(&\3\2\2\2()\3\2\2\2)+\3\2\2\2*(\3\2\2\2+,\7\b\2\2,\60\3\2\2\2-.\7"+ + "\7\2\2.\60\7\b\2\2/\"\3\2\2\2/-\3\2\2\2\60\t\3\2\2\2\619\7\f\2\2\629\7"+ + "\r\2\2\639\5\4\3\2\649\5\b\5\2\659\7\t\2\2\669\7\n\2\2\679\7\13\2\28\61"+ + "\3\2\2\28\62\3\2\2\28\63\3\2\2\28\64\3\2\2\28\65\3\2\2\28\66\3\2\2\28"+ + "\67\3\2\2\29\13\3\2\2\2\7\25\34(/8"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/src/main/java/grammar/JavaLexer.java b/src/main/java/grammar/JavaLexer.java new file mode 100644 index 00000000..2f5583fb --- /dev/null +++ b/src/main/java/grammar/JavaLexer.java @@ -0,0 +1,571 @@ +// Generated from JavaLexer.g4 by ANTLR 4.5 +package grammar; +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class JavaLexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.5", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + 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; + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + public static final String[] 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" + }; + + private static final String[] _LITERAL_NAMES = { + null, "'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, null, null, null, null, null, null, + null, null, null, "'null'", "'('", "')'", "'{'", "'}'", "'['", "']'", + "';'", "','", "'.'", "'='", "'>'", "'<'", "'!'", "'~'", "'?'", "':'", + "'=='", "'<='", "'>='", "'!='", "'&&'", "'||'", "'++'", "'--'", "'+'", + "'-'", "'*'", "'/'", "'&'", "'|'", "'^'", "'%'", "'+='", "'-='", "'*='", + "'/='", "'&='", "'|='", "'^='", "'%='", "'<<='", "'>>='", "'>>>='", "'->'", + "'::'", "'@'", "'...'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, "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" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + + public JavaLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "JavaLexer.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\u0082\u0468\b\1\4"+ + "\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n"+ + "\4\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+ + "\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31"+ + "\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t"+ + " \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t"+ + "+\4,\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64"+ + "\t\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t"+ + "=\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4"+ + "I\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\t"+ + "T\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_"+ + "\4`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k"+ + "\tk\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv"+ + "\4w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t"+ + "\u0080\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083\4\u0084\t\u0084"+ + "\4\u0085\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087\4\u0088\t\u0088\3\2\3"+ + "\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3\4"+ + "\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\7\3"+ + "\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3\n"+ + "\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3\f"+ + "\3\f\3\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3\17\3\17\3\17"+ + "\3\17\3\17\3\17\3\17\3\20\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3\21\3\21"+ + "\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3\23"+ + "\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\25"+ + "\3\26\3\26\3\26\3\26\3\27\3\27\3\27\3\30\3\30\3\30\3\30\3\30\3\31\3\31"+ + "\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\32\3\32\3\32\3\32\3\32"+ + "\3\32\3\32\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\34"+ + "\3\34\3\34\3\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\36"+ + "\3\36\3\36\3\36\3\36\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3 \3 \3 \3 \3"+ + "!\3!\3!\3!\3!\3!\3!\3!\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3#"+ + "\3#\3#\3#\3#\3#\3$\3$\3$\3$\3$\3$\3$\3%\3%\3%\3%\3%\3%\3%\3&\3&\3&\3&"+ + "\3&\3&\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3(\3(\3(\3(\3(\3(\3(\3(\3(\3)\3)\3"+ + ")\3)\3)\3)\3*\3*\3*\3*\3*\3*\3*\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3"+ + "+\3,\3,\3,\3,\3,\3-\3-\3-\3-\3-\3-\3.\3.\3.\3.\3.\3.\3.\3/\3/\3/\3/\3"+ + "/\3/\3/\3/\3/\3/\3\60\3\60\3\60\3\60\3\61\3\61\3\61\3\61\3\61\3\62\3\62"+ + "\3\62\3\62\3\62\3\62\3\62\3\62\3\62\3\63\3\63\3\63\3\63\3\63\3\63\3\64"+ + "\3\64\3\64\3\64\3\64\3\64\3\64\3\65\3\65\3\65\3\65\3\65\3\66\3\66\3\66"+ + "\3\66\3\66\3\66\3\66\3\66\3\66\3\67\3\67\3\67\3\67\3\67\3\67\3\67\3\67"+ + "\38\38\38\38\38\38\39\39\39\3:\3:\3:\3:\3:\3;\3;\3;\3;\3;\3;\3;\3;\3;"+ + "\3<\3<\3<\3<\3<\3=\3=\3=\3=\3=\3=\3=\3=\3=\3=\3=\3>\3>\3>\3>\3?\3?\3?"+ + "\3?\3?\3?\3@\3@\3@\3@\3@\3@\3@\3A\3A\3A\3A\3A\3A\3A\3B\3B\3B\3B\3B\3B"+ + "\3B\3B\3C\3C\3C\3C\3C\3C\3C\3C\3C\3C\3C\3D\3D\3D\5D\u02d7\nD\3D\6D\u02da"+ + "\nD\rD\16D\u02db\3D\5D\u02df\nD\5D\u02e1\nD\3D\5D\u02e4\nD\3E\3E\3E\3"+ + "E\7E\u02ea\nE\fE\16E\u02ed\13E\3E\5E\u02f0\nE\3E\5E\u02f3\nE\3F\3F\7F"+ + "\u02f7\nF\fF\16F\u02fa\13F\3F\3F\7F\u02fe\nF\fF\16F\u0301\13F\3F\5F\u0304"+ + "\nF\3F\5F\u0307\nF\3G\3G\3G\3G\7G\u030d\nG\fG\16G\u0310\13G\3G\5G\u0313"+ + "\nG\3G\5G\u0316\nG\3H\3H\3H\5H\u031b\nH\3H\3H\5H\u031f\nH\3H\5H\u0322"+ + "\nH\3H\5H\u0325\nH\3H\3H\3H\5H\u032a\nH\3H\5H\u032d\nH\5H\u032f\nH\3I"+ + "\3I\3I\3I\5I\u0335\nI\3I\5I\u0338\nI\3I\3I\5I\u033c\nI\3I\3I\5I\u0340"+ + "\nI\3I\3I\5I\u0344\nI\3J\3J\3J\3J\3J\3J\3J\3J\3J\5J\u034f\nJ\3K\3K\3K"+ + "\5K\u0354\nK\3K\3K\3L\3L\3L\7L\u035b\nL\fL\16L\u035e\13L\3L\3L\3M\3M\3"+ + "M\3M\3M\7M\u0367\nM\fM\16M\u036a\13M\3M\3M\3M\7M\u036f\nM\fM\16M\u0372"+ + "\13M\3M\3M\3M\3M\3N\3N\3N\3N\3N\3O\3O\3P\3P\3Q\3Q\3R\3R\3S\3S\3T\3T\3"+ + "U\3U\3V\3V\3W\3W\3X\3X\3Y\3Y\3Z\3Z\3[\3[\3\\\3\\\3]\3]\3^\3^\3_\3_\3_"+ + "\3`\3`\3`\3a\3a\3a\3b\3b\3b\3c\3c\3c\3d\3d\3d\3e\3e\3e\3f\3f\3f\3g\3g"+ + "\3h\3h\3i\3i\3j\3j\3k\3k\3l\3l\3m\3m\3n\3n\3o\3o\3o\3p\3p\3p\3q\3q\3q"+ + "\3r\3r\3r\3s\3s\3s\3t\3t\3t\3u\3u\3u\3v\3v\3v\3w\3w\3w\3w\3x\3x\3x\3x"+ + "\3y\3y\3y\3y\3y\3z\3z\3z\3{\3{\3{\3|\3|\3}\3}\3}\3}\3~\6~\u03f7\n~\r~"+ + "\16~\u03f8\3~\3~\3\177\3\177\3\177\3\177\7\177\u0401\n\177\f\177\16\177"+ + "\u0404\13\177\3\177\3\177\3\177\3\177\3\177\3\u0080\3\u0080\3\u0080\3"+ + "\u0080\7\u0080\u040f\n\u0080\f\u0080\16\u0080\u0412\13\u0080\3\u0080\3"+ + "\u0080\3\u0081\3\u0081\7\u0081\u0418\n\u0081\f\u0081\16\u0081\u041b\13"+ + "\u0081\3\u0082\3\u0082\5\u0082\u041f\n\u0082\3\u0082\3\u0082\3\u0083\3"+ + "\u0083\3\u0083\3\u0083\3\u0083\3\u0083\5\u0083\u0429\n\u0083\3\u0083\3"+ + "\u0083\3\u0083\3\u0083\3\u0083\3\u0083\3\u0083\5\u0083\u0432\n\u0083\3"+ + "\u0083\5\u0083\u0435\n\u0083\3\u0083\5\u0083\u0438\n\u0083\3\u0083\3\u0083"+ + "\3\u0083\6\u0083\u043d\n\u0083\r\u0083\16\u0083\u043e\3\u0083\3\u0083"+ + "\3\u0083\3\u0083\3\u0083\5\u0083\u0446\n\u0083\3\u0084\3\u0084\3\u0084"+ + "\7\u0084\u044b\n\u0084\f\u0084\16\u0084\u044e\13\u0084\3\u0084\5\u0084"+ + "\u0451\n\u0084\3\u0085\3\u0085\3\u0086\3\u0086\7\u0086\u0457\n\u0086\f"+ + "\u0086\16\u0086\u045a\13\u0086\3\u0086\5\u0086\u045d\n\u0086\3\u0087\3"+ + "\u0087\5\u0087\u0461\n\u0087\3\u0088\3\u0088\3\u0088\3\u0088\5\u0088\u0467"+ + "\n\u0088\4\u0370\u0402\2\u0089\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13"+ + "\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61"+ + "\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61"+ + "a\62c\63e\64g\65i\66k\67m8o9q:s;u{?}@\177A\u0081B\u0083C\u0085D\u0087"+ + "E\u0089F\u008bG\u008dH\u008fI\u0091J\u0093K\u0095L\u0097M\u0099N\u009b"+ + "O\u009dP\u009fQ\u00a1R\u00a3S\u00a5T\u00a7U\u00a9V\u00abW\u00adX\u00af"+ + "Y\u00b1Z\u00b3[\u00b5\\\u00b7]\u00b9^\u00bb_\u00bd`\u00bfa\u00c1b\u00c3"+ + "c\u00c5d\u00c7e\u00c9f\u00cbg\u00cdh\u00cfi\u00d1j\u00d3k\u00d5l\u00d7"+ + "m\u00d9n\u00dbo\u00ddp\u00dfq\u00e1r\u00e3s\u00e5t\u00e7u\u00e9v\u00eb"+ + "w\u00edx\u00efy\u00f1z\u00f3{\u00f5|\u00f7}\u00f9~\u00fb\177\u00fd\u0080"+ + "\u00ff\u0081\u0101\u0082\u0103\2\u0105\2\u0107\2\u0109\2\u010b\2\u010d"+ + "\2\u010f\2\3\2\35\3\2\63;\4\2NNnn\4\2ZZzz\5\2\62;CHch\6\2\62;CHaach\3"+ + "\2\629\4\2\629aa\4\2DDdd\3\2\62\63\4\2\62\63aa\6\2FFHHffhh\4\2RRrr\4\2"+ + "--//\6\2\f\f\17\17))^^\6\2\f\f\17\17$$^^\4\2\13\13\"\"\4\2\f\f\17\17\5"+ + "\2\13\f\16\17\"\"\4\2GGgg\n\2$$))^^ddhhppttvv\3\2\62\65\3\2\62;\4\2\62"+ + ";aa\6\2&&C\\aac|\4\2\2\u0081\ud802\udc01\3\2\ud802\udc01\3\2\udc02\ue001"+ + "\u0496\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2"+ + "\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3"+ + "\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2"+ + "\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2"+ + "/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2"+ + "\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2"+ + "G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3"+ + "\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2"+ + "\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2\2k\3\2\2\2\2"+ + "m\3\2\2\2\2o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\2u\3\2\2\2\2w\3\2\2\2\2y\3"+ + "\2\2\2\2{\3\2\2\2\2}\3\2\2\2\2\177\3\2\2\2\2\u0081\3\2\2\2\2\u0083\3\2"+ + "\2\2\2\u0085\3\2\2\2\2\u0087\3\2\2\2\2\u0089\3\2\2\2\2\u008b\3\2\2\2\2"+ + "\u008d\3\2\2\2\2\u008f\3\2\2\2\2\u0091\3\2\2\2\2\u0093\3\2\2\2\2\u0095"+ + "\3\2\2\2\2\u0097\3\2\2\2\2\u0099\3\2\2\2\2\u009b\3\2\2\2\2\u009d\3\2\2"+ + "\2\2\u009f\3\2\2\2\2\u00a1\3\2\2\2\2\u00a3\3\2\2\2\2\u00a5\3\2\2\2\2\u00a7"+ + "\3\2\2\2\2\u00a9\3\2\2\2\2\u00ab\3\2\2\2\2\u00ad\3\2\2\2\2\u00af\3\2\2"+ + "\2\2\u00b1\3\2\2\2\2\u00b3\3\2\2\2\2\u00b5\3\2\2\2\2\u00b7\3\2\2\2\2\u00b9"+ + "\3\2\2\2\2\u00bb\3\2\2\2\2\u00bd\3\2\2\2\2\u00bf\3\2\2\2\2\u00c1\3\2\2"+ + "\2\2\u00c3\3\2\2\2\2\u00c5\3\2\2\2\2\u00c7\3\2\2\2\2\u00c9\3\2\2\2\2\u00cb"+ + "\3\2\2\2\2\u00cd\3\2\2\2\2\u00cf\3\2\2\2\2\u00d1\3\2\2\2\2\u00d3\3\2\2"+ + "\2\2\u00d5\3\2\2\2\2\u00d7\3\2\2\2\2\u00d9\3\2\2\2\2\u00db\3\2\2\2\2\u00dd"+ + "\3\2\2\2\2\u00df\3\2\2\2\2\u00e1\3\2\2\2\2\u00e3\3\2\2\2\2\u00e5\3\2\2"+ + "\2\2\u00e7\3\2\2\2\2\u00e9\3\2\2\2\2\u00eb\3\2\2\2\2\u00ed\3\2\2\2\2\u00ef"+ + "\3\2\2\2\2\u00f1\3\2\2\2\2\u00f3\3\2\2\2\2\u00f5\3\2\2\2\2\u00f7\3\2\2"+ + "\2\2\u00f9\3\2\2\2\2\u00fb\3\2\2\2\2\u00fd\3\2\2\2\2\u00ff\3\2\2\2\2\u0101"+ + "\3\2\2\2\3\u0111\3\2\2\2\5\u011a\3\2\2\2\7\u0121\3\2\2\2\t\u0129\3\2\2"+ + "\2\13\u012f\3\2\2\2\r\u0134\3\2\2\2\17\u0139\3\2\2\2\21\u013f\3\2\2\2"+ + "\23\u0144\3\2\2\2\25\u014a\3\2\2\2\27\u0150\3\2\2\2\31\u0159\3\2\2\2\33"+ + "\u0161\3\2\2\2\35\u0164\3\2\2\2\37\u016b\3\2\2\2!\u0170\3\2\2\2#\u0175"+ + "\3\2\2\2%\u017d\3\2\2\2\'\u0183\3\2\2\2)\u018b\3\2\2\2+\u0191\3\2\2\2"+ + "-\u0195\3\2\2\2/\u0198\3\2\2\2\61\u019d\3\2\2\2\63\u01a8\3\2\2\2\65\u01af"+ + "\3\2\2\2\67\u01ba\3\2\2\29\u01be\3\2\2\2;\u01c8\3\2\2\2=\u01cd\3\2\2\2"+ + "?\u01d4\3\2\2\2A\u01d8\3\2\2\2C\u01e0\3\2\2\2E\u01e8\3\2\2\2G\u01f2\3"+ + "\2\2\2I\u01f9\3\2\2\2K\u0200\3\2\2\2M\u0206\3\2\2\2O\u020d\3\2\2\2Q\u0216"+ + "\3\2\2\2S\u021c\3\2\2\2U\u0223\3\2\2\2W\u0230\3\2\2\2Y\u0235\3\2\2\2["+ + "\u023b\3\2\2\2]\u0242\3\2\2\2_\u024c\3\2\2\2a\u0250\3\2\2\2c\u0255\3\2"+ + "\2\2e\u025e\3\2\2\2g\u0264\3\2\2\2i\u026b\3\2\2\2k\u0270\3\2\2\2m\u0279"+ + "\3\2\2\2o\u0281\3\2\2\2q\u0287\3\2\2\2s\u028a\3\2\2\2u\u028f\3\2\2\2w"+ + "\u0298\3\2\2\2y\u029d\3\2\2\2{\u02a8\3\2\2\2}\u02ac\3\2\2\2\177\u02b2"+ + "\3\2\2\2\u0081\u02b9\3\2\2\2\u0083\u02c0\3\2\2\2\u0085\u02c8\3\2\2\2\u0087"+ + "\u02e0\3\2\2\2\u0089\u02e5\3\2\2\2\u008b\u02f4\3\2\2\2\u008d\u0308\3\2"+ + "\2\2\u008f\u032e\3\2\2\2\u0091\u0330\3\2\2\2\u0093\u034e\3\2\2\2\u0095"+ + "\u0350\3\2\2\2\u0097\u0357\3\2\2\2\u0099\u0361\3\2\2\2\u009b\u0377\3\2"+ + "\2\2\u009d\u037c\3\2\2\2\u009f\u037e\3\2\2\2\u00a1\u0380\3\2\2\2\u00a3"+ + "\u0382\3\2\2\2\u00a5\u0384\3\2\2\2\u00a7\u0386\3\2\2\2\u00a9\u0388\3\2"+ + "\2\2\u00ab\u038a\3\2\2\2\u00ad\u038c\3\2\2\2\u00af\u038e\3\2\2\2\u00b1"+ + "\u0390\3\2\2\2\u00b3\u0392\3\2\2\2\u00b5\u0394\3\2\2\2\u00b7\u0396\3\2"+ + "\2\2\u00b9\u0398\3\2\2\2\u00bb\u039a\3\2\2\2\u00bd\u039c\3\2\2\2\u00bf"+ + "\u039f\3\2\2\2\u00c1\u03a2\3\2\2\2\u00c3\u03a5\3\2\2\2\u00c5\u03a8\3\2"+ + "\2\2\u00c7\u03ab\3\2\2\2\u00c9\u03ae\3\2\2\2\u00cb\u03b1\3\2\2\2\u00cd"+ + "\u03b4\3\2\2\2\u00cf\u03b6\3\2\2\2\u00d1\u03b8\3\2\2\2\u00d3\u03ba\3\2"+ + "\2\2\u00d5\u03bc\3\2\2\2\u00d7\u03be\3\2\2\2\u00d9\u03c0\3\2\2\2\u00db"+ + "\u03c2\3\2\2\2\u00dd\u03c4\3\2\2\2\u00df\u03c7\3\2\2\2\u00e1\u03ca\3\2"+ + "\2\2\u00e3\u03cd\3\2\2\2\u00e5\u03d0\3\2\2\2\u00e7\u03d3\3\2\2\2\u00e9"+ + "\u03d6\3\2\2\2\u00eb\u03d9\3\2\2\2\u00ed\u03dc\3\2\2\2\u00ef\u03e0\3\2"+ + "\2\2\u00f1\u03e4\3\2\2\2\u00f3\u03e9\3\2\2\2\u00f5\u03ec\3\2\2\2\u00f7"+ + "\u03ef\3\2\2\2\u00f9\u03f1\3\2\2\2\u00fb\u03f6\3\2\2\2\u00fd\u03fc\3\2"+ + "\2\2\u00ff\u040a\3\2\2\2\u0101\u0415\3\2\2\2\u0103\u041c\3\2\2\2\u0105"+ + "\u0445\3\2\2\2\u0107\u0447\3\2\2\2\u0109\u0452\3\2\2\2\u010b\u0454\3\2"+ + "\2\2\u010d\u0460\3\2\2\2\u010f\u0466\3\2\2\2\u0111\u0112\7c\2\2\u0112"+ + "\u0113\7d\2\2\u0113\u0114\7u\2\2\u0114\u0115\7v\2\2\u0115\u0116\7t\2\2"+ + "\u0116\u0117\7c\2\2\u0117\u0118\7e\2\2\u0118\u0119\7v\2\2\u0119\4\3\2"+ + "\2\2\u011a\u011b\7c\2\2\u011b\u011c\7u\2\2\u011c\u011d\7u\2\2\u011d\u011e"+ + "\7g\2\2\u011e\u011f\7t\2\2\u011f\u0120\7v\2\2\u0120\6\3\2\2\2\u0121\u0122"+ + "\7d\2\2\u0122\u0123\7q\2\2\u0123\u0124\7q\2\2\u0124\u0125\7n\2\2\u0125"+ + "\u0126\7g\2\2\u0126\u0127\7c\2\2\u0127\u0128\7p\2\2\u0128\b\3\2\2\2\u0129"+ + "\u012a\7d\2\2\u012a\u012b\7t\2\2\u012b\u012c\7g\2\2\u012c\u012d\7c\2\2"+ + "\u012d\u012e\7m\2\2\u012e\n\3\2\2\2\u012f\u0130\7d\2\2\u0130\u0131\7{"+ + "\2\2\u0131\u0132\7v\2\2\u0132\u0133\7g\2\2\u0133\f\3\2\2\2\u0134\u0135"+ + "\7e\2\2\u0135\u0136\7c\2\2\u0136\u0137\7u\2\2\u0137\u0138\7g\2\2\u0138"+ + "\16\3\2\2\2\u0139\u013a\7e\2\2\u013a\u013b\7c\2\2\u013b\u013c\7v\2\2\u013c"+ + "\u013d\7e\2\2\u013d\u013e\7j\2\2\u013e\20\3\2\2\2\u013f\u0140\7e\2\2\u0140"+ + "\u0141\7j\2\2\u0141\u0142\7c\2\2\u0142\u0143\7t\2\2\u0143\22\3\2\2\2\u0144"+ + "\u0145\7e\2\2\u0145\u0146\7n\2\2\u0146\u0147\7c\2\2\u0147\u0148\7u\2\2"+ + "\u0148\u0149\7u\2\2\u0149\24\3\2\2\2\u014a\u014b\7e\2\2\u014b\u014c\7"+ + "q\2\2\u014c\u014d\7p\2\2\u014d\u014e\7u\2\2\u014e\u014f\7v\2\2\u014f\26"+ + "\3\2\2\2\u0150\u0151\7e\2\2\u0151\u0152\7q\2\2\u0152\u0153\7p\2\2\u0153"+ + "\u0154\7v\2\2\u0154\u0155\7k\2\2\u0155\u0156\7p\2\2\u0156\u0157\7w\2\2"+ + "\u0157\u0158\7g\2\2\u0158\30\3\2\2\2\u0159\u015a\7f\2\2\u015a\u015b\7"+ + "g\2\2\u015b\u015c\7h\2\2\u015c\u015d\7c\2\2\u015d\u015e\7w\2\2\u015e\u015f"+ + "\7n\2\2\u015f\u0160\7v\2\2\u0160\32\3\2\2\2\u0161\u0162\7f\2\2\u0162\u0163"+ + "\7q\2\2\u0163\34\3\2\2\2\u0164\u0165\7f\2\2\u0165\u0166\7q\2\2\u0166\u0167"+ + "\7w\2\2\u0167\u0168\7d\2\2\u0168\u0169\7n\2\2\u0169\u016a\7g\2\2\u016a"+ + "\36\3\2\2\2\u016b\u016c\7g\2\2\u016c\u016d\7n\2\2\u016d\u016e\7u\2\2\u016e"+ + "\u016f\7g\2\2\u016f \3\2\2\2\u0170\u0171\7g\2\2\u0171\u0172\7p\2\2\u0172"+ + "\u0173\7w\2\2\u0173\u0174\7o\2\2\u0174\"\3\2\2\2\u0175\u0176\7g\2\2\u0176"+ + "\u0177\7z\2\2\u0177\u0178\7v\2\2\u0178\u0179\7g\2\2\u0179\u017a\7p\2\2"+ + "\u017a\u017b\7f\2\2\u017b\u017c\7u\2\2\u017c$\3\2\2\2\u017d\u017e\7h\2"+ + "\2\u017e\u017f\7k\2\2\u017f\u0180\7p\2\2\u0180\u0181\7c\2\2\u0181\u0182"+ + "\7n\2\2\u0182&\3\2\2\2\u0183\u0184\7h\2\2\u0184\u0185\7k\2\2\u0185\u0186"+ + "\7p\2\2\u0186\u0187\7c\2\2\u0187\u0188\7n\2\2\u0188\u0189\7n\2\2\u0189"+ + "\u018a\7{\2\2\u018a(\3\2\2\2\u018b\u018c\7h\2\2\u018c\u018d\7n\2\2\u018d"+ + "\u018e\7q\2\2\u018e\u018f\7c\2\2\u018f\u0190\7v\2\2\u0190*\3\2\2\2\u0191"+ + "\u0192\7h\2\2\u0192\u0193\7q\2\2\u0193\u0194\7t\2\2\u0194,\3\2\2\2\u0195"+ + "\u0196\7k\2\2\u0196\u0197\7h\2\2\u0197.\3\2\2\2\u0198\u0199\7i\2\2\u0199"+ + "\u019a\7q\2\2\u019a\u019b\7v\2\2\u019b\u019c\7q\2\2\u019c\60\3\2\2\2\u019d"+ + "\u019e\7k\2\2\u019e\u019f\7o\2\2\u019f\u01a0\7r\2\2\u01a0\u01a1\7n\2\2"+ + "\u01a1\u01a2\7g\2\2\u01a2\u01a3\7o\2\2\u01a3\u01a4\7g\2\2\u01a4\u01a5"+ + "\7p\2\2\u01a5\u01a6\7v\2\2\u01a6\u01a7\7u\2\2\u01a7\62\3\2\2\2\u01a8\u01a9"+ + "\7k\2\2\u01a9\u01aa\7o\2\2\u01aa\u01ab\7r\2\2\u01ab\u01ac\7q\2\2\u01ac"+ + "\u01ad\7t\2\2\u01ad\u01ae\7v\2\2\u01ae\64\3\2\2\2\u01af\u01b0\7k\2\2\u01b0"+ + "\u01b1\7p\2\2\u01b1\u01b2\7u\2\2\u01b2\u01b3\7v\2\2\u01b3\u01b4\7c\2\2"+ + "\u01b4\u01b5\7p\2\2\u01b5\u01b6\7e\2\2\u01b6\u01b7\7g\2\2\u01b7\u01b8"+ + "\7q\2\2\u01b8\u01b9\7h\2\2\u01b9\66\3\2\2\2\u01ba\u01bb\7k\2\2\u01bb\u01bc"+ + "\7p\2\2\u01bc\u01bd\7v\2\2\u01bd8\3\2\2\2\u01be\u01bf\7k\2\2\u01bf\u01c0"+ + "\7p\2\2\u01c0\u01c1\7v\2\2\u01c1\u01c2\7g\2\2\u01c2\u01c3\7t\2\2\u01c3"+ + "\u01c4\7h\2\2\u01c4\u01c5\7c\2\2\u01c5\u01c6\7e\2\2\u01c6\u01c7\7g\2\2"+ + "\u01c7:\3\2\2\2\u01c8\u01c9\7n\2\2\u01c9\u01ca\7q\2\2\u01ca\u01cb\7p\2"+ + "\2\u01cb\u01cc\7i\2\2\u01cc<\3\2\2\2\u01cd\u01ce\7p\2\2\u01ce\u01cf\7"+ + "c\2\2\u01cf\u01d0\7v\2\2\u01d0\u01d1\7k\2\2\u01d1\u01d2\7x\2\2\u01d2\u01d3"+ + "\7g\2\2\u01d3>\3\2\2\2\u01d4\u01d5\7p\2\2\u01d5\u01d6\7g\2\2\u01d6\u01d7"+ + "\7y\2\2\u01d7@\3\2\2\2\u01d8\u01d9\7r\2\2\u01d9\u01da\7c\2\2\u01da\u01db"+ + "\7e\2\2\u01db\u01dc\7m\2\2\u01dc\u01dd\7c\2\2\u01dd\u01de\7i\2\2\u01de"+ + "\u01df\7g\2\2\u01dfB\3\2\2\2\u01e0\u01e1\7r\2\2\u01e1\u01e2\7t\2\2\u01e2"+ + "\u01e3\7k\2\2\u01e3\u01e4\7x\2\2\u01e4\u01e5\7c\2\2\u01e5\u01e6\7v\2\2"+ + "\u01e6\u01e7\7g\2\2\u01e7D\3\2\2\2\u01e8\u01e9\7r\2\2\u01e9\u01ea\7t\2"+ + "\2\u01ea\u01eb\7q\2\2\u01eb\u01ec\7v\2\2\u01ec\u01ed\7g\2\2\u01ed\u01ee"+ + "\7e\2\2\u01ee\u01ef\7v\2\2\u01ef\u01f0\7g\2\2\u01f0\u01f1\7f\2\2\u01f1"+ + "F\3\2\2\2\u01f2\u01f3\7r\2\2\u01f3\u01f4\7w\2\2\u01f4\u01f5\7d\2\2\u01f5"+ + "\u01f6\7n\2\2\u01f6\u01f7\7k\2\2\u01f7\u01f8\7e\2\2\u01f8H\3\2\2\2\u01f9"+ + "\u01fa\7t\2\2\u01fa\u01fb\7g\2\2\u01fb\u01fc\7v\2\2\u01fc\u01fd\7w\2\2"+ + "\u01fd\u01fe\7t\2\2\u01fe\u01ff\7p\2\2\u01ffJ\3\2\2\2\u0200\u0201\7u\2"+ + "\2\u0201\u0202\7j\2\2\u0202\u0203\7q\2\2\u0203\u0204\7t\2\2\u0204\u0205"+ + "\7v\2\2\u0205L\3\2\2\2\u0206\u0207\7u\2\2\u0207\u0208\7v\2\2\u0208\u0209"+ + "\7c\2\2\u0209\u020a\7v\2\2\u020a\u020b\7k\2\2\u020b\u020c\7e\2\2\u020c"+ + "N\3\2\2\2\u020d\u020e\7u\2\2\u020e\u020f\7v\2\2\u020f\u0210\7t\2\2\u0210"+ + "\u0211\7k\2\2\u0211\u0212\7e\2\2\u0212\u0213\7v\2\2\u0213\u0214\7h\2\2"+ + "\u0214\u0215\7r\2\2\u0215P\3\2\2\2\u0216\u0217\7u\2\2\u0217\u0218\7w\2"+ + "\2\u0218\u0219\7r\2\2\u0219\u021a\7g\2\2\u021a\u021b\7t\2\2\u021bR\3\2"+ + "\2\2\u021c\u021d\7u\2\2\u021d\u021e\7y\2\2\u021e\u021f\7k\2\2\u021f\u0220"+ + "\7v\2\2\u0220\u0221\7e\2\2\u0221\u0222\7j\2\2\u0222T\3\2\2\2\u0223\u0224"+ + "\7u\2\2\u0224\u0225\7{\2\2\u0225\u0226\7p\2\2\u0226\u0227\7e\2\2\u0227"+ + "\u0228\7j\2\2\u0228\u0229\7t\2\2\u0229\u022a\7q\2\2\u022a\u022b\7p\2\2"+ + "\u022b\u022c\7k\2\2\u022c\u022d\7|\2\2\u022d\u022e\7g\2\2\u022e\u022f"+ + "\7f\2\2\u022fV\3\2\2\2\u0230\u0231\7v\2\2\u0231\u0232\7j\2\2\u0232\u0233"+ + "\7k\2\2\u0233\u0234\7u\2\2\u0234X\3\2\2\2\u0235\u0236\7v\2\2\u0236\u0237"+ + "\7j\2\2\u0237\u0238\7t\2\2\u0238\u0239\7q\2\2\u0239\u023a\7y\2\2\u023a"+ + "Z\3\2\2\2\u023b\u023c\7v\2\2\u023c\u023d\7j\2\2\u023d\u023e\7t\2\2\u023e"+ + "\u023f\7q\2\2\u023f\u0240\7y\2\2\u0240\u0241\7u\2\2\u0241\\\3\2\2\2\u0242"+ + "\u0243\7v\2\2\u0243\u0244\7t\2\2\u0244\u0245\7c\2\2\u0245\u0246\7p\2\2"+ + "\u0246\u0247\7u\2\2\u0247\u0248\7k\2\2\u0248\u0249\7g\2\2\u0249\u024a"+ + "\7p\2\2\u024a\u024b\7v\2\2\u024b^\3\2\2\2\u024c\u024d\7v\2\2\u024d\u024e"+ + "\7t\2\2\u024e\u024f\7{\2\2\u024f`\3\2\2\2\u0250\u0251\7x\2\2\u0251\u0252"+ + "\7q\2\2\u0252\u0253\7k\2\2\u0253\u0254\7f\2\2\u0254b\3\2\2\2\u0255\u0256"+ + "\7x\2\2\u0256\u0257\7q\2\2\u0257\u0258\7n\2\2\u0258\u0259\7c\2\2\u0259"+ + "\u025a\7v\2\2\u025a\u025b\7k\2\2\u025b\u025c\7n\2\2\u025c\u025d\7g\2\2"+ + "\u025dd\3\2\2\2\u025e\u025f\7y\2\2\u025f\u0260\7j\2\2\u0260\u0261\7k\2"+ + "\2\u0261\u0262\7n\2\2\u0262\u0263\7g\2\2\u0263f\3\2\2\2\u0264\u0265\7"+ + "o\2\2\u0265\u0266\7q\2\2\u0266\u0267\7f\2\2\u0267\u0268\7w\2\2\u0268\u0269"+ + "\7n\2\2\u0269\u026a\7g\2\2\u026ah\3\2\2\2\u026b\u026c\7q\2\2\u026c\u026d"+ + "\7r\2\2\u026d\u026e\7g\2\2\u026e\u026f\7p\2\2\u026fj\3\2\2\2\u0270\u0271"+ + "\7t\2\2\u0271\u0272\7g\2\2\u0272\u0273\7s\2\2\u0273\u0274\7w\2\2\u0274"+ + "\u0275\7k\2\2\u0275\u0276\7t\2\2\u0276\u0277\7g\2\2\u0277\u0278\7u\2\2"+ + "\u0278l\3\2\2\2\u0279\u027a\7g\2\2\u027a\u027b\7z\2\2\u027b\u027c\7r\2"+ + "\2\u027c\u027d\7q\2\2\u027d\u027e\7t\2\2\u027e\u027f\7v\2\2\u027f\u0280"+ + "\7u\2\2\u0280n\3\2\2\2\u0281\u0282\7q\2\2\u0282\u0283\7r\2\2\u0283\u0284"+ + "\7g\2\2\u0284\u0285\7p\2\2\u0285\u0286\7u\2\2\u0286p\3\2\2\2\u0287\u0288"+ + "\7v\2\2\u0288\u0289\7q\2\2\u0289r\3\2\2\2\u028a\u028b\7w\2\2\u028b\u028c"+ + "\7u\2\2\u028c\u028d\7g\2\2\u028d\u028e\7u\2\2\u028et\3\2\2\2\u028f\u0290"+ + "\7r\2\2\u0290\u0291\7t\2\2\u0291\u0292\7q\2\2\u0292\u0293\7x\2\2\u0293"+ + "\u0294\7k\2\2\u0294\u0295\7f\2\2\u0295\u0296\7g\2\2\u0296\u0297\7u\2\2"+ + "\u0297v\3\2\2\2\u0298\u0299\7y\2\2\u0299\u029a\7k\2\2\u029a\u029b\7v\2"+ + "\2\u029b\u029c\7j\2\2\u029cx\3\2\2\2\u029d\u029e\7v\2\2\u029e\u029f\7"+ + "t\2\2\u029f\u02a0\7c\2\2\u02a0\u02a1\7p\2\2\u02a1\u02a2\7u\2\2\u02a2\u02a3"+ + "\7k\2\2\u02a3\u02a4\7v\2\2\u02a4\u02a5\7k\2\2\u02a5\u02a6\7x\2\2\u02a6"+ + "\u02a7\7g\2\2\u02a7z\3\2\2\2\u02a8\u02a9\7x\2\2\u02a9\u02aa\7c\2\2\u02aa"+ + "\u02ab\7t\2\2\u02ab|\3\2\2\2\u02ac\u02ad\7{\2\2\u02ad\u02ae\7k\2\2\u02ae"+ + "\u02af\7g\2\2\u02af\u02b0\7n\2\2\u02b0\u02b1\7f\2\2\u02b1~\3\2\2\2\u02b2"+ + "\u02b3\7t\2\2\u02b3\u02b4\7g\2\2\u02b4\u02b5\7e\2\2\u02b5\u02b6\7q\2\2"+ + "\u02b6\u02b7\7t\2\2\u02b7\u02b8\7f\2\2\u02b8\u0080\3\2\2\2\u02b9\u02ba"+ + "\7u\2\2\u02ba\u02bb\7g\2\2\u02bb\u02bc\7c\2\2\u02bc\u02bd\7n\2\2\u02bd"+ + "\u02be\7g\2\2\u02be\u02bf\7f\2\2\u02bf\u0082\3\2\2\2\u02c0\u02c1\7r\2"+ + "\2\u02c1\u02c2\7g\2\2\u02c2\u02c3\7t\2\2\u02c3\u02c4\7o\2\2\u02c4\u02c5"+ + "\7k\2\2\u02c5\u02c6\7v\2\2\u02c6\u02c7\7u\2\2\u02c7\u0084\3\2\2\2\u02c8"+ + "\u02c9\7p\2\2\u02c9\u02ca\7q\2\2\u02ca\u02cb\7p\2\2\u02cb\u02cc\7/\2\2"+ + "\u02cc\u02cd\7u\2\2\u02cd\u02ce\7g\2\2\u02ce\u02cf\7c\2\2\u02cf\u02d0"+ + "\7n\2\2\u02d0\u02d1\7g\2\2\u02d1\u02d2\7f\2\2\u02d2\u0086\3\2\2\2\u02d3"+ + "\u02e1\7\62\2\2\u02d4\u02de\t\2\2\2\u02d5\u02d7\5\u010b\u0086\2\u02d6"+ + "\u02d5\3\2\2\2\u02d6\u02d7\3\2\2\2\u02d7\u02df\3\2\2\2\u02d8\u02da\7a"+ + "\2\2\u02d9\u02d8\3\2\2\2\u02da\u02db\3\2\2\2\u02db\u02d9\3\2\2\2\u02db"+ + "\u02dc\3\2\2\2\u02dc\u02dd\3\2\2\2\u02dd\u02df\5\u010b\u0086\2\u02de\u02d6"+ + "\3\2\2\2\u02de\u02d9\3\2\2\2\u02df\u02e1\3\2\2\2\u02e0\u02d3\3\2\2\2\u02e0"+ + "\u02d4\3\2\2\2\u02e1\u02e3\3\2\2\2\u02e2\u02e4\t\3\2\2\u02e3\u02e2\3\2"+ + "\2\2\u02e3\u02e4\3\2\2\2\u02e4\u0088\3\2\2\2\u02e5\u02e6\7\62\2\2\u02e6"+ + "\u02e7\t\4\2\2\u02e7\u02ef\t\5\2\2\u02e8\u02ea\t\6\2\2\u02e9\u02e8\3\2"+ + "\2\2\u02ea\u02ed\3\2\2\2\u02eb\u02e9\3\2\2\2\u02eb\u02ec\3\2\2\2\u02ec"+ + "\u02ee\3\2\2\2\u02ed\u02eb\3\2\2\2\u02ee\u02f0\t\5\2\2\u02ef\u02eb\3\2"+ + "\2\2\u02ef\u02f0\3\2\2\2\u02f0\u02f2\3\2\2\2\u02f1\u02f3\t\3\2\2\u02f2"+ + "\u02f1\3\2\2\2\u02f2\u02f3\3\2\2\2\u02f3\u008a\3\2\2\2\u02f4\u02f8\7\62"+ + "\2\2\u02f5\u02f7\7a\2\2\u02f6\u02f5\3\2\2\2\u02f7\u02fa\3\2\2\2\u02f8"+ + "\u02f6\3\2\2\2\u02f8\u02f9\3\2\2\2\u02f9\u02fb\3\2\2\2\u02fa\u02f8\3\2"+ + "\2\2\u02fb\u0303\t\7\2\2\u02fc\u02fe\t\b\2\2\u02fd\u02fc\3\2\2\2\u02fe"+ + "\u0301\3\2\2\2\u02ff\u02fd\3\2\2\2\u02ff\u0300\3\2\2\2\u0300\u0302\3\2"+ + "\2\2\u0301\u02ff\3\2\2\2\u0302\u0304\t\7\2\2\u0303\u02ff\3\2\2\2\u0303"+ + "\u0304\3\2\2\2\u0304\u0306\3\2\2\2\u0305\u0307\t\3\2\2\u0306\u0305\3\2"+ + "\2\2\u0306\u0307\3\2\2\2\u0307\u008c\3\2\2\2\u0308\u0309\7\62\2\2\u0309"+ + "\u030a\t\t\2\2\u030a\u0312\t\n\2\2\u030b\u030d\t\13\2\2\u030c\u030b\3"+ + "\2\2\2\u030d\u0310\3\2\2\2\u030e\u030c\3\2\2\2\u030e\u030f\3\2\2\2\u030f"+ + "\u0311\3\2\2\2\u0310\u030e\3\2\2\2\u0311\u0313\t\n\2\2\u0312\u030e\3\2"+ + "\2\2\u0312\u0313\3\2\2\2\u0313\u0315\3\2\2\2\u0314\u0316\t\3\2\2\u0315"+ + "\u0314\3\2\2\2\u0315\u0316\3\2\2\2\u0316\u008e\3\2\2\2\u0317\u0318\5\u010b"+ + "\u0086\2\u0318\u031a\7\60\2\2\u0319\u031b\5\u010b\u0086\2\u031a\u0319"+ + "\3\2\2\2\u031a\u031b\3\2\2\2\u031b\u031f\3\2\2\2\u031c\u031d\7\60\2\2"+ + "\u031d\u031f\5\u010b\u0086\2\u031e\u0317\3\2\2\2\u031e\u031c\3\2\2\2\u031f"+ + "\u0321\3\2\2\2\u0320\u0322\5\u0103\u0082\2\u0321\u0320\3\2\2\2\u0321\u0322"+ + "\3\2\2\2\u0322\u0324\3\2\2\2\u0323\u0325\t\f\2\2\u0324\u0323\3\2\2\2\u0324"+ + "\u0325\3\2\2\2\u0325\u032f\3\2\2\2\u0326\u032c\5\u010b\u0086\2\u0327\u0329"+ + "\5\u0103\u0082\2\u0328\u032a\t\f\2\2\u0329\u0328\3\2\2\2\u0329\u032a\3"+ + "\2\2\2\u032a\u032d\3\2\2\2\u032b\u032d\t\f\2\2\u032c\u0327\3\2\2\2\u032c"+ + "\u032b\3\2\2\2\u032d\u032f\3\2\2\2\u032e\u031e\3\2\2\2\u032e\u0326\3\2"+ + "\2\2\u032f\u0090\3\2\2\2\u0330\u0331\7\62\2\2\u0331\u033b\t\4\2\2\u0332"+ + "\u0334\5\u0107\u0084\2\u0333\u0335\7\60\2\2\u0334\u0333\3\2\2\2\u0334"+ + "\u0335\3\2\2\2\u0335\u033c\3\2\2\2\u0336\u0338\5\u0107\u0084\2\u0337\u0336"+ + "\3\2\2\2\u0337\u0338\3\2\2\2\u0338\u0339\3\2\2\2\u0339\u033a\7\60\2\2"+ + "\u033a\u033c\5\u0107\u0084\2\u033b\u0332\3\2\2\2\u033b\u0337\3\2\2\2\u033c"+ + "\u033d\3\2\2\2\u033d\u033f\t\r\2\2\u033e\u0340\t\16\2\2\u033f\u033e\3"+ + "\2\2\2\u033f\u0340\3\2\2\2\u0340\u0341\3\2\2\2\u0341\u0343\5\u010b\u0086"+ + "\2\u0342\u0344\t\f\2\2\u0343\u0342\3\2\2\2\u0343\u0344\3\2\2\2\u0344\u0092"+ + "\3\2\2\2\u0345\u0346\7v\2\2\u0346\u0347\7t\2\2\u0347\u0348\7w\2\2\u0348"+ + "\u034f\7g\2\2\u0349\u034a\7h\2\2\u034a\u034b\7c\2\2\u034b\u034c\7n\2\2"+ + "\u034c\u034d\7u\2\2\u034d\u034f\7g\2\2\u034e\u0345\3\2\2\2\u034e\u0349"+ + "\3\2\2\2\u034f\u0094\3\2\2\2\u0350\u0353\7)\2\2\u0351\u0354\n\17\2\2\u0352"+ + "\u0354\5\u0105\u0083\2\u0353\u0351\3\2\2\2\u0353\u0352\3\2\2\2\u0354\u0355"+ + "\3\2\2\2\u0355\u0356\7)\2\2\u0356\u0096\3\2\2\2\u0357\u035c\7$\2\2\u0358"+ + "\u035b\n\20\2\2\u0359\u035b\5\u0105\u0083\2\u035a\u0358\3\2\2\2\u035a"+ + "\u0359\3\2\2\2\u035b\u035e\3\2\2\2\u035c\u035a\3\2\2\2\u035c\u035d\3\2"+ + "\2\2\u035d\u035f\3\2\2\2\u035e\u035c\3\2\2\2\u035f\u0360\7$\2\2\u0360"+ + "\u0098\3\2\2\2\u0361\u0362\7$\2\2\u0362\u0363\7$\2\2\u0363\u0364\7$\2"+ + "\2\u0364\u0368\3\2\2\2\u0365\u0367\t\21\2\2\u0366\u0365\3\2\2\2\u0367"+ + "\u036a\3\2\2\2\u0368\u0366\3\2\2\2\u0368\u0369\3\2\2\2\u0369\u036b\3\2"+ + "\2\2\u036a\u0368\3\2\2\2\u036b\u0370\t\22\2\2\u036c\u036f\13\2\2\2\u036d"+ + "\u036f\5\u0105\u0083\2\u036e\u036c\3\2\2\2\u036e\u036d\3\2\2\2\u036f\u0372"+ + "\3\2\2\2\u0370\u0371\3\2\2\2\u0370\u036e\3\2\2\2\u0371\u0373\3\2\2\2\u0372"+ + "\u0370\3\2\2\2\u0373\u0374\7$\2\2\u0374\u0375\7$\2\2\u0375\u0376\7$\2"+ + "\2\u0376\u009a\3\2\2\2\u0377\u0378\7p\2\2\u0378\u0379\7w\2\2\u0379\u037a"+ + "\7n\2\2\u037a\u037b\7n\2\2\u037b\u009c\3\2\2\2\u037c\u037d\7*\2\2\u037d"+ + "\u009e\3\2\2\2\u037e\u037f\7+\2\2\u037f\u00a0\3\2\2\2\u0380\u0381\7}\2"+ + "\2\u0381\u00a2\3\2\2\2\u0382\u0383\7\177\2\2\u0383\u00a4\3\2\2\2\u0384"+ + "\u0385\7]\2\2\u0385\u00a6\3\2\2\2\u0386\u0387\7_\2\2\u0387\u00a8\3\2\2"+ + "\2\u0388\u0389\7=\2\2\u0389\u00aa\3\2\2\2\u038a\u038b\7.\2\2\u038b\u00ac"+ + "\3\2\2\2\u038c\u038d\7\60\2\2\u038d\u00ae\3\2\2\2\u038e\u038f\7?\2\2\u038f"+ + "\u00b0\3\2\2\2\u0390\u0391\7@\2\2\u0391\u00b2\3\2\2\2\u0392\u0393\7>\2"+ + "\2\u0393\u00b4\3\2\2\2\u0394\u0395\7#\2\2\u0395\u00b6\3\2\2\2\u0396\u0397"+ + "\7\u0080\2\2\u0397\u00b8\3\2\2\2\u0398\u0399\7A\2\2\u0399\u00ba\3\2\2"+ + "\2\u039a\u039b\7<\2\2\u039b\u00bc\3\2\2\2\u039c\u039d\7?\2\2\u039d\u039e"+ + "\7?\2\2\u039e\u00be\3\2\2\2\u039f\u03a0\7>\2\2\u03a0\u03a1\7?\2\2\u03a1"+ + "\u00c0\3\2\2\2\u03a2\u03a3\7@\2\2\u03a3\u03a4\7?\2\2\u03a4\u00c2\3\2\2"+ + "\2\u03a5\u03a6\7#\2\2\u03a6\u03a7\7?\2\2\u03a7\u00c4\3\2\2\2\u03a8\u03a9"+ + "\7(\2\2\u03a9\u03aa\7(\2\2\u03aa\u00c6\3\2\2\2\u03ab\u03ac\7~\2\2\u03ac"+ + "\u03ad\7~\2\2\u03ad\u00c8\3\2\2\2\u03ae\u03af\7-\2\2\u03af\u03b0\7-\2"+ + "\2\u03b0\u00ca\3\2\2\2\u03b1\u03b2\7/\2\2\u03b2\u03b3\7/\2\2\u03b3\u00cc"+ + "\3\2\2\2\u03b4\u03b5\7-\2\2\u03b5\u00ce\3\2\2\2\u03b6\u03b7\7/\2\2\u03b7"+ + "\u00d0\3\2\2\2\u03b8\u03b9\7,\2\2\u03b9\u00d2\3\2\2\2\u03ba\u03bb\7\61"+ + "\2\2\u03bb\u00d4\3\2\2\2\u03bc\u03bd\7(\2\2\u03bd\u00d6\3\2\2\2\u03be"+ + "\u03bf\7~\2\2\u03bf\u00d8\3\2\2\2\u03c0\u03c1\7`\2\2\u03c1\u00da\3\2\2"+ + "\2\u03c2\u03c3\7\'\2\2\u03c3\u00dc\3\2\2\2\u03c4\u03c5\7-\2\2\u03c5\u03c6"+ + "\7?\2\2\u03c6\u00de\3\2\2\2\u03c7\u03c8\7/\2\2\u03c8\u03c9\7?\2\2\u03c9"+ + "\u00e0\3\2\2\2\u03ca\u03cb\7,\2\2\u03cb\u03cc\7?\2\2\u03cc\u00e2\3\2\2"+ + "\2\u03cd\u03ce\7\61\2\2\u03ce\u03cf\7?\2\2\u03cf\u00e4\3\2\2\2\u03d0\u03d1"+ + "\7(\2\2\u03d1\u03d2\7?\2\2\u03d2\u00e6\3\2\2\2\u03d3\u03d4\7~\2\2\u03d4"+ + "\u03d5\7?\2\2\u03d5\u00e8\3\2\2\2\u03d6\u03d7\7`\2\2\u03d7\u03d8\7?\2"+ + "\2\u03d8\u00ea\3\2\2\2\u03d9\u03da\7\'\2\2\u03da\u03db\7?\2\2\u03db\u00ec"+ + "\3\2\2\2\u03dc\u03dd\7>\2\2\u03dd\u03de\7>\2\2\u03de\u03df\7?\2\2\u03df"+ + "\u00ee\3\2\2\2\u03e0\u03e1\7@\2\2\u03e1\u03e2\7@\2\2\u03e2\u03e3\7?\2"+ + "\2\u03e3\u00f0\3\2\2\2\u03e4\u03e5\7@\2\2\u03e5\u03e6\7@\2\2\u03e6\u03e7"+ + "\7@\2\2\u03e7\u03e8\7?\2\2\u03e8\u00f2\3\2\2\2\u03e9\u03ea\7/\2\2\u03ea"+ + "\u03eb\7@\2\2\u03eb\u00f4\3\2\2\2\u03ec\u03ed\7<\2\2\u03ed\u03ee\7<\2"+ + "\2\u03ee\u00f6\3\2\2\2\u03ef\u03f0\7B\2\2\u03f0\u00f8\3\2\2\2\u03f1\u03f2"+ + "\7\60\2\2\u03f2\u03f3\7\60\2\2\u03f3\u03f4\7\60\2\2\u03f4\u00fa\3\2\2"+ + "\2\u03f5\u03f7\t\23\2\2\u03f6\u03f5\3\2\2\2\u03f7\u03f8\3\2\2\2\u03f8"+ + "\u03f6\3\2\2\2\u03f8\u03f9\3\2\2\2\u03f9\u03fa\3\2\2\2\u03fa\u03fb\b~"+ + "\2\2\u03fb\u00fc\3\2\2\2\u03fc\u03fd\7\61\2\2\u03fd\u03fe\7,\2\2\u03fe"+ + "\u0402\3\2\2\2\u03ff\u0401\13\2\2\2\u0400\u03ff\3\2\2\2\u0401\u0404\3"+ + "\2\2\2\u0402\u0403\3\2\2\2\u0402\u0400\3\2\2\2\u0403\u0405\3\2\2\2\u0404"+ + "\u0402\3\2\2\2\u0405\u0406\7,\2\2\u0406\u0407\7\61\2\2\u0407\u0408\3\2"+ + "\2\2\u0408\u0409\b\177\2\2\u0409\u00fe\3\2\2\2\u040a\u040b\7\61\2\2\u040b"+ + "\u040c\7\61\2\2\u040c\u0410\3\2\2\2\u040d\u040f\n\22\2\2\u040e\u040d\3"+ + "\2\2\2\u040f\u0412\3\2\2\2\u0410\u040e\3\2\2\2\u0410\u0411\3\2\2\2\u0411"+ + "\u0413\3\2\2\2\u0412\u0410\3\2\2\2\u0413\u0414\b\u0080\2\2\u0414\u0100"+ + "\3\2\2\2\u0415\u0419\5\u010f\u0088\2\u0416\u0418\5\u010d\u0087\2\u0417"+ + "\u0416\3\2\2\2\u0418\u041b\3\2\2\2\u0419\u0417\3\2\2\2\u0419\u041a\3\2"+ + "\2\2\u041a\u0102\3\2\2\2\u041b\u0419\3\2\2\2\u041c\u041e\t\24\2\2\u041d"+ + "\u041f\t\16\2\2\u041e\u041d\3\2\2\2\u041e\u041f\3\2\2\2\u041f\u0420\3"+ + "\2\2\2\u0420\u0421\5\u010b\u0086\2\u0421\u0104\3\2\2\2\u0422\u0428\7^"+ + "\2\2\u0423\u0424\7w\2\2\u0424\u0425\7\62\2\2\u0425\u0426\7\62\2\2\u0426"+ + "\u0427\7\67\2\2\u0427\u0429\7e\2\2\u0428\u0423\3\2\2\2\u0428\u0429\3\2"+ + "\2\2\u0429\u042a\3\2\2\2\u042a\u0446\t\25\2\2\u042b\u0431\7^\2\2\u042c"+ + "\u042d\7w\2\2\u042d\u042e\7\62\2\2\u042e\u042f\7\62\2\2\u042f\u0430\7"+ + "\67\2\2\u0430\u0432\7e\2\2\u0431\u042c\3\2\2\2\u0431\u0432\3\2\2\2\u0432"+ + "\u0437\3\2\2\2\u0433\u0435\t\26\2\2\u0434\u0433\3\2\2\2\u0434\u0435\3"+ + "\2\2\2\u0435\u0436\3\2\2\2\u0436\u0438\t\7\2\2\u0437\u0434\3\2\2\2\u0437"+ + "\u0438\3\2\2\2\u0438\u0439\3\2\2\2\u0439\u0446\t\7\2\2\u043a\u043c\7^"+ + "\2\2\u043b\u043d\7w\2\2\u043c\u043b\3\2\2\2\u043d\u043e\3\2\2\2\u043e"+ + "\u043c\3\2\2\2\u043e\u043f\3\2\2\2\u043f\u0440\3\2\2\2\u0440\u0441\5\u0109"+ + "\u0085\2\u0441\u0442\5\u0109\u0085\2\u0442\u0443\5\u0109\u0085\2\u0443"+ + "\u0444\5\u0109\u0085\2\u0444\u0446\3\2\2\2\u0445\u0422\3\2\2\2\u0445\u042b"+ + "\3\2\2\2\u0445\u043a\3\2\2\2\u0446\u0106\3\2\2\2\u0447\u0450\5\u0109\u0085"+ + "\2\u0448\u044b\5\u0109\u0085\2\u0449\u044b\7a\2\2\u044a\u0448\3\2\2\2"+ + "\u044a\u0449\3\2\2\2\u044b\u044e\3\2\2\2\u044c\u044a\3\2\2\2\u044c\u044d"+ + "\3\2\2\2\u044d\u044f\3\2\2\2\u044e\u044c\3\2\2\2\u044f\u0451\5\u0109\u0085"+ + "\2\u0450\u044c\3\2\2\2\u0450\u0451\3\2\2\2\u0451\u0108\3\2\2\2\u0452\u0453"+ + "\t\5\2\2\u0453\u010a\3\2\2\2\u0454\u045c\t\27\2\2\u0455\u0457\t\30\2\2"+ + "\u0456\u0455\3\2\2\2\u0457\u045a\3\2\2\2\u0458\u0456\3\2\2\2\u0458\u0459"+ + "\3\2\2\2\u0459\u045b\3\2\2\2\u045a\u0458\3\2\2\2\u045b\u045d\t\27\2\2"+ + "\u045c\u0458\3\2\2\2\u045c\u045d\3\2\2\2\u045d\u010c\3\2\2\2\u045e\u0461"+ + "\5\u010f\u0088\2\u045f\u0461\t\27\2\2\u0460\u045e\3\2\2\2\u0460\u045f"+ + "\3\2\2\2\u0461\u010e\3\2\2\2\u0462\u0467\t\31\2\2\u0463\u0467\n\32\2\2"+ + "\u0464\u0465\t\33\2\2\u0465\u0467\t\34\2\2\u0466\u0462\3\2\2\2\u0466\u0463"+ + "\3\2\2\2\u0466\u0464\3\2\2\2\u0467\u0110\3\2\2\2\67\2\u02d6\u02db\u02de"+ + "\u02e0\u02e3\u02eb\u02ef\u02f2\u02f8\u02ff\u0303\u0306\u030e\u0312\u0315"+ + "\u031a\u031e\u0321\u0324\u0329\u032c\u032e\u0334\u0337\u033b\u033f\u0343"+ + "\u034e\u0353\u035a\u035c\u0368\u036e\u0370\u03f8\u0402\u0410\u0419\u041e"+ + "\u0428\u0431\u0434\u0437\u043e\u0445\u044a\u044c\u0450\u0458\u045c\u0460"+ + "\u0466\3\2\3\2"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/src/main/java/grammar/JavaLexer.tokens b/src/main/java/grammar/JavaLexer.tokens new file mode 100644 index 00000000..f811013a --- /dev/null +++ b/src/main/java/grammar/JavaLexer.tokens @@ -0,0 +1,242 @@ +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 +'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 +'null'=77 +'('=78 +')'=79 +'{'=80 +'}'=81 +'['=82 +']'=83 +';'=84 +','=85 +'.'=86 +'='=87 +'>'=88 +'<'=89 +'!'=90 +'~'=91 +'?'=92 +':'=93 +'=='=94 +'<='=95 +'>='=96 +'!='=97 +'&&'=98 +'||'=99 +'++'=100 +'--'=101 +'+'=102 +'-'=103 +'*'=104 +'/'=105 +'&'=106 +'|'=107 +'^'=108 +'%'=109 +'+='=110 +'-='=111 +'*='=112 +'/='=113 +'&='=114 +'|='=115 +'^='=116 +'%='=117 +'<<='=118 +'>>='=119 +'>>>='=120 +'->'=121 +'::'=122 +'@'=123 +'...'=124 diff --git a/src/main/java/grammar/JavaParser.java b/src/main/java/grammar/JavaParser.java new file mode 100644 index 00000000..c79b378e --- /dev/null +++ b/src/main/java/grammar/JavaParser.java @@ -0,0 +1,11503 @@ +// Generated from JavaParser.g4 by ANTLR 4.5 +package grammar; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.misc.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; +import java.util.Iterator; +import java.util.ArrayList; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class JavaParser extends Parser { + static { RuntimeMetaData.checkVersion("4.5", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + 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; + public static final int + 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; + public static final String[] 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" + }; + + private static final String[] _LITERAL_NAMES = { + null, "'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, null, null, null, null, null, null, + null, null, null, "'null'", "'('", "')'", "'{'", "'}'", "'['", "']'", + "';'", "','", "'.'", "'='", "'>'", "'<'", "'!'", "'~'", "'?'", "':'", + "'=='", "'<='", "'>='", "'!='", "'&&'", "'||'", "'++'", "'--'", "'+'", + "'-'", "'*'", "'/'", "'&'", "'|'", "'^'", "'%'", "'+='", "'-='", "'*='", + "'/='", "'&='", "'|='", "'^='", "'%='", "'<<='", "'>>='", "'>>>='", "'->'", + "'::'", "'@'", "'...'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, "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" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + @Override + public String getGrammarFileName() { return "JavaParser.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public JavaParser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + public static class CompilationUnitContext extends ParserRuleContext { + public PackageDeclarationContext packageDeclaration() { + return getRuleContext(PackageDeclarationContext.class,0); + } + public List importDeclaration() { + return getRuleContexts(ImportDeclarationContext.class); + } + public ImportDeclarationContext importDeclaration(int i) { + return getRuleContext(ImportDeclarationContext.class,i); + } + public List typeDeclaration() { + return getRuleContexts(TypeDeclarationContext.class); + } + public TypeDeclarationContext typeDeclaration(int i) { + return getRuleContext(TypeDeclarationContext.class,i); + } + public ModuleDeclarationContext moduleDeclaration() { + return getRuleContext(ModuleDeclarationContext.class,0); + } + public TerminalNode EOF() { return getToken(JavaParser.EOF, 0); } + public CompilationUnitContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_compilationUnit; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterCompilationUnit(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitCompilationUnit(this); + } + } + + public final CompilationUnitContext compilationUnit() throws RecognitionException { + CompilationUnitContext _localctx = new CompilationUnitContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_compilationUnit); + int _la; + try { + int _alt; + setState(272); + switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(253); + switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) { + case 1: + { + setState(252); + packageDeclaration(); + } + break; + } + setState(259); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,2,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + setState(257); + switch (_input.LA(1)) { + case IMPORT: + { + setState(255); + importDeclaration(); + } + break; + case SEMI: + { + setState(256); + match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + setState(261); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,2,_ctx); + } + setState(266); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 1)) & ~0x3f) == 0 && ((1L << (_la - 1)) & ((1L << (ABSTRACT - 1)) | (1L << (CLASS - 1)) | (1L << (ENUM - 1)) | (1L << (FINAL - 1)) | (1L << (INTERFACE - 1)) | (1L << (PRIVATE - 1)) | (1L << (PROTECTED - 1)) | (1L << (PUBLIC - 1)) | (1L << (STATIC - 1)) | (1L << (STRICTFP - 1)) | (1L << (MODULE - 1)) | (1L << (OPEN - 1)) | (1L << (REQUIRES - 1)) | (1L << (EXPORTS - 1)) | (1L << (OPENS - 1)) | (1L << (TO - 1)) | (1L << (USES - 1)) | (1L << (PROVIDES - 1)) | (1L << (WITH - 1)) | (1L << (TRANSITIVE - 1)) | (1L << (VAR - 1)) | (1L << (YIELD - 1)) | (1L << (RECORD - 1)) | (1L << (SEALED - 1)))) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (PERMITS - 65)) | (1L << (NON_SEALED - 65)) | (1L << (SEMI - 65)) | (1L << (AT - 65)) | (1L << (IDENTIFIER - 65)))) != 0)) { + { + setState(264); + switch (_input.LA(1)) { + case ABSTRACT: + case CLASS: + case ENUM: + case FINAL: + case INTERFACE: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case STATIC: + case STRICTFP: + case MODULE: + case OPEN: + case REQUIRES: + case EXPORTS: + case OPENS: + case TO: + case USES: + case PROVIDES: + case WITH: + case TRANSITIVE: + case VAR: + case YIELD: + case RECORD: + case SEALED: + case PERMITS: + case NON_SEALED: + case AT: + case IDENTIFIER: + { + setState(262); + typeDeclaration(); + } + break; + case SEMI: + { + setState(263); + match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } + } + setState(268); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(269); + moduleDeclaration(); + setState(270); + match(EOF); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PackageDeclarationContext extends ParserRuleContext { + public TerminalNode PACKAGE() { return getToken(JavaParser.PACKAGE, 0); } + public QualifiedNameContext qualifiedName() { + return getRuleContext(QualifiedNameContext.class,0); + } + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public PackageDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_packageDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterPackageDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitPackageDeclaration(this); + } + } + + public final PackageDeclarationContext packageDeclaration() throws RecognitionException { + PackageDeclarationContext _localctx = new PackageDeclarationContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_packageDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(277); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 51)) & ~0x3f) == 0 && ((1L << (_la - 51)) & ((1L << (MODULE - 51)) | (1L << (OPEN - 51)) | (1L << (REQUIRES - 51)) | (1L << (EXPORTS - 51)) | (1L << (OPENS - 51)) | (1L << (TO - 51)) | (1L << (USES - 51)) | (1L << (PROVIDES - 51)) | (1L << (WITH - 51)) | (1L << (TRANSITIVE - 51)) | (1L << (VAR - 51)) | (1L << (YIELD - 51)) | (1L << (RECORD - 51)) | (1L << (SEALED - 51)) | (1L << (PERMITS - 51)))) != 0) || _la==AT || _la==IDENTIFIER) { + { + { + setState(274); + annotation(); + } + } + setState(279); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(280); + match(PACKAGE); + setState(281); + qualifiedName(); + setState(282); + match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImportDeclarationContext extends ParserRuleContext { + public TerminalNode IMPORT() { return getToken(JavaParser.IMPORT, 0); } + public QualifiedNameContext qualifiedName() { + return getRuleContext(QualifiedNameContext.class,0); + } + public TerminalNode STATIC() { return getToken(JavaParser.STATIC, 0); } + public ImportDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_importDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterImportDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitImportDeclaration(this); + } + } + + public final ImportDeclarationContext importDeclaration() throws RecognitionException { + ImportDeclarationContext _localctx = new ImportDeclarationContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_importDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(284); + match(IMPORT); + setState(286); + _la = _input.LA(1); + if (_la==STATIC) { + { + setState(285); + match(STATIC); + } + } + + setState(288); + qualifiedName(); + setState(291); + _la = _input.LA(1); + if (_la==DOT) { + { + setState(289); + match(DOT); + setState(290); + match(MUL); + } + } + + setState(293); + match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeDeclarationContext extends ParserRuleContext { + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public RecordDeclarationContext recordDeclaration() { + return getRuleContext(RecordDeclarationContext.class,0); + } + public List classOrInterfaceModifier() { + return getRuleContexts(ClassOrInterfaceModifierContext.class); + } + public ClassOrInterfaceModifierContext classOrInterfaceModifier(int i) { + return getRuleContext(ClassOrInterfaceModifierContext.class,i); + } + public TypeDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterTypeDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitTypeDeclaration(this); + } + } + + public final TypeDeclarationContext typeDeclaration() throws RecognitionException { + TypeDeclarationContext _localctx = new TypeDeclarationContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_typeDeclaration); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(298); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,9,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(295); + classOrInterfaceModifier(); + } + } + } + setState(300); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,9,_ctx); + } + setState(306); + switch (_input.LA(1)) { + case CLASS: + { + setState(301); + classDeclaration(); + } + break; + case ENUM: + { + setState(302); + enumDeclaration(); + } + break; + case INTERFACE: + { + setState(303); + interfaceDeclaration(); + } + break; + case AT: + { + setState(304); + annotationTypeDeclaration(); + } + break; + case RECORD: + { + setState(305); + recordDeclaration(); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ModifierContext extends ParserRuleContext { + public ClassOrInterfaceModifierContext classOrInterfaceModifier() { + return getRuleContext(ClassOrInterfaceModifierContext.class,0); + } + public TerminalNode NATIVE() { return getToken(JavaParser.NATIVE, 0); } + public TerminalNode SYNCHRONIZED() { return getToken(JavaParser.SYNCHRONIZED, 0); } + public TerminalNode TRANSIENT() { return getToken(JavaParser.TRANSIENT, 0); } + public TerminalNode VOLATILE() { return getToken(JavaParser.VOLATILE, 0); } + public ModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_modifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitModifier(this); + } + } + + public final ModifierContext modifier() throws RecognitionException { + ModifierContext _localctx = new ModifierContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_modifier); + try { + setState(313); + switch (_input.LA(1)) { + case ABSTRACT: + case FINAL: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case STATIC: + case STRICTFP: + case MODULE: + case OPEN: + case REQUIRES: + case EXPORTS: + case OPENS: + case TO: + case USES: + case PROVIDES: + case WITH: + case TRANSITIVE: + case VAR: + case YIELD: + case RECORD: + case SEALED: + case PERMITS: + case NON_SEALED: + case AT: + case IDENTIFIER: + enterOuterAlt(_localctx, 1); + { + setState(308); + classOrInterfaceModifier(); + } + break; + case NATIVE: + enterOuterAlt(_localctx, 2); + { + setState(309); + match(NATIVE); + } + break; + case SYNCHRONIZED: + enterOuterAlt(_localctx, 3); + { + setState(310); + match(SYNCHRONIZED); + } + break; + case TRANSIENT: + enterOuterAlt(_localctx, 4); + { + setState(311); + match(TRANSIENT); + } + break; + case VOLATILE: + enterOuterAlt(_localctx, 5); + { + setState(312); + match(VOLATILE); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassOrInterfaceModifierContext extends ParserRuleContext { + public AnnotationContext annotation() { + return getRuleContext(AnnotationContext.class,0); + } + public TerminalNode PUBLIC() { return getToken(JavaParser.PUBLIC, 0); } + public TerminalNode PROTECTED() { return getToken(JavaParser.PROTECTED, 0); } + public TerminalNode PRIVATE() { return getToken(JavaParser.PRIVATE, 0); } + public TerminalNode STATIC() { return getToken(JavaParser.STATIC, 0); } + public TerminalNode ABSTRACT() { return getToken(JavaParser.ABSTRACT, 0); } + public TerminalNode FINAL() { return getToken(JavaParser.FINAL, 0); } + public TerminalNode STRICTFP() { return getToken(JavaParser.STRICTFP, 0); } + public TerminalNode SEALED() { return getToken(JavaParser.SEALED, 0); } + public TerminalNode NON_SEALED() { return getToken(JavaParser.NON_SEALED, 0); } + public ClassOrInterfaceModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classOrInterfaceModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterClassOrInterfaceModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitClassOrInterfaceModifier(this); + } + } + + public final ClassOrInterfaceModifierContext classOrInterfaceModifier() throws RecognitionException { + ClassOrInterfaceModifierContext _localctx = new ClassOrInterfaceModifierContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_classOrInterfaceModifier); + try { + setState(325); + switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(315); + annotation(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(316); + match(PUBLIC); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(317); + match(PROTECTED); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(318); + match(PRIVATE); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(319); + match(STATIC); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(320); + match(ABSTRACT); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(321); + match(FINAL); + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(322); + match(STRICTFP); + } + break; + case 9: + enterOuterAlt(_localctx, 9); + { + setState(323); + match(SEALED); + } + break; + case 10: + enterOuterAlt(_localctx, 10); + { + setState(324); + match(NON_SEALED); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableModifierContext extends ParserRuleContext { + public TerminalNode FINAL() { return getToken(JavaParser.FINAL, 0); } + public AnnotationContext annotation() { + return getRuleContext(AnnotationContext.class,0); + } + public VariableModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterVariableModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitVariableModifier(this); + } + } + + public final VariableModifierContext variableModifier() throws RecognitionException { + VariableModifierContext _localctx = new VariableModifierContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_variableModifier); + try { + setState(329); + switch (_input.LA(1)) { + case FINAL: + enterOuterAlt(_localctx, 1); + { + setState(327); + match(FINAL); + } + break; + case MODULE: + case OPEN: + case REQUIRES: + case EXPORTS: + case OPENS: + case TO: + case USES: + case PROVIDES: + case WITH: + case TRANSITIVE: + case VAR: + case YIELD: + case RECORD: + case SEALED: + case PERMITS: + case AT: + case IDENTIFIER: + enterOuterAlt(_localctx, 2); + { + setState(328); + annotation(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassDeclarationContext extends ParserRuleContext { + public TerminalNode CLASS() { return getToken(JavaParser.CLASS, 0); } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public TerminalNode EXTENDS() { return getToken(JavaParser.EXTENDS, 0); } + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public TerminalNode IMPLEMENTS() { return getToken(JavaParser.IMPLEMENTS, 0); } + public List typeList() { + return getRuleContexts(TypeListContext.class); + } + public TypeListContext typeList(int i) { + return getRuleContext(TypeListContext.class,i); + } + public TerminalNode PERMITS() { return getToken(JavaParser.PERMITS, 0); } + public ClassDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterClassDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitClassDeclaration(this); + } + } + + public final ClassDeclarationContext classDeclaration() throws RecognitionException { + ClassDeclarationContext _localctx = new ClassDeclarationContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_classDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(331); + match(CLASS); + setState(332); + identifier(); + setState(334); + _la = _input.LA(1); + if (_la==LT) { + { + setState(333); + typeParameters(); + } + } + + setState(338); + _la = _input.LA(1); + if (_la==EXTENDS) { + { + setState(336); + match(EXTENDS); + setState(337); + typeType(); + } + } + + setState(342); + _la = _input.LA(1); + if (_la==IMPLEMENTS) { + { + setState(340); + match(IMPLEMENTS); + setState(341); + typeList(); + } + } + + setState(346); + _la = _input.LA(1); + if (_la==PERMITS) { + { + setState(344); + match(PERMITS); + setState(345); + typeList(); + } + } + + setState(348); + classBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParametersContext extends ParserRuleContext { + public List typeParameter() { + return getRuleContexts(TypeParameterContext.class); + } + public TypeParameterContext typeParameter(int i) { + return getRuleContext(TypeParameterContext.class,i); + } + public TypeParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterTypeParameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitTypeParameters(this); + } + } + + public final TypeParametersContext typeParameters() throws RecognitionException { + TypeParametersContext _localctx = new TypeParametersContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_typeParameters); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(350); + match(LT); + setState(351); + typeParameter(); + setState(356); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(352); + match(COMMA); + setState(353); + typeParameter(); + } + } + setState(358); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(359); + match(GT); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParameterContext extends ParserRuleContext { + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public TerminalNode EXTENDS() { return getToken(JavaParser.EXTENDS, 0); } + public TypeBoundContext typeBound() { + return getRuleContext(TypeBoundContext.class,0); + } + public TypeParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterTypeParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitTypeParameter(this); + } + } + + public final TypeParameterContext typeParameter() throws RecognitionException { + TypeParameterContext _localctx = new TypeParameterContext(_ctx, getState()); + enterRule(_localctx, 18, RULE_typeParameter); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(364); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,19,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(361); + annotation(); + } + } + } + setState(366); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,19,_ctx); + } + setState(367); + identifier(); + setState(376); + _la = _input.LA(1); + if (_la==EXTENDS) { + { + setState(368); + match(EXTENDS); + setState(372); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,20,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(369); + annotation(); + } + } + } + setState(374); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,20,_ctx); + } + setState(375); + typeBound(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeBoundContext extends ParserRuleContext { + public List typeType() { + return getRuleContexts(TypeTypeContext.class); + } + public TypeTypeContext typeType(int i) { + return getRuleContext(TypeTypeContext.class,i); + } + public TypeBoundContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeBound; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterTypeBound(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitTypeBound(this); + } + } + + public final TypeBoundContext typeBound() throws RecognitionException { + TypeBoundContext _localctx = new TypeBoundContext(_ctx, getState()); + enterRule(_localctx, 20, RULE_typeBound); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(378); + typeType(); + setState(383); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==BITAND) { + { + { + setState(379); + match(BITAND); + setState(380); + typeType(); + } + } + setState(385); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumDeclarationContext extends ParserRuleContext { + public TerminalNode ENUM() { return getToken(JavaParser.ENUM, 0); } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public TerminalNode IMPLEMENTS() { return getToken(JavaParser.IMPLEMENTS, 0); } + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public EnumConstantsContext enumConstants() { + return getRuleContext(EnumConstantsContext.class,0); + } + public EnumBodyDeclarationsContext enumBodyDeclarations() { + return getRuleContext(EnumBodyDeclarationsContext.class,0); + } + public EnumDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterEnumDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitEnumDeclaration(this); + } + } + + public final EnumDeclarationContext enumDeclaration() throws RecognitionException { + EnumDeclarationContext _localctx = new EnumDeclarationContext(_ctx, getState()); + enterRule(_localctx, 22, RULE_enumDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(386); + match(ENUM); + setState(387); + identifier(); + setState(390); + _la = _input.LA(1); + if (_la==IMPLEMENTS) { + { + setState(388); + match(IMPLEMENTS); + setState(389); + typeList(); + } + } + + setState(392); + match(LBRACE); + setState(394); + _la = _input.LA(1); + if (((((_la - 51)) & ~0x3f) == 0 && ((1L << (_la - 51)) & ((1L << (MODULE - 51)) | (1L << (OPEN - 51)) | (1L << (REQUIRES - 51)) | (1L << (EXPORTS - 51)) | (1L << (OPENS - 51)) | (1L << (TO - 51)) | (1L << (USES - 51)) | (1L << (PROVIDES - 51)) | (1L << (WITH - 51)) | (1L << (TRANSITIVE - 51)) | (1L << (VAR - 51)) | (1L << (YIELD - 51)) | (1L << (RECORD - 51)) | (1L << (SEALED - 51)) | (1L << (PERMITS - 51)))) != 0) || _la==AT || _la==IDENTIFIER) { + { + setState(393); + enumConstants(); + } + } + + setState(397); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(396); + match(COMMA); + } + } + + setState(400); + _la = _input.LA(1); + if (_la==SEMI) { + { + setState(399); + enumBodyDeclarations(); + } + } + + setState(402); + match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumConstantsContext extends ParserRuleContext { + public List enumConstant() { + return getRuleContexts(EnumConstantContext.class); + } + public EnumConstantContext enumConstant(int i) { + return getRuleContext(EnumConstantContext.class,i); + } + public EnumConstantsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumConstants; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterEnumConstants(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitEnumConstants(this); + } + } + + public final EnumConstantsContext enumConstants() throws RecognitionException { + EnumConstantsContext _localctx = new EnumConstantsContext(_ctx, getState()); + enterRule(_localctx, 24, RULE_enumConstants); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(404); + enumConstant(); + setState(409); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,27,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(405); + match(COMMA); + setState(406); + enumConstant(); + } + } + } + setState(411); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,27,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumConstantContext extends ParserRuleContext { + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public EnumConstantContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumConstant; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterEnumConstant(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitEnumConstant(this); + } + } + + public final EnumConstantContext enumConstant() throws RecognitionException { + EnumConstantContext _localctx = new EnumConstantContext(_ctx, getState()); + enterRule(_localctx, 26, RULE_enumConstant); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(415); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,28,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(412); + annotation(); + } + } + } + setState(417); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,28,_ctx); + } + setState(418); + identifier(); + setState(420); + _la = _input.LA(1); + if (_la==LPAREN) { + { + setState(419); + arguments(); + } + } + + setState(423); + _la = _input.LA(1); + if (_la==LBRACE) { + { + setState(422); + classBody(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumBodyDeclarationsContext extends ParserRuleContext { + public List classBodyDeclaration() { + return getRuleContexts(ClassBodyDeclarationContext.class); + } + public ClassBodyDeclarationContext classBodyDeclaration(int i) { + return getRuleContext(ClassBodyDeclarationContext.class,i); + } + public EnumBodyDeclarationsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumBodyDeclarations; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterEnumBodyDeclarations(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitEnumBodyDeclarations(this); + } + } + + public final EnumBodyDeclarationsContext enumBodyDeclarations() throws RecognitionException { + EnumBodyDeclarationsContext _localctx = new EnumBodyDeclarationsContext(_ctx, getState()); + enterRule(_localctx, 28, RULE_enumBodyDeclarations); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(425); + match(SEMI); + setState(429); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 1)) & ~0x3f) == 0 && ((1L << (_la - 1)) & ((1L << (ABSTRACT - 1)) | (1L << (BOOLEAN - 1)) | (1L << (BYTE - 1)) | (1L << (CHAR - 1)) | (1L << (CLASS - 1)) | (1L << (DOUBLE - 1)) | (1L << (ENUM - 1)) | (1L << (FINAL - 1)) | (1L << (FLOAT - 1)) | (1L << (INT - 1)) | (1L << (INTERFACE - 1)) | (1L << (LONG - 1)) | (1L << (NATIVE - 1)) | (1L << (PRIVATE - 1)) | (1L << (PROTECTED - 1)) | (1L << (PUBLIC - 1)) | (1L << (SHORT - 1)) | (1L << (STATIC - 1)) | (1L << (STRICTFP - 1)) | (1L << (SYNCHRONIZED - 1)) | (1L << (TRANSIENT - 1)) | (1L << (VOID - 1)) | (1L << (VOLATILE - 1)) | (1L << (MODULE - 1)) | (1L << (OPEN - 1)) | (1L << (REQUIRES - 1)) | (1L << (EXPORTS - 1)) | (1L << (OPENS - 1)) | (1L << (TO - 1)) | (1L << (USES - 1)) | (1L << (PROVIDES - 1)) | (1L << (WITH - 1)) | (1L << (TRANSITIVE - 1)) | (1L << (VAR - 1)) | (1L << (YIELD - 1)) | (1L << (RECORD - 1)) | (1L << (SEALED - 1)))) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (PERMITS - 65)) | (1L << (NON_SEALED - 65)) | (1L << (LBRACE - 65)) | (1L << (SEMI - 65)) | (1L << (LT - 65)) | (1L << (AT - 65)) | (1L << (IDENTIFIER - 65)))) != 0)) { + { + { + setState(426); + classBodyDeclaration(); + } + } + setState(431); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceDeclarationContext extends ParserRuleContext { + public TerminalNode INTERFACE() { return getToken(JavaParser.INTERFACE, 0); } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public InterfaceBodyContext interfaceBody() { + return getRuleContext(InterfaceBodyContext.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public TerminalNode EXTENDS() { return getToken(JavaParser.EXTENDS, 0); } + public List typeList() { + return getRuleContexts(TypeListContext.class); + } + public TypeListContext typeList(int i) { + return getRuleContext(TypeListContext.class,i); + } + public TerminalNode PERMITS() { return getToken(JavaParser.PERMITS, 0); } + public InterfaceDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterInterfaceDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitInterfaceDeclaration(this); + } + } + + public final InterfaceDeclarationContext interfaceDeclaration() throws RecognitionException { + InterfaceDeclarationContext _localctx = new InterfaceDeclarationContext(_ctx, getState()); + enterRule(_localctx, 30, RULE_interfaceDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(432); + match(INTERFACE); + setState(433); + identifier(); + setState(435); + _la = _input.LA(1); + if (_la==LT) { + { + setState(434); + typeParameters(); + } + } + + setState(439); + _la = _input.LA(1); + if (_la==EXTENDS) { + { + setState(437); + match(EXTENDS); + setState(438); + typeList(); + } + } + + setState(443); + _la = _input.LA(1); + if (_la==PERMITS) { + { + setState(441); + match(PERMITS); + setState(442); + typeList(); + } + } + + setState(445); + interfaceBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassBodyContext extends ParserRuleContext { + public List classBodyDeclaration() { + return getRuleContexts(ClassBodyDeclarationContext.class); + } + public ClassBodyDeclarationContext classBodyDeclaration(int i) { + return getRuleContext(ClassBodyDeclarationContext.class,i); + } + public ClassBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterClassBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitClassBody(this); + } + } + + public final ClassBodyContext classBody() throws RecognitionException { + ClassBodyContext _localctx = new ClassBodyContext(_ctx, getState()); + enterRule(_localctx, 32, RULE_classBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(447); + match(LBRACE); + setState(451); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 1)) & ~0x3f) == 0 && ((1L << (_la - 1)) & ((1L << (ABSTRACT - 1)) | (1L << (BOOLEAN - 1)) | (1L << (BYTE - 1)) | (1L << (CHAR - 1)) | (1L << (CLASS - 1)) | (1L << (DOUBLE - 1)) | (1L << (ENUM - 1)) | (1L << (FINAL - 1)) | (1L << (FLOAT - 1)) | (1L << (INT - 1)) | (1L << (INTERFACE - 1)) | (1L << (LONG - 1)) | (1L << (NATIVE - 1)) | (1L << (PRIVATE - 1)) | (1L << (PROTECTED - 1)) | (1L << (PUBLIC - 1)) | (1L << (SHORT - 1)) | (1L << (STATIC - 1)) | (1L << (STRICTFP - 1)) | (1L << (SYNCHRONIZED - 1)) | (1L << (TRANSIENT - 1)) | (1L << (VOID - 1)) | (1L << (VOLATILE - 1)) | (1L << (MODULE - 1)) | (1L << (OPEN - 1)) | (1L << (REQUIRES - 1)) | (1L << (EXPORTS - 1)) | (1L << (OPENS - 1)) | (1L << (TO - 1)) | (1L << (USES - 1)) | (1L << (PROVIDES - 1)) | (1L << (WITH - 1)) | (1L << (TRANSITIVE - 1)) | (1L << (VAR - 1)) | (1L << (YIELD - 1)) | (1L << (RECORD - 1)) | (1L << (SEALED - 1)))) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (PERMITS - 65)) | (1L << (NON_SEALED - 65)) | (1L << (LBRACE - 65)) | (1L << (SEMI - 65)) | (1L << (LT - 65)) | (1L << (AT - 65)) | (1L << (IDENTIFIER - 65)))) != 0)) { + { + { + setState(448); + classBodyDeclaration(); + } + } + setState(453); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(454); + match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceBodyContext extends ParserRuleContext { + public List interfaceBodyDeclaration() { + return getRuleContexts(InterfaceBodyDeclarationContext.class); + } + public InterfaceBodyDeclarationContext interfaceBodyDeclaration(int i) { + return getRuleContext(InterfaceBodyDeclarationContext.class,i); + } + public InterfaceBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterInterfaceBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitInterfaceBody(this); + } + } + + public final InterfaceBodyContext interfaceBody() throws RecognitionException { + InterfaceBodyContext _localctx = new InterfaceBodyContext(_ctx, getState()); + enterRule(_localctx, 34, RULE_interfaceBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(456); + match(LBRACE); + setState(460); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 1)) & ~0x3f) == 0 && ((1L << (_la - 1)) & ((1L << (ABSTRACT - 1)) | (1L << (BOOLEAN - 1)) | (1L << (BYTE - 1)) | (1L << (CHAR - 1)) | (1L << (CLASS - 1)) | (1L << (DEFAULT - 1)) | (1L << (DOUBLE - 1)) | (1L << (ENUM - 1)) | (1L << (FINAL - 1)) | (1L << (FLOAT - 1)) | (1L << (INT - 1)) | (1L << (INTERFACE - 1)) | (1L << (LONG - 1)) | (1L << (NATIVE - 1)) | (1L << (PRIVATE - 1)) | (1L << (PROTECTED - 1)) | (1L << (PUBLIC - 1)) | (1L << (SHORT - 1)) | (1L << (STATIC - 1)) | (1L << (STRICTFP - 1)) | (1L << (SYNCHRONIZED - 1)) | (1L << (TRANSIENT - 1)) | (1L << (VOID - 1)) | (1L << (VOLATILE - 1)) | (1L << (MODULE - 1)) | (1L << (OPEN - 1)) | (1L << (REQUIRES - 1)) | (1L << (EXPORTS - 1)) | (1L << (OPENS - 1)) | (1L << (TO - 1)) | (1L << (USES - 1)) | (1L << (PROVIDES - 1)) | (1L << (WITH - 1)) | (1L << (TRANSITIVE - 1)) | (1L << (VAR - 1)) | (1L << (YIELD - 1)) | (1L << (RECORD - 1)) | (1L << (SEALED - 1)))) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (PERMITS - 65)) | (1L << (NON_SEALED - 65)) | (1L << (SEMI - 65)) | (1L << (LT - 65)) | (1L << (AT - 65)) | (1L << (IDENTIFIER - 65)))) != 0)) { + { + { + setState(457); + interfaceBodyDeclaration(); + } + } + setState(462); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(463); + match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassBodyDeclarationContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public TerminalNode STATIC() { return getToken(JavaParser.STATIC, 0); } + public MemberDeclarationContext memberDeclaration() { + return getRuleContext(MemberDeclarationContext.class,0); + } + public List modifier() { + return getRuleContexts(ModifierContext.class); + } + public ModifierContext modifier(int i) { + return getRuleContext(ModifierContext.class,i); + } + public ClassBodyDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classBodyDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterClassBodyDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitClassBodyDeclaration(this); + } + } + + public final ClassBodyDeclarationContext classBodyDeclaration() throws RecognitionException { + ClassBodyDeclarationContext _localctx = new ClassBodyDeclarationContext(_ctx, getState()); + enterRule(_localctx, 36, RULE_classBodyDeclaration); + int _la; + try { + int _alt; + setState(477); + switch ( getInterpreter().adaptivePredict(_input,39,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(465); + match(SEMI); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(467); + _la = _input.LA(1); + if (_la==STATIC) { + { + setState(466); + match(STATIC); + } + } + + setState(469); + block(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(473); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,38,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(470); + modifier(); + } + } + } + setState(475); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,38,_ctx); + } + setState(476); + memberDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MemberDeclarationContext extends ParserRuleContext { + public RecordDeclarationContext recordDeclaration() { + return getRuleContext(RecordDeclarationContext.class,0); + } + public MethodDeclarationContext methodDeclaration() { + return getRuleContext(MethodDeclarationContext.class,0); + } + public GenericMethodDeclarationContext genericMethodDeclaration() { + return getRuleContext(GenericMethodDeclarationContext.class,0); + } + public FieldDeclarationContext fieldDeclaration() { + return getRuleContext(FieldDeclarationContext.class,0); + } + public ConstructorDeclarationContext constructorDeclaration() { + return getRuleContext(ConstructorDeclarationContext.class,0); + } + public GenericConstructorDeclarationContext genericConstructorDeclaration() { + return getRuleContext(GenericConstructorDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public MemberDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_memberDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterMemberDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitMemberDeclaration(this); + } + } + + public final MemberDeclarationContext memberDeclaration() throws RecognitionException { + MemberDeclarationContext _localctx = new MemberDeclarationContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_memberDeclaration); + try { + setState(489); + switch ( getInterpreter().adaptivePredict(_input,40,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(479); + recordDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(480); + methodDeclaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(481); + genericMethodDeclaration(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(482); + fieldDeclaration(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(483); + constructorDeclaration(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(484); + genericConstructorDeclaration(); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(485); + interfaceDeclaration(); + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(486); + annotationTypeDeclaration(); + } + break; + case 9: + enterOuterAlt(_localctx, 9); + { + setState(487); + classDeclaration(); + } + break; + case 10: + enterOuterAlt(_localctx, 10); + { + setState(488); + enumDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MethodDeclarationContext extends ParserRuleContext { + public TypeTypeOrVoidContext typeTypeOrVoid() { + return getRuleContext(TypeTypeOrVoidContext.class,0); + } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public FormalParametersContext formalParameters() { + return getRuleContext(FormalParametersContext.class,0); + } + public MethodBodyContext methodBody() { + return getRuleContext(MethodBodyContext.class,0); + } + public TerminalNode THROWS() { return getToken(JavaParser.THROWS, 0); } + public QualifiedNameListContext qualifiedNameList() { + return getRuleContext(QualifiedNameListContext.class,0); + } + public MethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_methodDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterMethodDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitMethodDeclaration(this); + } + } + + public final MethodDeclarationContext methodDeclaration() throws RecognitionException { + MethodDeclarationContext _localctx = new MethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 40, RULE_methodDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(491); + typeTypeOrVoid(); + setState(492); + identifier(); + setState(493); + formalParameters(); + setState(498); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(494); + match(LBRACK); + setState(495); + match(RBRACK); + } + } + setState(500); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(503); + _la = _input.LA(1); + if (_la==THROWS) { + { + setState(501); + match(THROWS); + setState(502); + qualifiedNameList(); + } + } + + setState(505); + methodBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MethodBodyContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public MethodBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_methodBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterMethodBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitMethodBody(this); + } + } + + public final MethodBodyContext methodBody() throws RecognitionException { + MethodBodyContext _localctx = new MethodBodyContext(_ctx, getState()); + enterRule(_localctx, 42, RULE_methodBody); + try { + setState(509); + switch (_input.LA(1)) { + case LBRACE: + enterOuterAlt(_localctx, 1); + { + setState(507); + block(); + } + break; + case SEMI: + enterOuterAlt(_localctx, 2); + { + setState(508); + match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeTypeOrVoidContext extends ParserRuleContext { + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public TerminalNode VOID() { return getToken(JavaParser.VOID, 0); } + public TypeTypeOrVoidContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeTypeOrVoid; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterTypeTypeOrVoid(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitTypeTypeOrVoid(this); + } + } + + public final TypeTypeOrVoidContext typeTypeOrVoid() throws RecognitionException { + TypeTypeOrVoidContext _localctx = new TypeTypeOrVoidContext(_ctx, getState()); + enterRule(_localctx, 44, RULE_typeTypeOrVoid); + try { + setState(513); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case MODULE: + case OPEN: + case REQUIRES: + case EXPORTS: + case OPENS: + case TO: + case USES: + case PROVIDES: + case WITH: + case TRANSITIVE: + case VAR: + case YIELD: + case RECORD: + case SEALED: + case PERMITS: + case AT: + case IDENTIFIER: + enterOuterAlt(_localctx, 1); + { + setState(511); + typeType(); + } + break; + case VOID: + enterOuterAlt(_localctx, 2); + { + setState(512); + match(VOID); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GenericMethodDeclarationContext extends ParserRuleContext { + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public MethodDeclarationContext methodDeclaration() { + return getRuleContext(MethodDeclarationContext.class,0); + } + public GenericMethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_genericMethodDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterGenericMethodDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitGenericMethodDeclaration(this); + } + } + + public final GenericMethodDeclarationContext genericMethodDeclaration() throws RecognitionException { + GenericMethodDeclarationContext _localctx = new GenericMethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 46, RULE_genericMethodDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(515); + typeParameters(); + setState(516); + methodDeclaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GenericConstructorDeclarationContext extends ParserRuleContext { + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public ConstructorDeclarationContext constructorDeclaration() { + return getRuleContext(ConstructorDeclarationContext.class,0); + } + public GenericConstructorDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_genericConstructorDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterGenericConstructorDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitGenericConstructorDeclaration(this); + } + } + + public final GenericConstructorDeclarationContext genericConstructorDeclaration() throws RecognitionException { + GenericConstructorDeclarationContext _localctx = new GenericConstructorDeclarationContext(_ctx, getState()); + enterRule(_localctx, 48, RULE_genericConstructorDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(518); + typeParameters(); + setState(519); + constructorDeclaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstructorDeclarationContext extends ParserRuleContext { + public BlockContext constructorBody; + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public FormalParametersContext formalParameters() { + return getRuleContext(FormalParametersContext.class,0); + } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public TerminalNode THROWS() { return getToken(JavaParser.THROWS, 0); } + public QualifiedNameListContext qualifiedNameList() { + return getRuleContext(QualifiedNameListContext.class,0); + } + public ConstructorDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constructorDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterConstructorDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitConstructorDeclaration(this); + } + } + + public final ConstructorDeclarationContext constructorDeclaration() throws RecognitionException { + ConstructorDeclarationContext _localctx = new ConstructorDeclarationContext(_ctx, getState()); + enterRule(_localctx, 50, RULE_constructorDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(521); + identifier(); + setState(522); + formalParameters(); + setState(525); + _la = _input.LA(1); + if (_la==THROWS) { + { + setState(523); + match(THROWS); + setState(524); + qualifiedNameList(); + } + } + + setState(527); + ((ConstructorDeclarationContext)_localctx).constructorBody = block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CompactConstructorDeclarationContext extends ParserRuleContext { + public BlockContext constructorBody; + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public List modifier() { + return getRuleContexts(ModifierContext.class); + } + public ModifierContext modifier(int i) { + return getRuleContext(ModifierContext.class,i); + } + public CompactConstructorDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_compactConstructorDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterCompactConstructorDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitCompactConstructorDeclaration(this); + } + } + + public final CompactConstructorDeclarationContext compactConstructorDeclaration() throws RecognitionException { + CompactConstructorDeclarationContext _localctx = new CompactConstructorDeclarationContext(_ctx, getState()); + enterRule(_localctx, 52, RULE_compactConstructorDeclaration); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(532); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,46,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(529); + modifier(); + } + } + } + setState(534); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,46,_ctx); + } + setState(535); + identifier(); + setState(536); + ((CompactConstructorDeclarationContext)_localctx).constructorBody = block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FieldDeclarationContext extends ParserRuleContext { + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public VariableDeclaratorsContext variableDeclarators() { + return getRuleContext(VariableDeclaratorsContext.class,0); + } + public FieldDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_fieldDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterFieldDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitFieldDeclaration(this); + } + } + + public final FieldDeclarationContext fieldDeclaration() throws RecognitionException { + FieldDeclarationContext _localctx = new FieldDeclarationContext(_ctx, getState()); + enterRule(_localctx, 54, RULE_fieldDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(538); + typeType(); + setState(539); + variableDeclarators(); + setState(540); + match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceBodyDeclarationContext extends ParserRuleContext { + public InterfaceMemberDeclarationContext interfaceMemberDeclaration() { + return getRuleContext(InterfaceMemberDeclarationContext.class,0); + } + public List modifier() { + return getRuleContexts(ModifierContext.class); + } + public ModifierContext modifier(int i) { + return getRuleContext(ModifierContext.class,i); + } + public InterfaceBodyDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceBodyDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterInterfaceBodyDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitInterfaceBodyDeclaration(this); + } + } + + public final InterfaceBodyDeclarationContext interfaceBodyDeclaration() throws RecognitionException { + InterfaceBodyDeclarationContext _localctx = new InterfaceBodyDeclarationContext(_ctx, getState()); + enterRule(_localctx, 56, RULE_interfaceBodyDeclaration); + try { + int _alt; + setState(550); + switch (_input.LA(1)) { + case ABSTRACT: + case BOOLEAN: + case BYTE: + case CHAR: + case CLASS: + case DEFAULT: + case DOUBLE: + case ENUM: + case FINAL: + case FLOAT: + case INT: + case INTERFACE: + case LONG: + case NATIVE: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case SHORT: + case STATIC: + case STRICTFP: + case SYNCHRONIZED: + case TRANSIENT: + case VOID: + case VOLATILE: + case MODULE: + case OPEN: + case REQUIRES: + case EXPORTS: + case OPENS: + case TO: + case USES: + case PROVIDES: + case WITH: + case TRANSITIVE: + case VAR: + case YIELD: + case RECORD: + case SEALED: + case PERMITS: + case NON_SEALED: + case LT: + case AT: + case IDENTIFIER: + enterOuterAlt(_localctx, 1); + { + setState(545); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,47,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(542); + modifier(); + } + } + } + setState(547); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,47,_ctx); + } + setState(548); + interfaceMemberDeclaration(); + } + break; + case SEMI: + enterOuterAlt(_localctx, 2); + { + setState(549); + match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceMemberDeclarationContext extends ParserRuleContext { + public RecordDeclarationContext recordDeclaration() { + return getRuleContext(RecordDeclarationContext.class,0); + } + public ConstDeclarationContext constDeclaration() { + return getRuleContext(ConstDeclarationContext.class,0); + } + public InterfaceMethodDeclarationContext interfaceMethodDeclaration() { + return getRuleContext(InterfaceMethodDeclarationContext.class,0); + } + public GenericInterfaceMethodDeclarationContext genericInterfaceMethodDeclaration() { + return getRuleContext(GenericInterfaceMethodDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public InterfaceMemberDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceMemberDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterInterfaceMemberDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitInterfaceMemberDeclaration(this); + } + } + + public final InterfaceMemberDeclarationContext interfaceMemberDeclaration() throws RecognitionException { + InterfaceMemberDeclarationContext _localctx = new InterfaceMemberDeclarationContext(_ctx, getState()); + enterRule(_localctx, 58, RULE_interfaceMemberDeclaration); + try { + setState(560); + switch ( getInterpreter().adaptivePredict(_input,49,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(552); + recordDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(553); + constDeclaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(554); + interfaceMethodDeclaration(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(555); + genericInterfaceMethodDeclaration(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(556); + interfaceDeclaration(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(557); + annotationTypeDeclaration(); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(558); + classDeclaration(); + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(559); + enumDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstDeclarationContext extends ParserRuleContext { + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public List constantDeclarator() { + return getRuleContexts(ConstantDeclaratorContext.class); + } + public ConstantDeclaratorContext constantDeclarator(int i) { + return getRuleContext(ConstantDeclaratorContext.class,i); + } + public ConstDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterConstDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitConstDeclaration(this); + } + } + + public final ConstDeclarationContext constDeclaration() throws RecognitionException { + ConstDeclarationContext _localctx = new ConstDeclarationContext(_ctx, getState()); + enterRule(_localctx, 60, RULE_constDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(562); + typeType(); + setState(563); + constantDeclarator(); + setState(568); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(564); + match(COMMA); + setState(565); + constantDeclarator(); + } + } + setState(570); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(571); + match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstantDeclaratorContext extends ParserRuleContext { + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public VariableInitializerContext variableInitializer() { + return getRuleContext(VariableInitializerContext.class,0); + } + public ConstantDeclaratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constantDeclarator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterConstantDeclarator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitConstantDeclarator(this); + } + } + + public final ConstantDeclaratorContext constantDeclarator() throws RecognitionException { + ConstantDeclaratorContext _localctx = new ConstantDeclaratorContext(_ctx, getState()); + enterRule(_localctx, 62, RULE_constantDeclarator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(573); + identifier(); + setState(578); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(574); + match(LBRACK); + setState(575); + match(RBRACK); + } + } + setState(580); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(581); + match(ASSIGN); + setState(582); + variableInitializer(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceMethodDeclarationContext extends ParserRuleContext { + public InterfaceCommonBodyDeclarationContext interfaceCommonBodyDeclaration() { + return getRuleContext(InterfaceCommonBodyDeclarationContext.class,0); + } + public List interfaceMethodModifier() { + return getRuleContexts(InterfaceMethodModifierContext.class); + } + public InterfaceMethodModifierContext interfaceMethodModifier(int i) { + return getRuleContext(InterfaceMethodModifierContext.class,i); + } + public InterfaceMethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceMethodDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterInterfaceMethodDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitInterfaceMethodDeclaration(this); + } + } + + public final InterfaceMethodDeclarationContext interfaceMethodDeclaration() throws RecognitionException { + InterfaceMethodDeclarationContext _localctx = new InterfaceMethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 64, RULE_interfaceMethodDeclaration); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(587); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,52,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(584); + interfaceMethodModifier(); + } + } + } + setState(589); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,52,_ctx); + } + setState(590); + interfaceCommonBodyDeclaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceMethodModifierContext extends ParserRuleContext { + public AnnotationContext annotation() { + return getRuleContext(AnnotationContext.class,0); + } + public TerminalNode PUBLIC() { return getToken(JavaParser.PUBLIC, 0); } + public TerminalNode ABSTRACT() { return getToken(JavaParser.ABSTRACT, 0); } + public TerminalNode DEFAULT() { return getToken(JavaParser.DEFAULT, 0); } + public TerminalNode STATIC() { return getToken(JavaParser.STATIC, 0); } + public TerminalNode STRICTFP() { return getToken(JavaParser.STRICTFP, 0); } + public InterfaceMethodModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceMethodModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterInterfaceMethodModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitInterfaceMethodModifier(this); + } + } + + public final InterfaceMethodModifierContext interfaceMethodModifier() throws RecognitionException { + InterfaceMethodModifierContext _localctx = new InterfaceMethodModifierContext(_ctx, getState()); + enterRule(_localctx, 66, RULE_interfaceMethodModifier); + try { + setState(598); + switch (_input.LA(1)) { + case MODULE: + case OPEN: + case REQUIRES: + case EXPORTS: + case OPENS: + case TO: + case USES: + case PROVIDES: + case WITH: + case TRANSITIVE: + case VAR: + case YIELD: + case RECORD: + case SEALED: + case PERMITS: + case AT: + case IDENTIFIER: + enterOuterAlt(_localctx, 1); + { + setState(592); + annotation(); + } + break; + case PUBLIC: + enterOuterAlt(_localctx, 2); + { + setState(593); + match(PUBLIC); + } + break; + case ABSTRACT: + enterOuterAlt(_localctx, 3); + { + setState(594); + match(ABSTRACT); + } + break; + case DEFAULT: + enterOuterAlt(_localctx, 4); + { + setState(595); + match(DEFAULT); + } + break; + case STATIC: + enterOuterAlt(_localctx, 5); + { + setState(596); + match(STATIC); + } + break; + case STRICTFP: + enterOuterAlt(_localctx, 6); + { + setState(597); + match(STRICTFP); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GenericInterfaceMethodDeclarationContext extends ParserRuleContext { + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public InterfaceCommonBodyDeclarationContext interfaceCommonBodyDeclaration() { + return getRuleContext(InterfaceCommonBodyDeclarationContext.class,0); + } + public List interfaceMethodModifier() { + return getRuleContexts(InterfaceMethodModifierContext.class); + } + public InterfaceMethodModifierContext interfaceMethodModifier(int i) { + return getRuleContext(InterfaceMethodModifierContext.class,i); + } + public GenericInterfaceMethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_genericInterfaceMethodDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterGenericInterfaceMethodDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitGenericInterfaceMethodDeclaration(this); + } + } + + public final GenericInterfaceMethodDeclarationContext genericInterfaceMethodDeclaration() throws RecognitionException { + GenericInterfaceMethodDeclarationContext _localctx = new GenericInterfaceMethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 68, RULE_genericInterfaceMethodDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(603); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 1)) & ~0x3f) == 0 && ((1L << (_la - 1)) & ((1L << (ABSTRACT - 1)) | (1L << (DEFAULT - 1)) | (1L << (PUBLIC - 1)) | (1L << (STATIC - 1)) | (1L << (STRICTFP - 1)) | (1L << (MODULE - 1)) | (1L << (OPEN - 1)) | (1L << (REQUIRES - 1)) | (1L << (EXPORTS - 1)) | (1L << (OPENS - 1)) | (1L << (TO - 1)) | (1L << (USES - 1)) | (1L << (PROVIDES - 1)) | (1L << (WITH - 1)) | (1L << (TRANSITIVE - 1)) | (1L << (VAR - 1)) | (1L << (YIELD - 1)) | (1L << (RECORD - 1)) | (1L << (SEALED - 1)))) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (PERMITS - 65)) | (1L << (AT - 65)) | (1L << (IDENTIFIER - 65)))) != 0)) { + { + { + setState(600); + interfaceMethodModifier(); + } + } + setState(605); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(606); + typeParameters(); + setState(607); + interfaceCommonBodyDeclaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceCommonBodyDeclarationContext extends ParserRuleContext { + public TypeTypeOrVoidContext typeTypeOrVoid() { + return getRuleContext(TypeTypeOrVoidContext.class,0); + } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public FormalParametersContext formalParameters() { + return getRuleContext(FormalParametersContext.class,0); + } + public MethodBodyContext methodBody() { + return getRuleContext(MethodBodyContext.class,0); + } + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public TerminalNode THROWS() { return getToken(JavaParser.THROWS, 0); } + public QualifiedNameListContext qualifiedNameList() { + return getRuleContext(QualifiedNameListContext.class,0); + } + public InterfaceCommonBodyDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceCommonBodyDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterInterfaceCommonBodyDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitInterfaceCommonBodyDeclaration(this); + } + } + + public final InterfaceCommonBodyDeclarationContext interfaceCommonBodyDeclaration() throws RecognitionException { + InterfaceCommonBodyDeclarationContext _localctx = new InterfaceCommonBodyDeclarationContext(_ctx, getState()); + enterRule(_localctx, 70, RULE_interfaceCommonBodyDeclaration); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(612); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,55,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(609); + annotation(); + } + } + } + setState(614); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,55,_ctx); + } + setState(615); + typeTypeOrVoid(); + setState(616); + identifier(); + setState(617); + formalParameters(); + setState(622); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(618); + match(LBRACK); + setState(619); + match(RBRACK); + } + } + setState(624); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(627); + _la = _input.LA(1); + if (_la==THROWS) { + { + setState(625); + match(THROWS); + setState(626); + qualifiedNameList(); + } + } + + setState(629); + methodBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclaratorsContext extends ParserRuleContext { + public List variableDeclarator() { + return getRuleContexts(VariableDeclaratorContext.class); + } + public VariableDeclaratorContext variableDeclarator(int i) { + return getRuleContext(VariableDeclaratorContext.class,i); + } + public VariableDeclaratorsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclarators; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterVariableDeclarators(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitVariableDeclarators(this); + } + } + + public final VariableDeclaratorsContext variableDeclarators() throws RecognitionException { + VariableDeclaratorsContext _localctx = new VariableDeclaratorsContext(_ctx, getState()); + enterRule(_localctx, 72, RULE_variableDeclarators); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(631); + variableDeclarator(); + setState(636); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(632); + match(COMMA); + setState(633); + variableDeclarator(); + } + } + setState(638); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclaratorContext extends ParserRuleContext { + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public VariableInitializerContext variableInitializer() { + return getRuleContext(VariableInitializerContext.class,0); + } + public VariableDeclaratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclarator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterVariableDeclarator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitVariableDeclarator(this); + } + } + + public final VariableDeclaratorContext variableDeclarator() throws RecognitionException { + VariableDeclaratorContext _localctx = new VariableDeclaratorContext(_ctx, getState()); + enterRule(_localctx, 74, RULE_variableDeclarator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(639); + variableDeclaratorId(); + setState(642); + _la = _input.LA(1); + if (_la==ASSIGN) { + { + setState(640); + match(ASSIGN); + setState(641); + variableInitializer(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclaratorIdContext extends ParserRuleContext { + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public VariableDeclaratorIdContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclaratorId; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterVariableDeclaratorId(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitVariableDeclaratorId(this); + } + } + + public final VariableDeclaratorIdContext variableDeclaratorId() throws RecognitionException { + VariableDeclaratorIdContext _localctx = new VariableDeclaratorIdContext(_ctx, getState()); + enterRule(_localctx, 76, RULE_variableDeclaratorId); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(644); + identifier(); + setState(649); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(645); + match(LBRACK); + setState(646); + match(RBRACK); + } + } + setState(651); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableInitializerContext extends ParserRuleContext { + public ArrayInitializerContext arrayInitializer() { + return getRuleContext(ArrayInitializerContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public VariableInitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableInitializer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterVariableInitializer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitVariableInitializer(this); + } + } + + public final VariableInitializerContext variableInitializer() throws RecognitionException { + VariableInitializerContext _localctx = new VariableInitializerContext(_ctx, getState()); + enterRule(_localctx, 78, RULE_variableInitializer); + try { + setState(654); + switch (_input.LA(1)) { + case LBRACE: + enterOuterAlt(_localctx, 1); + { + setState(652); + arrayInitializer(); + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case NEW: + case SHORT: + case SUPER: + case SWITCH: + case THIS: + case VOID: + case MODULE: + case OPEN: + case REQUIRES: + case EXPORTS: + case OPENS: + case TO: + case USES: + case PROVIDES: + case WITH: + case TRANSITIVE: + case VAR: + case YIELD: + case RECORD: + case SEALED: + case PERMITS: + case DECIMAL_LITERAL: + case HEX_LITERAL: + case OCT_LITERAL: + case BINARY_LITERAL: + case FLOAT_LITERAL: + case HEX_FLOAT_LITERAL: + case BOOL_LITERAL: + case CHAR_LITERAL: + case STRING_LITERAL: + case TEXT_BLOCK: + case NULL_LITERAL: + case LPAREN: + case LT: + case BANG: + case TILDE: + case INC: + case DEC: + case ADD: + case SUB: + case AT: + case IDENTIFIER: + enterOuterAlt(_localctx, 2); + { + setState(653); + expression(0); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayInitializerContext extends ParserRuleContext { + public List variableInitializer() { + return getRuleContexts(VariableInitializerContext.class); + } + public VariableInitializerContext variableInitializer(int i) { + return getRuleContext(VariableInitializerContext.class,i); + } + public ArrayInitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayInitializer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterArrayInitializer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitArrayInitializer(this); + } + } + + public final ArrayInitializerContext arrayInitializer() throws RecognitionException { + ArrayInitializerContext _localctx = new ArrayInitializerContext(_ctx, getState()); + enterRule(_localctx, 80, RULE_arrayInitializer); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(656); + match(LBRACE); + setState(668); + _la = _input.LA(1); + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (BOOLEAN - 3)) | (1L << (BYTE - 3)) | (1L << (CHAR - 3)) | (1L << (DOUBLE - 3)) | (1L << (FLOAT - 3)) | (1L << (INT - 3)) | (1L << (LONG - 3)) | (1L << (NEW - 3)) | (1L << (SHORT - 3)) | (1L << (SUPER - 3)) | (1L << (SWITCH - 3)) | (1L << (THIS - 3)) | (1L << (VOID - 3)) | (1L << (MODULE - 3)) | (1L << (OPEN - 3)) | (1L << (REQUIRES - 3)) | (1L << (EXPORTS - 3)) | (1L << (OPENS - 3)) | (1L << (TO - 3)) | (1L << (USES - 3)) | (1L << (PROVIDES - 3)) | (1L << (WITH - 3)) | (1L << (TRANSITIVE - 3)) | (1L << (VAR - 3)) | (1L << (YIELD - 3)) | (1L << (RECORD - 3)) | (1L << (SEALED - 3)) | (1L << (PERMITS - 3)))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (DECIMAL_LITERAL - 67)) | (1L << (HEX_LITERAL - 67)) | (1L << (OCT_LITERAL - 67)) | (1L << (BINARY_LITERAL - 67)) | (1L << (FLOAT_LITERAL - 67)) | (1L << (HEX_FLOAT_LITERAL - 67)) | (1L << (BOOL_LITERAL - 67)) | (1L << (CHAR_LITERAL - 67)) | (1L << (STRING_LITERAL - 67)) | (1L << (TEXT_BLOCK - 67)) | (1L << (NULL_LITERAL - 67)) | (1L << (LPAREN - 67)) | (1L << (LBRACE - 67)) | (1L << (LT - 67)) | (1L << (BANG - 67)) | (1L << (TILDE - 67)) | (1L << (INC - 67)) | (1L << (DEC - 67)) | (1L << (ADD - 67)) | (1L << (SUB - 67)) | (1L << (AT - 67)) | (1L << (IDENTIFIER - 67)))) != 0)) { + { + setState(657); + variableInitializer(); + setState(662); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,62,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(658); + match(COMMA); + setState(659); + variableInitializer(); + } + } + } + setState(664); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,62,_ctx); + } + setState(666); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(665); + match(COMMA); + } + } + + } + } + + setState(670); + match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassOrInterfaceTypeContext extends ParserRuleContext { + public TypeIdentifierContext typeIdentifier() { + return getRuleContext(TypeIdentifierContext.class,0); + } + public List identifier() { + return getRuleContexts(IdentifierContext.class); + } + public IdentifierContext identifier(int i) { + return getRuleContext(IdentifierContext.class,i); + } + public List typeArguments() { + return getRuleContexts(TypeArgumentsContext.class); + } + public TypeArgumentsContext typeArguments(int i) { + return getRuleContext(TypeArgumentsContext.class,i); + } + public ClassOrInterfaceTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classOrInterfaceType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterClassOrInterfaceType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitClassOrInterfaceType(this); + } + } + + public final ClassOrInterfaceTypeContext classOrInterfaceType() throws RecognitionException { + ClassOrInterfaceTypeContext _localctx = new ClassOrInterfaceTypeContext(_ctx, getState()); + enterRule(_localctx, 82, RULE_classOrInterfaceType); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(680); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,66,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(672); + identifier(); + setState(674); + _la = _input.LA(1); + if (_la==LT) { + { + setState(673); + typeArguments(); + } + } + + setState(676); + match(DOT); + } + } + } + setState(682); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,66,_ctx); + } + setState(683); + typeIdentifier(); + setState(685); + switch ( getInterpreter().adaptivePredict(_input,67,_ctx) ) { + case 1: + { + setState(684); + typeArguments(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentContext extends ParserRuleContext { + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public TerminalNode EXTENDS() { return getToken(JavaParser.EXTENDS, 0); } + public TerminalNode SUPER() { return getToken(JavaParser.SUPER, 0); } + public TypeArgumentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArgument; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterTypeArgument(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitTypeArgument(this); + } + } + + public final TypeArgumentContext typeArgument() throws RecognitionException { + TypeArgumentContext _localctx = new TypeArgumentContext(_ctx, getState()); + enterRule(_localctx, 84, RULE_typeArgument); + int _la; + try { + setState(699); + switch ( getInterpreter().adaptivePredict(_input,70,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(687); + typeType(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(691); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 51)) & ~0x3f) == 0 && ((1L << (_la - 51)) & ((1L << (MODULE - 51)) | (1L << (OPEN - 51)) | (1L << (REQUIRES - 51)) | (1L << (EXPORTS - 51)) | (1L << (OPENS - 51)) | (1L << (TO - 51)) | (1L << (USES - 51)) | (1L << (PROVIDES - 51)) | (1L << (WITH - 51)) | (1L << (TRANSITIVE - 51)) | (1L << (VAR - 51)) | (1L << (YIELD - 51)) | (1L << (RECORD - 51)) | (1L << (SEALED - 51)) | (1L << (PERMITS - 51)))) != 0) || _la==AT || _la==IDENTIFIER) { + { + { + setState(688); + annotation(); + } + } + setState(693); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(694); + match(QUESTION); + setState(697); + _la = _input.LA(1); + if (_la==EXTENDS || _la==SUPER) { + { + setState(695); + _la = _input.LA(1); + if ( !(_la==EXTENDS || _la==SUPER) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(696); + typeType(); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class QualifiedNameListContext extends ParserRuleContext { + public List qualifiedName() { + return getRuleContexts(QualifiedNameContext.class); + } + public QualifiedNameContext qualifiedName(int i) { + return getRuleContext(QualifiedNameContext.class,i); + } + public QualifiedNameListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_qualifiedNameList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterQualifiedNameList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitQualifiedNameList(this); + } + } + + public final QualifiedNameListContext qualifiedNameList() throws RecognitionException { + QualifiedNameListContext _localctx = new QualifiedNameListContext(_ctx, getState()); + enterRule(_localctx, 86, RULE_qualifiedNameList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(701); + qualifiedName(); + setState(706); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(702); + match(COMMA); + setState(703); + qualifiedName(); + } + } + setState(708); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParametersContext extends ParserRuleContext { + public ReceiverParameterContext receiverParameter() { + return getRuleContext(ReceiverParameterContext.class,0); + } + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public FormalParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterFormalParameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitFormalParameters(this); + } + } + + public final FormalParametersContext formalParameters() throws RecognitionException { + FormalParametersContext _localctx = new FormalParametersContext(_ctx, getState()); + enterRule(_localctx, 88, RULE_formalParameters); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(709); + match(LPAREN); + setState(721); + switch ( getInterpreter().adaptivePredict(_input,75,_ctx) ) { + case 1: + { + setState(711); + _la = _input.LA(1); + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (BOOLEAN - 3)) | (1L << (BYTE - 3)) | (1L << (CHAR - 3)) | (1L << (DOUBLE - 3)) | (1L << (FLOAT - 3)) | (1L << (INT - 3)) | (1L << (LONG - 3)) | (1L << (SHORT - 3)) | (1L << (MODULE - 3)) | (1L << (OPEN - 3)) | (1L << (REQUIRES - 3)) | (1L << (EXPORTS - 3)) | (1L << (OPENS - 3)) | (1L << (TO - 3)) | (1L << (USES - 3)) | (1L << (PROVIDES - 3)) | (1L << (WITH - 3)) | (1L << (TRANSITIVE - 3)) | (1L << (VAR - 3)) | (1L << (YIELD - 3)) | (1L << (RECORD - 3)) | (1L << (SEALED - 3)) | (1L << (PERMITS - 3)))) != 0) || _la==AT || _la==IDENTIFIER) { + { + setState(710); + receiverParameter(); + } + } + + } + break; + case 2: + { + setState(713); + receiverParameter(); + setState(716); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(714); + match(COMMA); + setState(715); + formalParameterList(); + } + } + + } + break; + case 3: + { + setState(719); + _la = _input.LA(1); + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (BOOLEAN - 3)) | (1L << (BYTE - 3)) | (1L << (CHAR - 3)) | (1L << (DOUBLE - 3)) | (1L << (FINAL - 3)) | (1L << (FLOAT - 3)) | (1L << (INT - 3)) | (1L << (LONG - 3)) | (1L << (SHORT - 3)) | (1L << (MODULE - 3)) | (1L << (OPEN - 3)) | (1L << (REQUIRES - 3)) | (1L << (EXPORTS - 3)) | (1L << (OPENS - 3)) | (1L << (TO - 3)) | (1L << (USES - 3)) | (1L << (PROVIDES - 3)) | (1L << (WITH - 3)) | (1L << (TRANSITIVE - 3)) | (1L << (VAR - 3)) | (1L << (YIELD - 3)) | (1L << (RECORD - 3)) | (1L << (SEALED - 3)) | (1L << (PERMITS - 3)))) != 0) || _la==AT || _la==IDENTIFIER) { + { + setState(718); + formalParameterList(); + } + } + + } + break; + } + setState(723); + match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ReceiverParameterContext extends ParserRuleContext { + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public TerminalNode THIS() { return getToken(JavaParser.THIS, 0); } + public List identifier() { + return getRuleContexts(IdentifierContext.class); + } + public IdentifierContext identifier(int i) { + return getRuleContext(IdentifierContext.class,i); + } + public ReceiverParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_receiverParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterReceiverParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitReceiverParameter(this); + } + } + + public final ReceiverParameterContext receiverParameter() throws RecognitionException { + ReceiverParameterContext _localctx = new ReceiverParameterContext(_ctx, getState()); + enterRule(_localctx, 90, RULE_receiverParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(725); + typeType(); + setState(731); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 51)) & ~0x3f) == 0 && ((1L << (_la - 51)) & ((1L << (MODULE - 51)) | (1L << (OPEN - 51)) | (1L << (REQUIRES - 51)) | (1L << (EXPORTS - 51)) | (1L << (OPENS - 51)) | (1L << (TO - 51)) | (1L << (USES - 51)) | (1L << (PROVIDES - 51)) | (1L << (WITH - 51)) | (1L << (TRANSITIVE - 51)) | (1L << (VAR - 51)) | (1L << (YIELD - 51)) | (1L << (RECORD - 51)) | (1L << (SEALED - 51)) | (1L << (PERMITS - 51)))) != 0) || _la==IDENTIFIER) { + { + { + setState(726); + identifier(); + setState(727); + match(DOT); + } + } + setState(733); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(734); + match(THIS); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParameterListContext extends ParserRuleContext { + public List formalParameter() { + return getRuleContexts(FormalParameterContext.class); + } + public FormalParameterContext formalParameter(int i) { + return getRuleContext(FormalParameterContext.class,i); + } + public LastFormalParameterContext lastFormalParameter() { + return getRuleContext(LastFormalParameterContext.class,0); + } + public FormalParameterListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameterList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterFormalParameterList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitFormalParameterList(this); + } + } + + public final FormalParameterListContext formalParameterList() throws RecognitionException { + FormalParameterListContext _localctx = new FormalParameterListContext(_ctx, getState()); + enterRule(_localctx, 92, RULE_formalParameterList); + int _la; + try { + int _alt; + setState(749); + switch ( getInterpreter().adaptivePredict(_input,79,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(736); + formalParameter(); + setState(741); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,77,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(737); + match(COMMA); + setState(738); + formalParameter(); + } + } + } + setState(743); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,77,_ctx); + } + setState(746); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(744); + match(COMMA); + setState(745); + lastFormalParameter(); + } + } + + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(748); + lastFormalParameter(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParameterContext extends ParserRuleContext { + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public FormalParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterFormalParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitFormalParameter(this); + } + } + + public final FormalParameterContext formalParameter() throws RecognitionException { + FormalParameterContext _localctx = new FormalParameterContext(_ctx, getState()); + enterRule(_localctx, 94, RULE_formalParameter); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(754); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,80,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(751); + variableModifier(); + } + } + } + setState(756); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,80,_ctx); + } + setState(757); + typeType(); + setState(758); + variableDeclaratorId(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LastFormalParameterContext extends ParserRuleContext { + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public LastFormalParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lastFormalParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterLastFormalParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitLastFormalParameter(this); + } + } + + public final LastFormalParameterContext lastFormalParameter() throws RecognitionException { + LastFormalParameterContext _localctx = new LastFormalParameterContext(_ctx, getState()); + enterRule(_localctx, 96, RULE_lastFormalParameter); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(763); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,81,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(760); + variableModifier(); + } + } + } + setState(765); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,81,_ctx); + } + setState(766); + typeType(); + setState(770); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 51)) & ~0x3f) == 0 && ((1L << (_la - 51)) & ((1L << (MODULE - 51)) | (1L << (OPEN - 51)) | (1L << (REQUIRES - 51)) | (1L << (EXPORTS - 51)) | (1L << (OPENS - 51)) | (1L << (TO - 51)) | (1L << (USES - 51)) | (1L << (PROVIDES - 51)) | (1L << (WITH - 51)) | (1L << (TRANSITIVE - 51)) | (1L << (VAR - 51)) | (1L << (YIELD - 51)) | (1L << (RECORD - 51)) | (1L << (SEALED - 51)) | (1L << (PERMITS - 51)))) != 0) || _la==AT || _la==IDENTIFIER) { + { + { + setState(767); + annotation(); + } + } + setState(772); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(773); + match(ELLIPSIS); + setState(774); + variableDeclaratorId(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LambdaLVTIListContext extends ParserRuleContext { + public List lambdaLVTIParameter() { + return getRuleContexts(LambdaLVTIParameterContext.class); + } + public LambdaLVTIParameterContext lambdaLVTIParameter(int i) { + return getRuleContext(LambdaLVTIParameterContext.class,i); + } + public LambdaLVTIListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lambdaLVTIList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterLambdaLVTIList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitLambdaLVTIList(this); + } + } + + public final LambdaLVTIListContext lambdaLVTIList() throws RecognitionException { + LambdaLVTIListContext _localctx = new LambdaLVTIListContext(_ctx, getState()); + enterRule(_localctx, 98, RULE_lambdaLVTIList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(776); + lambdaLVTIParameter(); + setState(781); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(777); + match(COMMA); + setState(778); + lambdaLVTIParameter(); + } + } + setState(783); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LambdaLVTIParameterContext extends ParserRuleContext { + public TerminalNode VAR() { return getToken(JavaParser.VAR, 0); } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public LambdaLVTIParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lambdaLVTIParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterLambdaLVTIParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitLambdaLVTIParameter(this); + } + } + + public final LambdaLVTIParameterContext lambdaLVTIParameter() throws RecognitionException { + LambdaLVTIParameterContext _localctx = new LambdaLVTIParameterContext(_ctx, getState()); + enterRule(_localctx, 100, RULE_lambdaLVTIParameter); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(787); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,84,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(784); + variableModifier(); + } + } + } + setState(789); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,84,_ctx); + } + setState(790); + match(VAR); + setState(791); + identifier(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class QualifiedNameContext extends ParserRuleContext { + public List identifier() { + return getRuleContexts(IdentifierContext.class); + } + public IdentifierContext identifier(int i) { + return getRuleContext(IdentifierContext.class,i); + } + public QualifiedNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_qualifiedName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterQualifiedName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitQualifiedName(this); + } + } + + public final QualifiedNameContext qualifiedName() throws RecognitionException { + QualifiedNameContext _localctx = new QualifiedNameContext(_ctx, getState()); + enterRule(_localctx, 102, RULE_qualifiedName); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(793); + identifier(); + setState(798); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,85,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(794); + match(DOT); + setState(795); + identifier(); + } + } + } + setState(800); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,85,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LiteralContext extends ParserRuleContext { + public IntegerLiteralContext integerLiteral() { + return getRuleContext(IntegerLiteralContext.class,0); + } + public FloatLiteralContext floatLiteral() { + return getRuleContext(FloatLiteralContext.class,0); + } + public TerminalNode CHAR_LITERAL() { return getToken(JavaParser.CHAR_LITERAL, 0); } + public TerminalNode STRING_LITERAL() { return getToken(JavaParser.STRING_LITERAL, 0); } + public TerminalNode BOOL_LITERAL() { return getToken(JavaParser.BOOL_LITERAL, 0); } + public TerminalNode NULL_LITERAL() { return getToken(JavaParser.NULL_LITERAL, 0); } + public TerminalNode TEXT_BLOCK() { return getToken(JavaParser.TEXT_BLOCK, 0); } + public LiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_literal; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitLiteral(this); + } + } + + public final LiteralContext literal() throws RecognitionException { + LiteralContext _localctx = new LiteralContext(_ctx, getState()); + enterRule(_localctx, 104, RULE_literal); + try { + setState(808); + switch (_input.LA(1)) { + case DECIMAL_LITERAL: + case HEX_LITERAL: + case OCT_LITERAL: + case BINARY_LITERAL: + enterOuterAlt(_localctx, 1); + { + setState(801); + integerLiteral(); + } + break; + case FLOAT_LITERAL: + case HEX_FLOAT_LITERAL: + enterOuterAlt(_localctx, 2); + { + setState(802); + floatLiteral(); + } + break; + case CHAR_LITERAL: + enterOuterAlt(_localctx, 3); + { + setState(803); + match(CHAR_LITERAL); + } + break; + case STRING_LITERAL: + enterOuterAlt(_localctx, 4); + { + setState(804); + match(STRING_LITERAL); + } + break; + case BOOL_LITERAL: + enterOuterAlt(_localctx, 5); + { + setState(805); + match(BOOL_LITERAL); + } + break; + case NULL_LITERAL: + enterOuterAlt(_localctx, 6); + { + setState(806); + match(NULL_LITERAL); + } + break; + case TEXT_BLOCK: + enterOuterAlt(_localctx, 7); + { + setState(807); + match(TEXT_BLOCK); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IntegerLiteralContext extends ParserRuleContext { + public TerminalNode DECIMAL_LITERAL() { return getToken(JavaParser.DECIMAL_LITERAL, 0); } + public TerminalNode HEX_LITERAL() { return getToken(JavaParser.HEX_LITERAL, 0); } + public TerminalNode OCT_LITERAL() { return getToken(JavaParser.OCT_LITERAL, 0); } + public TerminalNode BINARY_LITERAL() { return getToken(JavaParser.BINARY_LITERAL, 0); } + public IntegerLiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_integerLiteral; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterIntegerLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitIntegerLiteral(this); + } + } + + public final IntegerLiteralContext integerLiteral() throws RecognitionException { + IntegerLiteralContext _localctx = new IntegerLiteralContext(_ctx, getState()); + enterRule(_localctx, 106, RULE_integerLiteral); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(810); + _la = _input.LA(1); + if ( !(((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (DECIMAL_LITERAL - 67)) | (1L << (HEX_LITERAL - 67)) | (1L << (OCT_LITERAL - 67)) | (1L << (BINARY_LITERAL - 67)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FloatLiteralContext extends ParserRuleContext { + public TerminalNode FLOAT_LITERAL() { return getToken(JavaParser.FLOAT_LITERAL, 0); } + public TerminalNode HEX_FLOAT_LITERAL() { return getToken(JavaParser.HEX_FLOAT_LITERAL, 0); } + public FloatLiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_floatLiteral; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterFloatLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitFloatLiteral(this); + } + } + + public final FloatLiteralContext floatLiteral() throws RecognitionException { + FloatLiteralContext _localctx = new FloatLiteralContext(_ctx, getState()); + enterRule(_localctx, 108, RULE_floatLiteral); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(812); + _la = _input.LA(1); + if ( !(_la==FLOAT_LITERAL || _la==HEX_FLOAT_LITERAL) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AltAnnotationQualifiedNameContext extends ParserRuleContext { + public List identifier() { + return getRuleContexts(IdentifierContext.class); + } + public IdentifierContext identifier(int i) { + return getRuleContext(IdentifierContext.class,i); + } + public List DOT() { return getTokens(JavaParser.DOT); } + public TerminalNode DOT(int i) { + return getToken(JavaParser.DOT, i); + } + public AltAnnotationQualifiedNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_altAnnotationQualifiedName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterAltAnnotationQualifiedName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitAltAnnotationQualifiedName(this); + } + } + + public final AltAnnotationQualifiedNameContext altAnnotationQualifiedName() throws RecognitionException { + AltAnnotationQualifiedNameContext _localctx = new AltAnnotationQualifiedNameContext(_ctx, getState()); + enterRule(_localctx, 110, RULE_altAnnotationQualifiedName); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(819); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 51)) & ~0x3f) == 0 && ((1L << (_la - 51)) & ((1L << (MODULE - 51)) | (1L << (OPEN - 51)) | (1L << (REQUIRES - 51)) | (1L << (EXPORTS - 51)) | (1L << (OPENS - 51)) | (1L << (TO - 51)) | (1L << (USES - 51)) | (1L << (PROVIDES - 51)) | (1L << (WITH - 51)) | (1L << (TRANSITIVE - 51)) | (1L << (VAR - 51)) | (1L << (YIELD - 51)) | (1L << (RECORD - 51)) | (1L << (SEALED - 51)) | (1L << (PERMITS - 51)))) != 0) || _la==IDENTIFIER) { + { + { + setState(814); + identifier(); + setState(815); + match(DOT); + } + } + setState(821); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(822); + match(AT); + setState(823); + identifier(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationContext extends ParserRuleContext { + public QualifiedNameContext qualifiedName() { + return getRuleContext(QualifiedNameContext.class,0); + } + public AltAnnotationQualifiedNameContext altAnnotationQualifiedName() { + return getRuleContext(AltAnnotationQualifiedNameContext.class,0); + } + public ElementValuePairsContext elementValuePairs() { + return getRuleContext(ElementValuePairsContext.class,0); + } + public ElementValueContext elementValue() { + return getRuleContext(ElementValueContext.class,0); + } + public AnnotationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterAnnotation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitAnnotation(this); + } + } + + public final AnnotationContext annotation() throws RecognitionException { + AnnotationContext _localctx = new AnnotationContext(_ctx, getState()); + enterRule(_localctx, 112, RULE_annotation); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(828); + switch ( getInterpreter().adaptivePredict(_input,88,_ctx) ) { + case 1: + { + setState(825); + match(AT); + setState(826); + qualifiedName(); + } + break; + case 2: + { + setState(827); + altAnnotationQualifiedName(); + } + break; + } + setState(836); + _la = _input.LA(1); + if (_la==LPAREN) { + { + setState(830); + match(LPAREN); + setState(833); + switch ( getInterpreter().adaptivePredict(_input,89,_ctx) ) { + case 1: + { + setState(831); + elementValuePairs(); + } + break; + case 2: + { + setState(832); + elementValue(); + } + break; + } + setState(835); + match(RPAREN); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValuePairsContext extends ParserRuleContext { + public List elementValuePair() { + return getRuleContexts(ElementValuePairContext.class); + } + public ElementValuePairContext elementValuePair(int i) { + return getRuleContext(ElementValuePairContext.class,i); + } + public ElementValuePairsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValuePairs; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterElementValuePairs(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitElementValuePairs(this); + } + } + + public final ElementValuePairsContext elementValuePairs() throws RecognitionException { + ElementValuePairsContext _localctx = new ElementValuePairsContext(_ctx, getState()); + enterRule(_localctx, 114, RULE_elementValuePairs); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(838); + elementValuePair(); + setState(843); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(839); + match(COMMA); + setState(840); + elementValuePair(); + } + } + setState(845); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValuePairContext extends ParserRuleContext { + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public ElementValueContext elementValue() { + return getRuleContext(ElementValueContext.class,0); + } + public ElementValuePairContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValuePair; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterElementValuePair(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitElementValuePair(this); + } + } + + public final ElementValuePairContext elementValuePair() throws RecognitionException { + ElementValuePairContext _localctx = new ElementValuePairContext(_ctx, getState()); + enterRule(_localctx, 116, RULE_elementValuePair); + try { + enterOuterAlt(_localctx, 1); + { + setState(846); + identifier(); + setState(847); + match(ASSIGN); + setState(848); + elementValue(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValueContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public AnnotationContext annotation() { + return getRuleContext(AnnotationContext.class,0); + } + public ElementValueArrayInitializerContext elementValueArrayInitializer() { + return getRuleContext(ElementValueArrayInitializerContext.class,0); + } + public ElementValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValue; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterElementValue(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitElementValue(this); + } + } + + public final ElementValueContext elementValue() throws RecognitionException { + ElementValueContext _localctx = new ElementValueContext(_ctx, getState()); + enterRule(_localctx, 118, RULE_elementValue); + try { + setState(853); + switch ( getInterpreter().adaptivePredict(_input,92,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(850); + expression(0); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(851); + annotation(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(852); + elementValueArrayInitializer(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValueArrayInitializerContext extends ParserRuleContext { + public List elementValue() { + return getRuleContexts(ElementValueContext.class); + } + public ElementValueContext elementValue(int i) { + return getRuleContext(ElementValueContext.class,i); + } + public ElementValueArrayInitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValueArrayInitializer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterElementValueArrayInitializer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitElementValueArrayInitializer(this); + } + } + + public final ElementValueArrayInitializerContext elementValueArrayInitializer() throws RecognitionException { + ElementValueArrayInitializerContext _localctx = new ElementValueArrayInitializerContext(_ctx, getState()); + enterRule(_localctx, 120, RULE_elementValueArrayInitializer); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(855); + match(LBRACE); + setState(864); + _la = _input.LA(1); + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (BOOLEAN - 3)) | (1L << (BYTE - 3)) | (1L << (CHAR - 3)) | (1L << (DOUBLE - 3)) | (1L << (FLOAT - 3)) | (1L << (INT - 3)) | (1L << (LONG - 3)) | (1L << (NEW - 3)) | (1L << (SHORT - 3)) | (1L << (SUPER - 3)) | (1L << (SWITCH - 3)) | (1L << (THIS - 3)) | (1L << (VOID - 3)) | (1L << (MODULE - 3)) | (1L << (OPEN - 3)) | (1L << (REQUIRES - 3)) | (1L << (EXPORTS - 3)) | (1L << (OPENS - 3)) | (1L << (TO - 3)) | (1L << (USES - 3)) | (1L << (PROVIDES - 3)) | (1L << (WITH - 3)) | (1L << (TRANSITIVE - 3)) | (1L << (VAR - 3)) | (1L << (YIELD - 3)) | (1L << (RECORD - 3)) | (1L << (SEALED - 3)) | (1L << (PERMITS - 3)))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (DECIMAL_LITERAL - 67)) | (1L << (HEX_LITERAL - 67)) | (1L << (OCT_LITERAL - 67)) | (1L << (BINARY_LITERAL - 67)) | (1L << (FLOAT_LITERAL - 67)) | (1L << (HEX_FLOAT_LITERAL - 67)) | (1L << (BOOL_LITERAL - 67)) | (1L << (CHAR_LITERAL - 67)) | (1L << (STRING_LITERAL - 67)) | (1L << (TEXT_BLOCK - 67)) | (1L << (NULL_LITERAL - 67)) | (1L << (LPAREN - 67)) | (1L << (LBRACE - 67)) | (1L << (LT - 67)) | (1L << (BANG - 67)) | (1L << (TILDE - 67)) | (1L << (INC - 67)) | (1L << (DEC - 67)) | (1L << (ADD - 67)) | (1L << (SUB - 67)) | (1L << (AT - 67)) | (1L << (IDENTIFIER - 67)))) != 0)) { + { + setState(856); + elementValue(); + setState(861); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,93,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(857); + match(COMMA); + setState(858); + elementValue(); + } + } + } + setState(863); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,93,_ctx); + } + } + } + + setState(867); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(866); + match(COMMA); + } + } + + setState(869); + match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeDeclarationContext extends ParserRuleContext { + public TerminalNode INTERFACE() { return getToken(JavaParser.INTERFACE, 0); } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public AnnotationTypeBodyContext annotationTypeBody() { + return getRuleContext(AnnotationTypeBodyContext.class,0); + } + public AnnotationTypeDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterAnnotationTypeDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitAnnotationTypeDeclaration(this); + } + } + + public final AnnotationTypeDeclarationContext annotationTypeDeclaration() throws RecognitionException { + AnnotationTypeDeclarationContext _localctx = new AnnotationTypeDeclarationContext(_ctx, getState()); + enterRule(_localctx, 122, RULE_annotationTypeDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(871); + match(AT); + setState(872); + match(INTERFACE); + setState(873); + identifier(); + setState(874); + annotationTypeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeBodyContext extends ParserRuleContext { + public List annotationTypeElementDeclaration() { + return getRuleContexts(AnnotationTypeElementDeclarationContext.class); + } + public AnnotationTypeElementDeclarationContext annotationTypeElementDeclaration(int i) { + return getRuleContext(AnnotationTypeElementDeclarationContext.class,i); + } + public AnnotationTypeBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterAnnotationTypeBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitAnnotationTypeBody(this); + } + } + + public final AnnotationTypeBodyContext annotationTypeBody() throws RecognitionException { + AnnotationTypeBodyContext _localctx = new AnnotationTypeBodyContext(_ctx, getState()); + enterRule(_localctx, 124, RULE_annotationTypeBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(876); + match(LBRACE); + setState(880); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 1)) & ~0x3f) == 0 && ((1L << (_la - 1)) & ((1L << (ABSTRACT - 1)) | (1L << (BOOLEAN - 1)) | (1L << (BYTE - 1)) | (1L << (CHAR - 1)) | (1L << (CLASS - 1)) | (1L << (DOUBLE - 1)) | (1L << (ENUM - 1)) | (1L << (FINAL - 1)) | (1L << (FLOAT - 1)) | (1L << (INT - 1)) | (1L << (INTERFACE - 1)) | (1L << (LONG - 1)) | (1L << (NATIVE - 1)) | (1L << (PRIVATE - 1)) | (1L << (PROTECTED - 1)) | (1L << (PUBLIC - 1)) | (1L << (SHORT - 1)) | (1L << (STATIC - 1)) | (1L << (STRICTFP - 1)) | (1L << (SYNCHRONIZED - 1)) | (1L << (TRANSIENT - 1)) | (1L << (VOLATILE - 1)) | (1L << (MODULE - 1)) | (1L << (OPEN - 1)) | (1L << (REQUIRES - 1)) | (1L << (EXPORTS - 1)) | (1L << (OPENS - 1)) | (1L << (TO - 1)) | (1L << (USES - 1)) | (1L << (PROVIDES - 1)) | (1L << (WITH - 1)) | (1L << (TRANSITIVE - 1)) | (1L << (VAR - 1)) | (1L << (YIELD - 1)) | (1L << (RECORD - 1)) | (1L << (SEALED - 1)))) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (PERMITS - 65)) | (1L << (NON_SEALED - 65)) | (1L << (SEMI - 65)) | (1L << (AT - 65)) | (1L << (IDENTIFIER - 65)))) != 0)) { + { + { + setState(877); + annotationTypeElementDeclaration(); + } + } + setState(882); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(883); + match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeElementDeclarationContext extends ParserRuleContext { + public AnnotationTypeElementRestContext annotationTypeElementRest() { + return getRuleContext(AnnotationTypeElementRestContext.class,0); + } + public List modifier() { + return getRuleContexts(ModifierContext.class); + } + public ModifierContext modifier(int i) { + return getRuleContext(ModifierContext.class,i); + } + public AnnotationTypeElementDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeElementDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterAnnotationTypeElementDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitAnnotationTypeElementDeclaration(this); + } + } + + public final AnnotationTypeElementDeclarationContext annotationTypeElementDeclaration() throws RecognitionException { + AnnotationTypeElementDeclarationContext _localctx = new AnnotationTypeElementDeclarationContext(_ctx, getState()); + enterRule(_localctx, 126, RULE_annotationTypeElementDeclaration); + try { + int _alt; + setState(893); + switch (_input.LA(1)) { + case ABSTRACT: + case BOOLEAN: + case BYTE: + case CHAR: + case CLASS: + case DOUBLE: + case ENUM: + case FINAL: + case FLOAT: + case INT: + case INTERFACE: + case LONG: + case NATIVE: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case SHORT: + case STATIC: + case STRICTFP: + case SYNCHRONIZED: + case TRANSIENT: + case VOLATILE: + case MODULE: + case OPEN: + case REQUIRES: + case EXPORTS: + case OPENS: + case TO: + case USES: + case PROVIDES: + case WITH: + case TRANSITIVE: + case VAR: + case YIELD: + case RECORD: + case SEALED: + case PERMITS: + case NON_SEALED: + case AT: + case IDENTIFIER: + enterOuterAlt(_localctx, 1); + { + setState(888); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,97,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(885); + modifier(); + } + } + } + setState(890); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,97,_ctx); + } + setState(891); + annotationTypeElementRest(); + } + break; + case SEMI: + enterOuterAlt(_localctx, 2); + { + setState(892); + match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeElementRestContext extends ParserRuleContext { + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public AnnotationMethodOrConstantRestContext annotationMethodOrConstantRest() { + return getRuleContext(AnnotationMethodOrConstantRestContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public RecordDeclarationContext recordDeclaration() { + return getRuleContext(RecordDeclarationContext.class,0); + } + public AnnotationTypeElementRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeElementRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterAnnotationTypeElementRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitAnnotationTypeElementRest(this); + } + } + + public final AnnotationTypeElementRestContext annotationTypeElementRest() throws RecognitionException { + AnnotationTypeElementRestContext _localctx = new AnnotationTypeElementRestContext(_ctx, getState()); + enterRule(_localctx, 128, RULE_annotationTypeElementRest); + try { + setState(919); + switch ( getInterpreter().adaptivePredict(_input,104,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(895); + typeType(); + setState(896); + annotationMethodOrConstantRest(); + setState(897); + match(SEMI); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(899); + classDeclaration(); + setState(901); + switch ( getInterpreter().adaptivePredict(_input,99,_ctx) ) { + case 1: + { + setState(900); + match(SEMI); + } + break; + } + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(903); + interfaceDeclaration(); + setState(905); + switch ( getInterpreter().adaptivePredict(_input,100,_ctx) ) { + case 1: + { + setState(904); + match(SEMI); + } + break; + } + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(907); + enumDeclaration(); + setState(909); + switch ( getInterpreter().adaptivePredict(_input,101,_ctx) ) { + case 1: + { + setState(908); + match(SEMI); + } + break; + } + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(911); + annotationTypeDeclaration(); + setState(913); + switch ( getInterpreter().adaptivePredict(_input,102,_ctx) ) { + case 1: + { + setState(912); + match(SEMI); + } + break; + } + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(915); + recordDeclaration(); + setState(917); + switch ( getInterpreter().adaptivePredict(_input,103,_ctx) ) { + case 1: + { + setState(916); + match(SEMI); + } + break; + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationMethodOrConstantRestContext extends ParserRuleContext { + public AnnotationMethodRestContext annotationMethodRest() { + return getRuleContext(AnnotationMethodRestContext.class,0); + } + public AnnotationConstantRestContext annotationConstantRest() { + return getRuleContext(AnnotationConstantRestContext.class,0); + } + public AnnotationMethodOrConstantRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationMethodOrConstantRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterAnnotationMethodOrConstantRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitAnnotationMethodOrConstantRest(this); + } + } + + public final AnnotationMethodOrConstantRestContext annotationMethodOrConstantRest() throws RecognitionException { + AnnotationMethodOrConstantRestContext _localctx = new AnnotationMethodOrConstantRestContext(_ctx, getState()); + enterRule(_localctx, 130, RULE_annotationMethodOrConstantRest); + try { + setState(923); + switch ( getInterpreter().adaptivePredict(_input,105,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(921); + annotationMethodRest(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(922); + annotationConstantRest(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationMethodRestContext extends ParserRuleContext { + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public DefaultValueContext defaultValue() { + return getRuleContext(DefaultValueContext.class,0); + } + public AnnotationMethodRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationMethodRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterAnnotationMethodRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitAnnotationMethodRest(this); + } + } + + public final AnnotationMethodRestContext annotationMethodRest() throws RecognitionException { + AnnotationMethodRestContext _localctx = new AnnotationMethodRestContext(_ctx, getState()); + enterRule(_localctx, 132, RULE_annotationMethodRest); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(925); + identifier(); + setState(926); + match(LPAREN); + setState(927); + match(RPAREN); + setState(929); + _la = _input.LA(1); + if (_la==DEFAULT) { + { + setState(928); + defaultValue(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationConstantRestContext extends ParserRuleContext { + public VariableDeclaratorsContext variableDeclarators() { + return getRuleContext(VariableDeclaratorsContext.class,0); + } + public AnnotationConstantRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationConstantRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterAnnotationConstantRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitAnnotationConstantRest(this); + } + } + + public final AnnotationConstantRestContext annotationConstantRest() throws RecognitionException { + AnnotationConstantRestContext _localctx = new AnnotationConstantRestContext(_ctx, getState()); + enterRule(_localctx, 134, RULE_annotationConstantRest); + try { + enterOuterAlt(_localctx, 1); + { + setState(931); + variableDeclarators(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DefaultValueContext extends ParserRuleContext { + public TerminalNode DEFAULT() { return getToken(JavaParser.DEFAULT, 0); } + public ElementValueContext elementValue() { + return getRuleContext(ElementValueContext.class,0); + } + public DefaultValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_defaultValue; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterDefaultValue(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitDefaultValue(this); + } + } + + public final DefaultValueContext defaultValue() throws RecognitionException { + DefaultValueContext _localctx = new DefaultValueContext(_ctx, getState()); + enterRule(_localctx, 136, RULE_defaultValue); + try { + enterOuterAlt(_localctx, 1); + { + setState(933); + match(DEFAULT); + setState(934); + elementValue(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ModuleDeclarationContext extends ParserRuleContext { + public TerminalNode MODULE() { return getToken(JavaParser.MODULE, 0); } + public QualifiedNameContext qualifiedName() { + return getRuleContext(QualifiedNameContext.class,0); + } + public ModuleBodyContext moduleBody() { + return getRuleContext(ModuleBodyContext.class,0); + } + public TerminalNode OPEN() { return getToken(JavaParser.OPEN, 0); } + public ModuleDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_moduleDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterModuleDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitModuleDeclaration(this); + } + } + + public final ModuleDeclarationContext moduleDeclaration() throws RecognitionException { + ModuleDeclarationContext _localctx = new ModuleDeclarationContext(_ctx, getState()); + enterRule(_localctx, 138, RULE_moduleDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(937); + _la = _input.LA(1); + if (_la==OPEN) { + { + setState(936); + match(OPEN); + } + } + + setState(939); + match(MODULE); + setState(940); + qualifiedName(); + setState(941); + moduleBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ModuleBodyContext extends ParserRuleContext { + public List moduleDirective() { + return getRuleContexts(ModuleDirectiveContext.class); + } + public ModuleDirectiveContext moduleDirective(int i) { + return getRuleContext(ModuleDirectiveContext.class,i); + } + public ModuleBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_moduleBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterModuleBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitModuleBody(this); + } + } + + public final ModuleBodyContext moduleBody() throws RecognitionException { + ModuleBodyContext _localctx = new ModuleBodyContext(_ctx, getState()); + enterRule(_localctx, 140, RULE_moduleBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(943); + match(LBRACE); + setState(947); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << REQUIRES) | (1L << EXPORTS) | (1L << OPENS) | (1L << USES) | (1L << PROVIDES))) != 0)) { + { + { + setState(944); + moduleDirective(); + } + } + setState(949); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(950); + match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ModuleDirectiveContext extends ParserRuleContext { + public TerminalNode REQUIRES() { return getToken(JavaParser.REQUIRES, 0); } + public List qualifiedName() { + return getRuleContexts(QualifiedNameContext.class); + } + public QualifiedNameContext qualifiedName(int i) { + return getRuleContext(QualifiedNameContext.class,i); + } + public List requiresModifier() { + return getRuleContexts(RequiresModifierContext.class); + } + public RequiresModifierContext requiresModifier(int i) { + return getRuleContext(RequiresModifierContext.class,i); + } + public TerminalNode EXPORTS() { return getToken(JavaParser.EXPORTS, 0); } + public TerminalNode TO() { return getToken(JavaParser.TO, 0); } + public TerminalNode OPENS() { return getToken(JavaParser.OPENS, 0); } + public TerminalNode USES() { return getToken(JavaParser.USES, 0); } + public TerminalNode PROVIDES() { return getToken(JavaParser.PROVIDES, 0); } + public TerminalNode WITH() { return getToken(JavaParser.WITH, 0); } + public ModuleDirectiveContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_moduleDirective; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterModuleDirective(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitModuleDirective(this); + } + } + + public final ModuleDirectiveContext moduleDirective() throws RecognitionException { + ModuleDirectiveContext _localctx = new ModuleDirectiveContext(_ctx, getState()); + enterRule(_localctx, 142, RULE_moduleDirective); + int _la; + try { + int _alt; + setState(988); + switch (_input.LA(1)) { + case REQUIRES: + enterOuterAlt(_localctx, 1); + { + setState(952); + match(REQUIRES); + setState(956); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,109,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(953); + requiresModifier(); + } + } + } + setState(958); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,109,_ctx); + } + setState(959); + qualifiedName(); + setState(960); + match(SEMI); + } + break; + case EXPORTS: + enterOuterAlt(_localctx, 2); + { + setState(962); + match(EXPORTS); + setState(963); + qualifiedName(); + setState(966); + _la = _input.LA(1); + if (_la==TO) { + { + setState(964); + match(TO); + setState(965); + qualifiedName(); + } + } + + setState(968); + match(SEMI); + } + break; + case OPENS: + enterOuterAlt(_localctx, 3); + { + setState(970); + match(OPENS); + setState(971); + qualifiedName(); + setState(974); + _la = _input.LA(1); + if (_la==TO) { + { + setState(972); + match(TO); + setState(973); + qualifiedName(); + } + } + + setState(976); + match(SEMI); + } + break; + case USES: + enterOuterAlt(_localctx, 4); + { + setState(978); + match(USES); + setState(979); + qualifiedName(); + setState(980); + match(SEMI); + } + break; + case PROVIDES: + enterOuterAlt(_localctx, 5); + { + setState(982); + match(PROVIDES); + setState(983); + qualifiedName(); + setState(984); + match(WITH); + setState(985); + qualifiedName(); + setState(986); + match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RequiresModifierContext extends ParserRuleContext { + public TerminalNode TRANSITIVE() { return getToken(JavaParser.TRANSITIVE, 0); } + public TerminalNode STATIC() { return getToken(JavaParser.STATIC, 0); } + public RequiresModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_requiresModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterRequiresModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitRequiresModifier(this); + } + } + + public final RequiresModifierContext requiresModifier() throws RecognitionException { + RequiresModifierContext _localctx = new RequiresModifierContext(_ctx, getState()); + enterRule(_localctx, 144, RULE_requiresModifier); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(990); + _la = _input.LA(1); + if ( !(_la==STATIC || _la==TRANSITIVE) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RecordDeclarationContext extends ParserRuleContext { + public TerminalNode RECORD() { return getToken(JavaParser.RECORD, 0); } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public RecordHeaderContext recordHeader() { + return getRuleContext(RecordHeaderContext.class,0); + } + public RecordBodyContext recordBody() { + return getRuleContext(RecordBodyContext.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public TerminalNode IMPLEMENTS() { return getToken(JavaParser.IMPLEMENTS, 0); } + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public RecordDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_recordDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterRecordDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitRecordDeclaration(this); + } + } + + public final RecordDeclarationContext recordDeclaration() throws RecognitionException { + RecordDeclarationContext _localctx = new RecordDeclarationContext(_ctx, getState()); + enterRule(_localctx, 146, RULE_recordDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(992); + match(RECORD); + setState(993); + identifier(); + setState(995); + _la = _input.LA(1); + if (_la==LT) { + { + setState(994); + typeParameters(); + } + } + + setState(997); + recordHeader(); + setState(1000); + _la = _input.LA(1); + if (_la==IMPLEMENTS) { + { + setState(998); + match(IMPLEMENTS); + setState(999); + typeList(); + } + } + + setState(1002); + recordBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RecordHeaderContext extends ParserRuleContext { + public RecordComponentListContext recordComponentList() { + return getRuleContext(RecordComponentListContext.class,0); + } + public RecordHeaderContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_recordHeader; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterRecordHeader(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitRecordHeader(this); + } + } + + public final RecordHeaderContext recordHeader() throws RecognitionException { + RecordHeaderContext _localctx = new RecordHeaderContext(_ctx, getState()); + enterRule(_localctx, 148, RULE_recordHeader); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1004); + match(LPAREN); + setState(1006); + _la = _input.LA(1); + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (BOOLEAN - 3)) | (1L << (BYTE - 3)) | (1L << (CHAR - 3)) | (1L << (DOUBLE - 3)) | (1L << (FLOAT - 3)) | (1L << (INT - 3)) | (1L << (LONG - 3)) | (1L << (SHORT - 3)) | (1L << (MODULE - 3)) | (1L << (OPEN - 3)) | (1L << (REQUIRES - 3)) | (1L << (EXPORTS - 3)) | (1L << (OPENS - 3)) | (1L << (TO - 3)) | (1L << (USES - 3)) | (1L << (PROVIDES - 3)) | (1L << (WITH - 3)) | (1L << (TRANSITIVE - 3)) | (1L << (VAR - 3)) | (1L << (YIELD - 3)) | (1L << (RECORD - 3)) | (1L << (SEALED - 3)) | (1L << (PERMITS - 3)))) != 0) || _la==AT || _la==IDENTIFIER) { + { + setState(1005); + recordComponentList(); + } + } + + setState(1008); + match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RecordComponentListContext extends ParserRuleContext { + public List recordComponent() { + return getRuleContexts(RecordComponentContext.class); + } + public RecordComponentContext recordComponent(int i) { + return getRuleContext(RecordComponentContext.class,i); + } + public RecordComponentListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_recordComponentList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterRecordComponentList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitRecordComponentList(this); + } + } + + public final RecordComponentListContext recordComponentList() throws RecognitionException { + RecordComponentListContext _localctx = new RecordComponentListContext(_ctx, getState()); + enterRule(_localctx, 150, RULE_recordComponentList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1010); + recordComponent(); + setState(1015); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(1011); + match(COMMA); + setState(1012); + recordComponent(); + } + } + setState(1017); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RecordComponentContext extends ParserRuleContext { + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public RecordComponentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_recordComponent; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterRecordComponent(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitRecordComponent(this); + } + } + + public final RecordComponentContext recordComponent() throws RecognitionException { + RecordComponentContext _localctx = new RecordComponentContext(_ctx, getState()); + enterRule(_localctx, 152, RULE_recordComponent); + try { + enterOuterAlt(_localctx, 1); + { + setState(1018); + typeType(); + setState(1019); + identifier(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RecordBodyContext extends ParserRuleContext { + public List classBodyDeclaration() { + return getRuleContexts(ClassBodyDeclarationContext.class); + } + public ClassBodyDeclarationContext classBodyDeclaration(int i) { + return getRuleContext(ClassBodyDeclarationContext.class,i); + } + public List compactConstructorDeclaration() { + return getRuleContexts(CompactConstructorDeclarationContext.class); + } + public CompactConstructorDeclarationContext compactConstructorDeclaration(int i) { + return getRuleContext(CompactConstructorDeclarationContext.class,i); + } + public RecordBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_recordBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterRecordBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitRecordBody(this); + } + } + + public final RecordBodyContext recordBody() throws RecognitionException { + RecordBodyContext _localctx = new RecordBodyContext(_ctx, getState()); + enterRule(_localctx, 154, RULE_recordBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1021); + match(LBRACE); + setState(1026); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 1)) & ~0x3f) == 0 && ((1L << (_la - 1)) & ((1L << (ABSTRACT - 1)) | (1L << (BOOLEAN - 1)) | (1L << (BYTE - 1)) | (1L << (CHAR - 1)) | (1L << (CLASS - 1)) | (1L << (DOUBLE - 1)) | (1L << (ENUM - 1)) | (1L << (FINAL - 1)) | (1L << (FLOAT - 1)) | (1L << (INT - 1)) | (1L << (INTERFACE - 1)) | (1L << (LONG - 1)) | (1L << (NATIVE - 1)) | (1L << (PRIVATE - 1)) | (1L << (PROTECTED - 1)) | (1L << (PUBLIC - 1)) | (1L << (SHORT - 1)) | (1L << (STATIC - 1)) | (1L << (STRICTFP - 1)) | (1L << (SYNCHRONIZED - 1)) | (1L << (TRANSIENT - 1)) | (1L << (VOID - 1)) | (1L << (VOLATILE - 1)) | (1L << (MODULE - 1)) | (1L << (OPEN - 1)) | (1L << (REQUIRES - 1)) | (1L << (EXPORTS - 1)) | (1L << (OPENS - 1)) | (1L << (TO - 1)) | (1L << (USES - 1)) | (1L << (PROVIDES - 1)) | (1L << (WITH - 1)) | (1L << (TRANSITIVE - 1)) | (1L << (VAR - 1)) | (1L << (YIELD - 1)) | (1L << (RECORD - 1)) | (1L << (SEALED - 1)))) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (PERMITS - 65)) | (1L << (NON_SEALED - 65)) | (1L << (LBRACE - 65)) | (1L << (SEMI - 65)) | (1L << (LT - 65)) | (1L << (AT - 65)) | (1L << (IDENTIFIER - 65)))) != 0)) { + { + setState(1024); + switch ( getInterpreter().adaptivePredict(_input,117,_ctx) ) { + case 1: + { + setState(1022); + classBodyDeclaration(); + } + break; + case 2: + { + setState(1023); + compactConstructorDeclaration(); + } + break; + } + } + setState(1028); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1029); + match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BlockContext extends ParserRuleContext { + public List blockStatement() { + return getRuleContexts(BlockStatementContext.class); + } + public BlockStatementContext blockStatement(int i) { + return getRuleContext(BlockStatementContext.class,i); + } + public BlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_block; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitBlock(this); + } + } + + public final BlockContext block() throws RecognitionException { + BlockContext _localctx = new BlockContext(_ctx, getState()); + enterRule(_localctx, 156, RULE_block); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1031); + match(LBRACE); + setState(1035); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 1)) & ~0x3f) == 0 && ((1L << (_la - 1)) & ((1L << (ABSTRACT - 1)) | (1L << (ASSERT - 1)) | (1L << (BOOLEAN - 1)) | (1L << (BREAK - 1)) | (1L << (BYTE - 1)) | (1L << (CHAR - 1)) | (1L << (CLASS - 1)) | (1L << (CONTINUE - 1)) | (1L << (DO - 1)) | (1L << (DOUBLE - 1)) | (1L << (FINAL - 1)) | (1L << (FLOAT - 1)) | (1L << (FOR - 1)) | (1L << (IF - 1)) | (1L << (INT - 1)) | (1L << (INTERFACE - 1)) | (1L << (LONG - 1)) | (1L << (NEW - 1)) | (1L << (PRIVATE - 1)) | (1L << (PROTECTED - 1)) | (1L << (PUBLIC - 1)) | (1L << (RETURN - 1)) | (1L << (SHORT - 1)) | (1L << (STATIC - 1)) | (1L << (STRICTFP - 1)) | (1L << (SUPER - 1)) | (1L << (SWITCH - 1)) | (1L << (SYNCHRONIZED - 1)) | (1L << (THIS - 1)) | (1L << (THROW - 1)) | (1L << (TRY - 1)) | (1L << (VOID - 1)) | (1L << (WHILE - 1)) | (1L << (MODULE - 1)) | (1L << (OPEN - 1)) | (1L << (REQUIRES - 1)) | (1L << (EXPORTS - 1)) | (1L << (OPENS - 1)) | (1L << (TO - 1)) | (1L << (USES - 1)) | (1L << (PROVIDES - 1)) | (1L << (WITH - 1)) | (1L << (TRANSITIVE - 1)) | (1L << (VAR - 1)) | (1L << (YIELD - 1)) | (1L << (RECORD - 1)) | (1L << (SEALED - 1)))) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (PERMITS - 65)) | (1L << (NON_SEALED - 65)) | (1L << (DECIMAL_LITERAL - 65)) | (1L << (HEX_LITERAL - 65)) | (1L << (OCT_LITERAL - 65)) | (1L << (BINARY_LITERAL - 65)) | (1L << (FLOAT_LITERAL - 65)) | (1L << (HEX_FLOAT_LITERAL - 65)) | (1L << (BOOL_LITERAL - 65)) | (1L << (CHAR_LITERAL - 65)) | (1L << (STRING_LITERAL - 65)) | (1L << (TEXT_BLOCK - 65)) | (1L << (NULL_LITERAL - 65)) | (1L << (LPAREN - 65)) | (1L << (LBRACE - 65)) | (1L << (SEMI - 65)) | (1L << (LT - 65)) | (1L << (BANG - 65)) | (1L << (TILDE - 65)) | (1L << (INC - 65)) | (1L << (DEC - 65)) | (1L << (ADD - 65)) | (1L << (SUB - 65)) | (1L << (AT - 65)) | (1L << (IDENTIFIER - 65)))) != 0)) { + { + { + setState(1032); + blockStatement(); + } + } + setState(1037); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1038); + match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BlockStatementContext extends ParserRuleContext { + public LocalVariableDeclarationContext localVariableDeclaration() { + return getRuleContext(LocalVariableDeclarationContext.class,0); + } + public LocalTypeDeclarationContext localTypeDeclaration() { + return getRuleContext(LocalTypeDeclarationContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public BlockStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_blockStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterBlockStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitBlockStatement(this); + } + } + + public final BlockStatementContext blockStatement() throws RecognitionException { + BlockStatementContext _localctx = new BlockStatementContext(_ctx, getState()); + enterRule(_localctx, 158, RULE_blockStatement); + try { + setState(1045); + switch ( getInterpreter().adaptivePredict(_input,120,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1040); + localVariableDeclaration(); + setState(1041); + match(SEMI); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1043); + localTypeDeclaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1044); + statement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LocalVariableDeclarationContext extends ParserRuleContext { + public TerminalNode VAR() { return getToken(JavaParser.VAR, 0); } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public VariableDeclaratorsContext variableDeclarators() { + return getRuleContext(VariableDeclaratorsContext.class,0); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public LocalVariableDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_localVariableDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterLocalVariableDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitLocalVariableDeclaration(this); + } + } + + public final LocalVariableDeclarationContext localVariableDeclaration() throws RecognitionException { + LocalVariableDeclarationContext _localctx = new LocalVariableDeclarationContext(_ctx, getState()); + enterRule(_localctx, 160, RULE_localVariableDeclaration); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1050); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,121,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1047); + variableModifier(); + } + } + } + setState(1052); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,121,_ctx); + } + setState(1061); + switch ( getInterpreter().adaptivePredict(_input,122,_ctx) ) { + case 1: + { + setState(1053); + match(VAR); + setState(1054); + identifier(); + setState(1055); + match(ASSIGN); + setState(1056); + expression(0); + } + break; + case 2: + { + setState(1058); + typeType(); + setState(1059); + variableDeclarators(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IdentifierContext extends ParserRuleContext { + public TerminalNode IDENTIFIER() { return getToken(JavaParser.IDENTIFIER, 0); } + public TerminalNode MODULE() { return getToken(JavaParser.MODULE, 0); } + public TerminalNode OPEN() { return getToken(JavaParser.OPEN, 0); } + public TerminalNode REQUIRES() { return getToken(JavaParser.REQUIRES, 0); } + public TerminalNode EXPORTS() { return getToken(JavaParser.EXPORTS, 0); } + public TerminalNode OPENS() { return getToken(JavaParser.OPENS, 0); } + public TerminalNode TO() { return getToken(JavaParser.TO, 0); } + public TerminalNode USES() { return getToken(JavaParser.USES, 0); } + public TerminalNode PROVIDES() { return getToken(JavaParser.PROVIDES, 0); } + public TerminalNode WITH() { return getToken(JavaParser.WITH, 0); } + public TerminalNode TRANSITIVE() { return getToken(JavaParser.TRANSITIVE, 0); } + public TerminalNode YIELD() { return getToken(JavaParser.YIELD, 0); } + public TerminalNode SEALED() { return getToken(JavaParser.SEALED, 0); } + public TerminalNode PERMITS() { return getToken(JavaParser.PERMITS, 0); } + public TerminalNode RECORD() { return getToken(JavaParser.RECORD, 0); } + public TerminalNode VAR() { return getToken(JavaParser.VAR, 0); } + public IdentifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_identifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterIdentifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitIdentifier(this); + } + } + + public final IdentifierContext identifier() throws RecognitionException { + IdentifierContext _localctx = new IdentifierContext(_ctx, getState()); + enterRule(_localctx, 162, RULE_identifier); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1063); + _la = _input.LA(1); + if ( !(((((_la - 51)) & ~0x3f) == 0 && ((1L << (_la - 51)) & ((1L << (MODULE - 51)) | (1L << (OPEN - 51)) | (1L << (REQUIRES - 51)) | (1L << (EXPORTS - 51)) | (1L << (OPENS - 51)) | (1L << (TO - 51)) | (1L << (USES - 51)) | (1L << (PROVIDES - 51)) | (1L << (WITH - 51)) | (1L << (TRANSITIVE - 51)) | (1L << (VAR - 51)) | (1L << (YIELD - 51)) | (1L << (RECORD - 51)) | (1L << (SEALED - 51)) | (1L << (PERMITS - 51)))) != 0) || _la==IDENTIFIER) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeIdentifierContext extends ParserRuleContext { + public TerminalNode IDENTIFIER() { return getToken(JavaParser.IDENTIFIER, 0); } + public TerminalNode MODULE() { return getToken(JavaParser.MODULE, 0); } + public TerminalNode OPEN() { return getToken(JavaParser.OPEN, 0); } + public TerminalNode REQUIRES() { return getToken(JavaParser.REQUIRES, 0); } + public TerminalNode EXPORTS() { return getToken(JavaParser.EXPORTS, 0); } + public TerminalNode OPENS() { return getToken(JavaParser.OPENS, 0); } + public TerminalNode TO() { return getToken(JavaParser.TO, 0); } + public TerminalNode USES() { return getToken(JavaParser.USES, 0); } + public TerminalNode PROVIDES() { return getToken(JavaParser.PROVIDES, 0); } + public TerminalNode WITH() { return getToken(JavaParser.WITH, 0); } + public TerminalNode TRANSITIVE() { return getToken(JavaParser.TRANSITIVE, 0); } + public TerminalNode SEALED() { return getToken(JavaParser.SEALED, 0); } + public TerminalNode PERMITS() { return getToken(JavaParser.PERMITS, 0); } + public TerminalNode RECORD() { return getToken(JavaParser.RECORD, 0); } + public TypeIdentifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeIdentifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterTypeIdentifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitTypeIdentifier(this); + } + } + + public final TypeIdentifierContext typeIdentifier() throws RecognitionException { + TypeIdentifierContext _localctx = new TypeIdentifierContext(_ctx, getState()); + enterRule(_localctx, 164, RULE_typeIdentifier); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1065); + _la = _input.LA(1); + if ( !(((((_la - 51)) & ~0x3f) == 0 && ((1L << (_la - 51)) & ((1L << (MODULE - 51)) | (1L << (OPEN - 51)) | (1L << (REQUIRES - 51)) | (1L << (EXPORTS - 51)) | (1L << (OPENS - 51)) | (1L << (TO - 51)) | (1L << (USES - 51)) | (1L << (PROVIDES - 51)) | (1L << (WITH - 51)) | (1L << (TRANSITIVE - 51)) | (1L << (RECORD - 51)) | (1L << (SEALED - 51)) | (1L << (PERMITS - 51)))) != 0) || _la==IDENTIFIER) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LocalTypeDeclarationContext extends ParserRuleContext { + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public RecordDeclarationContext recordDeclaration() { + return getRuleContext(RecordDeclarationContext.class,0); + } + public List classOrInterfaceModifier() { + return getRuleContexts(ClassOrInterfaceModifierContext.class); + } + public ClassOrInterfaceModifierContext classOrInterfaceModifier(int i) { + return getRuleContext(ClassOrInterfaceModifierContext.class,i); + } + public LocalTypeDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_localTypeDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterLocalTypeDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitLocalTypeDeclaration(this); + } + } + + public final LocalTypeDeclarationContext localTypeDeclaration() throws RecognitionException { + LocalTypeDeclarationContext _localctx = new LocalTypeDeclarationContext(_ctx, getState()); + enterRule(_localctx, 166, RULE_localTypeDeclaration); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1070); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,123,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1067); + classOrInterfaceModifier(); + } + } + } + setState(1072); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,123,_ctx); + } + setState(1076); + switch (_input.LA(1)) { + case CLASS: + { + setState(1073); + classDeclaration(); + } + break; + case INTERFACE: + { + setState(1074); + interfaceDeclaration(); + } + break; + case RECORD: + { + setState(1075); + recordDeclaration(); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StatementContext extends ParserRuleContext { + public BlockContext blockLabel; + public ExpressionContext statementExpression; + public IdentifierContext identifierLabel; + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public TerminalNode ASSERT() { return getToken(JavaParser.ASSERT, 0); } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public TerminalNode IF() { return getToken(JavaParser.IF, 0); } + public ParExpressionContext parExpression() { + return getRuleContext(ParExpressionContext.class,0); + } + public List statement() { + return getRuleContexts(StatementContext.class); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public TerminalNode ELSE() { return getToken(JavaParser.ELSE, 0); } + public TerminalNode FOR() { return getToken(JavaParser.FOR, 0); } + public ForControlContext forControl() { + return getRuleContext(ForControlContext.class,0); + } + public TerminalNode WHILE() { return getToken(JavaParser.WHILE, 0); } + public TerminalNode DO() { return getToken(JavaParser.DO, 0); } + public TerminalNode TRY() { return getToken(JavaParser.TRY, 0); } + public FinallyBlockContext finallyBlock() { + return getRuleContext(FinallyBlockContext.class,0); + } + public List catchClause() { + return getRuleContexts(CatchClauseContext.class); + } + public CatchClauseContext catchClause(int i) { + return getRuleContext(CatchClauseContext.class,i); + } + public ResourceSpecificationContext resourceSpecification() { + return getRuleContext(ResourceSpecificationContext.class,0); + } + public TerminalNode SWITCH() { return getToken(JavaParser.SWITCH, 0); } + public List switchBlockStatementGroup() { + return getRuleContexts(SwitchBlockStatementGroupContext.class); + } + public SwitchBlockStatementGroupContext switchBlockStatementGroup(int i) { + return getRuleContext(SwitchBlockStatementGroupContext.class,i); + } + public List switchLabel() { + return getRuleContexts(SwitchLabelContext.class); + } + public SwitchLabelContext switchLabel(int i) { + return getRuleContext(SwitchLabelContext.class,i); + } + public TerminalNode SYNCHRONIZED() { return getToken(JavaParser.SYNCHRONIZED, 0); } + public TerminalNode RETURN() { return getToken(JavaParser.RETURN, 0); } + public TerminalNode THROW() { return getToken(JavaParser.THROW, 0); } + public TerminalNode BREAK() { return getToken(JavaParser.BREAK, 0); } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public TerminalNode CONTINUE() { return getToken(JavaParser.CONTINUE, 0); } + public TerminalNode YIELD() { return getToken(JavaParser.YIELD, 0); } + public TerminalNode SEMI() { return getToken(JavaParser.SEMI, 0); } + public SwitchExpressionContext switchExpression() { + return getRuleContext(SwitchExpressionContext.class,0); + } + public StatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitStatement(this); + } + } + + public final StatementContext statement() throws RecognitionException { + StatementContext _localctx = new StatementContext(_ctx, getState()); + enterRule(_localctx, 168, RULE_statement); + int _la; + try { + int _alt; + setState(1191); + switch ( getInterpreter().adaptivePredict(_input,138,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1078); + ((StatementContext)_localctx).blockLabel = block(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1079); + match(ASSERT); + setState(1080); + expression(0); + setState(1083); + _la = _input.LA(1); + if (_la==COLON) { + { + setState(1081); + match(COLON); + setState(1082); + expression(0); + } + } + + setState(1085); + match(SEMI); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1087); + match(IF); + setState(1088); + parExpression(); + setState(1089); + statement(); + setState(1092); + switch ( getInterpreter().adaptivePredict(_input,126,_ctx) ) { + case 1: + { + setState(1090); + match(ELSE); + setState(1091); + statement(); + } + break; + } + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(1094); + match(FOR); + setState(1095); + match(LPAREN); + setState(1096); + forControl(); + setState(1097); + match(RPAREN); + setState(1098); + statement(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(1100); + match(WHILE); + setState(1101); + parExpression(); + setState(1102); + statement(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(1104); + match(DO); + setState(1105); + statement(); + setState(1106); + match(WHILE); + setState(1107); + parExpression(); + setState(1108); + match(SEMI); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(1110); + match(TRY); + setState(1111); + block(); + setState(1121); + switch (_input.LA(1)) { + case CATCH: + { + setState(1113); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(1112); + catchClause(); + } + } + setState(1115); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==CATCH ); + setState(1118); + _la = _input.LA(1); + if (_la==FINALLY) { + { + setState(1117); + finallyBlock(); + } + } + + } + break; + case FINALLY: + { + setState(1120); + finallyBlock(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(1123); + match(TRY); + setState(1124); + resourceSpecification(); + setState(1125); + block(); + setState(1129); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==CATCH) { + { + { + setState(1126); + catchClause(); + } + } + setState(1131); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1133); + _la = _input.LA(1); + if (_la==FINALLY) { + { + setState(1132); + finallyBlock(); + } + } + + } + break; + case 9: + enterOuterAlt(_localctx, 9); + { + setState(1135); + match(SWITCH); + setState(1136); + parExpression(); + setState(1137); + match(LBRACE); + setState(1141); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,132,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1138); + switchBlockStatementGroup(); + } + } + } + setState(1143); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,132,_ctx); + } + setState(1147); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==CASE || _la==DEFAULT) { + { + { + setState(1144); + switchLabel(); + } + } + setState(1149); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1150); + match(RBRACE); + } + break; + case 10: + enterOuterAlt(_localctx, 10); + { + setState(1152); + match(SYNCHRONIZED); + setState(1153); + parExpression(); + setState(1154); + block(); + } + break; + case 11: + enterOuterAlt(_localctx, 11); + { + setState(1156); + match(RETURN); + setState(1158); + _la = _input.LA(1); + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (BOOLEAN - 3)) | (1L << (BYTE - 3)) | (1L << (CHAR - 3)) | (1L << (DOUBLE - 3)) | (1L << (FLOAT - 3)) | (1L << (INT - 3)) | (1L << (LONG - 3)) | (1L << (NEW - 3)) | (1L << (SHORT - 3)) | (1L << (SUPER - 3)) | (1L << (SWITCH - 3)) | (1L << (THIS - 3)) | (1L << (VOID - 3)) | (1L << (MODULE - 3)) | (1L << (OPEN - 3)) | (1L << (REQUIRES - 3)) | (1L << (EXPORTS - 3)) | (1L << (OPENS - 3)) | (1L << (TO - 3)) | (1L << (USES - 3)) | (1L << (PROVIDES - 3)) | (1L << (WITH - 3)) | (1L << (TRANSITIVE - 3)) | (1L << (VAR - 3)) | (1L << (YIELD - 3)) | (1L << (RECORD - 3)) | (1L << (SEALED - 3)) | (1L << (PERMITS - 3)))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (DECIMAL_LITERAL - 67)) | (1L << (HEX_LITERAL - 67)) | (1L << (OCT_LITERAL - 67)) | (1L << (BINARY_LITERAL - 67)) | (1L << (FLOAT_LITERAL - 67)) | (1L << (HEX_FLOAT_LITERAL - 67)) | (1L << (BOOL_LITERAL - 67)) | (1L << (CHAR_LITERAL - 67)) | (1L << (STRING_LITERAL - 67)) | (1L << (TEXT_BLOCK - 67)) | (1L << (NULL_LITERAL - 67)) | (1L << (LPAREN - 67)) | (1L << (LT - 67)) | (1L << (BANG - 67)) | (1L << (TILDE - 67)) | (1L << (INC - 67)) | (1L << (DEC - 67)) | (1L << (ADD - 67)) | (1L << (SUB - 67)) | (1L << (AT - 67)) | (1L << (IDENTIFIER - 67)))) != 0)) { + { + setState(1157); + expression(0); + } + } + + setState(1160); + match(SEMI); + } + break; + case 12: + enterOuterAlt(_localctx, 12); + { + setState(1161); + match(THROW); + setState(1162); + expression(0); + setState(1163); + match(SEMI); + } + break; + case 13: + enterOuterAlt(_localctx, 13); + { + setState(1165); + match(BREAK); + setState(1167); + _la = _input.LA(1); + if (((((_la - 51)) & ~0x3f) == 0 && ((1L << (_la - 51)) & ((1L << (MODULE - 51)) | (1L << (OPEN - 51)) | (1L << (REQUIRES - 51)) | (1L << (EXPORTS - 51)) | (1L << (OPENS - 51)) | (1L << (TO - 51)) | (1L << (USES - 51)) | (1L << (PROVIDES - 51)) | (1L << (WITH - 51)) | (1L << (TRANSITIVE - 51)) | (1L << (VAR - 51)) | (1L << (YIELD - 51)) | (1L << (RECORD - 51)) | (1L << (SEALED - 51)) | (1L << (PERMITS - 51)))) != 0) || _la==IDENTIFIER) { + { + setState(1166); + identifier(); + } + } + + setState(1169); + match(SEMI); + } + break; + case 14: + enterOuterAlt(_localctx, 14); + { + setState(1170); + match(CONTINUE); + setState(1172); + _la = _input.LA(1); + if (((((_la - 51)) & ~0x3f) == 0 && ((1L << (_la - 51)) & ((1L << (MODULE - 51)) | (1L << (OPEN - 51)) | (1L << (REQUIRES - 51)) | (1L << (EXPORTS - 51)) | (1L << (OPENS - 51)) | (1L << (TO - 51)) | (1L << (USES - 51)) | (1L << (PROVIDES - 51)) | (1L << (WITH - 51)) | (1L << (TRANSITIVE - 51)) | (1L << (VAR - 51)) | (1L << (YIELD - 51)) | (1L << (RECORD - 51)) | (1L << (SEALED - 51)) | (1L << (PERMITS - 51)))) != 0) || _la==IDENTIFIER) { + { + setState(1171); + identifier(); + } + } + + setState(1174); + match(SEMI); + } + break; + case 15: + enterOuterAlt(_localctx, 15); + { + setState(1175); + match(YIELD); + setState(1176); + expression(0); + setState(1177); + match(SEMI); + } + break; + case 16: + enterOuterAlt(_localctx, 16); + { + setState(1179); + match(SEMI); + } + break; + case 17: + enterOuterAlt(_localctx, 17); + { + setState(1180); + ((StatementContext)_localctx).statementExpression = expression(0); + setState(1181); + match(SEMI); + } + break; + case 18: + enterOuterAlt(_localctx, 18); + { + setState(1183); + switchExpression(); + setState(1185); + switch ( getInterpreter().adaptivePredict(_input,137,_ctx) ) { + case 1: + { + setState(1184); + match(SEMI); + } + break; + } + } + break; + case 19: + enterOuterAlt(_localctx, 19); + { + setState(1187); + ((StatementContext)_localctx).identifierLabel = identifier(); + setState(1188); + match(COLON); + setState(1189); + statement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CatchClauseContext extends ParserRuleContext { + public TerminalNode CATCH() { return getToken(JavaParser.CATCH, 0); } + public CatchTypeContext catchType() { + return getRuleContext(CatchTypeContext.class,0); + } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public CatchClauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_catchClause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterCatchClause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitCatchClause(this); + } + } + + public final CatchClauseContext catchClause() throws RecognitionException { + CatchClauseContext _localctx = new CatchClauseContext(_ctx, getState()); + enterRule(_localctx, 170, RULE_catchClause); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1193); + match(CATCH); + setState(1194); + match(LPAREN); + setState(1198); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,139,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1195); + variableModifier(); + } + } + } + setState(1200); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,139,_ctx); + } + setState(1201); + catchType(); + setState(1202); + identifier(); + setState(1203); + match(RPAREN); + setState(1204); + block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CatchTypeContext extends ParserRuleContext { + public List qualifiedName() { + return getRuleContexts(QualifiedNameContext.class); + } + public QualifiedNameContext qualifiedName(int i) { + return getRuleContext(QualifiedNameContext.class,i); + } + public CatchTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_catchType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterCatchType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitCatchType(this); + } + } + + public final CatchTypeContext catchType() throws RecognitionException { + CatchTypeContext _localctx = new CatchTypeContext(_ctx, getState()); + enterRule(_localctx, 172, RULE_catchType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1206); + qualifiedName(); + setState(1211); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==BITOR) { + { + { + setState(1207); + match(BITOR); + setState(1208); + qualifiedName(); + } + } + setState(1213); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FinallyBlockContext extends ParserRuleContext { + public TerminalNode FINALLY() { return getToken(JavaParser.FINALLY, 0); } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public FinallyBlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_finallyBlock; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterFinallyBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitFinallyBlock(this); + } + } + + public final FinallyBlockContext finallyBlock() throws RecognitionException { + FinallyBlockContext _localctx = new FinallyBlockContext(_ctx, getState()); + enterRule(_localctx, 174, RULE_finallyBlock); + try { + enterOuterAlt(_localctx, 1); + { + setState(1214); + match(FINALLY); + setState(1215); + block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ResourceSpecificationContext extends ParserRuleContext { + public ResourcesContext resources() { + return getRuleContext(ResourcesContext.class,0); + } + public ResourceSpecificationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_resourceSpecification; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterResourceSpecification(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitResourceSpecification(this); + } + } + + public final ResourceSpecificationContext resourceSpecification() throws RecognitionException { + ResourceSpecificationContext _localctx = new ResourceSpecificationContext(_ctx, getState()); + enterRule(_localctx, 176, RULE_resourceSpecification); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1217); + match(LPAREN); + setState(1218); + resources(); + setState(1220); + _la = _input.LA(1); + if (_la==SEMI) { + { + setState(1219); + match(SEMI); + } + } + + setState(1222); + match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ResourcesContext extends ParserRuleContext { + public List resource() { + return getRuleContexts(ResourceContext.class); + } + public ResourceContext resource(int i) { + return getRuleContext(ResourceContext.class,i); + } + public ResourcesContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_resources; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterResources(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitResources(this); + } + } + + public final ResourcesContext resources() throws RecognitionException { + ResourcesContext _localctx = new ResourcesContext(_ctx, getState()); + enterRule(_localctx, 178, RULE_resources); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1224); + resource(); + setState(1229); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,142,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1225); + match(SEMI); + setState(1226); + resource(); + } + } + } + setState(1231); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,142,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ResourceContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ClassOrInterfaceTypeContext classOrInterfaceType() { + return getRuleContext(ClassOrInterfaceTypeContext.class,0); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public TerminalNode VAR() { return getToken(JavaParser.VAR, 0); } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public QualifiedNameContext qualifiedName() { + return getRuleContext(QualifiedNameContext.class,0); + } + public ResourceContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_resource; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterResource(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitResource(this); + } + } + + public final ResourceContext resource() throws RecognitionException { + ResourceContext _localctx = new ResourceContext(_ctx, getState()); + enterRule(_localctx, 180, RULE_resource); + try { + int _alt; + setState(1249); + switch ( getInterpreter().adaptivePredict(_input,145,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1235); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,143,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1232); + variableModifier(); + } + } + } + setState(1237); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,143,_ctx); + } + setState(1243); + switch ( getInterpreter().adaptivePredict(_input,144,_ctx) ) { + case 1: + { + setState(1238); + classOrInterfaceType(); + setState(1239); + variableDeclaratorId(); + } + break; + case 2: + { + setState(1241); + match(VAR); + setState(1242); + identifier(); + } + break; + } + setState(1245); + match(ASSIGN); + setState(1246); + expression(0); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1248); + qualifiedName(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SwitchBlockStatementGroupContext extends ParserRuleContext { + public List switchLabel() { + return getRuleContexts(SwitchLabelContext.class); + } + public SwitchLabelContext switchLabel(int i) { + return getRuleContext(SwitchLabelContext.class,i); + } + public List blockStatement() { + return getRuleContexts(BlockStatementContext.class); + } + public BlockStatementContext blockStatement(int i) { + return getRuleContext(BlockStatementContext.class,i); + } + public SwitchBlockStatementGroupContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_switchBlockStatementGroup; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterSwitchBlockStatementGroup(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitSwitchBlockStatementGroup(this); + } + } + + public final SwitchBlockStatementGroupContext switchBlockStatementGroup() throws RecognitionException { + SwitchBlockStatementGroupContext _localctx = new SwitchBlockStatementGroupContext(_ctx, getState()); + enterRule(_localctx, 182, RULE_switchBlockStatementGroup); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1252); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(1251); + switchLabel(); + } + } + setState(1254); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==CASE || _la==DEFAULT ); + setState(1257); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(1256); + blockStatement(); + } + } + setState(1259); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( ((((_la - 1)) & ~0x3f) == 0 && ((1L << (_la - 1)) & ((1L << (ABSTRACT - 1)) | (1L << (ASSERT - 1)) | (1L << (BOOLEAN - 1)) | (1L << (BREAK - 1)) | (1L << (BYTE - 1)) | (1L << (CHAR - 1)) | (1L << (CLASS - 1)) | (1L << (CONTINUE - 1)) | (1L << (DO - 1)) | (1L << (DOUBLE - 1)) | (1L << (FINAL - 1)) | (1L << (FLOAT - 1)) | (1L << (FOR - 1)) | (1L << (IF - 1)) | (1L << (INT - 1)) | (1L << (INTERFACE - 1)) | (1L << (LONG - 1)) | (1L << (NEW - 1)) | (1L << (PRIVATE - 1)) | (1L << (PROTECTED - 1)) | (1L << (PUBLIC - 1)) | (1L << (RETURN - 1)) | (1L << (SHORT - 1)) | (1L << (STATIC - 1)) | (1L << (STRICTFP - 1)) | (1L << (SUPER - 1)) | (1L << (SWITCH - 1)) | (1L << (SYNCHRONIZED - 1)) | (1L << (THIS - 1)) | (1L << (THROW - 1)) | (1L << (TRY - 1)) | (1L << (VOID - 1)) | (1L << (WHILE - 1)) | (1L << (MODULE - 1)) | (1L << (OPEN - 1)) | (1L << (REQUIRES - 1)) | (1L << (EXPORTS - 1)) | (1L << (OPENS - 1)) | (1L << (TO - 1)) | (1L << (USES - 1)) | (1L << (PROVIDES - 1)) | (1L << (WITH - 1)) | (1L << (TRANSITIVE - 1)) | (1L << (VAR - 1)) | (1L << (YIELD - 1)) | (1L << (RECORD - 1)) | (1L << (SEALED - 1)))) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (PERMITS - 65)) | (1L << (NON_SEALED - 65)) | (1L << (DECIMAL_LITERAL - 65)) | (1L << (HEX_LITERAL - 65)) | (1L << (OCT_LITERAL - 65)) | (1L << (BINARY_LITERAL - 65)) | (1L << (FLOAT_LITERAL - 65)) | (1L << (HEX_FLOAT_LITERAL - 65)) | (1L << (BOOL_LITERAL - 65)) | (1L << (CHAR_LITERAL - 65)) | (1L << (STRING_LITERAL - 65)) | (1L << (TEXT_BLOCK - 65)) | (1L << (NULL_LITERAL - 65)) | (1L << (LPAREN - 65)) | (1L << (LBRACE - 65)) | (1L << (SEMI - 65)) | (1L << (LT - 65)) | (1L << (BANG - 65)) | (1L << (TILDE - 65)) | (1L << (INC - 65)) | (1L << (DEC - 65)) | (1L << (ADD - 65)) | (1L << (SUB - 65)) | (1L << (AT - 65)) | (1L << (IDENTIFIER - 65)))) != 0) ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SwitchLabelContext extends ParserRuleContext { + public ExpressionContext constantExpression; + public Token enumConstantName; + public IdentifierContext varName; + public TerminalNode CASE() { return getToken(JavaParser.CASE, 0); } + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode IDENTIFIER() { return getToken(JavaParser.IDENTIFIER, 0); } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public TerminalNode DEFAULT() { return getToken(JavaParser.DEFAULT, 0); } + public SwitchLabelContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_switchLabel; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterSwitchLabel(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitSwitchLabel(this); + } + } + + public final SwitchLabelContext switchLabel() throws RecognitionException { + SwitchLabelContext _localctx = new SwitchLabelContext(_ctx, getState()); + enterRule(_localctx, 184, RULE_switchLabel); + try { + setState(1272); + switch (_input.LA(1)) { + case CASE: + enterOuterAlt(_localctx, 1); + { + setState(1261); + match(CASE); + setState(1267); + switch ( getInterpreter().adaptivePredict(_input,148,_ctx) ) { + case 1: + { + setState(1262); + ((SwitchLabelContext)_localctx).constantExpression = expression(0); + } + break; + case 2: + { + setState(1263); + ((SwitchLabelContext)_localctx).enumConstantName = match(IDENTIFIER); + } + break; + case 3: + { + setState(1264); + typeType(); + setState(1265); + ((SwitchLabelContext)_localctx).varName = identifier(); + } + break; + } + setState(1269); + match(COLON); + } + break; + case DEFAULT: + enterOuterAlt(_localctx, 2); + { + setState(1270); + match(DEFAULT); + setState(1271); + match(COLON); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ForControlContext extends ParserRuleContext { + public ExpressionListContext forUpdate; + public EnhancedForControlContext enhancedForControl() { + return getRuleContext(EnhancedForControlContext.class,0); + } + public ForInitContext forInit() { + return getRuleContext(ForInitContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public ForControlContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forControl; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterForControl(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitForControl(this); + } + } + + public final ForControlContext forControl() throws RecognitionException { + ForControlContext _localctx = new ForControlContext(_ctx, getState()); + enterRule(_localctx, 186, RULE_forControl); + int _la; + try { + setState(1286); + switch ( getInterpreter().adaptivePredict(_input,153,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1274); + enhancedForControl(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1276); + _la = _input.LA(1); + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (BOOLEAN - 3)) | (1L << (BYTE - 3)) | (1L << (CHAR - 3)) | (1L << (DOUBLE - 3)) | (1L << (FINAL - 3)) | (1L << (FLOAT - 3)) | (1L << (INT - 3)) | (1L << (LONG - 3)) | (1L << (NEW - 3)) | (1L << (SHORT - 3)) | (1L << (SUPER - 3)) | (1L << (SWITCH - 3)) | (1L << (THIS - 3)) | (1L << (VOID - 3)) | (1L << (MODULE - 3)) | (1L << (OPEN - 3)) | (1L << (REQUIRES - 3)) | (1L << (EXPORTS - 3)) | (1L << (OPENS - 3)) | (1L << (TO - 3)) | (1L << (USES - 3)) | (1L << (PROVIDES - 3)) | (1L << (WITH - 3)) | (1L << (TRANSITIVE - 3)) | (1L << (VAR - 3)) | (1L << (YIELD - 3)) | (1L << (RECORD - 3)) | (1L << (SEALED - 3)) | (1L << (PERMITS - 3)))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (DECIMAL_LITERAL - 67)) | (1L << (HEX_LITERAL - 67)) | (1L << (OCT_LITERAL - 67)) | (1L << (BINARY_LITERAL - 67)) | (1L << (FLOAT_LITERAL - 67)) | (1L << (HEX_FLOAT_LITERAL - 67)) | (1L << (BOOL_LITERAL - 67)) | (1L << (CHAR_LITERAL - 67)) | (1L << (STRING_LITERAL - 67)) | (1L << (TEXT_BLOCK - 67)) | (1L << (NULL_LITERAL - 67)) | (1L << (LPAREN - 67)) | (1L << (LT - 67)) | (1L << (BANG - 67)) | (1L << (TILDE - 67)) | (1L << (INC - 67)) | (1L << (DEC - 67)) | (1L << (ADD - 67)) | (1L << (SUB - 67)) | (1L << (AT - 67)) | (1L << (IDENTIFIER - 67)))) != 0)) { + { + setState(1275); + forInit(); + } + } + + setState(1278); + match(SEMI); + setState(1280); + _la = _input.LA(1); + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (BOOLEAN - 3)) | (1L << (BYTE - 3)) | (1L << (CHAR - 3)) | (1L << (DOUBLE - 3)) | (1L << (FLOAT - 3)) | (1L << (INT - 3)) | (1L << (LONG - 3)) | (1L << (NEW - 3)) | (1L << (SHORT - 3)) | (1L << (SUPER - 3)) | (1L << (SWITCH - 3)) | (1L << (THIS - 3)) | (1L << (VOID - 3)) | (1L << (MODULE - 3)) | (1L << (OPEN - 3)) | (1L << (REQUIRES - 3)) | (1L << (EXPORTS - 3)) | (1L << (OPENS - 3)) | (1L << (TO - 3)) | (1L << (USES - 3)) | (1L << (PROVIDES - 3)) | (1L << (WITH - 3)) | (1L << (TRANSITIVE - 3)) | (1L << (VAR - 3)) | (1L << (YIELD - 3)) | (1L << (RECORD - 3)) | (1L << (SEALED - 3)) | (1L << (PERMITS - 3)))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (DECIMAL_LITERAL - 67)) | (1L << (HEX_LITERAL - 67)) | (1L << (OCT_LITERAL - 67)) | (1L << (BINARY_LITERAL - 67)) | (1L << (FLOAT_LITERAL - 67)) | (1L << (HEX_FLOAT_LITERAL - 67)) | (1L << (BOOL_LITERAL - 67)) | (1L << (CHAR_LITERAL - 67)) | (1L << (STRING_LITERAL - 67)) | (1L << (TEXT_BLOCK - 67)) | (1L << (NULL_LITERAL - 67)) | (1L << (LPAREN - 67)) | (1L << (LT - 67)) | (1L << (BANG - 67)) | (1L << (TILDE - 67)) | (1L << (INC - 67)) | (1L << (DEC - 67)) | (1L << (ADD - 67)) | (1L << (SUB - 67)) | (1L << (AT - 67)) | (1L << (IDENTIFIER - 67)))) != 0)) { + { + setState(1279); + expression(0); + } + } + + setState(1282); + match(SEMI); + setState(1284); + _la = _input.LA(1); + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (BOOLEAN - 3)) | (1L << (BYTE - 3)) | (1L << (CHAR - 3)) | (1L << (DOUBLE - 3)) | (1L << (FLOAT - 3)) | (1L << (INT - 3)) | (1L << (LONG - 3)) | (1L << (NEW - 3)) | (1L << (SHORT - 3)) | (1L << (SUPER - 3)) | (1L << (SWITCH - 3)) | (1L << (THIS - 3)) | (1L << (VOID - 3)) | (1L << (MODULE - 3)) | (1L << (OPEN - 3)) | (1L << (REQUIRES - 3)) | (1L << (EXPORTS - 3)) | (1L << (OPENS - 3)) | (1L << (TO - 3)) | (1L << (USES - 3)) | (1L << (PROVIDES - 3)) | (1L << (WITH - 3)) | (1L << (TRANSITIVE - 3)) | (1L << (VAR - 3)) | (1L << (YIELD - 3)) | (1L << (RECORD - 3)) | (1L << (SEALED - 3)) | (1L << (PERMITS - 3)))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (DECIMAL_LITERAL - 67)) | (1L << (HEX_LITERAL - 67)) | (1L << (OCT_LITERAL - 67)) | (1L << (BINARY_LITERAL - 67)) | (1L << (FLOAT_LITERAL - 67)) | (1L << (HEX_FLOAT_LITERAL - 67)) | (1L << (BOOL_LITERAL - 67)) | (1L << (CHAR_LITERAL - 67)) | (1L << (STRING_LITERAL - 67)) | (1L << (TEXT_BLOCK - 67)) | (1L << (NULL_LITERAL - 67)) | (1L << (LPAREN - 67)) | (1L << (LT - 67)) | (1L << (BANG - 67)) | (1L << (TILDE - 67)) | (1L << (INC - 67)) | (1L << (DEC - 67)) | (1L << (ADD - 67)) | (1L << (SUB - 67)) | (1L << (AT - 67)) | (1L << (IDENTIFIER - 67)))) != 0)) { + { + setState(1283); + ((ForControlContext)_localctx).forUpdate = expressionList(); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ForInitContext extends ParserRuleContext { + public LocalVariableDeclarationContext localVariableDeclaration() { + return getRuleContext(LocalVariableDeclarationContext.class,0); + } + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public ForInitContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forInit; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterForInit(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitForInit(this); + } + } + + public final ForInitContext forInit() throws RecognitionException { + ForInitContext _localctx = new ForInitContext(_ctx, getState()); + enterRule(_localctx, 188, RULE_forInit); + try { + setState(1290); + switch ( getInterpreter().adaptivePredict(_input,154,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1288); + localVariableDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1289); + expressionList(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnhancedForControlContext extends ParserRuleContext { + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public TerminalNode VAR() { return getToken(JavaParser.VAR, 0); } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public EnhancedForControlContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enhancedForControl; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterEnhancedForControl(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitEnhancedForControl(this); + } + } + + public final EnhancedForControlContext enhancedForControl() throws RecognitionException { + EnhancedForControlContext _localctx = new EnhancedForControlContext(_ctx, getState()); + enterRule(_localctx, 190, RULE_enhancedForControl); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1295); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,155,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1292); + variableModifier(); + } + } + } + setState(1297); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,155,_ctx); + } + setState(1300); + switch ( getInterpreter().adaptivePredict(_input,156,_ctx) ) { + case 1: + { + setState(1298); + typeType(); + } + break; + case 2: + { + setState(1299); + match(VAR); + } + break; + } + setState(1302); + variableDeclaratorId(); + setState(1303); + match(COLON); + setState(1304); + expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ParExpressionContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ParExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_parExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterParExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitParExpression(this); + } + } + + public final ParExpressionContext parExpression() throws RecognitionException { + ParExpressionContext _localctx = new ParExpressionContext(_ctx, getState()); + enterRule(_localctx, 192, RULE_parExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(1306); + match(LPAREN); + setState(1307); + expression(0); + setState(1308); + match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionListContext extends ParserRuleContext { + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public ExpressionListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expressionList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterExpressionList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitExpressionList(this); + } + } + + public final ExpressionListContext expressionList() throws RecognitionException { + ExpressionListContext _localctx = new ExpressionListContext(_ctx, getState()); + enterRule(_localctx, 194, RULE_expressionList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1310); + expression(0); + setState(1315); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(1311); + match(COMMA); + setState(1312); + expression(0); + } + } + setState(1317); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MethodCallContext extends ParserRuleContext { + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public TerminalNode THIS() { return getToken(JavaParser.THIS, 0); } + public TerminalNode SUPER() { return getToken(JavaParser.SUPER, 0); } + public MethodCallContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_methodCall; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterMethodCall(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitMethodCall(this); + } + } + + public final MethodCallContext methodCall() throws RecognitionException { + MethodCallContext _localctx = new MethodCallContext(_ctx, getState()); + enterRule(_localctx, 196, RULE_methodCall); + try { + enterOuterAlt(_localctx, 1); + { + setState(1321); + switch (_input.LA(1)) { + case MODULE: + case OPEN: + case REQUIRES: + case EXPORTS: + case OPENS: + case TO: + case USES: + case PROVIDES: + case WITH: + case TRANSITIVE: + case VAR: + case YIELD: + case RECORD: + case SEALED: + case PERMITS: + case IDENTIFIER: + { + setState(1318); + identifier(); + } + break; + case THIS: + { + setState(1319); + match(THIS); + } + break; + case SUPER: + { + setState(1320); + match(SUPER); + } + break; + default: + throw new NoViableAltException(this); + } + setState(1323); + arguments(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionContext extends ParserRuleContext { + public Token prefix; + public Token bop; + public Token postfix; + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public List typeType() { + return getRuleContexts(TypeTypeContext.class); + } + public TypeTypeContext typeType(int i) { + return getRuleContext(TypeTypeContext.class,i); + } + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public PrimaryContext primary() { + return getRuleContext(PrimaryContext.class,0); + } + public MethodCallContext methodCall() { + return getRuleContext(MethodCallContext.class,0); + } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public TerminalNode NEW() { return getToken(JavaParser.NEW, 0); } + public TypeArgumentsContext typeArguments() { + return getRuleContext(TypeArgumentsContext.class,0); + } + public ClassTypeContext classType() { + return getRuleContext(ClassTypeContext.class,0); + } + public SwitchExpressionContext switchExpression() { + return getRuleContext(SwitchExpressionContext.class,0); + } + public CreatorContext creator() { + return getRuleContext(CreatorContext.class,0); + } + public LambdaExpressionContext lambdaExpression() { + return getRuleContext(LambdaExpressionContext.class,0); + } + public TerminalNode THIS() { return getToken(JavaParser.THIS, 0); } + public InnerCreatorContext innerCreator() { + return getRuleContext(InnerCreatorContext.class,0); + } + public TerminalNode SUPER() { return getToken(JavaParser.SUPER, 0); } + public SuperSuffixContext superSuffix() { + return getRuleContext(SuperSuffixContext.class,0); + } + public ExplicitGenericInvocationContext explicitGenericInvocation() { + return getRuleContext(ExplicitGenericInvocationContext.class,0); + } + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public TerminalNode INSTANCEOF() { return getToken(JavaParser.INSTANCEOF, 0); } + public PatternContext pattern() { + return getRuleContext(PatternContext.class,0); + } + public ExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitExpression(this); + } + } + + public final ExpressionContext expression() throws RecognitionException { + return expression(0); + } + + private ExpressionContext expression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState); + ExpressionContext _prevctx = _localctx; + int _startState = 198; + enterRecursionRule(_localctx, 198, RULE_expression, _p); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1368); + switch ( getInterpreter().adaptivePredict(_input,164,_ctx) ) { + case 1: + { + setState(1326); + ((ExpressionContext)_localctx).prefix = _input.LT(1); + _la = _input.LA(1); + if ( !(((((_la - 90)) & ~0x3f) == 0 && ((1L << (_la - 90)) & ((1L << (BANG - 90)) | (1L << (TILDE - 90)) | (1L << (INC - 90)) | (1L << (DEC - 90)) | (1L << (ADD - 90)) | (1L << (SUB - 90)))) != 0)) ) { + ((ExpressionContext)_localctx).prefix = (Token)_errHandler.recoverInline(this); + } else { + consume(); + } + setState(1327); + expression(17); + } + break; + case 2: + { + setState(1328); + match(LPAREN); + setState(1332); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,159,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1329); + annotation(); + } + } + } + setState(1334); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,159,_ctx); + } + setState(1335); + typeType(); + setState(1340); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==BITAND) { + { + { + setState(1336); + match(BITAND); + setState(1337); + typeType(); + } + } + setState(1342); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1343); + match(RPAREN); + setState(1344); + expression(16); + } + break; + case 3: + { + setState(1346); + primary(); + } + break; + case 4: + { + setState(1347); + methodCall(); + } + break; + case 5: + { + setState(1348); + typeType(); + setState(1349); + match(COLONCOLON); + setState(1355); + switch (_input.LA(1)) { + case MODULE: + case OPEN: + case REQUIRES: + case EXPORTS: + case OPENS: + case TO: + case USES: + case PROVIDES: + case WITH: + case TRANSITIVE: + case VAR: + case YIELD: + case RECORD: + case SEALED: + case PERMITS: + case LT: + case IDENTIFIER: + { + setState(1351); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1350); + typeArguments(); + } + } + + setState(1353); + identifier(); + } + break; + case NEW: + { + setState(1354); + match(NEW); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + case 6: + { + setState(1357); + classType(); + setState(1358); + match(COLONCOLON); + setState(1360); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1359); + typeArguments(); + } + } + + setState(1362); + match(NEW); + } + break; + case 7: + { + setState(1364); + switchExpression(); + } + break; + case 8: + { + setState(1365); + match(NEW); + setState(1366); + creator(); + } + break; + case 9: + { + setState(1367); + lambdaExpression(); + } + break; + } + _ctx.stop = _input.LT(-1); + setState(1453); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,171,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(1451); + switch ( getInterpreter().adaptivePredict(_input,170,_ctx) ) { + case 1: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1370); + if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)"); + setState(1371); + ((ExpressionContext)_localctx).bop = _input.LT(1); + _la = _input.LA(1); + if ( !(((((_la - 104)) & ~0x3f) == 0 && ((1L << (_la - 104)) & ((1L << (MUL - 104)) | (1L << (DIV - 104)) | (1L << (MOD - 104)))) != 0)) ) { + ((ExpressionContext)_localctx).bop = (Token)_errHandler.recoverInline(this); + } else { + consume(); + } + setState(1372); + expression(15); + } + break; + case 2: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1373); + if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); + setState(1374); + ((ExpressionContext)_localctx).bop = _input.LT(1); + _la = _input.LA(1); + if ( !(_la==ADD || _la==SUB) ) { + ((ExpressionContext)_localctx).bop = (Token)_errHandler.recoverInline(this); + } else { + consume(); + } + setState(1375); + expression(14); + } + break; + case 3: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1376); + if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); + setState(1384); + switch ( getInterpreter().adaptivePredict(_input,165,_ctx) ) { + case 1: + { + setState(1377); + match(LT); + setState(1378); + match(LT); + } + break; + case 2: + { + setState(1379); + match(GT); + setState(1380); + match(GT); + setState(1381); + match(GT); + } + break; + case 3: + { + setState(1382); + match(GT); + setState(1383); + match(GT); + } + break; + } + setState(1386); + expression(13); + } + break; + case 4: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1387); + if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); + setState(1388); + ((ExpressionContext)_localctx).bop = _input.LT(1); + _la = _input.LA(1); + if ( !(((((_la - 88)) & ~0x3f) == 0 && ((1L << (_la - 88)) & ((1L << (GT - 88)) | (1L << (LT - 88)) | (1L << (LE - 88)) | (1L << (GE - 88)))) != 0)) ) { + ((ExpressionContext)_localctx).bop = (Token)_errHandler.recoverInline(this); + } else { + consume(); + } + setState(1389); + expression(12); + } + break; + case 5: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1390); + if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); + setState(1391); + ((ExpressionContext)_localctx).bop = _input.LT(1); + _la = _input.LA(1); + if ( !(_la==EQUAL || _la==NOTEQUAL) ) { + ((ExpressionContext)_localctx).bop = (Token)_errHandler.recoverInline(this); + } else { + consume(); + } + setState(1392); + expression(10); + } + break; + case 6: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1393); + if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); + setState(1394); + ((ExpressionContext)_localctx).bop = match(BITAND); + setState(1395); + expression(9); + } + break; + case 7: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1396); + if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); + setState(1397); + ((ExpressionContext)_localctx).bop = match(CARET); + setState(1398); + expression(8); + } + break; + case 8: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1399); + if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); + setState(1400); + ((ExpressionContext)_localctx).bop = match(BITOR); + setState(1401); + expression(7); + } + break; + case 9: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1402); + if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); + setState(1403); + ((ExpressionContext)_localctx).bop = match(AND); + setState(1404); + expression(6); + } + break; + case 10: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1405); + if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)"); + setState(1406); + ((ExpressionContext)_localctx).bop = match(OR); + setState(1407); + expression(5); + } + break; + case 11: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1408); + if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); + setState(1409); + ((ExpressionContext)_localctx).bop = match(QUESTION); + setState(1410); + expression(0); + setState(1411); + match(COLON); + setState(1412); + expression(3); + } + break; + case 12: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1414); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(1415); + ((ExpressionContext)_localctx).bop = _input.LT(1); + _la = _input.LA(1); + if ( !(((((_la - 87)) & ~0x3f) == 0 && ((1L << (_la - 87)) & ((1L << (ASSIGN - 87)) | (1L << (ADD_ASSIGN - 87)) | (1L << (SUB_ASSIGN - 87)) | (1L << (MUL_ASSIGN - 87)) | (1L << (DIV_ASSIGN - 87)) | (1L << (AND_ASSIGN - 87)) | (1L << (OR_ASSIGN - 87)) | (1L << (XOR_ASSIGN - 87)) | (1L << (MOD_ASSIGN - 87)) | (1L << (LSHIFT_ASSIGN - 87)) | (1L << (RSHIFT_ASSIGN - 87)) | (1L << (URSHIFT_ASSIGN - 87)))) != 0)) ) { + ((ExpressionContext)_localctx).bop = (Token)_errHandler.recoverInline(this); + } else { + consume(); + } + setState(1416); + expression(2); + } + break; + case 13: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1417); + if (!(precpred(_ctx, 25))) throw new FailedPredicateException(this, "precpred(_ctx, 25)"); + setState(1418); + match(LBRACK); + setState(1419); + expression(0); + setState(1420); + match(RBRACK); + } + break; + case 14: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1422); + if (!(precpred(_ctx, 24))) throw new FailedPredicateException(this, "precpred(_ctx, 24)"); + setState(1423); + ((ExpressionContext)_localctx).bop = match(DOT); + setState(1435); + switch ( getInterpreter().adaptivePredict(_input,167,_ctx) ) { + case 1: + { + setState(1424); + identifier(); + } + break; + case 2: + { + setState(1425); + methodCall(); + } + break; + case 3: + { + setState(1426); + match(THIS); + } + break; + case 4: + { + setState(1427); + match(NEW); + setState(1429); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1428); + nonWildcardTypeArguments(); + } + } + + setState(1431); + innerCreator(); + } + break; + case 5: + { + setState(1432); + match(SUPER); + setState(1433); + superSuffix(); + } + break; + case 6: + { + setState(1434); + explicitGenericInvocation(); + } + break; + } + } + break; + case 15: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1437); + if (!(precpred(_ctx, 22))) throw new FailedPredicateException(this, "precpred(_ctx, 22)"); + setState(1438); + match(COLONCOLON); + setState(1440); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1439); + typeArguments(); + } + } + + setState(1442); + identifier(); + } + break; + case 16: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1443); + if (!(precpred(_ctx, 18))) throw new FailedPredicateException(this, "precpred(_ctx, 18)"); + setState(1444); + ((ExpressionContext)_localctx).postfix = _input.LT(1); + _la = _input.LA(1); + if ( !(_la==INC || _la==DEC) ) { + ((ExpressionContext)_localctx).postfix = (Token)_errHandler.recoverInline(this); + } else { + consume(); + } + } + break; + case 17: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1445); + if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); + setState(1446); + ((ExpressionContext)_localctx).bop = match(INSTANCEOF); + setState(1449); + switch ( getInterpreter().adaptivePredict(_input,169,_ctx) ) { + case 1: + { + setState(1447); + typeType(); + } + break; + case 2: + { + setState(1448); + pattern(); + } + break; + } + } + break; + } + } + } + setState(1455); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,171,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class PatternContext extends ParserRuleContext { + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public PatternContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_pattern; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterPattern(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitPattern(this); + } + } + + public final PatternContext pattern() throws RecognitionException { + PatternContext _localctx = new PatternContext(_ctx, getState()); + enterRule(_localctx, 200, RULE_pattern); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1459); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,172,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1456); + variableModifier(); + } + } + } + setState(1461); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,172,_ctx); + } + setState(1462); + typeType(); + setState(1466); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,173,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1463); + annotation(); + } + } + } + setState(1468); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,173,_ctx); + } + setState(1469); + identifier(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LambdaExpressionContext extends ParserRuleContext { + public LambdaParametersContext lambdaParameters() { + return getRuleContext(LambdaParametersContext.class,0); + } + public LambdaBodyContext lambdaBody() { + return getRuleContext(LambdaBodyContext.class,0); + } + public LambdaExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lambdaExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterLambdaExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitLambdaExpression(this); + } + } + + public final LambdaExpressionContext lambdaExpression() throws RecognitionException { + LambdaExpressionContext _localctx = new LambdaExpressionContext(_ctx, getState()); + enterRule(_localctx, 202, RULE_lambdaExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(1471); + lambdaParameters(); + setState(1472); + match(ARROW); + setState(1473); + lambdaBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LambdaParametersContext extends ParserRuleContext { + public List identifier() { + return getRuleContexts(IdentifierContext.class); + } + public IdentifierContext identifier(int i) { + return getRuleContext(IdentifierContext.class,i); + } + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public LambdaLVTIListContext lambdaLVTIList() { + return getRuleContext(LambdaLVTIListContext.class,0); + } + public LambdaParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lambdaParameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterLambdaParameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitLambdaParameters(this); + } + } + + public final LambdaParametersContext lambdaParameters() throws RecognitionException { + LambdaParametersContext _localctx = new LambdaParametersContext(_ctx, getState()); + enterRule(_localctx, 204, RULE_lambdaParameters); + int _la; + try { + setState(1497); + switch ( getInterpreter().adaptivePredict(_input,177,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1475); + identifier(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1476); + match(LPAREN); + setState(1478); + _la = _input.LA(1); + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (BOOLEAN - 3)) | (1L << (BYTE - 3)) | (1L << (CHAR - 3)) | (1L << (DOUBLE - 3)) | (1L << (FINAL - 3)) | (1L << (FLOAT - 3)) | (1L << (INT - 3)) | (1L << (LONG - 3)) | (1L << (SHORT - 3)) | (1L << (MODULE - 3)) | (1L << (OPEN - 3)) | (1L << (REQUIRES - 3)) | (1L << (EXPORTS - 3)) | (1L << (OPENS - 3)) | (1L << (TO - 3)) | (1L << (USES - 3)) | (1L << (PROVIDES - 3)) | (1L << (WITH - 3)) | (1L << (TRANSITIVE - 3)) | (1L << (VAR - 3)) | (1L << (YIELD - 3)) | (1L << (RECORD - 3)) | (1L << (SEALED - 3)) | (1L << (PERMITS - 3)))) != 0) || _la==AT || _la==IDENTIFIER) { + { + setState(1477); + formalParameterList(); + } + } + + setState(1480); + match(RPAREN); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1481); + match(LPAREN); + setState(1482); + identifier(); + setState(1487); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(1483); + match(COMMA); + setState(1484); + identifier(); + } + } + setState(1489); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1490); + match(RPAREN); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(1492); + match(LPAREN); + setState(1494); + _la = _input.LA(1); + if (((((_la - 18)) & ~0x3f) == 0 && ((1L << (_la - 18)) & ((1L << (FINAL - 18)) | (1L << (MODULE - 18)) | (1L << (OPEN - 18)) | (1L << (REQUIRES - 18)) | (1L << (EXPORTS - 18)) | (1L << (OPENS - 18)) | (1L << (TO - 18)) | (1L << (USES - 18)) | (1L << (PROVIDES - 18)) | (1L << (WITH - 18)) | (1L << (TRANSITIVE - 18)) | (1L << (VAR - 18)) | (1L << (YIELD - 18)) | (1L << (RECORD - 18)) | (1L << (SEALED - 18)) | (1L << (PERMITS - 18)))) != 0) || _la==AT || _la==IDENTIFIER) { + { + setState(1493); + lambdaLVTIList(); + } + } + + setState(1496); + match(RPAREN); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LambdaBodyContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public LambdaBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lambdaBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterLambdaBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitLambdaBody(this); + } + } + + public final LambdaBodyContext lambdaBody() throws RecognitionException { + LambdaBodyContext _localctx = new LambdaBodyContext(_ctx, getState()); + enterRule(_localctx, 206, RULE_lambdaBody); + try { + setState(1501); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case NEW: + case SHORT: + case SUPER: + case SWITCH: + case THIS: + case VOID: + case MODULE: + case OPEN: + case REQUIRES: + case EXPORTS: + case OPENS: + case TO: + case USES: + case PROVIDES: + case WITH: + case TRANSITIVE: + case VAR: + case YIELD: + case RECORD: + case SEALED: + case PERMITS: + case DECIMAL_LITERAL: + case HEX_LITERAL: + case OCT_LITERAL: + case BINARY_LITERAL: + case FLOAT_LITERAL: + case HEX_FLOAT_LITERAL: + case BOOL_LITERAL: + case CHAR_LITERAL: + case STRING_LITERAL: + case TEXT_BLOCK: + case NULL_LITERAL: + case LPAREN: + case LT: + case BANG: + case TILDE: + case INC: + case DEC: + case ADD: + case SUB: + case AT: + case IDENTIFIER: + enterOuterAlt(_localctx, 1); + { + setState(1499); + expression(0); + } + break; + case LBRACE: + enterOuterAlt(_localctx, 2); + { + setState(1500); + block(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PrimaryContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode THIS() { return getToken(JavaParser.THIS, 0); } + public TerminalNode SUPER() { return getToken(JavaParser.SUPER, 0); } + public LiteralContext literal() { + return getRuleContext(LiteralContext.class,0); + } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public TypeTypeOrVoidContext typeTypeOrVoid() { + return getRuleContext(TypeTypeOrVoidContext.class,0); + } + public TerminalNode CLASS() { return getToken(JavaParser.CLASS, 0); } + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public ExplicitGenericInvocationSuffixContext explicitGenericInvocationSuffix() { + return getRuleContext(ExplicitGenericInvocationSuffixContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public PrimaryContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_primary; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterPrimary(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitPrimary(this); + } + } + + public final PrimaryContext primary() throws RecognitionException { + PrimaryContext _localctx = new PrimaryContext(_ctx, getState()); + enterRule(_localctx, 208, RULE_primary); + try { + setState(1521); + switch ( getInterpreter().adaptivePredict(_input,180,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1503); + match(LPAREN); + setState(1504); + expression(0); + setState(1505); + match(RPAREN); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1507); + match(THIS); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1508); + match(SUPER); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(1509); + literal(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(1510); + identifier(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(1511); + typeTypeOrVoid(); + setState(1512); + match(DOT); + setState(1513); + match(CLASS); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(1515); + nonWildcardTypeArguments(); + setState(1519); + switch (_input.LA(1)) { + case SUPER: + case MODULE: + case OPEN: + case REQUIRES: + case EXPORTS: + case OPENS: + case TO: + case USES: + case PROVIDES: + case WITH: + case TRANSITIVE: + case VAR: + case YIELD: + case RECORD: + case SEALED: + case PERMITS: + case IDENTIFIER: + { + setState(1516); + explicitGenericInvocationSuffix(); + } + break; + case THIS: + { + setState(1517); + match(THIS); + setState(1518); + arguments(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SwitchExpressionContext extends ParserRuleContext { + public TerminalNode SWITCH() { return getToken(JavaParser.SWITCH, 0); } + public ParExpressionContext parExpression() { + return getRuleContext(ParExpressionContext.class,0); + } + public List switchLabeledRule() { + return getRuleContexts(SwitchLabeledRuleContext.class); + } + public SwitchLabeledRuleContext switchLabeledRule(int i) { + return getRuleContext(SwitchLabeledRuleContext.class,i); + } + public SwitchExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_switchExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterSwitchExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitSwitchExpression(this); + } + } + + public final SwitchExpressionContext switchExpression() throws RecognitionException { + SwitchExpressionContext _localctx = new SwitchExpressionContext(_ctx, getState()); + enterRule(_localctx, 210, RULE_switchExpression); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1523); + match(SWITCH); + setState(1524); + parExpression(); + setState(1525); + match(LBRACE); + setState(1529); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==CASE || _la==DEFAULT) { + { + { + setState(1526); + switchLabeledRule(); + } + } + setState(1531); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1532); + match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SwitchLabeledRuleContext extends ParserRuleContext { + public TerminalNode CASE() { return getToken(JavaParser.CASE, 0); } + public SwitchRuleOutcomeContext switchRuleOutcome() { + return getRuleContext(SwitchRuleOutcomeContext.class,0); + } + public TerminalNode ARROW() { return getToken(JavaParser.ARROW, 0); } + public TerminalNode COLON() { return getToken(JavaParser.COLON, 0); } + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public TerminalNode NULL_LITERAL() { return getToken(JavaParser.NULL_LITERAL, 0); } + public GuardedPatternContext guardedPattern() { + return getRuleContext(GuardedPatternContext.class,0); + } + public TerminalNode DEFAULT() { return getToken(JavaParser.DEFAULT, 0); } + public SwitchLabeledRuleContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_switchLabeledRule; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterSwitchLabeledRule(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitSwitchLabeledRule(this); + } + } + + public final SwitchLabeledRuleContext switchLabeledRule() throws RecognitionException { + SwitchLabeledRuleContext _localctx = new SwitchLabeledRuleContext(_ctx, getState()); + enterRule(_localctx, 212, RULE_switchLabeledRule); + int _la; + try { + setState(1545); + switch (_input.LA(1)) { + case CASE: + enterOuterAlt(_localctx, 1); + { + setState(1534); + match(CASE); + setState(1538); + switch ( getInterpreter().adaptivePredict(_input,182,_ctx) ) { + case 1: + { + setState(1535); + expressionList(); + } + break; + case 2: + { + setState(1536); + match(NULL_LITERAL); + } + break; + case 3: + { + setState(1537); + guardedPattern(0); + } + break; + } + setState(1540); + _la = _input.LA(1); + if ( !(_la==COLON || _la==ARROW) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(1541); + switchRuleOutcome(); + } + break; + case DEFAULT: + enterOuterAlt(_localctx, 2); + { + setState(1542); + match(DEFAULT); + setState(1543); + _la = _input.LA(1); + if ( !(_la==COLON || _la==ARROW) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(1544); + switchRuleOutcome(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GuardedPatternContext extends ParserRuleContext { + public GuardedPatternContext guardedPattern() { + return getRuleContext(GuardedPatternContext.class,0); + } + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public GuardedPatternContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_guardedPattern; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterGuardedPattern(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitGuardedPattern(this); + } + } + + public final GuardedPatternContext guardedPattern() throws RecognitionException { + return guardedPattern(0); + } + + private GuardedPatternContext guardedPattern(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + GuardedPatternContext _localctx = new GuardedPatternContext(_ctx, _parentState); + GuardedPatternContext _prevctx = _localctx; + int _startState = 214; + enterRecursionRule(_localctx, 214, RULE_guardedPattern, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1573); + switch (_input.LA(1)) { + case LPAREN: + { + setState(1548); + match(LPAREN); + setState(1549); + guardedPattern(0); + setState(1550); + match(RPAREN); + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FINAL: + case FLOAT: + case INT: + case LONG: + case SHORT: + case MODULE: + case OPEN: + case REQUIRES: + case EXPORTS: + case OPENS: + case TO: + case USES: + case PROVIDES: + case WITH: + case TRANSITIVE: + case VAR: + case YIELD: + case RECORD: + case SEALED: + case PERMITS: + case AT: + case IDENTIFIER: + { + setState(1555); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,184,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1552); + variableModifier(); + } + } + } + setState(1557); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,184,_ctx); + } + setState(1558); + typeType(); + setState(1562); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,185,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1559); + annotation(); + } + } + } + setState(1564); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,185,_ctx); + } + setState(1565); + identifier(); + setState(1570); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,186,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1566); + match(AND); + setState(1567); + expression(0); + } + } + } + setState(1572); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,186,_ctx); + } + } + break; + default: + throw new NoViableAltException(this); + } + _ctx.stop = _input.LT(-1); + setState(1580); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,188,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new GuardedPatternContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_guardedPattern); + setState(1575); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(1576); + match(AND); + setState(1577); + expression(0); + } + } + } + setState(1582); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,188,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class SwitchRuleOutcomeContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public List blockStatement() { + return getRuleContexts(BlockStatementContext.class); + } + public BlockStatementContext blockStatement(int i) { + return getRuleContext(BlockStatementContext.class,i); + } + public SwitchRuleOutcomeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_switchRuleOutcome; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterSwitchRuleOutcome(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitSwitchRuleOutcome(this); + } + } + + public final SwitchRuleOutcomeContext switchRuleOutcome() throws RecognitionException { + SwitchRuleOutcomeContext _localctx = new SwitchRuleOutcomeContext(_ctx, getState()); + enterRule(_localctx, 216, RULE_switchRuleOutcome); + int _la; + try { + setState(1590); + switch ( getInterpreter().adaptivePredict(_input,190,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1583); + block(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1587); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 1)) & ~0x3f) == 0 && ((1L << (_la - 1)) & ((1L << (ABSTRACT - 1)) | (1L << (ASSERT - 1)) | (1L << (BOOLEAN - 1)) | (1L << (BREAK - 1)) | (1L << (BYTE - 1)) | (1L << (CHAR - 1)) | (1L << (CLASS - 1)) | (1L << (CONTINUE - 1)) | (1L << (DO - 1)) | (1L << (DOUBLE - 1)) | (1L << (FINAL - 1)) | (1L << (FLOAT - 1)) | (1L << (FOR - 1)) | (1L << (IF - 1)) | (1L << (INT - 1)) | (1L << (INTERFACE - 1)) | (1L << (LONG - 1)) | (1L << (NEW - 1)) | (1L << (PRIVATE - 1)) | (1L << (PROTECTED - 1)) | (1L << (PUBLIC - 1)) | (1L << (RETURN - 1)) | (1L << (SHORT - 1)) | (1L << (STATIC - 1)) | (1L << (STRICTFP - 1)) | (1L << (SUPER - 1)) | (1L << (SWITCH - 1)) | (1L << (SYNCHRONIZED - 1)) | (1L << (THIS - 1)) | (1L << (THROW - 1)) | (1L << (TRY - 1)) | (1L << (VOID - 1)) | (1L << (WHILE - 1)) | (1L << (MODULE - 1)) | (1L << (OPEN - 1)) | (1L << (REQUIRES - 1)) | (1L << (EXPORTS - 1)) | (1L << (OPENS - 1)) | (1L << (TO - 1)) | (1L << (USES - 1)) | (1L << (PROVIDES - 1)) | (1L << (WITH - 1)) | (1L << (TRANSITIVE - 1)) | (1L << (VAR - 1)) | (1L << (YIELD - 1)) | (1L << (RECORD - 1)) | (1L << (SEALED - 1)))) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (PERMITS - 65)) | (1L << (NON_SEALED - 65)) | (1L << (DECIMAL_LITERAL - 65)) | (1L << (HEX_LITERAL - 65)) | (1L << (OCT_LITERAL - 65)) | (1L << (BINARY_LITERAL - 65)) | (1L << (FLOAT_LITERAL - 65)) | (1L << (HEX_FLOAT_LITERAL - 65)) | (1L << (BOOL_LITERAL - 65)) | (1L << (CHAR_LITERAL - 65)) | (1L << (STRING_LITERAL - 65)) | (1L << (TEXT_BLOCK - 65)) | (1L << (NULL_LITERAL - 65)) | (1L << (LPAREN - 65)) | (1L << (LBRACE - 65)) | (1L << (SEMI - 65)) | (1L << (LT - 65)) | (1L << (BANG - 65)) | (1L << (TILDE - 65)) | (1L << (INC - 65)) | (1L << (DEC - 65)) | (1L << (ADD - 65)) | (1L << (SUB - 65)) | (1L << (AT - 65)) | (1L << (IDENTIFIER - 65)))) != 0)) { + { + { + setState(1584); + blockStatement(); + } + } + setState(1589); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassTypeContext extends ParserRuleContext { + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public ClassOrInterfaceTypeContext classOrInterfaceType() { + return getRuleContext(ClassOrInterfaceTypeContext.class,0); + } + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public TypeArgumentsContext typeArguments() { + return getRuleContext(TypeArgumentsContext.class,0); + } + public ClassTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterClassType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitClassType(this); + } + } + + public final ClassTypeContext classType() throws RecognitionException { + ClassTypeContext _localctx = new ClassTypeContext(_ctx, getState()); + enterRule(_localctx, 218, RULE_classType); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1595); + switch ( getInterpreter().adaptivePredict(_input,191,_ctx) ) { + case 1: + { + setState(1592); + classOrInterfaceType(); + setState(1593); + match(DOT); + } + break; + } + setState(1600); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,192,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1597); + annotation(); + } + } + } + setState(1602); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,192,_ctx); + } + setState(1603); + identifier(); + setState(1605); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1604); + typeArguments(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CreatorContext extends ParserRuleContext { + public CreatedNameContext createdName() { + return getRuleContext(CreatedNameContext.class,0); + } + public ClassCreatorRestContext classCreatorRest() { + return getRuleContext(ClassCreatorRestContext.class,0); + } + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public ArrayCreatorRestContext arrayCreatorRest() { + return getRuleContext(ArrayCreatorRestContext.class,0); + } + public CreatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_creator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterCreator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitCreator(this); + } + } + + public final CreatorContext creator() throws RecognitionException { + CreatorContext _localctx = new CreatorContext(_ctx, getState()); + enterRule(_localctx, 220, RULE_creator); + int _la; + try { + setState(1616); + switch ( getInterpreter().adaptivePredict(_input,195,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1608); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1607); + nonWildcardTypeArguments(); + } + } + + setState(1610); + createdName(); + setState(1611); + classCreatorRest(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1613); + createdName(); + setState(1614); + arrayCreatorRest(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CreatedNameContext extends ParserRuleContext { + public List identifier() { + return getRuleContexts(IdentifierContext.class); + } + public IdentifierContext identifier(int i) { + return getRuleContext(IdentifierContext.class,i); + } + public List typeArgumentsOrDiamond() { + return getRuleContexts(TypeArgumentsOrDiamondContext.class); + } + public TypeArgumentsOrDiamondContext typeArgumentsOrDiamond(int i) { + return getRuleContext(TypeArgumentsOrDiamondContext.class,i); + } + public PrimitiveTypeContext primitiveType() { + return getRuleContext(PrimitiveTypeContext.class,0); + } + public CreatedNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_createdName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterCreatedName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitCreatedName(this); + } + } + + public final CreatedNameContext createdName() throws RecognitionException { + CreatedNameContext _localctx = new CreatedNameContext(_ctx, getState()); + enterRule(_localctx, 222, RULE_createdName); + int _la; + try { + setState(1633); + switch (_input.LA(1)) { + case MODULE: + case OPEN: + case REQUIRES: + case EXPORTS: + case OPENS: + case TO: + case USES: + case PROVIDES: + case WITH: + case TRANSITIVE: + case VAR: + case YIELD: + case RECORD: + case SEALED: + case PERMITS: + case IDENTIFIER: + enterOuterAlt(_localctx, 1); + { + setState(1618); + identifier(); + setState(1620); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1619); + typeArgumentsOrDiamond(); + } + } + + setState(1629); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==DOT) { + { + { + setState(1622); + match(DOT); + setState(1623); + identifier(); + setState(1625); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1624); + typeArgumentsOrDiamond(); + } + } + + } + } + setState(1631); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + enterOuterAlt(_localctx, 2); + { + setState(1632); + primitiveType(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InnerCreatorContext extends ParserRuleContext { + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public ClassCreatorRestContext classCreatorRest() { + return getRuleContext(ClassCreatorRestContext.class,0); + } + public NonWildcardTypeArgumentsOrDiamondContext nonWildcardTypeArgumentsOrDiamond() { + return getRuleContext(NonWildcardTypeArgumentsOrDiamondContext.class,0); + } + public InnerCreatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_innerCreator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterInnerCreator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitInnerCreator(this); + } + } + + public final InnerCreatorContext innerCreator() throws RecognitionException { + InnerCreatorContext _localctx = new InnerCreatorContext(_ctx, getState()); + enterRule(_localctx, 224, RULE_innerCreator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1635); + identifier(); + setState(1637); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1636); + nonWildcardTypeArgumentsOrDiamond(); + } + } + + setState(1639); + classCreatorRest(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayCreatorRestContext extends ParserRuleContext { + public ArrayInitializerContext arrayInitializer() { + return getRuleContext(ArrayInitializerContext.class,0); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public ArrayCreatorRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayCreatorRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterArrayCreatorRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitArrayCreatorRest(this); + } + } + + public final ArrayCreatorRestContext arrayCreatorRest() throws RecognitionException { + ArrayCreatorRestContext _localctx = new ArrayCreatorRestContext(_ctx, getState()); + enterRule(_localctx, 226, RULE_arrayCreatorRest); + int _la; + try { + int _alt; + setState(1663); + switch ( getInterpreter().adaptivePredict(_input,204,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1643); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(1641); + match(LBRACK); + setState(1642); + match(RBRACK); + } + } + setState(1645); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==LBRACK ); + setState(1647); + arrayInitializer(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1652); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(1648); + match(LBRACK); + setState(1649); + expression(0); + setState(1650); + match(RBRACK); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(1654); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,202,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + setState(1660); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,203,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1656); + match(LBRACK); + setState(1657); + match(RBRACK); + } + } + } + setState(1662); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,203,_ctx); + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassCreatorRestContext extends ParserRuleContext { + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public ClassCreatorRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classCreatorRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterClassCreatorRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitClassCreatorRest(this); + } + } + + public final ClassCreatorRestContext classCreatorRest() throws RecognitionException { + ClassCreatorRestContext _localctx = new ClassCreatorRestContext(_ctx, getState()); + enterRule(_localctx, 228, RULE_classCreatorRest); + try { + enterOuterAlt(_localctx, 1); + { + setState(1665); + arguments(); + setState(1667); + switch ( getInterpreter().adaptivePredict(_input,205,_ctx) ) { + case 1: + { + setState(1666); + classBody(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExplicitGenericInvocationContext extends ParserRuleContext { + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public ExplicitGenericInvocationSuffixContext explicitGenericInvocationSuffix() { + return getRuleContext(ExplicitGenericInvocationSuffixContext.class,0); + } + public ExplicitGenericInvocationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_explicitGenericInvocation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterExplicitGenericInvocation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitExplicitGenericInvocation(this); + } + } + + public final ExplicitGenericInvocationContext explicitGenericInvocation() throws RecognitionException { + ExplicitGenericInvocationContext _localctx = new ExplicitGenericInvocationContext(_ctx, getState()); + enterRule(_localctx, 230, RULE_explicitGenericInvocation); + try { + enterOuterAlt(_localctx, 1); + { + setState(1669); + nonWildcardTypeArguments(); + setState(1670); + explicitGenericInvocationSuffix(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentsOrDiamondContext extends ParserRuleContext { + public TypeArgumentsContext typeArguments() { + return getRuleContext(TypeArgumentsContext.class,0); + } + public TypeArgumentsOrDiamondContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArgumentsOrDiamond; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterTypeArgumentsOrDiamond(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitTypeArgumentsOrDiamond(this); + } + } + + public final TypeArgumentsOrDiamondContext typeArgumentsOrDiamond() throws RecognitionException { + TypeArgumentsOrDiamondContext _localctx = new TypeArgumentsOrDiamondContext(_ctx, getState()); + enterRule(_localctx, 232, RULE_typeArgumentsOrDiamond); + try { + setState(1675); + switch ( getInterpreter().adaptivePredict(_input,206,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1672); + match(LT); + setState(1673); + match(GT); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1674); + typeArguments(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NonWildcardTypeArgumentsOrDiamondContext extends ParserRuleContext { + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public NonWildcardTypeArgumentsOrDiamondContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_nonWildcardTypeArgumentsOrDiamond; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterNonWildcardTypeArgumentsOrDiamond(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitNonWildcardTypeArgumentsOrDiamond(this); + } + } + + public final NonWildcardTypeArgumentsOrDiamondContext nonWildcardTypeArgumentsOrDiamond() throws RecognitionException { + NonWildcardTypeArgumentsOrDiamondContext _localctx = new NonWildcardTypeArgumentsOrDiamondContext(_ctx, getState()); + enterRule(_localctx, 234, RULE_nonWildcardTypeArgumentsOrDiamond); + try { + setState(1680); + switch ( getInterpreter().adaptivePredict(_input,207,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1677); + match(LT); + setState(1678); + match(GT); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1679); + nonWildcardTypeArguments(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NonWildcardTypeArgumentsContext extends ParserRuleContext { + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public NonWildcardTypeArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_nonWildcardTypeArguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterNonWildcardTypeArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitNonWildcardTypeArguments(this); + } + } + + public final NonWildcardTypeArgumentsContext nonWildcardTypeArguments() throws RecognitionException { + NonWildcardTypeArgumentsContext _localctx = new NonWildcardTypeArgumentsContext(_ctx, getState()); + enterRule(_localctx, 236, RULE_nonWildcardTypeArguments); + try { + enterOuterAlt(_localctx, 1); + { + setState(1682); + match(LT); + setState(1683); + typeList(); + setState(1684); + match(GT); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeListContext extends ParserRuleContext { + public List typeType() { + return getRuleContexts(TypeTypeContext.class); + } + public TypeTypeContext typeType(int i) { + return getRuleContext(TypeTypeContext.class,i); + } + public TypeListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterTypeList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitTypeList(this); + } + } + + public final TypeListContext typeList() throws RecognitionException { + TypeListContext _localctx = new TypeListContext(_ctx, getState()); + enterRule(_localctx, 238, RULE_typeList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1686); + typeType(); + setState(1691); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(1687); + match(COMMA); + setState(1688); + typeType(); + } + } + setState(1693); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeTypeContext extends ParserRuleContext { + public ClassOrInterfaceTypeContext classOrInterfaceType() { + return getRuleContext(ClassOrInterfaceTypeContext.class,0); + } + public PrimitiveTypeContext primitiveType() { + return getRuleContext(PrimitiveTypeContext.class,0); + } + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public TypeTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterTypeType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitTypeType(this); + } + } + + public final TypeTypeContext typeType() throws RecognitionException { + TypeTypeContext _localctx = new TypeTypeContext(_ctx, getState()); + enterRule(_localctx, 240, RULE_typeType); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1697); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,209,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1694); + annotation(); + } + } + } + setState(1699); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,209,_ctx); + } + setState(1702); + switch (_input.LA(1)) { + case MODULE: + case OPEN: + case REQUIRES: + case EXPORTS: + case OPENS: + case TO: + case USES: + case PROVIDES: + case WITH: + case TRANSITIVE: + case VAR: + case YIELD: + case RECORD: + case SEALED: + case PERMITS: + case IDENTIFIER: + { + setState(1700); + classOrInterfaceType(); + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + { + setState(1701); + primitiveType(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(1714); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,212,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1707); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 51)) & ~0x3f) == 0 && ((1L << (_la - 51)) & ((1L << (MODULE - 51)) | (1L << (OPEN - 51)) | (1L << (REQUIRES - 51)) | (1L << (EXPORTS - 51)) | (1L << (OPENS - 51)) | (1L << (TO - 51)) | (1L << (USES - 51)) | (1L << (PROVIDES - 51)) | (1L << (WITH - 51)) | (1L << (TRANSITIVE - 51)) | (1L << (VAR - 51)) | (1L << (YIELD - 51)) | (1L << (RECORD - 51)) | (1L << (SEALED - 51)) | (1L << (PERMITS - 51)))) != 0) || _la==AT || _la==IDENTIFIER) { + { + { + setState(1704); + annotation(); + } + } + setState(1709); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1710); + match(LBRACK); + setState(1711); + match(RBRACK); + } + } + } + setState(1716); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,212,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PrimitiveTypeContext extends ParserRuleContext { + public TerminalNode BOOLEAN() { return getToken(JavaParser.BOOLEAN, 0); } + public TerminalNode CHAR() { return getToken(JavaParser.CHAR, 0); } + public TerminalNode BYTE() { return getToken(JavaParser.BYTE, 0); } + public TerminalNode SHORT() { return getToken(JavaParser.SHORT, 0); } + public TerminalNode INT() { return getToken(JavaParser.INT, 0); } + public TerminalNode LONG() { return getToken(JavaParser.LONG, 0); } + public TerminalNode FLOAT() { return getToken(JavaParser.FLOAT, 0); } + public TerminalNode DOUBLE() { return getToken(JavaParser.DOUBLE, 0); } + public PrimitiveTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_primitiveType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterPrimitiveType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitPrimitiveType(this); + } + } + + public final PrimitiveTypeContext primitiveType() throws RecognitionException { + PrimitiveTypeContext _localctx = new PrimitiveTypeContext(_ctx, getState()); + enterRule(_localctx, 242, RULE_primitiveType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1717); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << SHORT))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentsContext extends ParserRuleContext { + public List typeArgument() { + return getRuleContexts(TypeArgumentContext.class); + } + public TypeArgumentContext typeArgument(int i) { + return getRuleContext(TypeArgumentContext.class,i); + } + public TypeArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterTypeArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitTypeArguments(this); + } + } + + public final TypeArgumentsContext typeArguments() throws RecognitionException { + TypeArgumentsContext _localctx = new TypeArgumentsContext(_ctx, getState()); + enterRule(_localctx, 244, RULE_typeArguments); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1719); + match(LT); + setState(1720); + typeArgument(); + setState(1725); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(1721); + match(COMMA); + setState(1722); + typeArgument(); + } + } + setState(1727); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1728); + match(GT); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SuperSuffixContext extends ParserRuleContext { + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public TypeArgumentsContext typeArguments() { + return getRuleContext(TypeArgumentsContext.class,0); + } + public SuperSuffixContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_superSuffix; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterSuperSuffix(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitSuperSuffix(this); + } + } + + public final SuperSuffixContext superSuffix() throws RecognitionException { + SuperSuffixContext _localctx = new SuperSuffixContext(_ctx, getState()); + enterRule(_localctx, 246, RULE_superSuffix); + int _la; + try { + setState(1739); + switch (_input.LA(1)) { + case LPAREN: + enterOuterAlt(_localctx, 1); + { + setState(1730); + arguments(); + } + break; + case DOT: + enterOuterAlt(_localctx, 2); + { + setState(1731); + match(DOT); + setState(1733); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1732); + typeArguments(); + } + } + + setState(1735); + identifier(); + setState(1737); + switch ( getInterpreter().adaptivePredict(_input,215,_ctx) ) { + case 1: + { + setState(1736); + arguments(); + } + break; + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExplicitGenericInvocationSuffixContext extends ParserRuleContext { + public TerminalNode SUPER() { return getToken(JavaParser.SUPER, 0); } + public SuperSuffixContext superSuffix() { + return getRuleContext(SuperSuffixContext.class,0); + } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public ExplicitGenericInvocationSuffixContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_explicitGenericInvocationSuffix; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterExplicitGenericInvocationSuffix(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitExplicitGenericInvocationSuffix(this); + } + } + + public final ExplicitGenericInvocationSuffixContext explicitGenericInvocationSuffix() throws RecognitionException { + ExplicitGenericInvocationSuffixContext _localctx = new ExplicitGenericInvocationSuffixContext(_ctx, getState()); + enterRule(_localctx, 248, RULE_explicitGenericInvocationSuffix); + try { + setState(1746); + switch (_input.LA(1)) { + case SUPER: + enterOuterAlt(_localctx, 1); + { + setState(1741); + match(SUPER); + setState(1742); + superSuffix(); + } + break; + case MODULE: + case OPEN: + case REQUIRES: + case EXPORTS: + case OPENS: + case TO: + case USES: + case PROVIDES: + case WITH: + case TRANSITIVE: + case VAR: + case YIELD: + case RECORD: + case SEALED: + case PERMITS: + case IDENTIFIER: + enterOuterAlt(_localctx, 2); + { + setState(1743); + identifier(); + setState(1744); + arguments(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArgumentsContext extends ParserRuleContext { + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public ArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).enterArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaParserListener ) ((JavaParserListener)listener).exitArguments(this); + } + } + + public final ArgumentsContext arguments() throws RecognitionException { + ArgumentsContext _localctx = new ArgumentsContext(_ctx, getState()); + enterRule(_localctx, 250, RULE_arguments); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1748); + match(LPAREN); + setState(1750); + _la = _input.LA(1); + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (BOOLEAN - 3)) | (1L << (BYTE - 3)) | (1L << (CHAR - 3)) | (1L << (DOUBLE - 3)) | (1L << (FLOAT - 3)) | (1L << (INT - 3)) | (1L << (LONG - 3)) | (1L << (NEW - 3)) | (1L << (SHORT - 3)) | (1L << (SUPER - 3)) | (1L << (SWITCH - 3)) | (1L << (THIS - 3)) | (1L << (VOID - 3)) | (1L << (MODULE - 3)) | (1L << (OPEN - 3)) | (1L << (REQUIRES - 3)) | (1L << (EXPORTS - 3)) | (1L << (OPENS - 3)) | (1L << (TO - 3)) | (1L << (USES - 3)) | (1L << (PROVIDES - 3)) | (1L << (WITH - 3)) | (1L << (TRANSITIVE - 3)) | (1L << (VAR - 3)) | (1L << (YIELD - 3)) | (1L << (RECORD - 3)) | (1L << (SEALED - 3)) | (1L << (PERMITS - 3)))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (DECIMAL_LITERAL - 67)) | (1L << (HEX_LITERAL - 67)) | (1L << (OCT_LITERAL - 67)) | (1L << (BINARY_LITERAL - 67)) | (1L << (FLOAT_LITERAL - 67)) | (1L << (HEX_FLOAT_LITERAL - 67)) | (1L << (BOOL_LITERAL - 67)) | (1L << (CHAR_LITERAL - 67)) | (1L << (STRING_LITERAL - 67)) | (1L << (TEXT_BLOCK - 67)) | (1L << (NULL_LITERAL - 67)) | (1L << (LPAREN - 67)) | (1L << (LT - 67)) | (1L << (BANG - 67)) | (1L << (TILDE - 67)) | (1L << (INC - 67)) | (1L << (DEC - 67)) | (1L << (ADD - 67)) | (1L << (SUB - 67)) | (1L << (AT - 67)) | (1L << (IDENTIFIER - 67)))) != 0)) { + { + setState(1749); + expressionList(); + } + } + + setState(1752); + match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 99: + return expression_sempred((ExpressionContext)_localctx, predIndex); + case 107: + return guardedPattern_sempred((GuardedPatternContext)_localctx, predIndex); + } + return true; + } + private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 0: + return precpred(_ctx, 14); + case 1: + return precpred(_ctx, 13); + case 2: + return precpred(_ctx, 12); + case 3: + return precpred(_ctx, 11); + case 4: + return precpred(_ctx, 9); + case 5: + return precpred(_ctx, 8); + case 6: + return precpred(_ctx, 7); + case 7: + return precpred(_ctx, 6); + case 8: + return precpred(_ctx, 5); + case 9: + return precpred(_ctx, 4); + case 10: + return precpred(_ctx, 3); + case 11: + return precpred(_ctx, 2); + case 12: + return precpred(_ctx, 25); + case 13: + return precpred(_ctx, 24); + case 14: + return precpred(_ctx, 22); + case 15: + return precpred(_ctx, 18); + case 16: + return precpred(_ctx, 10); + } + return true; + } + private boolean guardedPattern_sempred(GuardedPatternContext _localctx, int predIndex) { + switch (predIndex) { + case 17: + return precpred(_ctx, 1); + } + return true; + } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\u0082\u06dd\4\2\t"+ + "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ + "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ + "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ + "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ + "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+ + "k\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4"+ + "w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\3\2\5\2\u0100"+ + "\n\2\3\2\3\2\7\2\u0104\n\2\f\2\16\2\u0107\13\2\3\2\3\2\7\2\u010b\n\2\f"+ + "\2\16\2\u010e\13\2\3\2\3\2\3\2\5\2\u0113\n\2\3\3\7\3\u0116\n\3\f\3\16"+ + "\3\u0119\13\3\3\3\3\3\3\3\3\3\3\4\3\4\5\4\u0121\n\4\3\4\3\4\3\4\5\4\u0126"+ + "\n\4\3\4\3\4\3\5\7\5\u012b\n\5\f\5\16\5\u012e\13\5\3\5\3\5\3\5\3\5\3\5"+ + "\5\5\u0135\n\5\3\6\3\6\3\6\3\6\3\6\5\6\u013c\n\6\3\7\3\7\3\7\3\7\3\7\3"+ + "\7\3\7\3\7\3\7\3\7\5\7\u0148\n\7\3\b\3\b\5\b\u014c\n\b\3\t\3\t\3\t\5\t"+ + "\u0151\n\t\3\t\3\t\5\t\u0155\n\t\3\t\3\t\5\t\u0159\n\t\3\t\3\t\5\t\u015d"+ + "\n\t\3\t\3\t\3\n\3\n\3\n\3\n\7\n\u0165\n\n\f\n\16\n\u0168\13\n\3\n\3\n"+ + "\3\13\7\13\u016d\n\13\f\13\16\13\u0170\13\13\3\13\3\13\3\13\7\13\u0175"+ + "\n\13\f\13\16\13\u0178\13\13\3\13\5\13\u017b\n\13\3\f\3\f\3\f\7\f\u0180"+ + "\n\f\f\f\16\f\u0183\13\f\3\r\3\r\3\r\3\r\5\r\u0189\n\r\3\r\3\r\5\r\u018d"+ + "\n\r\3\r\5\r\u0190\n\r\3\r\5\r\u0193\n\r\3\r\3\r\3\16\3\16\3\16\7\16\u019a"+ + "\n\16\f\16\16\16\u019d\13\16\3\17\7\17\u01a0\n\17\f\17\16\17\u01a3\13"+ + "\17\3\17\3\17\5\17\u01a7\n\17\3\17\5\17\u01aa\n\17\3\20\3\20\7\20\u01ae"+ + "\n\20\f\20\16\20\u01b1\13\20\3\21\3\21\3\21\5\21\u01b6\n\21\3\21\3\21"+ + "\5\21\u01ba\n\21\3\21\3\21\5\21\u01be\n\21\3\21\3\21\3\22\3\22\7\22\u01c4"+ + "\n\22\f\22\16\22\u01c7\13\22\3\22\3\22\3\23\3\23\7\23\u01cd\n\23\f\23"+ + "\16\23\u01d0\13\23\3\23\3\23\3\24\3\24\5\24\u01d6\n\24\3\24\3\24\7\24"+ + "\u01da\n\24\f\24\16\24\u01dd\13\24\3\24\5\24\u01e0\n\24\3\25\3\25\3\25"+ + "\3\25\3\25\3\25\3\25\3\25\3\25\3\25\5\25\u01ec\n\25\3\26\3\26\3\26\3\26"+ + "\3\26\7\26\u01f3\n\26\f\26\16\26\u01f6\13\26\3\26\3\26\5\26\u01fa\n\26"+ + "\3\26\3\26\3\27\3\27\5\27\u0200\n\27\3\30\3\30\5\30\u0204\n\30\3\31\3"+ + "\31\3\31\3\32\3\32\3\32\3\33\3\33\3\33\3\33\5\33\u0210\n\33\3\33\3\33"+ + "\3\34\7\34\u0215\n\34\f\34\16\34\u0218\13\34\3\34\3\34\3\34\3\35\3\35"+ + "\3\35\3\35\3\36\7\36\u0222\n\36\f\36\16\36\u0225\13\36\3\36\3\36\5\36"+ + "\u0229\n\36\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\5\37\u0233\n\37\3"+ + " \3 \3 \3 \7 \u0239\n \f \16 \u023c\13 \3 \3 \3!\3!\3!\7!\u0243\n!\f!"+ + "\16!\u0246\13!\3!\3!\3!\3\"\7\"\u024c\n\"\f\"\16\"\u024f\13\"\3\"\3\""+ + "\3#\3#\3#\3#\3#\3#\5#\u0259\n#\3$\7$\u025c\n$\f$\16$\u025f\13$\3$\3$\3"+ + "$\3%\7%\u0265\n%\f%\16%\u0268\13%\3%\3%\3%\3%\3%\7%\u026f\n%\f%\16%\u0272"+ + "\13%\3%\3%\5%\u0276\n%\3%\3%\3&\3&\3&\7&\u027d\n&\f&\16&\u0280\13&\3\'"+ + "\3\'\3\'\5\'\u0285\n\'\3(\3(\3(\7(\u028a\n(\f(\16(\u028d\13(\3)\3)\5)"+ + "\u0291\n)\3*\3*\3*\3*\7*\u0297\n*\f*\16*\u029a\13*\3*\5*\u029d\n*\5*\u029f"+ + "\n*\3*\3*\3+\3+\5+\u02a5\n+\3+\3+\7+\u02a9\n+\f+\16+\u02ac\13+\3+\3+\5"+ + "+\u02b0\n+\3,\3,\7,\u02b4\n,\f,\16,\u02b7\13,\3,\3,\3,\5,\u02bc\n,\5,"+ + "\u02be\n,\3-\3-\3-\7-\u02c3\n-\f-\16-\u02c6\13-\3.\3.\5.\u02ca\n.\3.\3"+ + ".\3.\5.\u02cf\n.\3.\5.\u02d2\n.\5.\u02d4\n.\3.\3.\3/\3/\3/\3/\7/\u02dc"+ + "\n/\f/\16/\u02df\13/\3/\3/\3\60\3\60\3\60\7\60\u02e6\n\60\f\60\16\60\u02e9"+ + "\13\60\3\60\3\60\5\60\u02ed\n\60\3\60\5\60\u02f0\n\60\3\61\7\61\u02f3"+ + "\n\61\f\61\16\61\u02f6\13\61\3\61\3\61\3\61\3\62\7\62\u02fc\n\62\f\62"+ + "\16\62\u02ff\13\62\3\62\3\62\7\62\u0303\n\62\f\62\16\62\u0306\13\62\3"+ + "\62\3\62\3\62\3\63\3\63\3\63\7\63\u030e\n\63\f\63\16\63\u0311\13\63\3"+ + "\64\7\64\u0314\n\64\f\64\16\64\u0317\13\64\3\64\3\64\3\64\3\65\3\65\3"+ + "\65\7\65\u031f\n\65\f\65\16\65\u0322\13\65\3\66\3\66\3\66\3\66\3\66\3"+ + "\66\3\66\5\66\u032b\n\66\3\67\3\67\38\38\39\39\39\79\u0334\n9\f9\169\u0337"+ + "\139\39\39\39\3:\3:\3:\5:\u033f\n:\3:\3:\3:\5:\u0344\n:\3:\5:\u0347\n"+ + ":\3;\3;\3;\7;\u034c\n;\f;\16;\u034f\13;\3<\3<\3<\3<\3=\3=\3=\5=\u0358"+ + "\n=\3>\3>\3>\3>\7>\u035e\n>\f>\16>\u0361\13>\5>\u0363\n>\3>\5>\u0366\n"+ + ">\3>\3>\3?\3?\3?\3?\3?\3@\3@\7@\u0371\n@\f@\16@\u0374\13@\3@\3@\3A\7A"+ + "\u0379\nA\fA\16A\u037c\13A\3A\3A\5A\u0380\nA\3B\3B\3B\3B\3B\3B\5B\u0388"+ + "\nB\3B\3B\5B\u038c\nB\3B\3B\5B\u0390\nB\3B\3B\5B\u0394\nB\3B\3B\5B\u0398"+ + "\nB\5B\u039a\nB\3C\3C\5C\u039e\nC\3D\3D\3D\3D\5D\u03a4\nD\3E\3E\3F\3F"+ + "\3F\3G\5G\u03ac\nG\3G\3G\3G\3G\3H\3H\7H\u03b4\nH\fH\16H\u03b7\13H\3H\3"+ + "H\3I\3I\7I\u03bd\nI\fI\16I\u03c0\13I\3I\3I\3I\3I\3I\3I\3I\5I\u03c9\nI"+ + "\3I\3I\3I\3I\3I\3I\5I\u03d1\nI\3I\3I\3I\3I\3I\3I\3I\3I\3I\3I\3I\3I\5I"+ + "\u03df\nI\3J\3J\3K\3K\3K\5K\u03e6\nK\3K\3K\3K\5K\u03eb\nK\3K\3K\3L\3L"+ + "\5L\u03f1\nL\3L\3L\3M\3M\3M\7M\u03f8\nM\fM\16M\u03fb\13M\3N\3N\3N\3O\3"+ + "O\3O\7O\u0403\nO\fO\16O\u0406\13O\3O\3O\3P\3P\7P\u040c\nP\fP\16P\u040f"+ + "\13P\3P\3P\3Q\3Q\3Q\3Q\3Q\5Q\u0418\nQ\3R\7R\u041b\nR\fR\16R\u041e\13R"+ + "\3R\3R\3R\3R\3R\3R\3R\3R\5R\u0428\nR\3S\3S\3T\3T\3U\7U\u042f\nU\fU\16"+ + "U\u0432\13U\3U\3U\3U\5U\u0437\nU\3V\3V\3V\3V\3V\5V\u043e\nV\3V\3V\3V\3"+ + "V\3V\3V\3V\5V\u0447\nV\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V\3"+ + "V\3V\3V\3V\6V\u045c\nV\rV\16V\u045d\3V\5V\u0461\nV\3V\5V\u0464\nV\3V\3"+ + "V\3V\3V\7V\u046a\nV\fV\16V\u046d\13V\3V\5V\u0470\nV\3V\3V\3V\3V\7V\u0476"+ + "\nV\fV\16V\u0479\13V\3V\7V\u047c\nV\fV\16V\u047f\13V\3V\3V\3V\3V\3V\3"+ + "V\3V\3V\5V\u0489\nV\3V\3V\3V\3V\3V\3V\3V\5V\u0492\nV\3V\3V\3V\5V\u0497"+ + "\nV\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V\5V\u04a4\nV\3V\3V\3V\3V\5V\u04aa"+ + "\nV\3W\3W\3W\7W\u04af\nW\fW\16W\u04b2\13W\3W\3W\3W\3W\3W\3X\3X\3X\7X\u04bc"+ + "\nX\fX\16X\u04bf\13X\3Y\3Y\3Y\3Z\3Z\3Z\5Z\u04c7\nZ\3Z\3Z\3[\3[\3[\7[\u04ce"+ + "\n[\f[\16[\u04d1\13[\3\\\7\\\u04d4\n\\\f\\\16\\\u04d7\13\\\3\\\3\\\3\\"+ + "\3\\\3\\\5\\\u04de\n\\\3\\\3\\\3\\\3\\\5\\\u04e4\n\\\3]\6]\u04e7\n]\r"+ + "]\16]\u04e8\3]\6]\u04ec\n]\r]\16]\u04ed\3^\3^\3^\3^\3^\3^\5^\u04f6\n^"+ + "\3^\3^\3^\5^\u04fb\n^\3_\3_\5_\u04ff\n_\3_\3_\5_\u0503\n_\3_\3_\5_\u0507"+ + "\n_\5_\u0509\n_\3`\3`\5`\u050d\n`\3a\7a\u0510\na\fa\16a\u0513\13a\3a\3"+ + "a\5a\u0517\na\3a\3a\3a\3a\3b\3b\3b\3b\3c\3c\3c\7c\u0524\nc\fc\16c\u0527"+ + "\13c\3d\3d\3d\5d\u052c\nd\3d\3d\3e\3e\3e\3e\3e\7e\u0535\ne\fe\16e\u0538"+ + "\13e\3e\3e\3e\7e\u053d\ne\fe\16e\u0540\13e\3e\3e\3e\3e\3e\3e\3e\3e\5e"+ + "\u054a\ne\3e\3e\5e\u054e\ne\3e\3e\3e\5e\u0553\ne\3e\3e\3e\3e\3e\3e\5e"+ + "\u055b\ne\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\5e\u056b\ne\3e\3e"+ + "\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e"+ + "\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\5e\u0598\ne\3e"+ + "\3e\3e\3e\5e\u059e\ne\3e\3e\3e\5e\u05a3\ne\3e\3e\3e\3e\3e\3e\3e\5e\u05ac"+ + "\ne\7e\u05ae\ne\fe\16e\u05b1\13e\3f\7f\u05b4\nf\ff\16f\u05b7\13f\3f\3"+ + "f\7f\u05bb\nf\ff\16f\u05be\13f\3f\3f\3g\3g\3g\3g\3h\3h\3h\5h\u05c9\nh"+ + "\3h\3h\3h\3h\3h\7h\u05d0\nh\fh\16h\u05d3\13h\3h\3h\3h\3h\5h\u05d9\nh\3"+ + "h\5h\u05dc\nh\3i\3i\5i\u05e0\ni\3j\3j\3j\3j\3j\3j\3j\3j\3j\3j\3j\3j\3"+ + "j\3j\3j\3j\5j\u05f2\nj\5j\u05f4\nj\3k\3k\3k\3k\7k\u05fa\nk\fk\16k\u05fd"+ + "\13k\3k\3k\3l\3l\3l\3l\5l\u0605\nl\3l\3l\3l\3l\3l\5l\u060c\nl\3m\3m\3"+ + "m\3m\3m\3m\7m\u0614\nm\fm\16m\u0617\13m\3m\3m\7m\u061b\nm\fm\16m\u061e"+ + "\13m\3m\3m\3m\7m\u0623\nm\fm\16m\u0626\13m\5m\u0628\nm\3m\3m\3m\7m\u062d"+ + "\nm\fm\16m\u0630\13m\3n\3n\7n\u0634\nn\fn\16n\u0637\13n\5n\u0639\nn\3"+ + "o\3o\3o\5o\u063e\no\3o\7o\u0641\no\fo\16o\u0644\13o\3o\3o\5o\u0648\no"+ + "\3p\5p\u064b\np\3p\3p\3p\3p\3p\3p\5p\u0653\np\3q\3q\5q\u0657\nq\3q\3q"+ + "\3q\5q\u065c\nq\7q\u065e\nq\fq\16q\u0661\13q\3q\5q\u0664\nq\3r\3r\5r\u0668"+ + "\nr\3r\3r\3s\3s\6s\u066e\ns\rs\16s\u066f\3s\3s\3s\3s\3s\6s\u0677\ns\r"+ + "s\16s\u0678\3s\3s\7s\u067d\ns\fs\16s\u0680\13s\5s\u0682\ns\3t\3t\5t\u0686"+ + "\nt\3u\3u\3u\3v\3v\3v\5v\u068e\nv\3w\3w\3w\5w\u0693\nw\3x\3x\3x\3x\3y"+ + "\3y\3y\7y\u069c\ny\fy\16y\u069f\13y\3z\7z\u06a2\nz\fz\16z\u06a5\13z\3"+ + "z\3z\5z\u06a9\nz\3z\7z\u06ac\nz\fz\16z\u06af\13z\3z\3z\7z\u06b3\nz\fz"+ + "\16z\u06b6\13z\3{\3{\3|\3|\3|\3|\7|\u06be\n|\f|\16|\u06c1\13|\3|\3|\3"+ + "}\3}\3}\5}\u06c8\n}\3}\3}\5}\u06cc\n}\5}\u06ce\n}\3~\3~\3~\3~\3~\5~\u06d5"+ + "\n~\3\177\3\177\5\177\u06d9\n\177\3\177\3\177\3\177\2\4\u00c8\u00d8\u0080"+ + "\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFH"+ + "JLNPRTVXZ\\^`bdfhjlnprtvxz|~\u0080\u0082\u0084\u0086\u0088\u008a\u008c"+ + "\u008e\u0090\u0092\u0094\u0096\u0098\u009a\u009c\u009e\u00a0\u00a2\u00a4"+ + "\u00a6\u00a8\u00aa\u00ac\u00ae\u00b0\u00b2\u00b4\u00b6\u00b8\u00ba\u00bc"+ + "\u00be\u00c0\u00c2\u00c4\u00c6\u00c8\u00ca\u00cc\u00ce\u00d0\u00d2\u00d4"+ + "\u00d6\u00d8\u00da\u00dc\u00de\u00e0\u00e2\u00e4\u00e6\u00e8\u00ea\u00ec"+ + "\u00ee\u00f0\u00f2\u00f4\u00f6\u00f8\u00fa\u00fc\2\21\4\2\23\23**\3\2"+ + "EH\3\2IJ\4\2((>>\4\2\65C\u0082\u0082\5\2\65>AC\u0082\u0082\4\2\\]fi\4"+ + "\2jkoo\3\2hi\4\2Z[ab\4\2``cc\4\2YYpz\3\2fg\4\2__{{\n\2\5\5\7\7\n\n\20"+ + "\20\26\26\35\35\37\37\'\'\u07a1\2\u0112\3\2\2\2\4\u0117\3\2\2\2\6\u011e"+ + "\3\2\2\2\b\u012c\3\2\2\2\n\u013b\3\2\2\2\f\u0147\3\2\2\2\16\u014b\3\2"+ + "\2\2\20\u014d\3\2\2\2\22\u0160\3\2\2\2\24\u016e\3\2\2\2\26\u017c\3\2\2"+ + "\2\30\u0184\3\2\2\2\32\u0196\3\2\2\2\34\u01a1\3\2\2\2\36\u01ab\3\2\2\2"+ + " \u01b2\3\2\2\2\"\u01c1\3\2\2\2$\u01ca\3\2\2\2&\u01df\3\2\2\2(\u01eb\3"+ + "\2\2\2*\u01ed\3\2\2\2,\u01ff\3\2\2\2.\u0203\3\2\2\2\60\u0205\3\2\2\2\62"+ + "\u0208\3\2\2\2\64\u020b\3\2\2\2\66\u0216\3\2\2\28\u021c\3\2\2\2:\u0228"+ + "\3\2\2\2<\u0232\3\2\2\2>\u0234\3\2\2\2@\u023f\3\2\2\2B\u024d\3\2\2\2D"+ + "\u0258\3\2\2\2F\u025d\3\2\2\2H\u0266\3\2\2\2J\u0279\3\2\2\2L\u0281\3\2"+ + "\2\2N\u0286\3\2\2\2P\u0290\3\2\2\2R\u0292\3\2\2\2T\u02aa\3\2\2\2V\u02bd"+ + "\3\2\2\2X\u02bf\3\2\2\2Z\u02c7\3\2\2\2\\\u02d7\3\2\2\2^\u02ef\3\2\2\2"+ + "`\u02f4\3\2\2\2b\u02fd\3\2\2\2d\u030a\3\2\2\2f\u0315\3\2\2\2h\u031b\3"+ + "\2\2\2j\u032a\3\2\2\2l\u032c\3\2\2\2n\u032e\3\2\2\2p\u0335\3\2\2\2r\u033e"+ + "\3\2\2\2t\u0348\3\2\2\2v\u0350\3\2\2\2x\u0357\3\2\2\2z\u0359\3\2\2\2|"+ + "\u0369\3\2\2\2~\u036e\3\2\2\2\u0080\u037f\3\2\2\2\u0082\u0399\3\2\2\2"+ + "\u0084\u039d\3\2\2\2\u0086\u039f\3\2\2\2\u0088\u03a5\3\2\2\2\u008a\u03a7"+ + "\3\2\2\2\u008c\u03ab\3\2\2\2\u008e\u03b1\3\2\2\2\u0090\u03de\3\2\2\2\u0092"+ + "\u03e0\3\2\2\2\u0094\u03e2\3\2\2\2\u0096\u03ee\3\2\2\2\u0098\u03f4\3\2"+ + "\2\2\u009a\u03fc\3\2\2\2\u009c\u03ff\3\2\2\2\u009e\u0409\3\2\2\2\u00a0"+ + "\u0417\3\2\2\2\u00a2\u041c\3\2\2\2\u00a4\u0429\3\2\2\2\u00a6\u042b\3\2"+ + "\2\2\u00a8\u0430\3\2\2\2\u00aa\u04a9\3\2\2\2\u00ac\u04ab\3\2\2\2\u00ae"+ + "\u04b8\3\2\2\2\u00b0\u04c0\3\2\2\2\u00b2\u04c3\3\2\2\2\u00b4\u04ca\3\2"+ + "\2\2\u00b6\u04e3\3\2\2\2\u00b8\u04e6\3\2\2\2\u00ba\u04fa\3\2\2\2\u00bc"+ + "\u0508\3\2\2\2\u00be\u050c\3\2\2\2\u00c0\u0511\3\2\2\2\u00c2\u051c\3\2"+ + "\2\2\u00c4\u0520\3\2\2\2\u00c6\u052b\3\2\2\2\u00c8\u055a\3\2\2\2\u00ca"+ + "\u05b5\3\2\2\2\u00cc\u05c1\3\2\2\2\u00ce\u05db\3\2\2\2\u00d0\u05df\3\2"+ + "\2\2\u00d2\u05f3\3\2\2\2\u00d4\u05f5\3\2\2\2\u00d6\u060b\3\2\2\2\u00d8"+ + "\u0627\3\2\2\2\u00da\u0638\3\2\2\2\u00dc\u063d\3\2\2\2\u00de\u0652\3\2"+ + "\2\2\u00e0\u0663\3\2\2\2\u00e2\u0665\3\2\2\2\u00e4\u0681\3\2\2\2\u00e6"+ + "\u0683\3\2\2\2\u00e8\u0687\3\2\2\2\u00ea\u068d\3\2\2\2\u00ec\u0692\3\2"+ + "\2\2\u00ee\u0694\3\2\2\2\u00f0\u0698\3\2\2\2\u00f2\u06a3\3\2\2\2\u00f4"+ + "\u06b7\3\2\2\2\u00f6\u06b9\3\2\2\2\u00f8\u06cd\3\2\2\2\u00fa\u06d4\3\2"+ + "\2\2\u00fc\u06d6\3\2\2\2\u00fe\u0100\5\4\3\2\u00ff\u00fe\3\2\2\2\u00ff"+ + "\u0100\3\2\2\2\u0100\u0105\3\2\2\2\u0101\u0104\5\6\4\2\u0102\u0104\7V"+ + "\2\2\u0103\u0101\3\2\2\2\u0103\u0102\3\2\2\2\u0104\u0107\3\2\2\2\u0105"+ + "\u0103\3\2\2\2\u0105\u0106\3\2\2\2\u0106\u010c\3\2\2\2\u0107\u0105\3\2"+ + "\2\2\u0108\u010b\5\b\5\2\u0109\u010b\7V\2\2\u010a\u0108\3\2\2\2\u010a"+ + "\u0109\3\2\2\2\u010b\u010e\3\2\2\2\u010c\u010a\3\2\2\2\u010c\u010d\3\2"+ + "\2\2\u010d\u0113\3\2\2\2\u010e\u010c\3\2\2\2\u010f\u0110\5\u008cG\2\u0110"+ + "\u0111\7\2\2\3\u0111\u0113\3\2\2\2\u0112\u00ff\3\2\2\2\u0112\u010f\3\2"+ + "\2\2\u0113\3\3\2\2\2\u0114\u0116\5r:\2\u0115\u0114\3\2\2\2\u0116\u0119"+ + "\3\2\2\2\u0117\u0115\3\2\2\2\u0117\u0118\3\2\2\2\u0118\u011a\3\2\2\2\u0119"+ + "\u0117\3\2\2\2\u011a\u011b\7\"\2\2\u011b\u011c\5h\65\2\u011c\u011d\7V"+ + "\2\2\u011d\5\3\2\2\2\u011e\u0120\7\33\2\2\u011f\u0121\7(\2\2\u0120\u011f"+ + "\3\2\2\2\u0120\u0121\3\2\2\2\u0121\u0122\3\2\2\2\u0122\u0125\5h\65\2\u0123"+ + "\u0124\7X\2\2\u0124\u0126\7j\2\2\u0125\u0123\3\2\2\2\u0125\u0126\3\2\2"+ + "\2\u0126\u0127\3\2\2\2\u0127\u0128\7V\2\2\u0128\7\3\2\2\2\u0129\u012b"+ + "\5\f\7\2\u012a\u0129\3\2\2\2\u012b\u012e\3\2\2\2\u012c\u012a\3\2\2\2\u012c"+ + "\u012d\3\2\2\2\u012d\u0134\3\2\2\2\u012e\u012c\3\2\2\2\u012f\u0135\5\20"+ + "\t\2\u0130\u0135\5\30\r\2\u0131\u0135\5 \21\2\u0132\u0135\5|?\2\u0133"+ + "\u0135\5\u0094K\2\u0134\u012f\3\2\2\2\u0134\u0130\3\2\2\2\u0134\u0131"+ + "\3\2\2\2\u0134\u0132\3\2\2\2\u0134\u0133\3\2\2\2\u0135\t\3\2\2\2\u0136"+ + "\u013c\5\f\7\2\u0137\u013c\7 \2\2\u0138\u013c\7,\2\2\u0139\u013c\7\60"+ + "\2\2\u013a\u013c\7\63\2\2\u013b\u0136\3\2\2\2\u013b\u0137\3\2\2\2\u013b"+ + "\u0138\3\2\2\2\u013b\u0139\3\2\2\2\u013b\u013a\3\2\2\2\u013c\13\3\2\2"+ + "\2\u013d\u0148\5r:\2\u013e\u0148\7%\2\2\u013f\u0148\7$\2\2\u0140\u0148"+ + "\7#\2\2\u0141\u0148\7(\2\2\u0142\u0148\7\3\2\2\u0143\u0148\7\24\2\2\u0144"+ + "\u0148\7)\2\2\u0145\u0148\7B\2\2\u0146\u0148\7D\2\2\u0147\u013d\3\2\2"+ + "\2\u0147\u013e\3\2\2\2\u0147\u013f\3\2\2\2\u0147\u0140\3\2\2\2\u0147\u0141"+ + "\3\2\2\2\u0147\u0142\3\2\2\2\u0147\u0143\3\2\2\2\u0147\u0144\3\2\2\2\u0147"+ + "\u0145\3\2\2\2\u0147\u0146\3\2\2\2\u0148\r\3\2\2\2\u0149\u014c\7\24\2"+ + "\2\u014a\u014c\5r:\2\u014b\u0149\3\2\2\2\u014b\u014a\3\2\2\2\u014c\17"+ + "\3\2\2\2\u014d\u014e\7\13\2\2\u014e\u0150\5\u00a4S\2\u014f\u0151\5\22"+ + "\n\2\u0150\u014f\3\2\2\2\u0150\u0151\3\2\2\2\u0151\u0154\3\2\2\2\u0152"+ + "\u0153\7\23\2\2\u0153\u0155\5\u00f2z\2\u0154\u0152\3\2\2\2\u0154\u0155"+ + "\3\2\2\2\u0155\u0158\3\2\2\2\u0156\u0157\7\32\2\2\u0157\u0159\5\u00f0"+ + "y\2\u0158\u0156\3\2\2\2\u0158\u0159\3\2\2\2\u0159\u015c\3\2\2\2\u015a"+ + "\u015b\7C\2\2\u015b\u015d\5\u00f0y\2\u015c\u015a\3\2\2\2\u015c\u015d\3"+ + "\2\2\2\u015d\u015e\3\2\2\2\u015e\u015f\5\"\22\2\u015f\21\3\2\2\2\u0160"+ + "\u0161\7[\2\2\u0161\u0166\5\24\13\2\u0162\u0163\7W\2\2\u0163\u0165\5\24"+ + "\13\2\u0164\u0162\3\2\2\2\u0165\u0168\3\2\2\2\u0166\u0164\3\2\2\2\u0166"+ + "\u0167\3\2\2\2\u0167\u0169\3\2\2\2\u0168\u0166\3\2\2\2\u0169\u016a\7Z"+ + "\2\2\u016a\23\3\2\2\2\u016b\u016d\5r:\2\u016c\u016b\3\2\2\2\u016d\u0170"+ + "\3\2\2\2\u016e\u016c\3\2\2\2\u016e\u016f\3\2\2\2\u016f\u0171\3\2\2\2\u0170"+ + "\u016e\3\2\2\2\u0171\u017a\5\u00a4S\2\u0172\u0176\7\23\2\2\u0173\u0175"+ + "\5r:\2\u0174\u0173\3\2\2\2\u0175\u0178\3\2\2\2\u0176\u0174\3\2\2\2\u0176"+ + "\u0177\3\2\2\2\u0177\u0179\3\2\2\2\u0178\u0176\3\2\2\2\u0179\u017b\5\26"+ + "\f\2\u017a\u0172\3\2\2\2\u017a\u017b\3\2\2\2\u017b\25\3\2\2\2\u017c\u0181"+ + "\5\u00f2z\2\u017d\u017e\7l\2\2\u017e\u0180\5\u00f2z\2\u017f\u017d\3\2"+ + "\2\2\u0180\u0183\3\2\2\2\u0181\u017f\3\2\2\2\u0181\u0182\3\2\2\2\u0182"+ + "\27\3\2\2\2\u0183\u0181\3\2\2\2\u0184\u0185\7\22\2\2\u0185\u0188\5\u00a4"+ + "S\2\u0186\u0187\7\32\2\2\u0187\u0189\5\u00f0y\2\u0188\u0186\3\2\2\2\u0188"+ + "\u0189\3\2\2\2\u0189\u018a\3\2\2\2\u018a\u018c\7R\2\2\u018b\u018d\5\32"+ + "\16\2\u018c\u018b\3\2\2\2\u018c\u018d\3\2\2\2\u018d\u018f\3\2\2\2\u018e"+ + "\u0190\7W\2\2\u018f\u018e\3\2\2\2\u018f\u0190\3\2\2\2\u0190\u0192\3\2"+ + "\2\2\u0191\u0193\5\36\20\2\u0192\u0191\3\2\2\2\u0192\u0193\3\2\2\2\u0193"+ + "\u0194\3\2\2\2\u0194\u0195\7S\2\2\u0195\31\3\2\2\2\u0196\u019b\5\34\17"+ + "\2\u0197\u0198\7W\2\2\u0198\u019a\5\34\17\2\u0199\u0197\3\2\2\2\u019a"+ + "\u019d\3\2\2\2\u019b\u0199\3\2\2\2\u019b\u019c\3\2\2\2\u019c\33\3\2\2"+ + "\2\u019d\u019b\3\2\2\2\u019e\u01a0\5r:\2\u019f\u019e\3\2\2\2\u01a0\u01a3"+ + "\3\2\2\2\u01a1\u019f\3\2\2\2\u01a1\u01a2\3\2\2\2\u01a2\u01a4\3\2\2\2\u01a3"+ + "\u01a1\3\2\2\2\u01a4\u01a6\5\u00a4S\2\u01a5\u01a7\5\u00fc\177\2\u01a6"+ + "\u01a5\3\2\2\2\u01a6\u01a7\3\2\2\2\u01a7\u01a9\3\2\2\2\u01a8\u01aa\5\""+ + "\22\2\u01a9\u01a8\3\2\2\2\u01a9\u01aa\3\2\2\2\u01aa\35\3\2\2\2\u01ab\u01af"+ + "\7V\2\2\u01ac\u01ae\5&\24\2\u01ad\u01ac\3\2\2\2\u01ae\u01b1\3\2\2\2\u01af"+ + "\u01ad\3\2\2\2\u01af\u01b0\3\2\2\2\u01b0\37\3\2\2\2\u01b1\u01af\3\2\2"+ + "\2\u01b2\u01b3\7\36\2\2\u01b3\u01b5\5\u00a4S\2\u01b4\u01b6\5\22\n\2\u01b5"+ + "\u01b4\3\2\2\2\u01b5\u01b6\3\2\2\2\u01b6\u01b9\3\2\2\2\u01b7\u01b8\7\23"+ + "\2\2\u01b8\u01ba\5\u00f0y\2\u01b9\u01b7\3\2\2\2\u01b9\u01ba\3\2\2\2\u01ba"+ + "\u01bd\3\2\2\2\u01bb\u01bc\7C\2\2\u01bc\u01be\5\u00f0y\2\u01bd\u01bb\3"+ + "\2\2\2\u01bd\u01be\3\2\2\2\u01be\u01bf\3\2\2\2\u01bf\u01c0\5$\23\2\u01c0"+ + "!\3\2\2\2\u01c1\u01c5\7R\2\2\u01c2\u01c4\5&\24\2\u01c3\u01c2\3\2\2\2\u01c4"+ + "\u01c7\3\2\2\2\u01c5\u01c3\3\2\2\2\u01c5\u01c6\3\2\2\2\u01c6\u01c8\3\2"+ + "\2\2\u01c7\u01c5\3\2\2\2\u01c8\u01c9\7S\2\2\u01c9#\3\2\2\2\u01ca\u01ce"+ + "\7R\2\2\u01cb\u01cd\5:\36\2\u01cc\u01cb\3\2\2\2\u01cd\u01d0\3\2\2\2\u01ce"+ + "\u01cc\3\2\2\2\u01ce\u01cf\3\2\2\2\u01cf\u01d1\3\2\2\2\u01d0\u01ce\3\2"+ + "\2\2\u01d1\u01d2\7S\2\2\u01d2%\3\2\2\2\u01d3\u01e0\7V\2\2\u01d4\u01d6"+ + "\7(\2\2\u01d5\u01d4\3\2\2\2\u01d5\u01d6\3\2\2\2\u01d6\u01d7\3\2\2\2\u01d7"+ + "\u01e0\5\u009eP\2\u01d8\u01da\5\n\6\2\u01d9\u01d8\3\2\2\2\u01da\u01dd"+ + "\3\2\2\2\u01db\u01d9\3\2\2\2\u01db\u01dc\3\2\2\2\u01dc\u01de\3\2\2\2\u01dd"+ + "\u01db\3\2\2\2\u01de\u01e0\5(\25\2\u01df\u01d3\3\2\2\2\u01df\u01d5\3\2"+ + "\2\2\u01df\u01db\3\2\2\2\u01e0\'\3\2\2\2\u01e1\u01ec\5\u0094K\2\u01e2"+ + "\u01ec\5*\26\2\u01e3\u01ec\5\60\31\2\u01e4\u01ec\58\35\2\u01e5\u01ec\5"+ + "\64\33\2\u01e6\u01ec\5\62\32\2\u01e7\u01ec\5 \21\2\u01e8\u01ec\5|?\2\u01e9"+ + "\u01ec\5\20\t\2\u01ea\u01ec\5\30\r\2\u01eb\u01e1\3\2\2\2\u01eb\u01e2\3"+ + "\2\2\2\u01eb\u01e3\3\2\2\2\u01eb\u01e4\3\2\2\2\u01eb\u01e5\3\2\2\2\u01eb"+ + "\u01e6\3\2\2\2\u01eb\u01e7\3\2\2\2\u01eb\u01e8\3\2\2\2\u01eb\u01e9\3\2"+ + "\2\2\u01eb\u01ea\3\2\2\2\u01ec)\3\2\2\2\u01ed\u01ee\5.\30\2\u01ee\u01ef"+ + "\5\u00a4S\2\u01ef\u01f4\5Z.\2\u01f0\u01f1\7T\2\2\u01f1\u01f3\7U\2\2\u01f2"+ + "\u01f0\3\2\2\2\u01f3\u01f6\3\2\2\2\u01f4\u01f2\3\2\2\2\u01f4\u01f5\3\2"+ + "\2\2\u01f5\u01f9\3\2\2\2\u01f6\u01f4\3\2\2\2\u01f7\u01f8\7/\2\2\u01f8"+ + "\u01fa\5X-\2\u01f9\u01f7\3\2\2\2\u01f9\u01fa\3\2\2\2\u01fa\u01fb\3\2\2"+ + "\2\u01fb\u01fc\5,\27\2\u01fc+\3\2\2\2\u01fd\u0200\5\u009eP\2\u01fe\u0200"+ + "\7V\2\2\u01ff\u01fd\3\2\2\2\u01ff\u01fe\3\2\2\2\u0200-\3\2\2\2\u0201\u0204"+ + "\5\u00f2z\2\u0202\u0204\7\62\2\2\u0203\u0201\3\2\2\2\u0203\u0202\3\2\2"+ + "\2\u0204/\3\2\2\2\u0205\u0206\5\22\n\2\u0206\u0207\5*\26\2\u0207\61\3"+ + "\2\2\2\u0208\u0209\5\22\n\2\u0209\u020a\5\64\33\2\u020a\63\3\2\2\2\u020b"+ + "\u020c\5\u00a4S\2\u020c\u020f\5Z.\2\u020d\u020e\7/\2\2\u020e\u0210\5X"+ + "-\2\u020f\u020d\3\2\2\2\u020f\u0210\3\2\2\2\u0210\u0211\3\2\2\2\u0211"+ + "\u0212\5\u009eP\2\u0212\65\3\2\2\2\u0213\u0215\5\n\6\2\u0214\u0213\3\2"+ + "\2\2\u0215\u0218\3\2\2\2\u0216\u0214\3\2\2\2\u0216\u0217\3\2\2\2\u0217"+ + "\u0219\3\2\2\2\u0218\u0216\3\2\2\2\u0219\u021a\5\u00a4S\2\u021a\u021b"+ + "\5\u009eP\2\u021b\67\3\2\2\2\u021c\u021d\5\u00f2z\2\u021d\u021e\5J&\2"+ + "\u021e\u021f\7V\2\2\u021f9\3\2\2\2\u0220\u0222\5\n\6\2\u0221\u0220\3\2"+ + "\2\2\u0222\u0225\3\2\2\2\u0223\u0221\3\2\2\2\u0223\u0224\3\2\2\2\u0224"+ + "\u0226\3\2\2\2\u0225\u0223\3\2\2\2\u0226\u0229\5<\37\2\u0227\u0229\7V"+ + "\2\2\u0228\u0223\3\2\2\2\u0228\u0227\3\2\2\2\u0229;\3\2\2\2\u022a\u0233"+ + "\5\u0094K\2\u022b\u0233\5> \2\u022c\u0233\5B\"\2\u022d\u0233\5F$\2\u022e"+ + "\u0233\5 \21\2\u022f\u0233\5|?\2\u0230\u0233\5\20\t\2\u0231\u0233\5\30"+ + "\r\2\u0232\u022a\3\2\2\2\u0232\u022b\3\2\2\2\u0232\u022c\3\2\2\2\u0232"+ + "\u022d\3\2\2\2\u0232\u022e\3\2\2\2\u0232\u022f\3\2\2\2\u0232\u0230\3\2"+ + "\2\2\u0232\u0231\3\2\2\2\u0233=\3\2\2\2\u0234\u0235\5\u00f2z\2\u0235\u023a"+ + "\5@!\2\u0236\u0237\7W\2\2\u0237\u0239\5@!\2\u0238\u0236\3\2\2\2\u0239"+ + "\u023c\3\2\2\2\u023a\u0238\3\2\2\2\u023a\u023b\3\2\2\2\u023b\u023d\3\2"+ + "\2\2\u023c\u023a\3\2\2\2\u023d\u023e\7V\2\2\u023e?\3\2\2\2\u023f\u0244"+ + "\5\u00a4S\2\u0240\u0241\7T\2\2\u0241\u0243\7U\2\2\u0242\u0240\3\2\2\2"+ + "\u0243\u0246\3\2\2\2\u0244\u0242\3\2\2\2\u0244\u0245\3\2\2\2\u0245\u0247"+ + "\3\2\2\2\u0246\u0244\3\2\2\2\u0247\u0248\7Y\2\2\u0248\u0249\5P)\2\u0249"+ + "A\3\2\2\2\u024a\u024c\5D#\2\u024b\u024a\3\2\2\2\u024c\u024f\3\2\2\2\u024d"+ + "\u024b\3\2\2\2\u024d\u024e\3\2\2\2\u024e\u0250\3\2\2\2\u024f\u024d\3\2"+ + "\2\2\u0250\u0251\5H%\2\u0251C\3\2\2\2\u0252\u0259\5r:\2\u0253\u0259\7"+ + "%\2\2\u0254\u0259\7\3\2\2\u0255\u0259\7\16\2\2\u0256\u0259\7(\2\2\u0257"+ + "\u0259\7)\2\2\u0258\u0252\3\2\2\2\u0258\u0253\3\2\2\2\u0258\u0254\3\2"+ + "\2\2\u0258\u0255\3\2\2\2\u0258\u0256\3\2\2\2\u0258\u0257\3\2\2\2\u0259"+ + "E\3\2\2\2\u025a\u025c\5D#\2\u025b\u025a\3\2\2\2\u025c\u025f\3\2\2\2\u025d"+ + "\u025b\3\2\2\2\u025d\u025e\3\2\2\2\u025e\u0260\3\2\2\2\u025f\u025d\3\2"+ + "\2\2\u0260\u0261\5\22\n\2\u0261\u0262\5H%\2\u0262G\3\2\2\2\u0263\u0265"+ + "\5r:\2\u0264\u0263\3\2\2\2\u0265\u0268\3\2\2\2\u0266\u0264\3\2\2\2\u0266"+ + "\u0267\3\2\2\2\u0267\u0269\3\2\2\2\u0268\u0266\3\2\2\2\u0269\u026a\5."+ + "\30\2\u026a\u026b\5\u00a4S\2\u026b\u0270\5Z.\2\u026c\u026d\7T\2\2\u026d"+ + "\u026f\7U\2\2\u026e\u026c\3\2\2\2\u026f\u0272\3\2\2\2\u0270\u026e\3\2"+ + "\2\2\u0270\u0271\3\2\2\2\u0271\u0275\3\2\2\2\u0272\u0270\3\2\2\2\u0273"+ + "\u0274\7/\2\2\u0274\u0276\5X-\2\u0275\u0273\3\2\2\2\u0275\u0276\3\2\2"+ + "\2\u0276\u0277\3\2\2\2\u0277\u0278\5,\27\2\u0278I\3\2\2\2\u0279\u027e"+ + "\5L\'\2\u027a\u027b\7W\2\2\u027b\u027d\5L\'\2\u027c\u027a\3\2\2\2\u027d"+ + "\u0280\3\2\2\2\u027e\u027c\3\2\2\2\u027e\u027f\3\2\2\2\u027fK\3\2\2\2"+ + "\u0280\u027e\3\2\2\2\u0281\u0284\5N(\2\u0282\u0283\7Y\2\2\u0283\u0285"+ + "\5P)\2\u0284\u0282\3\2\2\2\u0284\u0285\3\2\2\2\u0285M\3\2\2\2\u0286\u028b"+ + "\5\u00a4S\2\u0287\u0288\7T\2\2\u0288\u028a\7U\2\2\u0289\u0287\3\2\2\2"+ + "\u028a\u028d\3\2\2\2\u028b\u0289\3\2\2\2\u028b\u028c\3\2\2\2\u028cO\3"+ + "\2\2\2\u028d\u028b\3\2\2\2\u028e\u0291\5R*\2\u028f\u0291\5\u00c8e\2\u0290"+ + "\u028e\3\2\2\2\u0290\u028f\3\2\2\2\u0291Q\3\2\2\2\u0292\u029e\7R\2\2\u0293"+ + "\u0298\5P)\2\u0294\u0295\7W\2\2\u0295\u0297\5P)\2\u0296\u0294\3\2\2\2"+ + "\u0297\u029a\3\2\2\2\u0298\u0296\3\2\2\2\u0298\u0299\3\2\2\2\u0299\u029c"+ + "\3\2\2\2\u029a\u0298\3\2\2\2\u029b\u029d\7W\2\2\u029c\u029b\3\2\2\2\u029c"+ + "\u029d\3\2\2\2\u029d\u029f\3\2\2\2\u029e\u0293\3\2\2\2\u029e\u029f\3\2"+ + "\2\2\u029f\u02a0\3\2\2\2\u02a0\u02a1\7S\2\2\u02a1S\3\2\2\2\u02a2\u02a4"+ + "\5\u00a4S\2\u02a3\u02a5\5\u00f6|\2\u02a4\u02a3\3\2\2\2\u02a4\u02a5\3\2"+ + "\2\2\u02a5\u02a6\3\2\2\2\u02a6\u02a7\7X\2\2\u02a7\u02a9\3\2\2\2\u02a8"+ + "\u02a2\3\2\2\2\u02a9\u02ac\3\2\2\2\u02aa\u02a8\3\2\2\2\u02aa\u02ab\3\2"+ + "\2\2\u02ab\u02ad\3\2\2\2\u02ac\u02aa\3\2\2\2\u02ad\u02af\5\u00a6T\2\u02ae"+ + "\u02b0\5\u00f6|\2\u02af\u02ae\3\2\2\2\u02af\u02b0\3\2\2\2\u02b0U\3\2\2"+ + "\2\u02b1\u02be\5\u00f2z\2\u02b2\u02b4\5r:\2\u02b3\u02b2\3\2\2\2\u02b4"+ + "\u02b7\3\2\2\2\u02b5\u02b3\3\2\2\2\u02b5\u02b6\3\2\2\2\u02b6\u02b8\3\2"+ + "\2\2\u02b7\u02b5\3\2\2\2\u02b8\u02bb\7^\2\2\u02b9\u02ba\t\2\2\2\u02ba"+ + "\u02bc\5\u00f2z\2\u02bb\u02b9\3\2\2\2\u02bb\u02bc\3\2\2\2\u02bc\u02be"+ + "\3\2\2\2\u02bd\u02b1\3\2\2\2\u02bd\u02b5\3\2\2\2\u02beW\3\2\2\2\u02bf"+ + "\u02c4\5h\65\2\u02c0\u02c1\7W\2\2\u02c1\u02c3\5h\65\2\u02c2\u02c0\3\2"+ + "\2\2\u02c3\u02c6\3\2\2\2\u02c4\u02c2\3\2\2\2\u02c4\u02c5\3\2\2\2\u02c5"+ + "Y\3\2\2\2\u02c6\u02c4\3\2\2\2\u02c7\u02d3\7P\2\2\u02c8\u02ca\5\\/\2\u02c9"+ + "\u02c8\3\2\2\2\u02c9\u02ca\3\2\2\2\u02ca\u02d4\3\2\2\2\u02cb\u02ce\5\\"+ + "/\2\u02cc\u02cd\7W\2\2\u02cd\u02cf\5^\60\2\u02ce\u02cc\3\2\2\2\u02ce\u02cf"+ + "\3\2\2\2\u02cf\u02d4\3\2\2\2\u02d0\u02d2\5^\60\2\u02d1\u02d0\3\2\2\2\u02d1"+ + "\u02d2\3\2\2\2\u02d2\u02d4\3\2\2\2\u02d3\u02c9\3\2\2\2\u02d3\u02cb\3\2"+ + "\2\2\u02d3\u02d1\3\2\2\2\u02d4\u02d5\3\2\2\2\u02d5\u02d6\7Q\2\2\u02d6"+ + "[\3\2\2\2\u02d7\u02dd\5\u00f2z\2\u02d8\u02d9\5\u00a4S\2\u02d9\u02da\7"+ + "X\2\2\u02da\u02dc\3\2\2\2\u02db\u02d8\3\2\2\2\u02dc\u02df\3\2\2\2\u02dd"+ + "\u02db\3\2\2\2\u02dd\u02de\3\2\2\2\u02de\u02e0\3\2\2\2\u02df\u02dd\3\2"+ + "\2\2\u02e0\u02e1\7-\2\2\u02e1]\3\2\2\2\u02e2\u02e7\5`\61\2\u02e3\u02e4"+ + "\7W\2\2\u02e4\u02e6\5`\61\2\u02e5\u02e3\3\2\2\2\u02e6\u02e9\3\2\2\2\u02e7"+ + "\u02e5\3\2\2\2\u02e7\u02e8\3\2\2\2\u02e8\u02ec\3\2\2\2\u02e9\u02e7\3\2"+ + "\2\2\u02ea\u02eb\7W\2\2\u02eb\u02ed\5b\62\2\u02ec\u02ea\3\2\2\2\u02ec"+ + "\u02ed\3\2\2\2\u02ed\u02f0\3\2\2\2\u02ee\u02f0\5b\62\2\u02ef\u02e2\3\2"+ + "\2\2\u02ef\u02ee\3\2\2\2\u02f0_\3\2\2\2\u02f1\u02f3\5\16\b\2\u02f2\u02f1"+ + "\3\2\2\2\u02f3\u02f6\3\2\2\2\u02f4\u02f2\3\2\2\2\u02f4\u02f5\3\2\2\2\u02f5"+ + "\u02f7\3\2\2\2\u02f6\u02f4\3\2\2\2\u02f7\u02f8\5\u00f2z\2\u02f8\u02f9"+ + "\5N(\2\u02f9a\3\2\2\2\u02fa\u02fc\5\16\b\2\u02fb\u02fa\3\2\2\2\u02fc\u02ff"+ + "\3\2\2\2\u02fd\u02fb\3\2\2\2\u02fd\u02fe\3\2\2\2\u02fe\u0300\3\2\2\2\u02ff"+ + "\u02fd\3\2\2\2\u0300\u0304\5\u00f2z\2\u0301\u0303\5r:\2\u0302\u0301\3"+ + "\2\2\2\u0303\u0306\3\2\2\2\u0304\u0302\3\2\2\2\u0304\u0305\3\2\2\2\u0305"+ + "\u0307\3\2\2\2\u0306\u0304\3\2\2\2\u0307\u0308\7~\2\2\u0308\u0309\5N("+ + "\2\u0309c\3\2\2\2\u030a\u030f\5f\64\2\u030b\u030c\7W\2\2\u030c\u030e\5"+ + "f\64\2\u030d\u030b\3\2\2\2\u030e\u0311\3\2\2\2\u030f\u030d\3\2\2\2\u030f"+ + "\u0310\3\2\2\2\u0310e\3\2\2\2\u0311\u030f\3\2\2\2\u0312\u0314\5\16\b\2"+ + "\u0313\u0312\3\2\2\2\u0314\u0317\3\2\2\2\u0315\u0313\3\2\2\2\u0315\u0316"+ + "\3\2\2\2\u0316\u0318\3\2\2\2\u0317\u0315\3\2\2\2\u0318\u0319\7?\2\2\u0319"+ + "\u031a\5\u00a4S\2\u031ag\3\2\2\2\u031b\u0320\5\u00a4S\2\u031c\u031d\7"+ + "X\2\2\u031d\u031f\5\u00a4S\2\u031e\u031c\3\2\2\2\u031f\u0322\3\2\2\2\u0320"+ + "\u031e\3\2\2\2\u0320\u0321\3\2\2\2\u0321i\3\2\2\2\u0322\u0320\3\2\2\2"+ + "\u0323\u032b\5l\67\2\u0324\u032b\5n8\2\u0325\u032b\7L\2\2\u0326\u032b"+ + "\7M\2\2\u0327\u032b\7K\2\2\u0328\u032b\7O\2\2\u0329\u032b\7N\2\2\u032a"+ + "\u0323\3\2\2\2\u032a\u0324\3\2\2\2\u032a\u0325\3\2\2\2\u032a\u0326\3\2"+ + "\2\2\u032a\u0327\3\2\2\2\u032a\u0328\3\2\2\2\u032a\u0329\3\2\2\2\u032b"+ + "k\3\2\2\2\u032c\u032d\t\3\2\2\u032dm\3\2\2\2\u032e\u032f\t\4\2\2\u032f"+ + "o\3\2\2\2\u0330\u0331\5\u00a4S\2\u0331\u0332\7X\2\2\u0332\u0334\3\2\2"+ + "\2\u0333\u0330\3\2\2\2\u0334\u0337\3\2\2\2\u0335\u0333\3\2\2\2\u0335\u0336"+ + "\3\2\2\2\u0336\u0338\3\2\2\2\u0337\u0335\3\2\2\2\u0338\u0339\7}\2\2\u0339"+ + "\u033a\5\u00a4S\2\u033aq\3\2\2\2\u033b\u033c\7}\2\2\u033c\u033f\5h\65"+ + "\2\u033d\u033f\5p9\2\u033e\u033b\3\2\2\2\u033e\u033d\3\2\2\2\u033f\u0346"+ + "\3\2\2\2\u0340\u0343\7P\2\2\u0341\u0344\5t;\2\u0342\u0344\5x=\2\u0343"+ + "\u0341\3\2\2\2\u0343\u0342\3\2\2\2\u0343\u0344\3\2\2\2\u0344\u0345\3\2"+ + "\2\2\u0345\u0347\7Q\2\2\u0346\u0340\3\2\2\2\u0346\u0347\3\2\2\2\u0347"+ + "s\3\2\2\2\u0348\u034d\5v<\2\u0349\u034a\7W\2\2\u034a\u034c\5v<\2\u034b"+ + "\u0349\3\2\2\2\u034c\u034f\3\2\2\2\u034d\u034b\3\2\2\2\u034d\u034e\3\2"+ + "\2\2\u034eu\3\2\2\2\u034f\u034d\3\2\2\2\u0350\u0351\5\u00a4S\2\u0351\u0352"+ + "\7Y\2\2\u0352\u0353\5x=\2\u0353w\3\2\2\2\u0354\u0358\5\u00c8e\2\u0355"+ + "\u0358\5r:\2\u0356\u0358\5z>\2\u0357\u0354\3\2\2\2\u0357\u0355\3\2\2\2"+ + "\u0357\u0356\3\2\2\2\u0358y\3\2\2\2\u0359\u0362\7R\2\2\u035a\u035f\5x"+ + "=\2\u035b\u035c\7W\2\2\u035c\u035e\5x=\2\u035d\u035b\3\2\2\2\u035e\u0361"+ + "\3\2\2\2\u035f\u035d\3\2\2\2\u035f\u0360\3\2\2\2\u0360\u0363\3\2\2\2\u0361"+ + "\u035f\3\2\2\2\u0362\u035a\3\2\2\2\u0362\u0363\3\2\2\2\u0363\u0365\3\2"+ + "\2\2\u0364\u0366\7W\2\2\u0365\u0364\3\2\2\2\u0365\u0366\3\2\2\2\u0366"+ + "\u0367\3\2\2\2\u0367\u0368\7S\2\2\u0368{\3\2\2\2\u0369\u036a\7}\2\2\u036a"+ + "\u036b\7\36\2\2\u036b\u036c\5\u00a4S\2\u036c\u036d\5~@\2\u036d}\3\2\2"+ + "\2\u036e\u0372\7R\2\2\u036f\u0371\5\u0080A\2\u0370\u036f\3\2\2\2\u0371"+ + "\u0374\3\2\2\2\u0372\u0370\3\2\2\2\u0372\u0373\3\2\2\2\u0373\u0375\3\2"+ + "\2\2\u0374\u0372\3\2\2\2\u0375\u0376\7S\2\2\u0376\177\3\2\2\2\u0377\u0379"+ + "\5\n\6\2\u0378\u0377\3\2\2\2\u0379\u037c\3\2\2\2\u037a\u0378\3\2\2\2\u037a"+ + "\u037b\3\2\2\2\u037b\u037d\3\2\2\2\u037c\u037a\3\2\2\2\u037d\u0380\5\u0082"+ + "B\2\u037e\u0380\7V\2\2\u037f\u037a\3\2\2\2\u037f\u037e\3\2\2\2\u0380\u0081"+ + "\3\2\2\2\u0381\u0382\5\u00f2z\2\u0382\u0383\5\u0084C\2\u0383\u0384\7V"+ + "\2\2\u0384\u039a\3\2\2\2\u0385\u0387\5\20\t\2\u0386\u0388\7V\2\2\u0387"+ + "\u0386\3\2\2\2\u0387\u0388\3\2\2\2\u0388\u039a\3\2\2\2\u0389\u038b\5 "+ + "\21\2\u038a\u038c\7V\2\2\u038b\u038a\3\2\2\2\u038b\u038c\3\2\2\2\u038c"+ + "\u039a\3\2\2\2\u038d\u038f\5\30\r\2\u038e\u0390\7V\2\2\u038f\u038e\3\2"+ + "\2\2\u038f\u0390\3\2\2\2\u0390\u039a\3\2\2\2\u0391\u0393\5|?\2\u0392\u0394"+ + "\7V\2\2\u0393\u0392\3\2\2\2\u0393\u0394\3\2\2\2\u0394\u039a\3\2\2\2\u0395"+ + "\u0397\5\u0094K\2\u0396\u0398\7V\2\2\u0397\u0396\3\2\2\2\u0397\u0398\3"+ + "\2\2\2\u0398\u039a\3\2\2\2\u0399\u0381\3\2\2\2\u0399\u0385\3\2\2\2\u0399"+ + "\u0389\3\2\2\2\u0399\u038d\3\2\2\2\u0399\u0391\3\2\2\2\u0399\u0395\3\2"+ + "\2\2\u039a\u0083\3\2\2\2\u039b\u039e\5\u0086D\2\u039c\u039e\5\u0088E\2"+ + "\u039d\u039b\3\2\2\2\u039d\u039c\3\2\2\2\u039e\u0085\3\2\2\2\u039f\u03a0"+ + "\5\u00a4S\2\u03a0\u03a1\7P\2\2\u03a1\u03a3\7Q\2\2\u03a2\u03a4\5\u008a"+ + "F\2\u03a3\u03a2\3\2\2\2\u03a3\u03a4\3\2\2\2\u03a4\u0087\3\2\2\2\u03a5"+ + "\u03a6\5J&\2\u03a6\u0089\3\2\2\2\u03a7\u03a8\7\16\2\2\u03a8\u03a9\5x="+ + "\2\u03a9\u008b\3\2\2\2\u03aa\u03ac\7\66\2\2\u03ab\u03aa\3\2\2\2\u03ab"+ + "\u03ac\3\2\2\2\u03ac\u03ad\3\2\2\2\u03ad\u03ae\7\65\2\2\u03ae\u03af\5"+ + "h\65\2\u03af\u03b0\5\u008eH\2\u03b0\u008d\3\2\2\2\u03b1\u03b5\7R\2\2\u03b2"+ + "\u03b4\5\u0090I\2\u03b3\u03b2\3\2\2\2\u03b4\u03b7\3\2\2\2\u03b5\u03b3"+ + "\3\2\2\2\u03b5\u03b6\3\2\2\2\u03b6\u03b8\3\2\2\2\u03b7\u03b5\3\2\2\2\u03b8"+ + "\u03b9\7S\2\2\u03b9\u008f\3\2\2\2\u03ba\u03be\7\67\2\2\u03bb\u03bd\5\u0092"+ + "J\2\u03bc\u03bb\3\2\2\2\u03bd\u03c0\3\2\2\2\u03be\u03bc\3\2\2\2\u03be"+ + "\u03bf\3\2\2\2\u03bf\u03c1\3\2\2\2\u03c0\u03be\3\2\2\2\u03c1\u03c2\5h"+ + "\65\2\u03c2\u03c3\7V\2\2\u03c3\u03df\3\2\2\2\u03c4\u03c5\78\2\2\u03c5"+ + "\u03c8\5h\65\2\u03c6\u03c7\7:\2\2\u03c7\u03c9\5h\65\2\u03c8\u03c6\3\2"+ + "\2\2\u03c8\u03c9\3\2\2\2\u03c9\u03ca\3\2\2\2\u03ca\u03cb\7V\2\2\u03cb"+ + "\u03df\3\2\2\2\u03cc\u03cd\79\2\2\u03cd\u03d0\5h\65\2\u03ce\u03cf\7:\2"+ + "\2\u03cf\u03d1\5h\65\2\u03d0\u03ce\3\2\2\2\u03d0\u03d1\3\2\2\2\u03d1\u03d2"+ + "\3\2\2\2\u03d2\u03d3\7V\2\2\u03d3\u03df\3\2\2\2\u03d4\u03d5\7;\2\2\u03d5"+ + "\u03d6\5h\65\2\u03d6\u03d7\7V\2\2\u03d7\u03df\3\2\2\2\u03d8\u03d9\7<\2"+ + "\2\u03d9\u03da\5h\65\2\u03da\u03db\7=\2\2\u03db\u03dc\5h\65\2\u03dc\u03dd"+ + "\7V\2\2\u03dd\u03df\3\2\2\2\u03de\u03ba\3\2\2\2\u03de\u03c4\3\2\2\2\u03de"+ + "\u03cc\3\2\2\2\u03de\u03d4\3\2\2\2\u03de\u03d8\3\2\2\2\u03df\u0091\3\2"+ + "\2\2\u03e0\u03e1\t\5\2\2\u03e1\u0093\3\2\2\2\u03e2\u03e3\7A\2\2\u03e3"+ + "\u03e5\5\u00a4S\2\u03e4\u03e6\5\22\n\2\u03e5\u03e4\3\2\2\2\u03e5\u03e6"+ + "\3\2\2\2\u03e6\u03e7\3\2\2\2\u03e7\u03ea\5\u0096L\2\u03e8\u03e9\7\32\2"+ + "\2\u03e9\u03eb\5\u00f0y\2\u03ea\u03e8\3\2\2\2\u03ea\u03eb\3\2\2\2\u03eb"+ + "\u03ec\3\2\2\2\u03ec\u03ed\5\u009cO\2\u03ed\u0095\3\2\2\2\u03ee\u03f0"+ + "\7P\2\2\u03ef\u03f1\5\u0098M\2\u03f0\u03ef\3\2\2\2\u03f0\u03f1\3\2\2\2"+ + "\u03f1\u03f2\3\2\2\2\u03f2\u03f3\7Q\2\2\u03f3\u0097\3\2\2\2\u03f4\u03f9"+ + "\5\u009aN\2\u03f5\u03f6\7W\2\2\u03f6\u03f8\5\u009aN\2\u03f7\u03f5\3\2"+ + "\2\2\u03f8\u03fb\3\2\2\2\u03f9\u03f7\3\2\2\2\u03f9\u03fa\3\2\2\2\u03fa"+ + "\u0099\3\2\2\2\u03fb\u03f9\3\2\2\2\u03fc\u03fd\5\u00f2z\2\u03fd\u03fe"+ + "\5\u00a4S\2\u03fe\u009b\3\2\2\2\u03ff\u0404\7R\2\2\u0400\u0403\5&\24\2"+ + "\u0401\u0403\5\66\34\2\u0402\u0400\3\2\2\2\u0402\u0401\3\2\2\2\u0403\u0406"+ + "\3\2\2\2\u0404\u0402\3\2\2\2\u0404\u0405\3\2\2\2\u0405\u0407\3\2\2\2\u0406"+ + "\u0404\3\2\2\2\u0407\u0408\7S\2\2\u0408\u009d\3\2\2\2\u0409\u040d\7R\2"+ + "\2\u040a\u040c\5\u00a0Q\2\u040b\u040a\3\2\2\2\u040c\u040f\3\2\2\2\u040d"+ + "\u040b\3\2\2\2\u040d\u040e\3\2\2\2\u040e\u0410\3\2\2\2\u040f\u040d\3\2"+ + "\2\2\u0410\u0411\7S\2\2\u0411\u009f\3\2\2\2\u0412\u0413\5\u00a2R\2\u0413"+ + "\u0414\7V\2\2\u0414\u0418\3\2\2\2\u0415\u0418\5\u00a8U\2\u0416\u0418\5"+ + "\u00aaV\2\u0417\u0412\3\2\2\2\u0417\u0415\3\2\2\2\u0417\u0416\3\2\2\2"+ + "\u0418\u00a1\3\2\2\2\u0419\u041b\5\16\b\2\u041a\u0419\3\2\2\2\u041b\u041e"+ + "\3\2\2\2\u041c\u041a\3\2\2\2\u041c\u041d\3\2\2\2\u041d\u0427\3\2\2\2\u041e"+ + "\u041c\3\2\2\2\u041f\u0420\7?\2\2\u0420\u0421\5\u00a4S\2\u0421\u0422\7"+ + "Y\2\2\u0422\u0423\5\u00c8e\2\u0423\u0428\3\2\2\2\u0424\u0425\5\u00f2z"+ + "\2\u0425\u0426\5J&\2\u0426\u0428\3\2\2\2\u0427\u041f\3\2\2\2\u0427\u0424"+ + "\3\2\2\2\u0428\u00a3\3\2\2\2\u0429\u042a\t\6\2\2\u042a\u00a5\3\2\2\2\u042b"+ + "\u042c\t\7\2\2\u042c\u00a7\3\2\2\2\u042d\u042f\5\f\7\2\u042e\u042d\3\2"+ + "\2\2\u042f\u0432\3\2\2\2\u0430\u042e\3\2\2\2\u0430\u0431\3\2\2\2\u0431"+ + "\u0436\3\2\2\2\u0432\u0430\3\2\2\2\u0433\u0437\5\20\t\2\u0434\u0437\5"+ + " \21\2\u0435\u0437\5\u0094K\2\u0436\u0433\3\2\2\2\u0436\u0434\3\2\2\2"+ + "\u0436\u0435\3\2\2\2\u0437\u00a9\3\2\2\2\u0438\u04aa\5\u009eP\2\u0439"+ + "\u043a\7\4\2\2\u043a\u043d\5\u00c8e\2\u043b\u043c\7_\2\2\u043c\u043e\5"+ + "\u00c8e\2\u043d\u043b\3\2\2\2\u043d\u043e\3\2\2\2\u043e\u043f\3\2\2\2"+ + "\u043f\u0440\7V\2\2\u0440\u04aa\3\2\2\2\u0441\u0442\7\30\2\2\u0442\u0443"+ + "\5\u00c2b\2\u0443\u0446\5\u00aaV\2\u0444\u0445\7\21\2\2\u0445\u0447\5"+ + "\u00aaV\2\u0446\u0444\3\2\2\2\u0446\u0447\3\2\2\2\u0447\u04aa\3\2\2\2"+ + "\u0448\u0449\7\27\2\2\u0449\u044a\7P\2\2\u044a\u044b\5\u00bc_\2\u044b"+ + "\u044c\7Q\2\2\u044c\u044d\5\u00aaV\2\u044d\u04aa\3\2\2\2\u044e\u044f\7"+ + "\64\2\2\u044f\u0450\5\u00c2b\2\u0450\u0451\5\u00aaV\2\u0451\u04aa\3\2"+ + "\2\2\u0452\u0453\7\17\2\2\u0453\u0454\5\u00aaV\2\u0454\u0455\7\64\2\2"+ + "\u0455\u0456\5\u00c2b\2\u0456\u0457\7V\2\2\u0457\u04aa\3\2\2\2\u0458\u0459"+ + "\7\61\2\2\u0459\u0463\5\u009eP\2\u045a\u045c\5\u00acW\2\u045b\u045a\3"+ + "\2\2\2\u045c\u045d\3\2\2\2\u045d\u045b\3\2\2\2\u045d\u045e\3\2\2\2\u045e"+ + "\u0460\3\2\2\2\u045f\u0461\5\u00b0Y\2\u0460\u045f\3\2\2\2\u0460\u0461"+ + "\3\2\2\2\u0461\u0464\3\2\2\2\u0462\u0464\5\u00b0Y\2\u0463\u045b\3\2\2"+ + "\2\u0463\u0462\3\2\2\2\u0464\u04aa\3\2\2\2\u0465\u0466\7\61\2\2\u0466"+ + "\u0467\5\u00b2Z\2\u0467\u046b\5\u009eP\2\u0468\u046a\5\u00acW\2\u0469"+ + "\u0468\3\2\2\2\u046a\u046d\3\2\2\2\u046b\u0469\3\2\2\2\u046b\u046c\3\2"+ + "\2\2\u046c\u046f\3\2\2\2\u046d\u046b\3\2\2\2\u046e\u0470\5\u00b0Y\2\u046f"+ + "\u046e\3\2\2\2\u046f\u0470\3\2\2\2\u0470\u04aa\3\2\2\2\u0471\u0472\7+"+ + "\2\2\u0472\u0473\5\u00c2b\2\u0473\u0477\7R\2\2\u0474\u0476\5\u00b8]\2"+ + "\u0475\u0474\3\2\2\2\u0476\u0479\3\2\2\2\u0477\u0475\3\2\2\2\u0477\u0478"+ + "\3\2\2\2\u0478\u047d\3\2\2\2\u0479\u0477\3\2\2\2\u047a\u047c\5\u00ba^"+ + "\2\u047b\u047a\3\2\2\2\u047c\u047f\3\2\2\2\u047d\u047b\3\2\2\2\u047d\u047e"+ + "\3\2\2\2\u047e\u0480\3\2\2\2\u047f\u047d\3\2\2\2\u0480\u0481\7S\2\2\u0481"+ + "\u04aa\3\2\2\2\u0482\u0483\7,\2\2\u0483\u0484\5\u00c2b\2\u0484\u0485\5"+ + "\u009eP\2\u0485\u04aa\3\2\2\2\u0486\u0488\7&\2\2\u0487\u0489\5\u00c8e"+ + "\2\u0488\u0487\3\2\2\2\u0488\u0489\3\2\2\2\u0489\u048a\3\2\2\2\u048a\u04aa"+ + "\7V\2\2\u048b\u048c\7.\2\2\u048c\u048d\5\u00c8e\2\u048d\u048e\7V\2\2\u048e"+ + "\u04aa\3\2\2\2\u048f\u0491\7\6\2\2\u0490\u0492\5\u00a4S\2\u0491\u0490"+ + "\3\2\2\2\u0491\u0492\3\2\2\2\u0492\u0493\3\2\2\2\u0493\u04aa\7V\2\2\u0494"+ + "\u0496\7\r\2\2\u0495\u0497\5\u00a4S\2\u0496\u0495\3\2\2\2\u0496\u0497"+ + "\3\2\2\2\u0497\u0498\3\2\2\2\u0498\u04aa\7V\2\2\u0499\u049a\7@\2\2\u049a"+ + "\u049b\5\u00c8e\2\u049b\u049c\7V\2\2\u049c\u04aa\3\2\2\2\u049d\u04aa\7"+ + "V\2\2\u049e\u049f\5\u00c8e\2\u049f\u04a0\7V\2\2\u04a0\u04aa\3\2\2\2\u04a1"+ + "\u04a3\5\u00d4k\2\u04a2\u04a4\7V\2\2\u04a3\u04a2\3\2\2\2\u04a3\u04a4\3"+ + "\2\2\2\u04a4\u04aa\3\2\2\2\u04a5\u04a6\5\u00a4S\2\u04a6\u04a7\7_\2\2\u04a7"+ + "\u04a8\5\u00aaV\2\u04a8\u04aa\3\2\2\2\u04a9\u0438\3\2\2\2\u04a9\u0439"+ + "\3\2\2\2\u04a9\u0441\3\2\2\2\u04a9\u0448\3\2\2\2\u04a9\u044e\3\2\2\2\u04a9"+ + "\u0452\3\2\2\2\u04a9\u0458\3\2\2\2\u04a9\u0465\3\2\2\2\u04a9\u0471\3\2"+ + "\2\2\u04a9\u0482\3\2\2\2\u04a9\u0486\3\2\2\2\u04a9\u048b\3\2\2\2\u04a9"+ + "\u048f\3\2\2\2\u04a9\u0494\3\2\2\2\u04a9\u0499\3\2\2\2\u04a9\u049d\3\2"+ + "\2\2\u04a9\u049e\3\2\2\2\u04a9\u04a1\3\2\2\2\u04a9\u04a5\3\2\2\2\u04aa"+ + "\u00ab\3\2\2\2\u04ab\u04ac\7\t\2\2\u04ac\u04b0\7P\2\2\u04ad\u04af\5\16"+ + "\b\2\u04ae\u04ad\3\2\2\2\u04af\u04b2\3\2\2\2\u04b0\u04ae\3\2\2\2\u04b0"+ + "\u04b1\3\2\2\2\u04b1\u04b3\3\2\2\2\u04b2\u04b0\3\2\2\2\u04b3\u04b4\5\u00ae"+ + "X\2\u04b4\u04b5\5\u00a4S\2\u04b5\u04b6\7Q\2\2\u04b6\u04b7\5\u009eP\2\u04b7"+ + "\u00ad\3\2\2\2\u04b8\u04bd\5h\65\2\u04b9\u04ba\7m\2\2\u04ba\u04bc\5h\65"+ + "\2\u04bb\u04b9\3\2\2\2\u04bc\u04bf\3\2\2\2\u04bd\u04bb\3\2\2\2\u04bd\u04be"+ + "\3\2\2\2\u04be\u00af\3\2\2\2\u04bf\u04bd\3\2\2\2\u04c0\u04c1\7\25\2\2"+ + "\u04c1\u04c2\5\u009eP\2\u04c2\u00b1\3\2\2\2\u04c3\u04c4\7P\2\2\u04c4\u04c6"+ + "\5\u00b4[\2\u04c5\u04c7\7V\2\2\u04c6\u04c5\3\2\2\2\u04c6\u04c7\3\2\2\2"+ + "\u04c7\u04c8\3\2\2\2\u04c8\u04c9\7Q\2\2\u04c9\u00b3\3\2\2\2\u04ca\u04cf"+ + "\5\u00b6\\\2\u04cb\u04cc\7V\2\2\u04cc\u04ce\5\u00b6\\\2\u04cd\u04cb\3"+ + "\2\2\2\u04ce\u04d1\3\2\2\2\u04cf\u04cd\3\2\2\2\u04cf\u04d0\3\2\2\2\u04d0"+ + "\u00b5\3\2\2\2\u04d1\u04cf\3\2\2\2\u04d2\u04d4\5\16\b\2\u04d3\u04d2\3"+ + "\2\2\2\u04d4\u04d7\3\2\2\2\u04d5\u04d3\3\2\2\2\u04d5\u04d6\3\2\2\2\u04d6"+ + "\u04dd\3\2\2\2\u04d7\u04d5\3\2\2\2\u04d8\u04d9\5T+\2\u04d9\u04da\5N(\2"+ + "\u04da\u04de\3\2\2\2\u04db\u04dc\7?\2\2\u04dc\u04de\5\u00a4S\2\u04dd\u04d8"+ + "\3\2\2\2\u04dd\u04db\3\2\2\2\u04de\u04df\3\2\2\2\u04df\u04e0\7Y\2\2\u04e0"+ + "\u04e1\5\u00c8e\2\u04e1\u04e4\3\2\2\2\u04e2\u04e4\5h\65\2\u04e3\u04d5"+ + "\3\2\2\2\u04e3\u04e2\3\2\2\2\u04e4\u00b7\3\2\2\2\u04e5\u04e7\5\u00ba^"+ + "\2\u04e6\u04e5\3\2\2\2\u04e7\u04e8\3\2\2\2\u04e8\u04e6\3\2\2\2\u04e8\u04e9"+ + "\3\2\2\2\u04e9\u04eb\3\2\2\2\u04ea\u04ec\5\u00a0Q\2\u04eb\u04ea\3\2\2"+ + "\2\u04ec\u04ed\3\2\2\2\u04ed\u04eb\3\2\2\2\u04ed\u04ee\3\2\2\2\u04ee\u00b9"+ + "\3\2\2\2\u04ef\u04f5\7\b\2\2\u04f0\u04f6\5\u00c8e\2\u04f1\u04f6\7\u0082"+ + "\2\2\u04f2\u04f3\5\u00f2z\2\u04f3\u04f4\5\u00a4S\2\u04f4\u04f6\3\2\2\2"+ + "\u04f5\u04f0\3\2\2\2\u04f5\u04f1\3\2\2\2\u04f5\u04f2\3\2\2\2\u04f6\u04f7"+ + "\3\2\2\2\u04f7\u04fb\7_\2\2\u04f8\u04f9\7\16\2\2\u04f9\u04fb\7_\2\2\u04fa"+ + "\u04ef\3\2\2\2\u04fa\u04f8\3\2\2\2\u04fb\u00bb\3\2\2\2\u04fc\u0509\5\u00c0"+ + "a\2\u04fd\u04ff\5\u00be`\2\u04fe\u04fd\3\2\2\2\u04fe\u04ff\3\2\2\2\u04ff"+ + "\u0500\3\2\2\2\u0500\u0502\7V\2\2\u0501\u0503\5\u00c8e\2\u0502\u0501\3"+ + "\2\2\2\u0502\u0503\3\2\2\2\u0503\u0504\3\2\2\2\u0504\u0506\7V\2\2\u0505"+ + "\u0507\5\u00c4c\2\u0506\u0505\3\2\2\2\u0506\u0507\3\2\2\2\u0507\u0509"+ + "\3\2\2\2\u0508\u04fc\3\2\2\2\u0508\u04fe\3\2\2\2\u0509\u00bd\3\2\2\2\u050a"+ + "\u050d\5\u00a2R\2\u050b\u050d\5\u00c4c\2\u050c\u050a\3\2\2\2\u050c\u050b"+ + "\3\2\2\2\u050d\u00bf\3\2\2\2\u050e\u0510\5\16\b\2\u050f\u050e\3\2\2\2"+ + "\u0510\u0513\3\2\2\2\u0511\u050f\3\2\2\2\u0511\u0512\3\2\2\2\u0512\u0516"+ + "\3\2\2\2\u0513\u0511\3\2\2\2\u0514\u0517\5\u00f2z\2\u0515\u0517\7?\2\2"+ + "\u0516\u0514\3\2\2\2\u0516\u0515\3\2\2\2\u0517\u0518\3\2\2\2\u0518\u0519"+ + "\5N(\2\u0519\u051a\7_\2\2\u051a\u051b\5\u00c8e\2\u051b\u00c1\3\2\2\2\u051c"+ + "\u051d\7P\2\2\u051d\u051e\5\u00c8e\2\u051e\u051f\7Q\2\2\u051f\u00c3\3"+ + "\2\2\2\u0520\u0525\5\u00c8e\2\u0521\u0522\7W\2\2\u0522\u0524\5\u00c8e"+ + "\2\u0523\u0521\3\2\2\2\u0524\u0527\3\2\2\2\u0525\u0523\3\2\2\2\u0525\u0526"+ + "\3\2\2\2\u0526\u00c5\3\2\2\2\u0527\u0525\3\2\2\2\u0528\u052c\5\u00a4S"+ + "\2\u0529\u052c\7-\2\2\u052a\u052c\7*\2\2\u052b\u0528\3\2\2\2\u052b\u0529"+ + "\3\2\2\2\u052b\u052a\3\2\2\2\u052c\u052d\3\2\2\2\u052d\u052e\5\u00fc\177"+ + "\2\u052e\u00c7\3\2\2\2\u052f\u0530\be\1\2\u0530\u0531\t\b\2\2\u0531\u055b"+ + "\5\u00c8e\23\u0532\u0536\7P\2\2\u0533\u0535\5r:\2\u0534\u0533\3\2\2\2"+ + "\u0535\u0538\3\2\2\2\u0536\u0534\3\2\2\2\u0536\u0537\3\2\2\2\u0537\u0539"+ + "\3\2\2\2\u0538\u0536\3\2\2\2\u0539\u053e\5\u00f2z\2\u053a\u053b\7l\2\2"+ + "\u053b\u053d\5\u00f2z\2\u053c\u053a\3\2\2\2\u053d\u0540\3\2\2\2\u053e"+ + "\u053c\3\2\2\2\u053e\u053f\3\2\2\2\u053f\u0541\3\2\2\2\u0540\u053e\3\2"+ + "\2\2\u0541\u0542\7Q\2\2\u0542\u0543\5\u00c8e\22\u0543\u055b\3\2\2\2\u0544"+ + "\u055b\5\u00d2j\2\u0545\u055b\5\u00c6d\2\u0546\u0547\5\u00f2z\2\u0547"+ + "\u054d\7|\2\2\u0548\u054a\5\u00f6|\2\u0549\u0548\3\2\2\2\u0549\u054a\3"+ + "\2\2\2\u054a\u054b\3\2\2\2\u054b\u054e\5\u00a4S\2\u054c\u054e\7!\2\2\u054d"+ + "\u0549\3\2\2\2\u054d\u054c\3\2\2\2\u054e\u055b\3\2\2\2\u054f\u0550\5\u00dc"+ + "o\2\u0550\u0552\7|\2\2\u0551\u0553\5\u00f6|\2\u0552\u0551\3\2\2\2\u0552"+ + "\u0553\3\2\2\2\u0553\u0554\3\2\2\2\u0554\u0555\7!\2\2\u0555\u055b\3\2"+ + "\2\2\u0556\u055b\5\u00d4k\2\u0557\u0558\7!\2\2\u0558\u055b\5\u00dep\2"+ + "\u0559\u055b\5\u00ccg\2\u055a\u052f\3\2\2\2\u055a\u0532\3\2\2\2\u055a"+ + "\u0544\3\2\2\2\u055a\u0545\3\2\2\2\u055a\u0546\3\2\2\2\u055a\u054f\3\2"+ + "\2\2\u055a\u0556\3\2\2\2\u055a\u0557\3\2\2\2\u055a\u0559\3\2\2\2\u055b"+ + "\u05af\3\2\2\2\u055c\u055d\f\20\2\2\u055d\u055e\t\t\2\2\u055e\u05ae\5"+ + "\u00c8e\21\u055f\u0560\f\17\2\2\u0560\u0561\t\n\2\2\u0561\u05ae\5\u00c8"+ + "e\20\u0562\u056a\f\16\2\2\u0563\u0564\7[\2\2\u0564\u056b\7[\2\2\u0565"+ + "\u0566\7Z\2\2\u0566\u0567\7Z\2\2\u0567\u056b\7Z\2\2\u0568\u0569\7Z\2\2"+ + "\u0569\u056b\7Z\2\2\u056a\u0563\3\2\2\2\u056a\u0565\3\2\2\2\u056a\u0568"+ + "\3\2\2\2\u056b\u056c\3\2\2\2\u056c\u05ae\5\u00c8e\17\u056d\u056e\f\r\2"+ + "\2\u056e\u056f\t\13\2\2\u056f\u05ae\5\u00c8e\16\u0570\u0571\f\13\2\2\u0571"+ + "\u0572\t\f\2\2\u0572\u05ae\5\u00c8e\f\u0573\u0574\f\n\2\2\u0574\u0575"+ + "\7l\2\2\u0575\u05ae\5\u00c8e\13\u0576\u0577\f\t\2\2\u0577\u0578\7n\2\2"+ + "\u0578\u05ae\5\u00c8e\n\u0579\u057a\f\b\2\2\u057a\u057b\7m\2\2\u057b\u05ae"+ + "\5\u00c8e\t\u057c\u057d\f\7\2\2\u057d\u057e\7d\2\2\u057e\u05ae\5\u00c8"+ + "e\b\u057f\u0580\f\6\2\2\u0580\u0581\7e\2\2\u0581\u05ae\5\u00c8e\7\u0582"+ + "\u0583\f\5\2\2\u0583\u0584\7^\2\2\u0584\u0585\5\u00c8e\2\u0585\u0586\7"+ + "_\2\2\u0586\u0587\5\u00c8e\5\u0587\u05ae\3\2\2\2\u0588\u0589\f\4\2\2\u0589"+ + "\u058a\t\r\2\2\u058a\u05ae\5\u00c8e\4\u058b\u058c\f\33\2\2\u058c\u058d"+ + "\7T\2\2\u058d\u058e\5\u00c8e\2\u058e\u058f\7U\2\2\u058f\u05ae\3\2\2\2"+ + "\u0590\u0591\f\32\2\2\u0591\u059d\7X\2\2\u0592\u059e\5\u00a4S\2\u0593"+ + "\u059e\5\u00c6d\2\u0594\u059e\7-\2\2\u0595\u0597\7!\2\2\u0596\u0598\5"+ + "\u00eex\2\u0597\u0596\3\2\2\2\u0597\u0598\3\2\2\2\u0598\u0599\3\2\2\2"+ + "\u0599\u059e\5\u00e2r\2\u059a\u059b\7*\2\2\u059b\u059e\5\u00f8}\2\u059c"+ + "\u059e\5\u00e8u\2\u059d\u0592\3\2\2\2\u059d\u0593\3\2\2\2\u059d\u0594"+ + "\3\2\2\2\u059d\u0595\3\2\2\2\u059d\u059a\3\2\2\2\u059d\u059c\3\2\2\2\u059e"+ + "\u05ae\3\2\2\2\u059f\u05a0\f\30\2\2\u05a0\u05a2\7|\2\2\u05a1\u05a3\5\u00f6"+ + "|\2\u05a2\u05a1\3\2\2\2\u05a2\u05a3\3\2\2\2\u05a3\u05a4\3\2\2\2\u05a4"+ + "\u05ae\5\u00a4S\2\u05a5\u05a6\f\24\2\2\u05a6\u05ae\t\16\2\2\u05a7\u05a8"+ + "\f\f\2\2\u05a8\u05ab\7\34\2\2\u05a9\u05ac\5\u00f2z\2\u05aa\u05ac\5\u00ca"+ + "f\2\u05ab\u05a9\3\2\2\2\u05ab\u05aa\3\2\2\2\u05ac\u05ae\3\2\2\2\u05ad"+ + "\u055c\3\2\2\2\u05ad\u055f\3\2\2\2\u05ad\u0562\3\2\2\2\u05ad\u056d\3\2"+ + "\2\2\u05ad\u0570\3\2\2\2\u05ad\u0573\3\2\2\2\u05ad\u0576\3\2\2\2\u05ad"+ + "\u0579\3\2\2\2\u05ad\u057c\3\2\2\2\u05ad\u057f\3\2\2\2\u05ad\u0582\3\2"+ + "\2\2\u05ad\u0588\3\2\2\2\u05ad\u058b\3\2\2\2\u05ad\u0590\3\2\2\2\u05ad"+ + "\u059f\3\2\2\2\u05ad\u05a5\3\2\2\2\u05ad\u05a7\3\2\2\2\u05ae\u05b1\3\2"+ + "\2\2\u05af\u05ad\3\2\2\2\u05af\u05b0\3\2\2\2\u05b0\u00c9\3\2\2\2\u05b1"+ + "\u05af\3\2\2\2\u05b2\u05b4\5\16\b\2\u05b3\u05b2\3\2\2\2\u05b4\u05b7\3"+ + "\2\2\2\u05b5\u05b3\3\2\2\2\u05b5\u05b6\3\2\2\2\u05b6\u05b8\3\2\2\2\u05b7"+ + "\u05b5\3\2\2\2\u05b8\u05bc\5\u00f2z\2\u05b9\u05bb\5r:\2\u05ba\u05b9\3"+ + "\2\2\2\u05bb\u05be\3\2\2\2\u05bc\u05ba\3\2\2\2\u05bc\u05bd\3\2\2\2\u05bd"+ + "\u05bf\3\2\2\2\u05be\u05bc\3\2\2\2\u05bf\u05c0\5\u00a4S\2\u05c0\u00cb"+ + "\3\2\2\2\u05c1\u05c2\5\u00ceh\2\u05c2\u05c3\7{\2\2\u05c3\u05c4\5\u00d0"+ + "i\2\u05c4\u00cd\3\2\2\2\u05c5\u05dc\5\u00a4S\2\u05c6\u05c8\7P\2\2\u05c7"+ + "\u05c9\5^\60\2\u05c8\u05c7\3\2\2\2\u05c8\u05c9\3\2\2\2\u05c9\u05ca\3\2"+ + "\2\2\u05ca\u05dc\7Q\2\2\u05cb\u05cc\7P\2\2\u05cc\u05d1\5\u00a4S\2\u05cd"+ + "\u05ce\7W\2\2\u05ce\u05d0\5\u00a4S\2\u05cf\u05cd\3\2\2\2\u05d0\u05d3\3"+ + "\2\2\2\u05d1\u05cf\3\2\2\2\u05d1\u05d2\3\2\2\2\u05d2\u05d4\3\2\2\2\u05d3"+ + "\u05d1\3\2\2\2\u05d4\u05d5\7Q\2\2\u05d5\u05dc\3\2\2\2\u05d6\u05d8\7P\2"+ + "\2\u05d7\u05d9\5d\63\2\u05d8\u05d7\3\2\2\2\u05d8\u05d9\3\2\2\2\u05d9\u05da"+ + "\3\2\2\2\u05da\u05dc\7Q\2\2\u05db\u05c5\3\2\2\2\u05db\u05c6\3\2\2\2\u05db"+ + "\u05cb\3\2\2\2\u05db\u05d6\3\2\2\2\u05dc\u00cf\3\2\2\2\u05dd\u05e0\5\u00c8"+ + "e\2\u05de\u05e0\5\u009eP\2\u05df\u05dd\3\2\2\2\u05df\u05de\3\2\2\2\u05e0"+ + "\u00d1\3\2\2\2\u05e1\u05e2\7P\2\2\u05e2\u05e3\5\u00c8e\2\u05e3\u05e4\7"+ + "Q\2\2\u05e4\u05f4\3\2\2\2\u05e5\u05f4\7-\2\2\u05e6\u05f4\7*\2\2\u05e7"+ + "\u05f4\5j\66\2\u05e8\u05f4\5\u00a4S\2\u05e9\u05ea\5.\30\2\u05ea\u05eb"+ + "\7X\2\2\u05eb\u05ec\7\13\2\2\u05ec\u05f4\3\2\2\2\u05ed\u05f1\5\u00eex"+ + "\2\u05ee\u05f2\5\u00fa~\2\u05ef\u05f0\7-\2\2\u05f0\u05f2\5\u00fc\177\2"+ + "\u05f1\u05ee\3\2\2\2\u05f1\u05ef\3\2\2\2\u05f2\u05f4\3\2\2\2\u05f3\u05e1"+ + "\3\2\2\2\u05f3\u05e5\3\2\2\2\u05f3\u05e6\3\2\2\2\u05f3\u05e7\3\2\2\2\u05f3"+ + "\u05e8\3\2\2\2\u05f3\u05e9\3\2\2\2\u05f3\u05ed\3\2\2\2\u05f4\u00d3\3\2"+ + "\2\2\u05f5\u05f6\7+\2\2\u05f6\u05f7\5\u00c2b\2\u05f7\u05fb\7R\2\2\u05f8"+ + "\u05fa\5\u00d6l\2\u05f9\u05f8\3\2\2\2\u05fa\u05fd\3\2\2\2\u05fb\u05f9"+ + "\3\2\2\2\u05fb\u05fc\3\2\2\2\u05fc\u05fe\3\2\2\2\u05fd\u05fb\3\2\2\2\u05fe"+ + "\u05ff\7S\2\2\u05ff\u00d5\3\2\2\2\u0600\u0604\7\b\2\2\u0601\u0605\5\u00c4"+ + "c\2\u0602\u0605\7O\2\2\u0603\u0605\5\u00d8m\2\u0604\u0601\3\2\2\2\u0604"+ + "\u0602\3\2\2\2\u0604\u0603\3\2\2\2\u0605\u0606\3\2\2\2\u0606\u0607\t\17"+ + "\2\2\u0607\u060c\5\u00dan\2\u0608\u0609\7\16\2\2\u0609\u060a\t\17\2\2"+ + "\u060a\u060c\5\u00dan\2\u060b\u0600\3\2\2\2\u060b\u0608\3\2\2\2\u060c"+ + "\u00d7\3\2\2\2\u060d\u060e\bm\1\2\u060e\u060f\7P\2\2\u060f\u0610\5\u00d8"+ + "m\2\u0610\u0611\7Q\2\2\u0611\u0628\3\2\2\2\u0612\u0614\5\16\b\2\u0613"+ + "\u0612\3\2\2\2\u0614\u0617\3\2\2\2\u0615\u0613\3\2\2\2\u0615\u0616\3\2"+ + "\2\2\u0616\u0618\3\2\2\2\u0617\u0615\3\2\2\2\u0618\u061c\5\u00f2z\2\u0619"+ + "\u061b\5r:\2\u061a\u0619\3\2\2\2\u061b\u061e\3\2\2\2\u061c\u061a\3\2\2"+ + "\2\u061c\u061d\3\2\2\2\u061d\u061f\3\2\2\2\u061e\u061c\3\2\2\2\u061f\u0624"+ + "\5\u00a4S\2\u0620\u0621\7d\2\2\u0621\u0623\5\u00c8e\2\u0622\u0620\3\2"+ + "\2\2\u0623\u0626\3\2\2\2\u0624\u0622\3\2\2\2\u0624\u0625\3\2\2\2\u0625"+ + "\u0628\3\2\2\2\u0626\u0624\3\2\2\2\u0627\u060d\3\2\2\2\u0627\u0615\3\2"+ + "\2\2\u0628\u062e\3\2\2\2\u0629\u062a\f\3\2\2\u062a\u062b\7d\2\2\u062b"+ + "\u062d\5\u00c8e\2\u062c\u0629\3\2\2\2\u062d\u0630\3\2\2\2\u062e\u062c"+ + "\3\2\2\2\u062e\u062f\3\2\2\2\u062f\u00d9\3\2\2\2\u0630\u062e\3\2\2\2\u0631"+ + "\u0639\5\u009eP\2\u0632\u0634\5\u00a0Q\2\u0633\u0632\3\2\2\2\u0634\u0637"+ + "\3\2\2\2\u0635\u0633\3\2\2\2\u0635\u0636\3\2\2\2\u0636\u0639\3\2\2\2\u0637"+ + "\u0635\3\2\2\2\u0638\u0631\3\2\2\2\u0638\u0635\3\2\2\2\u0639\u00db\3\2"+ + "\2\2\u063a\u063b\5T+\2\u063b\u063c\7X\2\2\u063c\u063e\3\2\2\2\u063d\u063a"+ + "\3\2\2\2\u063d\u063e\3\2\2\2\u063e\u0642\3\2\2\2\u063f\u0641\5r:\2\u0640"+ + "\u063f\3\2\2\2\u0641\u0644\3\2\2\2\u0642\u0640\3\2\2\2\u0642\u0643\3\2"+ + "\2\2\u0643\u0645\3\2\2\2\u0644\u0642\3\2\2\2\u0645\u0647\5\u00a4S\2\u0646"+ + "\u0648\5\u00f6|\2\u0647\u0646\3\2\2\2\u0647\u0648\3\2\2\2\u0648\u00dd"+ + "\3\2\2\2\u0649\u064b\5\u00eex\2\u064a\u0649\3\2\2\2\u064a\u064b\3\2\2"+ + "\2\u064b\u064c\3\2\2\2\u064c\u064d\5\u00e0q\2\u064d\u064e\5\u00e6t\2\u064e"+ + "\u0653\3\2\2\2\u064f\u0650\5\u00e0q\2\u0650\u0651\5\u00e4s\2\u0651\u0653"+ + "\3\2\2\2\u0652\u064a\3\2\2\2\u0652\u064f\3\2\2\2\u0653\u00df\3\2\2\2\u0654"+ + "\u0656\5\u00a4S\2\u0655\u0657\5\u00eav\2\u0656\u0655\3\2\2\2\u0656\u0657"+ + "\3\2\2\2\u0657\u065f\3\2\2\2\u0658\u0659\7X\2\2\u0659\u065b\5\u00a4S\2"+ + "\u065a\u065c\5\u00eav\2\u065b\u065a\3\2\2\2\u065b\u065c\3\2\2\2\u065c"+ + "\u065e\3\2\2\2\u065d\u0658\3\2\2\2\u065e\u0661\3\2\2\2\u065f\u065d\3\2"+ + "\2\2\u065f\u0660\3\2\2\2\u0660\u0664\3\2\2\2\u0661\u065f\3\2\2\2\u0662"+ + "\u0664\5\u00f4{\2\u0663\u0654\3\2\2\2\u0663\u0662\3\2\2\2\u0664\u00e1"+ + "\3\2\2\2\u0665\u0667\5\u00a4S\2\u0666\u0668\5\u00ecw\2\u0667\u0666\3\2"+ + "\2\2\u0667\u0668\3\2\2\2\u0668\u0669\3\2\2\2\u0669\u066a\5\u00e6t\2\u066a"+ + "\u00e3\3\2\2\2\u066b\u066c\7T\2\2\u066c\u066e\7U\2\2\u066d\u066b\3\2\2"+ + "\2\u066e\u066f\3\2\2\2\u066f\u066d\3\2\2\2\u066f\u0670\3\2\2\2\u0670\u0671"+ + "\3\2\2\2\u0671\u0682\5R*\2\u0672\u0673\7T\2\2\u0673\u0674\5\u00c8e\2\u0674"+ + "\u0675\7U\2\2\u0675\u0677\3\2\2\2\u0676\u0672\3\2\2\2\u0677\u0678\3\2"+ + "\2\2\u0678\u0676\3\2\2\2\u0678\u0679\3\2\2\2\u0679\u067e\3\2\2\2\u067a"+ + "\u067b\7T\2\2\u067b\u067d\7U\2\2\u067c\u067a\3\2\2\2\u067d\u0680\3\2\2"+ + "\2\u067e\u067c\3\2\2\2\u067e\u067f\3\2\2\2\u067f\u0682\3\2\2\2\u0680\u067e"+ + "\3\2\2\2\u0681\u066d\3\2\2\2\u0681\u0676\3\2\2\2\u0682\u00e5\3\2\2\2\u0683"+ + "\u0685\5\u00fc\177\2\u0684\u0686\5\"\22\2\u0685\u0684\3\2\2\2\u0685\u0686"+ + "\3\2\2\2\u0686\u00e7\3\2\2\2\u0687\u0688\5\u00eex\2\u0688\u0689\5\u00fa"+ + "~\2\u0689\u00e9\3\2\2\2\u068a\u068b\7[\2\2\u068b\u068e\7Z\2\2\u068c\u068e"+ + "\5\u00f6|\2\u068d\u068a\3\2\2\2\u068d\u068c\3\2\2\2\u068e\u00eb\3\2\2"+ + "\2\u068f\u0690\7[\2\2\u0690\u0693\7Z\2\2\u0691\u0693\5\u00eex\2\u0692"+ + "\u068f\3\2\2\2\u0692\u0691\3\2\2\2\u0693\u00ed\3\2\2\2\u0694\u0695\7["+ + "\2\2\u0695\u0696\5\u00f0y\2\u0696\u0697\7Z\2\2\u0697\u00ef\3\2\2\2\u0698"+ + "\u069d\5\u00f2z\2\u0699\u069a\7W\2\2\u069a\u069c\5\u00f2z\2\u069b\u0699"+ + "\3\2\2\2\u069c\u069f\3\2\2\2\u069d\u069b\3\2\2\2\u069d\u069e\3\2\2\2\u069e"+ + "\u00f1\3\2\2\2\u069f\u069d\3\2\2\2\u06a0\u06a2\5r:\2\u06a1\u06a0\3\2\2"+ + "\2\u06a2\u06a5\3\2\2\2\u06a3\u06a1\3\2\2\2\u06a3\u06a4\3\2\2\2\u06a4\u06a8"+ + "\3\2\2\2\u06a5\u06a3\3\2\2\2\u06a6\u06a9\5T+\2\u06a7\u06a9\5\u00f4{\2"+ + "\u06a8\u06a6\3\2\2\2\u06a8\u06a7\3\2\2\2\u06a9\u06b4\3\2\2\2\u06aa\u06ac"+ + "\5r:\2\u06ab\u06aa\3\2\2\2\u06ac\u06af\3\2\2\2\u06ad\u06ab\3\2\2\2\u06ad"+ + "\u06ae\3\2\2\2\u06ae\u06b0\3\2\2\2\u06af\u06ad\3\2\2\2\u06b0\u06b1\7T"+ + "\2\2\u06b1\u06b3\7U\2\2\u06b2\u06ad\3\2\2\2\u06b3\u06b6\3\2\2\2\u06b4"+ + "\u06b2\3\2\2\2\u06b4\u06b5\3\2\2\2\u06b5\u00f3\3\2\2\2\u06b6\u06b4\3\2"+ + "\2\2\u06b7\u06b8\t\20\2\2\u06b8\u00f5\3\2\2\2\u06b9\u06ba\7[\2\2\u06ba"+ + "\u06bf\5V,\2\u06bb\u06bc\7W\2\2\u06bc\u06be\5V,\2\u06bd\u06bb\3\2\2\2"+ + "\u06be\u06c1\3\2\2\2\u06bf\u06bd\3\2\2\2\u06bf\u06c0\3\2\2\2\u06c0\u06c2"+ + "\3\2\2\2\u06c1\u06bf\3\2\2\2\u06c2\u06c3\7Z\2\2\u06c3\u00f7\3\2\2\2\u06c4"+ + "\u06ce\5\u00fc\177\2\u06c5\u06c7\7X\2\2\u06c6\u06c8\5\u00f6|\2\u06c7\u06c6"+ + "\3\2\2\2\u06c7\u06c8\3\2\2\2\u06c8\u06c9\3\2\2\2\u06c9\u06cb\5\u00a4S"+ + "\2\u06ca\u06cc\5\u00fc\177\2\u06cb\u06ca\3\2\2\2\u06cb\u06cc\3\2\2\2\u06cc"+ + "\u06ce\3\2\2\2\u06cd\u06c4\3\2\2\2\u06cd\u06c5\3\2\2\2\u06ce\u00f9\3\2"+ + "\2\2\u06cf\u06d0\7*\2\2\u06d0\u06d5\5\u00f8}\2\u06d1\u06d2\5\u00a4S\2"+ + "\u06d2\u06d3\5\u00fc\177\2\u06d3\u06d5\3\2\2\2\u06d4\u06cf\3\2\2\2\u06d4"+ + "\u06d1\3\2\2\2\u06d5\u00fb\3\2\2\2\u06d6\u06d8\7P\2\2\u06d7\u06d9\5\u00c4"+ + "c\2\u06d8\u06d7\3\2\2\2\u06d8\u06d9\3\2\2\2\u06d9\u06da\3\2\2\2\u06da"+ + "\u06db\7Q\2\2\u06db\u00fd\3\2\2\2\u00dd\u00ff\u0103\u0105\u010a\u010c"+ + "\u0112\u0117\u0120\u0125\u012c\u0134\u013b\u0147\u014b\u0150\u0154\u0158"+ + "\u015c\u0166\u016e\u0176\u017a\u0181\u0188\u018c\u018f\u0192\u019b\u01a1"+ + "\u01a6\u01a9\u01af\u01b5\u01b9\u01bd\u01c5\u01ce\u01d5\u01db\u01df\u01eb"+ + "\u01f4\u01f9\u01ff\u0203\u020f\u0216\u0223\u0228\u0232\u023a\u0244\u024d"+ + "\u0258\u025d\u0266\u0270\u0275\u027e\u0284\u028b\u0290\u0298\u029c\u029e"+ + "\u02a4\u02aa\u02af\u02b5\u02bb\u02bd\u02c4\u02c9\u02ce\u02d1\u02d3\u02dd"+ + "\u02e7\u02ec\u02ef\u02f4\u02fd\u0304\u030f\u0315\u0320\u032a\u0335\u033e"+ + "\u0343\u0346\u034d\u0357\u035f\u0362\u0365\u0372\u037a\u037f\u0387\u038b"+ + "\u038f\u0393\u0397\u0399\u039d\u03a3\u03ab\u03b5\u03be\u03c8\u03d0\u03de"+ + "\u03e5\u03ea\u03f0\u03f9\u0402\u0404\u040d\u0417\u041c\u0427\u0430\u0436"+ + "\u043d\u0446\u045d\u0460\u0463\u046b\u046f\u0477\u047d\u0488\u0491\u0496"+ + "\u04a3\u04a9\u04b0\u04bd\u04c6\u04cf\u04d5\u04dd\u04e3\u04e8\u04ed\u04f5"+ + "\u04fa\u04fe\u0502\u0506\u0508\u050c\u0511\u0516\u0525\u052b\u0536\u053e"+ + "\u0549\u054d\u0552\u055a\u056a\u0597\u059d\u05a2\u05ab\u05ad\u05af\u05b5"+ + "\u05bc\u05c8\u05d1\u05d8\u05db\u05df\u05f1\u05f3\u05fb\u0604\u060b\u0615"+ + "\u061c\u0624\u0627\u062e\u0635\u0638\u063d\u0642\u0647\u064a\u0652\u0656"+ + "\u065b\u065f\u0663\u0667\u066f\u0678\u067e\u0681\u0685\u068d\u0692\u069d"+ + "\u06a3\u06a8\u06ad\u06b4\u06bf\u06c7\u06cb\u06cd\u06d4\u06d8"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/src/main/java/grammar/JavaParser.tokens b/src/main/java/grammar/JavaParser.tokens new file mode 100644 index 00000000..f811013a --- /dev/null +++ b/src/main/java/grammar/JavaParser.tokens @@ -0,0 +1,242 @@ +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 +'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 +'null'=77 +'('=78 +')'=79 +'{'=80 +'}'=81 +'['=82 +']'=83 +';'=84 +','=85 +'.'=86 +'='=87 +'>'=88 +'<'=89 +'!'=90 +'~'=91 +'?'=92 +':'=93 +'=='=94 +'<='=95 +'>='=96 +'!='=97 +'&&'=98 +'||'=99 +'++'=100 +'--'=101 +'+'=102 +'-'=103 +'*'=104 +'/'=105 +'&'=106 +'|'=107 +'^'=108 +'%'=109 +'+='=110 +'-='=111 +'*='=112 +'/='=113 +'&='=114 +'|='=115 +'^='=116 +'%='=117 +'<<='=118 +'>>='=119 +'>>>='=120 +'->'=121 +'::'=122 +'@'=123 +'...'=124 diff --git a/src/main/java/grammar/JavaParserBaseListener.java b/src/main/java/grammar/JavaParserBaseListener.java new file mode 100644 index 00000000..4b95b3bc --- /dev/null +++ b/src/main/java/grammar/JavaParserBaseListener.java @@ -0,0 +1,1552 @@ +// Generated from JavaParser.g4 by ANTLR 4.5 +package grammar; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ErrorNode; +import org.antlr.v4.runtime.tree.TerminalNode; + +/** + * This class provides an empty implementation of {@link JavaParserListener}, + * which can be extended to create a listener which only needs to handle a subset + * of the available methods. + */ +public class JavaParserBaseListener implements JavaParserListener { + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterCompilationUnit(JavaParser.CompilationUnitContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitCompilationUnit(JavaParser.CompilationUnitContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPackageDeclaration(JavaParser.PackageDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPackageDeclaration(JavaParser.PackageDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterImportDeclaration(JavaParser.ImportDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitImportDeclaration(JavaParser.ImportDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeDeclaration(JavaParser.TypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeDeclaration(JavaParser.TypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterModifier(JavaParser.ModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitModifier(JavaParser.ModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassOrInterfaceModifier(JavaParser.ClassOrInterfaceModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassOrInterfaceModifier(JavaParser.ClassOrInterfaceModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterVariableModifier(JavaParser.VariableModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitVariableModifier(JavaParser.VariableModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassDeclaration(JavaParser.ClassDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassDeclaration(JavaParser.ClassDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeParameters(JavaParser.TypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeParameters(JavaParser.TypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeParameter(JavaParser.TypeParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeParameter(JavaParser.TypeParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeBound(JavaParser.TypeBoundContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeBound(JavaParser.TypeBoundContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEnumDeclaration(JavaParser.EnumDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEnumDeclaration(JavaParser.EnumDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEnumConstants(JavaParser.EnumConstantsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEnumConstants(JavaParser.EnumConstantsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEnumConstant(JavaParser.EnumConstantContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEnumConstant(JavaParser.EnumConstantContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEnumBodyDeclarations(JavaParser.EnumBodyDeclarationsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEnumBodyDeclarations(JavaParser.EnumBodyDeclarationsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterInterfaceDeclaration(JavaParser.InterfaceDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitInterfaceDeclaration(JavaParser.InterfaceDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassBody(JavaParser.ClassBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassBody(JavaParser.ClassBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterInterfaceBody(JavaParser.InterfaceBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitInterfaceBody(JavaParser.InterfaceBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassBodyDeclaration(JavaParser.ClassBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassBodyDeclaration(JavaParser.ClassBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMemberDeclaration(JavaParser.MemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMemberDeclaration(JavaParser.MemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMethodDeclaration(JavaParser.MethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMethodDeclaration(JavaParser.MethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMethodBody(JavaParser.MethodBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMethodBody(JavaParser.MethodBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeTypeOrVoid(JavaParser.TypeTypeOrVoidContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeTypeOrVoid(JavaParser.TypeTypeOrVoidContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterGenericMethodDeclaration(JavaParser.GenericMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitGenericMethodDeclaration(JavaParser.GenericMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterGenericConstructorDeclaration(JavaParser.GenericConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitGenericConstructorDeclaration(JavaParser.GenericConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterConstructorDeclaration(JavaParser.ConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitConstructorDeclaration(JavaParser.ConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterCompactConstructorDeclaration(JavaParser.CompactConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitCompactConstructorDeclaration(JavaParser.CompactConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFieldDeclaration(JavaParser.FieldDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFieldDeclaration(JavaParser.FieldDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterInterfaceBodyDeclaration(JavaParser.InterfaceBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitInterfaceBodyDeclaration(JavaParser.InterfaceBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterInterfaceMemberDeclaration(JavaParser.InterfaceMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitInterfaceMemberDeclaration(JavaParser.InterfaceMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterConstDeclaration(JavaParser.ConstDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitConstDeclaration(JavaParser.ConstDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterConstantDeclarator(JavaParser.ConstantDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitConstantDeclarator(JavaParser.ConstantDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterInterfaceMethodDeclaration(JavaParser.InterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitInterfaceMethodDeclaration(JavaParser.InterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterInterfaceMethodModifier(JavaParser.InterfaceMethodModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitInterfaceMethodModifier(JavaParser.InterfaceMethodModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterGenericInterfaceMethodDeclaration(JavaParser.GenericInterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitGenericInterfaceMethodDeclaration(JavaParser.GenericInterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterInterfaceCommonBodyDeclaration(JavaParser.InterfaceCommonBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitInterfaceCommonBodyDeclaration(JavaParser.InterfaceCommonBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterVariableDeclarators(JavaParser.VariableDeclaratorsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitVariableDeclarators(JavaParser.VariableDeclaratorsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterVariableDeclarator(JavaParser.VariableDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitVariableDeclarator(JavaParser.VariableDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterVariableDeclaratorId(JavaParser.VariableDeclaratorIdContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitVariableDeclaratorId(JavaParser.VariableDeclaratorIdContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterVariableInitializer(JavaParser.VariableInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitVariableInitializer(JavaParser.VariableInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArrayInitializer(JavaParser.ArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArrayInitializer(JavaParser.ArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassOrInterfaceType(JavaParser.ClassOrInterfaceTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassOrInterfaceType(JavaParser.ClassOrInterfaceTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeArgument(JavaParser.TypeArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeArgument(JavaParser.TypeArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterQualifiedNameList(JavaParser.QualifiedNameListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitQualifiedNameList(JavaParser.QualifiedNameListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFormalParameters(JavaParser.FormalParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFormalParameters(JavaParser.FormalParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterReceiverParameter(JavaParser.ReceiverParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitReceiverParameter(JavaParser.ReceiverParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFormalParameterList(JavaParser.FormalParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFormalParameterList(JavaParser.FormalParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFormalParameter(JavaParser.FormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFormalParameter(JavaParser.FormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLastFormalParameter(JavaParser.LastFormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLastFormalParameter(JavaParser.LastFormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLambdaLVTIList(JavaParser.LambdaLVTIListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLambdaLVTIList(JavaParser.LambdaLVTIListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLambdaLVTIParameter(JavaParser.LambdaLVTIParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLambdaLVTIParameter(JavaParser.LambdaLVTIParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterQualifiedName(JavaParser.QualifiedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitQualifiedName(JavaParser.QualifiedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLiteral(JavaParser.LiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLiteral(JavaParser.LiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterIntegerLiteral(JavaParser.IntegerLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitIntegerLiteral(JavaParser.IntegerLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFloatLiteral(JavaParser.FloatLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFloatLiteral(JavaParser.FloatLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAltAnnotationQualifiedName(JavaParser.AltAnnotationQualifiedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAltAnnotationQualifiedName(JavaParser.AltAnnotationQualifiedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAnnotation(JavaParser.AnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAnnotation(JavaParser.AnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterElementValuePairs(JavaParser.ElementValuePairsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitElementValuePairs(JavaParser.ElementValuePairsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterElementValuePair(JavaParser.ElementValuePairContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitElementValuePair(JavaParser.ElementValuePairContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterElementValue(JavaParser.ElementValueContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitElementValue(JavaParser.ElementValueContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterElementValueArrayInitializer(JavaParser.ElementValueArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitElementValueArrayInitializer(JavaParser.ElementValueArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAnnotationTypeDeclaration(JavaParser.AnnotationTypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAnnotationTypeDeclaration(JavaParser.AnnotationTypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAnnotationTypeBody(JavaParser.AnnotationTypeBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAnnotationTypeBody(JavaParser.AnnotationTypeBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAnnotationTypeElementDeclaration(JavaParser.AnnotationTypeElementDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAnnotationTypeElementDeclaration(JavaParser.AnnotationTypeElementDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAnnotationTypeElementRest(JavaParser.AnnotationTypeElementRestContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAnnotationTypeElementRest(JavaParser.AnnotationTypeElementRestContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAnnotationMethodOrConstantRest(JavaParser.AnnotationMethodOrConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAnnotationMethodOrConstantRest(JavaParser.AnnotationMethodOrConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAnnotationMethodRest(JavaParser.AnnotationMethodRestContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAnnotationMethodRest(JavaParser.AnnotationMethodRestContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAnnotationConstantRest(JavaParser.AnnotationConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAnnotationConstantRest(JavaParser.AnnotationConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDefaultValue(JavaParser.DefaultValueContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDefaultValue(JavaParser.DefaultValueContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterModuleDeclaration(JavaParser.ModuleDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitModuleDeclaration(JavaParser.ModuleDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterModuleBody(JavaParser.ModuleBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitModuleBody(JavaParser.ModuleBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterModuleDirective(JavaParser.ModuleDirectiveContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitModuleDirective(JavaParser.ModuleDirectiveContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterRequiresModifier(JavaParser.RequiresModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitRequiresModifier(JavaParser.RequiresModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterRecordDeclaration(JavaParser.RecordDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitRecordDeclaration(JavaParser.RecordDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterRecordHeader(JavaParser.RecordHeaderContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitRecordHeader(JavaParser.RecordHeaderContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterRecordComponentList(JavaParser.RecordComponentListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitRecordComponentList(JavaParser.RecordComponentListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterRecordComponent(JavaParser.RecordComponentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitRecordComponent(JavaParser.RecordComponentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterRecordBody(JavaParser.RecordBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitRecordBody(JavaParser.RecordBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterBlock(JavaParser.BlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitBlock(JavaParser.BlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterBlockStatement(JavaParser.BlockStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitBlockStatement(JavaParser.BlockStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLocalVariableDeclaration(JavaParser.LocalVariableDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLocalVariableDeclaration(JavaParser.LocalVariableDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterIdentifier(JavaParser.IdentifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitIdentifier(JavaParser.IdentifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeIdentifier(JavaParser.TypeIdentifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeIdentifier(JavaParser.TypeIdentifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLocalTypeDeclaration(JavaParser.LocalTypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLocalTypeDeclaration(JavaParser.LocalTypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterStatement(JavaParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitStatement(JavaParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterCatchClause(JavaParser.CatchClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitCatchClause(JavaParser.CatchClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterCatchType(JavaParser.CatchTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitCatchType(JavaParser.CatchTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFinallyBlock(JavaParser.FinallyBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFinallyBlock(JavaParser.FinallyBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterResourceSpecification(JavaParser.ResourceSpecificationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitResourceSpecification(JavaParser.ResourceSpecificationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterResources(JavaParser.ResourcesContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitResources(JavaParser.ResourcesContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterResource(JavaParser.ResourceContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitResource(JavaParser.ResourceContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSwitchBlockStatementGroup(JavaParser.SwitchBlockStatementGroupContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSwitchBlockStatementGroup(JavaParser.SwitchBlockStatementGroupContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSwitchLabel(JavaParser.SwitchLabelContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSwitchLabel(JavaParser.SwitchLabelContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterForControl(JavaParser.ForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitForControl(JavaParser.ForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterForInit(JavaParser.ForInitContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitForInit(JavaParser.ForInitContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEnhancedForControl(JavaParser.EnhancedForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEnhancedForControl(JavaParser.EnhancedForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterParExpression(JavaParser.ParExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitParExpression(JavaParser.ParExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterExpressionList(JavaParser.ExpressionListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitExpressionList(JavaParser.ExpressionListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMethodCall(JavaParser.MethodCallContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMethodCall(JavaParser.MethodCallContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterExpression(JavaParser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitExpression(JavaParser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPattern(JavaParser.PatternContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPattern(JavaParser.PatternContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLambdaExpression(JavaParser.LambdaExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLambdaExpression(JavaParser.LambdaExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLambdaParameters(JavaParser.LambdaParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLambdaParameters(JavaParser.LambdaParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLambdaBody(JavaParser.LambdaBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLambdaBody(JavaParser.LambdaBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPrimary(JavaParser.PrimaryContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPrimary(JavaParser.PrimaryContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSwitchExpression(JavaParser.SwitchExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSwitchExpression(JavaParser.SwitchExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSwitchLabeledRule(JavaParser.SwitchLabeledRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSwitchLabeledRule(JavaParser.SwitchLabeledRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterGuardedPattern(JavaParser.GuardedPatternContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitGuardedPattern(JavaParser.GuardedPatternContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSwitchRuleOutcome(JavaParser.SwitchRuleOutcomeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSwitchRuleOutcome(JavaParser.SwitchRuleOutcomeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassType(JavaParser.ClassTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassType(JavaParser.ClassTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterCreator(JavaParser.CreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitCreator(JavaParser.CreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterCreatedName(JavaParser.CreatedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitCreatedName(JavaParser.CreatedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterInnerCreator(JavaParser.InnerCreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitInnerCreator(JavaParser.InnerCreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArrayCreatorRest(JavaParser.ArrayCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArrayCreatorRest(JavaParser.ArrayCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassCreatorRest(JavaParser.ClassCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassCreatorRest(JavaParser.ClassCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterExplicitGenericInvocation(JavaParser.ExplicitGenericInvocationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitExplicitGenericInvocation(JavaParser.ExplicitGenericInvocationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeArgumentsOrDiamond(JavaParser.TypeArgumentsOrDiamondContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeArgumentsOrDiamond(JavaParser.TypeArgumentsOrDiamondContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterNonWildcardTypeArgumentsOrDiamond(JavaParser.NonWildcardTypeArgumentsOrDiamondContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitNonWildcardTypeArgumentsOrDiamond(JavaParser.NonWildcardTypeArgumentsOrDiamondContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterNonWildcardTypeArguments(JavaParser.NonWildcardTypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitNonWildcardTypeArguments(JavaParser.NonWildcardTypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeList(JavaParser.TypeListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeList(JavaParser.TypeListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeType(JavaParser.TypeTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeType(JavaParser.TypeTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPrimitiveType(JavaParser.PrimitiveTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPrimitiveType(JavaParser.PrimitiveTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeArguments(JavaParser.TypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeArguments(JavaParser.TypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSuperSuffix(JavaParser.SuperSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSuperSuffix(JavaParser.SuperSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterExplicitGenericInvocationSuffix(JavaParser.ExplicitGenericInvocationSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitExplicitGenericInvocationSuffix(JavaParser.ExplicitGenericInvocationSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArguments(JavaParser.ArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArguments(JavaParser.ArgumentsContext ctx) { } + + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void visitTerminal(TerminalNode node) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void visitErrorNode(ErrorNode node) { } +} \ No newline at end of file diff --git a/src/main/java/grammar/JavaParserListener.java b/src/main/java/grammar/JavaParserListener.java new file mode 100644 index 00000000..1c58e5b0 --- /dev/null +++ b/src/main/java/grammar/JavaParserListener.java @@ -0,0 +1,1271 @@ +// Generated from JavaParser.g4 by ANTLR 4.5 +package grammar; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link JavaParser}. + */ +public interface JavaParserListener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link JavaParser#compilationUnit}. + * @param ctx the parse tree + */ + void enterCompilationUnit(JavaParser.CompilationUnitContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#compilationUnit}. + * @param ctx the parse tree + */ + void exitCompilationUnit(JavaParser.CompilationUnitContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#packageDeclaration}. + * @param ctx the parse tree + */ + void enterPackageDeclaration(JavaParser.PackageDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#packageDeclaration}. + * @param ctx the parse tree + */ + void exitPackageDeclaration(JavaParser.PackageDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#importDeclaration}. + * @param ctx the parse tree + */ + void enterImportDeclaration(JavaParser.ImportDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#importDeclaration}. + * @param ctx the parse tree + */ + void exitImportDeclaration(JavaParser.ImportDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeDeclaration}. + * @param ctx the parse tree + */ + void enterTypeDeclaration(JavaParser.TypeDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeDeclaration}. + * @param ctx the parse tree + */ + void exitTypeDeclaration(JavaParser.TypeDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#modifier}. + * @param ctx the parse tree + */ + void enterModifier(JavaParser.ModifierContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#modifier}. + * @param ctx the parse tree + */ + void exitModifier(JavaParser.ModifierContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#classOrInterfaceModifier}. + * @param ctx the parse tree + */ + void enterClassOrInterfaceModifier(JavaParser.ClassOrInterfaceModifierContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#classOrInterfaceModifier}. + * @param ctx the parse tree + */ + void exitClassOrInterfaceModifier(JavaParser.ClassOrInterfaceModifierContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#variableModifier}. + * @param ctx the parse tree + */ + void enterVariableModifier(JavaParser.VariableModifierContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#variableModifier}. + * @param ctx the parse tree + */ + void exitVariableModifier(JavaParser.VariableModifierContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#classDeclaration}. + * @param ctx the parse tree + */ + void enterClassDeclaration(JavaParser.ClassDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#classDeclaration}. + * @param ctx the parse tree + */ + void exitClassDeclaration(JavaParser.ClassDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeParameters}. + * @param ctx the parse tree + */ + void enterTypeParameters(JavaParser.TypeParametersContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeParameters}. + * @param ctx the parse tree + */ + void exitTypeParameters(JavaParser.TypeParametersContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeParameter}. + * @param ctx the parse tree + */ + void enterTypeParameter(JavaParser.TypeParameterContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeParameter}. + * @param ctx the parse tree + */ + void exitTypeParameter(JavaParser.TypeParameterContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeBound}. + * @param ctx the parse tree + */ + void enterTypeBound(JavaParser.TypeBoundContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeBound}. + * @param ctx the parse tree + */ + void exitTypeBound(JavaParser.TypeBoundContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#enumDeclaration}. + * @param ctx the parse tree + */ + void enterEnumDeclaration(JavaParser.EnumDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#enumDeclaration}. + * @param ctx the parse tree + */ + void exitEnumDeclaration(JavaParser.EnumDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#enumConstants}. + * @param ctx the parse tree + */ + void enterEnumConstants(JavaParser.EnumConstantsContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#enumConstants}. + * @param ctx the parse tree + */ + void exitEnumConstants(JavaParser.EnumConstantsContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#enumConstant}. + * @param ctx the parse tree + */ + void enterEnumConstant(JavaParser.EnumConstantContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#enumConstant}. + * @param ctx the parse tree + */ + void exitEnumConstant(JavaParser.EnumConstantContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#enumBodyDeclarations}. + * @param ctx the parse tree + */ + void enterEnumBodyDeclarations(JavaParser.EnumBodyDeclarationsContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#enumBodyDeclarations}. + * @param ctx the parse tree + */ + void exitEnumBodyDeclarations(JavaParser.EnumBodyDeclarationsContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#interfaceDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceDeclaration(JavaParser.InterfaceDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#interfaceDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceDeclaration(JavaParser.InterfaceDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#classBody}. + * @param ctx the parse tree + */ + void enterClassBody(JavaParser.ClassBodyContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#classBody}. + * @param ctx the parse tree + */ + void exitClassBody(JavaParser.ClassBodyContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#interfaceBody}. + * @param ctx the parse tree + */ + void enterInterfaceBody(JavaParser.InterfaceBodyContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#interfaceBody}. + * @param ctx the parse tree + */ + void exitInterfaceBody(JavaParser.InterfaceBodyContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#classBodyDeclaration}. + * @param ctx the parse tree + */ + void enterClassBodyDeclaration(JavaParser.ClassBodyDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#classBodyDeclaration}. + * @param ctx the parse tree + */ + void exitClassBodyDeclaration(JavaParser.ClassBodyDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#memberDeclaration}. + * @param ctx the parse tree + */ + void enterMemberDeclaration(JavaParser.MemberDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#memberDeclaration}. + * @param ctx the parse tree + */ + void exitMemberDeclaration(JavaParser.MemberDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#methodDeclaration}. + * @param ctx the parse tree + */ + void enterMethodDeclaration(JavaParser.MethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#methodDeclaration}. + * @param ctx the parse tree + */ + void exitMethodDeclaration(JavaParser.MethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#methodBody}. + * @param ctx the parse tree + */ + void enterMethodBody(JavaParser.MethodBodyContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#methodBody}. + * @param ctx the parse tree + */ + void exitMethodBody(JavaParser.MethodBodyContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeTypeOrVoid}. + * @param ctx the parse tree + */ + void enterTypeTypeOrVoid(JavaParser.TypeTypeOrVoidContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeTypeOrVoid}. + * @param ctx the parse tree + */ + void exitTypeTypeOrVoid(JavaParser.TypeTypeOrVoidContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#genericMethodDeclaration}. + * @param ctx the parse tree + */ + void enterGenericMethodDeclaration(JavaParser.GenericMethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#genericMethodDeclaration}. + * @param ctx the parse tree + */ + void exitGenericMethodDeclaration(JavaParser.GenericMethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#genericConstructorDeclaration}. + * @param ctx the parse tree + */ + void enterGenericConstructorDeclaration(JavaParser.GenericConstructorDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#genericConstructorDeclaration}. + * @param ctx the parse tree + */ + void exitGenericConstructorDeclaration(JavaParser.GenericConstructorDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#constructorDeclaration}. + * @param ctx the parse tree + */ + void enterConstructorDeclaration(JavaParser.ConstructorDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#constructorDeclaration}. + * @param ctx the parse tree + */ + void exitConstructorDeclaration(JavaParser.ConstructorDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#compactConstructorDeclaration}. + * @param ctx the parse tree + */ + void enterCompactConstructorDeclaration(JavaParser.CompactConstructorDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#compactConstructorDeclaration}. + * @param ctx the parse tree + */ + void exitCompactConstructorDeclaration(JavaParser.CompactConstructorDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#fieldDeclaration}. + * @param ctx the parse tree + */ + void enterFieldDeclaration(JavaParser.FieldDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#fieldDeclaration}. + * @param ctx the parse tree + */ + void exitFieldDeclaration(JavaParser.FieldDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#interfaceBodyDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceBodyDeclaration(JavaParser.InterfaceBodyDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#interfaceBodyDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceBodyDeclaration(JavaParser.InterfaceBodyDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#interfaceMemberDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceMemberDeclaration(JavaParser.InterfaceMemberDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#interfaceMemberDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceMemberDeclaration(JavaParser.InterfaceMemberDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#constDeclaration}. + * @param ctx the parse tree + */ + void enterConstDeclaration(JavaParser.ConstDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#constDeclaration}. + * @param ctx the parse tree + */ + void exitConstDeclaration(JavaParser.ConstDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#constantDeclarator}. + * @param ctx the parse tree + */ + void enterConstantDeclarator(JavaParser.ConstantDeclaratorContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#constantDeclarator}. + * @param ctx the parse tree + */ + void exitConstantDeclarator(JavaParser.ConstantDeclaratorContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#interfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceMethodDeclaration(JavaParser.InterfaceMethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#interfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceMethodDeclaration(JavaParser.InterfaceMethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#interfaceMethodModifier}. + * @param ctx the parse tree + */ + void enterInterfaceMethodModifier(JavaParser.InterfaceMethodModifierContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#interfaceMethodModifier}. + * @param ctx the parse tree + */ + void exitInterfaceMethodModifier(JavaParser.InterfaceMethodModifierContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#genericInterfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void enterGenericInterfaceMethodDeclaration(JavaParser.GenericInterfaceMethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#genericInterfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void exitGenericInterfaceMethodDeclaration(JavaParser.GenericInterfaceMethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#interfaceCommonBodyDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceCommonBodyDeclaration(JavaParser.InterfaceCommonBodyDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#interfaceCommonBodyDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceCommonBodyDeclaration(JavaParser.InterfaceCommonBodyDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#variableDeclarators}. + * @param ctx the parse tree + */ + void enterVariableDeclarators(JavaParser.VariableDeclaratorsContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#variableDeclarators}. + * @param ctx the parse tree + */ + void exitVariableDeclarators(JavaParser.VariableDeclaratorsContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#variableDeclarator}. + * @param ctx the parse tree + */ + void enterVariableDeclarator(JavaParser.VariableDeclaratorContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#variableDeclarator}. + * @param ctx the parse tree + */ + void exitVariableDeclarator(JavaParser.VariableDeclaratorContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#variableDeclaratorId}. + * @param ctx the parse tree + */ + void enterVariableDeclaratorId(JavaParser.VariableDeclaratorIdContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#variableDeclaratorId}. + * @param ctx the parse tree + */ + void exitVariableDeclaratorId(JavaParser.VariableDeclaratorIdContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#variableInitializer}. + * @param ctx the parse tree + */ + void enterVariableInitializer(JavaParser.VariableInitializerContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#variableInitializer}. + * @param ctx the parse tree + */ + void exitVariableInitializer(JavaParser.VariableInitializerContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#arrayInitializer}. + * @param ctx the parse tree + */ + void enterArrayInitializer(JavaParser.ArrayInitializerContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#arrayInitializer}. + * @param ctx the parse tree + */ + void exitArrayInitializer(JavaParser.ArrayInitializerContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#classOrInterfaceType}. + * @param ctx the parse tree + */ + void enterClassOrInterfaceType(JavaParser.ClassOrInterfaceTypeContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#classOrInterfaceType}. + * @param ctx the parse tree + */ + void exitClassOrInterfaceType(JavaParser.ClassOrInterfaceTypeContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeArgument}. + * @param ctx the parse tree + */ + void enterTypeArgument(JavaParser.TypeArgumentContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeArgument}. + * @param ctx the parse tree + */ + void exitTypeArgument(JavaParser.TypeArgumentContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#qualifiedNameList}. + * @param ctx the parse tree + */ + void enterQualifiedNameList(JavaParser.QualifiedNameListContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#qualifiedNameList}. + * @param ctx the parse tree + */ + void exitQualifiedNameList(JavaParser.QualifiedNameListContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#formalParameters}. + * @param ctx the parse tree + */ + void enterFormalParameters(JavaParser.FormalParametersContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#formalParameters}. + * @param ctx the parse tree + */ + void exitFormalParameters(JavaParser.FormalParametersContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#receiverParameter}. + * @param ctx the parse tree + */ + void enterReceiverParameter(JavaParser.ReceiverParameterContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#receiverParameter}. + * @param ctx the parse tree + */ + void exitReceiverParameter(JavaParser.ReceiverParameterContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#formalParameterList}. + * @param ctx the parse tree + */ + void enterFormalParameterList(JavaParser.FormalParameterListContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#formalParameterList}. + * @param ctx the parse tree + */ + void exitFormalParameterList(JavaParser.FormalParameterListContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#formalParameter}. + * @param ctx the parse tree + */ + void enterFormalParameter(JavaParser.FormalParameterContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#formalParameter}. + * @param ctx the parse tree + */ + void exitFormalParameter(JavaParser.FormalParameterContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#lastFormalParameter}. + * @param ctx the parse tree + */ + void enterLastFormalParameter(JavaParser.LastFormalParameterContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#lastFormalParameter}. + * @param ctx the parse tree + */ + void exitLastFormalParameter(JavaParser.LastFormalParameterContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#lambdaLVTIList}. + * @param ctx the parse tree + */ + void enterLambdaLVTIList(JavaParser.LambdaLVTIListContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#lambdaLVTIList}. + * @param ctx the parse tree + */ + void exitLambdaLVTIList(JavaParser.LambdaLVTIListContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#lambdaLVTIParameter}. + * @param ctx the parse tree + */ + void enterLambdaLVTIParameter(JavaParser.LambdaLVTIParameterContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#lambdaLVTIParameter}. + * @param ctx the parse tree + */ + void exitLambdaLVTIParameter(JavaParser.LambdaLVTIParameterContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#qualifiedName}. + * @param ctx the parse tree + */ + void enterQualifiedName(JavaParser.QualifiedNameContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#qualifiedName}. + * @param ctx the parse tree + */ + void exitQualifiedName(JavaParser.QualifiedNameContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#literal}. + * @param ctx the parse tree + */ + void enterLiteral(JavaParser.LiteralContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#literal}. + * @param ctx the parse tree + */ + void exitLiteral(JavaParser.LiteralContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#integerLiteral}. + * @param ctx the parse tree + */ + void enterIntegerLiteral(JavaParser.IntegerLiteralContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#integerLiteral}. + * @param ctx the parse tree + */ + void exitIntegerLiteral(JavaParser.IntegerLiteralContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#floatLiteral}. + * @param ctx the parse tree + */ + void enterFloatLiteral(JavaParser.FloatLiteralContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#floatLiteral}. + * @param ctx the parse tree + */ + void exitFloatLiteral(JavaParser.FloatLiteralContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#altAnnotationQualifiedName}. + * @param ctx the parse tree + */ + void enterAltAnnotationQualifiedName(JavaParser.AltAnnotationQualifiedNameContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#altAnnotationQualifiedName}. + * @param ctx the parse tree + */ + void exitAltAnnotationQualifiedName(JavaParser.AltAnnotationQualifiedNameContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#annotation}. + * @param ctx the parse tree + */ + void enterAnnotation(JavaParser.AnnotationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#annotation}. + * @param ctx the parse tree + */ + void exitAnnotation(JavaParser.AnnotationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#elementValuePairs}. + * @param ctx the parse tree + */ + void enterElementValuePairs(JavaParser.ElementValuePairsContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#elementValuePairs}. + * @param ctx the parse tree + */ + void exitElementValuePairs(JavaParser.ElementValuePairsContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#elementValuePair}. + * @param ctx the parse tree + */ + void enterElementValuePair(JavaParser.ElementValuePairContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#elementValuePair}. + * @param ctx the parse tree + */ + void exitElementValuePair(JavaParser.ElementValuePairContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#elementValue}. + * @param ctx the parse tree + */ + void enterElementValue(JavaParser.ElementValueContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#elementValue}. + * @param ctx the parse tree + */ + void exitElementValue(JavaParser.ElementValueContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#elementValueArrayInitializer}. + * @param ctx the parse tree + */ + void enterElementValueArrayInitializer(JavaParser.ElementValueArrayInitializerContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#elementValueArrayInitializer}. + * @param ctx the parse tree + */ + void exitElementValueArrayInitializer(JavaParser.ElementValueArrayInitializerContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#annotationTypeDeclaration}. + * @param ctx the parse tree + */ + void enterAnnotationTypeDeclaration(JavaParser.AnnotationTypeDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#annotationTypeDeclaration}. + * @param ctx the parse tree + */ + void exitAnnotationTypeDeclaration(JavaParser.AnnotationTypeDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#annotationTypeBody}. + * @param ctx the parse tree + */ + void enterAnnotationTypeBody(JavaParser.AnnotationTypeBodyContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#annotationTypeBody}. + * @param ctx the parse tree + */ + void exitAnnotationTypeBody(JavaParser.AnnotationTypeBodyContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#annotationTypeElementDeclaration}. + * @param ctx the parse tree + */ + void enterAnnotationTypeElementDeclaration(JavaParser.AnnotationTypeElementDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#annotationTypeElementDeclaration}. + * @param ctx the parse tree + */ + void exitAnnotationTypeElementDeclaration(JavaParser.AnnotationTypeElementDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#annotationTypeElementRest}. + * @param ctx the parse tree + */ + void enterAnnotationTypeElementRest(JavaParser.AnnotationTypeElementRestContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#annotationTypeElementRest}. + * @param ctx the parse tree + */ + void exitAnnotationTypeElementRest(JavaParser.AnnotationTypeElementRestContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#annotationMethodOrConstantRest}. + * @param ctx the parse tree + */ + void enterAnnotationMethodOrConstantRest(JavaParser.AnnotationMethodOrConstantRestContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#annotationMethodOrConstantRest}. + * @param ctx the parse tree + */ + void exitAnnotationMethodOrConstantRest(JavaParser.AnnotationMethodOrConstantRestContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#annotationMethodRest}. + * @param ctx the parse tree + */ + void enterAnnotationMethodRest(JavaParser.AnnotationMethodRestContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#annotationMethodRest}. + * @param ctx the parse tree + */ + void exitAnnotationMethodRest(JavaParser.AnnotationMethodRestContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#annotationConstantRest}. + * @param ctx the parse tree + */ + void enterAnnotationConstantRest(JavaParser.AnnotationConstantRestContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#annotationConstantRest}. + * @param ctx the parse tree + */ + void exitAnnotationConstantRest(JavaParser.AnnotationConstantRestContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#defaultValue}. + * @param ctx the parse tree + */ + void enterDefaultValue(JavaParser.DefaultValueContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#defaultValue}. + * @param ctx the parse tree + */ + void exitDefaultValue(JavaParser.DefaultValueContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#moduleDeclaration}. + * @param ctx the parse tree + */ + void enterModuleDeclaration(JavaParser.ModuleDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#moduleDeclaration}. + * @param ctx the parse tree + */ + void exitModuleDeclaration(JavaParser.ModuleDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#moduleBody}. + * @param ctx the parse tree + */ + void enterModuleBody(JavaParser.ModuleBodyContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#moduleBody}. + * @param ctx the parse tree + */ + void exitModuleBody(JavaParser.ModuleBodyContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#moduleDirective}. + * @param ctx the parse tree + */ + void enterModuleDirective(JavaParser.ModuleDirectiveContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#moduleDirective}. + * @param ctx the parse tree + */ + void exitModuleDirective(JavaParser.ModuleDirectiveContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#requiresModifier}. + * @param ctx the parse tree + */ + void enterRequiresModifier(JavaParser.RequiresModifierContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#requiresModifier}. + * @param ctx the parse tree + */ + void exitRequiresModifier(JavaParser.RequiresModifierContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#recordDeclaration}. + * @param ctx the parse tree + */ + void enterRecordDeclaration(JavaParser.RecordDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#recordDeclaration}. + * @param ctx the parse tree + */ + void exitRecordDeclaration(JavaParser.RecordDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#recordHeader}. + * @param ctx the parse tree + */ + void enterRecordHeader(JavaParser.RecordHeaderContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#recordHeader}. + * @param ctx the parse tree + */ + void exitRecordHeader(JavaParser.RecordHeaderContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#recordComponentList}. + * @param ctx the parse tree + */ + void enterRecordComponentList(JavaParser.RecordComponentListContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#recordComponentList}. + * @param ctx the parse tree + */ + void exitRecordComponentList(JavaParser.RecordComponentListContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#recordComponent}. + * @param ctx the parse tree + */ + void enterRecordComponent(JavaParser.RecordComponentContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#recordComponent}. + * @param ctx the parse tree + */ + void exitRecordComponent(JavaParser.RecordComponentContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#recordBody}. + * @param ctx the parse tree + */ + void enterRecordBody(JavaParser.RecordBodyContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#recordBody}. + * @param ctx the parse tree + */ + void exitRecordBody(JavaParser.RecordBodyContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#block}. + * @param ctx the parse tree + */ + void enterBlock(JavaParser.BlockContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#block}. + * @param ctx the parse tree + */ + void exitBlock(JavaParser.BlockContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#blockStatement}. + * @param ctx the parse tree + */ + void enterBlockStatement(JavaParser.BlockStatementContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#blockStatement}. + * @param ctx the parse tree + */ + void exitBlockStatement(JavaParser.BlockStatementContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#localVariableDeclaration}. + * @param ctx the parse tree + */ + void enterLocalVariableDeclaration(JavaParser.LocalVariableDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#localVariableDeclaration}. + * @param ctx the parse tree + */ + void exitLocalVariableDeclaration(JavaParser.LocalVariableDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#identifier}. + * @param ctx the parse tree + */ + void enterIdentifier(JavaParser.IdentifierContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#identifier}. + * @param ctx the parse tree + */ + void exitIdentifier(JavaParser.IdentifierContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeIdentifier}. + * @param ctx the parse tree + */ + void enterTypeIdentifier(JavaParser.TypeIdentifierContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeIdentifier}. + * @param ctx the parse tree + */ + void exitTypeIdentifier(JavaParser.TypeIdentifierContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#localTypeDeclaration}. + * @param ctx the parse tree + */ + void enterLocalTypeDeclaration(JavaParser.LocalTypeDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#localTypeDeclaration}. + * @param ctx the parse tree + */ + void exitLocalTypeDeclaration(JavaParser.LocalTypeDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#statement}. + * @param ctx the parse tree + */ + void enterStatement(JavaParser.StatementContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#statement}. + * @param ctx the parse tree + */ + void exitStatement(JavaParser.StatementContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#catchClause}. + * @param ctx the parse tree + */ + void enterCatchClause(JavaParser.CatchClauseContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#catchClause}. + * @param ctx the parse tree + */ + void exitCatchClause(JavaParser.CatchClauseContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#catchType}. + * @param ctx the parse tree + */ + void enterCatchType(JavaParser.CatchTypeContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#catchType}. + * @param ctx the parse tree + */ + void exitCatchType(JavaParser.CatchTypeContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#finallyBlock}. + * @param ctx the parse tree + */ + void enterFinallyBlock(JavaParser.FinallyBlockContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#finallyBlock}. + * @param ctx the parse tree + */ + void exitFinallyBlock(JavaParser.FinallyBlockContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#resourceSpecification}. + * @param ctx the parse tree + */ + void enterResourceSpecification(JavaParser.ResourceSpecificationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#resourceSpecification}. + * @param ctx the parse tree + */ + void exitResourceSpecification(JavaParser.ResourceSpecificationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#resources}. + * @param ctx the parse tree + */ + void enterResources(JavaParser.ResourcesContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#resources}. + * @param ctx the parse tree + */ + void exitResources(JavaParser.ResourcesContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#resource}. + * @param ctx the parse tree + */ + void enterResource(JavaParser.ResourceContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#resource}. + * @param ctx the parse tree + */ + void exitResource(JavaParser.ResourceContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#switchBlockStatementGroup}. + * @param ctx the parse tree + */ + void enterSwitchBlockStatementGroup(JavaParser.SwitchBlockStatementGroupContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#switchBlockStatementGroup}. + * @param ctx the parse tree + */ + void exitSwitchBlockStatementGroup(JavaParser.SwitchBlockStatementGroupContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#switchLabel}. + * @param ctx the parse tree + */ + void enterSwitchLabel(JavaParser.SwitchLabelContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#switchLabel}. + * @param ctx the parse tree + */ + void exitSwitchLabel(JavaParser.SwitchLabelContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#forControl}. + * @param ctx the parse tree + */ + void enterForControl(JavaParser.ForControlContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#forControl}. + * @param ctx the parse tree + */ + void exitForControl(JavaParser.ForControlContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#forInit}. + * @param ctx the parse tree + */ + void enterForInit(JavaParser.ForInitContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#forInit}. + * @param ctx the parse tree + */ + void exitForInit(JavaParser.ForInitContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#enhancedForControl}. + * @param ctx the parse tree + */ + void enterEnhancedForControl(JavaParser.EnhancedForControlContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#enhancedForControl}. + * @param ctx the parse tree + */ + void exitEnhancedForControl(JavaParser.EnhancedForControlContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#parExpression}. + * @param ctx the parse tree + */ + void enterParExpression(JavaParser.ParExpressionContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#parExpression}. + * @param ctx the parse tree + */ + void exitParExpression(JavaParser.ParExpressionContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#expressionList}. + * @param ctx the parse tree + */ + void enterExpressionList(JavaParser.ExpressionListContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#expressionList}. + * @param ctx the parse tree + */ + void exitExpressionList(JavaParser.ExpressionListContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#methodCall}. + * @param ctx the parse tree + */ + void enterMethodCall(JavaParser.MethodCallContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#methodCall}. + * @param ctx the parse tree + */ + void exitMethodCall(JavaParser.MethodCallContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#expression}. + * @param ctx the parse tree + */ + void enterExpression(JavaParser.ExpressionContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#expression}. + * @param ctx the parse tree + */ + void exitExpression(JavaParser.ExpressionContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#pattern}. + * @param ctx the parse tree + */ + void enterPattern(JavaParser.PatternContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#pattern}. + * @param ctx the parse tree + */ + void exitPattern(JavaParser.PatternContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#lambdaExpression}. + * @param ctx the parse tree + */ + void enterLambdaExpression(JavaParser.LambdaExpressionContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#lambdaExpression}. + * @param ctx the parse tree + */ + void exitLambdaExpression(JavaParser.LambdaExpressionContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#lambdaParameters}. + * @param ctx the parse tree + */ + void enterLambdaParameters(JavaParser.LambdaParametersContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#lambdaParameters}. + * @param ctx the parse tree + */ + void exitLambdaParameters(JavaParser.LambdaParametersContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#lambdaBody}. + * @param ctx the parse tree + */ + void enterLambdaBody(JavaParser.LambdaBodyContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#lambdaBody}. + * @param ctx the parse tree + */ + void exitLambdaBody(JavaParser.LambdaBodyContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#primary}. + * @param ctx the parse tree + */ + void enterPrimary(JavaParser.PrimaryContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#primary}. + * @param ctx the parse tree + */ + void exitPrimary(JavaParser.PrimaryContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#switchExpression}. + * @param ctx the parse tree + */ + void enterSwitchExpression(JavaParser.SwitchExpressionContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#switchExpression}. + * @param ctx the parse tree + */ + void exitSwitchExpression(JavaParser.SwitchExpressionContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#switchLabeledRule}. + * @param ctx the parse tree + */ + void enterSwitchLabeledRule(JavaParser.SwitchLabeledRuleContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#switchLabeledRule}. + * @param ctx the parse tree + */ + void exitSwitchLabeledRule(JavaParser.SwitchLabeledRuleContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#guardedPattern}. + * @param ctx the parse tree + */ + void enterGuardedPattern(JavaParser.GuardedPatternContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#guardedPattern}. + * @param ctx the parse tree + */ + void exitGuardedPattern(JavaParser.GuardedPatternContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#switchRuleOutcome}. + * @param ctx the parse tree + */ + void enterSwitchRuleOutcome(JavaParser.SwitchRuleOutcomeContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#switchRuleOutcome}. + * @param ctx the parse tree + */ + void exitSwitchRuleOutcome(JavaParser.SwitchRuleOutcomeContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#classType}. + * @param ctx the parse tree + */ + void enterClassType(JavaParser.ClassTypeContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#classType}. + * @param ctx the parse tree + */ + void exitClassType(JavaParser.ClassTypeContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#creator}. + * @param ctx the parse tree + */ + void enterCreator(JavaParser.CreatorContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#creator}. + * @param ctx the parse tree + */ + void exitCreator(JavaParser.CreatorContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#createdName}. + * @param ctx the parse tree + */ + void enterCreatedName(JavaParser.CreatedNameContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#createdName}. + * @param ctx the parse tree + */ + void exitCreatedName(JavaParser.CreatedNameContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#innerCreator}. + * @param ctx the parse tree + */ + void enterInnerCreator(JavaParser.InnerCreatorContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#innerCreator}. + * @param ctx the parse tree + */ + void exitInnerCreator(JavaParser.InnerCreatorContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#arrayCreatorRest}. + * @param ctx the parse tree + */ + void enterArrayCreatorRest(JavaParser.ArrayCreatorRestContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#arrayCreatorRest}. + * @param ctx the parse tree + */ + void exitArrayCreatorRest(JavaParser.ArrayCreatorRestContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#classCreatorRest}. + * @param ctx the parse tree + */ + void enterClassCreatorRest(JavaParser.ClassCreatorRestContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#classCreatorRest}. + * @param ctx the parse tree + */ + void exitClassCreatorRest(JavaParser.ClassCreatorRestContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#explicitGenericInvocation}. + * @param ctx the parse tree + */ + void enterExplicitGenericInvocation(JavaParser.ExplicitGenericInvocationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#explicitGenericInvocation}. + * @param ctx the parse tree + */ + void exitExplicitGenericInvocation(JavaParser.ExplicitGenericInvocationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void enterTypeArgumentsOrDiamond(JavaParser.TypeArgumentsOrDiamondContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void exitTypeArgumentsOrDiamond(JavaParser.TypeArgumentsOrDiamondContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#nonWildcardTypeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void enterNonWildcardTypeArgumentsOrDiamond(JavaParser.NonWildcardTypeArgumentsOrDiamondContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#nonWildcardTypeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void exitNonWildcardTypeArgumentsOrDiamond(JavaParser.NonWildcardTypeArgumentsOrDiamondContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#nonWildcardTypeArguments}. + * @param ctx the parse tree + */ + void enterNonWildcardTypeArguments(JavaParser.NonWildcardTypeArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#nonWildcardTypeArguments}. + * @param ctx the parse tree + */ + void exitNonWildcardTypeArguments(JavaParser.NonWildcardTypeArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeList}. + * @param ctx the parse tree + */ + void enterTypeList(JavaParser.TypeListContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeList}. + * @param ctx the parse tree + */ + void exitTypeList(JavaParser.TypeListContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeType}. + * @param ctx the parse tree + */ + void enterTypeType(JavaParser.TypeTypeContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeType}. + * @param ctx the parse tree + */ + void exitTypeType(JavaParser.TypeTypeContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#primitiveType}. + * @param ctx the parse tree + */ + void enterPrimitiveType(JavaParser.PrimitiveTypeContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#primitiveType}. + * @param ctx the parse tree + */ + void exitPrimitiveType(JavaParser.PrimitiveTypeContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeArguments}. + * @param ctx the parse tree + */ + void enterTypeArguments(JavaParser.TypeArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeArguments}. + * @param ctx the parse tree + */ + void exitTypeArguments(JavaParser.TypeArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#superSuffix}. + * @param ctx the parse tree + */ + void enterSuperSuffix(JavaParser.SuperSuffixContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#superSuffix}. + * @param ctx the parse tree + */ + void exitSuperSuffix(JavaParser.SuperSuffixContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#explicitGenericInvocationSuffix}. + * @param ctx the parse tree + */ + void enterExplicitGenericInvocationSuffix(JavaParser.ExplicitGenericInvocationSuffixContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#explicitGenericInvocationSuffix}. + * @param ctx the parse tree + */ + void exitExplicitGenericInvocationSuffix(JavaParser.ExplicitGenericInvocationSuffixContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#arguments}. + * @param ctx the parse tree + */ + void enterArguments(JavaParser.ArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#arguments}. + * @param ctx the parse tree + */ + void exitArguments(JavaParser.ArgumentsContext ctx); +} \ No newline at end of file diff --git a/src/main/java/grammar/KotlinLexer.java b/src/main/java/grammar/KotlinLexer.java new file mode 100644 index 00000000..b90b483c --- /dev/null +++ b/src/main/java/grammar/KotlinLexer.java @@ -0,0 +1,1569 @@ +// Generated from KotlinLexer.g4 by ANTLR 4.5 +package grammar; +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class KotlinLexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.5", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + ShebangLine=1, DelimitedComment=2, LineComment=3, WS=4, NL=5, RESERVED=6, + DOT=7, COMMA=8, LPAREN=9, RPAREN=10, LSQUARE=11, RSQUARE=12, LCURL=13, + RCURL=14, MULT=15, MOD=16, DIV=17, ADD=18, SUB=19, INCR=20, DECR=21, CONJ=22, + DISJ=23, EXCL=24, COLON=25, SEMICOLON=26, ASSIGNMENT=27, ADD_ASSIGNMENT=28, + SUB_ASSIGNMENT=29, MULT_ASSIGNMENT=30, DIV_ASSIGNMENT=31, MOD_ASSIGNMENT=32, + ARROW=33, DOUBLE_ARROW=34, RANGE=35, COLONCOLON=36, Q_COLONCOLON=37, DOUBLE_SEMICOLON=38, + HASH=39, AT=40, QUEST=41, ELVIS=42, LANGLE=43, RANGLE=44, LE=45, GE=46, + EXCL_EQ=47, EXCL_EQEQ=48, AS_SAFE=49, EQEQ=50, EQEQEQ=51, SINGLE_QUOTE=52, + RETURN_AT=53, CONTINUE_AT=54, BREAK_AT=55, FILE=56, PACKAGE=57, IMPORT=58, + CLASS=59, INTERFACE=60, FUN=61, OBJECT=62, VAL=63, VAR=64, TYPE_ALIAS=65, + CONSTRUCTOR=66, BY=67, COMPANION=68, INIT=69, THIS=70, SUPER=71, TYPEOF=72, + WHERE=73, IF=74, ELSE=75, WHEN=76, TRY=77, CATCH=78, FINALLY=79, FOR=80, + DO=81, WHILE=82, THROW=83, RETURN=84, CONTINUE=85, BREAK=86, AS=87, IS=88, + IN=89, NOT_IS=90, NOT_IN=91, OUT=92, FIELD=93, PROPERTY=94, GET=95, SET=96, + GETTER=97, SETTER=98, RECEIVER=99, PARAM=100, SETPARAM=101, DELEGATE=102, + DYNAMIC=103, PUBLIC=104, PRIVATE=105, PROTECTED=106, INTERNAL=107, ENUM=108, + SEALED=109, ANNOTATION=110, DATA=111, INNER=112, TAILREC=113, OPERATOR=114, + INLINE=115, INFIX=116, EXTERNAL=117, SUSPEND=118, OVERRIDE=119, ABSTRACT=120, + FINAL=121, OPEN=122, CONST=123, LATEINIT=124, VARARG=125, NOINLINE=126, + CROSSINLINE=127, REIFIED=128, QUOTE_OPEN=129, TRIPLE_QUOTE_OPEN=130, RealLiteral=131, + FloatLiteral=132, DoubleLiteral=133, LongLiteral=134, IntegerLiteral=135, + HexLiteral=136, BinLiteral=137, BooleanLiteral=138, NullLiteral=139, Identifier=140, + LabelReference=141, LabelDefinition=142, FieldIdentifier=143, CharacterLiteral=144, + UNICODE_CLASS_LL=145, UNICODE_CLASS_LM=146, UNICODE_CLASS_LO=147, UNICODE_CLASS_LT=148, + UNICODE_CLASS_LU=149, UNICODE_CLASS_ND=150, UNICODE_CLASS_NL=151, Inside_Comment=152, + Inside_WS=153, Inside_NL=154, QUOTE_CLOSE=155, LineStrRef=156, LineStrText=157, + LineStrEscapedChar=158, LineStrExprStart=159, TRIPLE_QUOTE_CLOSE=160, + MultiLineStringQuote=161, MultiLineStrRef=162, MultiLineStrText=163, MultiLineStrEscapedChar=164, + MultiLineStrExprStart=165, MultiLineNL=166, StrExpr_IN=167, StrExpr_Comment=168, + StrExpr_WS=169, StrExpr_NL=170; + public static final int Inside = 1; + public static final int LineString = 2; + public static final int MultiLineString = 3; + public static final int StringExpression = 4; + public static String[] modeNames = { + "DEFAULT_MODE", "Inside", "LineString", "MultiLineString", "StringExpression" + }; + + public static final String[] ruleNames = { + "ShebangLine", "DelimitedComment", "LineComment", "WS", "NL", "RESERVED", + "DOT", "COMMA", "LPAREN", "RPAREN", "LSQUARE", "RSQUARE", "LCURL", "RCURL", + "MULT", "MOD", "DIV", "ADD", "SUB", "INCR", "DECR", "CONJ", "DISJ", "EXCL", + "COLON", "SEMICOLON", "ASSIGNMENT", "ADD_ASSIGNMENT", "SUB_ASSIGNMENT", + "MULT_ASSIGNMENT", "DIV_ASSIGNMENT", "MOD_ASSIGNMENT", "ARROW", "DOUBLE_ARROW", + "RANGE", "COLONCOLON", "Q_COLONCOLON", "DOUBLE_SEMICOLON", "HASH", "AT", + "QUEST", "ELVIS", "LANGLE", "RANGLE", "LE", "GE", "EXCL_EQ", "EXCL_EQEQ", + "AS_SAFE", "EQEQ", "EQEQEQ", "SINGLE_QUOTE", "RETURN_AT", "CONTINUE_AT", + "BREAK_AT", "FILE", "PACKAGE", "IMPORT", "CLASS", "INTERFACE", "FUN", + "OBJECT", "VAL", "VAR", "TYPE_ALIAS", "CONSTRUCTOR", "BY", "COMPANION", + "INIT", "THIS", "SUPER", "TYPEOF", "WHERE", "IF", "ELSE", "WHEN", "TRY", + "CATCH", "FINALLY", "FOR", "DO", "WHILE", "THROW", "RETURN", "CONTINUE", + "BREAK", "AS", "IS", "IN", "NOT_IS", "NOT_IN", "OUT", "FIELD", "PROPERTY", + "GET", "SET", "GETTER", "SETTER", "RECEIVER", "PARAM", "SETPARAM", "DELEGATE", + "DYNAMIC", "PUBLIC", "PRIVATE", "PROTECTED", "INTERNAL", "ENUM", "SEALED", + "ANNOTATION", "DATA", "INNER", "TAILREC", "OPERATOR", "INLINE", "INFIX", + "EXTERNAL", "SUSPEND", "OVERRIDE", "ABSTRACT", "FINAL", "OPEN", "CONST", + "LATEINIT", "VARARG", "NOINLINE", "CROSSINLINE", "REIFIED", "QUOTE_OPEN", + "TRIPLE_QUOTE_OPEN", "RealLiteral", "FloatLiteral", "DoubleLiteral", "LongLiteral", + "IntegerLiteral", "DecDigit", "DecDigitNoZero", "UNICODE_CLASS_ND_NoZeros", + "HexLiteral", "HexDigit", "BinLiteral", "BinDigit", "BooleanLiteral", + "NullLiteral", "Identifier", "LabelReference", "LabelDefinition", "FieldIdentifier", + "CharacterLiteral", "EscapeSeq", "UniCharacterLiteral", "EscapedIdentifier", + "Letter", "UNICODE_CLASS_LL", "UNICODE_CLASS_LM", "UNICODE_CLASS_LO", + "UNICODE_CLASS_LT", "UNICODE_CLASS_LU", "UNICODE_CLASS_ND", "UNICODE_CLASS_NL", + "Inside_RPAREN", "Inside_RSQUARE", "Inside_LPAREN", "Inside_LSQUARE", + "Inside_LCURL", "Inside_RCURL", "Inside_DOT", "Inside_COMMA", "Inside_MULT", + "Inside_MOD", "Inside_DIV", "Inside_ADD", "Inside_SUB", "Inside_INCR", + "Inside_DECR", "Inside_CONJ", "Inside_DISJ", "Inside_EXCL", "Inside_COLON", + "Inside_SEMICOLON", "Inside_ASSIGNMENT", "Inside_ADD_ASSIGNMENT", "Inside_SUB_ASSIGNMENT", + "Inside_MULT_ASSIGNMENT", "Inside_DIV_ASSIGNMENT", "Inside_MOD_ASSIGNMENT", + "Inside_ARROW", "Inside_DOUBLE_ARROW", "Inside_RANGE", "Inside_RESERVED", + "Inside_COLONCOLON", "Inside_Q_COLONCOLON", "Inside_DOUBLE_SEMICOLON", + "Inside_HASH", "Inside_AT", "Inside_QUEST", "Inside_ELVIS", "Inside_LANGLE", + "Inside_RANGLE", "Inside_LE", "Inside_GE", "Inside_EXCL_EQ", "Inside_EXCL_EQEQ", + "Inside_NOT_IS", "Inside_NOT_IN", "Inside_AS_SAFE", "Inside_EQEQ", "Inside_EQEQEQ", + "Inside_SINGLE_QUOTE", "Inside_QUOTE_OPEN", "Inside_TRIPLE_QUOTE_OPEN", + "Inside_VAL", "Inside_VAR", "Inside_OBJECT", "Inside_SUPER", "Inside_IN", + "Inside_OUT", "Inside_FIELD", "Inside_FILE", "Inside_PROPERTY", "Inside_GET", + "Inside_SET", "Inside_RECEIVER", "Inside_PARAM", "Inside_SETPARAM", "Inside_DELEGATE", + "Inside_THROW", "Inside_RETURN", "Inside_CONTINUE", "Inside_BREAK", "Inside_RETURN_AT", + "Inside_CONTINUE_AT", "Inside_BREAK_AT", "Inside_IF", "Inside_ELSE", "Inside_WHEN", + "Inside_TRY", "Inside_CATCH", "Inside_FINALLY", "Inside_FOR", "Inside_DO", + "Inside_WHILE", "Inside_PUBLIC", "Inside_PRIVATE", "Inside_PROTECTED", + "Inside_INTERNAL", "Inside_ENUM", "Inside_SEALED", "Inside_ANNOTATION", + "Inside_DATA", "Inside_INNER", "Inside_TAILREC", "Inside_OPERATOR", "Inside_INLINE", + "Inside_INFIX", "Inside_EXTERNAL", "Inside_SUSPEND", "Inside_OVERRIDE", + "Inside_ABSTRACT", "Inside_FINAL", "Inside_OPEN", "Inside_CONST", "Inside_LATEINIT", + "Inside_VARARG", "Inside_NOINLINE", "Inside_CROSSINLINE", "Inside_REIFIED", + "Inside_BooleanLiteral", "Inside_IntegerLiteral", "Inside_HexLiteral", + "Inside_BinLiteral", "Inside_CharacterLiteral", "Inside_RealLiteral", + "Inside_NullLiteral", "Inside_LongLiteral", "Inside_Identifier", "Inside_LabelReference", + "Inside_LabelDefinition", "Inside_Comment", "Inside_WS", "Inside_NL", + "QUOTE_CLOSE", "LineStrRef", "LineStrText", "LineStrEscapedChar", "LineStrExprStart", + "TRIPLE_QUOTE_CLOSE", "MultiLineStringQuote", "MultiLineStrRef", "MultiLineStrText", + "MultiLineStrEscapedChar", "MultiLineStrExprStart", "MultiLineNL", "StrExpr_RCURL", + "StrExpr_LPAREN", "StrExpr_LSQUARE", "StrExpr_RPAREN", "StrExpr_RSQUARE", + "StrExpr_LCURL", "StrExpr_DOT", "StrExpr_COMMA", "StrExpr_MULT", "StrExpr_MOD", + "StrExpr_DIV", "StrExpr_ADD", "StrExpr_SUB", "StrExpr_INCR", "StrExpr_DECR", + "StrExpr_CONJ", "StrExpr_DISJ", "StrExpr_EXCL", "StrExpr_COLON", "StrExpr_SEMICOLON", + "StrExpr_ASSIGNMENT", "StrExpr_ADD_ASSIGNMENT", "StrExpr_SUB_ASSIGNMENT", + "StrExpr_MULT_ASSIGNMENT", "StrExpr_DIV_ASSIGNMENT", "StrExpr_MOD_ASSIGNMENT", + "StrExpr_ARROW", "StrExpr_DOUBLE_ARROW", "StrExpr_RANGE", "StrExpr_COLONCOLON", + "StrExpr_Q_COLONCOLON", "StrExpr_DOUBLE_SEMICOLON", "StrExpr_HASH", "StrExpr_AT", + "StrExpr_QUEST", "StrExpr_ELVIS", "StrExpr_LANGLE", "StrExpr_RANGLE", + "StrExpr_LE", "StrExpr_GE", "StrExpr_EXCL_EQ", "StrExpr_EXCL_EQEQ", "StrExpr_AS", + "StrExpr_IS", "StrExpr_IN", "StrExpr_NOT_IS", "StrExpr_NOT_IN", "StrExpr_AS_SAFE", + "StrExpr_EQEQ", "StrExpr_EQEQEQ", "StrExpr_SINGLE_QUOTE", "StrExpr_QUOTE_OPEN", + "StrExpr_TRIPLE_QUOTE_OPEN", "StrExpr_BooleanLiteral", "StrExpr_IntegerLiteral", + "StrExpr_HexLiteral", "StrExpr_BinLiteral", "StrExpr_CharacterLiteral", + "StrExpr_RealLiteral", "StrExpr_NullLiteral", "StrExpr_LongLiteral", "StrExpr_Identifier", + "StrExpr_LabelReference", "StrExpr_LabelDefinition", "StrExpr_Comment", + "StrExpr_WS", "StrExpr_NL" + }; + + private static final String[] _LITERAL_NAMES = { + null, null, null, null, null, null, "'...'", "'.'", "','", "'('", null, + "'['", null, "'{'", "'}'", "'*'", "'%'", "'/'", "'+'", "'-'", "'++'", + "'--'", "'&&'", "'||'", "'!'", "':'", "';'", "'='", "'+='", "'-='", "'*='", + "'/='", "'%='", "'->'", "'=>'", "'..'", "'::'", "'?::'", "';;'", "'#'", + "'@'", "'?'", "'?:'", "'<'", "'>'", "'<='", "'>='", "'!='", "'!=='", "'as?'", + "'=='", "'==='", "'''", null, null, null, "'@file'", "'package'", "'import'", + "'class'", "'interface'", "'fun'", "'object'", "'val'", "'var'", "'typealias'", + "'constructor'", "'by'", "'companion'", "'init'", "'this'", "'super'", + "'typeof'", "'where'", "'if'", "'else'", "'when'", "'try'", "'catch'", + "'finally'", "'for'", "'do'", "'while'", "'throw'", "'return'", "'continue'", + "'break'", "'as'", "'is'", "'in'", null, null, "'out'", "'@field'", "'@property'", + "'@get'", "'@set'", "'get'", "'set'", "'@receiver'", "'@param'", "'@setparam'", + "'@delegate'", "'dynamic'", "'public'", "'private'", "'protected'", "'internal'", + "'enum'", "'sealed'", "'annotation'", "'data'", "'inner'", "'tailrec'", + "'operator'", "'inline'", "'infix'", "'external'", "'suspend'", "'override'", + "'abstract'", "'final'", "'open'", "'const'", "'lateinit'", "'vararg'", + "'noinline'", "'crossinline'", "'reified'", null, "'\"\"\"'", null, null, + null, null, null, null, null, null, "'null'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, "ShebangLine", "DelimitedComment", "LineComment", "WS", "NL", "RESERVED", + "DOT", "COMMA", "LPAREN", "RPAREN", "LSQUARE", "RSQUARE", "LCURL", "RCURL", + "MULT", "MOD", "DIV", "ADD", "SUB", "INCR", "DECR", "CONJ", "DISJ", "EXCL", + "COLON", "SEMICOLON", "ASSIGNMENT", "ADD_ASSIGNMENT", "SUB_ASSIGNMENT", + "MULT_ASSIGNMENT", "DIV_ASSIGNMENT", "MOD_ASSIGNMENT", "ARROW", "DOUBLE_ARROW", + "RANGE", "COLONCOLON", "Q_COLONCOLON", "DOUBLE_SEMICOLON", "HASH", "AT", + "QUEST", "ELVIS", "LANGLE", "RANGLE", "LE", "GE", "EXCL_EQ", "EXCL_EQEQ", + "AS_SAFE", "EQEQ", "EQEQEQ", "SINGLE_QUOTE", "RETURN_AT", "CONTINUE_AT", + "BREAK_AT", "FILE", "PACKAGE", "IMPORT", "CLASS", "INTERFACE", "FUN", + "OBJECT", "VAL", "VAR", "TYPE_ALIAS", "CONSTRUCTOR", "BY", "COMPANION", + "INIT", "THIS", "SUPER", "TYPEOF", "WHERE", "IF", "ELSE", "WHEN", "TRY", + "CATCH", "FINALLY", "FOR", "DO", "WHILE", "THROW", "RETURN", "CONTINUE", + "BREAK", "AS", "IS", "IN", "NOT_IS", "NOT_IN", "OUT", "FIELD", "PROPERTY", + "GET", "SET", "GETTER", "SETTER", "RECEIVER", "PARAM", "SETPARAM", "DELEGATE", + "DYNAMIC", "PUBLIC", "PRIVATE", "PROTECTED", "INTERNAL", "ENUM", "SEALED", + "ANNOTATION", "DATA", "INNER", "TAILREC", "OPERATOR", "INLINE", "INFIX", + "EXTERNAL", "SUSPEND", "OVERRIDE", "ABSTRACT", "FINAL", "OPEN", "CONST", + "LATEINIT", "VARARG", "NOINLINE", "CROSSINLINE", "REIFIED", "QUOTE_OPEN", + "TRIPLE_QUOTE_OPEN", "RealLiteral", "FloatLiteral", "DoubleLiteral", "LongLiteral", + "IntegerLiteral", "HexLiteral", "BinLiteral", "BooleanLiteral", "NullLiteral", + "Identifier", "LabelReference", "LabelDefinition", "FieldIdentifier", + "CharacterLiteral", "UNICODE_CLASS_LL", "UNICODE_CLASS_LM", "UNICODE_CLASS_LO", + "UNICODE_CLASS_LT", "UNICODE_CLASS_LU", "UNICODE_CLASS_ND", "UNICODE_CLASS_NL", + "Inside_Comment", "Inside_WS", "Inside_NL", "QUOTE_CLOSE", "LineStrRef", + "LineStrText", "LineStrEscapedChar", "LineStrExprStart", "TRIPLE_QUOTE_CLOSE", + "MultiLineStringQuote", "MultiLineStrRef", "MultiLineStrText", "MultiLineStrEscapedChar", + "MultiLineStrExprStart", "MultiLineNL", "StrExpr_IN", "StrExpr_Comment", + "StrExpr_WS", "StrExpr_NL" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + + public KotlinLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "KotlinLexer.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + private static final int _serializedATNSegments = 2; + private static final String _serializedATNSegment0 = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\u00ac\u0a30\b\1\b"+ + "\1\b\1\b\1\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b"+ + "\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t"+ + "\20\4\21\t\21\4\22\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t"+ + "\27\4\30\t\30\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t"+ + "\36\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t"+ + "(\4)\t)\4*\t*\4+\t+\4,\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t"+ + "\62\4\63\t\63\4\64\t\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t"+ + ":\4;\t;\4<\t<\4=\t=\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4"+ + "F\tF\4G\tG\4H\tH\4I\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\t"+ + "Q\4R\tR\4S\tS\4T\tT\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\"+ + "\4]\t]\4^\t^\4_\t_\4`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h"+ + "\th\4i\ti\4j\tj\4k\tk\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts"+ + "\4t\tt\4u\tu\4v\tv\4w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177"+ + "\t\177\4\u0080\t\u0080\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083"+ + "\4\u0084\t\u0084\4\u0085\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087\4\u0088"+ + "\t\u0088\4\u0089\t\u0089\4\u008a\t\u008a\4\u008b\t\u008b\4\u008c\t\u008c"+ + "\4\u008d\t\u008d\4\u008e\t\u008e\4\u008f\t\u008f\4\u0090\t\u0090\4\u0091"+ + "\t\u0091\4\u0092\t\u0092\4\u0093\t\u0093\4\u0094\t\u0094\4\u0095\t\u0095"+ + "\4\u0096\t\u0096\4\u0097\t\u0097\4\u0098\t\u0098\4\u0099\t\u0099\4\u009a"+ + "\t\u009a\4\u009b\t\u009b\4\u009c\t\u009c\4\u009d\t\u009d\4\u009e\t\u009e"+ + "\4\u009f\t\u009f\4\u00a0\t\u00a0\4\u00a1\t\u00a1\4\u00a2\t\u00a2\4\u00a3"+ + "\t\u00a3\4\u00a4\t\u00a4\4\u00a5\t\u00a5\4\u00a6\t\u00a6\4\u00a7\t\u00a7"+ + "\4\u00a8\t\u00a8\4\u00a9\t\u00a9\4\u00aa\t\u00aa\4\u00ab\t\u00ab\4\u00ac"+ + "\t\u00ac\4\u00ad\t\u00ad\4\u00ae\t\u00ae\4\u00af\t\u00af\4\u00b0\t\u00b0"+ + "\4\u00b1\t\u00b1\4\u00b2\t\u00b2\4\u00b3\t\u00b3\4\u00b4\t\u00b4\4\u00b5"+ + "\t\u00b5\4\u00b6\t\u00b6\4\u00b7\t\u00b7\4\u00b8\t\u00b8\4\u00b9\t\u00b9"+ + "\4\u00ba\t\u00ba\4\u00bb\t\u00bb\4\u00bc\t\u00bc\4\u00bd\t\u00bd\4\u00be"+ + "\t\u00be\4\u00bf\t\u00bf\4\u00c0\t\u00c0\4\u00c1\t\u00c1\4\u00c2\t\u00c2"+ + "\4\u00c3\t\u00c3\4\u00c4\t\u00c4\4\u00c5\t\u00c5\4\u00c6\t\u00c6\4\u00c7"+ + "\t\u00c7\4\u00c8\t\u00c8\4\u00c9\t\u00c9\4\u00ca\t\u00ca\4\u00cb\t\u00cb"+ + "\4\u00cc\t\u00cc\4\u00cd\t\u00cd\4\u00ce\t\u00ce\4\u00cf\t\u00cf\4\u00d0"+ + "\t\u00d0\4\u00d1\t\u00d1\4\u00d2\t\u00d2\4\u00d3\t\u00d3\4\u00d4\t\u00d4"+ + "\4\u00d5\t\u00d5\4\u00d6\t\u00d6\4\u00d7\t\u00d7\4\u00d8\t\u00d8\4\u00d9"+ + "\t\u00d9\4\u00da\t\u00da\4\u00db\t\u00db\4\u00dc\t\u00dc\4\u00dd\t\u00dd"+ + "\4\u00de\t\u00de\4\u00df\t\u00df\4\u00e0\t\u00e0\4\u00e1\t\u00e1\4\u00e2"+ + "\t\u00e2\4\u00e3\t\u00e3\4\u00e4\t\u00e4\4\u00e5\t\u00e5\4\u00e6\t\u00e6"+ + "\4\u00e7\t\u00e7\4\u00e8\t\u00e8\4\u00e9\t\u00e9\4\u00ea\t\u00ea\4\u00eb"+ + "\t\u00eb\4\u00ec\t\u00ec\4\u00ed\t\u00ed\4\u00ee\t\u00ee\4\u00ef\t\u00ef"+ + "\4\u00f0\t\u00f0\4\u00f1\t\u00f1\4\u00f2\t\u00f2\4\u00f3\t\u00f3\4\u00f4"+ + "\t\u00f4\4\u00f5\t\u00f5\4\u00f6\t\u00f6\4\u00f7\t\u00f7\4\u00f8\t\u00f8"+ + "\4\u00f9\t\u00f9\4\u00fa\t\u00fa\4\u00fb\t\u00fb\4\u00fc\t\u00fc\4\u00fd"+ + "\t\u00fd\4\u00fe\t\u00fe\4\u00ff\t\u00ff\4\u0100\t\u0100\4\u0101\t\u0101"+ + "\4\u0102\t\u0102\4\u0103\t\u0103\4\u0104\t\u0104\4\u0105\t\u0105\4\u0106"+ + "\t\u0106\4\u0107\t\u0107\4\u0108\t\u0108\4\u0109\t\u0109\4\u010a\t\u010a"+ + "\4\u010b\t\u010b\4\u010c\t\u010c\4\u010d\t\u010d\4\u010e\t\u010e\4\u010f"+ + "\t\u010f\4\u0110\t\u0110\4\u0111\t\u0111\4\u0112\t\u0112\4\u0113\t\u0113"+ + "\4\u0114\t\u0114\4\u0115\t\u0115\4\u0116\t\u0116\4\u0117\t\u0117\4\u0118"+ + "\t\u0118\4\u0119\t\u0119\4\u011a\t\u011a\4\u011b\t\u011b\4\u011c\t\u011c"+ + "\4\u011d\t\u011d\4\u011e\t\u011e\4\u011f\t\u011f\4\u0120\t\u0120\4\u0121"+ + "\t\u0121\4\u0122\t\u0122\4\u0123\t\u0123\4\u0124\t\u0124\4\u0125\t\u0125"+ + "\4\u0126\t\u0126\4\u0127\t\u0127\4\u0128\t\u0128\4\u0129\t\u0129\4\u012a"+ + "\t\u012a\4\u012b\t\u012b\4\u012c\t\u012c\4\u012d\t\u012d\4\u012e\t\u012e"+ + "\4\u012f\t\u012f\4\u0130\t\u0130\4\u0131\t\u0131\4\u0132\t\u0132\4\u0133"+ + "\t\u0133\4\u0134\t\u0134\4\u0135\t\u0135\4\u0136\t\u0136\4\u0137\t\u0137"+ + "\4\u0138\t\u0138\4\u0139\t\u0139\4\u013a\t\u013a\4\u013b\t\u013b\4\u013c"+ + "\t\u013c\4\u013d\t\u013d\4\u013e\t\u013e\4\u013f\t\u013f\4\u0140\t\u0140"+ + "\4\u0141\t\u0141\4\u0142\t\u0142\4\u0143\t\u0143\4\u0144\t\u0144\4\u0145"+ + "\t\u0145\4\u0146\t\u0146\4\u0147\t\u0147\4\u0148\t\u0148\4\u0149\t\u0149"+ + "\4\u014a\t\u014a\4\u014b\t\u014b\4\u014c\t\u014c\4\u014d\t\u014d\4\u014e"+ + "\t\u014e\4\u014f\t\u014f\4\u0150\t\u0150\4\u0151\t\u0151\4\u0152\t\u0152"+ + "\4\u0153\t\u0153\4\u0154\t\u0154\4\u0155\t\u0155\4\u0156\t\u0156\4\u0157"+ + "\t\u0157\4\u0158\t\u0158\4\u0159\t\u0159\4\u015a\t\u015a\4\u015b\t\u015b"+ + "\4\u015c\t\u015c\4\u015d\t\u015d\4\u015e\t\u015e\4\u015f\t\u015f\4\u0160"+ + "\t\u0160\4\u0161\t\u0161\4\u0162\t\u0162\4\u0163\t\u0163\4\u0164\t\u0164"+ + "\4\u0165\t\u0165\4\u0166\t\u0166\4\u0167\t\u0167\4\u0168\t\u0168\4\u0169"+ + "\t\u0169\3\2\3\2\3\2\3\2\7\2\u02dc\n\2\f\2\16\2\u02df\13\2\3\2\3\2\3\3"+ + "\3\3\3\3\3\3\3\3\7\3\u02e8\n\3\f\3\16\3\u02eb\13\3\3\3\3\3\3\3\3\3\3\3"+ + "\3\4\3\4\3\4\3\4\7\4\u02f6\n\4\f\4\16\4\u02f9\13\4\3\4\3\4\3\5\3\5\3\5"+ + "\3\5\3\6\3\6\3\6\5\6\u0304\n\6\3\7\3\7\3\7\3\7\3\b\3\b\3\t\3\t\3\n\3\n"+ + "\3\n\3\n\3\13\3\13\3\f\3\f\3\f\3\f\3\r\3\r\3\16\3\16\3\17\3\17\3\20\3"+ + "\20\3\21\3\21\3\22\3\22\3\23\3\23\3\24\3\24\3\25\3\25\3\25\3\26\3\26\3"+ + "\26\3\27\3\27\3\27\3\30\3\30\3\30\3\31\3\31\3\32\3\32\3\33\3\33\3\34\3"+ + "\34\3\35\3\35\3\35\3\36\3\36\3\36\3\37\3\37\3\37\3 \3 \3 \3!\3!\3!\3\""+ + "\3\"\3\"\3#\3#\3#\3$\3$\3$\3%\3%\3%\3&\3&\3&\3&\3\'\3\'\3\'\3(\3(\3)\3"+ + ")\3*\3*\3+\3+\3+\3,\3,\3-\3-\3.\3.\3.\3/\3/\3/\3\60\3\60\3\60\3\61\3\61"+ + "\3\61\3\61\3\62\3\62\3\62\3\62\3\63\3\63\3\63\3\64\3\64\3\64\3\64\3\65"+ + "\3\65\3\66\3\66\3\66\3\66\3\66\3\66\3\66\3\66\3\66\3\66\3\67\3\67\3\67"+ + "\3\67\3\67\3\67\3\67\3\67\3\67\3\67\3\67\3\67\38\38\38\38\38\38\38\38"+ + "\38\39\39\39\39\39\39\3:\3:\3:\3:\3:\3:\3:\3:\3;\3;\3;\3;\3;\3;\3;\3<"+ + "\3<\3<\3<\3<\3<\3=\3=\3=\3=\3=\3=\3=\3=\3=\3=\3>\3>\3>\3>\3?\3?\3?\3?"+ + "\3?\3?\3?\3@\3@\3@\3@\3A\3A\3A\3A\3B\3B\3B\3B\3B\3B\3B\3B\3B\3B\3C\3C"+ + "\3C\3C\3C\3C\3C\3C\3C\3C\3C\3C\3D\3D\3D\3E\3E\3E\3E\3E\3E\3E\3E\3E\3E"+ + "\3F\3F\3F\3F\3F\3G\3G\3G\3G\3G\3H\3H\3H\3H\3H\3H\3I\3I\3I\3I\3I\3I\3I"+ + "\3J\3J\3J\3J\3J\3J\3K\3K\3K\3L\3L\3L\3L\3L\3M\3M\3M\3M\3M\3N\3N\3N\3N"+ + "\3O\3O\3O\3O\3O\3O\3P\3P\3P\3P\3P\3P\3P\3P\3Q\3Q\3Q\3Q\3R\3R\3R\3S\3S"+ + "\3S\3S\3S\3S\3T\3T\3T\3T\3T\3T\3U\3U\3U\3U\3U\3U\3U\3V\3V\3V\3V\3V\3V"+ + "\3V\3V\3V\3W\3W\3W\3W\3W\3W\3X\3X\3X\3Y\3Y\3Y\3Z\3Z\3Z\3[\3[\3[\3[\3["+ + "\3[\6[\u0473\n[\r[\16[\u0474\3\\\3\\\3\\\3\\\3\\\3\\\6\\\u047d\n\\\r\\"+ + "\16\\\u047e\3]\3]\3]\3]\3^\3^\3^\3^\3^\3^\3^\3_\3_\3_\3_\3_\3_\3_\3_\3"+ + "_\3_\3`\3`\3`\3`\3`\3a\3a\3a\3a\3a\3b\3b\3b\3b\3c\3c\3c\3c\3d\3d\3d\3"+ + "d\3d\3d\3d\3d\3d\3d\3e\3e\3e\3e\3e\3e\3e\3f\3f\3f\3f\3f\3f\3f\3f\3f\3"+ + "f\3g\3g\3g\3g\3g\3g\3g\3g\3g\3g\3h\3h\3h\3h\3h\3h\3h\3h\3i\3i\3i\3i\3"+ + "i\3i\3i\3j\3j\3j\3j\3j\3j\3j\3j\3k\3k\3k\3k\3k\3k\3k\3k\3k\3k\3l\3l\3"+ + "l\3l\3l\3l\3l\3l\3l\3m\3m\3m\3m\3m\3n\3n\3n\3n\3n\3n\3n\3o\3o\3o\3o\3"+ + "o\3o\3o\3o\3o\3o\3o\3p\3p\3p\3p\3p\3q\3q\3q\3q\3q\3q\3r\3r\3r\3r\3r\3"+ + "r\3r\3r\3s\3s\3s\3s\3s\3s\3s\3s\3s\3t\3t\3t\3t\3t\3t\3t\3u\3u\3u\3u\3"+ + "u\3u\3v\3v\3v\3v\3v\3v\3v\3v\3v\3w\3w\3w\3w\3w\3w\3w\3w\3x\3x\3x\3x\3"+ + "x\3x\3x\3x\3x\3y\3y\3y\3y\3y\3y\3y\3y\3y\3z\3z\3z\3z\3z\3z\3{\3{\3{\3"+ + "{\3{\3|\3|\3|\3|\3|\3|\3}\3}\3}\3}\3}\3}\3}\3}\3}\3~\3~\3~\3~\3~\3~\3"+ + "~\3\177\3\177\3\177\3\177\3\177\3\177\3\177\3\177\3\177\3\u0080\3\u0080"+ + "\3\u0080\3\u0080\3\u0080\3\u0080\3\u0080\3\u0080\3\u0080\3\u0080\3\u0080"+ + "\3\u0080\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0082\3\u0082\3\u0082\3\u0082\3\u0083\3\u0083\3\u0083\3\u0083\3\u0083"+ + "\3\u0083\3\u0084\3\u0084\5\u0084\u05a4\n\u0084\3\u0085\3\u0085\5\u0085"+ + "\u05a8\n\u0085\3\u0085\3\u0085\3\u0086\3\u0086\7\u0086\u05ae\n\u0086\f"+ + "\u0086\16\u0086\u05b1\13\u0086\3\u0086\5\u0086\u05b4\n\u0086\3\u0086\3"+ + "\u0086\3\u0086\3\u0086\7\u0086\u05ba\n\u0086\f\u0086\16\u0086\u05bd\13"+ + "\u0086\3\u0086\3\u0086\5\u0086\u05c1\n\u0086\3\u0086\5\u0086\u05c4\n\u0086"+ + "\3\u0086\6\u0086\u05c7\n\u0086\r\u0086\16\u0086\u05c8\3\u0086\3\u0086"+ + "\3\u0086\6\u0086\u05ce\n\u0086\r\u0086\16\u0086\u05cf\3\u0086\3\u0086"+ + "\3\u0086\6\u0086\u05d5\n\u0086\r\u0086\16\u0086\u05d6\3\u0086\3\u0086"+ + "\5\u0086\u05db\n\u0086\3\u0086\6\u0086\u05de\n\u0086\r\u0086\16\u0086"+ + "\u05df\3\u0086\6\u0086\u05e3\n\u0086\r\u0086\16\u0086\u05e4\3\u0086\3"+ + "\u0086\5\u0086\u05e9\n\u0086\3\u0086\3\u0086\3\u0086\6\u0086\u05ee\n\u0086"+ + "\r\u0086\16\u0086\u05ef\3\u0086\3\u0086\3\u0086\3\u0086\3\u0086\6\u0086"+ + "\u05f7\n\u0086\r\u0086\16\u0086\u05f8\3\u0086\3\u0086\3\u0086\5\u0086"+ + "\u05fe\n\u0086\3\u0086\6\u0086\u0601\n\u0086\r\u0086\16\u0086\u0602\3"+ + "\u0086\3\u0086\3\u0086\6\u0086\u0608\n\u0086\r\u0086\16\u0086\u0609\3"+ + "\u0086\3\u0086\3\u0086\5\u0086\u060f\n\u0086\3\u0086\3\u0086\3\u0086\6"+ + "\u0086\u0614\n\u0086\r\u0086\16\u0086\u0615\3\u0086\3\u0086\5\u0086\u061a"+ + "\n\u0086\3\u0087\3\u0087\3\u0087\5\u0087\u061f\n\u0087\3\u0087\3\u0087"+ + "\3\u0088\3\u0088\3\u0088\7\u0088\u0626\n\u0088\f\u0088\16\u0088\u0629"+ + "\13\u0088\3\u0088\3\u0088\3\u0088\6\u0088\u062e\n\u0088\r\u0088\16\u0088"+ + "\u062f\3\u0088\3\u0088\3\u0088\3\u0088\7\u0088\u0636\n\u0088\f\u0088\16"+ + "\u0088\u0639\13\u0088\3\u0088\3\u0088\5\u0088\u063d\n\u0088\3\u0088\6"+ + "\u0088\u0640\n\u0088\r\u0088\16\u0088\u0641\3\u0088\3\u0088\7\u0088\u0646"+ + "\n\u0088\f\u0088\16\u0088\u0649\13\u0088\3\u0088\3\u0088\5\u0088\u064d"+ + "\n\u0088\3\u0088\3\u0088\3\u0088\6\u0088\u0652\n\u0088\r\u0088\16\u0088"+ + "\u0653\3\u0088\3\u0088\3\u0088\3\u0088\3\u0088\6\u0088\u065b\n\u0088\r"+ + "\u0088\16\u0088\u065c\3\u0088\3\u0088\3\u0088\5\u0088\u0662\n\u0088\3"+ + "\u0088\6\u0088\u0665\n\u0088\r\u0088\16\u0088\u0666\3\u0088\3\u0088\3"+ + "\u0088\6\u0088\u066c\n\u0088\r\u0088\16\u0088\u066d\3\u0088\3\u0088\3"+ + "\u0088\5\u0088\u0673\n\u0088\3\u0088\3\u0088\3\u0088\6\u0088\u0678\n\u0088"+ + "\r\u0088\16\u0088\u0679\3\u0088\3\u0088\5\u0088\u067e\n\u0088\3\u0089"+ + "\3\u0089\3\u008a\3\u008a\3\u008b\3\u008b\3\u008c\3\u008c\3\u008c\3\u008c"+ + "\3\u008c\7\u008c\u068b\n\u008c\f\u008c\16\u008c\u068e\13\u008c\3\u008d"+ + "\3\u008d\3\u008e\3\u008e\3\u008e\3\u008e\3\u008e\7\u008e\u0697\n\u008e"+ + "\f\u008e\16\u008e\u069a\13\u008e\3\u008f\3\u008f\3\u0090\3\u0090\3\u0090"+ + "\3\u0090\3\u0090\3\u0090\3\u0090\3\u0090\3\u0090\5\u0090\u06a7\n\u0090"+ + "\3\u0091\3\u0091\3\u0091\3\u0091\3\u0091\3\u0092\3\u0092\5\u0092\u06b0"+ + "\n\u0092\3\u0092\3\u0092\3\u0092\7\u0092\u06b5\n\u0092\f\u0092\16\u0092"+ + "\u06b8\13\u0092\3\u0092\3\u0092\6\u0092\u06bc\n\u0092\r\u0092\16\u0092"+ + "\u06bd\3\u0092\5\u0092\u06c1\n\u0092\3\u0093\3\u0093\3\u0093\3\u0094\3"+ + "\u0094\3\u0094\3\u0095\3\u0095\3\u0095\3\u0096\3\u0096\3\u0096\5\u0096"+ + "\u06cf\n\u0096\3\u0096\3\u0096\3\u0097\3\u0097\5\u0097\u06d5\n\u0097\3"+ + "\u0098\3\u0098\3\u0098\3\u0098\3\u0098\3\u0098\3\u0098\3\u0099\3\u0099"+ + "\3\u0099\3\u009a\3\u009a\3\u009a\3\u009a\3\u009a\3\u009a\5\u009a\u06e7"+ + "\n\u009a\3\u009b\3\u009b\3\u009c\3\u009c\3\u009d\3\u009d\3\u009e\3\u009e"+ + "\3\u009f\3\u009f\3\u00a0\3\u00a0\3\u00a1\3\u00a1\3\u00a2\3\u00a2\3\u00a2"+ + "\3\u00a2\3\u00a2\3\u00a3\3\u00a3\3\u00a3\3\u00a3\3\u00a3\3\u00a4\3\u00a4"+ + "\3\u00a4\3\u00a4\3\u00a4\3\u00a5\3\u00a5\3\u00a5\3\u00a5\3\u00a5\3\u00a6"+ + "\3\u00a6\3\u00a6\3\u00a6\3\u00a7\3\u00a7\3\u00a7\3\u00a7\3\u00a8\3\u00a8"+ + "\3\u00a8\3\u00a8\3\u00a9\3\u00a9\3\u00a9\3\u00a9\3\u00aa\3\u00aa\3\u00aa"+ + "\3\u00aa\3\u00ab\3\u00ab\3\u00ab\3\u00ab\3\u00ac\3\u00ac\3\u00ac\3\u00ac"+ + "\3\u00ad\3\u00ad\3\u00ad\3\u00ad\3\u00ae\3\u00ae\3\u00ae\3\u00ae\3\u00af"+ + "\3\u00af\3\u00af\3\u00af\3\u00b0\3\u00b0\3\u00b0\3\u00b0\3\u00b1\3\u00b1"+ + "\3\u00b1\3\u00b1\3\u00b2\3\u00b2\3\u00b2\3\u00b2\3\u00b3\3\u00b3\3\u00b3"+ + "\3\u00b3\3\u00b4\3\u00b4\3\u00b4\3\u00b4\3\u00b5\3\u00b5\3\u00b5\3\u00b5"+ + "\3\u00b6\3\u00b6\3\u00b6\3\u00b6\3\u00b7\3\u00b7\3\u00b7\3\u00b7\3\u00b8"+ + "\3\u00b8\3\u00b8\3\u00b8\3\u00b9\3\u00b9\3\u00b9\3\u00b9\3\u00ba\3\u00ba"+ + "\3\u00ba\3\u00ba\3\u00bb\3\u00bb\3\u00bb\3\u00bb\3\u00bc\3\u00bc\3\u00bc"+ + "\3\u00bc\3\u00bd\3\u00bd\3\u00bd\3\u00bd\3\u00be\3\u00be\3\u00be\3\u00be"+ + "\3\u00bf\3\u00bf\3\u00bf\3\u00bf\3\u00c0\3\u00c0\3\u00c0\3\u00c0\3\u00c1"+ + "\3\u00c1\3\u00c1\3\u00c1\3\u00c2\3\u00c2\3\u00c2\3\u00c2\3\u00c3\3\u00c3"+ + "\3\u00c3\3\u00c3\3\u00c4\3\u00c4\3\u00c4\3\u00c4\3\u00c5\3\u00c5\3\u00c5"+ + "\3\u00c5\3\u00c6\3\u00c6\3\u00c6\3\u00c6\3\u00c7\3\u00c7\3\u00c7\3\u00c7"+ + "\3\u00c8\3\u00c8\3\u00c8\3\u00c8\3\u00c9\3\u00c9\3\u00c9\3\u00c9\3\u00ca"+ + "\3\u00ca\3\u00ca\3\u00ca\3\u00cb\3\u00cb\3\u00cb\3\u00cb\3\u00cc\3\u00cc"+ + "\3\u00cc\3\u00cc\3\u00cd\3\u00cd\3\u00cd\3\u00cd\3\u00ce\3\u00ce\3\u00ce"+ + "\3\u00ce\3\u00cf\3\u00cf\3\u00cf\3\u00cf\3\u00d0\3\u00d0\3\u00d0\3\u00d0"+ + "\3\u00d1\3\u00d1\3\u00d1\3\u00d1\3\u00d2\3\u00d2\3\u00d2\3\u00d2\3\u00d3"+ + "\3\u00d3\3\u00d3\3\u00d3\3\u00d3\3\u00d4\3\u00d4\3\u00d4\3\u00d4\3\u00d4"+ + "\3\u00d5\3\u00d5\3\u00d5\3\u00d5\3\u00d6\3\u00d6\3\u00d6\3\u00d6\3\u00d7"+ + "\3\u00d7\3\u00d7\3\u00d7\3\u00d8\3\u00d8\3\u00d8\3\u00d8\3\u00d9\3\u00d9"+ + "\3\u00d9\3\u00d9\3\u00da\3\u00da\3\u00da\3\u00da\3\u00db\3\u00db\3\u00db"+ + "\3\u00db\3\u00dc\3\u00dc\3\u00dc\3\u00dc\3\u00dd\3\u00dd\3\u00dd\3\u00dd"+ + "\3\u00de\3\u00de\3\u00de\3\u00de\3\u00df\3\u00df\3\u00df\3\u00df\3\u00e0"+ + "\3\u00e0\3\u00e0\3\u00e0\3\u00e1\3\u00e1\3\u00e1\3\u00e1\3\u00e2\3\u00e2"+ + "\3\u00e2\3\u00e2\3\u00e3\3\u00e3\3\u00e3\3\u00e3\3\u00e4\3\u00e4\3\u00e4"+ + "\3\u00e4\3\u00e5\3\u00e5\3\u00e5\3\u00e5\3\u00e6\3\u00e6\3\u00e6\3\u00e6"+ + "\3\u00e7\3\u00e7\3\u00e7\3\u00e7\3\u00e8\3\u00e8\3\u00e8\3\u00e8\3\u00e9"+ + "\3\u00e9\3\u00e9\3\u00e9\3\u00ea\3\u00ea\3\u00ea\3\u00ea\3\u00eb\3\u00eb"+ + "\3\u00eb\3\u00eb\3\u00ec\3\u00ec\3\u00ec\3\u00ec\3\u00ed\3\u00ed\3\u00ed"+ + "\3\u00ed\3\u00ee\3\u00ee\3\u00ee\3\u00ee\3\u00ef\3\u00ef\3\u00ef\3\u00ef"+ + "\3\u00f0\3\u00f0\3\u00f0\3\u00f0\3\u00f1\3\u00f1\3\u00f1\3\u00f1\3\u00f2"+ + "\3\u00f2\3\u00f2\3\u00f2\3\u00f3\3\u00f3\3\u00f3\3\u00f3\3\u00f4\3\u00f4"+ + "\3\u00f4\3\u00f4\3\u00f5\3\u00f5\3\u00f5\3\u00f5\3\u00f6\3\u00f6\3\u00f6"+ + "\3\u00f6\3\u00f7\3\u00f7\3\u00f7\3\u00f7\3\u00f8\3\u00f8\3\u00f8\3\u00f8"+ + "\3\u00f9\3\u00f9\3\u00f9\3\u00f9\3\u00fa\3\u00fa\3\u00fa\3\u00fa\3\u00fb"+ + "\3\u00fb\3\u00fb\3\u00fb\3\u00fc\3\u00fc\3\u00fc\3\u00fc\3\u00fd\3\u00fd"+ + "\3\u00fd\3\u00fd\3\u00fe\3\u00fe\3\u00fe\3\u00fe\3\u00ff\3\u00ff\3\u00ff"+ + "\3\u00ff\3\u0100\3\u0100\3\u0100\3\u0100\3\u0101\3\u0101\3\u0101\3\u0101"+ + "\3\u0102\3\u0102\3\u0102\3\u0102\3\u0103\3\u0103\3\u0103\3\u0103\3\u0104"+ + "\3\u0104\3\u0104\3\u0104\3\u0105\3\u0105\3\u0105\3\u0105\3\u0106\3\u0106"+ + "\3\u0106\3\u0106\3\u0107\3\u0107\3\u0107\3\u0107\3\u0108\3\u0108\3\u0108"+ + "\3\u0108\3\u0109\3\u0109\3\u0109\3\u0109\3\u010a\3\u010a\3\u010a\3\u010a"+ + "\3\u010b\3\u010b\3\u010b\3\u010b\3\u010c\3\u010c\3\u010c\3\u010c\3\u010d"+ + "\3\u010d\3\u010d\3\u010d\3\u010e\3\u010e\3\u010e\3\u010e\3\u010f\3\u010f"+ + "\3\u010f\3\u010f\3\u0110\3\u0110\3\u0110\3\u0110\3\u0111\3\u0111\3\u0111"+ + "\3\u0111\3\u0112\3\u0112\3\u0112\3\u0112\3\u0113\3\u0113\3\u0113\3\u0113"+ + "\3\u0114\3\u0114\3\u0114\3\u0114\3\u0115\3\u0115\3\u0115\3\u0115\3\u0116"+ + "\3\u0116\3\u0116\3\u0116\3\u0117\3\u0117\3\u0117\3\u0117\3\u0118\3\u0118"+ + "\5\u0118\u08d7\n\u0118\3\u0118\3\u0118\3\u0119\3\u0119\3\u0119\3\u0119"+ + "\3\u011a\3\u011a\3\u011a\3\u011a\3\u011b\3\u011b\3\u011b\3\u011b\3\u011c"+ + "\3\u011c\3\u011d\6\u011d\u08ea\n\u011d\r\u011d\16\u011d\u08eb\3\u011d"+ + "\5\u011d\u08ef\n\u011d\3\u011e\3\u011e\3\u011e\5\u011e\u08f4\n\u011e\3"+ + "\u011f\3\u011f\3\u011f\3\u011f\3\u011f\3\u0120\5\u0120\u08fc\n\u0120\3"+ + "\u0120\3\u0120\3\u0120\3\u0120\3\u0120\3\u0120\3\u0121\6\u0121\u0905\n"+ + "\u0121\r\u0121\16\u0121\u0906\3\u0122\3\u0122\3\u0123\6\u0123\u090c\n"+ + "\u0123\r\u0123\16\u0123\u090d\3\u0123\5\u0123\u0911\n\u0123\3\u0124\3"+ + "\u0124\3\u0124\3\u0125\3\u0125\3\u0125\3\u0125\3\u0125\3\u0126\3\u0126"+ + "\3\u0126\3\u0126\3\u0127\3\u0127\3\u0127\3\u0127\3\u0127\3\u0128\3\u0128"+ + "\3\u0128\3\u0128\3\u0128\3\u0129\3\u0129\3\u0129\3\u0129\3\u0129\3\u012a"+ + "\3\u012a\3\u012a\3\u012a\3\u012b\3\u012b\3\u012b\3\u012b\3\u012c\3\u012c"+ + "\3\u012c\3\u012c\3\u012c\3\u012d\3\u012d\3\u012d\3\u012d\3\u012e\3\u012e"+ + "\3\u012e\3\u012e\3\u012f\3\u012f\3\u012f\3\u012f\3\u0130\3\u0130\3\u0130"+ + "\3\u0130\3\u0131\3\u0131\3\u0131\3\u0131\3\u0132\3\u0132\3\u0132\3\u0132"+ + "\3\u0133\3\u0133\3\u0133\3\u0133\3\u0134\3\u0134\3\u0134\3\u0134\3\u0135"+ + "\3\u0135\3\u0135\3\u0135\3\u0136\3\u0136\3\u0136\3\u0136\3\u0137\3\u0137"+ + "\3\u0137\3\u0137\3\u0138\3\u0138\3\u0138\3\u0138\3\u0139\3\u0139\3\u0139"+ + "\3\u0139\3\u013a\3\u013a\3\u013a\3\u013a\3\u013b\3\u013b\3\u013b\3\u013b"+ + "\3\u013c\3\u013c\3\u013c\3\u013c\3\u013d\3\u013d\3\u013d\3\u013d\3\u013e"+ + "\3\u013e\3\u013e\3\u013e\3\u013f\3\u013f\3\u013f\3\u013f\3\u0140\3\u0140"+ + "\3\u0140\3\u0140\3\u0141\3\u0141\3\u0141\3\u0141\3\u0142\3\u0142\3\u0142"+ + "\3\u0142\3\u0143\3\u0143\3\u0143\3\u0143\3\u0144\3\u0144\3\u0144\3\u0144"+ + "\3\u0145\3\u0145\3\u0145\3\u0145\3\u0146\3\u0146\3\u0146\3\u0146\3\u0147"+ + "\3\u0147\3\u0147\3\u0147\3\u0148\3\u0148\3\u0148\3\u0148\3\u0149\3\u0149"+ + "\3\u0149\3\u0149\3\u014a\3\u014a\3\u014a\3\u014a\3\u014b\3\u014b\3\u014b"+ + "\3\u014b\3\u014c\3\u014c\3\u014c\3\u014c\3\u014d\3\u014d\3\u014d\3\u014d"+ + "\3\u014e\3\u014e\3\u014e\3\u014e\3\u014f\3\u014f\3\u014f\3\u014f\3\u0150"+ + "\3\u0150\3\u0150\3\u0150\3\u0151\3\u0151\3\u0151\3\u0151\3\u0152\3\u0152"+ + "\3\u0152\3\u0152\3\u0153\3\u0153\3\u0154\3\u0154\3\u0154\3\u0154\3\u0155"+ + "\3\u0155\3\u0155\3\u0155\3\u0156\3\u0156\3\u0156\3\u0156\3\u0157\3\u0157"+ + "\3\u0157\3\u0157\3\u0158\3\u0158\3\u0158\3\u0158\3\u0159\3\u0159\3\u0159"+ + "\3\u0159\3\u015a\3\u015a\3\u015a\3\u015a\3\u015a\3\u015b\3\u015b\3\u015b"+ + "\3\u015b\3\u015b\3\u015c\3\u015c\3\u015c\3\u015c\3\u015d\3\u015d\3\u015d"+ + "\3\u015d\3\u015e\3\u015e\3\u015e\3\u015e\3\u015f\3\u015f\3\u015f\3\u015f"+ + "\3\u0160\3\u0160\3\u0160\3\u0160\3\u0161\3\u0161\3\u0161\3\u0161\3\u0162"+ + "\3\u0162\3\u0162\3\u0162\3\u0163\3\u0163\3\u0163\3\u0163\3\u0164\3\u0164"+ + "\3\u0164\3\u0164\3\u0165\3\u0165\3\u0165\3\u0165\3\u0166\3\u0166\3\u0166"+ + "\3\u0166\3\u0167\3\u0167\5\u0167\u0a25\n\u0167\3\u0167\3\u0167\3\u0168"+ + "\3\u0168\3\u0168\3\u0168\3\u0169\3\u0169\3\u0169\3\u0169\3\u02e9\2\u016a"+ + "\7\3\t\4\13\5\r\6\17\7\21\b\23\t\25\n\27\13\31\f\33\r\35\16\37\17!\20"+ + "#\21%\22\'\23)\24+\25-\26/\27\61\30\63\31\65\32\67\339\34;\35=\36?\37"+ + "A C!E\"G#I$K%M&O\'Q(S)U*W+Y,[-]._/a\60c\61e\62g\63i\64k\65m\66o\67q8s"+ + "9u:w;y<{=}>\177?\u0081@\u0083A\u0085B\u0087C\u0089D\u008bE\u008dF\u008f"+ + "G\u0091H\u0093I\u0095J\u0097K\u0099L\u009bM\u009dN\u009fO\u00a1P\u00a3"+ + "Q\u00a5R\u00a7S\u00a9T\u00abU\u00adV\u00afW\u00b1X\u00b3Y\u00b5Z\u00b7"+ + "[\u00b9\\\u00bb]\u00bd^\u00bf_\u00c1`\u00c3a\u00c5b\u00c7c\u00c9d\u00cb"+ + "e\u00cdf\u00cfg\u00d1h\u00d3i\u00d5j\u00d7k\u00d9l\u00dbm\u00ddn\u00df"+ + "o\u00e1p\u00e3q\u00e5r\u00e7s\u00e9t\u00ebu\u00edv\u00efw\u00f1x\u00f3"+ + "y\u00f5z\u00f7{\u00f9|\u00fb}\u00fd~\u00ff\177\u0101\u0080\u0103\u0081"+ + "\u0105\u0082\u0107\u0083\u0109\u0084\u010b\u0085\u010d\u0086\u010f\u0087"+ + "\u0111\u0088\u0113\u0089\u0115\2\u0117\2\u0119\2\u011b\u008a\u011d\2\u011f"+ + "\u008b\u0121\2\u0123\u008c\u0125\u008d\u0127\u008e\u0129\u008f\u012b\u0090"+ + "\u012d\u0091\u012f\u0092\u0131\2\u0133\2\u0135\2\u0137\2\u0139\u0093\u013b"+ + "\u0094\u013d\u0095\u013f\u0096\u0141\u0097\u0143\u0098\u0145\u0099\u0147"+ + "\2\u0149\2\u014b\2\u014d\2\u014f\2\u0151\2\u0153\2\u0155\2\u0157\2\u0159"+ + "\2\u015b\2\u015d\2\u015f\2\u0161\2\u0163\2\u0165\2\u0167\2\u0169\2\u016b"+ + "\2\u016d\2\u016f\2\u0171\2\u0173\2\u0175\2\u0177\2\u0179\2\u017b\2\u017d"+ + "\2\u017f\2\u0181\2\u0183\2\u0185\2\u0187\2\u0189\2\u018b\2\u018d\2\u018f"+ + "\2\u0191\2\u0193\2\u0195\2\u0197\2\u0199\2\u019b\2\u019d\2\u019f\2\u01a1"+ + "\2\u01a3\2\u01a5\2\u01a7\2\u01a9\2\u01ab\2\u01ad\2\u01af\2\u01b1\2\u01b3"+ + "\2\u01b5\2\u01b7\2\u01b9\2\u01bb\2\u01bd\2\u01bf\2\u01c1\2\u01c3\2\u01c5"+ + "\2\u01c7\2\u01c9\2\u01cb\2\u01cd\2\u01cf\2\u01d1\2\u01d3\2\u01d5\2\u01d7"+ + "\2\u01d9\2\u01db\2\u01dd\2\u01df\2\u01e1\2\u01e3\2\u01e5\2\u01e7\2\u01e9"+ + "\2\u01eb\2\u01ed\2\u01ef\2\u01f1\2\u01f3\2\u01f5\2\u01f7\2\u01f9\2\u01fb"+ + "\2\u01fd\2\u01ff\2\u0201\2\u0203\2\u0205\2\u0207\2\u0209\2\u020b\2\u020d"+ + "\2\u020f\2\u0211\2\u0213\2\u0215\2\u0217\2\u0219\2\u021b\2\u021d\2\u021f"+ + "\2\u0221\2\u0223\2\u0225\2\u0227\2\u0229\2\u022b\2\u022d\2\u022f\2\u0231"+ + "\2\u0233\u009a\u0235\u009b\u0237\u009c\u0239\u009d\u023b\u009e\u023d\u009f"+ + "\u023f\u00a0\u0241\u00a1\u0243\u00a2\u0245\u00a3\u0247\u00a4\u0249\u00a5"+ + "\u024b\u00a6\u024d\u00a7\u024f\u00a8\u0251\2\u0253\2\u0255\2\u0257\2\u0259"+ + "\2\u025b\2\u025d\2\u025f\2\u0261\2\u0263\2\u0265\2\u0267\2\u0269\2\u026b"+ + "\2\u026d\2\u026f\2\u0271\2\u0273\2\u0275\2\u0277\2\u0279\2\u027b\2\u027d"+ + "\2\u027f\2\u0281\2\u0283\2\u0285\2\u0287\2\u0289\2\u028b\2\u028d\2\u028f"+ + "\2\u0291\2\u0293\2\u0295\2\u0297\2\u0299\2\u029b\2\u029d\2\u029f\2\u02a1"+ + "\2\u02a3\2\u02a5\2\u02a7\2\u02a9\u00a9\u02ab\2\u02ad\2\u02af\2\u02b1\2"+ + "\u02b3\2\u02b5\2\u02b7\2\u02b9\2\u02bb\2\u02bd\2\u02bf\2\u02c1\2\u02c3"+ + "\2\u02c5\2\u02c7\2\u02c9\2\u02cb\2\u02cd\2\u02cf\2\u02d1\u00aa\u02d3\u00ab"+ + "\u02d5\u00ac\7\2\3\4\5\6\26\4\2\f\f\17\17\5\2\13\13\16\16\"\"\4\2HHhh"+ + "\4\2GGgg\4\2--//\'\2\63;\u0663\u066b\u06f3\u06fb\u07c3\u07cb\u0969\u0971"+ + "\u09e9\u09f1\u0a69\u0a71\u0ae9\u0af1\u0b69\u0b71\u0be9\u0bf1\u0c69\u0c71"+ + "\u0ce9\u0cf1\u0d69\u0d71\u0de9\u0df1\u0e53\u0e5b\u0ed3\u0edb\u0f23\u0f2b"+ + "\u1043\u104b\u1093\u109b\u17e3\u17eb\u1813\u181b\u1949\u1951\u19d3\u19db"+ + "\u1a83\u1a8b\u1a93\u1a9b\u1b53\u1b5b\u1bb3\u1bbb\u1c43\u1c4b\u1c53\u1c5b"+ + "\ua623\ua62b\ua8d3\ua8db\ua903\ua90b\ua9d3\ua9db\ua9f3\ua9fb\uaa53\uaa5b"+ + "\uabf3\uabfb\uff13\uff1b\4\2ZZzz\5\2\62;CHch\4\2DDdd\3\2\62\63\3\2bb\n"+ + "\2$$&&))^^ddppttvv\u0248\2c|\u00b7\u00b7\u00e1\u00f8\u00fa\u0101\u0103"+ + "\u0103\u0105\u0105\u0107\u0107\u0109\u0109\u010b\u010b\u010d\u010d\u010f"+ + "\u010f\u0111\u0111\u0113\u0113\u0115\u0115\u0117\u0117\u0119\u0119\u011b"+ + "\u011b\u011d\u011d\u011f\u011f\u0121\u0121\u0123\u0123\u0125\u0125\u0127"+ + "\u0127\u0129\u0129\u012b\u012b\u012d\u012d\u012f\u012f\u0131\u0131\u0133"+ + "\u0133\u0135\u0135\u0137\u0137\u0139\u013a\u013c\u013c\u013e\u013e\u0140"+ + "\u0140\u0142\u0142\u0144\u0144\u0146\u0146\u0148\u0148\u014a\u014b\u014d"+ + "\u014d\u014f\u014f\u0151\u0151\u0153\u0153\u0155\u0155\u0157\u0157\u0159"+ + "\u0159\u015b\u015b\u015d\u015d\u015f\u015f\u0161\u0161\u0163\u0163\u0165"+ + "\u0165\u0167\u0167\u0169\u0169\u016b\u016b\u016d\u016d\u016f\u016f\u0171"+ + "\u0171\u0173\u0173\u0175\u0175\u0177\u0177\u0179\u0179\u017c\u017c\u017e"+ + "\u017e\u0180\u0182\u0185\u0185\u0187\u0187\u018a\u018a\u018e\u018f\u0194"+ + "\u0194\u0197\u0197\u019b\u019d\u01a0\u01a0\u01a3\u01a3\u01a5\u01a5\u01a7"+ + "\u01a7\u01aa\u01aa\u01ac\u01ad\u01af\u01af\u01b2\u01b2\u01b6\u01b6\u01b8"+ + "\u01b8\u01bb\u01bc\u01bf\u01c1\u01c8\u01c8\u01cb\u01cb\u01ce\u01ce\u01d0"+ + "\u01d0\u01d2\u01d2\u01d4\u01d4\u01d6\u01d6\u01d8\u01d8\u01da\u01da\u01dc"+ + "\u01dc\u01de\u01df\u01e1\u01e1\u01e3\u01e3\u01e5\u01e5\u01e7\u01e7\u01e9"+ + "\u01e9\u01eb\u01eb\u01ed\u01ed\u01ef\u01ef\u01f1\u01f2\u01f5\u01f5\u01f7"+ + "\u01f7\u01fb\u01fb\u01fd\u01fd\u01ff\u01ff\u0201\u0201\u0203\u0203\u0205"+ + "\u0205\u0207\u0207\u0209\u0209\u020b\u020b\u020d\u020d\u020f\u020f\u0211"+ + "\u0211\u0213\u0213\u0215\u0215\u0217\u0217\u0219\u0219\u021b\u021b\u021d"+ + "\u021d\u021f\u021f\u0221\u0221\u0223\u0223\u0225\u0225\u0227\u0227\u0229"+ + "\u0229\u022b\u022b\u022d\u022d\u022f\u022f\u0231\u0231\u0233\u0233\u0235"+ + "\u023b\u023e\u023e\u0241\u0242\u0244\u0244\u0249\u0249\u024b\u024b\u024d"+ + "\u024d\u024f\u024f\u0251\u0295\u0297\u02b1\u0373\u0373\u0375\u0375\u0379"+ + "\u0379\u037d\u037f\u0392\u0392\u03ae\u03d0\u03d2\u03d3\u03d7\u03d9\u03db"+ + "\u03db\u03dd\u03dd\u03df\u03df\u03e1\u03e1\u03e3\u03e3\u03e5\u03e5\u03e7"+ + "\u03e7\u03e9\u03e9\u03eb\u03eb\u03ed\u03ed\u03ef\u03ef\u03f1\u03f5\u03f7"+ + "\u03f7\u03fa\u03fa\u03fd\u03fe\u0432\u0461\u0463\u0463\u0465\u0465\u0467"+ + "\u0467\u0469\u0469\u046b\u046b\u046d\u046d\u046f\u046f\u0471\u0471\u0473"+ + "\u0473\u0475\u0475\u0477\u0477\u0479\u0479\u047b\u047b\u047d\u047d\u047f"+ + "\u047f\u0481\u0481\u0483\u0483\u048d\u048d\u048f\u048f\u0491\u0491\u0493"+ + "\u0493\u0495\u0495\u0497\u0497\u0499\u0499\u049b\u049b\u049d\u049d\u049f"+ + "\u049f\u04a1\u04a1\u04a3\u04a3\u04a5\u04a5\u04a7\u04a7\u04a9\u04a9\u04ab"+ + "\u04ab\u04ad\u04ad\u04af\u04af\u04b1\u04b1\u04b3\u04b3\u04b5\u04b5\u04b7"+ + "\u04b7\u04b9\u04b9\u04bb\u04bb\u04bd\u04bd\u04bf\u04bf\u04c1\u04c1\u04c4"+ + "\u04c4\u04c6\u04c6\u04c8\u04c8\u04ca\u04ca\u04cc\u04cc\u04ce\u04ce\u04d0"+ + "\u04d1\u04d3\u04d3\u04d5\u04d5\u04d7\u04d7\u04d9\u04d9\u04db\u04db\u04dd"+ + "\u04dd\u04df\u04df\u04e1\u04e1\u04e3\u04e3\u04e5\u04e5\u04e7\u04e7\u04e9"+ + "\u04e9\u04eb\u04eb\u04ed\u04ed\u04ef\u04ef\u04f1\u04f1\u04f3\u04f3\u04f5"+ + "\u04f5\u04f7\u04f7\u04f9\u04f9\u04fb\u04fb\u04fd\u04fd\u04ff\u04ff\u0501"+ + "\u0501\u0503\u0503\u0505\u0505\u0507\u0507\u0509\u0509\u050b\u050b\u050d"+ + "\u050d\u050f\u050f\u0511\u0511\u0513\u0513\u0515\u0515\u0517\u0517\u0519"+ + "\u0519\u051b\u051b\u051d\u051d\u051f\u051f\u0521\u0521\u0523\u0523\u0525"+ + "\u0525\u0527\u0527\u0529\u0529\u0563\u0589\u1d02\u1d2d\u1d6d\u1d79\u1d7b"+ + "\u1d9c\u1e03\u1e03\u1e05\u1e05\u1e07\u1e07\u1e09\u1e09\u1e0b\u1e0b\u1e0d"+ + "\u1e0d\u1e0f\u1e0f\u1e11\u1e11\u1e13\u1e13\u1e15\u1e15\u1e17\u1e17\u1e19"+ + "\u1e19\u1e1b\u1e1b\u1e1d\u1e1d\u1e1f\u1e1f\u1e21\u1e21\u1e23\u1e23\u1e25"+ + "\u1e25\u1e27\u1e27\u1e29\u1e29\u1e2b\u1e2b\u1e2d\u1e2d\u1e2f\u1e2f\u1e31"+ + "\u1e31\u1e33\u1e33\u1e35\u1e35\u1e37\u1e37\u1e39\u1e39\u1e3b\u1e3b\u1e3d"+ + "\u1e3d\u1e3f\u1e3f\u1e41\u1e41\u1e43\u1e43\u1e45\u1e45\u1e47\u1e47\u1e49"+ + "\u1e49\u1e4b\u1e4b\u1e4d\u1e4d\u1e4f\u1e4f\u1e51\u1e51\u1e53\u1e53\u1e55"+ + "\u1e55\u1e57\u1e57\u1e59\u1e59\u1e5b\u1e5b\u1e5d\u1e5d\u1e5f\u1e5f\u1e61"+ + "\u1e61\u1e63\u1e63\u1e65\u1e65\u1e67\u1e67\u1e69\u1e69\u1e6b\u1e6b\u1e6d"+ + "\u1e6d\u1e6f\u1e6f\u1e71\u1e71\u1e73\u1e73\u1e75\u1e75\u1e77\u1e77\u1e79"+ + "\u1e79\u1e7b\u1e7b\u1e7d\u1e7d\u1e7f\u1e7f\u1e81\u1e81\u1e83\u1e83\u1e85"+ + "\u1e85\u1e87\u1e87\u1e89\u1e89\u1e8b\u1e8b\u1e8d\u1e8d\u1e8f\u1e8f\u1e91"+ + "\u1e91\u1e93\u1e93\u1e95\u1e95\u1e97\u1e9f\u1ea1\u1ea1\u1ea3\u1ea3\u1ea5"+ + "\u1ea5\u1ea7\u1ea7\u1ea9\u1ea9\u1eab\u1eab\u1ead\u1ead\u1eaf\u1eaf\u1eb1"+ + "\u1eb1\u1eb3\u1eb3\u1eb5\u1eb5\u1eb7\u1eb7\u1eb9\u1eb9\u1ebb\u1ebb\u1ebd"+ + "\u1ebd\u1ebf\u1ebf\u1ec1\u1ec1\u1ec3\u1ec3\u1ec5\u1ec5\u1ec7\u1ec7\u1ec9"+ + "\u1ec9\u1ecb\u1ecb\u1ecd\u1ecd\u1ecf\u1ecf\u1ed1\u1ed1\u1ed3\u1ed3\u1ed5"+ + "\u1ed5\u1ed7\u1ed7\u1ed9\u1ed9\u1edb\u1edb\u1edd\u1edd\u1edf\u1edf\u1ee1"+ + "\u1ee1\u1ee3\u1ee3\u1ee5\u1ee5\u1ee7\u1ee7\u1ee9\u1ee9\u1eeb\u1eeb\u1eed"+ + "\u1eed\u1eef\u1eef\u1ef1\u1ef1\u1ef3\u1ef3\u1ef5\u1ef5\u1ef7\u1ef7\u1ef9"+ + "\u1ef9\u1efb\u1efb\u1efd\u1efd\u1eff\u1eff\u1f01\u1f09\u1f12\u1f17\u1f22"+ + "\u1f29\u1f32\u1f39\u1f42\u1f47\u1f52\u1f59\u1f62\u1f69\u1f72\u1f7f\u1f82"+ + "\u1f89\u1f92\u1f99\u1fa2\u1fa9\u1fb2\u1fb6\u1fb8\u1fb9\u1fc0\u1fc0\u1fc4"+ + "\u1fc6\u1fc8\u1fc9\u1fd2\u1fd5\u1fd8\u1fd9\u1fe2\u1fe9\u1ff4\u1ff6\u1ff8"+ + "\u1ff9\u210c\u210c\u2110\u2111\u2115\u2115\u2131\u2131\u2136\u2136\u213b"+ + "\u213b\u213e\u213f\u2148\u214b\u2150\u2150\u2186\u2186\u2c32\u2c60\u2c63"+ + "\u2c63\u2c67\u2c68\u2c6a\u2c6a\u2c6c\u2c6c\u2c6e\u2c6e\u2c73\u2c73\u2c75"+ + "\u2c76\u2c78\u2c7d\u2c83\u2c83\u2c85\u2c85\u2c87\u2c87\u2c89\u2c89\u2c8b"+ + "\u2c8b\u2c8d\u2c8d\u2c8f\u2c8f\u2c91\u2c91\u2c93\u2c93\u2c95\u2c95\u2c97"+ + "\u2c97\u2c99\u2c99\u2c9b\u2c9b\u2c9d\u2c9d\u2c9f\u2c9f\u2ca1\u2ca1\u2ca3"+ + "\u2ca3\u2ca5\u2ca5\u2ca7\u2ca7\u2ca9\u2ca9\u2cab\u2cab\u2cad\u2cad\u2caf"+ + "\u2caf\u2cb1\u2cb1\u2cb3\u2cb3\u2cb5\u2cb5\u2cb7\u2cb7\u2cb9\u2cb9\u2cbb"+ + "\u2cbb\u2cbd\u2cbd\u2cbf\u2cbf\u2cc1\u2cc1\u2cc3\u2cc3\u2cc5\u2cc5\u2cc7"+ + "\u2cc7\u2cc9\u2cc9\u2ccb\u2ccb\u2ccd\u2ccd\u2ccf\u2ccf\u2cd1\u2cd1\u2cd3"+ + "\u2cd3\u2cd5\u2cd5\u2cd7\u2cd7\u2cd9\u2cd9\u2cdb\u2cdb\u2cdd\u2cdd\u2cdf"+ + "\u2cdf\u2ce1\u2ce1\u2ce3\u2ce3\u2ce5\u2ce6\u2cee\u2cee\u2cf0\u2cf0\u2cf5"+ + "\u2cf5\u2d02\u2d27\u2d29\u2d29\u2d2f\u2d2f\ua643\ua643\ua645\ua645\ua647"+ + "\ua647\ua649\ua649\ua64b\ua64b\ua64d\ua64d\ua64f\ua64f\ua651\ua651\ua653"+ + "\ua653\ua655\ua655\ua657\ua657\ua659\ua659\ua65b\ua65b\ua65d\ua65d\ua65f"+ + "\ua65f\ua661\ua661\ua663\ua663\ua665\ua665\ua667\ua667\ua669\ua669\ua66b"+ + "\ua66b\ua66d\ua66d\ua66f\ua66f\ua683\ua683\ua685\ua685\ua687\ua687\ua689"+ + "\ua689\ua68b\ua68b\ua68d\ua68d\ua68f\ua68f\ua691\ua691\ua693\ua693\ua695"+ + "\ua695\ua697\ua697\ua699\ua699\ua725\ua725\ua727\ua727\ua729\ua729\ua72b"+ + "\ua72b\ua72d\ua72d\ua72f\ua72f\ua731\ua733\ua735\ua735\ua737\ua737\ua739"+ + "\ua739\ua73b\ua73b\ua73d\ua73d\ua73f\ua73f\ua741\ua741\ua743\ua743\ua745"+ + "\ua745\ua747\ua747\ua749\ua749\ua74b\ua74b\ua74d\ua74d\ua74f\ua74f\ua751"+ + "\ua751\ua753\ua753\ua755\ua755\ua757\ua757\ua759\ua759\ua75b\ua75b\ua75d"+ + "\ua75d\ua75f\ua75f\ua761\ua761\ua763\ua763\ua765\ua765\ua767\ua767\ua769"+ + "\ua769\ua76b\ua76b\ua76d\ua76d\ua76f\ua76f\ua771\ua771\ua773\ua77a\ua77c"+ + "\ua77c\ua77e\ua77e\ua781\ua781\ua783\ua783\ua785\ua785\ua787\ua787\ua789"+ + "\ua789\ua78e\ua78e\ua790\ua790\ua793\ua793\ua795\ua795\ua7a3\ua7a3\ua7a5"+ + "\ua7a5\ua7a7\ua7a7\ua7a9\ua7a9\ua7ab\ua7ab\ua7fc\ua7fc\ufb02\ufb08\ufb15"+ + "\ufb19\uff43\uff5c\65\2\u02b2\u02c3\u02c8\u02d3\u02e2\u02e6\u02ee\u02ee"+ + "\u02f0\u02f0\u0376\u0376\u037c\u037c\u055b\u055b\u0642\u0642\u06e7\u06e8"+ + "\u07f6\u07f7\u07fc\u07fc\u081c\u081c\u0826\u0826\u082a\u082a\u0973\u0973"+ + "\u0e48\u0e48\u0ec8\u0ec8\u10fe\u10fe\u17d9\u17d9\u1845\u1845\u1aa9\u1aa9"+ + "\u1c7a\u1c7f\u1d2e\u1d6c\u1d7a\u1d7a\u1d9d\u1dc1\u2073\u2073\u2081\u2081"+ + "\u2092\u209e\u2c7e\u2c7f\u2d71\u2d71\u2e31\u2e31\u3007\u3007\u3033\u3037"+ + "\u303d\u303d\u309f\u30a0\u30fe\u3100\ua017\ua017\ua4fa\ua4ff\ua60e\ua60e"+ + "\ua681\ua681\ua719\ua721\ua772\ua772\ua78a\ua78a\ua7fa\ua7fb\ua9d1\ua9d1"+ + "\uaa72\uaa72\uaadf\uaadf\uaaf5\uaaf6\uff72\uff72\uffa0\uffa1\u0123\2\u00ac"+ + "\u00ac\u00bc\u00bc\u01bd\u01bd\u01c2\u01c5\u0296\u0296\u05d2\u05ec\u05f2"+ + "\u05f4\u0622\u0641\u0643\u064c\u0670\u0671\u0673\u06d5\u06d7\u06d7\u06f0"+ + "\u06f1\u06fc\u06fe\u0701\u0701\u0712\u0712\u0714\u0731\u074f\u07a7\u07b3"+ + "\u07b3\u07cc\u07ec\u0802\u0817\u0842\u085a\u08a2\u08a2\u08a4\u08ae\u0906"+ + "\u093b\u093f\u093f\u0952\u0952\u095a\u0963\u0974\u0979\u097b\u0981\u0987"+ + "\u098e\u0991\u0992\u0995\u09aa\u09ac\u09b2\u09b4\u09b4\u09b8\u09bb\u09bf"+ + "\u09bf\u09d0\u09d0\u09de\u09df\u09e1\u09e3\u09f2\u09f3\u0a07\u0a0c\u0a11"+ + "\u0a12\u0a15\u0a2a\u0a2c\u0a32\u0a34\u0a35\u0a37\u0a38\u0a3a\u0a3b\u0a5b"+ + "\u0a5e\u0a60\u0a60\u0a74\u0a76\u0a87\u0a8f\u0a91\u0a93\u0a95\u0aaa\u0aac"+ + "\u0ab2\u0ab4\u0ab5\u0ab7\u0abb\u0abf\u0abf\u0ad2\u0ad2\u0ae2\u0ae3\u0b07"+ + "\u0b0e\u0b11\u0b12\u0b15\u0b2a\u0b2c\u0b32\u0b34\u0b35\u0b37\u0b3b\u0b3f"+ + "\u0b3f\u0b5e\u0b5f\u0b61\u0b63\u0b73\u0b73\u0b85\u0b85\u0b87\u0b8c\u0b90"+ + "\u0b92\u0b94\u0b97\u0b9b\u0b9c\u0b9e\u0b9e\u0ba0\u0ba1\u0ba5\u0ba6\u0baa"+ + "\u0bac\u0bb0\u0bbb\u0bd2\u0bd2\u0c07\u0c0e\u0c10\u0c12\u0c14\u0c2a\u0c2c"+ + "\u0c35\u0c37\u0c3b\u0c3f\u0c3f\u0c5a\u0c5b\u0c62\u0c63\u0c87\u0c8e\u0c90"+ + "\u0c92\u0c94\u0caa\u0cac\u0cb5\u0cb7\u0cbb\u0cbf\u0cbf\u0ce0\u0ce0\u0ce2"+ + "\u0ce3\u0cf3\u0cf4\u0d07\u0d0e\u0d10\u0d12\u0d14\u0d3c\u0d3f\u0d3f\u0d50"+ + "\u0d50\u0d62\u0d63\u0d7c\u0d81\u0d87\u0d98\u0d9c\u0db3\u0db5\u0dbd\u0dbf"+ + "\u0dbf\u0dc2\u0dc8\u0e03\u0e32\u0e34\u0e35\u0e42\u0e47\u0e83\u0e84\u0e86"+ + "\u0e86\u0e89\u0e8a\u0e8c\u0e8c\u0e8f\u0e8f\u0e96\u0e99\u0e9b\u0ea1\u0ea3"+ + "\u0ea5\u0ea7\u0ea7\u0ea9\u0ea9\u0eac\u0ead\u0eaf\u0eb2\u0eb4\u0eb5\u0ebf"+ + "\u0ebf\u0ec2\u0ec6\u0ede\u0ee1\u0f02\u0f02\u0f42\u0f49\u0f4b\u0f6e\u0f8a"+ + "\u0f8e\u1002\u102c\u1041\u1041\u1052\u1057\u105c\u105f\u1063\u1063\u1067"+ + "\u1068\u1070\u1072\u1077\u1083\u1090\u1090\u10d2\u10fc\u10ff\u124a\u124c"+ + "\u124f\u1252\u1258\u125a\u125a\u125c\u125f\u1262\u128a\u128c\u128f\u1292"+ + "\u12b2\u12b4\u12b7\u12ba\u12c0\u12c2\u12c2\u12c4\u12c7\u12ca\u12d8\u12da"+ + "\u1312\u1314\u1317\u131a\u135c\u1382\u1391\u13a2\u13f6\u1403\u166e\u1671"+ + "\u1681\u1683\u169c\u16a2\u16ec\u1702\u170e\u1710\u1713\u1722\u1733\u1742"+ + "\u1753\u1762\u176e\u1770\u1772\u1782\u17b5\u17de\u17de\u1822\u1844\u1846"+ + "\u1879\u1882\u18aa\u18ac\u18ac\u18b2\u18f7\u1902\u191e\u1952\u196f\u1972"+ + "\u1976\u1982\u19ad\u19c3\u19c9\u1a02\u1a18\u1a22\u1a56\u1b07\u1b35\u1b47"+ + "\u1b4d\u1b85\u1ba2\u1bb0\u1bb1\u1bbc\u1be7\u1c02\u1c25\u1c4f\u1c51\u1c5c"+ + "\u1c79\u1ceb\u1cee\u1cf0\u1cf3\u1cf7\u1cf8\u2137\u213a\u2d32\u2d69\u2d82"+ + "\u2d98\u2da2\u2da8\u2daa\u2db0\u2db2\u2db8\u2dba\u2dc0\u2dc2\u2dc8\u2dca"+ + "\u2dd0\u2dd2\u2dd8\u2dda\u2de0\u3008\u3008\u303e\u303e\u3043\u3098\u30a1"+ + "\u30a1\u30a3\u30fc\u3101\u3101\u3107\u312f\u3133\u3190\u31a2\u31bc\u31f2"+ + "\u3201\u3402\u3402\u4db7\u4db7\u4e02\u4e02\u9fce\u9fce\ua002\ua016\ua018"+ + "\ua48e\ua4d2\ua4f9\ua502\ua60d\ua612\ua621\ua62c\ua62d\ua670\ua670\ua6a2"+ + "\ua6e7\ua7fd\ua803\ua805\ua807\ua809\ua80c\ua80e\ua824\ua842\ua875\ua884"+ + "\ua8b5\ua8f4\ua8f9\ua8fd\ua8fd\ua90c\ua927\ua932\ua948\ua962\ua97e\ua986"+ + "\ua9b4\uaa02\uaa2a\uaa42\uaa44\uaa46\uaa4d\uaa62\uaa71\uaa73\uaa78\uaa7c"+ + "\uaa7c\uaa82\uaab1\uaab3\uaab3\uaab7\uaab8\uaabb\uaabf\uaac2\uaac2\uaac4"+ + "\uaac4\uaadd\uaade\uaae2\uaaec\uaaf4\uaaf4\uab03\uab08\uab0b\uab10\uab13"+ + "\uab18\uab22\uab28\uab2a\uab30\uabc2\uabe4\uac02\uac02\ud7a5\ud7a5\ud7b2"+ + "\ud7c8\ud7cd\ud7fd\uf902\ufa6f\ufa72\ufadb\ufb1f\ufb1f\ufb21\ufb2a\ufb2c"+ + "\ufb38\ufb3a\ufb3e\ufb40\ufb40\ufb42\ufb43\ufb45\ufb46\ufb48\ufbb3\ufbd5"+ + "\ufd3f\ufd52\ufd91\ufd94\ufdc9\ufdf2\ufdfd\ufe72\ufe76\ufe78\ufefe\uff68"+ + "\uff71\uff73\uff9f\uffa2\uffc0\uffc4\uffc9\uffcc\uffd1\uffd4\uffd9\uffdc"+ + "\uffde\f\2\u01c7\u01c7\u01ca\u01ca\u01cd\u01cd\u01f4\u01f4\u1f8a\u1f91"+ + "\u1f9a\u1fa1\u1faa\u1fb1\u1fbe\u1fbe\u1fce\u1fce\u1ffe\u1ffe\u0242\2C"+ + "\\\u00c2\u00d8\u00da\u00e0\u0102\u0102\u0104\u0104\u0106\u0106\u0108\u0108"+ + "\u010a\u010a\u010c\u010c\u010e\u010e\u0110\u0110\u0112\u0112\u0114\u0114"+ + "\u0116\u0116\u0118\u0118\u011a\u011a\u011c\u011c\u011e\u011e\u0120\u0120"+ + "\u0122\u0122\u0124\u0124\u0126\u0126\u0128\u0128\u012a\u012a\u012c\u012c"+ + "\u012e\u012e\u0130\u0130\u0132\u0132\u0134\u0134\u0136\u0136\u0138\u0138"+ + "\u013b\u013b\u013d\u013d\u013f\u013f\u0141\u0141\u0143\u0143\u0145\u0145"+ + "\u0147\u0147\u0149\u0149\u014c\u014c\u014e\u014e\u0150\u0150\u0152\u0152"+ + "\u0154\u0154\u0156\u0156\u0158\u0158\u015a\u015a\u015c\u015c\u015e\u015e"+ + "\u0160\u0160\u0162\u0162\u0164\u0164\u0166\u0166\u0168\u0168\u016a\u016a"+ + "\u016c\u016c\u016e\u016e\u0170\u0170\u0172\u0172\u0174\u0174\u0176\u0176"+ + "\u0178\u0178\u017a\u017b\u017d\u017d\u017f\u017f\u0183\u0184\u0186\u0186"+ + "\u0188\u0189\u018b\u018d\u0190\u0193\u0195\u0196\u0198\u019a\u019e\u019f"+ + "\u01a1\u01a2\u01a4\u01a4\u01a6\u01a6\u01a8\u01a9\u01ab\u01ab\u01ae\u01ae"+ + "\u01b0\u01b1\u01b3\u01b5\u01b7\u01b7\u01b9\u01ba\u01be\u01be\u01c6\u01c6"+ + "\u01c9\u01c9\u01cc\u01cc\u01cf\u01cf\u01d1\u01d1\u01d3\u01d3\u01d5\u01d5"+ + "\u01d7\u01d7\u01d9\u01d9\u01db\u01db\u01dd\u01dd\u01e0\u01e0\u01e2\u01e2"+ + "\u01e4\u01e4\u01e6\u01e6\u01e8\u01e8\u01ea\u01ea\u01ec\u01ec\u01ee\u01ee"+ + "\u01f0\u01f0\u01f3\u01f3\u01f6\u01f6\u01f8\u01fa\u01fc\u01fc\u01fe\u01fe"+ + "\u0200\u0200\u0202\u0202\u0204\u0204\u0206\u0206\u0208\u0208\u020a\u020a"+ + "\u020c\u020c\u020e\u020e\u0210\u0210\u0212\u0212\u0214\u0214\u0216\u0216"+ + "\u0218\u0218\u021a\u021a\u021c\u021c\u021e\u021e\u0220\u0220\u0222\u0222"+ + "\u0224\u0224\u0226\u0226\u0228\u0228\u022a\u022a\u022c\u022c\u022e\u022e"+ + "\u0230\u0230\u0232\u0232\u0234\u0234\u023c\u023d\u023f\u0240\u0243\u0243"+ + "\u0245\u0248\u024a\u024a\u024c\u024c\u024e\u024e\u0250\u0250\u0372\u0372"+ + "\u0374\u0374\u0378\u0378\u0388\u0388\u038a\u038c\u038e\u038e\u0390\u0391"+ + "\u0393\u03a3\u03a5\u03ad\u03d1\u03d1\u03d4\u03d6\u03da\u03da\u03dc\u03dc"+ + "\u03de\u03de\u03e0\u03e0\u03e2\u03e2\u03e4\u03e4\u03e6\u03e6\u03e8\u03e8"+ + "\u03ea\u03ea\u03ec\u03ec\u03ee\u03ee\u03f0\u03f0\u03f6\u03f6\u03f9\u03f9"+ + "\u03fb\u03fc\u03ff\u0431\u0462\u0462\u0464\u0464\u0466\u0466\u0468\u0468"+ + "\u046a\u046a\u046c\u046c\u046e\u046e\u0470\u0470\u0472\u0472\u0474\u0474"+ + "\u0476\u0476\u0478\u0478\u047a\u047a\u047c\u047c\u047e\u047e\u0480\u0480"+ + "\u0482\u0482\u048c\u048c\u048e\u048e\u0490\u0490\u0492\u0492\u0494\u0494"+ + "\u0496\u0496\u0498\u0498\u049a\u049a\u049c\u049c\u049e\u049e\u04a0\u04a0"+ + "\u04a2\u04a2\u04a4\u04a4\u04a6\u04a6\u04a8\u04a8\u04aa\u04aa\u04ac\u04ac"+ + "\u04ae\u04ae\u04b0\u04b0\u04b2\u04b2\u04b4\u04b4\u04b6\u04b6\u04b8\u04b8"+ + "\u04ba\u04ba\u04bc\u04bc\u04be\u04be\u04c0\u04c0\u04c2\u04c3\u04c5\u04c5"+ + "\u04c7\u04c7\u04c9\u04c9\u04cb\u04cb\u04cd\u04cd\u04cf\u04cf\u04d2\u04d2"+ + "\u04d4\u04d4\u04d6\u04d6\u04d8\u04d8\u04da\u04da\u04dc\u04dc\u04de\u04de"+ + "\u04e0\u04e0\u04e2\u04e2\u04e4\u04e4\u04e6\u04e6\u04e8\u04e8\u04ea\u04ea"+ + "\u04ec\u04ec\u04ee\u04ee\u04f0\u04f0\u04f2\u04f2\u04f4\u04f4\u04f6\u04f6"+ + "\u04f8\u04f8\u04fa\u04fa\u04fc\u04fc\u04fe\u04fe\u0500\u0500\u0502\u0502"+ + "\u0504\u0504\u0506\u0506\u0508\u0508\u050a\u050a\u050c\u050c\u050e\u050e"+ + "\u0510\u0510\u0512\u0512\u0514\u0514\u0516\u0516\u0518\u0518\u051a\u051a"+ + "\u051c\u051c\u051e\u051e\u0520\u0520\u0522\u0522\u0524\u0524\u0526\u0526"+ + "\u0528\u0528\u0533\u0558\u10a2\u10c7\u10c9\u10c9\u10cf\u10cf\u1e02\u1e02"+ + "\u1e04\u1e04\u1e06\u1e06\u1e08\u1e08\u1e0a\u1e0a\u1e0c\u1e0c\u1e0e\u1e0e"+ + "\u1e10\u1e10\u1e12\u1e12\u1e14\u1e14\u1e16\u1e16\u1e18\u1e18\u1e1a\u1e1a"+ + "\u1e1c\u1e1c\u1e1e\u1e1e\u1e20\u1e20\u1e22\u1e22\u1e24\u1e24\u1e26\u1e26"+ + "\u1e28\u1e28\u1e2a\u1e2a\u1e2c\u1e2c\u1e2e\u1e2e\u1e30\u1e30\u1e32\u1e32"+ + "\u1e34\u1e34\u1e36\u1e36\u1e38\u1e38\u1e3a\u1e3a\u1e3c\u1e3c\u1e3e\u1e3e"+ + "\u1e40\u1e40\u1e42\u1e42\u1e44\u1e44\u1e46\u1e46\u1e48\u1e48\u1e4a\u1e4a"+ + "\u1e4c\u1e4c\u1e4e\u1e4e\u1e50\u1e50\u1e52\u1e52\u1e54\u1e54\u1e56\u1e56"+ + "\u1e58\u1e58\u1e5a\u1e5a\u1e5c\u1e5c\u1e5e\u1e5e\u1e60\u1e60\u1e62\u1e62"+ + "\u1e64\u1e64\u1e66\u1e66\u1e68\u1e68\u1e6a\u1e6a\u1e6c\u1e6c\u1e6e\u1e6e"+ + "\u1e70\u1e70\u1e72\u1e72\u1e74\u1e74\u1e76\u1e76\u1e78\u1e78\u1e7a\u1e7a"+ + "\u1e7c\u1e7c\u1e7e\u1e7e\u1e80\u1e80\u1e82\u1e82\u1e84\u1e84\u1e86\u1e86"+ + "\u1e88\u1e88\u1e8a\u1e8a\u1e8c\u1e8c\u1e8e\u1e8e\u1e90\u1e90\u1e92\u1e92"+ + "\u1e94\u1e94\u1e96\u1e96\u1ea0\u1ea0\u1ea2\u1ea2\u1ea4\u1ea4\u1ea6\u1ea6"+ + "\u1ea8\u1ea8\u1eaa\u1eaa\u1eac\u1eac\u1eae\u1eae\u1eb0\u1eb0\u1eb2\u1eb2"+ + "\u1eb4\u1eb4\u1eb6\u1eb6\u1eb8\u1eb8\u1eba\u1eba\u1ebc\u1ebc\u1ebe\u1ebe"+ + "\u1ec0\u1ec0\u1ec2\u1ec2\u1ec4\u1ec4\u1ec6\u1ec6\u1ec8\u1ec8\u1eca\u1eca"+ + "\u1ecc\u1ecc\u1ece\u1ece\u1ed0\u1ed0\u1ed2\u1ed2\u1ed4\u1ed4\u1ed6\u1ed6"+ + "\u1ed8\u1ed8\u1eda\u1eda\u1edc\u1edc\u1ede\u1ede\u1ee0\u1ee0\u1ee2\u1ee2"+ + "\u1ee4\u1ee4\u1ee6\u1ee6\u1ee8\u1ee8\u1eea\u1eea\u1eec\u1eec\u1eee\u1eee"+ + "\u1ef0\u1ef0\u1ef2\u1ef2\u1ef4\u1ef4\u1ef6\u1ef6\u1ef8\u1ef8\u1efa\u1efa"+ + "\u1efc\u1efc\u1efe\u1efe\u1f00\u1f00\u1f0a\u1f11\u1f1a\u1f1f\u1f2a\u1f31"+ + "\u1f3a\u1f41\u1f4a\u1f4f\u1f5b\u1f5b\u1f5d\u1f5d\u1f5f\u1f5f\u1f61\u1f61"+ + "\u1f6a\u1f71\u1fba\u1fbd\u1fca\u1fcd\u1fda\u1fdd\u1fea\u1fee\u1ffa\u1ffd"+ + "\u2104\u2104\u2109\u2109\u210d\u210f\u2112\u2114\u2117\u2117\u211b\u211f"+ + "\u2126\u2126\u2128\u2128\u212a\u212a\u212c\u212f\u2132\u2135\u2140\u2141"+ + "\u2147\u2147\u2185\u2185\u2c02\u2c30\u2c62\u2c62\u2c64\u2c66\u2c69\u2c69"+ + "\u2c6b\u2c6b\u2c6d\u2c6d\u2c6f\u2c72\u2c74\u2c74\u2c77\u2c77\u2c80\u2c82"+ + "\u2c84\u2c84\u2c86\u2c86\u2c88\u2c88\u2c8a\u2c8a\u2c8c\u2c8c\u2c8e\u2c8e"+ + "\u2c90\u2c90\u2c92\u2c92\u2c94\u2c94\u2c96\u2c96\u2c98\u2c98\u2c9a\u2c9a"+ + "\u2c9c\u2c9c\u2c9e\u2c9e\u2ca0\u2ca0\u2ca2\u2ca2\u2ca4\u2ca4\u2ca6\u2ca6"+ + "\u2ca8\u2ca8\u2caa\u2caa\u2cac\u2cac\u2cae\u2cae\u2cb0\u2cb0\u2cb2\u2cb2"+ + "\u2cb4\u2cb4\u2cb6\u2cb6\u2cb8\u2cb8\u2cba\u2cba\u2cbc\u2cbc\u2cbe\u2cbe"+ + "\u2cc0\u2cc0\u2cc2\u2cc2\u2cc4\u2cc4\u2cc6\u2cc6\u2cc8\u2cc8\u2cca\u2cca"+ + "\u2ccc\u2ccc\u2cce\u2cce\u2cd0\u2cd0\u2cd2\u2cd2\u2cd4\u2cd4\u2cd6\u2cd6"+ + "\u2cd8\u2cd8\u2cda\u2cda\u2cdc\u2cdc\u2cde\u2cde\u2ce0\u2ce0\u2ce2\u2ce2"+ + "\u2ce4\u2ce4\u2ced\u2ced\u2cef\u2cef\u2cf4\u2cf4\ua642\ua642\ua644\ua644"+ + "\ua646\ua646\ua648\ua648\ua64a\ua64a\ua64c\ua64c\ua64e\ua64e\ua650\ua650"+ + "\ua652\ua652\ua654\ua654\ua656\ua656\ua658\ua658\ua65a\ua65a\ua65c\ua65c"+ + "\ua65e\ua65e\ua660\ua660\ua662\ua662\ua664\ua664\ua666\ua666\ua668\ua668"+ + "\ua66a\ua66a\ua66c\ua66c\ua66e\ua66e\ua682\ua682\ua684\ua684\ua686\ua686"+ + "\ua688\ua688\ua68a\ua68a\ua68c\ua68c\ua68e\ua68e\ua690\ua690\ua692\ua692"+ + "\ua694\ua694\ua696\ua696\ua698\ua698\ua724\ua724\ua726\ua726\ua728\ua728"+ + "\ua72a\ua72a\ua72c\ua72c\ua72e\ua72e\ua730\ua730\ua734\ua734\ua736\ua736"+ + "\ua738\ua738\ua73a\ua73a\ua73c\ua73c\ua73e\ua73e\ua740\ua740\ua742\ua742"+ + "\ua744\ua744\ua746\ua746\ua748\ua748\ua74a\ua74a\ua74c\ua74c\ua74e\ua74e"+ + "\ua750\ua750\ua752\ua752\ua754\ua754\ua756\ua756\ua758\ua758\ua75a\ua75a"+ + "\ua75c\ua75c\ua75e\ua75e\ua760\ua760\ua762\ua762\ua764\ua764\ua766\ua766"+ + "\ua768\ua768\ua76a\ua76a\ua76c\ua76c\ua76e\ua76e\ua770\ua770\ua77b\ua77b"+ + "\ua77d\ua77d\ua77f\ua780\ua782\ua782\ua784\ua784\ua786\ua786\ua788\ua788"+ + "\ua78d\ua78d\ua78f\ua78f\ua792\ua792\ua794\ua794\ua7a2\ua7a2\ua7a4\ua7a4"+ + "\ua7a6\ua7a6\ua7a8\ua7a8\ua7aa\ua7aa\ua7ac\ua7ac\uff23\uff3c%\2\62;\u0662"+ + "\u066b\u06f2\u06fb\u07c2\u07cb\u0968\u0971\u09e8\u09f1\u0a68\u0a71\u0ae8"+ + "\u0af1\u0b68\u0b71\u0be8\u0bf1\u0c68\u0c71\u0ce8\u0cf1\u0d68\u0d71\u0e52"+ + "\u0e5b\u0ed2\u0edb\u0f22\u0f2b\u1042\u104b\u1092\u109b\u17e2\u17eb\u1812"+ + "\u181b\u1948\u1951\u19d2\u19db\u1a82\u1a8b\u1a92\u1a9b\u1b52\u1b5b\u1bb2"+ + "\u1bbb\u1c42\u1c4b\u1c52\u1c5b\ua622\ua62b\ua8d2\ua8db\ua902\ua90b\ua9d2"+ + "\ua9db\uaa52\uaa5b\uabf2\uabfb\uff12\uff1b\t\2\u16f0\u16f2\u2162\u2184"+ + "\u2187\u218a\u3009\u3009\u3023\u302b\u303a\u303c\ua6e8\ua6f1\5\2$$&&^"+ + "^\u0a82\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2"+ + "\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33"+ + "\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2"+ + "\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2"+ + "\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2"+ + "\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K"+ + "\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2"+ + "\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2"+ + "\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2\2k\3\2\2\2\2m\3\2\2\2\2o\3\2\2\2\2q"+ + "\3\2\2\2\2s\3\2\2\2\2u\3\2\2\2\2w\3\2\2\2\2y\3\2\2\2\2{\3\2\2\2\2}\3\2"+ + "\2\2\2\177\3\2\2\2\2\u0081\3\2\2\2\2\u0083\3\2\2\2\2\u0085\3\2\2\2\2\u0087"+ + "\3\2\2\2\2\u0089\3\2\2\2\2\u008b\3\2\2\2\2\u008d\3\2\2\2\2\u008f\3\2\2"+ + "\2\2\u0091\3\2\2\2\2\u0093\3\2\2\2\2\u0095\3\2\2\2\2\u0097\3\2\2\2\2\u0099"+ + "\3\2\2\2\2\u009b\3\2\2\2\2\u009d\3\2\2\2\2\u009f\3\2\2\2\2\u00a1\3\2\2"+ + "\2\2\u00a3\3\2\2\2\2\u00a5\3\2\2\2\2\u00a7\3\2\2\2\2\u00a9\3\2\2\2\2\u00ab"+ + "\3\2\2\2\2\u00ad\3\2\2\2\2\u00af\3\2\2\2\2\u00b1\3\2\2\2\2\u00b3\3\2\2"+ + "\2\2\u00b5\3\2\2\2\2\u00b7\3\2\2\2\2\u00b9\3\2\2\2\2\u00bb\3\2\2\2\2\u00bd"+ + "\3\2\2\2\2\u00bf\3\2\2\2\2\u00c1\3\2\2\2\2\u00c3\3\2\2\2\2\u00c5\3\2\2"+ + "\2\2\u00c7\3\2\2\2\2\u00c9\3\2\2\2\2\u00cb\3\2\2\2\2\u00cd\3\2\2\2\2\u00cf"+ + "\3\2\2\2\2\u00d1\3\2\2\2\2\u00d3\3\2\2\2\2\u00d5\3\2\2\2\2\u00d7\3\2\2"+ + "\2\2\u00d9\3\2\2\2\2\u00db\3\2\2\2\2\u00dd\3\2\2\2\2\u00df\3\2\2\2\2\u00e1"+ + "\3\2\2\2\2\u00e3\3\2\2\2\2\u00e5\3\2\2\2\2\u00e7\3\2\2\2\2\u00e9\3\2\2"+ + "\2\2\u00eb\3\2\2\2\2\u00ed\3\2\2\2\2\u00ef\3\2\2\2\2\u00f1\3\2\2\2\2\u00f3"+ + "\3\2\2\2\2\u00f5\3\2\2\2\2\u00f7\3\2\2\2\2\u00f9\3\2\2\2\2\u00fb\3\2\2"+ + "\2\2\u00fd\3\2\2\2\2\u00ff\3\2\2\2\2\u0101\3\2\2\2\2\u0103\3\2\2\2\2\u0105"+ + "\3\2\2\2\2\u0107\3\2\2\2\2\u0109\3\2\2\2\2\u010b\3\2\2\2\2\u010d\3\2\2"+ + "\2\2\u010f\3\2\2\2\2\u0111\3\2\2\2\2\u0113\3\2\2\2\2\u011b\3\2\2\2\2\u011f"+ + "\3\2\2\2\2\u0123\3\2\2\2\2\u0125\3\2\2\2\2\u0127\3\2\2\2\2\u0129\3\2\2"+ + "\2\2\u012b\3\2\2\2\2\u012d\3\2\2\2\2\u012f\3\2\2\2\2\u0139\3\2\2\2\2\u013b"+ + "\3\2\2\2\2\u013d\3\2\2\2\2\u013f\3\2\2\2\2\u0141\3\2\2\2\2\u0143\3\2\2"+ + "\2\2\u0145\3\2\2\2\3\u0147\3\2\2\2\3\u0149\3\2\2\2\3\u014b\3\2\2\2\3\u014d"+ + "\3\2\2\2\3\u014f\3\2\2\2\3\u0151\3\2\2\2\3\u0153\3\2\2\2\3\u0155\3\2\2"+ + "\2\3\u0157\3\2\2\2\3\u0159\3\2\2\2\3\u015b\3\2\2\2\3\u015d\3\2\2\2\3\u015f"+ + "\3\2\2\2\3\u0161\3\2\2\2\3\u0163\3\2\2\2\3\u0165\3\2\2\2\3\u0167\3\2\2"+ + "\2\3\u0169\3\2\2\2\3\u016b\3\2\2\2\3\u016d\3\2\2\2\3\u016f\3\2\2\2\3\u0171"+ + "\3\2\2\2\3\u0173\3\2\2\2\3\u0175\3\2\2\2\3\u0177\3\2\2\2\3\u0179\3\2\2"+ + "\2\3\u017b\3\2\2\2\3\u017d\3\2\2\2\3\u017f\3\2\2\2\3\u0181\3\2\2\2\3\u0183"+ + "\3\2\2\2\3\u0185\3\2\2\2\3\u0187\3\2\2\2\3\u0189\3\2\2\2\3\u018b\3\2\2"+ + "\2\3\u018d\3\2\2\2\3\u018f\3\2\2\2\3\u0191\3\2\2\2\3\u0193\3\2\2\2\3\u0195"+ + "\3\2\2\2\3\u0197\3\2\2\2\3\u0199\3\2\2\2\3\u019b\3\2\2\2\3\u019d\3\2\2"+ + "\2\3\u019f\3\2\2\2\3\u01a1\3\2\2\2\3\u01a3\3\2\2\2\3\u01a5\3\2\2\2\3\u01a7"+ + "\3\2\2\2\3\u01a9\3\2\2\2\3\u01ab\3\2\2\2\3\u01ad\3\2\2\2\3\u01af\3\2\2"+ + "\2\3\u01b1\3\2\2\2\3\u01b3\3\2\2\2\3\u01b5\3\2\2\2\3\u01b7\3\2\2\2\3\u01b9"+ + "\3\2\2\2\3\u01bb\3\2\2\2\3\u01bd\3\2\2\2\3\u01bf\3\2\2\2\3\u01c1\3\2\2"+ + "\2\3\u01c3\3\2\2\2\3\u01c5\3\2\2\2\3\u01c7\3\2\2\2\3\u01c9\3\2\2\2\3\u01cb"+ + "\3\2\2\2\3\u01cd\3\2\2\2\3\u01cf\3\2\2\2\3\u01d1\3\2\2\2\3\u01d3\3\2\2"+ + "\2\3\u01d5\3\2\2\2\3\u01d7\3\2\2\2\3\u01d9\3\2\2\2\3\u01db\3\2\2\2\3\u01dd"+ + "\3\2\2\2\3\u01df\3\2\2\2\3\u01e1\3\2\2\2\3\u01e3\3\2\2\2\3\u01e5\3\2\2"+ + "\2\3\u01e7\3\2\2\2\3\u01e9\3\2\2\2\3\u01eb\3\2\2\2\3\u01ed\3\2\2\2\3\u01ef"+ + "\3\2\2\2\3\u01f1\3\2\2\2\3\u01f3\3\2\2\2\3\u01f5\3\2\2\2\3\u01f7\3\2\2"+ + "\2\3\u01f9\3\2\2\2\3\u01fb\3\2\2\2\3\u01fd\3\2\2\2\3\u01ff\3\2\2\2\3\u0201"+ + "\3\2\2\2\3\u0203\3\2\2\2\3\u0205\3\2\2\2\3\u0207\3\2\2\2\3\u0209\3\2\2"+ + "\2\3\u020b\3\2\2\2\3\u020d\3\2\2\2\3\u020f\3\2\2\2\3\u0211\3\2\2\2\3\u0213"+ + "\3\2\2\2\3\u0215\3\2\2\2\3\u0217\3\2\2\2\3\u0219\3\2\2\2\3\u021b\3\2\2"+ + "\2\3\u021d\3\2\2\2\3\u021f\3\2\2\2\3\u0221\3\2\2\2\3\u0223\3\2\2\2\3\u0225"+ + "\3\2\2\2\3\u0227\3\2\2\2\3\u0229\3\2\2\2\3\u022b\3\2\2\2\3\u022d\3\2\2"+ + "\2\3\u022f\3\2\2\2\3\u0231\3\2\2\2\3\u0233\3\2\2\2\3\u0235\3\2\2\2\3\u0237"+ + "\3\2\2\2\4\u0239\3\2\2\2\4\u023b\3\2\2\2\4\u023d\3\2\2\2\4\u023f\3\2\2"+ + "\2\4\u0241\3\2\2\2\5\u0243\3\2\2\2\5\u0245\3\2\2\2\5\u0247\3\2\2\2\5\u0249"+ + "\3\2\2\2\5\u024b\3\2\2\2\5\u024d\3\2\2\2\5\u024f\3\2\2\2\6\u0251\3\2\2"+ + "\2\6\u0253\3\2\2\2\6\u0255\3\2\2\2\6\u0257\3\2\2\2\6\u0259\3\2\2\2\6\u025b"+ + "\3\2\2\2\6\u025d\3\2\2\2\6\u025f\3\2\2\2\6\u0261\3\2\2\2\6\u0263\3\2\2"+ + "\2\6\u0265\3\2\2\2\6\u0267\3\2\2\2\6\u0269\3\2\2\2\6\u026b\3\2\2\2\6\u026d"+ + "\3\2\2\2\6\u026f\3\2\2\2\6\u0271\3\2\2\2\6\u0273\3\2\2\2\6\u0275\3\2\2"+ + "\2\6\u0277\3\2\2\2\6\u0279\3\2\2\2\6\u027b\3\2\2\2\6\u027d\3\2\2\2\6\u027f"+ + "\3\2\2\2\6\u0281\3\2\2\2\6\u0283\3\2\2\2\6\u0285\3\2\2\2\6\u0287\3\2\2"+ + "\2\6\u0289\3\2\2\2\6\u028b\3\2\2\2\6\u028d\3\2\2\2\6\u028f\3\2\2\2\6\u0291"+ + "\3\2\2\2\6\u0293\3\2\2\2\6\u0295\3\2\2\2\6\u0297\3\2\2\2\6\u0299\3\2\2"+ + "\2\6\u029b\3\2\2\2\6\u029d\3\2\2\2\6\u029f\3\2\2\2\6\u02a1\3\2\2\2\6\u02a3"+ + "\3\2\2\2\6\u02a5\3\2\2\2\6\u02a7\3\2\2\2\6\u02a9\3\2\2\2\6\u02ab\3\2\2"+ + "\2\6\u02ad\3\2\2\2\6\u02af\3\2\2\2\6\u02b1\3\2\2\2\6\u02b3\3\2\2\2\6\u02b5"+ + "\3\2\2\2\6\u02b7\3\2\2\2\6\u02b9\3\2\2\2\6\u02bb\3\2\2\2\6\u02bd\3\2\2"+ + "\2\6\u02bf\3\2\2\2\6\u02c1\3\2\2\2\6\u02c3\3\2\2\2\6\u02c5\3\2\2\2\6\u02c7"+ + "\3\2\2\2\6\u02c9\3\2\2\2\6\u02cb\3\2\2\2\6\u02cd\3\2\2\2\6\u02cf\3\2\2"+ + "\2\6\u02d1\3\2\2\2\6\u02d3\3\2\2\2\6\u02d5\3\2\2\2\7\u02d7\3\2\2\2\t\u02e2"+ + "\3\2\2\2\13\u02f1\3\2\2\2\r\u02fc\3\2\2\2\17\u0303\3\2\2\2\21\u0305\3"+ + "\2\2\2\23\u0309\3\2\2\2\25\u030b\3\2\2\2\27\u030d\3\2\2\2\31\u0311\3\2"+ + "\2\2\33\u0313\3\2\2\2\35\u0317\3\2\2\2\37\u0319\3\2\2\2!\u031b\3\2\2\2"+ + "#\u031d\3\2\2\2%\u031f\3\2\2\2\'\u0321\3\2\2\2)\u0323\3\2\2\2+\u0325\3"+ + "\2\2\2-\u0327\3\2\2\2/\u032a\3\2\2\2\61\u032d\3\2\2\2\63\u0330\3\2\2\2"+ + "\65\u0333\3\2\2\2\67\u0335\3\2\2\29\u0337\3\2\2\2;\u0339\3\2\2\2=\u033b"+ + "\3\2\2\2?\u033e\3\2\2\2A\u0341\3\2\2\2C\u0344\3\2\2\2E\u0347\3\2\2\2G"+ + "\u034a\3\2\2\2I\u034d\3\2\2\2K\u0350\3\2\2\2M\u0353\3\2\2\2O\u0356\3\2"+ + "\2\2Q\u035a\3\2\2\2S\u035d\3\2\2\2U\u035f\3\2\2\2W\u0361\3\2\2\2Y\u0363"+ + "\3\2\2\2[\u0366\3\2\2\2]\u0368\3\2\2\2_\u036a\3\2\2\2a\u036d\3\2\2\2c"+ + "\u0370\3\2\2\2e\u0373\3\2\2\2g\u0377\3\2\2\2i\u037b\3\2\2\2k\u037e\3\2"+ + "\2\2m\u0382\3\2\2\2o\u0384\3\2\2\2q\u038e\3\2\2\2s\u039a\3\2\2\2u\u03a3"+ + "\3\2\2\2w\u03a9\3\2\2\2y\u03b1\3\2\2\2{\u03b8\3\2\2\2}\u03be\3\2\2\2\177"+ + "\u03c8\3\2\2\2\u0081\u03cc\3\2\2\2\u0083\u03d3\3\2\2\2\u0085\u03d7\3\2"+ + "\2\2\u0087\u03db\3\2\2\2\u0089\u03e5\3\2\2\2\u008b\u03f1\3\2\2\2\u008d"+ + "\u03f4\3\2\2\2\u008f\u03fe\3\2\2\2\u0091\u0403\3\2\2\2\u0093\u0408\3\2"+ + "\2\2\u0095\u040e\3\2\2\2\u0097\u0415\3\2\2\2\u0099\u041b\3\2\2\2\u009b"+ + "\u041e\3\2\2\2\u009d\u0423\3\2\2\2\u009f\u0428\3\2\2\2\u00a1\u042c\3\2"+ + "\2\2\u00a3\u0432\3\2\2\2\u00a5\u043a\3\2\2\2\u00a7\u043e\3\2\2\2\u00a9"+ + "\u0441\3\2\2\2\u00ab\u0447\3\2\2\2\u00ad\u044d\3\2\2\2\u00af\u0454\3\2"+ + "\2\2\u00b1\u045d\3\2\2\2\u00b3\u0463\3\2\2\2\u00b5\u0466\3\2\2\2\u00b7"+ + "\u0469\3\2\2\2\u00b9\u046c\3\2\2\2\u00bb\u0476\3\2\2\2\u00bd\u0480\3\2"+ + "\2\2\u00bf\u0484\3\2\2\2\u00c1\u048b\3\2\2\2\u00c3\u0495\3\2\2\2\u00c5"+ + "\u049a\3\2\2\2\u00c7\u049f\3\2\2\2\u00c9\u04a3\3\2\2\2\u00cb\u04a7\3\2"+ + "\2\2\u00cd\u04b1\3\2\2\2\u00cf\u04b8\3\2\2\2\u00d1\u04c2\3\2\2\2\u00d3"+ + "\u04cc\3\2\2\2\u00d5\u04d4\3\2\2\2\u00d7\u04db\3\2\2\2\u00d9\u04e3\3\2"+ + "\2\2\u00db\u04ed\3\2\2\2\u00dd\u04f6\3\2\2\2\u00df\u04fb\3\2\2\2\u00e1"+ + "\u0502\3\2\2\2\u00e3\u050d\3\2\2\2\u00e5\u0512\3\2\2\2\u00e7\u0518\3\2"+ + "\2\2\u00e9\u0520\3\2\2\2\u00eb\u0529\3\2\2\2\u00ed\u0530\3\2\2\2\u00ef"+ + "\u0536\3\2\2\2\u00f1\u053f\3\2\2\2\u00f3\u0547\3\2\2\2\u00f5\u0550\3\2"+ + "\2\2\u00f7\u0559\3\2\2\2\u00f9\u055f\3\2\2\2\u00fb\u0564\3\2\2\2\u00fd"+ + "\u056a\3\2\2\2\u00ff\u0573\3\2\2\2\u0101\u057a\3\2\2\2\u0103\u0583\3\2"+ + "\2\2\u0105\u058f\3\2\2\2\u0107\u0597\3\2\2\2\u0109\u059b\3\2\2\2\u010b"+ + "\u05a3\3\2\2\2\u010d\u05a7\3\2\2\2\u010f\u05c3\3\2\2\2\u0111\u061e\3\2"+ + "\2\2\u0113\u067d\3\2\2\2\u0115\u067f\3\2\2\2\u0117\u0681\3\2\2\2\u0119"+ + "\u0683\3\2\2\2\u011b\u0685\3\2\2\2\u011d\u068f\3\2\2\2\u011f\u0691\3\2"+ + "\2\2\u0121\u069b\3\2\2\2\u0123\u06a6\3\2\2\2\u0125\u06a8\3\2\2\2\u0127"+ + "\u06c0\3\2\2\2\u0129\u06c2\3\2\2\2\u012b\u06c5\3\2\2\2\u012d\u06c8\3\2"+ + "\2\2\u012f\u06cb\3\2\2\2\u0131\u06d4\3\2\2\2\u0133\u06d6\3\2\2\2\u0135"+ + "\u06dd\3\2\2\2\u0137\u06e6\3\2\2\2\u0139\u06e8\3\2\2\2\u013b\u06ea\3\2"+ + "\2\2\u013d\u06ec\3\2\2\2\u013f\u06ee\3\2\2\2\u0141\u06f0\3\2\2\2\u0143"+ + "\u06f2\3\2\2\2\u0145\u06f4\3\2\2\2\u0147\u06f6\3\2\2\2\u0149\u06fb\3\2"+ + "\2\2\u014b\u0700\3\2\2\2\u014d\u0705\3\2\2\2\u014f\u070a\3\2\2\2\u0151"+ + "\u070e\3\2\2\2\u0153\u0712\3\2\2\2\u0155\u0716\3\2\2\2\u0157\u071a\3\2"+ + "\2\2\u0159\u071e\3\2\2\2\u015b\u0722\3\2\2\2\u015d\u0726\3\2\2\2\u015f"+ + "\u072a\3\2\2\2\u0161\u072e\3\2\2\2\u0163\u0732\3\2\2\2\u0165\u0736\3\2"+ + "\2\2\u0167\u073a\3\2\2\2\u0169\u073e\3\2\2\2\u016b\u0742\3\2\2\2\u016d"+ + "\u0746\3\2\2\2\u016f\u074a\3\2\2\2\u0171\u074e\3\2\2\2\u0173\u0752\3\2"+ + "\2\2\u0175\u0756\3\2\2\2\u0177\u075a\3\2\2\2\u0179\u075e\3\2\2\2\u017b"+ + "\u0762\3\2\2\2\u017d\u0766\3\2\2\2\u017f\u076a\3\2\2\2\u0181\u076e\3\2"+ + "\2\2\u0183\u0772\3\2\2\2\u0185\u0776\3\2\2\2\u0187\u077a\3\2\2\2\u0189"+ + "\u077e\3\2\2\2\u018b\u0782\3\2\2\2\u018d\u0786\3\2\2\2\u018f\u078a\3\2"+ + "\2\2\u0191\u078e\3\2\2\2\u0193\u0792\3\2\2\2\u0195\u0796\3\2\2\2\u0197"+ + "\u079a\3\2\2\2\u0199\u079e\3\2\2\2\u019b\u07a2\3\2\2\2\u019d\u07a6\3\2"+ + "\2\2\u019f\u07aa\3\2\2\2\u01a1\u07ae\3\2\2\2\u01a3\u07b2\3\2\2\2\u01a5"+ + "\u07b6\3\2\2\2\u01a7\u07ba\3\2\2\2\u01a9\u07be\3\2\2\2\u01ab\u07c3\3\2"+ + "\2\2\u01ad\u07c8\3\2\2\2\u01af\u07cc\3\2\2\2\u01b1\u07d0\3\2\2\2\u01b3"+ + "\u07d4\3\2\2\2\u01b5\u07d8\3\2\2\2\u01b7\u07dc\3\2\2\2\u01b9\u07e0\3\2"+ + "\2\2\u01bb\u07e4\3\2\2\2\u01bd\u07e8\3\2\2\2\u01bf\u07ec\3\2\2\2\u01c1"+ + "\u07f0\3\2\2\2\u01c3\u07f4\3\2\2\2\u01c5\u07f8\3\2\2\2\u01c7\u07fc\3\2"+ + "\2\2\u01c9\u0800\3\2\2\2\u01cb\u0804\3\2\2\2\u01cd\u0808\3\2\2\2\u01cf"+ + "\u080c\3\2\2\2\u01d1\u0810\3\2\2\2\u01d3\u0814\3\2\2\2\u01d5\u0818\3\2"+ + "\2\2\u01d7\u081c\3\2\2\2\u01d9\u0820\3\2\2\2\u01db\u0824\3\2\2\2\u01dd"+ + "\u0828\3\2\2\2\u01df\u082c\3\2\2\2\u01e1\u0830\3\2\2\2\u01e3\u0834\3\2"+ + "\2\2\u01e5\u0838\3\2\2\2\u01e7\u083c\3\2\2\2\u01e9\u0840\3\2\2\2\u01eb"+ + "\u0844\3\2\2\2\u01ed\u0848\3\2\2\2\u01ef\u084c\3\2\2\2\u01f1\u0850\3\2"+ + "\2\2\u01f3\u0854\3\2\2\2\u01f5\u0858\3\2\2\2\u01f7\u085c\3\2\2\2\u01f9"+ + "\u0860\3\2\2\2\u01fb\u0864\3\2\2\2\u01fd\u0868\3\2\2\2\u01ff\u086c\3\2"+ + "\2\2\u0201\u0870\3\2\2\2\u0203\u0874\3\2\2\2\u0205\u0878\3\2\2\2\u0207"+ + "\u087c\3\2\2\2\u0209\u0880\3\2\2\2\u020b\u0884\3\2\2\2\u020d\u0888\3\2"+ + "\2\2\u020f\u088c\3\2\2\2\u0211\u0890\3\2\2\2\u0213\u0894\3\2\2\2\u0215"+ + "\u0898\3\2\2\2\u0217\u089c\3\2\2\2\u0219\u08a0\3\2\2\2\u021b\u08a4\3\2"+ + "\2\2\u021d\u08a8\3\2\2\2\u021f\u08ac\3\2\2\2\u0221\u08b0\3\2\2\2\u0223"+ + "\u08b4\3\2\2\2\u0225\u08b8\3\2\2\2\u0227\u08bc\3\2\2\2\u0229\u08c0\3\2"+ + "\2\2\u022b\u08c4\3\2\2\2\u022d\u08c8\3\2\2\2\u022f\u08cc\3\2\2\2\u0231"+ + "\u08d0\3\2\2\2\u0233\u08d6\3\2\2\2\u0235\u08da\3\2\2\2\u0237\u08de\3\2"+ + "\2\2\u0239\u08e2\3\2\2\2\u023b\u08e6\3\2\2\2\u023d\u08ee\3\2\2\2\u023f"+ + "\u08f3\3\2\2\2\u0241\u08f5\3\2\2\2\u0243\u08fb\3\2\2\2\u0245\u0904\3\2"+ + "\2\2\u0247\u0908\3\2\2\2\u0249\u0910\3\2\2\2\u024b\u0912\3\2\2\2\u024d"+ + "\u0915\3\2\2\2\u024f\u091a\3\2\2\2\u0251\u091e\3\2\2\2\u0253\u0923\3\2"+ + "\2\2\u0255\u0928\3\2\2\2\u0257\u092d\3\2\2\2\u0259\u0931\3\2\2\2\u025b"+ + "\u0935\3\2\2\2\u025d\u093a\3\2\2\2\u025f\u093e\3\2\2\2\u0261\u0942\3\2"+ + "\2\2\u0263\u0946\3\2\2\2\u0265\u094a\3\2\2\2\u0267\u094e\3\2\2\2\u0269"+ + "\u0952\3\2\2\2\u026b\u0956\3\2\2\2\u026d\u095a\3\2\2\2\u026f\u095e\3\2"+ + "\2\2\u0271\u0962\3\2\2\2\u0273\u0966\3\2\2\2\u0275\u096a\3\2\2\2\u0277"+ + "\u096e\3\2\2\2\u0279\u0972\3\2\2\2\u027b\u0976\3\2\2\2\u027d\u097a\3\2"+ + "\2\2\u027f\u097e\3\2\2\2\u0281\u0982\3\2\2\2\u0283\u0986\3\2\2\2\u0285"+ + "\u098a\3\2\2\2\u0287\u098e\3\2\2\2\u0289\u0992\3\2\2\2\u028b\u0996\3\2"+ + "\2\2\u028d\u099a\3\2\2\2\u028f\u099e\3\2\2\2\u0291\u09a2\3\2\2\2\u0293"+ + "\u09a6\3\2\2\2\u0295\u09aa\3\2\2\2\u0297\u09ae\3\2\2\2\u0299\u09b2\3\2"+ + "\2\2\u029b\u09b6\3\2\2\2\u029d\u09ba\3\2\2\2\u029f\u09be\3\2\2\2\u02a1"+ + "\u09c2\3\2\2\2\u02a3\u09c6\3\2\2\2\u02a5\u09ca\3\2\2\2\u02a7\u09ce\3\2"+ + "\2\2\u02a9\u09d2\3\2\2\2\u02ab\u09d4\3\2\2\2\u02ad\u09d8\3\2\2\2\u02af"+ + "\u09dc\3\2\2\2\u02b1\u09e0\3\2\2\2\u02b3\u09e4\3\2\2\2\u02b5\u09e8\3\2"+ + "\2\2\u02b7\u09ec\3\2\2\2\u02b9\u09f1\3\2\2\2\u02bb\u09f6\3\2\2\2\u02bd"+ + "\u09fa\3\2\2\2\u02bf\u09fe\3\2\2\2\u02c1\u0a02\3\2\2\2\u02c3\u0a06\3\2"+ + "\2\2\u02c5\u0a0a\3\2\2\2\u02c7\u0a0e\3\2\2\2\u02c9\u0a12\3\2\2\2\u02cb"+ + "\u0a16\3\2\2\2\u02cd\u0a1a\3\2\2\2\u02cf\u0a1e\3\2\2\2\u02d1\u0a24\3\2"+ + "\2\2\u02d3\u0a28\3\2\2\2\u02d5\u0a2c\3\2\2\2\u02d7\u02d8\7%\2\2\u02d8"+ + "\u02d9\7#\2\2\u02d9\u02dd\3\2\2\2\u02da\u02dc\n\2\2\2\u02db\u02da\3\2"+ + "\2\2\u02dc\u02df\3\2\2\2\u02dd\u02db\3\2\2\2\u02dd\u02de\3\2\2\2\u02de"+ + "\u02e0\3\2\2\2\u02df\u02dd\3\2\2\2\u02e0\u02e1\b\2\2\2\u02e1\b\3\2\2\2"+ + "\u02e2\u02e3\7\61\2\2\u02e3\u02e4\7,\2\2\u02e4\u02e9\3\2\2\2\u02e5\u02e8"+ + "\5\t\3\2\u02e6\u02e8\13\2\2\2\u02e7\u02e5\3\2\2\2\u02e7\u02e6\3\2\2\2"+ + "\u02e8\u02eb\3\2\2\2\u02e9\u02ea\3\2\2\2\u02e9\u02e7\3\2\2\2\u02ea\u02ec"+ + "\3\2\2\2\u02eb\u02e9\3\2\2\2\u02ec\u02ed\7,\2\2\u02ed\u02ee\7\61\2\2\u02ee"+ + "\u02ef\3\2\2\2\u02ef\u02f0\b\3\2\2\u02f0\n\3\2\2\2\u02f1\u02f2\7\61\2"+ + "\2\u02f2\u02f3\7\61\2\2\u02f3\u02f7\3\2\2\2\u02f4\u02f6\n\2\2\2\u02f5"+ + "\u02f4\3\2\2\2\u02f6\u02f9\3\2\2\2\u02f7\u02f5\3\2\2\2\u02f7\u02f8\3\2"+ + "\2\2\u02f8\u02fa\3\2\2\2\u02f9\u02f7\3\2\2\2\u02fa\u02fb\b\4\2\2\u02fb"+ + "\f\3\2\2\2\u02fc\u02fd\t\3\2\2\u02fd\u02fe\3\2\2\2\u02fe\u02ff\b\5\3\2"+ + "\u02ff\16\3\2\2\2\u0300\u0304\7\f\2\2\u0301\u0302\7\17\2\2\u0302\u0304"+ + "\7\f\2\2\u0303\u0300\3\2\2\2\u0303\u0301\3\2\2\2\u0304\20\3\2\2\2\u0305"+ + "\u0306\7\60\2\2\u0306\u0307\7\60\2\2\u0307\u0308\7\60\2\2\u0308\22\3\2"+ + "\2\2\u0309\u030a\7\60\2\2\u030a\24\3\2\2\2\u030b\u030c\7.\2\2\u030c\26"+ + "\3\2\2\2\u030d\u030e\7*\2\2\u030e\u030f\3\2\2\2\u030f\u0310\b\n\4\2\u0310"+ + "\30\3\2\2\2\u0311\u0312\7+\2\2\u0312\32\3\2\2\2\u0313\u0314\7]\2\2\u0314"+ + "\u0315\3\2\2\2\u0315\u0316\b\f\4\2\u0316\34\3\2\2\2\u0317\u0318\7_\2\2"+ + "\u0318\36\3\2\2\2\u0319\u031a\7}\2\2\u031a \3\2\2\2\u031b\u031c\7\177"+ + "\2\2\u031c\"\3\2\2\2\u031d\u031e\7,\2\2\u031e$\3\2\2\2\u031f\u0320\7\'"+ + "\2\2\u0320&\3\2\2\2\u0321\u0322\7\61\2\2\u0322(\3\2\2\2\u0323\u0324\7"+ + "-\2\2\u0324*\3\2\2\2\u0325\u0326\7/\2\2\u0326,\3\2\2\2\u0327\u0328\7-"+ + "\2\2\u0328\u0329\7-\2\2\u0329.\3\2\2\2\u032a\u032b\7/\2\2\u032b\u032c"+ + "\7/\2\2\u032c\60\3\2\2\2\u032d\u032e\7(\2\2\u032e\u032f\7(\2\2\u032f\62"+ + "\3\2\2\2\u0330\u0331\7~\2\2\u0331\u0332\7~\2\2\u0332\64\3\2\2\2\u0333"+ + "\u0334\7#\2\2\u0334\66\3\2\2\2\u0335\u0336\7<\2\2\u03368\3\2\2\2\u0337"+ + "\u0338\7=\2\2\u0338:\3\2\2\2\u0339\u033a\7?\2\2\u033a<\3\2\2\2\u033b\u033c"+ + "\7-\2\2\u033c\u033d\7?\2\2\u033d>\3\2\2\2\u033e\u033f\7/\2\2\u033f\u0340"+ + "\7?\2\2\u0340@\3\2\2\2\u0341\u0342\7,\2\2\u0342\u0343\7?\2\2\u0343B\3"+ + "\2\2\2\u0344\u0345\7\61\2\2\u0345\u0346\7?\2\2\u0346D\3\2\2\2\u0347\u0348"+ + "\7\'\2\2\u0348\u0349\7?\2\2\u0349F\3\2\2\2\u034a\u034b\7/\2\2\u034b\u034c"+ + "\7@\2\2\u034cH\3\2\2\2\u034d\u034e\7?\2\2\u034e\u034f\7@\2\2\u034fJ\3"+ + "\2\2\2\u0350\u0351\7\60\2\2\u0351\u0352\7\60\2\2\u0352L\3\2\2\2\u0353"+ + "\u0354\7<\2\2\u0354\u0355\7<\2\2\u0355N\3\2\2\2\u0356\u0357\7A\2\2\u0357"+ + "\u0358\7<\2\2\u0358\u0359\7<\2\2\u0359P\3\2\2\2\u035a\u035b\7=\2\2\u035b"+ + "\u035c\7=\2\2\u035cR\3\2\2\2\u035d\u035e\7%\2\2\u035eT\3\2\2\2\u035f\u0360"+ + "\7B\2\2\u0360V\3\2\2\2\u0361\u0362\7A\2\2\u0362X\3\2\2\2\u0363\u0364\7"+ + "A\2\2\u0364\u0365\7<\2\2\u0365Z\3\2\2\2\u0366\u0367\7>\2\2\u0367\\\3\2"+ + "\2\2\u0368\u0369\7@\2\2\u0369^\3\2\2\2\u036a\u036b\7>\2\2\u036b\u036c"+ + "\7?\2\2\u036c`\3\2\2\2\u036d\u036e\7@\2\2\u036e\u036f\7?\2\2\u036fb\3"+ + "\2\2\2\u0370\u0371\7#\2\2\u0371\u0372\7?\2\2\u0372d\3\2\2\2\u0373\u0374"+ + "\7#\2\2\u0374\u0375\7?\2\2\u0375\u0376\7?\2\2\u0376f\3\2\2\2\u0377\u0378"+ + "\7c\2\2\u0378\u0379\7u\2\2\u0379\u037a\7A\2\2\u037ah\3\2\2\2\u037b\u037c"+ + "\7?\2\2\u037c\u037d\7?\2\2\u037dj\3\2\2\2\u037e\u037f\7?\2\2\u037f\u0380"+ + "\7?\2\2\u0380\u0381\7?\2\2\u0381l\3\2\2\2\u0382\u0383\7)\2\2\u0383n\3"+ + "\2\2\2\u0384\u0385\7t\2\2\u0385\u0386\7g\2\2\u0386\u0387\7v\2\2\u0387"+ + "\u0388\7w\2\2\u0388\u0389\7t\2\2\u0389\u038a\7p\2\2\u038a\u038b\7B\2\2"+ + "\u038b\u038c\3\2\2\2\u038c\u038d\5\u0127\u0092\2\u038dp\3\2\2\2\u038e"+ + "\u038f\7e\2\2\u038f\u0390\7q\2\2\u0390\u0391\7p\2\2\u0391\u0392\7v\2\2"+ + "\u0392\u0393\7k\2\2\u0393\u0394\7p\2\2\u0394\u0395\7w\2\2\u0395\u0396"+ + "\7g\2\2\u0396\u0397\7B\2\2\u0397\u0398\3\2\2\2\u0398\u0399\5\u0127\u0092"+ + "\2\u0399r\3\2\2\2\u039a\u039b\7d\2\2\u039b\u039c\7t\2\2\u039c\u039d\7"+ + "g\2\2\u039d\u039e\7c\2\2\u039e\u039f\7m\2\2\u039f\u03a0\7B\2\2\u03a0\u03a1"+ + "\3\2\2\2\u03a1\u03a2\5\u0127\u0092\2\u03a2t\3\2\2\2\u03a3\u03a4\7B\2\2"+ + "\u03a4\u03a5\7h\2\2\u03a5\u03a6\7k\2\2\u03a6\u03a7\7n\2\2\u03a7\u03a8"+ + "\7g\2\2\u03a8v\3\2\2\2\u03a9\u03aa\7r\2\2\u03aa\u03ab\7c\2\2\u03ab\u03ac"+ + "\7e\2\2\u03ac\u03ad\7m\2\2\u03ad\u03ae\7c\2\2\u03ae\u03af\7i\2\2\u03af"+ + "\u03b0\7g\2\2\u03b0x\3\2\2\2\u03b1\u03b2\7k\2\2\u03b2\u03b3\7o\2\2\u03b3"+ + "\u03b4\7r\2\2\u03b4\u03b5\7q\2\2\u03b5\u03b6\7t\2\2\u03b6\u03b7\7v\2\2"+ + "\u03b7z\3\2\2\2\u03b8\u03b9\7e\2\2\u03b9\u03ba\7n\2\2\u03ba\u03bb\7c\2"+ + "\2\u03bb\u03bc\7u\2\2\u03bc\u03bd\7u\2\2\u03bd|\3\2\2\2\u03be\u03bf\7"+ + "k\2\2\u03bf\u03c0\7p\2\2\u03c0\u03c1\7v\2\2\u03c1\u03c2\7g\2\2\u03c2\u03c3"+ + "\7t\2\2\u03c3\u03c4\7h\2\2\u03c4\u03c5\7c\2\2\u03c5\u03c6\7e\2\2\u03c6"+ + "\u03c7\7g\2\2\u03c7~\3\2\2\2\u03c8\u03c9\7h\2\2\u03c9\u03ca\7w\2\2\u03ca"+ + "\u03cb\7p\2\2\u03cb\u0080\3\2\2\2\u03cc\u03cd\7q\2\2\u03cd\u03ce\7d\2"+ + "\2\u03ce\u03cf\7l\2\2\u03cf\u03d0\7g\2\2\u03d0\u03d1\7e\2\2\u03d1\u03d2"+ + "\7v\2\2\u03d2\u0082\3\2\2\2\u03d3\u03d4\7x\2\2\u03d4\u03d5\7c\2\2\u03d5"+ + "\u03d6\7n\2\2\u03d6\u0084\3\2\2\2\u03d7\u03d8\7x\2\2\u03d8\u03d9\7c\2"+ + "\2\u03d9\u03da\7t\2\2\u03da\u0086\3\2\2\2\u03db\u03dc\7v\2\2\u03dc\u03dd"+ + "\7{\2\2\u03dd\u03de\7r\2\2\u03de\u03df\7g\2\2\u03df\u03e0\7c\2\2\u03e0"+ + "\u03e1\7n\2\2\u03e1\u03e2\7k\2\2\u03e2\u03e3\7c\2\2\u03e3\u03e4\7u\2\2"+ + "\u03e4\u0088\3\2\2\2\u03e5\u03e6\7e\2\2\u03e6\u03e7\7q\2\2\u03e7\u03e8"+ + "\7p\2\2\u03e8\u03e9\7u\2\2\u03e9\u03ea\7v\2\2\u03ea\u03eb\7t\2\2\u03eb"+ + "\u03ec\7w\2\2\u03ec\u03ed\7e\2\2\u03ed\u03ee\7v\2\2\u03ee\u03ef\7q\2\2"+ + "\u03ef\u03f0\7t\2\2\u03f0\u008a\3\2\2\2\u03f1\u03f2\7d\2\2\u03f2\u03f3"+ + "\7{\2\2\u03f3\u008c\3\2\2\2\u03f4\u03f5\7e\2\2\u03f5\u03f6\7q\2\2\u03f6"+ + "\u03f7\7o\2\2\u03f7\u03f8\7r\2\2\u03f8\u03f9\7c\2\2\u03f9\u03fa\7p\2\2"+ + "\u03fa\u03fb\7k\2\2\u03fb\u03fc\7q\2\2\u03fc\u03fd\7p\2\2\u03fd\u008e"+ + "\3\2\2\2\u03fe\u03ff\7k\2\2\u03ff\u0400\7p\2\2\u0400\u0401\7k\2\2\u0401"+ + "\u0402\7v\2\2\u0402\u0090\3\2\2\2\u0403\u0404\7v\2\2\u0404\u0405\7j\2"+ + "\2\u0405\u0406\7k\2\2\u0406\u0407\7u\2\2\u0407\u0092\3\2\2\2\u0408\u0409"+ + "\7u\2\2\u0409\u040a\7w\2\2\u040a\u040b\7r\2\2\u040b\u040c\7g\2\2\u040c"+ + "\u040d\7t\2\2\u040d\u0094\3\2\2\2\u040e\u040f\7v\2\2\u040f\u0410\7{\2"+ + "\2\u0410\u0411\7r\2\2\u0411\u0412\7g\2\2\u0412\u0413\7q\2\2\u0413\u0414"+ + "\7h\2\2\u0414\u0096\3\2\2\2\u0415\u0416\7y\2\2\u0416\u0417\7j\2\2\u0417"+ + "\u0418\7g\2\2\u0418\u0419\7t\2\2\u0419\u041a\7g\2\2\u041a\u0098\3\2\2"+ + "\2\u041b\u041c\7k\2\2\u041c\u041d\7h\2\2\u041d\u009a\3\2\2\2\u041e\u041f"+ + "\7g\2\2\u041f\u0420\7n\2\2\u0420\u0421\7u\2\2\u0421\u0422\7g\2\2\u0422"+ + "\u009c\3\2\2\2\u0423\u0424\7y\2\2\u0424\u0425\7j\2\2\u0425\u0426\7g\2"+ + "\2\u0426\u0427\7p\2\2\u0427\u009e\3\2\2\2\u0428\u0429\7v\2\2\u0429\u042a"+ + "\7t\2\2\u042a\u042b\7{\2\2\u042b\u00a0\3\2\2\2\u042c\u042d\7e\2\2\u042d"+ + "\u042e\7c\2\2\u042e\u042f\7v\2\2\u042f\u0430\7e\2\2\u0430\u0431\7j\2\2"+ + "\u0431\u00a2\3\2\2\2\u0432\u0433\7h\2\2\u0433\u0434\7k\2\2\u0434\u0435"+ + "\7p\2\2\u0435\u0436\7c\2\2\u0436\u0437\7n\2\2\u0437\u0438\7n\2\2\u0438"+ + "\u0439\7{\2\2\u0439\u00a4\3\2\2\2\u043a\u043b\7h\2\2\u043b\u043c\7q\2"+ + "\2\u043c\u043d\7t\2\2\u043d\u00a6\3\2\2\2\u043e\u043f\7f\2\2\u043f\u0440"+ + "\7q\2\2\u0440\u00a8\3\2\2\2\u0441\u0442\7y\2\2\u0442\u0443\7j\2\2\u0443"+ + "\u0444\7k\2\2\u0444\u0445\7n\2\2\u0445\u0446\7g\2\2\u0446\u00aa\3\2\2"+ + "\2\u0447\u0448\7v\2\2\u0448\u0449\7j\2\2\u0449\u044a\7t\2\2\u044a\u044b"+ + "\7q\2\2\u044b\u044c\7y\2\2\u044c\u00ac\3\2\2\2\u044d\u044e\7t\2\2\u044e"+ + "\u044f\7g\2\2\u044f\u0450\7v\2\2\u0450\u0451\7w\2\2\u0451\u0452\7t\2\2"+ + "\u0452\u0453\7p\2\2\u0453\u00ae\3\2\2\2\u0454\u0455\7e\2\2\u0455\u0456"+ + "\7q\2\2\u0456\u0457\7p\2\2\u0457\u0458\7v\2\2\u0458\u0459\7k\2\2\u0459"+ + "\u045a\7p\2\2\u045a\u045b\7w\2\2\u045b\u045c\7g\2\2\u045c\u00b0\3\2\2"+ + "\2\u045d\u045e\7d\2\2\u045e\u045f\7t\2\2\u045f\u0460\7g\2\2\u0460\u0461"+ + "\7c\2\2\u0461\u0462\7m\2\2\u0462\u00b2\3\2\2\2\u0463\u0464\7c\2\2\u0464"+ + "\u0465\7u\2\2\u0465\u00b4\3\2\2\2\u0466\u0467\7k\2\2\u0467\u0468\7u\2"+ + "\2\u0468\u00b6\3\2\2\2\u0469\u046a\7k\2\2\u046a\u046b\7p\2\2\u046b\u00b8"+ + "\3\2\2\2\u046c\u046d\7#\2\2\u046d\u046e\7k\2\2\u046e\u046f\7u\2\2\u046f"+ + "\u0472\3\2\2\2\u0470\u0473\5\r\5\2\u0471\u0473\5\17\6\2\u0472\u0470\3"+ + "\2\2\2\u0472\u0471\3\2\2\2\u0473\u0474\3\2\2\2\u0474\u0472\3\2\2\2\u0474"+ + "\u0475\3\2\2\2\u0475\u00ba\3\2\2\2\u0476\u0477\7#\2\2\u0477\u0478\7k\2"+ + "\2\u0478\u0479\7p\2\2\u0479\u047c\3\2\2\2\u047a\u047d\5\r\5\2\u047b\u047d"+ + "\5\17\6\2\u047c\u047a\3\2\2\2\u047c\u047b\3\2\2\2\u047d\u047e\3\2\2\2"+ + "\u047e\u047c\3\2\2\2\u047e\u047f\3\2\2\2\u047f\u00bc\3\2\2\2\u0480\u0481"+ + "\7q\2\2\u0481\u0482\7w\2\2\u0482\u0483\7v\2\2\u0483\u00be\3\2\2\2\u0484"+ + "\u0485\7B\2\2\u0485\u0486\7h\2\2\u0486\u0487\7k\2\2\u0487\u0488\7g\2\2"+ + "\u0488\u0489\7n\2\2\u0489\u048a\7f\2\2\u048a\u00c0\3\2\2\2\u048b\u048c"+ + "\7B\2\2\u048c\u048d\7r\2\2\u048d\u048e\7t\2\2\u048e\u048f\7q\2\2\u048f"+ + "\u0490\7r\2\2\u0490\u0491\7g\2\2\u0491\u0492\7t\2\2\u0492\u0493\7v\2\2"+ + "\u0493\u0494\7{\2\2\u0494\u00c2\3\2\2\2\u0495\u0496\7B\2\2\u0496\u0497"+ + "\7i\2\2\u0497\u0498\7g\2\2\u0498\u0499\7v\2\2\u0499\u00c4\3\2\2\2\u049a"+ + "\u049b\7B\2\2\u049b\u049c\7u\2\2\u049c\u049d\7g\2\2\u049d\u049e\7v\2\2"+ + "\u049e\u00c6\3\2\2\2\u049f\u04a0\7i\2\2\u04a0\u04a1\7g\2\2\u04a1\u04a2"+ + "\7v\2\2\u04a2\u00c8\3\2\2\2\u04a3\u04a4\7u\2\2\u04a4\u04a5\7g\2\2\u04a5"+ + "\u04a6\7v\2\2\u04a6\u00ca\3\2\2\2\u04a7\u04a8\7B\2\2\u04a8\u04a9\7t\2"+ + "\2\u04a9\u04aa\7g\2\2\u04aa\u04ab\7e\2\2\u04ab\u04ac\7g\2\2\u04ac\u04ad"+ + "\7k\2\2\u04ad\u04ae\7x\2\2\u04ae\u04af\7g\2\2\u04af\u04b0\7t\2\2\u04b0"+ + "\u00cc\3\2\2\2\u04b1\u04b2\7B\2\2\u04b2\u04b3\7r\2\2\u04b3\u04b4\7c\2"+ + "\2\u04b4\u04b5\7t\2\2\u04b5\u04b6\7c\2\2\u04b6\u04b7\7o\2\2\u04b7\u00ce"+ + "\3\2\2\2\u04b8\u04b9\7B\2\2\u04b9\u04ba\7u\2\2\u04ba\u04bb\7g\2\2\u04bb"+ + "\u04bc\7v\2\2\u04bc\u04bd\7r\2\2\u04bd\u04be\7c\2\2\u04be\u04bf\7t\2\2"+ + "\u04bf\u04c0\7c\2\2\u04c0\u04c1\7o\2\2\u04c1\u00d0\3\2\2\2\u04c2\u04c3"+ + "\7B\2\2\u04c3\u04c4\7f\2\2\u04c4\u04c5\7g\2\2\u04c5\u04c6\7n\2\2\u04c6"+ + "\u04c7\7g\2\2\u04c7\u04c8\7i\2\2\u04c8\u04c9\7c\2\2\u04c9\u04ca\7v\2\2"+ + "\u04ca\u04cb\7g\2\2\u04cb\u00d2\3\2\2\2\u04cc\u04cd\7f\2\2\u04cd\u04ce"+ + "\7{\2\2\u04ce\u04cf\7p\2\2\u04cf\u04d0\7c\2\2\u04d0\u04d1\7o\2\2\u04d1"+ + "\u04d2\7k\2\2\u04d2\u04d3\7e\2\2\u04d3\u00d4\3\2\2\2\u04d4\u04d5\7r\2"+ + "\2\u04d5\u04d6\7w\2\2\u04d6\u04d7\7d\2\2\u04d7\u04d8\7n\2\2\u04d8\u04d9"+ + "\7k\2\2\u04d9\u04da\7e\2\2\u04da\u00d6\3\2\2\2\u04db\u04dc\7r\2\2\u04dc"+ + "\u04dd\7t\2\2\u04dd\u04de\7k\2\2\u04de\u04df\7x\2\2\u04df\u04e0\7c\2\2"+ + "\u04e0\u04e1\7v\2\2\u04e1\u04e2\7g\2\2\u04e2\u00d8\3\2\2\2\u04e3\u04e4"+ + "\7r\2\2\u04e4\u04e5\7t\2\2\u04e5\u04e6\7q\2\2\u04e6\u04e7\7v\2\2\u04e7"+ + "\u04e8\7g\2\2\u04e8\u04e9\7e\2\2\u04e9\u04ea\7v\2\2\u04ea\u04eb\7g\2\2"+ + "\u04eb\u04ec\7f\2\2\u04ec\u00da\3\2\2\2\u04ed\u04ee\7k\2\2\u04ee\u04ef"+ + "\7p\2\2\u04ef\u04f0\7v\2\2\u04f0\u04f1\7g\2\2\u04f1\u04f2\7t\2\2\u04f2"+ + "\u04f3\7p\2\2\u04f3\u04f4\7c\2\2\u04f4\u04f5\7n\2\2\u04f5\u00dc\3\2\2"+ + "\2\u04f6\u04f7\7g\2\2\u04f7\u04f8\7p\2\2\u04f8\u04f9\7w\2\2\u04f9\u04fa"+ + "\7o\2\2\u04fa\u00de\3\2\2\2\u04fb\u04fc\7u\2\2\u04fc\u04fd\7g\2\2\u04fd"+ + "\u04fe\7c\2\2\u04fe\u04ff\7n\2\2\u04ff\u0500\7g\2\2\u0500\u0501\7f\2\2"+ + "\u0501\u00e0\3\2\2\2\u0502\u0503\7c\2\2\u0503\u0504\7p\2\2\u0504\u0505"+ + "\7p\2\2\u0505\u0506\7q\2\2\u0506\u0507\7v\2\2\u0507\u0508\7c\2\2\u0508"+ + "\u0509\7v\2\2\u0509\u050a\7k\2\2\u050a\u050b\7q\2\2\u050b\u050c\7p\2\2"+ + "\u050c\u00e2\3\2\2\2\u050d\u050e\7f\2\2\u050e\u050f\7c\2\2\u050f\u0510"+ + "\7v\2\2\u0510\u0511\7c\2\2\u0511\u00e4\3\2\2\2\u0512\u0513\7k\2\2\u0513"+ + "\u0514\7p\2\2\u0514\u0515\7p\2\2\u0515\u0516\7g\2\2\u0516\u0517\7t\2\2"+ + "\u0517\u00e6\3\2\2\2\u0518\u0519\7v\2\2\u0519\u051a\7c\2\2\u051a\u051b"+ + "\7k\2\2\u051b\u051c\7n\2\2\u051c\u051d\7t\2\2\u051d\u051e\7g\2\2\u051e"+ + "\u051f\7e\2\2\u051f\u00e8\3\2\2\2\u0520\u0521\7q\2\2\u0521\u0522\7r\2"+ + "\2\u0522\u0523\7g\2\2\u0523\u0524\7t\2\2\u0524\u0525\7c\2\2\u0525\u0526"+ + "\7v\2\2\u0526\u0527\7q\2\2\u0527\u0528\7t\2\2\u0528\u00ea\3\2\2\2\u0529"+ + "\u052a\7k\2\2\u052a\u052b\7p\2\2\u052b\u052c\7n\2\2\u052c\u052d\7k\2\2"+ + "\u052d\u052e\7p\2\2\u052e\u052f\7g\2\2\u052f\u00ec\3\2\2\2\u0530\u0531"+ + "\7k\2\2\u0531\u0532\7p\2\2\u0532\u0533\7h\2\2\u0533\u0534\7k\2\2\u0534"+ + "\u0535\7z\2\2\u0535\u00ee\3\2\2\2\u0536\u0537\7g\2\2\u0537\u0538\7z\2"+ + "\2\u0538\u0539\7v\2\2\u0539\u053a\7g\2\2\u053a\u053b\7t\2\2\u053b\u053c"+ + "\7p\2\2\u053c\u053d\7c\2\2\u053d\u053e\7n\2\2\u053e\u00f0\3\2\2\2\u053f"+ + "\u0540\7u\2\2\u0540\u0541\7w\2\2\u0541\u0542\7u\2\2\u0542\u0543\7r\2\2"+ + "\u0543\u0544\7g\2\2\u0544\u0545\7p\2\2\u0545\u0546\7f\2\2\u0546\u00f2"+ + "\3\2\2\2\u0547\u0548\7q\2\2\u0548\u0549\7x\2\2\u0549\u054a\7g\2\2\u054a"+ + "\u054b\7t\2\2\u054b\u054c\7t\2\2\u054c\u054d\7k\2\2\u054d\u054e\7f\2\2"+ + "\u054e\u054f\7g\2\2\u054f\u00f4\3\2\2\2\u0550\u0551\7c\2\2\u0551\u0552"+ + "\7d\2\2\u0552\u0553\7u\2\2\u0553\u0554\7v\2\2\u0554\u0555\7t\2\2\u0555"+ + "\u0556\7c\2\2\u0556\u0557\7e\2\2\u0557\u0558\7v\2\2\u0558\u00f6\3\2\2"+ + "\2\u0559\u055a\7h\2\2\u055a\u055b\7k\2\2\u055b\u055c\7p\2\2\u055c\u055d"+ + "\7c\2\2\u055d\u055e\7n\2\2\u055e\u00f8\3\2\2\2\u055f\u0560\7q\2\2\u0560"+ + "\u0561\7r\2\2\u0561\u0562\7g\2\2\u0562\u0563\7p\2\2\u0563\u00fa\3\2\2"+ + "\2\u0564\u0565\7e\2\2\u0565\u0566\7q\2\2\u0566\u0567\7p\2\2\u0567\u0568"+ + "\7u\2\2\u0568\u0569\7v\2\2\u0569\u00fc\3\2\2\2\u056a\u056b\7n\2\2\u056b"+ + "\u056c\7c\2\2\u056c\u056d\7v\2\2\u056d\u056e\7g\2\2\u056e\u056f\7k\2\2"+ + "\u056f\u0570\7p\2\2\u0570\u0571\7k\2\2\u0571\u0572\7v\2\2\u0572\u00fe"+ + "\3\2\2\2\u0573\u0574\7x\2\2\u0574\u0575\7c\2\2\u0575\u0576\7t\2\2\u0576"+ + "\u0577\7c\2\2\u0577\u0578\7t\2\2\u0578\u0579\7i\2\2\u0579\u0100\3\2\2"+ + "\2\u057a\u057b\7p\2\2\u057b\u057c\7q\2\2\u057c\u057d\7k\2\2\u057d\u057e"+ + "\7p\2\2\u057e\u057f\7n\2\2\u057f\u0580\7k\2\2\u0580\u0581\7p\2\2\u0581"+ + "\u0582\7g\2\2\u0582\u0102\3\2\2\2\u0583\u0584\7e\2\2\u0584\u0585\7t\2"+ + "\2\u0585\u0586\7q\2\2\u0586\u0587\7u\2\2\u0587\u0588\7u\2\2\u0588\u0589"+ + "\7k\2\2\u0589\u058a\7p\2\2\u058a\u058b\7n\2\2\u058b\u058c\7k\2\2\u058c"+ + "\u058d\7p\2\2\u058d\u058e\7g\2\2\u058e\u0104\3\2\2\2\u058f\u0590\7t\2"+ + "\2\u0590\u0591\7g\2\2\u0591\u0592\7k\2\2\u0592\u0593\7h\2\2\u0593\u0594"+ + "\7k\2\2\u0594\u0595\7g\2\2\u0595\u0596\7f\2\2\u0596\u0106\3\2\2\2\u0597"+ + "\u0598\7$\2\2\u0598\u0599\3\2\2\2\u0599\u059a\b\u0082\5\2\u059a\u0108"+ + "\3\2\2\2\u059b\u059c\7$\2\2\u059c\u059d\7$\2\2\u059d\u059e\7$\2\2\u059e"+ + "\u059f\3\2\2\2\u059f\u05a0\b\u0083\6\2\u05a0\u010a\3\2\2\2\u05a1\u05a4"+ + "\5\u010d\u0085\2\u05a2\u05a4\5\u010f\u0086\2\u05a3\u05a1\3\2\2\2\u05a3"+ + "\u05a2\3\2\2\2\u05a4\u010c\3\2\2\2\u05a5\u05a8\5\u010f\u0086\2\u05a6\u05a8"+ + "\5\u0113\u0088\2\u05a7\u05a5\3\2\2\2\u05a7\u05a6\3\2\2\2\u05a8\u05a9\3"+ + "\2\2\2\u05a9\u05aa\t\4\2\2\u05aa\u010e\3\2\2\2\u05ab\u05af\5\u0117\u008a"+ + "\2\u05ac\u05ae\5\u0115\u0089\2\u05ad\u05ac\3\2\2\2\u05ae\u05b1\3\2\2\2"+ + "\u05af\u05ad\3\2\2\2\u05af\u05b0\3\2\2\2\u05b0\u05b4\3\2\2\2\u05b1\u05af"+ + "\3\2\2\2\u05b2\u05b4\7\62\2\2\u05b3\u05ab\3\2\2\2\u05b3\u05b2\3\2\2\2"+ + "\u05b3\u05b4\3\2\2\2\u05b4\u05b5\3\2\2\2\u05b5\u05c4\7\60\2\2\u05b6\u05bb"+ + "\5\u0117\u008a\2\u05b7\u05ba\5\u0115\u0089\2\u05b8\u05ba\7a\2\2\u05b9"+ + "\u05b7\3\2\2\2\u05b9\u05b8\3\2\2\2\u05ba\u05bd\3\2\2\2\u05bb\u05b9\3\2"+ + "\2\2\u05bb\u05bc\3\2\2\2\u05bc\u05be\3\2\2\2\u05bd\u05bb\3\2\2\2\u05be"+ + "\u05bf\5\u0115\u0089\2\u05bf\u05c1\3\2\2\2\u05c0\u05b6\3\2\2\2\u05c0\u05c1"+ + "\3\2\2\2\u05c1\u05c2\3\2\2\2\u05c2\u05c4\7\60\2\2\u05c3\u05b3\3\2\2\2"+ + "\u05c3\u05c0\3\2\2\2\u05c4\u0619\3\2\2\2\u05c5\u05c7\5\u0115\u0089\2\u05c6"+ + "\u05c5\3\2\2\2\u05c7\u05c8\3\2\2\2\u05c8\u05c6\3\2\2\2\u05c8\u05c9\3\2"+ + "\2\2\u05c9\u061a\3\2\2\2\u05ca\u05cd\5\u0115\u0089\2\u05cb\u05ce\5\u0115"+ + "\u0089\2\u05cc\u05ce\7a\2\2\u05cd\u05cb\3\2\2\2\u05cd\u05cc\3\2\2\2\u05ce"+ + "\u05cf\3\2\2\2\u05cf\u05cd\3\2\2\2\u05cf\u05d0\3\2\2\2\u05d0\u05d1\3\2"+ + "\2\2\u05d1\u05d2\5\u0115\u0089\2\u05d2\u061a\3\2\2\2\u05d3\u05d5\5\u0115"+ + "\u0089\2\u05d4\u05d3\3\2\2\2\u05d5\u05d6\3\2\2\2\u05d6\u05d4\3\2\2\2\u05d6"+ + "\u05d7\3\2\2\2\u05d7\u05d8\3\2\2\2\u05d8\u05da\t\5\2\2\u05d9\u05db\t\6"+ + "\2\2\u05da\u05d9\3\2\2\2\u05da\u05db\3\2\2\2\u05db\u05dd\3\2\2\2\u05dc"+ + "\u05de\5\u0115\u0089\2\u05dd\u05dc\3\2\2\2\u05de\u05df\3\2\2\2\u05df\u05dd"+ + "\3\2\2\2\u05df\u05e0\3\2\2\2\u05e0\u061a\3\2\2\2\u05e1\u05e3\5\u0115\u0089"+ + "\2\u05e2\u05e1\3\2\2\2\u05e3\u05e4\3\2\2\2\u05e4\u05e2\3\2\2\2\u05e4\u05e5"+ + "\3\2\2\2\u05e5\u05e6\3\2\2\2\u05e6\u05e8\t\5\2\2\u05e7\u05e9\t\6\2\2\u05e8"+ + "\u05e7\3\2\2\2\u05e8\u05e9\3\2\2\2\u05e9\u05ea\3\2\2\2\u05ea\u05ed\5\u0115"+ + "\u0089\2\u05eb\u05ee\5\u0115\u0089\2\u05ec\u05ee\7a\2\2\u05ed\u05eb\3"+ + "\2\2\2\u05ed\u05ec\3\2\2\2\u05ee\u05ef\3\2\2\2\u05ef\u05ed\3\2\2\2\u05ef"+ + "\u05f0\3\2\2\2\u05f0\u05f1\3\2\2\2\u05f1\u05f2\5\u0115\u0089\2\u05f2\u061a"+ + "\3\2\2\2\u05f3\u05f6\5\u0115\u0089\2\u05f4\u05f7\5\u0115\u0089\2\u05f5"+ + "\u05f7\7a\2\2\u05f6\u05f4\3\2\2\2\u05f6\u05f5\3\2\2\2\u05f7\u05f8\3\2"+ + "\2\2\u05f8\u05f6\3\2\2\2\u05f8\u05f9\3\2\2\2\u05f9\u05fa\3\2\2\2\u05fa"+ + "\u05fb\5\u0115\u0089\2\u05fb\u05fd\t\5\2\2\u05fc\u05fe\t\6\2\2\u05fd\u05fc"+ + "\3\2\2\2\u05fd\u05fe\3\2\2\2\u05fe\u0600\3\2\2\2\u05ff\u0601\5\u0115\u0089"+ + "\2\u0600\u05ff\3\2\2\2\u0601\u0602\3\2\2\2\u0602\u0600\3\2\2\2\u0602\u0603"+ + "\3\2\2\2\u0603\u061a\3\2\2\2\u0604\u0607\5\u0115\u0089\2\u0605\u0608\5"+ + "\u0115\u0089\2\u0606\u0608\7a\2\2\u0607\u0605\3\2\2\2\u0607\u0606\3\2"+ + "\2\2\u0608\u0609\3\2\2\2\u0609\u0607\3\2\2\2\u0609\u060a\3\2\2\2\u060a"+ + "\u060b\3\2\2\2\u060b\u060c\5\u0115\u0089\2\u060c\u060e\t\5\2\2\u060d\u060f"+ + "\t\6\2\2\u060e\u060d\3\2\2\2\u060e\u060f\3\2\2\2\u060f\u0610\3\2\2\2\u0610"+ + "\u0613\5\u0115\u0089\2\u0611\u0614\5\u0115\u0089\2\u0612\u0614\7a\2\2"+ + "\u0613\u0611\3\2\2\2\u0613\u0612\3\2\2\2\u0614\u0615\3\2\2\2\u0615\u0613"+ + "\3\2\2\2\u0615\u0616\3\2\2\2\u0616\u0617\3\2\2\2\u0617\u0618\5\u0115\u0089"+ + "\2\u0618\u061a\3\2\2\2\u0619\u05c6\3\2\2\2\u0619\u05ca\3\2\2\2\u0619\u05d4"+ + "\3\2\2\2\u0619\u05e2\3\2\2\2\u0619\u05f3\3\2\2\2\u0619\u0604\3\2\2\2\u061a"+ + "\u0110\3\2\2\2\u061b\u061f\5\u0113\u0088\2\u061c\u061f\5\u011b\u008c\2"+ + "\u061d\u061f\5\u011f\u008e\2\u061e\u061b\3\2\2\2\u061e\u061c\3\2\2\2\u061e"+ + "\u061d\3\2\2\2\u061f\u0620\3\2\2\2\u0620\u0621\7N\2\2\u0621\u0112\3\2"+ + "\2\2\u0622\u067e\7\62\2\2\u0623\u0627\5\u0117\u008a\2\u0624\u0626\5\u0115"+ + "\u0089\2\u0625\u0624\3\2\2\2\u0626\u0629\3\2\2\2\u0627\u0625\3\2\2\2\u0627"+ + "\u0628\3\2\2\2\u0628\u067e\3\2\2\2\u0629\u0627\3\2\2\2\u062a\u062d\5\u0117"+ + "\u008a\2\u062b\u062e\5\u0115\u0089\2\u062c\u062e\7a\2\2\u062d\u062b\3"+ + "\2\2\2\u062d\u062c\3\2\2\2\u062e\u062f\3\2\2\2\u062f\u062d\3\2\2\2\u062f"+ + "\u0630\3\2\2\2\u0630\u0631\3\2\2\2\u0631\u0632\5\u0115\u0089\2\u0632\u067e"+ + "\3\2\2\2\u0633\u0637\5\u0117\u008a\2\u0634\u0636\5\u0115\u0089\2\u0635"+ + "\u0634\3\2\2\2\u0636\u0639\3\2\2\2\u0637\u0635\3\2\2\2\u0637\u0638\3\2"+ + "\2\2\u0638\u063a\3\2\2\2\u0639\u0637\3\2\2\2\u063a\u063c\t\5\2\2\u063b"+ + "\u063d\t\6\2\2\u063c\u063b\3\2\2\2\u063c\u063d\3\2\2\2\u063d\u063f\3\2"+ + "\2\2\u063e\u0640\5\u0115\u0089\2\u063f\u063e\3\2\2\2\u0640\u0641\3\2\2"+ + "\2\u0641\u063f\3\2\2\2\u0641\u0642\3\2\2\2\u0642\u067e\3\2\2\2\u0643\u0647"+ + "\5\u0117\u008a\2\u0644\u0646\5\u0115\u0089\2\u0645\u0644\3\2\2\2\u0646"+ + "\u0649\3\2\2\2\u0647\u0645\3\2\2\2\u0647\u0648\3\2\2\2\u0648\u064a\3\2"+ + "\2\2\u0649\u0647\3\2\2\2\u064a\u064c\t\5\2\2\u064b\u064d\t\6\2\2\u064c"+ + "\u064b\3\2\2\2\u064c\u064d\3\2\2\2\u064d\u064e\3\2\2\2\u064e\u0651\5\u0115"+ + "\u0089\2\u064f\u0652\5\u0115\u0089\2\u0650\u0652\7a\2\2\u0651\u064f\3"+ + "\2\2\2\u0651\u0650\3\2\2\2\u0652\u0653\3\2\2\2\u0653\u0651\3\2\2\2\u0653"+ + "\u0654\3\2\2\2\u0654\u0655\3\2\2\2\u0655\u0656\5\u0115\u0089\2\u0656\u067e"+ + "\3\2\2\2\u0657\u065a\5\u0117\u008a\2\u0658\u065b\5\u0115\u0089\2\u0659"+ + "\u065b\7a\2\2\u065a\u0658\3\2\2\2\u065a\u0659\3\2\2\2\u065b\u065c\3\2"+ + "\2\2\u065c\u065a\3\2\2\2\u065c\u065d\3\2\2\2\u065d\u065e\3\2\2\2\u065e"+ + "\u065f\5\u0115\u0089\2\u065f\u0661\t\5\2\2\u0660\u0662\t\6\2\2\u0661\u0660"+ + "\3\2\2\2\u0661\u0662\3\2\2\2\u0662\u0664\3\2\2\2\u0663\u0665\5\u0115\u0089"+ + "\2\u0664\u0663\3\2\2\2\u0665\u0666\3\2\2\2\u0666\u0664\3\2\2\2\u0666\u0667"+ + "\3\2\2\2\u0667\u067e\3\2\2\2\u0668\u066b\5\u0117\u008a\2\u0669\u066c\5"+ + "\u0115\u0089\2\u066a\u066c\7a\2\2\u066b\u0669\3\2\2\2\u066b\u066a\3\2"+ + "\2\2\u066c\u066d\3\2\2\2\u066d\u066b\3\2\2\2\u066d\u066e\3\2\2\2\u066e"+ + "\u066f\3\2\2\2\u066f\u0670\5\u0115\u0089\2\u0670\u0672\t\5\2\2\u0671\u0673"+ + "\t\6\2\2\u0672\u0671\3\2\2\2\u0672\u0673\3\2\2\2\u0673\u0674\3\2\2\2\u0674"+ + "\u0677\5\u0115\u0089\2\u0675\u0678\5\u0115\u0089\2\u0676\u0678\7a\2\2"+ + "\u0677\u0675\3\2\2\2\u0677\u0676\3\2\2\2\u0678\u0679\3\2\2\2\u0679\u0677"+ + "\3\2\2\2\u0679\u067a\3\2\2\2\u067a\u067b\3\2\2\2\u067b\u067c\5\u0115\u0089"+ + "\2\u067c\u067e\3\2\2\2\u067d\u0622\3\2\2\2\u067d\u0623\3\2\2\2\u067d\u062a"+ + "\3\2\2\2\u067d\u0633\3\2\2\2\u067d\u0643\3\2\2\2\u067d\u0657\3\2\2\2\u067d"+ + "\u0668\3\2\2\2\u067e\u0114\3\2\2\2\u067f\u0680\5\u0143\u00a0\2\u0680\u0116"+ + "\3\2\2\2\u0681\u0682\5\u0119\u008b\2\u0682\u0118\3\2\2\2\u0683\u0684\t"+ + "\7\2\2\u0684\u011a\3\2\2\2\u0685\u0686\7\62\2\2\u0686\u0687\t\b\2\2\u0687"+ + "\u068c\5\u011d\u008d\2\u0688\u068b\5\u011d\u008d\2\u0689\u068b\7a\2\2"+ + "\u068a\u0688\3\2\2\2\u068a\u0689\3\2\2\2\u068b\u068e\3\2\2\2\u068c\u068a"+ + "\3\2\2\2\u068c\u068d\3\2\2\2\u068d\u011c\3\2\2\2\u068e\u068c\3\2\2\2\u068f"+ + "\u0690\t\t\2\2\u0690\u011e\3\2\2\2\u0691\u0692\7\62\2\2\u0692\u0693\t"+ + "\n\2\2\u0693\u0698\5\u0121\u008f\2\u0694\u0697\5\u0121\u008f\2\u0695\u0697"+ + "\7a\2\2\u0696\u0694\3\2\2\2\u0696\u0695\3\2\2\2\u0697\u069a\3\2\2\2\u0698"+ + "\u0696\3\2\2\2\u0698\u0699\3\2\2\2\u0699\u0120\3\2\2\2\u069a\u0698\3\2"+ + "\2\2\u069b\u069c\t\13\2\2\u069c\u0122\3\2\2\2\u069d\u069e\7v\2\2\u069e"+ + "\u069f\7t\2\2\u069f\u06a0\7w\2\2\u06a0\u06a7\7g\2\2\u06a1\u06a2\7h\2\2"+ + "\u06a2\u06a3\7c\2\2\u06a3\u06a4\7n\2\2\u06a4\u06a5\7u\2\2\u06a5\u06a7"+ + "\7g\2\2\u06a6\u069d\3\2\2\2\u06a6\u06a1\3\2\2\2\u06a7\u0124\3\2\2\2\u06a8"+ + "\u06a9\7p\2\2\u06a9\u06aa\7w\2\2\u06aa\u06ab\7n\2\2\u06ab\u06ac\7n\2\2"+ + "\u06ac\u0126\3\2\2\2\u06ad\u06b0\5\u0137\u009a\2\u06ae\u06b0\7a\2\2\u06af"+ + "\u06ad\3\2\2\2\u06af\u06ae\3\2\2\2\u06b0\u06b6\3\2\2\2\u06b1\u06b5\5\u0137"+ + "\u009a\2\u06b2\u06b5\7a\2\2\u06b3\u06b5\5\u0115\u0089\2\u06b4\u06b1\3"+ + "\2\2\2\u06b4\u06b2\3\2\2\2\u06b4\u06b3\3\2\2\2\u06b5\u06b8\3\2\2\2\u06b6"+ + "\u06b4\3\2\2\2\u06b6\u06b7\3\2\2\2\u06b7\u06c1\3\2\2\2\u06b8\u06b6\3\2"+ + "\2\2\u06b9\u06bb\7b\2\2\u06ba\u06bc\n\f\2\2\u06bb\u06ba\3\2\2\2\u06bc"+ + "\u06bd\3\2\2\2\u06bd\u06bb\3\2\2\2\u06bd\u06be\3\2\2\2\u06be\u06bf\3\2"+ + "\2\2\u06bf\u06c1\7b\2\2\u06c0\u06af\3\2\2\2\u06c0\u06b9\3\2\2\2\u06c1"+ + "\u0128\3\2\2\2\u06c2\u06c3\7B\2\2\u06c3\u06c4\5\u0127\u0092\2\u06c4\u012a"+ + "\3\2\2\2\u06c5\u06c6\5\u0127\u0092\2\u06c6\u06c7\7B\2\2\u06c7\u012c\3"+ + "\2\2\2\u06c8\u06c9\7&\2\2\u06c9\u06ca\5\u0127\u0092\2\u06ca\u012e\3\2"+ + "\2\2\u06cb\u06ce\7)\2\2\u06cc\u06cf\5\u0131\u0097\2\u06cd\u06cf\13\2\2"+ + "\2\u06ce\u06cc\3\2\2\2\u06ce\u06cd\3\2\2\2\u06cf\u06d0\3\2\2\2\u06d0\u06d1"+ + "\7)\2\2\u06d1\u0130\3\2\2\2\u06d2\u06d5\5\u0133\u0098\2\u06d3\u06d5\5"+ + "\u0135\u0099\2\u06d4\u06d2\3\2\2\2\u06d4\u06d3\3\2\2\2\u06d5\u0132\3\2"+ + "\2\2\u06d6\u06d7\7^\2\2\u06d7\u06d8\7w\2\2\u06d8\u06d9\5\u011d\u008d\2"+ + "\u06d9\u06da\5\u011d\u008d\2\u06da\u06db\5\u011d\u008d\2\u06db\u06dc\5"+ + "\u011d\u008d\2\u06dc\u0134\3\2\2\2\u06dd\u06de\7^\2\2\u06de\u06df\t\r"+ + "\2\2\u06df\u0136\3\2\2\2\u06e0\u06e7\5\u0139\u009b\2\u06e1\u06e7\5\u013b"+ + "\u009c\2\u06e2\u06e7\5\u013d\u009d\2\u06e3\u06e7\5\u013f\u009e\2\u06e4"+ + "\u06e7\5\u0141\u009f\2\u06e5\u06e7\5\u0145\u00a1\2\u06e6\u06e0\3\2\2\2"+ + "\u06e6\u06e1\3\2\2\2\u06e6\u06e2\3\2\2\2\u06e6\u06e3\3\2\2\2\u06e6\u06e4"+ + "\3\2\2\2\u06e6\u06e5\3\2\2\2\u06e7\u0138\3\2\2\2\u06e8\u06e9\t\16\2\2"+ + "\u06e9\u013a\3\2\2\2\u06ea\u06eb\t\17\2\2\u06eb\u013c\3\2\2\2\u06ec\u06ed"+ + "\t\20\2\2\u06ed\u013e\3\2\2\2\u06ee\u06ef\t\21\2\2\u06ef\u0140\3\2\2\2"+ + "\u06f0\u06f1\t\22\2\2\u06f1\u0142\3\2\2\2\u06f2\u06f3\t\23\2\2\u06f3\u0144"+ + "\3\2\2\2\u06f4\u06f5\t\24\2\2\u06f5\u0146\3\2\2\2\u06f6\u06f7\7+\2\2\u06f7"+ + "\u06f8\3\2\2\2\u06f8\u06f9\b\u00a2\7\2\u06f9\u06fa\b\u00a2\b\2\u06fa\u0148"+ + "\3\2\2\2\u06fb\u06fc\7_\2\2\u06fc\u06fd\3\2\2\2\u06fd\u06fe\b\u00a3\7"+ + "\2\u06fe\u06ff\b\u00a3\t\2\u06ff\u014a\3\2\2\2\u0700\u0701\5\27\n\2\u0701"+ + "\u0702\3\2\2\2\u0702\u0703\b\u00a4\4\2\u0703\u0704\b\u00a4\n\2\u0704\u014c"+ + "\3\2\2\2\u0705\u0706\5\33\f\2\u0706\u0707\3\2\2\2\u0707\u0708\b\u00a5"+ + "\4\2\u0708\u0709\b\u00a5\13\2\u0709\u014e\3\2\2\2\u070a\u070b\5\37\16"+ + "\2\u070b\u070c\3\2\2\2\u070c\u070d\b\u00a6\f\2\u070d\u0150\3\2\2\2\u070e"+ + "\u070f\5!\17\2\u070f\u0710\3\2\2\2\u0710\u0711\b\u00a7\r\2\u0711\u0152"+ + "\3\2\2\2\u0712\u0713\5\23\b\2\u0713\u0714\3\2\2\2\u0714\u0715\b\u00a8"+ + "\16\2\u0715\u0154\3\2\2\2\u0716\u0717\5\25\t\2\u0717\u0718\3\2\2\2\u0718"+ + "\u0719\b\u00a9\17\2\u0719\u0156\3\2\2\2\u071a\u071b\5#\20\2\u071b\u071c"+ + "\3\2\2\2\u071c\u071d\b\u00aa\20\2\u071d\u0158\3\2\2\2\u071e\u071f\5%\21"+ + "\2\u071f\u0720\3\2\2\2\u0720\u0721\b\u00ab\21\2\u0721\u015a\3\2\2\2\u0722"+ + "\u0723\5\'\22\2\u0723\u0724\3\2\2\2\u0724\u0725\b\u00ac\22\2\u0725\u015c"+ + "\3\2\2\2\u0726\u0727\5)\23\2\u0727\u0728\3\2\2\2\u0728\u0729\b\u00ad\23"+ + "\2\u0729\u015e\3\2\2\2\u072a\u072b\5+\24\2\u072b\u072c\3\2\2\2\u072c\u072d"+ + "\b\u00ae\24\2\u072d\u0160\3\2\2\2\u072e\u072f\5-\25\2\u072f\u0730\3\2"+ + "\2\2\u0730\u0731\b\u00af\25\2\u0731\u0162\3\2\2\2\u0732\u0733\5/\26\2"+ + "\u0733\u0734\3\2\2\2\u0734\u0735\b\u00b0\26\2\u0735\u0164\3\2\2\2\u0736"+ + "\u0737\5\61\27\2\u0737\u0738\3\2\2\2\u0738\u0739\b\u00b1\27\2\u0739\u0166"+ + "\3\2\2\2\u073a\u073b\5\63\30\2\u073b\u073c\3\2\2\2\u073c\u073d\b\u00b2"+ + "\30\2\u073d\u0168\3\2\2\2\u073e\u073f\5\65\31\2\u073f\u0740\3\2\2\2\u0740"+ + "\u0741\b\u00b3\31\2\u0741\u016a\3\2\2\2\u0742\u0743\5\67\32\2\u0743\u0744"+ + "\3\2\2\2\u0744\u0745\b\u00b4\32\2\u0745\u016c\3\2\2\2\u0746\u0747\59\33"+ + "\2\u0747\u0748\3\2\2\2\u0748\u0749\b\u00b5\33\2\u0749\u016e\3\2\2\2\u074a"+ + "\u074b\5;\34\2\u074b\u074c\3\2\2\2\u074c\u074d\b\u00b6\34\2\u074d\u0170"+ + "\3\2\2\2\u074e\u074f\5=\35\2\u074f\u0750\3\2\2\2\u0750\u0751\b\u00b7\35"+ + "\2\u0751\u0172\3\2\2\2\u0752\u0753\5?\36\2\u0753\u0754\3\2\2\2\u0754\u0755"+ + "\b\u00b8\36\2\u0755\u0174\3\2\2\2\u0756\u0757\5A\37\2\u0757\u0758\3\2"+ + "\2\2\u0758\u0759\b\u00b9\37\2\u0759\u0176\3\2\2\2\u075a\u075b\5C \2\u075b"+ + "\u075c\3\2\2\2\u075c\u075d\b\u00ba \2\u075d\u0178\3\2\2\2\u075e\u075f"+ + "\5E!\2\u075f\u0760\3\2\2\2\u0760\u0761\b\u00bb!\2\u0761\u017a\3\2\2\2"+ + "\u0762\u0763\5G\"\2\u0763\u0764\3\2\2\2\u0764\u0765\b\u00bc\"\2\u0765"+ + "\u017c\3\2\2\2\u0766\u0767\5I#\2\u0767\u0768\3\2\2\2\u0768\u0769\b\u00bd"+ + "#\2\u0769\u017e\3\2\2\2\u076a\u076b\5K$\2\u076b\u076c\3\2\2\2\u076c\u076d"+ + "\b\u00be$\2\u076d\u0180\3\2\2\2\u076e\u076f\5\21\7\2\u076f\u0770\3\2\2"+ + "\2\u0770\u0771\b\u00bf%\2\u0771\u0182\3\2\2\2\u0772\u0773\5M%\2\u0773"+ + "\u0774\3\2\2\2\u0774\u0775\b\u00c0&\2\u0775\u0184\3\2\2\2\u0776\u0777"+ + "\5O&\2\u0777\u0778\3\2\2\2\u0778\u0779\b\u00c1\'\2\u0779\u0186\3\2\2\2"+ + "\u077a\u077b\5Q\'\2\u077b\u077c\3\2\2\2\u077c\u077d\b\u00c2(\2\u077d\u0188"+ + "\3\2\2\2\u077e\u077f\5S(\2\u077f\u0780\3\2\2\2\u0780\u0781\b\u00c3)\2"+ + "\u0781\u018a\3\2\2\2\u0782\u0783\5U)\2\u0783\u0784\3\2\2\2\u0784\u0785"+ + "\b\u00c4*\2\u0785\u018c\3\2\2\2\u0786\u0787\5W*\2\u0787\u0788\3\2\2\2"+ + "\u0788\u0789\b\u00c5+\2\u0789\u018e\3\2\2\2\u078a\u078b\5Y+\2\u078b\u078c"+ + "\3\2\2\2\u078c\u078d\b\u00c6,\2\u078d\u0190\3\2\2\2\u078e\u078f\5[,\2"+ + "\u078f\u0790\3\2\2\2\u0790\u0791\b\u00c7-\2\u0791\u0192\3\2\2\2\u0792"+ + "\u0793\5]-\2\u0793\u0794\3\2\2\2\u0794\u0795\b\u00c8.\2\u0795\u0194\3"+ + "\2\2\2\u0796\u0797\5_.\2\u0797\u0798\3\2\2\2\u0798\u0799\b\u00c9/\2\u0799"+ + "\u0196\3\2\2\2\u079a\u079b\5a/\2\u079b\u079c\3\2\2\2\u079c\u079d\b\u00ca"+ + "\60\2\u079d\u0198\3\2\2\2\u079e\u079f\5c\60\2\u079f\u07a0\3\2\2\2\u07a0"+ + "\u07a1\b\u00cb\61\2\u07a1\u019a\3\2\2\2\u07a2\u07a3\5e\61\2\u07a3\u07a4"+ + "\3\2\2\2\u07a4\u07a5\b\u00cc\62\2\u07a5\u019c\3\2\2\2\u07a6\u07a7\5\u00b9"+ + "[\2\u07a7\u07a8\3\2\2\2\u07a8\u07a9\b\u00cd\63\2\u07a9\u019e\3\2\2\2\u07aa"+ + "\u07ab\5\u00bb\\\2\u07ab\u07ac\3\2\2\2\u07ac\u07ad\b\u00ce\64\2\u07ad"+ + "\u01a0\3\2\2\2\u07ae\u07af\5g\62\2\u07af\u07b0\3\2\2\2\u07b0\u07b1\b\u00cf"+ + "\65\2\u07b1\u01a2\3\2\2\2\u07b2\u07b3\5i\63\2\u07b3\u07b4\3\2\2\2\u07b4"+ + "\u07b5\b\u00d0\66\2\u07b5\u01a4\3\2\2\2\u07b6\u07b7\5k\64\2\u07b7\u07b8"+ + "\3\2\2\2\u07b8\u07b9\b\u00d1\67\2\u07b9\u01a6\3\2\2\2\u07ba\u07bb\5m\65"+ + "\2\u07bb\u07bc\3\2\2\2\u07bc\u07bd\b\u00d28\2\u07bd\u01a8\3\2\2\2\u07be"+ + "\u07bf\5\u0107\u0082\2\u07bf\u07c0\3\2\2\2\u07c0\u07c1\b\u00d3\5\2\u07c1"+ + "\u07c2\b\u00d39\2\u07c2\u01aa\3\2\2\2\u07c3\u07c4\5\u0109\u0083\2\u07c4"+ + "\u07c5\3\2\2\2\u07c5\u07c6\b\u00d4\6\2\u07c6\u07c7\b\u00d4:\2\u07c7\u01ac"+ + "\3\2\2\2\u07c8\u07c9\5\u0083@\2\u07c9\u07ca\3\2\2\2\u07ca\u07cb\b\u00d5"+ + ";\2\u07cb\u01ae\3\2\2\2\u07cc\u07cd\5\u0085A\2\u07cd\u07ce\3\2\2\2\u07ce"+ + "\u07cf\b\u00d6<\2\u07cf\u01b0\3\2\2\2\u07d0\u07d1\5\u0081?\2\u07d1\u07d2"+ + "\3\2\2\2\u07d2\u07d3\b\u00d7=\2\u07d3\u01b2\3\2\2\2\u07d4\u07d5\5\u0093"+ + "H\2\u07d5\u07d6\3\2\2\2\u07d6\u07d7\b\u00d8>\2\u07d7\u01b4\3\2\2\2\u07d8"+ + "\u07d9\5\u00b7Z\2\u07d9\u07da\3\2\2\2\u07da\u07db\b\u00d9?\2\u07db\u01b6"+ + "\3\2\2\2\u07dc\u07dd\5\u00bd]\2\u07dd\u07de\3\2\2\2\u07de\u07df\b\u00da"+ + "@\2"; + private static final String _serializedATNSegment1 = + "\u07df\u01b8\3\2\2\2\u07e0\u07e1\5\u00bf^\2\u07e1\u07e2\3\2\2\2\u07e2"+ + "\u07e3\b\u00dbA\2\u07e3\u01ba\3\2\2\2\u07e4\u07e5\5u9\2\u07e5\u07e6\3"+ + "\2\2\2\u07e6\u07e7\b\u00dcB\2\u07e7\u01bc\3\2\2\2\u07e8\u07e9\5\u00c1"+ + "_\2\u07e9\u07ea\3\2\2\2\u07ea\u07eb\b\u00ddC\2\u07eb\u01be\3\2\2\2\u07ec"+ + "\u07ed\5\u00c3`\2\u07ed\u07ee\3\2\2\2\u07ee\u07ef\b\u00deD\2\u07ef\u01c0"+ + "\3\2\2\2\u07f0\u07f1\5\u00c5a\2\u07f1\u07f2\3\2\2\2\u07f2\u07f3\b\u00df"+ + "E\2\u07f3\u01c2\3\2\2\2\u07f4\u07f5\5\u00cbd\2\u07f5\u07f6\3\2\2\2\u07f6"+ + "\u07f7\b\u00e0F\2\u07f7\u01c4\3\2\2\2\u07f8\u07f9\5\u00cde\2\u07f9\u07fa"+ + "\3\2\2\2\u07fa\u07fb\b\u00e1G\2\u07fb\u01c6\3\2\2\2\u07fc\u07fd\5\u00cf"+ + "f\2\u07fd\u07fe\3\2\2\2\u07fe\u07ff\b\u00e2H\2\u07ff\u01c8\3\2\2\2\u0800"+ + "\u0801\5\u00d1g\2\u0801\u0802\3\2\2\2\u0802\u0803\b\u00e3I\2\u0803\u01ca"+ + "\3\2\2\2\u0804\u0805\5\u00abT\2\u0805\u0806\3\2\2\2\u0806\u0807\b\u00e4"+ + "J\2\u0807\u01cc\3\2\2\2\u0808\u0809\5\u00adU\2\u0809\u080a\3\2\2\2\u080a"+ + "\u080b\b\u00e5K\2\u080b\u01ce\3\2\2\2\u080c\u080d\5\u00afV\2\u080d\u080e"+ + "\3\2\2\2\u080e\u080f\b\u00e6L\2\u080f\u01d0\3\2\2\2\u0810\u0811\5\u00b1"+ + "W\2\u0811\u0812\3\2\2\2\u0812\u0813\b\u00e7M\2\u0813\u01d2\3\2\2\2\u0814"+ + "\u0815\5o\66\2\u0815\u0816\3\2\2\2\u0816\u0817\b\u00e8N\2\u0817\u01d4"+ + "\3\2\2\2\u0818\u0819\5q\67\2\u0819\u081a\3\2\2\2\u081a\u081b\b\u00e9O"+ + "\2\u081b\u01d6\3\2\2\2\u081c\u081d\5s8\2\u081d\u081e\3\2\2\2\u081e\u081f"+ + "\b\u00eaP\2\u081f\u01d8\3\2\2\2\u0820\u0821\5\u0099K\2\u0821\u0822\3\2"+ + "\2\2\u0822\u0823\b\u00ebQ\2\u0823\u01da\3\2\2\2\u0824\u0825\5\u009bL\2"+ + "\u0825\u0826\3\2\2\2\u0826\u0827\b\u00ecR\2\u0827\u01dc\3\2\2\2\u0828"+ + "\u0829\5\u009dM\2\u0829\u082a\3\2\2\2\u082a\u082b\b\u00edS\2\u082b\u01de"+ + "\3\2\2\2\u082c\u082d\5\u009fN\2\u082d\u082e\3\2\2\2\u082e\u082f\b\u00ee"+ + "T\2\u082f\u01e0\3\2\2\2\u0830\u0831\5\u00a1O\2\u0831\u0832\3\2\2\2\u0832"+ + "\u0833\b\u00efU\2\u0833\u01e2\3\2\2\2\u0834\u0835\5\u00a3P\2\u0835\u0836"+ + "\3\2\2\2\u0836\u0837\b\u00f0V\2\u0837\u01e4\3\2\2\2\u0838\u0839\5\u00a5"+ + "Q\2\u0839\u083a\3\2\2\2\u083a\u083b\b\u00f1W\2\u083b\u01e6\3\2\2\2\u083c"+ + "\u083d\5\u00a7R\2\u083d\u083e\3\2\2\2\u083e\u083f\b\u00f2X\2\u083f\u01e8"+ + "\3\2\2\2\u0840\u0841\5\u00a9S\2\u0841\u0842\3\2\2\2\u0842\u0843\b\u00f3"+ + "Y\2\u0843\u01ea\3\2\2\2\u0844\u0845\5\u00d5i\2\u0845\u0846\3\2\2\2\u0846"+ + "\u0847\b\u00f4Z\2\u0847\u01ec\3\2\2\2\u0848\u0849\5\u00d7j\2\u0849\u084a"+ + "\3\2\2\2\u084a\u084b\b\u00f5[\2\u084b\u01ee\3\2\2\2\u084c\u084d\5\u00d9"+ + "k\2\u084d\u084e\3\2\2\2\u084e\u084f\b\u00f6\\\2\u084f\u01f0\3\2\2\2\u0850"+ + "\u0851\5\u00dbl\2\u0851\u0852\3\2\2\2\u0852\u0853\b\u00f7]\2\u0853\u01f2"+ + "\3\2\2\2\u0854\u0855\5\u00ddm\2\u0855\u0856\3\2\2\2\u0856\u0857\b\u00f8"+ + "^\2\u0857\u01f4\3\2\2\2\u0858\u0859\5\u00dfn\2\u0859\u085a\3\2\2\2\u085a"+ + "\u085b\b\u00f9_\2\u085b\u01f6\3\2\2\2\u085c\u085d\5\u00e1o\2\u085d\u085e"+ + "\3\2\2\2\u085e\u085f\b\u00fa`\2\u085f\u01f8\3\2\2\2\u0860\u0861\5\u00e3"+ + "p\2\u0861\u0862\3\2\2\2\u0862\u0863\b\u00fba\2\u0863\u01fa\3\2\2\2\u0864"+ + "\u0865\5\u00e5q\2\u0865\u0866\3\2\2\2\u0866\u0867\b\u00fcb\2\u0867\u01fc"+ + "\3\2\2\2\u0868\u0869\5\u00e7r\2\u0869\u086a\3\2\2\2\u086a\u086b\b\u00fd"+ + "c\2\u086b\u01fe\3\2\2\2\u086c\u086d\5\u00e9s\2\u086d\u086e\3\2\2\2\u086e"+ + "\u086f\b\u00fed\2\u086f\u0200\3\2\2\2\u0870\u0871\5\u00ebt\2\u0871\u0872"+ + "\3\2\2\2\u0872\u0873\b\u00ffe\2\u0873\u0202\3\2\2\2\u0874\u0875\5\u00ed"+ + "u\2\u0875\u0876\3\2\2\2\u0876\u0877\b\u0100f\2\u0877\u0204\3\2\2\2\u0878"+ + "\u0879\5\u00efv\2\u0879\u087a\3\2\2\2\u087a\u087b\b\u0101g\2\u087b\u0206"+ + "\3\2\2\2\u087c\u087d\5\u00f1w\2\u087d\u087e\3\2\2\2\u087e\u087f\b\u0102"+ + "h\2\u087f\u0208\3\2\2\2\u0880\u0881\5\u00f3x\2\u0881\u0882\3\2\2\2\u0882"+ + "\u0883\b\u0103i\2\u0883\u020a\3\2\2\2\u0884\u0885\5\u00f5y\2\u0885\u0886"+ + "\3\2\2\2\u0886\u0887\b\u0104j\2\u0887\u020c\3\2\2\2\u0888\u0889\5\u00f7"+ + "z\2\u0889\u088a\3\2\2\2\u088a\u088b\b\u0105k\2\u088b\u020e\3\2\2\2\u088c"+ + "\u088d\5\u00f9{\2\u088d\u088e\3\2\2\2\u088e\u088f\b\u0106l\2\u088f\u0210"+ + "\3\2\2\2\u0890\u0891\5\u00fb|\2\u0891\u0892\3\2\2\2\u0892\u0893\b\u0107"+ + "m\2\u0893\u0212\3\2\2\2\u0894\u0895\5\u00fd}\2\u0895\u0896\3\2\2\2\u0896"+ + "\u0897\b\u0108n\2\u0897\u0214\3\2\2\2\u0898\u0899\5\u00ff~\2\u0899\u089a"+ + "\3\2\2\2\u089a\u089b\b\u0109o\2\u089b\u0216\3\2\2\2\u089c\u089d\5\u0101"+ + "\177\2\u089d\u089e\3\2\2\2\u089e\u089f\b\u010ap\2\u089f\u0218\3\2\2\2"+ + "\u08a0\u08a1\5\u0103\u0080\2\u08a1\u08a2\3\2\2\2\u08a2\u08a3\b\u010bq"+ + "\2\u08a3\u021a\3\2\2\2\u08a4\u08a5\5\u0105\u0081\2\u08a5\u08a6\3\2\2\2"+ + "\u08a6\u08a7\b\u010cr\2\u08a7\u021c\3\2\2\2\u08a8\u08a9\5\u0123\u0090"+ + "\2\u08a9\u08aa\3\2\2\2\u08aa\u08ab\b\u010ds\2\u08ab\u021e\3\2\2\2\u08ac"+ + "\u08ad\5\u0113\u0088\2\u08ad\u08ae\3\2\2\2\u08ae\u08af\b\u010et\2\u08af"+ + "\u0220\3\2\2\2\u08b0\u08b1\5\u011b\u008c\2\u08b1\u08b2\3\2\2\2\u08b2\u08b3"+ + "\b\u010fu\2\u08b3\u0222\3\2\2\2\u08b4\u08b5\5\u011f\u008e\2\u08b5\u08b6"+ + "\3\2\2\2\u08b6\u08b7\b\u0110v\2\u08b7\u0224\3\2\2\2\u08b8\u08b9\5\u012f"+ + "\u0096\2\u08b9\u08ba\3\2\2\2\u08ba\u08bb\b\u0111w\2\u08bb\u0226\3\2\2"+ + "\2\u08bc\u08bd\5\u010b\u0084\2\u08bd\u08be\3\2\2\2\u08be\u08bf\b\u0112"+ + "x\2\u08bf\u0228\3\2\2\2\u08c0\u08c1\5\u0125\u0091\2\u08c1\u08c2\3\2\2"+ + "\2\u08c2\u08c3\b\u0113y\2\u08c3\u022a\3\2\2\2\u08c4\u08c5\5\u0111\u0087"+ + "\2\u08c5\u08c6\3\2\2\2\u08c6\u08c7\b\u0114z\2\u08c7\u022c\3\2\2\2\u08c8"+ + "\u08c9\5\u0127\u0092\2\u08c9\u08ca\3\2\2\2\u08ca\u08cb\b\u0115{\2\u08cb"+ + "\u022e\3\2\2\2\u08cc\u08cd\5\u0129\u0093\2\u08cd\u08ce\3\2\2\2\u08ce\u08cf"+ + "\b\u0116|\2\u08cf\u0230\3\2\2\2\u08d0\u08d1\5\u012b\u0094\2\u08d1\u08d2"+ + "\3\2\2\2\u08d2\u08d3\b\u0117}\2\u08d3\u0232\3\2\2\2\u08d4\u08d7\5\13\4"+ + "\2\u08d5\u08d7\5\t\3\2\u08d6\u08d4\3\2\2\2\u08d6\u08d5\3\2\2\2\u08d7\u08d8"+ + "\3\2\2\2\u08d8\u08d9\b\u0118\2\2\u08d9\u0234\3\2\2\2\u08da\u08db\5\r\5"+ + "\2\u08db\u08dc\3\2\2\2\u08dc\u08dd\b\u0119\3\2\u08dd\u0236\3\2\2\2\u08de"+ + "\u08df\5\17\6\2\u08df\u08e0\3\2\2\2\u08e0\u08e1\b\u011a\3\2\u08e1\u0238"+ + "\3\2\2\2\u08e2\u08e3\7$\2\2\u08e3\u08e4\3\2\2\2\u08e4\u08e5\b\u011b\7"+ + "\2\u08e5\u023a\3\2\2\2\u08e6\u08e7\5\u012d\u0095\2\u08e7\u023c\3\2\2\2"+ + "\u08e8\u08ea\n\25\2\2\u08e9\u08e8\3\2\2\2\u08ea\u08eb\3\2\2\2\u08eb\u08e9"+ + "\3\2\2\2\u08eb\u08ec\3\2\2\2\u08ec\u08ef\3\2\2\2\u08ed\u08ef\7&\2\2\u08ee"+ + "\u08e9\3\2\2\2\u08ee\u08ed\3\2\2\2\u08ef\u023e\3\2\2\2\u08f0\u08f1\7^"+ + "\2\2\u08f1\u08f4\13\2\2\2\u08f2\u08f4\5\u0133\u0098\2\u08f3\u08f0\3\2"+ + "\2\2\u08f3\u08f2\3\2\2\2\u08f4\u0240\3\2\2\2\u08f5\u08f6\7&\2\2\u08f6"+ + "\u08f7\7}\2\2\u08f7\u08f8\3\2\2\2\u08f8\u08f9\b\u011f~\2\u08f9\u0242\3"+ + "\2\2\2\u08fa\u08fc\5\u0245\u0121\2\u08fb\u08fa\3\2\2\2\u08fb\u08fc\3\2"+ + "\2\2\u08fc\u08fd\3\2\2\2\u08fd\u08fe\7$\2\2\u08fe\u08ff\7$\2\2\u08ff\u0900"+ + "\7$\2\2\u0900\u0901\3\2\2\2\u0901\u0902\b\u0120\7\2\u0902\u0244\3\2\2"+ + "\2\u0903\u0905\7$\2\2\u0904\u0903\3\2\2\2\u0905\u0906\3\2\2\2\u0906\u0904"+ + "\3\2\2\2\u0906\u0907\3\2\2\2\u0907\u0246\3\2\2\2\u0908\u0909\5\u012d\u0095"+ + "\2\u0909\u0248\3\2\2\2\u090a\u090c\n\25\2\2\u090b\u090a\3\2\2\2\u090c"+ + "\u090d\3\2\2\2\u090d\u090b\3\2\2\2\u090d\u090e\3\2\2\2\u090e\u0911\3\2"+ + "\2\2\u090f\u0911\7&\2\2\u0910\u090b\3\2\2\2\u0910\u090f\3\2\2\2\u0911"+ + "\u024a\3\2\2\2\u0912\u0913\7^\2\2\u0913\u0914\13\2\2\2\u0914\u024c\3\2"+ + "\2\2\u0915\u0916\7&\2\2\u0916\u0917\7}\2\2\u0917\u0918\3\2\2\2\u0918\u0919"+ + "\b\u0125~\2\u0919\u024e\3\2\2\2\u091a\u091b\5\17\6\2\u091b\u091c\3\2\2"+ + "\2\u091c\u091d\b\u0126\3\2\u091d\u0250\3\2\2\2\u091e\u091f\5!\17\2\u091f"+ + "\u0920\3\2\2\2\u0920\u0921\b\u0127\7\2\u0921\u0922\b\u0127\r\2\u0922\u0252"+ + "\3\2\2\2\u0923\u0924\5\27\n\2\u0924\u0925\3\2\2\2\u0925\u0926\b\u0128"+ + "\4\2\u0926\u0927\b\u0128\n\2\u0927\u0254\3\2\2\2\u0928\u0929\5\33\f\2"+ + "\u0929\u092a\3\2\2\2\u092a\u092b\b\u0129\4\2\u092b\u092c\b\u0129\13\2"+ + "\u092c\u0256\3\2\2\2\u092d\u092e\7+\2\2\u092e\u092f\3\2\2\2\u092f\u0930"+ + "\b\u012a\b\2\u0930\u0258\3\2\2\2\u0931\u0932\7_\2\2\u0932\u0933\3\2\2"+ + "\2\u0933\u0934\b\u012b\t\2\u0934\u025a\3\2\2\2\u0935\u0936\5\37\16\2\u0936"+ + "\u0937\3\2\2\2\u0937\u0938\b\u012c~\2\u0938\u0939\b\u012c\f\2\u0939\u025c"+ + "\3\2\2\2\u093a\u093b\5\23\b\2\u093b\u093c\3\2\2\2\u093c\u093d\b\u012d"+ + "\16\2\u093d\u025e\3\2\2\2\u093e\u093f\5\25\t\2\u093f\u0940\3\2\2\2\u0940"+ + "\u0941\b\u012e\17\2\u0941\u0260\3\2\2\2\u0942\u0943\5#\20\2\u0943\u0944"+ + "\3\2\2\2\u0944\u0945\b\u012f\20\2\u0945\u0262\3\2\2\2\u0946\u0947\5%\21"+ + "\2\u0947\u0948\3\2\2\2\u0948\u0949\b\u0130\21\2\u0949\u0264\3\2\2\2\u094a"+ + "\u094b\5\'\22\2\u094b\u094c\3\2\2\2\u094c\u094d\b\u0131\22\2\u094d\u0266"+ + "\3\2\2\2\u094e\u094f\5)\23\2\u094f\u0950\3\2\2\2\u0950\u0951\b\u0132\23"+ + "\2\u0951\u0268\3\2\2\2\u0952\u0953\5+\24\2\u0953\u0954\3\2\2\2\u0954\u0955"+ + "\b\u0133\24\2\u0955\u026a\3\2\2\2\u0956\u0957\5-\25\2\u0957\u0958\3\2"+ + "\2\2\u0958\u0959\b\u0134\25\2\u0959\u026c\3\2\2\2\u095a\u095b\5/\26\2"+ + "\u095b\u095c\3\2\2\2\u095c\u095d\b\u0135\26\2\u095d\u026e\3\2\2\2\u095e"+ + "\u095f\5\61\27\2\u095f\u0960\3\2\2\2\u0960\u0961\b\u0136\27\2\u0961\u0270"+ + "\3\2\2\2\u0962\u0963\5\63\30\2\u0963\u0964\3\2\2\2\u0964\u0965\b\u0137"+ + "\30\2\u0965\u0272\3\2\2\2\u0966\u0967\5\65\31\2\u0967\u0968\3\2\2\2\u0968"+ + "\u0969\b\u0138\31\2\u0969\u0274\3\2\2\2\u096a\u096b\5\67\32\2\u096b\u096c"+ + "\3\2\2\2\u096c\u096d\b\u0139\32\2\u096d\u0276\3\2\2\2\u096e\u096f\59\33"+ + "\2\u096f\u0970\3\2\2\2\u0970\u0971\b\u013a\33\2\u0971\u0278\3\2\2\2\u0972"+ + "\u0973\5;\34\2\u0973\u0974\3\2\2\2\u0974\u0975\b\u013b\34\2\u0975\u027a"+ + "\3\2\2\2\u0976\u0977\5=\35\2\u0977\u0978\3\2\2\2\u0978\u0979\b\u013c\35"+ + "\2\u0979\u027c\3\2\2\2\u097a\u097b\5?\36\2\u097b\u097c\3\2\2\2\u097c\u097d"+ + "\b\u013d\36\2\u097d\u027e\3\2\2\2\u097e\u097f\5A\37\2\u097f\u0980\3\2"+ + "\2\2\u0980\u0981\b\u013e\37\2\u0981\u0280\3\2\2\2\u0982\u0983\5C \2\u0983"+ + "\u0984\3\2\2\2\u0984\u0985\b\u013f \2\u0985\u0282\3\2\2\2\u0986\u0987"+ + "\5E!\2\u0987\u0988\3\2\2\2\u0988\u0989\b\u0140!\2\u0989\u0284\3\2\2\2"+ + "\u098a\u098b\5G\"\2\u098b\u098c\3\2\2\2\u098c\u098d\b\u0141\"\2\u098d"+ + "\u0286\3\2\2\2\u098e\u098f\5I#\2\u098f\u0990\3\2\2\2\u0990\u0991\b\u0142"+ + "#\2\u0991\u0288\3\2\2\2\u0992\u0993\5K$\2\u0993\u0994\3\2\2\2\u0994\u0995"+ + "\b\u0143$\2\u0995\u028a\3\2\2\2\u0996\u0997\5M%\2\u0997\u0998\3\2\2\2"+ + "\u0998\u0999\b\u0144&\2\u0999\u028c\3\2\2\2\u099a\u099b\5O&\2\u099b\u099c"+ + "\3\2\2\2\u099c\u099d\b\u0145\'\2\u099d\u028e\3\2\2\2\u099e\u099f\5Q\'"+ + "\2\u099f\u09a0\3\2\2\2\u09a0\u09a1\b\u0146(\2\u09a1\u0290\3\2\2\2\u09a2"+ + "\u09a3\5S(\2\u09a3\u09a4\3\2\2\2\u09a4\u09a5\b\u0147)\2\u09a5\u0292\3"+ + "\2\2\2\u09a6\u09a7\5U)\2\u09a7\u09a8\3\2\2\2\u09a8\u09a9\b\u0148*\2\u09a9"+ + "\u0294\3\2\2\2\u09aa\u09ab\5W*\2\u09ab\u09ac\3\2\2\2\u09ac\u09ad\b\u0149"+ + "+\2\u09ad\u0296\3\2\2\2\u09ae\u09af\5Y+\2\u09af\u09b0\3\2\2\2\u09b0\u09b1"+ + "\b\u014a,\2\u09b1\u0298\3\2\2\2\u09b2\u09b3\5[,\2\u09b3\u09b4\3\2\2\2"+ + "\u09b4\u09b5\b\u014b-\2\u09b5\u029a\3\2\2\2\u09b6\u09b7\5]-\2\u09b7\u09b8"+ + "\3\2\2\2\u09b8\u09b9\b\u014c.\2\u09b9\u029c\3\2\2\2\u09ba\u09bb\5_.\2"+ + "\u09bb\u09bc\3\2\2\2\u09bc\u09bd\b\u014d/\2\u09bd\u029e\3\2\2\2\u09be"+ + "\u09bf\5a/\2\u09bf\u09c0\3\2\2\2\u09c0\u09c1\b\u014e\60\2\u09c1\u02a0"+ + "\3\2\2\2\u09c2\u09c3\5c\60\2\u09c3\u09c4\3\2\2\2\u09c4\u09c5\b\u014f\61"+ + "\2\u09c5\u02a2\3\2\2\2\u09c6\u09c7\5e\61\2\u09c7\u09c8\3\2\2\2\u09c8\u09c9"+ + "\b\u0150\62\2\u09c9\u02a4\3\2\2\2\u09ca\u09cb\5\u00b3X\2\u09cb\u09cc\3"+ + "\2\2\2\u09cc\u09cd\b\u0151\177\2\u09cd\u02a6\3\2\2\2\u09ce\u09cf\5\u00b5"+ + "Y\2\u09cf\u09d0\3\2\2\2\u09d0\u09d1\b\u0152?\2\u09d1\u02a8\3\2\2\2\u09d2"+ + "\u09d3\5\u00b7Z\2\u09d3\u02aa\3\2\2\2\u09d4\u09d5\5\u00b9[\2\u09d5\u09d6"+ + "\3\2\2\2\u09d6\u09d7\b\u0154\63\2\u09d7\u02ac\3\2\2\2\u09d8\u09d9\5\u00bb"+ + "\\\2\u09d9\u09da\3\2\2\2\u09da\u09db\b\u0155\64\2\u09db\u02ae\3\2\2\2"+ + "\u09dc\u09dd\5g\62\2\u09dd\u09de\3\2\2\2\u09de\u09df\b\u0156\65\2\u09df"+ + "\u02b0\3\2\2\2\u09e0\u09e1\5i\63\2\u09e1\u09e2\3\2\2\2\u09e2\u09e3\b\u0157"+ + "\66\2\u09e3\u02b2\3\2\2\2\u09e4\u09e5\5k\64\2\u09e5\u09e6\3\2\2\2\u09e6"+ + "\u09e7\b\u0158\67\2\u09e7\u02b4\3\2\2\2\u09e8\u09e9\5m\65\2\u09e9\u09ea"+ + "\3\2\2\2\u09ea\u09eb\b\u01598\2\u09eb\u02b6\3\2\2\2\u09ec\u09ed\5\u0107"+ + "\u0082\2\u09ed\u09ee\3\2\2\2\u09ee\u09ef\b\u015a\5\2\u09ef\u09f0\b\u015a"+ + "9\2\u09f0\u02b8\3\2\2\2\u09f1\u09f2\5\u0109\u0083\2\u09f2\u09f3\3\2\2"+ + "\2\u09f3\u09f4\b\u015b\6\2\u09f4\u09f5\b\u015b:\2\u09f5\u02ba\3\2\2\2"+ + "\u09f6\u09f7\5\u0123\u0090\2\u09f7\u09f8\3\2\2\2\u09f8\u09f9\b\u015cs"+ + "\2\u09f9\u02bc\3\2\2\2\u09fa\u09fb\5\u0113\u0088\2\u09fb\u09fc\3\2\2\2"+ + "\u09fc\u09fd\b\u015dt\2\u09fd\u02be\3\2\2\2\u09fe\u09ff\5\u011b\u008c"+ + "\2\u09ff\u0a00\3\2\2\2\u0a00\u0a01\b\u015eu\2\u0a01\u02c0\3\2\2\2\u0a02"+ + "\u0a03\5\u011f\u008e\2\u0a03\u0a04\3\2\2\2\u0a04\u0a05\b\u015fv\2\u0a05"+ + "\u02c2\3\2\2\2\u0a06\u0a07\5\u012f\u0096\2\u0a07\u0a08\3\2\2\2\u0a08\u0a09"+ + "\b\u0160w\2\u0a09\u02c4\3\2\2\2\u0a0a\u0a0b\5\u010b\u0084\2\u0a0b\u0a0c"+ + "\3\2\2\2\u0a0c\u0a0d\b\u0161x\2\u0a0d\u02c6\3\2\2\2\u0a0e\u0a0f\5\u0125"+ + "\u0091\2\u0a0f\u0a10\3\2\2\2\u0a10\u0a11\b\u0162y\2\u0a11\u02c8\3\2\2"+ + "\2\u0a12\u0a13\5\u0111\u0087\2\u0a13\u0a14\3\2\2\2\u0a14\u0a15\b\u0163"+ + "z\2\u0a15\u02ca\3\2\2\2\u0a16\u0a17\5\u0127\u0092\2\u0a17\u0a18\3\2\2"+ + "\2\u0a18\u0a19\b\u0164{\2\u0a19\u02cc\3\2\2\2\u0a1a\u0a1b\5\u0129\u0093"+ + "\2\u0a1b\u0a1c\3\2\2\2\u0a1c\u0a1d\b\u0165|\2\u0a1d\u02ce\3\2\2\2\u0a1e"+ + "\u0a1f\5\u012b\u0094\2\u0a1f\u0a20\3\2\2\2\u0a20\u0a21\b\u0166}\2\u0a21"+ + "\u02d0\3\2\2\2\u0a22\u0a25\5\13\4\2\u0a23\u0a25\5\t\3\2\u0a24\u0a22\3"+ + "\2\2\2\u0a24\u0a23\3\2\2\2\u0a25\u0a26\3\2\2\2\u0a26\u0a27\b\u0167\2\2"+ + "\u0a27\u02d2\3\2\2\2\u0a28\u0a29\5\r\5\2\u0a29\u0a2a\3\2\2\2\u0a2a\u0a2b"+ + "\b\u0168\3\2\u0a2b\u02d4\3\2\2\2\u0a2c\u0a2d\5\17\6\2\u0a2d\u0a2e\3\2"+ + "\2\2\u0a2e\u0a2f\b\u0169\3\2\u0a2f\u02d6\3\2\2\2W\2\3\4\5\6\u02dd\u02e7"+ + "\u02e9\u02f7\u0303\u0472\u0474\u047c\u047e\u05a3\u05a7\u05af\u05b3\u05b9"+ + "\u05bb\u05c0\u05c3\u05c8\u05cd\u05cf\u05d6\u05da\u05df\u05e4\u05e8\u05ed"+ + "\u05ef\u05f6\u05f8\u05fd\u0602\u0607\u0609\u060e\u0613\u0615\u0619\u061e"+ + "\u0627\u062d\u062f\u0637\u063c\u0641\u0647\u064c\u0651\u0653\u065a\u065c"+ + "\u0661\u0666\u066b\u066d\u0672\u0677\u0679\u067d\u068a\u068c\u0696\u0698"+ + "\u06a6\u06af\u06b4\u06b6\u06bd\u06c0\u06ce\u06d4\u06e6\u08d6\u08eb\u08ee"+ + "\u08f3\u08fb\u0906\u090d\u0910\u0a24\u0080\2\3\2\b\2\2\7\3\2\7\4\2\7\5"+ + "\2\6\2\2\t\f\2\t\16\2\t\13\2\t\r\2\t\17\2\t\20\2\t\t\2\t\n\2\t\21\2\t"+ + "\22\2\t\23\2\t\24\2\t\25\2\t\26\2\t\27\2\t\30\2\t\31\2\t\32\2\t\33\2\t"+ + "\34\2\t\35\2\t\36\2\t\37\2\t \2\t!\2\t\"\2\t#\2\t$\2\t%\2\t\b\2\t&\2\t"+ + "\'\2\t(\2\t)\2\t*\2\t+\2\t,\2\t-\2\t.\2\t/\2\t\60\2\t\61\2\t\62\2\t\\"+ + "\2\t]\2\t\63\2\t\64\2\t\65\2\t\66\2\t\u0083\2\t\u0084\2\tA\2\tB\2\t@\2"+ + "\tI\2\t[\2\t^\2\t_\2\t:\2\t`\2\ta\2\tb\2\te\2\tf\2\tg\2\th\2\tU\2\tV\2"+ + "\tW\2\tX\2\t\67\2\t8\2\t9\2\tL\2\tM\2\tN\2\tO\2\tP\2\tQ\2\tR\2\tS\2\t"+ + "T\2\tj\2\tk\2\tl\2\tm\2\tn\2\to\2\tp\2\tq\2\tr\2\ts\2\tt\2\tu\2\tv\2\t"+ + "w\2\tx\2\ty\2\tz\2\t{\2\t|\2\t}\2\t~\2\t\177\2\t\u0080\2\t\u0081\2\t\u0082"+ + "\2\t\u008c\2\t\u0089\2\t\u008a\2\t\u008b\2\t\u0092\2\t\u0085\2\t\u008d"+ + "\2\t\u0088\2\t\u008e\2\t\u008f\2\t\u0090\2\7\6\2\tZ\2"; + public static final String _serializedATN = Utils.join( + new String[] { + _serializedATNSegment0, + _serializedATNSegment1 + }, + "" + ); + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/src/main/java/grammar/KotlinLexer.tokens b/src/main/java/grammar/KotlinLexer.tokens new file mode 100644 index 00000000..fd7e0648 --- /dev/null +++ b/src/main/java/grammar/KotlinLexer.tokens @@ -0,0 +1,288 @@ +ShebangLine=1 +DelimitedComment=2 +LineComment=3 +WS=4 +NL=5 +RESERVED=6 +DOT=7 +COMMA=8 +LPAREN=9 +RPAREN=10 +LSQUARE=11 +RSQUARE=12 +LCURL=13 +RCURL=14 +MULT=15 +MOD=16 +DIV=17 +ADD=18 +SUB=19 +INCR=20 +DECR=21 +CONJ=22 +DISJ=23 +EXCL=24 +COLON=25 +SEMICOLON=26 +ASSIGNMENT=27 +ADD_ASSIGNMENT=28 +SUB_ASSIGNMENT=29 +MULT_ASSIGNMENT=30 +DIV_ASSIGNMENT=31 +MOD_ASSIGNMENT=32 +ARROW=33 +DOUBLE_ARROW=34 +RANGE=35 +COLONCOLON=36 +Q_COLONCOLON=37 +DOUBLE_SEMICOLON=38 +HASH=39 +AT=40 +QUEST=41 +ELVIS=42 +LANGLE=43 +RANGLE=44 +LE=45 +GE=46 +EXCL_EQ=47 +EXCL_EQEQ=48 +AS_SAFE=49 +EQEQ=50 +EQEQEQ=51 +SINGLE_QUOTE=52 +RETURN_AT=53 +CONTINUE_AT=54 +BREAK_AT=55 +FILE=56 +PACKAGE=57 +IMPORT=58 +CLASS=59 +INTERFACE=60 +FUN=61 +OBJECT=62 +VAL=63 +VAR=64 +TYPE_ALIAS=65 +CONSTRUCTOR=66 +BY=67 +COMPANION=68 +INIT=69 +THIS=70 +SUPER=71 +TYPEOF=72 +WHERE=73 +IF=74 +ELSE=75 +WHEN=76 +TRY=77 +CATCH=78 +FINALLY=79 +FOR=80 +DO=81 +WHILE=82 +THROW=83 +RETURN=84 +CONTINUE=85 +BREAK=86 +AS=87 +IS=88 +IN=89 +NOT_IS=90 +NOT_IN=91 +OUT=92 +FIELD=93 +PROPERTY=94 +GET=95 +SET=96 +GETTER=97 +SETTER=98 +RECEIVER=99 +PARAM=100 +SETPARAM=101 +DELEGATE=102 +DYNAMIC=103 +PUBLIC=104 +PRIVATE=105 +PROTECTED=106 +INTERNAL=107 +ENUM=108 +SEALED=109 +ANNOTATION=110 +DATA=111 +INNER=112 +TAILREC=113 +OPERATOR=114 +INLINE=115 +INFIX=116 +EXTERNAL=117 +SUSPEND=118 +OVERRIDE=119 +ABSTRACT=120 +FINAL=121 +OPEN=122 +CONST=123 +LATEINIT=124 +VARARG=125 +NOINLINE=126 +CROSSINLINE=127 +REIFIED=128 +QUOTE_OPEN=129 +TRIPLE_QUOTE_OPEN=130 +RealLiteral=131 +FloatLiteral=132 +DoubleLiteral=133 +LongLiteral=134 +IntegerLiteral=135 +HexLiteral=136 +BinLiteral=137 +BooleanLiteral=138 +NullLiteral=139 +Identifier=140 +LabelReference=141 +LabelDefinition=142 +FieldIdentifier=143 +CharacterLiteral=144 +UNICODE_CLASS_LL=145 +UNICODE_CLASS_LM=146 +UNICODE_CLASS_LO=147 +UNICODE_CLASS_LT=148 +UNICODE_CLASS_LU=149 +UNICODE_CLASS_ND=150 +UNICODE_CLASS_NL=151 +Inside_Comment=152 +Inside_WS=153 +Inside_NL=154 +QUOTE_CLOSE=155 +LineStrRef=156 +LineStrText=157 +LineStrEscapedChar=158 +LineStrExprStart=159 +TRIPLE_QUOTE_CLOSE=160 +MultiLineStringQuote=161 +MultiLineStrRef=162 +MultiLineStrText=163 +MultiLineStrEscapedChar=164 +MultiLineStrExprStart=165 +MultiLineNL=166 +StrExpr_IN=167 +StrExpr_Comment=168 +StrExpr_WS=169 +StrExpr_NL=170 +'...'=6 +'.'=7 +','=8 +'('=9 +'['=11 +'{'=13 +'}'=14 +'*'=15 +'%'=16 +'/'=17 +'+'=18 +'-'=19 +'++'=20 +'--'=21 +'&&'=22 +'||'=23 +'!'=24 +':'=25 +';'=26 +'='=27 +'+='=28 +'-='=29 +'*='=30 +'/='=31 +'%='=32 +'->'=33 +'=>'=34 +'..'=35 +'::'=36 +'?::'=37 +';;'=38 +'#'=39 +'@'=40 +'?'=41 +'?:'=42 +'<'=43 +'>'=44 +'<='=45 +'>='=46 +'!='=47 +'!=='=48 +'as?'=49 +'=='=50 +'==='=51 +'\''=52 +'@file'=56 +'package'=57 +'import'=58 +'class'=59 +'interface'=60 +'fun'=61 +'object'=62 +'val'=63 +'var'=64 +'typealias'=65 +'constructor'=66 +'by'=67 +'companion'=68 +'init'=69 +'this'=70 +'super'=71 +'typeof'=72 +'where'=73 +'if'=74 +'else'=75 +'when'=76 +'try'=77 +'catch'=78 +'finally'=79 +'for'=80 +'do'=81 +'while'=82 +'throw'=83 +'return'=84 +'continue'=85 +'break'=86 +'as'=87 +'is'=88 +'in'=89 +'out'=92 +'@field'=93 +'@property'=94 +'@get'=95 +'@set'=96 +'get'=97 +'set'=98 +'@receiver'=99 +'@param'=100 +'@setparam'=101 +'@delegate'=102 +'dynamic'=103 +'public'=104 +'private'=105 +'protected'=106 +'internal'=107 +'enum'=108 +'sealed'=109 +'annotation'=110 +'data'=111 +'inner'=112 +'tailrec'=113 +'operator'=114 +'inline'=115 +'infix'=116 +'external'=117 +'suspend'=118 +'override'=119 +'abstract'=120 +'final'=121 +'open'=122 +'const'=123 +'lateinit'=124 +'vararg'=125 +'noinline'=126 +'crossinline'=127 +'reified'=128 +'"""'=130 +'null'=139 diff --git a/src/main/java/grammar/KotlinParser.java b/src/main/java/grammar/KotlinParser.java new file mode 100644 index 00000000..da47744b --- /dev/null +++ b/src/main/java/grammar/KotlinParser.java @@ -0,0 +1,16091 @@ +// Generated from KotlinParser.g4 by ANTLR 4.5 +package grammar; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.misc.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; +import java.util.Iterator; +import java.util.ArrayList; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class KotlinParser extends Parser { + static { RuntimeMetaData.checkVersion("4.5", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + ShebangLine=1, DelimitedComment=2, LineComment=3, WS=4, NL=5, RESERVED=6, + DOT=7, COMMA=8, LPAREN=9, RPAREN=10, LSQUARE=11, RSQUARE=12, LCURL=13, + RCURL=14, MULT=15, MOD=16, DIV=17, ADD=18, SUB=19, INCR=20, DECR=21, CONJ=22, + DISJ=23, EXCL=24, COLON=25, SEMICOLON=26, ASSIGNMENT=27, ADD_ASSIGNMENT=28, + SUB_ASSIGNMENT=29, MULT_ASSIGNMENT=30, DIV_ASSIGNMENT=31, MOD_ASSIGNMENT=32, + ARROW=33, DOUBLE_ARROW=34, RANGE=35, COLONCOLON=36, Q_COLONCOLON=37, DOUBLE_SEMICOLON=38, + HASH=39, AT=40, QUEST=41, ELVIS=42, LANGLE=43, RANGLE=44, LE=45, GE=46, + EXCL_EQ=47, EXCL_EQEQ=48, AS_SAFE=49, EQEQ=50, EQEQEQ=51, SINGLE_QUOTE=52, + RETURN_AT=53, CONTINUE_AT=54, BREAK_AT=55, FILE=56, PACKAGE=57, IMPORT=58, + CLASS=59, INTERFACE=60, FUN=61, OBJECT=62, VAL=63, VAR=64, TYPE_ALIAS=65, + CONSTRUCTOR=66, BY=67, COMPANION=68, INIT=69, THIS=70, SUPER=71, TYPEOF=72, + WHERE=73, IF=74, ELSE=75, WHEN=76, TRY=77, CATCH=78, FINALLY=79, FOR=80, + DO=81, WHILE=82, THROW=83, RETURN=84, CONTINUE=85, BREAK=86, AS=87, IS=88, + IN=89, NOT_IS=90, NOT_IN=91, OUT=92, FIELD=93, PROPERTY=94, GET=95, SET=96, + GETTER=97, SETTER=98, RECEIVER=99, PARAM=100, SETPARAM=101, DELEGATE=102, + DYNAMIC=103, PUBLIC=104, PRIVATE=105, PROTECTED=106, INTERNAL=107, ENUM=108, + SEALED=109, ANNOTATION=110, DATA=111, INNER=112, TAILREC=113, OPERATOR=114, + INLINE=115, INFIX=116, EXTERNAL=117, SUSPEND=118, OVERRIDE=119, ABSTRACT=120, + FINAL=121, OPEN=122, CONST=123, LATEINIT=124, VARARG=125, NOINLINE=126, + CROSSINLINE=127, REIFIED=128, QUOTE_OPEN=129, TRIPLE_QUOTE_OPEN=130, RealLiteral=131, + FloatLiteral=132, DoubleLiteral=133, LongLiteral=134, IntegerLiteral=135, + HexLiteral=136, BinLiteral=137, BooleanLiteral=138, NullLiteral=139, Identifier=140, + LabelReference=141, LabelDefinition=142, FieldIdentifier=143, CharacterLiteral=144, + UNICODE_CLASS_LL=145, UNICODE_CLASS_LM=146, UNICODE_CLASS_LO=147, UNICODE_CLASS_LT=148, + UNICODE_CLASS_LU=149, UNICODE_CLASS_ND=150, UNICODE_CLASS_NL=151, Inside_Comment=152, + Inside_WS=153, Inside_NL=154, QUOTE_CLOSE=155, LineStrRef=156, LineStrText=157, + LineStrEscapedChar=158, LineStrExprStart=159, TRIPLE_QUOTE_CLOSE=160, + MultiLineStringQuote=161, MultiLineStrRef=162, MultiLineStrText=163, MultiLineStrEscapedChar=164, + MultiLineStrExprStart=165, MultiLineNL=166, StrExpr_IN=167, StrExpr_Comment=168, + StrExpr_WS=169, StrExpr_NL=170; + public static final int + RULE_kotlinFile = 0, RULE_script = 1, RULE_preamble = 2, RULE_fileAnnotations = 3, + RULE_fileAnnotation = 4, RULE_packageHeader = 5, RULE_importList = 6, + RULE_importHeader = 7, RULE_importAlias = 8, RULE_topLevelObject = 9, + RULE_classDeclaration = 10, RULE_primaryConstructor = 11, RULE_classParameters = 12, + RULE_classParameter = 13, RULE_delegationSpecifiers = 14, RULE_delegationSpecifier = 15, + RULE_constructorInvocation = 16, RULE_explicitDelegation = 17, RULE_classBody = 18, + RULE_classMemberDeclaration = 19, RULE_anonymousInitializer = 20, RULE_secondaryConstructor = 21, + RULE_constructorDelegationCall = 22, RULE_enumClassBody = 23, RULE_enumEntries = 24, + RULE_enumEntry = 25, RULE_functionDeclaration = 26, RULE_functionValueParameters = 27, + RULE_functionValueParameter = 28, RULE_parameter = 29, RULE_receiverType = 30, + RULE_functionBody = 31, RULE_objectDeclaration = 32, RULE_companionObject = 33, + RULE_propertyDeclaration = 34, RULE_multiVariableDeclaration = 35, RULE_variableDeclaration = 36, + RULE_getter = 37, RULE_setter = 38, RULE_typeAlias = 39, RULE_typeParameters = 40, + RULE_typeParameter = 41, RULE_type = 42, RULE_typeModifierList = 43, RULE_parenthesizedType = 44, + RULE_nullableType = 45, RULE_typeReference = 46, RULE_functionType = 47, + RULE_functionTypeReceiver = 48, RULE_userType = 49, RULE_simpleUserType = 50, + RULE_functionTypeParameters = 51, RULE_typeConstraints = 52, RULE_typeConstraint = 53, + RULE_block = 54, RULE_statements = 55, RULE_statement = 56, RULE_blockLevelExpression = 57, + RULE_declaration = 58, RULE_expression = 59, RULE_disjunction = 60, RULE_conjunction = 61, + RULE_equalityComparison = 62, RULE_comparison = 63, RULE_namedInfix = 64, + RULE_elvisExpression = 65, RULE_infixFunctionCall = 66, RULE_rangeExpression = 67, + RULE_additiveExpression = 68, RULE_multiplicativeExpression = 69, RULE_typeRHS = 70, + RULE_prefixUnaryExpression = 71, RULE_postfixUnaryExpression = 72, RULE_atomicExpression = 73, + RULE_parenthesizedExpression = 74, RULE_callSuffix = 75, RULE_annotatedLambda = 76, + RULE_arrayAccess = 77, RULE_valueArguments = 78, RULE_typeArguments = 79, + RULE_typeProjection = 80, RULE_typeProjectionModifierList = 81, RULE_valueArgument = 82, + RULE_literalConstant = 83, RULE_stringLiteral = 84, RULE_lineStringLiteral = 85, + RULE_multiLineStringLiteral = 86, RULE_lineStringContent = 87, RULE_lineStringExpression = 88, + RULE_multiLineStringContent = 89, RULE_multiLineStringExpression = 90, + RULE_functionLiteral = 91, RULE_lambdaParameters = 92, RULE_lambdaParameter = 93, + RULE_objectLiteral = 94, RULE_collectionLiteral = 95, RULE_thisExpression = 96, + RULE_superExpression = 97, RULE_conditionalExpression = 98, RULE_ifExpression = 99, + RULE_controlStructureBody = 100, RULE_whenExpression = 101, RULE_whenEntry = 102, + RULE_whenCondition = 103, RULE_rangeTest = 104, RULE_typeTest = 105, RULE_tryExpression = 106, + RULE_catchBlock = 107, RULE_finallyBlock = 108, RULE_loopExpression = 109, + RULE_forExpression = 110, RULE_whileExpression = 111, RULE_doWhileExpression = 112, + RULE_jumpExpression = 113, RULE_callableReference = 114, RULE_assignmentOperator = 115, + RULE_equalityOperation = 116, RULE_comparisonOperator = 117, RULE_inOperator = 118, + RULE_isOperator = 119, RULE_additiveOperator = 120, RULE_multiplicativeOperation = 121, + RULE_typeOperation = 122, RULE_prefixUnaryOperation = 123, RULE_postfixUnaryOperation = 124, + RULE_memberAccessOperator = 125, RULE_modifierList = 126, RULE_modifier = 127, + RULE_classModifier = 128, RULE_memberModifier = 129, RULE_visibilityModifier = 130, + RULE_varianceAnnotation = 131, RULE_functionModifier = 132, RULE_propertyModifier = 133, + RULE_inheritanceModifier = 134, RULE_parameterModifier = 135, RULE_typeParameterModifier = 136, + RULE_labelDefinition = 137, RULE_annotations = 138, RULE_annotation = 139, + RULE_annotationList = 140, RULE_annotationUseSiteTarget = 141, RULE_unescapedAnnotation = 142, + RULE_identifier = 143, RULE_simpleIdentifier = 144, RULE_semi = 145, RULE_anysemi = 146; + public static final String[] ruleNames = { + "kotlinFile", "script", "preamble", "fileAnnotations", "fileAnnotation", + "packageHeader", "importList", "importHeader", "importAlias", "topLevelObject", + "classDeclaration", "primaryConstructor", "classParameters", "classParameter", + "delegationSpecifiers", "delegationSpecifier", "constructorInvocation", + "explicitDelegation", "classBody", "classMemberDeclaration", "anonymousInitializer", + "secondaryConstructor", "constructorDelegationCall", "enumClassBody", + "enumEntries", "enumEntry", "functionDeclaration", "functionValueParameters", + "functionValueParameter", "parameter", "receiverType", "functionBody", + "objectDeclaration", "companionObject", "propertyDeclaration", "multiVariableDeclaration", + "variableDeclaration", "getter", "setter", "typeAlias", "typeParameters", + "typeParameter", "type", "typeModifierList", "parenthesizedType", "nullableType", + "typeReference", "functionType", "functionTypeReceiver", "userType", "simpleUserType", + "functionTypeParameters", "typeConstraints", "typeConstraint", "block", + "statements", "statement", "blockLevelExpression", "declaration", "expression", + "disjunction", "conjunction", "equalityComparison", "comparison", "namedInfix", + "elvisExpression", "infixFunctionCall", "rangeExpression", "additiveExpression", + "multiplicativeExpression", "typeRHS", "prefixUnaryExpression", "postfixUnaryExpression", + "atomicExpression", "parenthesizedExpression", "callSuffix", "annotatedLambda", + "arrayAccess", "valueArguments", "typeArguments", "typeProjection", "typeProjectionModifierList", + "valueArgument", "literalConstant", "stringLiteral", "lineStringLiteral", + "multiLineStringLiteral", "lineStringContent", "lineStringExpression", + "multiLineStringContent", "multiLineStringExpression", "functionLiteral", + "lambdaParameters", "lambdaParameter", "objectLiteral", "collectionLiteral", + "thisExpression", "superExpression", "conditionalExpression", "ifExpression", + "controlStructureBody", "whenExpression", "whenEntry", "whenCondition", + "rangeTest", "typeTest", "tryExpression", "catchBlock", "finallyBlock", + "loopExpression", "forExpression", "whileExpression", "doWhileExpression", + "jumpExpression", "callableReference", "assignmentOperator", "equalityOperation", + "comparisonOperator", "inOperator", "isOperator", "additiveOperator", + "multiplicativeOperation", "typeOperation", "prefixUnaryOperation", "postfixUnaryOperation", + "memberAccessOperator", "modifierList", "modifier", "classModifier", "memberModifier", + "visibilityModifier", "varianceAnnotation", "functionModifier", "propertyModifier", + "inheritanceModifier", "parameterModifier", "typeParameterModifier", "labelDefinition", + "annotations", "annotation", "annotationList", "annotationUseSiteTarget", + "unescapedAnnotation", "identifier", "simpleIdentifier", "semi", "anysemi" + }; + + private static final String[] _LITERAL_NAMES = { + null, null, null, null, null, null, "'...'", "'.'", "','", "'('", null, + "'['", null, "'{'", "'}'", "'*'", "'%'", "'/'", "'+'", "'-'", "'++'", + "'--'", "'&&'", "'||'", "'!'", "':'", "';'", "'='", "'+='", "'-='", "'*='", + "'/='", "'%='", "'->'", "'=>'", "'..'", "'::'", "'?::'", "';;'", "'#'", + "'@'", "'?'", "'?:'", "'<'", "'>'", "'<='", "'>='", "'!='", "'!=='", "'as?'", + "'=='", "'==='", "'''", null, null, null, "'@file'", "'package'", "'import'", + "'class'", "'interface'", "'fun'", "'object'", "'val'", "'var'", "'typealias'", + "'constructor'", "'by'", "'companion'", "'init'", "'this'", "'super'", + "'typeof'", "'where'", "'if'", "'else'", "'when'", "'try'", "'catch'", + "'finally'", "'for'", "'do'", "'while'", "'throw'", "'return'", "'continue'", + "'break'", "'as'", "'is'", "'in'", null, null, "'out'", "'@field'", "'@property'", + "'@get'", "'@set'", "'get'", "'set'", "'@receiver'", "'@param'", "'@setparam'", + "'@delegate'", "'dynamic'", "'public'", "'private'", "'protected'", "'internal'", + "'enum'", "'sealed'", "'annotation'", "'data'", "'inner'", "'tailrec'", + "'operator'", "'inline'", "'infix'", "'external'", "'suspend'", "'override'", + "'abstract'", "'final'", "'open'", "'const'", "'lateinit'", "'vararg'", + "'noinline'", "'crossinline'", "'reified'", null, "'\"\"\"'", null, null, + null, null, null, null, null, null, "'null'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, "ShebangLine", "DelimitedComment", "LineComment", "WS", "NL", "RESERVED", + "DOT", "COMMA", "LPAREN", "RPAREN", "LSQUARE", "RSQUARE", "LCURL", "RCURL", + "MULT", "MOD", "DIV", "ADD", "SUB", "INCR", "DECR", "CONJ", "DISJ", "EXCL", + "COLON", "SEMICOLON", "ASSIGNMENT", "ADD_ASSIGNMENT", "SUB_ASSIGNMENT", + "MULT_ASSIGNMENT", "DIV_ASSIGNMENT", "MOD_ASSIGNMENT", "ARROW", "DOUBLE_ARROW", + "RANGE", "COLONCOLON", "Q_COLONCOLON", "DOUBLE_SEMICOLON", "HASH", "AT", + "QUEST", "ELVIS", "LANGLE", "RANGLE", "LE", "GE", "EXCL_EQ", "EXCL_EQEQ", + "AS_SAFE", "EQEQ", "EQEQEQ", "SINGLE_QUOTE", "RETURN_AT", "CONTINUE_AT", + "BREAK_AT", "FILE", "PACKAGE", "IMPORT", "CLASS", "INTERFACE", "FUN", + "OBJECT", "VAL", "VAR", "TYPE_ALIAS", "CONSTRUCTOR", "BY", "COMPANION", + "INIT", "THIS", "SUPER", "TYPEOF", "WHERE", "IF", "ELSE", "WHEN", "TRY", + "CATCH", "FINALLY", "FOR", "DO", "WHILE", "THROW", "RETURN", "CONTINUE", + "BREAK", "AS", "IS", "IN", "NOT_IS", "NOT_IN", "OUT", "FIELD", "PROPERTY", + "GET", "SET", "GETTER", "SETTER", "RECEIVER", "PARAM", "SETPARAM", "DELEGATE", + "DYNAMIC", "PUBLIC", "PRIVATE", "PROTECTED", "INTERNAL", "ENUM", "SEALED", + "ANNOTATION", "DATA", "INNER", "TAILREC", "OPERATOR", "INLINE", "INFIX", + "EXTERNAL", "SUSPEND", "OVERRIDE", "ABSTRACT", "FINAL", "OPEN", "CONST", + "LATEINIT", "VARARG", "NOINLINE", "CROSSINLINE", "REIFIED", "QUOTE_OPEN", + "TRIPLE_QUOTE_OPEN", "RealLiteral", "FloatLiteral", "DoubleLiteral", "LongLiteral", + "IntegerLiteral", "HexLiteral", "BinLiteral", "BooleanLiteral", "NullLiteral", + "Identifier", "LabelReference", "LabelDefinition", "FieldIdentifier", + "CharacterLiteral", "UNICODE_CLASS_LL", "UNICODE_CLASS_LM", "UNICODE_CLASS_LO", + "UNICODE_CLASS_LT", "UNICODE_CLASS_LU", "UNICODE_CLASS_ND", "UNICODE_CLASS_NL", + "Inside_Comment", "Inside_WS", "Inside_NL", "QUOTE_CLOSE", "LineStrRef", + "LineStrText", "LineStrEscapedChar", "LineStrExprStart", "TRIPLE_QUOTE_CLOSE", + "MultiLineStringQuote", "MultiLineStrRef", "MultiLineStrText", "MultiLineStrEscapedChar", + "MultiLineStrExprStart", "MultiLineNL", "StrExpr_IN", "StrExpr_Comment", + "StrExpr_WS", "StrExpr_NL" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + @Override + public String getGrammarFileName() { return "KotlinParser.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public KotlinParser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + public static class KotlinFileContext extends ParserRuleContext { + public PreambleContext preamble() { + return getRuleContext(PreambleContext.class,0); + } + public TerminalNode EOF() { return getToken(KotlinParser.EOF, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public List anysemi() { + return getRuleContexts(AnysemiContext.class); + } + public AnysemiContext anysemi(int i) { + return getRuleContext(AnysemiContext.class,i); + } + public List topLevelObject() { + return getRuleContexts(TopLevelObjectContext.class); + } + public TopLevelObjectContext topLevelObject(int i) { + return getRuleContext(TopLevelObjectContext.class,i); + } + public KotlinFileContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_kotlinFile; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterKotlinFile(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitKotlinFile(this); + } + } + + public final KotlinFileContext kotlinFile() throws RecognitionException { + KotlinFileContext _localctx = new KotlinFileContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_kotlinFile); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(297); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,0,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(294); + match(NL); + } + } + } + setState(299); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,0,_ctx); + } + setState(300); + preamble(); + setState(304); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL || _la==SEMICOLON) { + { + { + setState(301); + anysemi(); + } + } + setState(306); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(321); + _la = _input.LA(1); + if (((((_la - 40)) & ~0x3f) == 0 && ((1L << (_la - 40)) & ((1L << (AT - 40)) | (1L << (FILE - 40)) | (1L << (CLASS - 40)) | (1L << (INTERFACE - 40)) | (1L << (FUN - 40)) | (1L << (OBJECT - 40)) | (1L << (VAL - 40)) | (1L << (VAR - 40)) | (1L << (TYPE_ALIAS - 40)) | (1L << (IN - 40)) | (1L << (OUT - 40)) | (1L << (FIELD - 40)) | (1L << (PROPERTY - 40)) | (1L << (GET - 40)) | (1L << (SET - 40)) | (1L << (RECEIVER - 40)) | (1L << (PARAM - 40)) | (1L << (SETPARAM - 40)) | (1L << (DELEGATE - 40)))) != 0) || ((((_la - 104)) & ~0x3f) == 0 && ((1L << (_la - 104)) & ((1L << (PUBLIC - 104)) | (1L << (PRIVATE - 104)) | (1L << (PROTECTED - 104)) | (1L << (INTERNAL - 104)) | (1L << (ENUM - 104)) | (1L << (SEALED - 104)) | (1L << (ANNOTATION - 104)) | (1L << (DATA - 104)) | (1L << (INNER - 104)) | (1L << (TAILREC - 104)) | (1L << (OPERATOR - 104)) | (1L << (INLINE - 104)) | (1L << (INFIX - 104)) | (1L << (EXTERNAL - 104)) | (1L << (SUSPEND - 104)) | (1L << (OVERRIDE - 104)) | (1L << (ABSTRACT - 104)) | (1L << (FINAL - 104)) | (1L << (OPEN - 104)) | (1L << (CONST - 104)) | (1L << (LATEINIT - 104)) | (1L << (VARARG - 104)) | (1L << (NOINLINE - 104)) | (1L << (CROSSINLINE - 104)) | (1L << (REIFIED - 104)) | (1L << (LabelReference - 104)))) != 0)) { + { + setState(307); + topLevelObject(); + setState(318); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL || _la==SEMICOLON) { + { + { + setState(309); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(308); + anysemi(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(311); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,2,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + setState(314); + _la = _input.LA(1); + if (((((_la - 40)) & ~0x3f) == 0 && ((1L << (_la - 40)) & ((1L << (AT - 40)) | (1L << (FILE - 40)) | (1L << (CLASS - 40)) | (1L << (INTERFACE - 40)) | (1L << (FUN - 40)) | (1L << (OBJECT - 40)) | (1L << (VAL - 40)) | (1L << (VAR - 40)) | (1L << (TYPE_ALIAS - 40)) | (1L << (IN - 40)) | (1L << (OUT - 40)) | (1L << (FIELD - 40)) | (1L << (PROPERTY - 40)) | (1L << (GET - 40)) | (1L << (SET - 40)) | (1L << (RECEIVER - 40)) | (1L << (PARAM - 40)) | (1L << (SETPARAM - 40)) | (1L << (DELEGATE - 40)))) != 0) || ((((_la - 104)) & ~0x3f) == 0 && ((1L << (_la - 104)) & ((1L << (PUBLIC - 104)) | (1L << (PRIVATE - 104)) | (1L << (PROTECTED - 104)) | (1L << (INTERNAL - 104)) | (1L << (ENUM - 104)) | (1L << (SEALED - 104)) | (1L << (ANNOTATION - 104)) | (1L << (DATA - 104)) | (1L << (INNER - 104)) | (1L << (TAILREC - 104)) | (1L << (OPERATOR - 104)) | (1L << (INLINE - 104)) | (1L << (INFIX - 104)) | (1L << (EXTERNAL - 104)) | (1L << (SUSPEND - 104)) | (1L << (OVERRIDE - 104)) | (1L << (ABSTRACT - 104)) | (1L << (FINAL - 104)) | (1L << (OPEN - 104)) | (1L << (CONST - 104)) | (1L << (LATEINIT - 104)) | (1L << (VARARG - 104)) | (1L << (NOINLINE - 104)) | (1L << (CROSSINLINE - 104)) | (1L << (REIFIED - 104)) | (1L << (LabelReference - 104)))) != 0)) { + { + setState(313); + topLevelObject(); + } + } + + } + } + setState(320); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + + setState(323); + match(EOF); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ScriptContext extends ParserRuleContext { + public PreambleContext preamble() { + return getRuleContext(PreambleContext.class,0); + } + public TerminalNode EOF() { return getToken(KotlinParser.EOF, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public List anysemi() { + return getRuleContexts(AnysemiContext.class); + } + public AnysemiContext anysemi(int i) { + return getRuleContext(AnysemiContext.class,i); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public ScriptContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_script; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterScript(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitScript(this); + } + } + + public final ScriptContext script() throws RecognitionException { + ScriptContext _localctx = new ScriptContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_script); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(328); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,6,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(325); + match(NL); + } + } + } + setState(330); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,6,_ctx); + } + setState(331); + preamble(); + setState(335); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,7,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(332); + anysemi(); + } + } + } + setState(337); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,7,_ctx); + } + setState(352); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NL) | (1L << LPAREN) | (1L << LSQUARE) | (1L << LCURL) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << EXCL) | (1L << COLONCOLON) | (1L << Q_COLONCOLON) | (1L << AT) | (1L << RETURN_AT) | (1L << CONTINUE_AT) | (1L << BREAK_AT) | (1L << FILE) | (1L << IMPORT) | (1L << OBJECT) | (1L << VAL))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (CONSTRUCTOR - 66)) | (1L << (BY - 66)) | (1L << (COMPANION - 66)) | (1L << (INIT - 66)) | (1L << (THIS - 66)) | (1L << (SUPER - 66)) | (1L << (WHERE - 66)) | (1L << (IF - 66)) | (1L << (WHEN - 66)) | (1L << (TRY - 66)) | (1L << (CATCH - 66)) | (1L << (FINALLY - 66)) | (1L << (FOR - 66)) | (1L << (DO - 66)) | (1L << (WHILE - 66)) | (1L << (THROW - 66)) | (1L << (RETURN - 66)) | (1L << (CONTINUE - 66)) | (1L << (BREAK - 66)) | (1L << (OUT - 66)) | (1L << (FIELD - 66)) | (1L << (PROPERTY - 66)) | (1L << (GET - 66)) | (1L << (SET - 66)) | (1L << (GETTER - 66)) | (1L << (SETTER - 66)) | (1L << (RECEIVER - 66)) | (1L << (PARAM - 66)) | (1L << (SETPARAM - 66)) | (1L << (DELEGATE - 66)) | (1L << (DYNAMIC - 66)) | (1L << (PUBLIC - 66)) | (1L << (PRIVATE - 66)) | (1L << (PROTECTED - 66)) | (1L << (INTERNAL - 66)) | (1L << (ENUM - 66)) | (1L << (SEALED - 66)) | (1L << (ANNOTATION - 66)) | (1L << (DATA - 66)) | (1L << (INNER - 66)) | (1L << (TAILREC - 66)) | (1L << (OPERATOR - 66)) | (1L << (INLINE - 66)) | (1L << (INFIX - 66)) | (1L << (EXTERNAL - 66)) | (1L << (SUSPEND - 66)) | (1L << (OVERRIDE - 66)) | (1L << (ABSTRACT - 66)) | (1L << (FINAL - 66)) | (1L << (OPEN - 66)) | (1L << (CONST - 66)) | (1L << (LATEINIT - 66)) | (1L << (VARARG - 66)) | (1L << (NOINLINE - 66)) | (1L << (CROSSINLINE - 66)) | (1L << (REIFIED - 66)) | (1L << (QUOTE_OPEN - 66)))) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & ((1L << (TRIPLE_QUOTE_OPEN - 130)) | (1L << (RealLiteral - 130)) | (1L << (LongLiteral - 130)) | (1L << (IntegerLiteral - 130)) | (1L << (HexLiteral - 130)) | (1L << (BinLiteral - 130)) | (1L << (BooleanLiteral - 130)) | (1L << (NullLiteral - 130)) | (1L << (Identifier - 130)) | (1L << (LabelReference - 130)) | (1L << (LabelDefinition - 130)) | (1L << (CharacterLiteral - 130)))) != 0)) { + { + setState(338); + expression(); + setState(349); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL || _la==SEMICOLON) { + { + { + setState(340); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(339); + anysemi(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(342); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,8,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + setState(345); + switch ( getInterpreter().adaptivePredict(_input,9,_ctx) ) { + case 1: + { + setState(344); + expression(); + } + break; + } + } + } + setState(351); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + + setState(354); + match(EOF); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PreambleContext extends ParserRuleContext { + public PackageHeaderContext packageHeader() { + return getRuleContext(PackageHeaderContext.class,0); + } + public ImportListContext importList() { + return getRuleContext(ImportListContext.class,0); + } + public FileAnnotationsContext fileAnnotations() { + return getRuleContext(FileAnnotationsContext.class,0); + } + public PreambleContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_preamble; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterPreamble(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitPreamble(this); + } + } + + public final PreambleContext preamble() throws RecognitionException { + PreambleContext _localctx = new PreambleContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_preamble); + try { + enterOuterAlt(_localctx, 1); + { + setState(357); + switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) { + case 1: + { + setState(356); + fileAnnotations(); + } + break; + } + setState(359); + packageHeader(); + setState(360); + importList(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FileAnnotationsContext extends ParserRuleContext { + public List fileAnnotation() { + return getRuleContexts(FileAnnotationContext.class); + } + public FileAnnotationContext fileAnnotation(int i) { + return getRuleContext(FileAnnotationContext.class,i); + } + public FileAnnotationsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_fileAnnotations; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterFileAnnotations(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitFileAnnotations(this); + } + } + + public final FileAnnotationsContext fileAnnotations() throws RecognitionException { + FileAnnotationsContext _localctx = new FileAnnotationsContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_fileAnnotations); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(363); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(362); + fileAnnotation(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(365); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,13,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FileAnnotationContext extends ParserRuleContext { + public List FILE() { return getTokens(KotlinParser.FILE); } + public TerminalNode FILE(int i) { + return getToken(KotlinParser.FILE, i); + } + public List COLON() { return getTokens(KotlinParser.COLON); } + public TerminalNode COLON(int i) { + return getToken(KotlinParser.COLON, i); + } + public List LSQUARE() { return getTokens(KotlinParser.LSQUARE); } + public TerminalNode LSQUARE(int i) { + return getToken(KotlinParser.LSQUARE, i); + } + public List RSQUARE() { return getTokens(KotlinParser.RSQUARE); } + public TerminalNode RSQUARE(int i) { + return getToken(KotlinParser.RSQUARE, i); + } + public List unescapedAnnotation() { + return getRuleContexts(UnescapedAnnotationContext.class); + } + public UnescapedAnnotationContext unescapedAnnotation(int i) { + return getRuleContext(UnescapedAnnotationContext.class,i); + } + public List semi() { + return getRuleContexts(SemiContext.class); + } + public SemiContext semi(int i) { + return getRuleContext(SemiContext.class,i); + } + public FileAnnotationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_fileAnnotation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterFileAnnotation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitFileAnnotation(this); + } + } + + public final FileAnnotationContext fileAnnotation() throws RecognitionException { + FileAnnotationContext _localctx = new FileAnnotationContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_fileAnnotation); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(383); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(367); + match(FILE); + setState(368); + match(COLON); + setState(378); + switch (_input.LA(1)) { + case LSQUARE: + { + setState(369); + match(LSQUARE); + setState(371); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(370); + unescapedAnnotation(); + } + } + setState(373); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( ((((_la - 58)) & ~0x3f) == 0 && ((1L << (_la - 58)) & ((1L << (IMPORT - 58)) | (1L << (CONSTRUCTOR - 58)) | (1L << (BY - 58)) | (1L << (COMPANION - 58)) | (1L << (INIT - 58)) | (1L << (WHERE - 58)) | (1L << (CATCH - 58)) | (1L << (FINALLY - 58)) | (1L << (OUT - 58)) | (1L << (GETTER - 58)) | (1L << (SETTER - 58)) | (1L << (DYNAMIC - 58)) | (1L << (PUBLIC - 58)) | (1L << (PRIVATE - 58)) | (1L << (PROTECTED - 58)) | (1L << (INTERNAL - 58)) | (1L << (ENUM - 58)) | (1L << (SEALED - 58)) | (1L << (ANNOTATION - 58)) | (1L << (DATA - 58)) | (1L << (INNER - 58)) | (1L << (TAILREC - 58)) | (1L << (OPERATOR - 58)) | (1L << (INLINE - 58)) | (1L << (INFIX - 58)) | (1L << (EXTERNAL - 58)) | (1L << (SUSPEND - 58)) | (1L << (OVERRIDE - 58)) | (1L << (ABSTRACT - 58)) | (1L << (FINAL - 58)))) != 0) || ((((_la - 122)) & ~0x3f) == 0 && ((1L << (_la - 122)) & ((1L << (OPEN - 122)) | (1L << (CONST - 122)) | (1L << (LATEINIT - 122)) | (1L << (VARARG - 122)) | (1L << (NOINLINE - 122)) | (1L << (CROSSINLINE - 122)) | (1L << (REIFIED - 122)) | (1L << (Identifier - 122)))) != 0) ); + setState(375); + match(RSQUARE); + } + break; + case IMPORT: + case CONSTRUCTOR: + case BY: + case COMPANION: + case INIT: + case WHERE: + case CATCH: + case FINALLY: + case OUT: + case GETTER: + case SETTER: + case DYNAMIC: + case PUBLIC: + case PRIVATE: + case PROTECTED: + case INTERNAL: + case ENUM: + case SEALED: + case ANNOTATION: + case DATA: + case INNER: + case TAILREC: + case OPERATOR: + case INLINE: + case INFIX: + case EXTERNAL: + case SUSPEND: + case OVERRIDE: + case ABSTRACT: + case FINAL: + case OPEN: + case CONST: + case LATEINIT: + case VARARG: + case NOINLINE: + case CROSSINLINE: + case REIFIED: + case Identifier: + { + setState(377); + unescapedAnnotation(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(381); + switch ( getInterpreter().adaptivePredict(_input,16,_ctx) ) { + case 1: + { + setState(380); + semi(); + } + break; + } + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(385); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,17,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PackageHeaderContext extends ParserRuleContext { + public TerminalNode PACKAGE() { return getToken(KotlinParser.PACKAGE, 0); } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public ModifierListContext modifierList() { + return getRuleContext(ModifierListContext.class,0); + } + public SemiContext semi() { + return getRuleContext(SemiContext.class,0); + } + public PackageHeaderContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_packageHeader; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterPackageHeader(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitPackageHeader(this); + } + } + + public final PackageHeaderContext packageHeader() throws RecognitionException { + PackageHeaderContext _localctx = new PackageHeaderContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_packageHeader); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(395); + switch ( getInterpreter().adaptivePredict(_input,20,_ctx) ) { + case 1: + { + setState(388); + _la = _input.LA(1); + if (_la==AT || _la==FILE || ((((_la - 89)) & ~0x3f) == 0 && ((1L << (_la - 89)) & ((1L << (IN - 89)) | (1L << (OUT - 89)) | (1L << (FIELD - 89)) | (1L << (PROPERTY - 89)) | (1L << (GET - 89)) | (1L << (SET - 89)) | (1L << (RECEIVER - 89)) | (1L << (PARAM - 89)) | (1L << (SETPARAM - 89)) | (1L << (DELEGATE - 89)) | (1L << (PUBLIC - 89)) | (1L << (PRIVATE - 89)) | (1L << (PROTECTED - 89)) | (1L << (INTERNAL - 89)) | (1L << (ENUM - 89)) | (1L << (SEALED - 89)) | (1L << (ANNOTATION - 89)) | (1L << (DATA - 89)) | (1L << (INNER - 89)) | (1L << (TAILREC - 89)) | (1L << (OPERATOR - 89)) | (1L << (INLINE - 89)) | (1L << (INFIX - 89)) | (1L << (EXTERNAL - 89)) | (1L << (SUSPEND - 89)) | (1L << (OVERRIDE - 89)) | (1L << (ABSTRACT - 89)) | (1L << (FINAL - 89)) | (1L << (OPEN - 89)) | (1L << (CONST - 89)) | (1L << (LATEINIT - 89)) | (1L << (VARARG - 89)) | (1L << (NOINLINE - 89)) | (1L << (CROSSINLINE - 89)) | (1L << (REIFIED - 89)) | (1L << (LabelReference - 89)))) != 0)) { + { + setState(387); + modifierList(); + } + } + + setState(390); + match(PACKAGE); + setState(391); + identifier(); + setState(393); + switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) { + case 1: + { + setState(392); + semi(); + } + break; + } + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImportListContext extends ParserRuleContext { + public List importHeader() { + return getRuleContexts(ImportHeaderContext.class); + } + public ImportHeaderContext importHeader(int i) { + return getRuleContext(ImportHeaderContext.class,i); + } + public ImportListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_importList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterImportList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitImportList(this); + } + } + + public final ImportListContext importList() throws RecognitionException { + ImportListContext _localctx = new ImportListContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_importList); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(400); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,21,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(397); + importHeader(); + } + } + } + setState(402); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,21,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImportHeaderContext extends ParserRuleContext { + public TerminalNode IMPORT() { return getToken(KotlinParser.IMPORT, 0); } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public TerminalNode DOT() { return getToken(KotlinParser.DOT, 0); } + public TerminalNode MULT() { return getToken(KotlinParser.MULT, 0); } + public ImportAliasContext importAlias() { + return getRuleContext(ImportAliasContext.class,0); + } + public SemiContext semi() { + return getRuleContext(SemiContext.class,0); + } + public ImportHeaderContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_importHeader; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterImportHeader(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitImportHeader(this); + } + } + + public final ImportHeaderContext importHeader() throws RecognitionException { + ImportHeaderContext _localctx = new ImportHeaderContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_importHeader); + try { + enterOuterAlt(_localctx, 1); + { + setState(403); + match(IMPORT); + setState(404); + identifier(); + setState(408); + switch (_input.LA(1)) { + case DOT: + { + setState(405); + match(DOT); + setState(406); + match(MULT); + } + break; + case AS: + { + setState(407); + importAlias(); + } + break; + case EOF: + case NL: + case LPAREN: + case LSQUARE: + case LCURL: + case ADD: + case SUB: + case INCR: + case DECR: + case EXCL: + case SEMICOLON: + case COLONCOLON: + case Q_COLONCOLON: + case AT: + case RETURN_AT: + case CONTINUE_AT: + case BREAK_AT: + case FILE: + case IMPORT: + case CLASS: + case INTERFACE: + case FUN: + case OBJECT: + case VAL: + case VAR: + case TYPE_ALIAS: + case CONSTRUCTOR: + case BY: + case COMPANION: + case INIT: + case THIS: + case SUPER: + case WHERE: + case IF: + case WHEN: + case TRY: + case CATCH: + case FINALLY: + case FOR: + case DO: + case WHILE: + case THROW: + case RETURN: + case CONTINUE: + case BREAK: + case IN: + case OUT: + case FIELD: + case PROPERTY: + case GET: + case SET: + case GETTER: + case SETTER: + case RECEIVER: + case PARAM: + case SETPARAM: + case DELEGATE: + case DYNAMIC: + case PUBLIC: + case PRIVATE: + case PROTECTED: + case INTERNAL: + case ENUM: + case SEALED: + case ANNOTATION: + case DATA: + case INNER: + case TAILREC: + case OPERATOR: + case INLINE: + case INFIX: + case EXTERNAL: + case SUSPEND: + case OVERRIDE: + case ABSTRACT: + case FINAL: + case OPEN: + case CONST: + case LATEINIT: + case VARARG: + case NOINLINE: + case CROSSINLINE: + case REIFIED: + case QUOTE_OPEN: + case TRIPLE_QUOTE_OPEN: + case RealLiteral: + case LongLiteral: + case IntegerLiteral: + case HexLiteral: + case BinLiteral: + case BooleanLiteral: + case NullLiteral: + case Identifier: + case LabelReference: + case LabelDefinition: + case CharacterLiteral: + break; + default: + throw new NoViableAltException(this); + } + setState(411); + switch ( getInterpreter().adaptivePredict(_input,23,_ctx) ) { + case 1: + { + setState(410); + semi(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImportAliasContext extends ParserRuleContext { + public TerminalNode AS() { return getToken(KotlinParser.AS, 0); } + public SimpleIdentifierContext simpleIdentifier() { + return getRuleContext(SimpleIdentifierContext.class,0); + } + public ImportAliasContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_importAlias; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterImportAlias(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitImportAlias(this); + } + } + + public final ImportAliasContext importAlias() throws RecognitionException { + ImportAliasContext _localctx = new ImportAliasContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_importAlias); + try { + enterOuterAlt(_localctx, 1); + { + setState(413); + match(AS); + setState(414); + simpleIdentifier(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TopLevelObjectContext extends ParserRuleContext { + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public ObjectDeclarationContext objectDeclaration() { + return getRuleContext(ObjectDeclarationContext.class,0); + } + public FunctionDeclarationContext functionDeclaration() { + return getRuleContext(FunctionDeclarationContext.class,0); + } + public PropertyDeclarationContext propertyDeclaration() { + return getRuleContext(PropertyDeclarationContext.class,0); + } + public TypeAliasContext typeAlias() { + return getRuleContext(TypeAliasContext.class,0); + } + public TopLevelObjectContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_topLevelObject; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterTopLevelObject(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitTopLevelObject(this); + } + } + + public final TopLevelObjectContext topLevelObject() throws RecognitionException { + TopLevelObjectContext _localctx = new TopLevelObjectContext(_ctx, getState()); + enterRule(_localctx, 18, RULE_topLevelObject); + try { + setState(421); + switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(416); + classDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(417); + objectDeclaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(418); + functionDeclaration(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(419); + propertyDeclaration(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(420); + typeAlias(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassDeclarationContext extends ParserRuleContext { + public SimpleIdentifierContext simpleIdentifier() { + return getRuleContext(SimpleIdentifierContext.class,0); + } + public TerminalNode CLASS() { return getToken(KotlinParser.CLASS, 0); } + public TerminalNode INTERFACE() { return getToken(KotlinParser.INTERFACE, 0); } + public ModifierListContext modifierList() { + return getRuleContext(ModifierListContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public PrimaryConstructorContext primaryConstructor() { + return getRuleContext(PrimaryConstructorContext.class,0); + } + public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); } + public DelegationSpecifiersContext delegationSpecifiers() { + return getRuleContext(DelegationSpecifiersContext.class,0); + } + public TypeConstraintsContext typeConstraints() { + return getRuleContext(TypeConstraintsContext.class,0); + } + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public EnumClassBodyContext enumClassBody() { + return getRuleContext(EnumClassBodyContext.class,0); + } + public ClassDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterClassDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitClassDeclaration(this); + } + } + + public final ClassDeclarationContext classDeclaration() throws RecognitionException { + ClassDeclarationContext _localctx = new ClassDeclarationContext(_ctx, getState()); + enterRule(_localctx, 20, RULE_classDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(424); + _la = _input.LA(1); + if (_la==AT || _la==FILE || ((((_la - 89)) & ~0x3f) == 0 && ((1L << (_la - 89)) & ((1L << (IN - 89)) | (1L << (OUT - 89)) | (1L << (FIELD - 89)) | (1L << (PROPERTY - 89)) | (1L << (GET - 89)) | (1L << (SET - 89)) | (1L << (RECEIVER - 89)) | (1L << (PARAM - 89)) | (1L << (SETPARAM - 89)) | (1L << (DELEGATE - 89)) | (1L << (PUBLIC - 89)) | (1L << (PRIVATE - 89)) | (1L << (PROTECTED - 89)) | (1L << (INTERNAL - 89)) | (1L << (ENUM - 89)) | (1L << (SEALED - 89)) | (1L << (ANNOTATION - 89)) | (1L << (DATA - 89)) | (1L << (INNER - 89)) | (1L << (TAILREC - 89)) | (1L << (OPERATOR - 89)) | (1L << (INLINE - 89)) | (1L << (INFIX - 89)) | (1L << (EXTERNAL - 89)) | (1L << (SUSPEND - 89)) | (1L << (OVERRIDE - 89)) | (1L << (ABSTRACT - 89)) | (1L << (FINAL - 89)) | (1L << (OPEN - 89)) | (1L << (CONST - 89)) | (1L << (LATEINIT - 89)) | (1L << (VARARG - 89)) | (1L << (NOINLINE - 89)) | (1L << (CROSSINLINE - 89)) | (1L << (REIFIED - 89)) | (1L << (LabelReference - 89)))) != 0)) { + { + setState(423); + modifierList(); + } + } + + setState(426); + _la = _input.LA(1); + if ( !(_la==CLASS || _la==INTERFACE) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(430); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(427); + match(NL); + } + } + setState(432); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(433); + simpleIdentifier(); + setState(441); + switch ( getInterpreter().adaptivePredict(_input,28,_ctx) ) { + case 1: + { + setState(437); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(434); + match(NL); + } + } + setState(439); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(440); + typeParameters(); + } + break; + } + setState(450); + switch ( getInterpreter().adaptivePredict(_input,30,_ctx) ) { + case 1: + { + setState(446); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(443); + match(NL); + } + } + setState(448); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(449); + primaryConstructor(); + } + break; + } + setState(466); + switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) { + case 1: + { + setState(455); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(452); + match(NL); + } + } + setState(457); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(458); + match(COLON); + setState(462); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(459); + match(NL); + } + } + setState(464); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(465); + delegationSpecifiers(); + } + break; + } + setState(475); + switch ( getInterpreter().adaptivePredict(_input,35,_ctx) ) { + case 1: + { + setState(471); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(468); + match(NL); + } + } + setState(473); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(474); + typeConstraints(); + } + break; + } + setState(491); + switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) { + case 1: + { + setState(480); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(477); + match(NL); + } + } + setState(482); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(483); + classBody(); + } + break; + case 2: + { + setState(487); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(484); + match(NL); + } + } + setState(489); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(490); + enumClassBody(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PrimaryConstructorContext extends ParserRuleContext { + public ClassParametersContext classParameters() { + return getRuleContext(ClassParametersContext.class,0); + } + public ModifierListContext modifierList() { + return getRuleContext(ModifierListContext.class,0); + } + public TerminalNode CONSTRUCTOR() { return getToken(KotlinParser.CONSTRUCTOR, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public PrimaryConstructorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_primaryConstructor; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterPrimaryConstructor(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitPrimaryConstructor(this); + } + } + + public final PrimaryConstructorContext primaryConstructor() throws RecognitionException { + PrimaryConstructorContext _localctx = new PrimaryConstructorContext(_ctx, getState()); + enterRule(_localctx, 22, RULE_primaryConstructor); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(494); + _la = _input.LA(1); + if (_la==AT || _la==FILE || ((((_la - 89)) & ~0x3f) == 0 && ((1L << (_la - 89)) & ((1L << (IN - 89)) | (1L << (OUT - 89)) | (1L << (FIELD - 89)) | (1L << (PROPERTY - 89)) | (1L << (GET - 89)) | (1L << (SET - 89)) | (1L << (RECEIVER - 89)) | (1L << (PARAM - 89)) | (1L << (SETPARAM - 89)) | (1L << (DELEGATE - 89)) | (1L << (PUBLIC - 89)) | (1L << (PRIVATE - 89)) | (1L << (PROTECTED - 89)) | (1L << (INTERNAL - 89)) | (1L << (ENUM - 89)) | (1L << (SEALED - 89)) | (1L << (ANNOTATION - 89)) | (1L << (DATA - 89)) | (1L << (INNER - 89)) | (1L << (TAILREC - 89)) | (1L << (OPERATOR - 89)) | (1L << (INLINE - 89)) | (1L << (INFIX - 89)) | (1L << (EXTERNAL - 89)) | (1L << (SUSPEND - 89)) | (1L << (OVERRIDE - 89)) | (1L << (ABSTRACT - 89)) | (1L << (FINAL - 89)) | (1L << (OPEN - 89)) | (1L << (CONST - 89)) | (1L << (LATEINIT - 89)) | (1L << (VARARG - 89)) | (1L << (NOINLINE - 89)) | (1L << (CROSSINLINE - 89)) | (1L << (REIFIED - 89)) | (1L << (LabelReference - 89)))) != 0)) { + { + setState(493); + modifierList(); + } + } + + setState(503); + _la = _input.LA(1); + if (_la==CONSTRUCTOR) { + { + setState(496); + match(CONSTRUCTOR); + setState(500); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(497); + match(NL); + } + } + setState(502); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + + setState(505); + classParameters(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassParametersContext extends ParserRuleContext { + public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); } + public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); } + public List classParameter() { + return getRuleContexts(ClassParameterContext.class); + } + public ClassParameterContext classParameter(int i) { + return getRuleContext(ClassParameterContext.class,i); + } + public List COMMA() { return getTokens(KotlinParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(KotlinParser.COMMA, i); + } + public ClassParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classParameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterClassParameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitClassParameters(this); + } + } + + public final ClassParametersContext classParameters() throws RecognitionException { + ClassParametersContext _localctx = new ClassParametersContext(_ctx, getState()); + enterRule(_localctx, 24, RULE_classParameters); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(507); + match(LPAREN); + setState(519); + _la = _input.LA(1); + if (((((_la - 40)) & ~0x3f) == 0 && ((1L << (_la - 40)) & ((1L << (AT - 40)) | (1L << (FILE - 40)) | (1L << (IMPORT - 40)) | (1L << (VAL - 40)) | (1L << (VAR - 40)) | (1L << (CONSTRUCTOR - 40)) | (1L << (BY - 40)) | (1L << (COMPANION - 40)) | (1L << (INIT - 40)) | (1L << (WHERE - 40)) | (1L << (CATCH - 40)) | (1L << (FINALLY - 40)) | (1L << (IN - 40)) | (1L << (OUT - 40)) | (1L << (FIELD - 40)) | (1L << (PROPERTY - 40)) | (1L << (GET - 40)) | (1L << (SET - 40)) | (1L << (GETTER - 40)) | (1L << (SETTER - 40)) | (1L << (RECEIVER - 40)) | (1L << (PARAM - 40)) | (1L << (SETPARAM - 40)) | (1L << (DELEGATE - 40)) | (1L << (DYNAMIC - 40)))) != 0) || ((((_la - 104)) & ~0x3f) == 0 && ((1L << (_la - 104)) & ((1L << (PUBLIC - 104)) | (1L << (PRIVATE - 104)) | (1L << (PROTECTED - 104)) | (1L << (INTERNAL - 104)) | (1L << (ENUM - 104)) | (1L << (SEALED - 104)) | (1L << (ANNOTATION - 104)) | (1L << (DATA - 104)) | (1L << (INNER - 104)) | (1L << (TAILREC - 104)) | (1L << (OPERATOR - 104)) | (1L << (INLINE - 104)) | (1L << (INFIX - 104)) | (1L << (EXTERNAL - 104)) | (1L << (SUSPEND - 104)) | (1L << (OVERRIDE - 104)) | (1L << (ABSTRACT - 104)) | (1L << (FINAL - 104)) | (1L << (OPEN - 104)) | (1L << (CONST - 104)) | (1L << (LATEINIT - 104)) | (1L << (VARARG - 104)) | (1L << (NOINLINE - 104)) | (1L << (CROSSINLINE - 104)) | (1L << (REIFIED - 104)) | (1L << (Identifier - 104)) | (1L << (LabelReference - 104)))) != 0)) { + { + setState(508); + classParameter(); + setState(513); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,42,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(509); + match(COMMA); + setState(510); + classParameter(); + } + } + } + setState(515); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,42,_ctx); + } + setState(517); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(516); + match(COMMA); + } + } + + } + } + + setState(521); + match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassParameterContext extends ParserRuleContext { + public SimpleIdentifierContext simpleIdentifier() { + return getRuleContext(SimpleIdentifierContext.class,0); + } + public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public ModifierListContext modifierList() { + return getRuleContext(ModifierListContext.class,0); + } + public TerminalNode ASSIGNMENT() { return getToken(KotlinParser.ASSIGNMENT, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode VAL() { return getToken(KotlinParser.VAL, 0); } + public TerminalNode VAR() { return getToken(KotlinParser.VAR, 0); } + public ClassParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterClassParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitClassParameter(this); + } + } + + public final ClassParameterContext classParameter() throws RecognitionException { + ClassParameterContext _localctx = new ClassParameterContext(_ctx, getState()); + enterRule(_localctx, 26, RULE_classParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(524); + switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) { + case 1: + { + setState(523); + modifierList(); + } + break; + } + setState(527); + _la = _input.LA(1); + if (_la==VAL || _la==VAR) { + { + setState(526); + _la = _input.LA(1); + if ( !(_la==VAL || _la==VAR) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + + setState(529); + simpleIdentifier(); + setState(530); + match(COLON); + setState(531); + type(); + setState(534); + _la = _input.LA(1); + if (_la==ASSIGNMENT) { + { + setState(532); + match(ASSIGNMENT); + setState(533); + expression(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DelegationSpecifiersContext extends ParserRuleContext { + public List delegationSpecifier() { + return getRuleContexts(DelegationSpecifierContext.class); + } + public DelegationSpecifierContext delegationSpecifier(int i) { + return getRuleContext(DelegationSpecifierContext.class,i); + } + public List annotations() { + return getRuleContexts(AnnotationsContext.class); + } + public AnnotationsContext annotations(int i) { + return getRuleContext(AnnotationsContext.class,i); + } + public List COMMA() { return getTokens(KotlinParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(KotlinParser.COMMA, i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public DelegationSpecifiersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_delegationSpecifiers; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterDelegationSpecifiers(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitDelegationSpecifiers(this); + } + } + + public final DelegationSpecifiersContext delegationSpecifiers() throws RecognitionException { + DelegationSpecifiersContext _localctx = new DelegationSpecifiersContext(_ctx, getState()); + enterRule(_localctx, 28, RULE_delegationSpecifiers); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(539); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==AT || _la==FILE || ((((_la - 93)) & ~0x3f) == 0 && ((1L << (_la - 93)) & ((1L << (FIELD - 93)) | (1L << (PROPERTY - 93)) | (1L << (GET - 93)) | (1L << (SET - 93)) | (1L << (RECEIVER - 93)) | (1L << (PARAM - 93)) | (1L << (SETPARAM - 93)) | (1L << (DELEGATE - 93)) | (1L << (LabelReference - 93)))) != 0)) { + { + { + setState(536); + annotations(); + } + } + setState(541); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(542); + delegationSpecifier(); + setState(565); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,52,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(546); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(543); + match(NL); + } + } + setState(548); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(549); + match(COMMA); + setState(553); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(550); + match(NL); + } + } + setState(555); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(559); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==AT || _la==FILE || ((((_la - 93)) & ~0x3f) == 0 && ((1L << (_la - 93)) & ((1L << (FIELD - 93)) | (1L << (PROPERTY - 93)) | (1L << (GET - 93)) | (1L << (SET - 93)) | (1L << (RECEIVER - 93)) | (1L << (PARAM - 93)) | (1L << (SETPARAM - 93)) | (1L << (DELEGATE - 93)) | (1L << (LabelReference - 93)))) != 0)) { + { + { + setState(556); + annotations(); + } + } + setState(561); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(562); + delegationSpecifier(); + } + } + } + setState(567); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,52,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DelegationSpecifierContext extends ParserRuleContext { + public ConstructorInvocationContext constructorInvocation() { + return getRuleContext(ConstructorInvocationContext.class,0); + } + public UserTypeContext userType() { + return getRuleContext(UserTypeContext.class,0); + } + public ExplicitDelegationContext explicitDelegation() { + return getRuleContext(ExplicitDelegationContext.class,0); + } + public DelegationSpecifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_delegationSpecifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterDelegationSpecifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitDelegationSpecifier(this); + } + } + + public final DelegationSpecifierContext delegationSpecifier() throws RecognitionException { + DelegationSpecifierContext _localctx = new DelegationSpecifierContext(_ctx, getState()); + enterRule(_localctx, 30, RULE_delegationSpecifier); + try { + setState(571); + switch ( getInterpreter().adaptivePredict(_input,53,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(568); + constructorInvocation(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(569); + userType(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(570); + explicitDelegation(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstructorInvocationContext extends ParserRuleContext { + public UserTypeContext userType() { + return getRuleContext(UserTypeContext.class,0); + } + public CallSuffixContext callSuffix() { + return getRuleContext(CallSuffixContext.class,0); + } + public ConstructorInvocationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constructorInvocation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterConstructorInvocation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitConstructorInvocation(this); + } + } + + public final ConstructorInvocationContext constructorInvocation() throws RecognitionException { + ConstructorInvocationContext _localctx = new ConstructorInvocationContext(_ctx, getState()); + enterRule(_localctx, 32, RULE_constructorInvocation); + try { + enterOuterAlt(_localctx, 1); + { + setState(573); + userType(); + setState(574); + callSuffix(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExplicitDelegationContext extends ParserRuleContext { + public UserTypeContext userType() { + return getRuleContext(UserTypeContext.class,0); + } + public TerminalNode BY() { return getToken(KotlinParser.BY, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public ExplicitDelegationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_explicitDelegation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterExplicitDelegation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitExplicitDelegation(this); + } + } + + public final ExplicitDelegationContext explicitDelegation() throws RecognitionException { + ExplicitDelegationContext _localctx = new ExplicitDelegationContext(_ctx, getState()); + enterRule(_localctx, 34, RULE_explicitDelegation); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(576); + userType(); + setState(580); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(577); + match(NL); + } + } + setState(582); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(583); + match(BY); + setState(587); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,55,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(584); + match(NL); + } + } + } + setState(589); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,55,_ctx); + } + setState(590); + expression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassBodyContext extends ParserRuleContext { + public TerminalNode LCURL() { return getToken(KotlinParser.LCURL, 0); } + public TerminalNode RCURL() { return getToken(KotlinParser.RCURL, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public List classMemberDeclaration() { + return getRuleContexts(ClassMemberDeclarationContext.class); + } + public ClassMemberDeclarationContext classMemberDeclaration(int i) { + return getRuleContext(ClassMemberDeclarationContext.class,i); + } + public ClassBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterClassBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitClassBody(this); + } + } + + public final ClassBodyContext classBody() throws RecognitionException { + ClassBodyContext _localctx = new ClassBodyContext(_ctx, getState()); + enterRule(_localctx, 36, RULE_classBody); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(592); + match(LCURL); + setState(596); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,56,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(593); + match(NL); + } + } + } + setState(598); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,56,_ctx); + } + setState(602); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 40)) & ~0x3f) == 0 && ((1L << (_la - 40)) & ((1L << (AT - 40)) | (1L << (FILE - 40)) | (1L << (CLASS - 40)) | (1L << (INTERFACE - 40)) | (1L << (FUN - 40)) | (1L << (OBJECT - 40)) | (1L << (VAL - 40)) | (1L << (VAR - 40)) | (1L << (TYPE_ALIAS - 40)) | (1L << (CONSTRUCTOR - 40)) | (1L << (COMPANION - 40)) | (1L << (INIT - 40)) | (1L << (IN - 40)) | (1L << (OUT - 40)) | (1L << (FIELD - 40)) | (1L << (PROPERTY - 40)) | (1L << (GET - 40)) | (1L << (SET - 40)) | (1L << (RECEIVER - 40)) | (1L << (PARAM - 40)) | (1L << (SETPARAM - 40)) | (1L << (DELEGATE - 40)))) != 0) || ((((_la - 104)) & ~0x3f) == 0 && ((1L << (_la - 104)) & ((1L << (PUBLIC - 104)) | (1L << (PRIVATE - 104)) | (1L << (PROTECTED - 104)) | (1L << (INTERNAL - 104)) | (1L << (ENUM - 104)) | (1L << (SEALED - 104)) | (1L << (ANNOTATION - 104)) | (1L << (DATA - 104)) | (1L << (INNER - 104)) | (1L << (TAILREC - 104)) | (1L << (OPERATOR - 104)) | (1L << (INLINE - 104)) | (1L << (INFIX - 104)) | (1L << (EXTERNAL - 104)) | (1L << (SUSPEND - 104)) | (1L << (OVERRIDE - 104)) | (1L << (ABSTRACT - 104)) | (1L << (FINAL - 104)) | (1L << (OPEN - 104)) | (1L << (CONST - 104)) | (1L << (LATEINIT - 104)) | (1L << (VARARG - 104)) | (1L << (NOINLINE - 104)) | (1L << (CROSSINLINE - 104)) | (1L << (REIFIED - 104)) | (1L << (LabelReference - 104)))) != 0)) { + { + { + setState(599); + classMemberDeclaration(); + } + } + setState(604); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(608); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(605); + match(NL); + } + } + setState(610); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(611); + match(RCURL); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassMemberDeclarationContext extends ParserRuleContext { + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public FunctionDeclarationContext functionDeclaration() { + return getRuleContext(FunctionDeclarationContext.class,0); + } + public ObjectDeclarationContext objectDeclaration() { + return getRuleContext(ObjectDeclarationContext.class,0); + } + public CompanionObjectContext companionObject() { + return getRuleContext(CompanionObjectContext.class,0); + } + public PropertyDeclarationContext propertyDeclaration() { + return getRuleContext(PropertyDeclarationContext.class,0); + } + public AnonymousInitializerContext anonymousInitializer() { + return getRuleContext(AnonymousInitializerContext.class,0); + } + public SecondaryConstructorContext secondaryConstructor() { + return getRuleContext(SecondaryConstructorContext.class,0); + } + public TypeAliasContext typeAlias() { + return getRuleContext(TypeAliasContext.class,0); + } + public List anysemi() { + return getRuleContexts(AnysemiContext.class); + } + public AnysemiContext anysemi(int i) { + return getRuleContext(AnysemiContext.class,i); + } + public ClassMemberDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classMemberDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterClassMemberDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitClassMemberDeclaration(this); + } + } + + public final ClassMemberDeclarationContext classMemberDeclaration() throws RecognitionException { + ClassMemberDeclarationContext _localctx = new ClassMemberDeclarationContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_classMemberDeclaration); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(621); + switch ( getInterpreter().adaptivePredict(_input,59,_ctx) ) { + case 1: + { + setState(613); + classDeclaration(); + } + break; + case 2: + { + setState(614); + functionDeclaration(); + } + break; + case 3: + { + setState(615); + objectDeclaration(); + } + break; + case 4: + { + setState(616); + companionObject(); + } + break; + case 5: + { + setState(617); + propertyDeclaration(); + } + break; + case 6: + { + setState(618); + anonymousInitializer(); + } + break; + case 7: + { + setState(619); + secondaryConstructor(); + } + break; + case 8: + { + setState(620); + typeAlias(); + } + break; + } + setState(624); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(623); + anysemi(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(626); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,60,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnonymousInitializerContext extends ParserRuleContext { + public TerminalNode INIT() { return getToken(KotlinParser.INIT, 0); } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public AnonymousInitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_anonymousInitializer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterAnonymousInitializer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitAnonymousInitializer(this); + } + } + + public final AnonymousInitializerContext anonymousInitializer() throws RecognitionException { + AnonymousInitializerContext _localctx = new AnonymousInitializerContext(_ctx, getState()); + enterRule(_localctx, 40, RULE_anonymousInitializer); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(628); + match(INIT); + setState(632); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(629); + match(NL); + } + } + setState(634); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(635); + block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SecondaryConstructorContext extends ParserRuleContext { + public TerminalNode CONSTRUCTOR() { return getToken(KotlinParser.CONSTRUCTOR, 0); } + public FunctionValueParametersContext functionValueParameters() { + return getRuleContext(FunctionValueParametersContext.class,0); + } + public ModifierListContext modifierList() { + return getRuleContext(ModifierListContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); } + public ConstructorDelegationCallContext constructorDelegationCall() { + return getRuleContext(ConstructorDelegationCallContext.class,0); + } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public SecondaryConstructorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_secondaryConstructor; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterSecondaryConstructor(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitSecondaryConstructor(this); + } + } + + public final SecondaryConstructorContext secondaryConstructor() throws RecognitionException { + SecondaryConstructorContext _localctx = new SecondaryConstructorContext(_ctx, getState()); + enterRule(_localctx, 42, RULE_secondaryConstructor); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(638); + _la = _input.LA(1); + if (_la==AT || _la==FILE || ((((_la - 89)) & ~0x3f) == 0 && ((1L << (_la - 89)) & ((1L << (IN - 89)) | (1L << (OUT - 89)) | (1L << (FIELD - 89)) | (1L << (PROPERTY - 89)) | (1L << (GET - 89)) | (1L << (SET - 89)) | (1L << (RECEIVER - 89)) | (1L << (PARAM - 89)) | (1L << (SETPARAM - 89)) | (1L << (DELEGATE - 89)) | (1L << (PUBLIC - 89)) | (1L << (PRIVATE - 89)) | (1L << (PROTECTED - 89)) | (1L << (INTERNAL - 89)) | (1L << (ENUM - 89)) | (1L << (SEALED - 89)) | (1L << (ANNOTATION - 89)) | (1L << (DATA - 89)) | (1L << (INNER - 89)) | (1L << (TAILREC - 89)) | (1L << (OPERATOR - 89)) | (1L << (INLINE - 89)) | (1L << (INFIX - 89)) | (1L << (EXTERNAL - 89)) | (1L << (SUSPEND - 89)) | (1L << (OVERRIDE - 89)) | (1L << (ABSTRACT - 89)) | (1L << (FINAL - 89)) | (1L << (OPEN - 89)) | (1L << (CONST - 89)) | (1L << (LATEINIT - 89)) | (1L << (VARARG - 89)) | (1L << (NOINLINE - 89)) | (1L << (CROSSINLINE - 89)) | (1L << (REIFIED - 89)) | (1L << (LabelReference - 89)))) != 0)) { + { + setState(637); + modifierList(); + } + } + + setState(640); + match(CONSTRUCTOR); + setState(644); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(641); + match(NL); + } + } + setState(646); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(647); + functionValueParameters(); + setState(662); + switch ( getInterpreter().adaptivePredict(_input,66,_ctx) ) { + case 1: + { + setState(651); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(648); + match(NL); + } + } + setState(653); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(654); + match(COLON); + setState(658); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(655); + match(NL); + } + } + setState(660); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(661); + constructorDelegationCall(); + } + break; + } + setState(667); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,67,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(664); + match(NL); + } + } + } + setState(669); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,67,_ctx); + } + setState(671); + _la = _input.LA(1); + if (_la==LCURL) { + { + setState(670); + block(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstructorDelegationCallContext extends ParserRuleContext { + public TerminalNode THIS() { return getToken(KotlinParser.THIS, 0); } + public ValueArgumentsContext valueArguments() { + return getRuleContext(ValueArgumentsContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public TerminalNode SUPER() { return getToken(KotlinParser.SUPER, 0); } + public ConstructorDelegationCallContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constructorDelegationCall; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterConstructorDelegationCall(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitConstructorDelegationCall(this); + } + } + + public final ConstructorDelegationCallContext constructorDelegationCall() throws RecognitionException { + ConstructorDelegationCallContext _localctx = new ConstructorDelegationCallContext(_ctx, getState()); + enterRule(_localctx, 44, RULE_constructorDelegationCall); + int _la; + try { + setState(689); + switch (_input.LA(1)) { + case THIS: + enterOuterAlt(_localctx, 1); + { + setState(673); + match(THIS); + setState(677); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(674); + match(NL); + } + } + setState(679); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(680); + valueArguments(); + } + break; + case SUPER: + enterOuterAlt(_localctx, 2); + { + setState(681); + match(SUPER); + setState(685); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(682); + match(NL); + } + } + setState(687); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(688); + valueArguments(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumClassBodyContext extends ParserRuleContext { + public TerminalNode LCURL() { return getToken(KotlinParser.LCURL, 0); } + public TerminalNode RCURL() { return getToken(KotlinParser.RCURL, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public EnumEntriesContext enumEntries() { + return getRuleContext(EnumEntriesContext.class,0); + } + public TerminalNode SEMICOLON() { return getToken(KotlinParser.SEMICOLON, 0); } + public List classMemberDeclaration() { + return getRuleContexts(ClassMemberDeclarationContext.class); + } + public ClassMemberDeclarationContext classMemberDeclaration(int i) { + return getRuleContext(ClassMemberDeclarationContext.class,i); + } + public EnumClassBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumClassBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterEnumClassBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitEnumClassBody(this); + } + } + + public final EnumClassBodyContext enumClassBody() throws RecognitionException { + EnumClassBodyContext _localctx = new EnumClassBodyContext(_ctx, getState()); + enterRule(_localctx, 46, RULE_enumClassBody); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(691); + match(LCURL); + setState(695); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,72,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(692); + match(NL); + } + } + } + setState(697); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,72,_ctx); + } + setState(699); + _la = _input.LA(1); + if (((((_la - 40)) & ~0x3f) == 0 && ((1L << (_la - 40)) & ((1L << (AT - 40)) | (1L << (FILE - 40)) | (1L << (IMPORT - 40)) | (1L << (CONSTRUCTOR - 40)) | (1L << (BY - 40)) | (1L << (COMPANION - 40)) | (1L << (INIT - 40)) | (1L << (WHERE - 40)) | (1L << (CATCH - 40)) | (1L << (FINALLY - 40)) | (1L << (OUT - 40)) | (1L << (FIELD - 40)) | (1L << (PROPERTY - 40)) | (1L << (GET - 40)) | (1L << (SET - 40)) | (1L << (GETTER - 40)) | (1L << (SETTER - 40)) | (1L << (RECEIVER - 40)) | (1L << (PARAM - 40)) | (1L << (SETPARAM - 40)) | (1L << (DELEGATE - 40)) | (1L << (DYNAMIC - 40)))) != 0) || ((((_la - 104)) & ~0x3f) == 0 && ((1L << (_la - 104)) & ((1L << (PUBLIC - 104)) | (1L << (PRIVATE - 104)) | (1L << (PROTECTED - 104)) | (1L << (INTERNAL - 104)) | (1L << (ENUM - 104)) | (1L << (SEALED - 104)) | (1L << (ANNOTATION - 104)) | (1L << (DATA - 104)) | (1L << (INNER - 104)) | (1L << (TAILREC - 104)) | (1L << (OPERATOR - 104)) | (1L << (INLINE - 104)) | (1L << (INFIX - 104)) | (1L << (EXTERNAL - 104)) | (1L << (SUSPEND - 104)) | (1L << (OVERRIDE - 104)) | (1L << (ABSTRACT - 104)) | (1L << (FINAL - 104)) | (1L << (OPEN - 104)) | (1L << (CONST - 104)) | (1L << (LATEINIT - 104)) | (1L << (VARARG - 104)) | (1L << (NOINLINE - 104)) | (1L << (CROSSINLINE - 104)) | (1L << (REIFIED - 104)) | (1L << (Identifier - 104)) | (1L << (LabelReference - 104)))) != 0)) { + { + setState(698); + enumEntries(); + } + } + + setState(720); + switch ( getInterpreter().adaptivePredict(_input,77,_ctx) ) { + case 1: + { + setState(704); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(701); + match(NL); + } + } + setState(706); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(707); + match(SEMICOLON); + setState(711); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,75,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(708); + match(NL); + } + } + } + setState(713); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,75,_ctx); + } + setState(717); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 40)) & ~0x3f) == 0 && ((1L << (_la - 40)) & ((1L << (AT - 40)) | (1L << (FILE - 40)) | (1L << (CLASS - 40)) | (1L << (INTERFACE - 40)) | (1L << (FUN - 40)) | (1L << (OBJECT - 40)) | (1L << (VAL - 40)) | (1L << (VAR - 40)) | (1L << (TYPE_ALIAS - 40)) | (1L << (CONSTRUCTOR - 40)) | (1L << (COMPANION - 40)) | (1L << (INIT - 40)) | (1L << (IN - 40)) | (1L << (OUT - 40)) | (1L << (FIELD - 40)) | (1L << (PROPERTY - 40)) | (1L << (GET - 40)) | (1L << (SET - 40)) | (1L << (RECEIVER - 40)) | (1L << (PARAM - 40)) | (1L << (SETPARAM - 40)) | (1L << (DELEGATE - 40)))) != 0) || ((((_la - 104)) & ~0x3f) == 0 && ((1L << (_la - 104)) & ((1L << (PUBLIC - 104)) | (1L << (PRIVATE - 104)) | (1L << (PROTECTED - 104)) | (1L << (INTERNAL - 104)) | (1L << (ENUM - 104)) | (1L << (SEALED - 104)) | (1L << (ANNOTATION - 104)) | (1L << (DATA - 104)) | (1L << (INNER - 104)) | (1L << (TAILREC - 104)) | (1L << (OPERATOR - 104)) | (1L << (INLINE - 104)) | (1L << (INFIX - 104)) | (1L << (EXTERNAL - 104)) | (1L << (SUSPEND - 104)) | (1L << (OVERRIDE - 104)) | (1L << (ABSTRACT - 104)) | (1L << (FINAL - 104)) | (1L << (OPEN - 104)) | (1L << (CONST - 104)) | (1L << (LATEINIT - 104)) | (1L << (VARARG - 104)) | (1L << (NOINLINE - 104)) | (1L << (CROSSINLINE - 104)) | (1L << (REIFIED - 104)) | (1L << (LabelReference - 104)))) != 0)) { + { + { + setState(714); + classMemberDeclaration(); + } + } + setState(719); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + } + setState(725); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(722); + match(NL); + } + } + setState(727); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(728); + match(RCURL); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumEntriesContext extends ParserRuleContext { + public List enumEntry() { + return getRuleContexts(EnumEntryContext.class); + } + public EnumEntryContext enumEntry(int i) { + return getRuleContext(EnumEntryContext.class,i); + } + public TerminalNode SEMICOLON() { return getToken(KotlinParser.SEMICOLON, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public EnumEntriesContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumEntries; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterEnumEntries(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitEnumEntries(this); + } + } + + public final EnumEntriesContext enumEntries() throws RecognitionException { + EnumEntriesContext _localctx = new EnumEntriesContext(_ctx, getState()); + enterRule(_localctx, 48, RULE_enumEntries); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(737); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(730); + enumEntry(); + setState(734); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,79,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(731); + match(NL); + } + } + } + setState(736); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,79,_ctx); + } + } + } + setState(739); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( ((((_la - 40)) & ~0x3f) == 0 && ((1L << (_la - 40)) & ((1L << (AT - 40)) | (1L << (FILE - 40)) | (1L << (IMPORT - 40)) | (1L << (CONSTRUCTOR - 40)) | (1L << (BY - 40)) | (1L << (COMPANION - 40)) | (1L << (INIT - 40)) | (1L << (WHERE - 40)) | (1L << (CATCH - 40)) | (1L << (FINALLY - 40)) | (1L << (OUT - 40)) | (1L << (FIELD - 40)) | (1L << (PROPERTY - 40)) | (1L << (GET - 40)) | (1L << (SET - 40)) | (1L << (GETTER - 40)) | (1L << (SETTER - 40)) | (1L << (RECEIVER - 40)) | (1L << (PARAM - 40)) | (1L << (SETPARAM - 40)) | (1L << (DELEGATE - 40)) | (1L << (DYNAMIC - 40)))) != 0) || ((((_la - 104)) & ~0x3f) == 0 && ((1L << (_la - 104)) & ((1L << (PUBLIC - 104)) | (1L << (PRIVATE - 104)) | (1L << (PROTECTED - 104)) | (1L << (INTERNAL - 104)) | (1L << (ENUM - 104)) | (1L << (SEALED - 104)) | (1L << (ANNOTATION - 104)) | (1L << (DATA - 104)) | (1L << (INNER - 104)) | (1L << (TAILREC - 104)) | (1L << (OPERATOR - 104)) | (1L << (INLINE - 104)) | (1L << (INFIX - 104)) | (1L << (EXTERNAL - 104)) | (1L << (SUSPEND - 104)) | (1L << (OVERRIDE - 104)) | (1L << (ABSTRACT - 104)) | (1L << (FINAL - 104)) | (1L << (OPEN - 104)) | (1L << (CONST - 104)) | (1L << (LATEINIT - 104)) | (1L << (VARARG - 104)) | (1L << (NOINLINE - 104)) | (1L << (CROSSINLINE - 104)) | (1L << (REIFIED - 104)) | (1L << (Identifier - 104)) | (1L << (LabelReference - 104)))) != 0) ); + setState(742); + switch ( getInterpreter().adaptivePredict(_input,81,_ctx) ) { + case 1: + { + setState(741); + match(SEMICOLON); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumEntryContext extends ParserRuleContext { + public SimpleIdentifierContext simpleIdentifier() { + return getRuleContext(SimpleIdentifierContext.class,0); + } + public List annotations() { + return getRuleContexts(AnnotationsContext.class); + } + public AnnotationsContext annotations(int i) { + return getRuleContext(AnnotationsContext.class,i); + } + public ValueArgumentsContext valueArguments() { + return getRuleContext(ValueArgumentsContext.class,0); + } + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public TerminalNode COMMA() { return getToken(KotlinParser.COMMA, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public EnumEntryContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumEntry; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterEnumEntry(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitEnumEntry(this); + } + } + + public final EnumEntryContext enumEntry() throws RecognitionException { + EnumEntryContext _localctx = new EnumEntryContext(_ctx, getState()); + enterRule(_localctx, 50, RULE_enumEntry); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(747); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==AT || _la==FILE || ((((_la - 93)) & ~0x3f) == 0 && ((1L << (_la - 93)) & ((1L << (FIELD - 93)) | (1L << (PROPERTY - 93)) | (1L << (GET - 93)) | (1L << (SET - 93)) | (1L << (RECEIVER - 93)) | (1L << (PARAM - 93)) | (1L << (SETPARAM - 93)) | (1L << (DELEGATE - 93)) | (1L << (LabelReference - 93)))) != 0)) { + { + { + setState(744); + annotations(); + } + } + setState(749); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(750); + simpleIdentifier(); + setState(758); + switch ( getInterpreter().adaptivePredict(_input,84,_ctx) ) { + case 1: + { + setState(754); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(751); + match(NL); + } + } + setState(756); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(757); + valueArguments(); + } + break; + } + setState(767); + switch ( getInterpreter().adaptivePredict(_input,86,_ctx) ) { + case 1: + { + setState(763); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(760); + match(NL); + } + } + setState(765); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(766); + classBody(); + } + break; + } + setState(776); + switch ( getInterpreter().adaptivePredict(_input,88,_ctx) ) { + case 1: + { + setState(772); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(769); + match(NL); + } + } + setState(774); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(775); + match(COMMA); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionDeclarationContext extends ParserRuleContext { + public TerminalNode FUN() { return getToken(KotlinParser.FUN, 0); } + public FunctionValueParametersContext functionValueParameters() { + return getRuleContext(FunctionValueParametersContext.class,0); + } + public ModifierListContext modifierList() { + return getRuleContext(ModifierListContext.class,0); + } + public List type() { + return getRuleContexts(TypeContext.class); + } + public TypeContext type(int i) { + return getRuleContext(TypeContext.class,i); + } + public List DOT() { return getTokens(KotlinParser.DOT); } + public TerminalNode DOT(int i) { + return getToken(KotlinParser.DOT, i); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public ReceiverTypeContext receiverType() { + return getRuleContext(ReceiverTypeContext.class,0); + } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); } + public TypeConstraintsContext typeConstraints() { + return getRuleContext(TypeConstraintsContext.class,0); + } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public FunctionDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterFunctionDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitFunctionDeclaration(this); + } + } + + public final FunctionDeclarationContext functionDeclaration() throws RecognitionException { + FunctionDeclarationContext _localctx = new FunctionDeclarationContext(_ctx, getState()); + enterRule(_localctx, 52, RULE_functionDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(779); + _la = _input.LA(1); + if (_la==AT || _la==FILE || ((((_la - 89)) & ~0x3f) == 0 && ((1L << (_la - 89)) & ((1L << (IN - 89)) | (1L << (OUT - 89)) | (1L << (FIELD - 89)) | (1L << (PROPERTY - 89)) | (1L << (GET - 89)) | (1L << (SET - 89)) | (1L << (RECEIVER - 89)) | (1L << (PARAM - 89)) | (1L << (SETPARAM - 89)) | (1L << (DELEGATE - 89)) | (1L << (PUBLIC - 89)) | (1L << (PRIVATE - 89)) | (1L << (PROTECTED - 89)) | (1L << (INTERNAL - 89)) | (1L << (ENUM - 89)) | (1L << (SEALED - 89)) | (1L << (ANNOTATION - 89)) | (1L << (DATA - 89)) | (1L << (INNER - 89)) | (1L << (TAILREC - 89)) | (1L << (OPERATOR - 89)) | (1L << (INLINE - 89)) | (1L << (INFIX - 89)) | (1L << (EXTERNAL - 89)) | (1L << (SUSPEND - 89)) | (1L << (OVERRIDE - 89)) | (1L << (ABSTRACT - 89)) | (1L << (FINAL - 89)) | (1L << (OPEN - 89)) | (1L << (CONST - 89)) | (1L << (LATEINIT - 89)) | (1L << (VARARG - 89)) | (1L << (NOINLINE - 89)) | (1L << (CROSSINLINE - 89)) | (1L << (REIFIED - 89)) | (1L << (LabelReference - 89)))) != 0)) { + { + setState(778); + modifierList(); + } + } + + setState(781); + match(FUN); + setState(797); + switch ( getInterpreter().adaptivePredict(_input,92,_ctx) ) { + case 1: + { + setState(785); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(782); + match(NL); + } + } + setState(787); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(788); + type(); + setState(792); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(789); + match(NL); + } + } + setState(794); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(795); + match(DOT); + } + break; + } + setState(806); + switch ( getInterpreter().adaptivePredict(_input,94,_ctx) ) { + case 1: + { + setState(802); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(799); + match(NL); + } + } + setState(804); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(805); + typeParameters(); + } + break; + } + setState(823); + switch ( getInterpreter().adaptivePredict(_input,97,_ctx) ) { + case 1: + { + setState(811); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(808); + match(NL); + } + } + setState(813); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(814); + receiverType(); + setState(818); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(815); + match(NL); + } + } + setState(820); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(821); + match(DOT); + } + break; + } + setState(832); + switch ( getInterpreter().adaptivePredict(_input,99,_ctx) ) { + case 1: + { + setState(828); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(825); + match(NL); + } + } + setState(830); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(831); + identifier(); + } + break; + } + setState(837); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(834); + match(NL); + } + } + setState(839); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(840); + functionValueParameters(); + setState(855); + switch ( getInterpreter().adaptivePredict(_input,103,_ctx) ) { + case 1: + { + setState(844); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(841); + match(NL); + } + } + setState(846); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(847); + match(COLON); + setState(851); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(848); + match(NL); + } + } + setState(853); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(854); + type(); + } + break; + } + setState(864); + switch ( getInterpreter().adaptivePredict(_input,105,_ctx) ) { + case 1: + { + setState(860); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(857); + match(NL); + } + } + setState(862); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(863); + typeConstraints(); + } + break; + } + setState(873); + switch ( getInterpreter().adaptivePredict(_input,107,_ctx) ) { + case 1: + { + setState(869); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(866); + match(NL); + } + } + setState(871); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(872); + functionBody(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionValueParametersContext extends ParserRuleContext { + public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); } + public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); } + public List functionValueParameter() { + return getRuleContexts(FunctionValueParameterContext.class); + } + public FunctionValueParameterContext functionValueParameter(int i) { + return getRuleContext(FunctionValueParameterContext.class,i); + } + public List COMMA() { return getTokens(KotlinParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(KotlinParser.COMMA, i); + } + public FunctionValueParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionValueParameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterFunctionValueParameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitFunctionValueParameters(this); + } + } + + public final FunctionValueParametersContext functionValueParameters() throws RecognitionException { + FunctionValueParametersContext _localctx = new FunctionValueParametersContext(_ctx, getState()); + enterRule(_localctx, 54, RULE_functionValueParameters); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(875); + match(LPAREN); + setState(887); + _la = _input.LA(1); + if (((((_la - 40)) & ~0x3f) == 0 && ((1L << (_la - 40)) & ((1L << (AT - 40)) | (1L << (FILE - 40)) | (1L << (IMPORT - 40)) | (1L << (CONSTRUCTOR - 40)) | (1L << (BY - 40)) | (1L << (COMPANION - 40)) | (1L << (INIT - 40)) | (1L << (WHERE - 40)) | (1L << (CATCH - 40)) | (1L << (FINALLY - 40)) | (1L << (IN - 40)) | (1L << (OUT - 40)) | (1L << (FIELD - 40)) | (1L << (PROPERTY - 40)) | (1L << (GET - 40)) | (1L << (SET - 40)) | (1L << (GETTER - 40)) | (1L << (SETTER - 40)) | (1L << (RECEIVER - 40)) | (1L << (PARAM - 40)) | (1L << (SETPARAM - 40)) | (1L << (DELEGATE - 40)) | (1L << (DYNAMIC - 40)))) != 0) || ((((_la - 104)) & ~0x3f) == 0 && ((1L << (_la - 104)) & ((1L << (PUBLIC - 104)) | (1L << (PRIVATE - 104)) | (1L << (PROTECTED - 104)) | (1L << (INTERNAL - 104)) | (1L << (ENUM - 104)) | (1L << (SEALED - 104)) | (1L << (ANNOTATION - 104)) | (1L << (DATA - 104)) | (1L << (INNER - 104)) | (1L << (TAILREC - 104)) | (1L << (OPERATOR - 104)) | (1L << (INLINE - 104)) | (1L << (INFIX - 104)) | (1L << (EXTERNAL - 104)) | (1L << (SUSPEND - 104)) | (1L << (OVERRIDE - 104)) | (1L << (ABSTRACT - 104)) | (1L << (FINAL - 104)) | (1L << (OPEN - 104)) | (1L << (CONST - 104)) | (1L << (LATEINIT - 104)) | (1L << (VARARG - 104)) | (1L << (NOINLINE - 104)) | (1L << (CROSSINLINE - 104)) | (1L << (REIFIED - 104)) | (1L << (Identifier - 104)) | (1L << (LabelReference - 104)))) != 0)) { + { + setState(876); + functionValueParameter(); + setState(881); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,108,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(877); + match(COMMA); + setState(878); + functionValueParameter(); + } + } + } + setState(883); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,108,_ctx); + } + setState(885); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(884); + match(COMMA); + } + } + + } + } + + setState(889); + match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionValueParameterContext extends ParserRuleContext { + public ParameterContext parameter() { + return getRuleContext(ParameterContext.class,0); + } + public ModifierListContext modifierList() { + return getRuleContext(ModifierListContext.class,0); + } + public TerminalNode ASSIGNMENT() { return getToken(KotlinParser.ASSIGNMENT, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public FunctionValueParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionValueParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterFunctionValueParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitFunctionValueParameter(this); + } + } + + public final FunctionValueParameterContext functionValueParameter() throws RecognitionException { + FunctionValueParameterContext _localctx = new FunctionValueParameterContext(_ctx, getState()); + enterRule(_localctx, 56, RULE_functionValueParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(892); + switch ( getInterpreter().adaptivePredict(_input,111,_ctx) ) { + case 1: + { + setState(891); + modifierList(); + } + break; + } + setState(894); + parameter(); + setState(897); + _la = _input.LA(1); + if (_la==ASSIGNMENT) { + { + setState(895); + match(ASSIGNMENT); + setState(896); + expression(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ParameterContext extends ParserRuleContext { + public SimpleIdentifierContext simpleIdentifier() { + return getRuleContext(SimpleIdentifierContext.class,0); + } + public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public ParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_parameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitParameter(this); + } + } + + public final ParameterContext parameter() throws RecognitionException { + ParameterContext _localctx = new ParameterContext(_ctx, getState()); + enterRule(_localctx, 58, RULE_parameter); + try { + enterOuterAlt(_localctx, 1); + { + setState(899); + simpleIdentifier(); + setState(900); + match(COLON); + setState(901); + type(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ReceiverTypeContext extends ParserRuleContext { + public ParenthesizedTypeContext parenthesizedType() { + return getRuleContext(ParenthesizedTypeContext.class,0); + } + public NullableTypeContext nullableType() { + return getRuleContext(NullableTypeContext.class,0); + } + public TypeReferenceContext typeReference() { + return getRuleContext(TypeReferenceContext.class,0); + } + public TypeModifierListContext typeModifierList() { + return getRuleContext(TypeModifierListContext.class,0); + } + public ReceiverTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_receiverType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterReceiverType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitReceiverType(this); + } + } + + public final ReceiverTypeContext receiverType() throws RecognitionException { + ReceiverTypeContext _localctx = new ReceiverTypeContext(_ctx, getState()); + enterRule(_localctx, 60, RULE_receiverType); + try { + enterOuterAlt(_localctx, 1); + { + setState(904); + switch ( getInterpreter().adaptivePredict(_input,113,_ctx) ) { + case 1: + { + setState(903); + typeModifierList(); + } + break; + } + setState(909); + switch ( getInterpreter().adaptivePredict(_input,114,_ctx) ) { + case 1: + { + setState(906); + parenthesizedType(); + } + break; + case 2: + { + setState(907); + nullableType(); + } + break; + case 3: + { + setState(908); + typeReference(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionBodyContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public TerminalNode ASSIGNMENT() { return getToken(KotlinParser.ASSIGNMENT, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public FunctionBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterFunctionBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitFunctionBody(this); + } + } + + public final FunctionBodyContext functionBody() throws RecognitionException { + FunctionBodyContext _localctx = new FunctionBodyContext(_ctx, getState()); + enterRule(_localctx, 62, RULE_functionBody); + try { + int _alt; + setState(920); + switch (_input.LA(1)) { + case LCURL: + enterOuterAlt(_localctx, 1); + { + setState(911); + block(); + } + break; + case ASSIGNMENT: + enterOuterAlt(_localctx, 2); + { + setState(912); + match(ASSIGNMENT); + setState(916); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,115,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(913); + match(NL); + } + } + } + setState(918); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,115,_ctx); + } + setState(919); + expression(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ObjectDeclarationContext extends ParserRuleContext { + public TerminalNode OBJECT() { return getToken(KotlinParser.OBJECT, 0); } + public SimpleIdentifierContext simpleIdentifier() { + return getRuleContext(SimpleIdentifierContext.class,0); + } + public ModifierListContext modifierList() { + return getRuleContext(ModifierListContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public PrimaryConstructorContext primaryConstructor() { + return getRuleContext(PrimaryConstructorContext.class,0); + } + public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); } + public DelegationSpecifiersContext delegationSpecifiers() { + return getRuleContext(DelegationSpecifiersContext.class,0); + } + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public ObjectDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_objectDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterObjectDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitObjectDeclaration(this); + } + } + + public final ObjectDeclarationContext objectDeclaration() throws RecognitionException { + ObjectDeclarationContext _localctx = new ObjectDeclarationContext(_ctx, getState()); + enterRule(_localctx, 64, RULE_objectDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(923); + _la = _input.LA(1); + if (_la==AT || _la==FILE || ((((_la - 89)) & ~0x3f) == 0 && ((1L << (_la - 89)) & ((1L << (IN - 89)) | (1L << (OUT - 89)) | (1L << (FIELD - 89)) | (1L << (PROPERTY - 89)) | (1L << (GET - 89)) | (1L << (SET - 89)) | (1L << (RECEIVER - 89)) | (1L << (PARAM - 89)) | (1L << (SETPARAM - 89)) | (1L << (DELEGATE - 89)) | (1L << (PUBLIC - 89)) | (1L << (PRIVATE - 89)) | (1L << (PROTECTED - 89)) | (1L << (INTERNAL - 89)) | (1L << (ENUM - 89)) | (1L << (SEALED - 89)) | (1L << (ANNOTATION - 89)) | (1L << (DATA - 89)) | (1L << (INNER - 89)) | (1L << (TAILREC - 89)) | (1L << (OPERATOR - 89)) | (1L << (INLINE - 89)) | (1L << (INFIX - 89)) | (1L << (EXTERNAL - 89)) | (1L << (SUSPEND - 89)) | (1L << (OVERRIDE - 89)) | (1L << (ABSTRACT - 89)) | (1L << (FINAL - 89)) | (1L << (OPEN - 89)) | (1L << (CONST - 89)) | (1L << (LATEINIT - 89)) | (1L << (VARARG - 89)) | (1L << (NOINLINE - 89)) | (1L << (CROSSINLINE - 89)) | (1L << (REIFIED - 89)) | (1L << (LabelReference - 89)))) != 0)) { + { + setState(922); + modifierList(); + } + } + + setState(925); + match(OBJECT); + setState(929); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(926); + match(NL); + } + } + setState(931); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(932); + simpleIdentifier(); + setState(940); + switch ( getInterpreter().adaptivePredict(_input,120,_ctx) ) { + case 1: + { + setState(936); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(933); + match(NL); + } + } + setState(938); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(939); + primaryConstructor(); + } + break; + } + setState(956); + switch ( getInterpreter().adaptivePredict(_input,123,_ctx) ) { + case 1: + { + setState(945); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(942); + match(NL); + } + } + setState(947); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(948); + match(COLON); + setState(952); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(949); + match(NL); + } + } + setState(954); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(955); + delegationSpecifiers(); + } + break; + } + setState(965); + switch ( getInterpreter().adaptivePredict(_input,125,_ctx) ) { + case 1: + { + setState(961); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(958); + match(NL); + } + } + setState(963); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(964); + classBody(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CompanionObjectContext extends ParserRuleContext { + public TerminalNode COMPANION() { return getToken(KotlinParser.COMPANION, 0); } + public TerminalNode OBJECT() { return getToken(KotlinParser.OBJECT, 0); } + public List modifierList() { + return getRuleContexts(ModifierListContext.class); + } + public ModifierListContext modifierList(int i) { + return getRuleContext(ModifierListContext.class,i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public SimpleIdentifierContext simpleIdentifier() { + return getRuleContext(SimpleIdentifierContext.class,0); + } + public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); } + public DelegationSpecifiersContext delegationSpecifiers() { + return getRuleContext(DelegationSpecifiersContext.class,0); + } + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public CompanionObjectContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_companionObject; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterCompanionObject(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitCompanionObject(this); + } + } + + public final CompanionObjectContext companionObject() throws RecognitionException { + CompanionObjectContext _localctx = new CompanionObjectContext(_ctx, getState()); + enterRule(_localctx, 66, RULE_companionObject); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(968); + _la = _input.LA(1); + if (_la==AT || _la==FILE || ((((_la - 89)) & ~0x3f) == 0 && ((1L << (_la - 89)) & ((1L << (IN - 89)) | (1L << (OUT - 89)) | (1L << (FIELD - 89)) | (1L << (PROPERTY - 89)) | (1L << (GET - 89)) | (1L << (SET - 89)) | (1L << (RECEIVER - 89)) | (1L << (PARAM - 89)) | (1L << (SETPARAM - 89)) | (1L << (DELEGATE - 89)) | (1L << (PUBLIC - 89)) | (1L << (PRIVATE - 89)) | (1L << (PROTECTED - 89)) | (1L << (INTERNAL - 89)) | (1L << (ENUM - 89)) | (1L << (SEALED - 89)) | (1L << (ANNOTATION - 89)) | (1L << (DATA - 89)) | (1L << (INNER - 89)) | (1L << (TAILREC - 89)) | (1L << (OPERATOR - 89)) | (1L << (INLINE - 89)) | (1L << (INFIX - 89)) | (1L << (EXTERNAL - 89)) | (1L << (SUSPEND - 89)) | (1L << (OVERRIDE - 89)) | (1L << (ABSTRACT - 89)) | (1L << (FINAL - 89)) | (1L << (OPEN - 89)) | (1L << (CONST - 89)) | (1L << (LATEINIT - 89)) | (1L << (VARARG - 89)) | (1L << (NOINLINE - 89)) | (1L << (CROSSINLINE - 89)) | (1L << (REIFIED - 89)) | (1L << (LabelReference - 89)))) != 0)) { + { + setState(967); + modifierList(); + } + } + + setState(970); + match(COMPANION); + setState(974); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(971); + match(NL); + } + } + setState(976); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(978); + _la = _input.LA(1); + if (_la==AT || _la==FILE || ((((_la - 89)) & ~0x3f) == 0 && ((1L << (_la - 89)) & ((1L << (IN - 89)) | (1L << (OUT - 89)) | (1L << (FIELD - 89)) | (1L << (PROPERTY - 89)) | (1L << (GET - 89)) | (1L << (SET - 89)) | (1L << (RECEIVER - 89)) | (1L << (PARAM - 89)) | (1L << (SETPARAM - 89)) | (1L << (DELEGATE - 89)) | (1L << (PUBLIC - 89)) | (1L << (PRIVATE - 89)) | (1L << (PROTECTED - 89)) | (1L << (INTERNAL - 89)) | (1L << (ENUM - 89)) | (1L << (SEALED - 89)) | (1L << (ANNOTATION - 89)) | (1L << (DATA - 89)) | (1L << (INNER - 89)) | (1L << (TAILREC - 89)) | (1L << (OPERATOR - 89)) | (1L << (INLINE - 89)) | (1L << (INFIX - 89)) | (1L << (EXTERNAL - 89)) | (1L << (SUSPEND - 89)) | (1L << (OVERRIDE - 89)) | (1L << (ABSTRACT - 89)) | (1L << (FINAL - 89)) | (1L << (OPEN - 89)) | (1L << (CONST - 89)) | (1L << (LATEINIT - 89)) | (1L << (VARARG - 89)) | (1L << (NOINLINE - 89)) | (1L << (CROSSINLINE - 89)) | (1L << (REIFIED - 89)) | (1L << (LabelReference - 89)))) != 0)) { + { + setState(977); + modifierList(); + } + } + + setState(980); + match(OBJECT); + setState(988); + switch ( getInterpreter().adaptivePredict(_input,130,_ctx) ) { + case 1: + { + setState(984); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(981); + match(NL); + } + } + setState(986); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(987); + simpleIdentifier(); + } + break; + } + setState(1004); + switch ( getInterpreter().adaptivePredict(_input,133,_ctx) ) { + case 1: + { + setState(993); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(990); + match(NL); + } + } + setState(995); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(996); + match(COLON); + setState(1000); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(997); + match(NL); + } + } + setState(1002); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1003); + delegationSpecifiers(); + } + break; + } + setState(1013); + switch ( getInterpreter().adaptivePredict(_input,135,_ctx) ) { + case 1: + { + setState(1009); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1006); + match(NL); + } + } + setState(1011); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1012); + classBody(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PropertyDeclarationContext extends ParserRuleContext { + public TerminalNode VAL() { return getToken(KotlinParser.VAL, 0); } + public TerminalNode VAR() { return getToken(KotlinParser.VAR, 0); } + public ModifierListContext modifierList() { + return getRuleContext(ModifierListContext.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public TerminalNode DOT() { return getToken(KotlinParser.DOT, 0); } + public TypeConstraintsContext typeConstraints() { + return getRuleContext(TypeConstraintsContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public GetterContext getter() { + return getRuleContext(GetterContext.class,0); + } + public SetterContext setter() { + return getRuleContext(SetterContext.class,0); + } + public MultiVariableDeclarationContext multiVariableDeclaration() { + return getRuleContext(MultiVariableDeclarationContext.class,0); + } + public VariableDeclarationContext variableDeclaration() { + return getRuleContext(VariableDeclarationContext.class,0); + } + public TerminalNode BY() { return getToken(KotlinParser.BY, 0); } + public TerminalNode ASSIGNMENT() { return getToken(KotlinParser.ASSIGNMENT, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public SemiContext semi() { + return getRuleContext(SemiContext.class,0); + } + public PropertyDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_propertyDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterPropertyDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitPropertyDeclaration(this); + } + } + + public final PropertyDeclarationContext propertyDeclaration() throws RecognitionException { + PropertyDeclarationContext _localctx = new PropertyDeclarationContext(_ctx, getState()); + enterRule(_localctx, 68, RULE_propertyDeclaration); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1016); + _la = _input.LA(1); + if (_la==AT || _la==FILE || ((((_la - 89)) & ~0x3f) == 0 && ((1L << (_la - 89)) & ((1L << (IN - 89)) | (1L << (OUT - 89)) | (1L << (FIELD - 89)) | (1L << (PROPERTY - 89)) | (1L << (GET - 89)) | (1L << (SET - 89)) | (1L << (RECEIVER - 89)) | (1L << (PARAM - 89)) | (1L << (SETPARAM - 89)) | (1L << (DELEGATE - 89)) | (1L << (PUBLIC - 89)) | (1L << (PRIVATE - 89)) | (1L << (PROTECTED - 89)) | (1L << (INTERNAL - 89)) | (1L << (ENUM - 89)) | (1L << (SEALED - 89)) | (1L << (ANNOTATION - 89)) | (1L << (DATA - 89)) | (1L << (INNER - 89)) | (1L << (TAILREC - 89)) | (1L << (OPERATOR - 89)) | (1L << (INLINE - 89)) | (1L << (INFIX - 89)) | (1L << (EXTERNAL - 89)) | (1L << (SUSPEND - 89)) | (1L << (OVERRIDE - 89)) | (1L << (ABSTRACT - 89)) | (1L << (FINAL - 89)) | (1L << (OPEN - 89)) | (1L << (CONST - 89)) | (1L << (LATEINIT - 89)) | (1L << (VARARG - 89)) | (1L << (NOINLINE - 89)) | (1L << (CROSSINLINE - 89)) | (1L << (REIFIED - 89)) | (1L << (LabelReference - 89)))) != 0)) { + { + setState(1015); + modifierList(); + } + } + + setState(1018); + _la = _input.LA(1); + if ( !(_la==VAL || _la==VAR) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(1026); + switch ( getInterpreter().adaptivePredict(_input,138,_ctx) ) { + case 1: + { + setState(1022); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1019); + match(NL); + } + } + setState(1024); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1025); + typeParameters(); + } + break; + } + setState(1043); + switch ( getInterpreter().adaptivePredict(_input,141,_ctx) ) { + case 1: + { + setState(1031); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1028); + match(NL); + } + } + setState(1033); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1034); + type(); + setState(1038); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1035); + match(NL); + } + } + setState(1040); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1041); + match(DOT); + } + break; + } + { + setState(1048); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1045); + match(NL); + } + } + setState(1050); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1053); + switch (_input.LA(1)) { + case LPAREN: + { + setState(1051); + multiVariableDeclaration(); + } + break; + case IMPORT: + case CONSTRUCTOR: + case BY: + case COMPANION: + case INIT: + case WHERE: + case CATCH: + case FINALLY: + case OUT: + case GETTER: + case SETTER: + case DYNAMIC: + case PUBLIC: + case PRIVATE: + case PROTECTED: + case INTERNAL: + case ENUM: + case SEALED: + case ANNOTATION: + case DATA: + case INNER: + case TAILREC: + case OPERATOR: + case INLINE: + case INFIX: + case EXTERNAL: + case SUSPEND: + case OVERRIDE: + case ABSTRACT: + case FINAL: + case OPEN: + case CONST: + case LATEINIT: + case VARARG: + case NOINLINE: + case CROSSINLINE: + case REIFIED: + case Identifier: + { + setState(1052); + variableDeclaration(); + } + break; + default: + throw new NoViableAltException(this); + } + } + setState(1062); + switch ( getInterpreter().adaptivePredict(_input,145,_ctx) ) { + case 1: + { + setState(1058); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1055); + match(NL); + } + } + setState(1060); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1061); + typeConstraints(); + } + break; + } + setState(1078); + switch ( getInterpreter().adaptivePredict(_input,148,_ctx) ) { + case 1: + { + setState(1067); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1064); + match(NL); + } + } + setState(1069); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1070); + _la = _input.LA(1); + if ( !(_la==ASSIGNMENT || _la==BY) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(1074); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,147,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1071); + match(NL); + } + } + } + setState(1076); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,147,_ctx); + } + setState(1077); + expression(); + } + break; + } + setState(1104); + switch ( getInterpreter().adaptivePredict(_input,153,_ctx) ) { + case 1: + { + setState(1083); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1080); + match(NL); + } + } + setState(1085); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1086); + getter(); + setState(1090); + switch ( getInterpreter().adaptivePredict(_input,150,_ctx) ) { + case 1: + { + setState(1087); + semi(); + setState(1088); + setter(); + } + break; + } + } + break; + case 2: + { + setState(1095); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1092); + match(NL); + } + } + setState(1097); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1098); + setter(); + setState(1102); + switch ( getInterpreter().adaptivePredict(_input,152,_ctx) ) { + case 1: + { + setState(1099); + semi(); + setState(1100); + getter(); + } + break; + } + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MultiVariableDeclarationContext extends ParserRuleContext { + public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); } + public List variableDeclaration() { + return getRuleContexts(VariableDeclarationContext.class); + } + public VariableDeclarationContext variableDeclaration(int i) { + return getRuleContext(VariableDeclarationContext.class,i); + } + public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); } + public List COMMA() { return getTokens(KotlinParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(KotlinParser.COMMA, i); + } + public MultiVariableDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_multiVariableDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterMultiVariableDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitMultiVariableDeclaration(this); + } + } + + public final MultiVariableDeclarationContext multiVariableDeclaration() throws RecognitionException { + MultiVariableDeclarationContext _localctx = new MultiVariableDeclarationContext(_ctx, getState()); + enterRule(_localctx, 70, RULE_multiVariableDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1106); + match(LPAREN); + setState(1107); + variableDeclaration(); + setState(1112); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(1108); + match(COMMA); + setState(1109); + variableDeclaration(); + } + } + setState(1114); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1115); + match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclarationContext extends ParserRuleContext { + public SimpleIdentifierContext simpleIdentifier() { + return getRuleContext(SimpleIdentifierContext.class,0); + } + public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public VariableDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterVariableDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitVariableDeclaration(this); + } + } + + public final VariableDeclarationContext variableDeclaration() throws RecognitionException { + VariableDeclarationContext _localctx = new VariableDeclarationContext(_ctx, getState()); + enterRule(_localctx, 72, RULE_variableDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1117); + simpleIdentifier(); + setState(1120); + _la = _input.LA(1); + if (_la==COLON) { + { + setState(1118); + match(COLON); + setState(1119); + type(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GetterContext extends ParserRuleContext { + public TerminalNode GETTER() { return getToken(KotlinParser.GETTER, 0); } + public ModifierListContext modifierList() { + return getRuleContext(ModifierListContext.class,0); + } + public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); } + public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public TerminalNode ASSIGNMENT() { return getToken(KotlinParser.ASSIGNMENT, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public GetterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_getter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterGetter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitGetter(this); + } + } + + public final GetterContext getter() throws RecognitionException { + GetterContext _localctx = new GetterContext(_ctx, getState()); + enterRule(_localctx, 74, RULE_getter); + int _la; + try { + int _alt; + setState(1171); + switch ( getInterpreter().adaptivePredict(_input,165,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1123); + _la = _input.LA(1); + if (_la==AT || _la==FILE || ((((_la - 89)) & ~0x3f) == 0 && ((1L << (_la - 89)) & ((1L << (IN - 89)) | (1L << (OUT - 89)) | (1L << (FIELD - 89)) | (1L << (PROPERTY - 89)) | (1L << (GET - 89)) | (1L << (SET - 89)) | (1L << (RECEIVER - 89)) | (1L << (PARAM - 89)) | (1L << (SETPARAM - 89)) | (1L << (DELEGATE - 89)) | (1L << (PUBLIC - 89)) | (1L << (PRIVATE - 89)) | (1L << (PROTECTED - 89)) | (1L << (INTERNAL - 89)) | (1L << (ENUM - 89)) | (1L << (SEALED - 89)) | (1L << (ANNOTATION - 89)) | (1L << (DATA - 89)) | (1L << (INNER - 89)) | (1L << (TAILREC - 89)) | (1L << (OPERATOR - 89)) | (1L << (INLINE - 89)) | (1L << (INFIX - 89)) | (1L << (EXTERNAL - 89)) | (1L << (SUSPEND - 89)) | (1L << (OVERRIDE - 89)) | (1L << (ABSTRACT - 89)) | (1L << (FINAL - 89)) | (1L << (OPEN - 89)) | (1L << (CONST - 89)) | (1L << (LATEINIT - 89)) | (1L << (VARARG - 89)) | (1L << (NOINLINE - 89)) | (1L << (CROSSINLINE - 89)) | (1L << (REIFIED - 89)) | (1L << (LabelReference - 89)))) != 0)) { + { + setState(1122); + modifierList(); + } + } + + setState(1125); + match(GETTER); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1127); + _la = _input.LA(1); + if (_la==AT || _la==FILE || ((((_la - 89)) & ~0x3f) == 0 && ((1L << (_la - 89)) & ((1L << (IN - 89)) | (1L << (OUT - 89)) | (1L << (FIELD - 89)) | (1L << (PROPERTY - 89)) | (1L << (GET - 89)) | (1L << (SET - 89)) | (1L << (RECEIVER - 89)) | (1L << (PARAM - 89)) | (1L << (SETPARAM - 89)) | (1L << (DELEGATE - 89)) | (1L << (PUBLIC - 89)) | (1L << (PRIVATE - 89)) | (1L << (PROTECTED - 89)) | (1L << (INTERNAL - 89)) | (1L << (ENUM - 89)) | (1L << (SEALED - 89)) | (1L << (ANNOTATION - 89)) | (1L << (DATA - 89)) | (1L << (INNER - 89)) | (1L << (TAILREC - 89)) | (1L << (OPERATOR - 89)) | (1L << (INLINE - 89)) | (1L << (INFIX - 89)) | (1L << (EXTERNAL - 89)) | (1L << (SUSPEND - 89)) | (1L << (OVERRIDE - 89)) | (1L << (ABSTRACT - 89)) | (1L << (FINAL - 89)) | (1L << (OPEN - 89)) | (1L << (CONST - 89)) | (1L << (LATEINIT - 89)) | (1L << (VARARG - 89)) | (1L << (NOINLINE - 89)) | (1L << (CROSSINLINE - 89)) | (1L << (REIFIED - 89)) | (1L << (LabelReference - 89)))) != 0)) { + { + setState(1126); + modifierList(); + } + } + + setState(1129); + match(GETTER); + setState(1133); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1130); + match(NL); + } + } + setState(1135); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1136); + match(LPAREN); + setState(1137); + match(RPAREN); + setState(1152); + switch ( getInterpreter().adaptivePredict(_input,161,_ctx) ) { + case 1: + { + setState(1141); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1138); + match(NL); + } + } + setState(1143); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1144); + match(COLON); + setState(1148); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1145); + match(NL); + } + } + setState(1150); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1151); + type(); + } + break; + } + setState(1157); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1154); + match(NL); + } + } + setState(1159); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1169); + switch (_input.LA(1)) { + case LCURL: + { + setState(1160); + block(); + } + break; + case ASSIGNMENT: + { + setState(1161); + match(ASSIGNMENT); + setState(1165); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,163,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1162); + match(NL); + } + } + } + setState(1167); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,163,_ctx); + } + setState(1168); + expression(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SetterContext extends ParserRuleContext { + public TerminalNode SETTER() { return getToken(KotlinParser.SETTER, 0); } + public ModifierListContext modifierList() { + return getRuleContext(ModifierListContext.class,0); + } + public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); } + public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public SimpleIdentifierContext simpleIdentifier() { + return getRuleContext(SimpleIdentifierContext.class,0); + } + public ParameterContext parameter() { + return getRuleContext(ParameterContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public List annotations() { + return getRuleContexts(AnnotationsContext.class); + } + public AnnotationsContext annotations(int i) { + return getRuleContext(AnnotationsContext.class,i); + } + public List parameterModifier() { + return getRuleContexts(ParameterModifierContext.class); + } + public ParameterModifierContext parameterModifier(int i) { + return getRuleContext(ParameterModifierContext.class,i); + } + public SetterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_setter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterSetter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitSetter(this); + } + } + + public final SetterContext setter() throws RecognitionException { + SetterContext _localctx = new SetterContext(_ctx, getState()); + enterRule(_localctx, 76, RULE_setter); + int _la; + try { + int _alt; + setState(1208); + switch ( getInterpreter().adaptivePredict(_input,173,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1174); + _la = _input.LA(1); + if (_la==AT || _la==FILE || ((((_la - 89)) & ~0x3f) == 0 && ((1L << (_la - 89)) & ((1L << (IN - 89)) | (1L << (OUT - 89)) | (1L << (FIELD - 89)) | (1L << (PROPERTY - 89)) | (1L << (GET - 89)) | (1L << (SET - 89)) | (1L << (RECEIVER - 89)) | (1L << (PARAM - 89)) | (1L << (SETPARAM - 89)) | (1L << (DELEGATE - 89)) | (1L << (PUBLIC - 89)) | (1L << (PRIVATE - 89)) | (1L << (PROTECTED - 89)) | (1L << (INTERNAL - 89)) | (1L << (ENUM - 89)) | (1L << (SEALED - 89)) | (1L << (ANNOTATION - 89)) | (1L << (DATA - 89)) | (1L << (INNER - 89)) | (1L << (TAILREC - 89)) | (1L << (OPERATOR - 89)) | (1L << (INLINE - 89)) | (1L << (INFIX - 89)) | (1L << (EXTERNAL - 89)) | (1L << (SUSPEND - 89)) | (1L << (OVERRIDE - 89)) | (1L << (ABSTRACT - 89)) | (1L << (FINAL - 89)) | (1L << (OPEN - 89)) | (1L << (CONST - 89)) | (1L << (LATEINIT - 89)) | (1L << (VARARG - 89)) | (1L << (NOINLINE - 89)) | (1L << (CROSSINLINE - 89)) | (1L << (REIFIED - 89)) | (1L << (LabelReference - 89)))) != 0)) { + { + setState(1173); + modifierList(); + } + } + + setState(1176); + match(SETTER); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1178); + _la = _input.LA(1); + if (_la==AT || _la==FILE || ((((_la - 89)) & ~0x3f) == 0 && ((1L << (_la - 89)) & ((1L << (IN - 89)) | (1L << (OUT - 89)) | (1L << (FIELD - 89)) | (1L << (PROPERTY - 89)) | (1L << (GET - 89)) | (1L << (SET - 89)) | (1L << (RECEIVER - 89)) | (1L << (PARAM - 89)) | (1L << (SETPARAM - 89)) | (1L << (DELEGATE - 89)) | (1L << (PUBLIC - 89)) | (1L << (PRIVATE - 89)) | (1L << (PROTECTED - 89)) | (1L << (INTERNAL - 89)) | (1L << (ENUM - 89)) | (1L << (SEALED - 89)) | (1L << (ANNOTATION - 89)) | (1L << (DATA - 89)) | (1L << (INNER - 89)) | (1L << (TAILREC - 89)) | (1L << (OPERATOR - 89)) | (1L << (INLINE - 89)) | (1L << (INFIX - 89)) | (1L << (EXTERNAL - 89)) | (1L << (SUSPEND - 89)) | (1L << (OVERRIDE - 89)) | (1L << (ABSTRACT - 89)) | (1L << (FINAL - 89)) | (1L << (OPEN - 89)) | (1L << (CONST - 89)) | (1L << (LATEINIT - 89)) | (1L << (VARARG - 89)) | (1L << (NOINLINE - 89)) | (1L << (CROSSINLINE - 89)) | (1L << (REIFIED - 89)) | (1L << (LabelReference - 89)))) != 0)) { + { + setState(1177); + modifierList(); + } + } + + setState(1180); + match(SETTER); + setState(1184); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1181); + match(NL); + } + } + setState(1186); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1187); + match(LPAREN); + setState(1192); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,170,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + setState(1190); + switch (_input.LA(1)) { + case AT: + case FILE: + case FIELD: + case PROPERTY: + case GET: + case SET: + case RECEIVER: + case PARAM: + case SETPARAM: + case DELEGATE: + case LabelReference: + { + setState(1188); + annotations(); + } + break; + case VARARG: + case NOINLINE: + case CROSSINLINE: + { + setState(1189); + parameterModifier(); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + setState(1194); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,170,_ctx); + } + setState(1197); + switch ( getInterpreter().adaptivePredict(_input,171,_ctx) ) { + case 1: + { + setState(1195); + simpleIdentifier(); + } + break; + case 2: + { + setState(1196); + parameter(); + } + break; + } + setState(1199); + match(RPAREN); + setState(1203); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1200); + match(NL); + } + } + setState(1205); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1206); + functionBody(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeAliasContext extends ParserRuleContext { + public TerminalNode TYPE_ALIAS() { return getToken(KotlinParser.TYPE_ALIAS, 0); } + public SimpleIdentifierContext simpleIdentifier() { + return getRuleContext(SimpleIdentifierContext.class,0); + } + public TerminalNode ASSIGNMENT() { return getToken(KotlinParser.ASSIGNMENT, 0); } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public ModifierListContext modifierList() { + return getRuleContext(ModifierListContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public TypeAliasContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeAlias; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterTypeAlias(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitTypeAlias(this); + } + } + + public final TypeAliasContext typeAlias() throws RecognitionException { + TypeAliasContext _localctx = new TypeAliasContext(_ctx, getState()); + enterRule(_localctx, 78, RULE_typeAlias); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1211); + _la = _input.LA(1); + if (_la==AT || _la==FILE || ((((_la - 89)) & ~0x3f) == 0 && ((1L << (_la - 89)) & ((1L << (IN - 89)) | (1L << (OUT - 89)) | (1L << (FIELD - 89)) | (1L << (PROPERTY - 89)) | (1L << (GET - 89)) | (1L << (SET - 89)) | (1L << (RECEIVER - 89)) | (1L << (PARAM - 89)) | (1L << (SETPARAM - 89)) | (1L << (DELEGATE - 89)) | (1L << (PUBLIC - 89)) | (1L << (PRIVATE - 89)) | (1L << (PROTECTED - 89)) | (1L << (INTERNAL - 89)) | (1L << (ENUM - 89)) | (1L << (SEALED - 89)) | (1L << (ANNOTATION - 89)) | (1L << (DATA - 89)) | (1L << (INNER - 89)) | (1L << (TAILREC - 89)) | (1L << (OPERATOR - 89)) | (1L << (INLINE - 89)) | (1L << (INFIX - 89)) | (1L << (EXTERNAL - 89)) | (1L << (SUSPEND - 89)) | (1L << (OVERRIDE - 89)) | (1L << (ABSTRACT - 89)) | (1L << (FINAL - 89)) | (1L << (OPEN - 89)) | (1L << (CONST - 89)) | (1L << (LATEINIT - 89)) | (1L << (VARARG - 89)) | (1L << (NOINLINE - 89)) | (1L << (CROSSINLINE - 89)) | (1L << (REIFIED - 89)) | (1L << (LabelReference - 89)))) != 0)) { + { + setState(1210); + modifierList(); + } + } + + setState(1213); + match(TYPE_ALIAS); + setState(1217); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1214); + match(NL); + } + } + setState(1219); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1220); + simpleIdentifier(); + setState(1228); + switch ( getInterpreter().adaptivePredict(_input,177,_ctx) ) { + case 1: + { + setState(1224); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1221); + match(NL); + } + } + setState(1226); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1227); + typeParameters(); + } + break; + } + setState(1233); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1230); + match(NL); + } + } + setState(1235); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1236); + match(ASSIGNMENT); + setState(1240); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1237); + match(NL); + } + } + setState(1242); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1243); + type(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParametersContext extends ParserRuleContext { + public TerminalNode LANGLE() { return getToken(KotlinParser.LANGLE, 0); } + public List typeParameter() { + return getRuleContexts(TypeParameterContext.class); + } + public TypeParameterContext typeParameter(int i) { + return getRuleContext(TypeParameterContext.class,i); + } + public TerminalNode RANGLE() { return getToken(KotlinParser.RANGLE, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public List COMMA() { return getTokens(KotlinParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(KotlinParser.COMMA, i); + } + public TypeParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterTypeParameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitTypeParameters(this); + } + } + + public final TypeParametersContext typeParameters() throws RecognitionException { + TypeParametersContext _localctx = new TypeParametersContext(_ctx, getState()); + enterRule(_localctx, 80, RULE_typeParameters); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1245); + match(LANGLE); + setState(1249); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,180,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1246); + match(NL); + } + } + } + setState(1251); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,180,_ctx); + } + setState(1252); + typeParameter(); + setState(1269); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,183,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1256); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1253); + match(NL); + } + } + setState(1258); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1259); + match(COMMA); + setState(1263); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,182,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1260); + match(NL); + } + } + } + setState(1265); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,182,_ctx); + } + setState(1266); + typeParameter(); + } + } + } + setState(1271); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,183,_ctx); + } + setState(1279); + switch ( getInterpreter().adaptivePredict(_input,185,_ctx) ) { + case 1: + { + setState(1275); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1272); + match(NL); + } + } + setState(1277); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1278); + match(COMMA); + } + break; + } + setState(1284); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1281); + match(NL); + } + } + setState(1286); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1287); + match(RANGLE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParameterContext extends ParserRuleContext { + public SimpleIdentifierContext simpleIdentifier() { + return getRuleContext(SimpleIdentifierContext.class,0); + } + public TerminalNode MULT() { return getToken(KotlinParser.MULT, 0); } + public ModifierListContext modifierList() { + return getRuleContext(ModifierListContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public TypeParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterTypeParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitTypeParameter(this); + } + } + + public final TypeParameterContext typeParameter() throws RecognitionException { + TypeParameterContext _localctx = new TypeParameterContext(_ctx, getState()); + enterRule(_localctx, 82, RULE_typeParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1290); + switch ( getInterpreter().adaptivePredict(_input,187,_ctx) ) { + case 1: + { + setState(1289); + modifierList(); + } + break; + } + setState(1295); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1292); + match(NL); + } + } + setState(1297); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1300); + switch (_input.LA(1)) { + case IMPORT: + case CONSTRUCTOR: + case BY: + case COMPANION: + case INIT: + case WHERE: + case CATCH: + case FINALLY: + case OUT: + case GETTER: + case SETTER: + case DYNAMIC: + case PUBLIC: + case PRIVATE: + case PROTECTED: + case INTERNAL: + case ENUM: + case SEALED: + case ANNOTATION: + case DATA: + case INNER: + case TAILREC: + case OPERATOR: + case INLINE: + case INFIX: + case EXTERNAL: + case SUSPEND: + case OVERRIDE: + case ABSTRACT: + case FINAL: + case OPEN: + case CONST: + case LATEINIT: + case VARARG: + case NOINLINE: + case CROSSINLINE: + case REIFIED: + case Identifier: + { + setState(1298); + simpleIdentifier(); + } + break; + case MULT: + { + setState(1299); + match(MULT); + } + break; + default: + throw new NoViableAltException(this); + } + setState(1316); + switch ( getInterpreter().adaptivePredict(_input,192,_ctx) ) { + case 1: + { + setState(1305); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1302); + match(NL); + } + } + setState(1307); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1308); + match(COLON); + setState(1312); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1309); + match(NL); + } + } + setState(1314); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1315); + type(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeContext extends ParserRuleContext { + public FunctionTypeContext functionType() { + return getRuleContext(FunctionTypeContext.class,0); + } + public ParenthesizedTypeContext parenthesizedType() { + return getRuleContext(ParenthesizedTypeContext.class,0); + } + public NullableTypeContext nullableType() { + return getRuleContext(NullableTypeContext.class,0); + } + public TypeReferenceContext typeReference() { + return getRuleContext(TypeReferenceContext.class,0); + } + public TypeModifierListContext typeModifierList() { + return getRuleContext(TypeModifierListContext.class,0); + } + public TypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_type; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitType(this); + } + } + + public final TypeContext type() throws RecognitionException { + TypeContext _localctx = new TypeContext(_ctx, getState()); + enterRule(_localctx, 84, RULE_type); + try { + enterOuterAlt(_localctx, 1); + { + setState(1319); + switch ( getInterpreter().adaptivePredict(_input,193,_ctx) ) { + case 1: + { + setState(1318); + typeModifierList(); + } + break; + } + setState(1325); + switch ( getInterpreter().adaptivePredict(_input,194,_ctx) ) { + case 1: + { + setState(1321); + functionType(); + } + break; + case 2: + { + setState(1322); + parenthesizedType(); + } + break; + case 3: + { + setState(1323); + nullableType(); + } + break; + case 4: + { + setState(1324); + typeReference(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeModifierListContext extends ParserRuleContext { + public List annotations() { + return getRuleContexts(AnnotationsContext.class); + } + public AnnotationsContext annotations(int i) { + return getRuleContext(AnnotationsContext.class,i); + } + public List SUSPEND() { return getTokens(KotlinParser.SUSPEND); } + public TerminalNode SUSPEND(int i) { + return getToken(KotlinParser.SUSPEND, i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public TypeModifierListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeModifierList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterTypeModifierList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitTypeModifierList(this); + } + } + + public final TypeModifierListContext typeModifierList() throws RecognitionException { + TypeModifierListContext _localctx = new TypeModifierListContext(_ctx, getState()); + enterRule(_localctx, 86, RULE_typeModifierList); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1335); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + setState(1335); + switch (_input.LA(1)) { + case AT: + case FILE: + case FIELD: + case PROPERTY: + case GET: + case SET: + case RECEIVER: + case PARAM: + case SETPARAM: + case DELEGATE: + case LabelReference: + { + setState(1327); + annotations(); + } + break; + case SUSPEND: + { + setState(1328); + match(SUSPEND); + setState(1332); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1329); + match(NL); + } + } + setState(1334); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(1337); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,197,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ParenthesizedTypeContext extends ParserRuleContext { + public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); } + public ParenthesizedTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_parenthesizedType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterParenthesizedType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitParenthesizedType(this); + } + } + + public final ParenthesizedTypeContext parenthesizedType() throws RecognitionException { + ParenthesizedTypeContext _localctx = new ParenthesizedTypeContext(_ctx, getState()); + enterRule(_localctx, 88, RULE_parenthesizedType); + try { + enterOuterAlt(_localctx, 1); + { + setState(1339); + match(LPAREN); + setState(1340); + type(); + setState(1341); + match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NullableTypeContext extends ParserRuleContext { + public TypeReferenceContext typeReference() { + return getRuleContext(TypeReferenceContext.class,0); + } + public ParenthesizedTypeContext parenthesizedType() { + return getRuleContext(ParenthesizedTypeContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public List QUEST() { return getTokens(KotlinParser.QUEST); } + public TerminalNode QUEST(int i) { + return getToken(KotlinParser.QUEST, i); + } + public NullableTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_nullableType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterNullableType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitNullableType(this); + } + } + + public final NullableTypeContext nullableType() throws RecognitionException { + NullableTypeContext _localctx = new NullableTypeContext(_ctx, getState()); + enterRule(_localctx, 90, RULE_nullableType); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1345); + switch ( getInterpreter().adaptivePredict(_input,198,_ctx) ) { + case 1: + { + setState(1343); + typeReference(); + } + break; + case 2: + { + setState(1344); + parenthesizedType(); + } + break; + } + setState(1350); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1347); + match(NL); + } + } + setState(1352); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1354); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(1353); + match(QUEST); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(1356); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,200,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeReferenceContext extends ParserRuleContext { + public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); } + public TypeReferenceContext typeReference() { + return getRuleContext(TypeReferenceContext.class,0); + } + public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); } + public UserTypeContext userType() { + return getRuleContext(UserTypeContext.class,0); + } + public TerminalNode DYNAMIC() { return getToken(KotlinParser.DYNAMIC, 0); } + public TypeReferenceContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeReference; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterTypeReference(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitTypeReference(this); + } + } + + public final TypeReferenceContext typeReference() throws RecognitionException { + TypeReferenceContext _localctx = new TypeReferenceContext(_ctx, getState()); + enterRule(_localctx, 92, RULE_typeReference); + try { + setState(1364); + switch ( getInterpreter().adaptivePredict(_input,201,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1358); + match(LPAREN); + setState(1359); + typeReference(); + setState(1360); + match(RPAREN); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1362); + userType(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1363); + match(DYNAMIC); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionTypeContext extends ParserRuleContext { + public FunctionTypeParametersContext functionTypeParameters() { + return getRuleContext(FunctionTypeParametersContext.class,0); + } + public TerminalNode ARROW() { return getToken(KotlinParser.ARROW, 0); } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public FunctionTypeReceiverContext functionTypeReceiver() { + return getRuleContext(FunctionTypeReceiverContext.class,0); + } + public TerminalNode DOT() { return getToken(KotlinParser.DOT, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public FunctionTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterFunctionType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitFunctionType(this); + } + } + + public final FunctionTypeContext functionType() throws RecognitionException { + FunctionTypeContext _localctx = new FunctionTypeContext(_ctx, getState()); + enterRule(_localctx, 94, RULE_functionType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1380); + switch ( getInterpreter().adaptivePredict(_input,204,_ctx) ) { + case 1: + { + setState(1366); + functionTypeReceiver(); + setState(1370); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1367); + match(NL); + } + } + setState(1372); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1373); + match(DOT); + setState(1377); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1374); + match(NL); + } + } + setState(1379); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + } + setState(1382); + functionTypeParameters(); + setState(1386); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1383); + match(NL); + } + } + setState(1388); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1389); + match(ARROW); + { + setState(1393); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1390); + match(NL); + } + } + setState(1395); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1396); + type(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionTypeReceiverContext extends ParserRuleContext { + public ParenthesizedTypeContext parenthesizedType() { + return getRuleContext(ParenthesizedTypeContext.class,0); + } + public NullableTypeContext nullableType() { + return getRuleContext(NullableTypeContext.class,0); + } + public TypeReferenceContext typeReference() { + return getRuleContext(TypeReferenceContext.class,0); + } + public FunctionTypeReceiverContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionTypeReceiver; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterFunctionTypeReceiver(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitFunctionTypeReceiver(this); + } + } + + public final FunctionTypeReceiverContext functionTypeReceiver() throws RecognitionException { + FunctionTypeReceiverContext _localctx = new FunctionTypeReceiverContext(_ctx, getState()); + enterRule(_localctx, 96, RULE_functionTypeReceiver); + try { + setState(1401); + switch ( getInterpreter().adaptivePredict(_input,207,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1398); + parenthesizedType(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1399); + nullableType(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1400); + typeReference(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class UserTypeContext extends ParserRuleContext { + public List simpleUserType() { + return getRuleContexts(SimpleUserTypeContext.class); + } + public SimpleUserTypeContext simpleUserType(int i) { + return getRuleContext(SimpleUserTypeContext.class,i); + } + public List DOT() { return getTokens(KotlinParser.DOT); } + public TerminalNode DOT(int i) { + return getToken(KotlinParser.DOT, i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public UserTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_userType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterUserType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitUserType(this); + } + } + + public final UserTypeContext userType() throws RecognitionException { + UserTypeContext _localctx = new UserTypeContext(_ctx, getState()); + enterRule(_localctx, 98, RULE_userType); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1403); + simpleUserType(); + setState(1420); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,210,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1407); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1404); + match(NL); + } + } + setState(1409); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1410); + match(DOT); + setState(1414); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1411); + match(NL); + } + } + setState(1416); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1417); + simpleUserType(); + } + } + } + setState(1422); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,210,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SimpleUserTypeContext extends ParserRuleContext { + public SimpleIdentifierContext simpleIdentifier() { + return getRuleContext(SimpleIdentifierContext.class,0); + } + public TypeArgumentsContext typeArguments() { + return getRuleContext(TypeArgumentsContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public SimpleUserTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_simpleUserType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterSimpleUserType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitSimpleUserType(this); + } + } + + public final SimpleUserTypeContext simpleUserType() throws RecognitionException { + SimpleUserTypeContext _localctx = new SimpleUserTypeContext(_ctx, getState()); + enterRule(_localctx, 100, RULE_simpleUserType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1423); + simpleIdentifier(); + setState(1431); + switch ( getInterpreter().adaptivePredict(_input,212,_ctx) ) { + case 1: + { + setState(1427); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1424); + match(NL); + } + } + setState(1429); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1430); + typeArguments(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionTypeParametersContext extends ParserRuleContext { + public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); } + public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public List parameter() { + return getRuleContexts(ParameterContext.class); + } + public ParameterContext parameter(int i) { + return getRuleContext(ParameterContext.class,i); + } + public List type() { + return getRuleContexts(TypeContext.class); + } + public TypeContext type(int i) { + return getRuleContext(TypeContext.class,i); + } + public List COMMA() { return getTokens(KotlinParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(KotlinParser.COMMA, i); + } + public FunctionTypeParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionTypeParameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterFunctionTypeParameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitFunctionTypeParameters(this); + } + } + + public final FunctionTypeParametersContext functionTypeParameters() throws RecognitionException { + FunctionTypeParametersContext _localctx = new FunctionTypeParametersContext(_ctx, getState()); + enterRule(_localctx, 102, RULE_functionTypeParameters); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1433); + match(LPAREN); + setState(1437); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,213,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1434); + match(NL); + } + } + } + setState(1439); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,213,_ctx); + } + setState(1442); + switch ( getInterpreter().adaptivePredict(_input,214,_ctx) ) { + case 1: + { + setState(1440); + parameter(); + } + break; + case 2: + { + setState(1441); + type(); + } + break; + } + setState(1463); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,218,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1447); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1444); + match(NL); + } + } + setState(1449); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1450); + match(COMMA); + setState(1454); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1451); + match(NL); + } + } + setState(1456); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1459); + switch ( getInterpreter().adaptivePredict(_input,217,_ctx) ) { + case 1: + { + setState(1457); + parameter(); + } + break; + case 2: + { + setState(1458); + type(); + } + break; + } + } + } + } + setState(1465); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,218,_ctx); + } + setState(1473); + switch ( getInterpreter().adaptivePredict(_input,220,_ctx) ) { + case 1: + { + setState(1469); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1466); + match(NL); + } + } + setState(1471); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1472); + match(COMMA); + } + break; + } + setState(1478); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1475); + match(NL); + } + } + setState(1480); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1481); + match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeConstraintsContext extends ParserRuleContext { + public TerminalNode WHERE() { return getToken(KotlinParser.WHERE, 0); } + public List typeConstraint() { + return getRuleContexts(TypeConstraintContext.class); + } + public TypeConstraintContext typeConstraint(int i) { + return getRuleContext(TypeConstraintContext.class,i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public List COMMA() { return getTokens(KotlinParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(KotlinParser.COMMA, i); + } + public TypeConstraintsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeConstraints; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterTypeConstraints(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitTypeConstraints(this); + } + } + + public final TypeConstraintsContext typeConstraints() throws RecognitionException { + TypeConstraintsContext _localctx = new TypeConstraintsContext(_ctx, getState()); + enterRule(_localctx, 104, RULE_typeConstraints); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1483); + match(WHERE); + setState(1487); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1484); + match(NL); + } + } + setState(1489); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1490); + typeConstraint(); + setState(1507); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,225,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1494); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1491); + match(NL); + } + } + setState(1496); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1497); + match(COMMA); + setState(1501); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1498); + match(NL); + } + } + setState(1503); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1504); + typeConstraint(); + } + } + } + setState(1509); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,225,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeConstraintContext extends ParserRuleContext { + public SimpleIdentifierContext simpleIdentifier() { + return getRuleContext(SimpleIdentifierContext.class,0); + } + public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public List annotations() { + return getRuleContexts(AnnotationsContext.class); + } + public AnnotationsContext annotations(int i) { + return getRuleContext(AnnotationsContext.class,i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public TypeConstraintContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeConstraint; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterTypeConstraint(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitTypeConstraint(this); + } + } + + public final TypeConstraintContext typeConstraint() throws RecognitionException { + TypeConstraintContext _localctx = new TypeConstraintContext(_ctx, getState()); + enterRule(_localctx, 106, RULE_typeConstraint); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1513); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==AT || _la==FILE || ((((_la - 93)) & ~0x3f) == 0 && ((1L << (_la - 93)) & ((1L << (FIELD - 93)) | (1L << (PROPERTY - 93)) | (1L << (GET - 93)) | (1L << (SET - 93)) | (1L << (RECEIVER - 93)) | (1L << (PARAM - 93)) | (1L << (SETPARAM - 93)) | (1L << (DELEGATE - 93)) | (1L << (LabelReference - 93)))) != 0)) { + { + { + setState(1510); + annotations(); + } + } + setState(1515); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1516); + simpleIdentifier(); + setState(1520); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1517); + match(NL); + } + } + setState(1522); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1523); + match(COLON); + setState(1527); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1524); + match(NL); + } + } + setState(1529); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1530); + type(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BlockContext extends ParserRuleContext { + public TerminalNode LCURL() { return getToken(KotlinParser.LCURL, 0); } + public StatementsContext statements() { + return getRuleContext(StatementsContext.class,0); + } + public TerminalNode RCURL() { return getToken(KotlinParser.RCURL, 0); } + public BlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_block; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitBlock(this); + } + } + + public final BlockContext block() throws RecognitionException { + BlockContext _localctx = new BlockContext(_ctx, getState()); + enterRule(_localctx, 108, RULE_block); + try { + enterOuterAlt(_localctx, 1); + { + setState(1532); + match(LCURL); + setState(1533); + statements(); + setState(1534); + match(RCURL); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StatementsContext extends ParserRuleContext { + public List anysemi() { + return getRuleContexts(AnysemiContext.class); + } + public AnysemiContext anysemi(int i) { + return getRuleContext(AnysemiContext.class,i); + } + public List statement() { + return getRuleContexts(StatementContext.class); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public StatementsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statements; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterStatements(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitStatements(this); + } + } + + public final StatementsContext statements() throws RecognitionException { + StatementsContext _localctx = new StatementsContext(_ctx, getState()); + enterRule(_localctx, 110, RULE_statements); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1539); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,229,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1536); + anysemi(); + } + } + } + setState(1541); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,229,_ctx); + } + setState(1556); + switch ( getInterpreter().adaptivePredict(_input,233,_ctx) ) { + case 1: + { + setState(1542); + statement(); + setState(1553); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,232,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1544); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(1543); + anysemi(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(1546); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,230,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + setState(1549); + switch ( getInterpreter().adaptivePredict(_input,231,_ctx) ) { + case 1: + { + setState(1548); + statement(); + } + break; + } + } + } + } + setState(1555); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,232,_ctx); + } + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StatementContext extends ParserRuleContext { + public DeclarationContext declaration() { + return getRuleContext(DeclarationContext.class,0); + } + public BlockLevelExpressionContext blockLevelExpression() { + return getRuleContext(BlockLevelExpressionContext.class,0); + } + public StatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitStatement(this); + } + } + + public final StatementContext statement() throws RecognitionException { + StatementContext _localctx = new StatementContext(_ctx, getState()); + enterRule(_localctx, 112, RULE_statement); + try { + setState(1560); + switch ( getInterpreter().adaptivePredict(_input,234,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1558); + declaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1559); + blockLevelExpression(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BlockLevelExpressionContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public List annotations() { + return getRuleContexts(AnnotationsContext.class); + } + public AnnotationsContext annotations(int i) { + return getRuleContext(AnnotationsContext.class,i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public BlockLevelExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_blockLevelExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterBlockLevelExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitBlockLevelExpression(this); + } + } + + public final BlockLevelExpressionContext blockLevelExpression() throws RecognitionException { + BlockLevelExpressionContext _localctx = new BlockLevelExpressionContext(_ctx, getState()); + enterRule(_localctx, 114, RULE_blockLevelExpression); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1565); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,235,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1562); + annotations(); + } + } + } + setState(1567); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,235,_ctx); + } + setState(1571); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,236,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1568); + match(NL); + } + } + } + setState(1573); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,236,_ctx); + } + setState(1574); + expression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DeclarationContext extends ParserRuleContext { + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public FunctionDeclarationContext functionDeclaration() { + return getRuleContext(FunctionDeclarationContext.class,0); + } + public PropertyDeclarationContext propertyDeclaration() { + return getRuleContext(PropertyDeclarationContext.class,0); + } + public TypeAliasContext typeAlias() { + return getRuleContext(TypeAliasContext.class,0); + } + public List labelDefinition() { + return getRuleContexts(LabelDefinitionContext.class); + } + public LabelDefinitionContext labelDefinition(int i) { + return getRuleContext(LabelDefinitionContext.class,i); + } + public DeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_declaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitDeclaration(this); + } + } + + public final DeclarationContext declaration() throws RecognitionException { + DeclarationContext _localctx = new DeclarationContext(_ctx, getState()); + enterRule(_localctx, 116, RULE_declaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1579); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LabelDefinition) { + { + { + setState(1576); + labelDefinition(); + } + } + setState(1581); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1586); + switch ( getInterpreter().adaptivePredict(_input,238,_ctx) ) { + case 1: + { + setState(1582); + classDeclaration(); + } + break; + case 2: + { + setState(1583); + functionDeclaration(); + } + break; + case 3: + { + setState(1584); + propertyDeclaration(); + } + break; + case 4: + { + setState(1585); + typeAlias(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionContext extends ParserRuleContext { + public List disjunction() { + return getRuleContexts(DisjunctionContext.class); + } + public DisjunctionContext disjunction(int i) { + return getRuleContext(DisjunctionContext.class,i); + } + public List assignmentOperator() { + return getRuleContexts(AssignmentOperatorContext.class); + } + public AssignmentOperatorContext assignmentOperator(int i) { + return getRuleContext(AssignmentOperatorContext.class,i); + } + public ExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitExpression(this); + } + } + + public final ExpressionContext expression() throws RecognitionException { + ExpressionContext _localctx = new ExpressionContext(_ctx, getState()); + enterRule(_localctx, 118, RULE_expression); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1588); + disjunction(); + setState(1594); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,239,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1589); + assignmentOperator(); + setState(1590); + disjunction(); + } + } + } + setState(1596); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,239,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DisjunctionContext extends ParserRuleContext { + public List conjunction() { + return getRuleContexts(ConjunctionContext.class); + } + public ConjunctionContext conjunction(int i) { + return getRuleContext(ConjunctionContext.class,i); + } + public List DISJ() { return getTokens(KotlinParser.DISJ); } + public TerminalNode DISJ(int i) { + return getToken(KotlinParser.DISJ, i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public DisjunctionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_disjunction; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterDisjunction(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitDisjunction(this); + } + } + + public final DisjunctionContext disjunction() throws RecognitionException { + DisjunctionContext _localctx = new DisjunctionContext(_ctx, getState()); + enterRule(_localctx, 120, RULE_disjunction); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1597); + conjunction(); + setState(1614); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,242,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1601); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1598); + match(NL); + } + } + setState(1603); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1604); + match(DISJ); + setState(1608); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,241,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1605); + match(NL); + } + } + } + setState(1610); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,241,_ctx); + } + setState(1611); + conjunction(); + } + } + } + setState(1616); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,242,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConjunctionContext extends ParserRuleContext { + public List equalityComparison() { + return getRuleContexts(EqualityComparisonContext.class); + } + public EqualityComparisonContext equalityComparison(int i) { + return getRuleContext(EqualityComparisonContext.class,i); + } + public List CONJ() { return getTokens(KotlinParser.CONJ); } + public TerminalNode CONJ(int i) { + return getToken(KotlinParser.CONJ, i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public ConjunctionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_conjunction; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterConjunction(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitConjunction(this); + } + } + + public final ConjunctionContext conjunction() throws RecognitionException { + ConjunctionContext _localctx = new ConjunctionContext(_ctx, getState()); + enterRule(_localctx, 122, RULE_conjunction); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1617); + equalityComparison(); + setState(1634); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,245,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1621); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1618); + match(NL); + } + } + setState(1623); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1624); + match(CONJ); + setState(1628); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,244,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1625); + match(NL); + } + } + } + setState(1630); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,244,_ctx); + } + setState(1631); + equalityComparison(); + } + } + } + setState(1636); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,245,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EqualityComparisonContext extends ParserRuleContext { + public List comparison() { + return getRuleContexts(ComparisonContext.class); + } + public ComparisonContext comparison(int i) { + return getRuleContext(ComparisonContext.class,i); + } + public List equalityOperation() { + return getRuleContexts(EqualityOperationContext.class); + } + public EqualityOperationContext equalityOperation(int i) { + return getRuleContext(EqualityOperationContext.class,i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public EqualityComparisonContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_equalityComparison; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterEqualityComparison(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitEqualityComparison(this); + } + } + + public final EqualityComparisonContext equalityComparison() throws RecognitionException { + EqualityComparisonContext _localctx = new EqualityComparisonContext(_ctx, getState()); + enterRule(_localctx, 124, RULE_equalityComparison); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1637); + comparison(); + setState(1649); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,247,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1638); + equalityOperation(); + setState(1642); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,246,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1639); + match(NL); + } + } + } + setState(1644); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,246,_ctx); + } + setState(1645); + comparison(); + } + } + } + setState(1651); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,247,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ComparisonContext extends ParserRuleContext { + public List namedInfix() { + return getRuleContexts(NamedInfixContext.class); + } + public NamedInfixContext namedInfix(int i) { + return getRuleContext(NamedInfixContext.class,i); + } + public ComparisonOperatorContext comparisonOperator() { + return getRuleContext(ComparisonOperatorContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public ComparisonContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_comparison; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterComparison(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitComparison(this); + } + } + + public final ComparisonContext comparison() throws RecognitionException { + ComparisonContext _localctx = new ComparisonContext(_ctx, getState()); + enterRule(_localctx, 126, RULE_comparison); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1652); + namedInfix(); + setState(1662); + switch ( getInterpreter().adaptivePredict(_input,249,_ctx) ) { + case 1: + { + setState(1653); + comparisonOperator(); + setState(1657); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,248,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1654); + match(NL); + } + } + } + setState(1659); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,248,_ctx); + } + setState(1660); + namedInfix(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NamedInfixContext extends ParserRuleContext { + public List elvisExpression() { + return getRuleContexts(ElvisExpressionContext.class); + } + public ElvisExpressionContext elvisExpression(int i) { + return getRuleContext(ElvisExpressionContext.class,i); + } + public IsOperatorContext isOperator() { + return getRuleContext(IsOperatorContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public List inOperator() { + return getRuleContexts(InOperatorContext.class); + } + public InOperatorContext inOperator(int i) { + return getRuleContext(InOperatorContext.class,i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public NamedInfixContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_namedInfix; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterNamedInfix(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitNamedInfix(this); + } + } + + public final NamedInfixContext namedInfix() throws RecognitionException { + NamedInfixContext _localctx = new NamedInfixContext(_ctx, getState()); + enterRule(_localctx, 128, RULE_namedInfix); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1664); + elvisExpression(); + setState(1687); + switch ( getInterpreter().adaptivePredict(_input,253,_ctx) ) { + case 1: + { + setState(1674); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(1665); + inOperator(); + setState(1669); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,250,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1666); + match(NL); + } + } + } + setState(1671); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,250,_ctx); + } + setState(1672); + elvisExpression(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(1676); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,251,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + break; + case 2: + { + { + setState(1678); + isOperator(); + setState(1682); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1679); + match(NL); + } + } + setState(1684); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1685); + type(); + } + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElvisExpressionContext extends ParserRuleContext { + public List infixFunctionCall() { + return getRuleContexts(InfixFunctionCallContext.class); + } + public InfixFunctionCallContext infixFunctionCall(int i) { + return getRuleContext(InfixFunctionCallContext.class,i); + } + public List ELVIS() { return getTokens(KotlinParser.ELVIS); } + public TerminalNode ELVIS(int i) { + return getToken(KotlinParser.ELVIS, i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public ElvisExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elvisExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterElvisExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitElvisExpression(this); + } + } + + public final ElvisExpressionContext elvisExpression() throws RecognitionException { + ElvisExpressionContext _localctx = new ElvisExpressionContext(_ctx, getState()); + enterRule(_localctx, 130, RULE_elvisExpression); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1689); + infixFunctionCall(); + setState(1706); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,256,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1693); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1690); + match(NL); + } + } + setState(1695); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1696); + match(ELVIS); + setState(1700); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,255,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1697); + match(NL); + } + } + } + setState(1702); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,255,_ctx); + } + setState(1703); + infixFunctionCall(); + } + } + } + setState(1708); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,256,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InfixFunctionCallContext extends ParserRuleContext { + public List rangeExpression() { + return getRuleContexts(RangeExpressionContext.class); + } + public RangeExpressionContext rangeExpression(int i) { + return getRuleContext(RangeExpressionContext.class,i); + } + public List simpleIdentifier() { + return getRuleContexts(SimpleIdentifierContext.class); + } + public SimpleIdentifierContext simpleIdentifier(int i) { + return getRuleContext(SimpleIdentifierContext.class,i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public InfixFunctionCallContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_infixFunctionCall; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterInfixFunctionCall(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitInfixFunctionCall(this); + } + } + + public final InfixFunctionCallContext infixFunctionCall() throws RecognitionException { + InfixFunctionCallContext _localctx = new InfixFunctionCallContext(_ctx, getState()); + enterRule(_localctx, 132, RULE_infixFunctionCall); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1709); + rangeExpression(); + setState(1721); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,258,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1710); + simpleIdentifier(); + setState(1714); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,257,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1711); + match(NL); + } + } + } + setState(1716); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,257,_ctx); + } + setState(1717); + rangeExpression(); + } + } + } + setState(1723); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,258,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RangeExpressionContext extends ParserRuleContext { + public List additiveExpression() { + return getRuleContexts(AdditiveExpressionContext.class); + } + public AdditiveExpressionContext additiveExpression(int i) { + return getRuleContext(AdditiveExpressionContext.class,i); + } + public List RANGE() { return getTokens(KotlinParser.RANGE); } + public TerminalNode RANGE(int i) { + return getToken(KotlinParser.RANGE, i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public RangeExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_rangeExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterRangeExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitRangeExpression(this); + } + } + + public final RangeExpressionContext rangeExpression() throws RecognitionException { + RangeExpressionContext _localctx = new RangeExpressionContext(_ctx, getState()); + enterRule(_localctx, 134, RULE_rangeExpression); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1724); + additiveExpression(); + setState(1735); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,260,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1725); + match(RANGE); + setState(1729); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,259,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1726); + match(NL); + } + } + } + setState(1731); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,259,_ctx); + } + setState(1732); + additiveExpression(); + } + } + } + setState(1737); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,260,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AdditiveExpressionContext extends ParserRuleContext { + public List multiplicativeExpression() { + return getRuleContexts(MultiplicativeExpressionContext.class); + } + public MultiplicativeExpressionContext multiplicativeExpression(int i) { + return getRuleContext(MultiplicativeExpressionContext.class,i); + } + public List additiveOperator() { + return getRuleContexts(AdditiveOperatorContext.class); + } + public AdditiveOperatorContext additiveOperator(int i) { + return getRuleContext(AdditiveOperatorContext.class,i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public AdditiveExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_additiveExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterAdditiveExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitAdditiveExpression(this); + } + } + + public final AdditiveExpressionContext additiveExpression() throws RecognitionException { + AdditiveExpressionContext _localctx = new AdditiveExpressionContext(_ctx, getState()); + enterRule(_localctx, 136, RULE_additiveExpression); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1738); + multiplicativeExpression(); + setState(1750); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,262,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1739); + additiveOperator(); + setState(1743); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,261,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1740); + match(NL); + } + } + } + setState(1745); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,261,_ctx); + } + setState(1746); + multiplicativeExpression(); + } + } + } + setState(1752); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,262,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MultiplicativeExpressionContext extends ParserRuleContext { + public List typeRHS() { + return getRuleContexts(TypeRHSContext.class); + } + public TypeRHSContext typeRHS(int i) { + return getRuleContext(TypeRHSContext.class,i); + } + public List multiplicativeOperation() { + return getRuleContexts(MultiplicativeOperationContext.class); + } + public MultiplicativeOperationContext multiplicativeOperation(int i) { + return getRuleContext(MultiplicativeOperationContext.class,i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public MultiplicativeExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_multiplicativeExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterMultiplicativeExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitMultiplicativeExpression(this); + } + } + + public final MultiplicativeExpressionContext multiplicativeExpression() throws RecognitionException { + MultiplicativeExpressionContext _localctx = new MultiplicativeExpressionContext(_ctx, getState()); + enterRule(_localctx, 138, RULE_multiplicativeExpression); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1753); + typeRHS(); + setState(1765); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,264,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1754); + multiplicativeOperation(); + setState(1758); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,263,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1755); + match(NL); + } + } + } + setState(1760); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,263,_ctx); + } + setState(1761); + typeRHS(); + } + } + } + setState(1767); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,264,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeRHSContext extends ParserRuleContext { + public List prefixUnaryExpression() { + return getRuleContexts(PrefixUnaryExpressionContext.class); + } + public PrefixUnaryExpressionContext prefixUnaryExpression(int i) { + return getRuleContext(PrefixUnaryExpressionContext.class,i); + } + public List typeOperation() { + return getRuleContexts(TypeOperationContext.class); + } + public TypeOperationContext typeOperation(int i) { + return getRuleContext(TypeOperationContext.class,i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public TypeRHSContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeRHS; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterTypeRHS(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitTypeRHS(this); + } + } + + public final TypeRHSContext typeRHS() throws RecognitionException { + TypeRHSContext _localctx = new TypeRHSContext(_ctx, getState()); + enterRule(_localctx, 140, RULE_typeRHS); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1768); + prefixUnaryExpression(); + setState(1780); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,266,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1772); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1769); + match(NL); + } + } + setState(1774); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1775); + typeOperation(); + setState(1776); + prefixUnaryExpression(); + } + } + } + setState(1782); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,266,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PrefixUnaryExpressionContext extends ParserRuleContext { + public PostfixUnaryExpressionContext postfixUnaryExpression() { + return getRuleContext(PostfixUnaryExpressionContext.class,0); + } + public List prefixUnaryOperation() { + return getRuleContexts(PrefixUnaryOperationContext.class); + } + public PrefixUnaryOperationContext prefixUnaryOperation(int i) { + return getRuleContext(PrefixUnaryOperationContext.class,i); + } + public PrefixUnaryExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_prefixUnaryExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterPrefixUnaryExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitPrefixUnaryExpression(this); + } + } + + public final PrefixUnaryExpressionContext prefixUnaryExpression() throws RecognitionException { + PrefixUnaryExpressionContext _localctx = new PrefixUnaryExpressionContext(_ctx, getState()); + enterRule(_localctx, 142, RULE_prefixUnaryExpression); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1786); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,267,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1783); + prefixUnaryOperation(); + } + } + } + setState(1788); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,267,_ctx); + } + setState(1789); + postfixUnaryExpression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PostfixUnaryExpressionContext extends ParserRuleContext { + public AtomicExpressionContext atomicExpression() { + return getRuleContext(AtomicExpressionContext.class,0); + } + public CallableReferenceContext callableReference() { + return getRuleContext(CallableReferenceContext.class,0); + } + public List postfixUnaryOperation() { + return getRuleContexts(PostfixUnaryOperationContext.class); + } + public PostfixUnaryOperationContext postfixUnaryOperation(int i) { + return getRuleContext(PostfixUnaryOperationContext.class,i); + } + public PostfixUnaryExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_postfixUnaryExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterPostfixUnaryExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitPostfixUnaryExpression(this); + } + } + + public final PostfixUnaryExpressionContext postfixUnaryExpression() throws RecognitionException { + PostfixUnaryExpressionContext _localctx = new PostfixUnaryExpressionContext(_ctx, getState()); + enterRule(_localctx, 144, RULE_postfixUnaryExpression); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1793); + switch ( getInterpreter().adaptivePredict(_input,268,_ctx) ) { + case 1: + { + setState(1791); + atomicExpression(); + } + break; + case 2: + { + setState(1792); + callableReference(); + } + break; + } + setState(1798); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,269,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1795); + postfixUnaryOperation(); + } + } + } + setState(1800); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,269,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AtomicExpressionContext extends ParserRuleContext { + public ParenthesizedExpressionContext parenthesizedExpression() { + return getRuleContext(ParenthesizedExpressionContext.class,0); + } + public LiteralConstantContext literalConstant() { + return getRuleContext(LiteralConstantContext.class,0); + } + public FunctionLiteralContext functionLiteral() { + return getRuleContext(FunctionLiteralContext.class,0); + } + public ThisExpressionContext thisExpression() { + return getRuleContext(ThisExpressionContext.class,0); + } + public SuperExpressionContext superExpression() { + return getRuleContext(SuperExpressionContext.class,0); + } + public ConditionalExpressionContext conditionalExpression() { + return getRuleContext(ConditionalExpressionContext.class,0); + } + public TryExpressionContext tryExpression() { + return getRuleContext(TryExpressionContext.class,0); + } + public ObjectLiteralContext objectLiteral() { + return getRuleContext(ObjectLiteralContext.class,0); + } + public JumpExpressionContext jumpExpression() { + return getRuleContext(JumpExpressionContext.class,0); + } + public LoopExpressionContext loopExpression() { + return getRuleContext(LoopExpressionContext.class,0); + } + public CollectionLiteralContext collectionLiteral() { + return getRuleContext(CollectionLiteralContext.class,0); + } + public SimpleIdentifierContext simpleIdentifier() { + return getRuleContext(SimpleIdentifierContext.class,0); + } + public TerminalNode VAL() { return getToken(KotlinParser.VAL, 0); } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public AtomicExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_atomicExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterAtomicExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitAtomicExpression(this); + } + } + + public final AtomicExpressionContext atomicExpression() throws RecognitionException { + AtomicExpressionContext _localctx = new AtomicExpressionContext(_ctx, getState()); + enterRule(_localctx, 146, RULE_atomicExpression); + try { + setState(1815); + switch (_input.LA(1)) { + case LPAREN: + enterOuterAlt(_localctx, 1); + { + setState(1801); + parenthesizedExpression(); + } + break; + case QUOTE_OPEN: + case TRIPLE_QUOTE_OPEN: + case RealLiteral: + case LongLiteral: + case IntegerLiteral: + case HexLiteral: + case BinLiteral: + case BooleanLiteral: + case NullLiteral: + case CharacterLiteral: + enterOuterAlt(_localctx, 2); + { + setState(1802); + literalConstant(); + } + break; + case LCURL: + case AT: + case FILE: + case FIELD: + case PROPERTY: + case GET: + case SET: + case RECEIVER: + case PARAM: + case SETPARAM: + case DELEGATE: + case LabelReference: + enterOuterAlt(_localctx, 3); + { + setState(1803); + functionLiteral(); + } + break; + case THIS: + enterOuterAlt(_localctx, 4); + { + setState(1804); + thisExpression(); + } + break; + case SUPER: + enterOuterAlt(_localctx, 5); + { + setState(1805); + superExpression(); + } + break; + case IF: + case WHEN: + enterOuterAlt(_localctx, 6); + { + setState(1806); + conditionalExpression(); + } + break; + case TRY: + enterOuterAlt(_localctx, 7); + { + setState(1807); + tryExpression(); + } + break; + case OBJECT: + enterOuterAlt(_localctx, 8); + { + setState(1808); + objectLiteral(); + } + break; + case RETURN_AT: + case CONTINUE_AT: + case BREAK_AT: + case THROW: + case RETURN: + case CONTINUE: + case BREAK: + enterOuterAlt(_localctx, 9); + { + setState(1809); + jumpExpression(); + } + break; + case FOR: + case DO: + case WHILE: + enterOuterAlt(_localctx, 10); + { + setState(1810); + loopExpression(); + } + break; + case LSQUARE: + enterOuterAlt(_localctx, 11); + { + setState(1811); + collectionLiteral(); + } + break; + case IMPORT: + case CONSTRUCTOR: + case BY: + case COMPANION: + case INIT: + case WHERE: + case CATCH: + case FINALLY: + case OUT: + case GETTER: + case SETTER: + case DYNAMIC: + case PUBLIC: + case PRIVATE: + case PROTECTED: + case INTERNAL: + case ENUM: + case SEALED: + case ANNOTATION: + case DATA: + case INNER: + case TAILREC: + case OPERATOR: + case INLINE: + case INFIX: + case EXTERNAL: + case SUSPEND: + case OVERRIDE: + case ABSTRACT: + case FINAL: + case OPEN: + case CONST: + case LATEINIT: + case VARARG: + case NOINLINE: + case CROSSINLINE: + case REIFIED: + case Identifier: + enterOuterAlt(_localctx, 12); + { + setState(1812); + simpleIdentifier(); + } + break; + case VAL: + enterOuterAlt(_localctx, 13); + { + setState(1813); + match(VAL); + setState(1814); + identifier(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ParenthesizedExpressionContext extends ParserRuleContext { + public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); } + public ParenthesizedExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_parenthesizedExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterParenthesizedExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitParenthesizedExpression(this); + } + } + + public final ParenthesizedExpressionContext parenthesizedExpression() throws RecognitionException { + ParenthesizedExpressionContext _localctx = new ParenthesizedExpressionContext(_ctx, getState()); + enterRule(_localctx, 148, RULE_parenthesizedExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(1817); + match(LPAREN); + setState(1818); + expression(); + setState(1819); + match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CallSuffixContext extends ParserRuleContext { + public TypeArgumentsContext typeArguments() { + return getRuleContext(TypeArgumentsContext.class,0); + } + public ValueArgumentsContext valueArguments() { + return getRuleContext(ValueArgumentsContext.class,0); + } + public List annotatedLambda() { + return getRuleContexts(AnnotatedLambdaContext.class); + } + public AnnotatedLambdaContext annotatedLambda(int i) { + return getRuleContext(AnnotatedLambdaContext.class,i); + } + public CallSuffixContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_callSuffix; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterCallSuffix(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitCallSuffix(this); + } + } + + public final CallSuffixContext callSuffix() throws RecognitionException { + CallSuffixContext _localctx = new CallSuffixContext(_ctx, getState()); + enterRule(_localctx, 150, RULE_callSuffix); + try { + int _alt; + setState(1843); + switch (_input.LA(1)) { + case LANGLE: + enterOuterAlt(_localctx, 1); + { + setState(1821); + typeArguments(); + setState(1823); + switch ( getInterpreter().adaptivePredict(_input,271,_ctx) ) { + case 1: + { + setState(1822); + valueArguments(); + } + break; + } + setState(1828); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,272,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1825); + annotatedLambda(); + } + } + } + setState(1830); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,272,_ctx); + } + } + break; + case LPAREN: + enterOuterAlt(_localctx, 2); + { + setState(1831); + valueArguments(); + setState(1835); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,273,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1832); + annotatedLambda(); + } + } + } + setState(1837); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,273,_ctx); + } + } + break; + case NL: + case LCURL: + case AT: + case FILE: + case IMPORT: + case CONSTRUCTOR: + case BY: + case COMPANION: + case INIT: + case WHERE: + case CATCH: + case FINALLY: + case OUT: + case FIELD: + case PROPERTY: + case GET: + case SET: + case GETTER: + case SETTER: + case RECEIVER: + case PARAM: + case SETPARAM: + case DELEGATE: + case DYNAMIC: + case PUBLIC: + case PRIVATE: + case PROTECTED: + case INTERNAL: + case ENUM: + case SEALED: + case ANNOTATION: + case DATA: + case INNER: + case TAILREC: + case OPERATOR: + case INLINE: + case INFIX: + case EXTERNAL: + case SUSPEND: + case OVERRIDE: + case ABSTRACT: + case FINAL: + case OPEN: + case CONST: + case LATEINIT: + case VARARG: + case NOINLINE: + case CROSSINLINE: + case REIFIED: + case Identifier: + case LabelReference: + case LabelDefinition: + enterOuterAlt(_localctx, 3); + { + setState(1839); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(1838); + annotatedLambda(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(1841); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,274,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotatedLambdaContext extends ParserRuleContext { + public FunctionLiteralContext functionLiteral() { + return getRuleContext(FunctionLiteralContext.class,0); + } + public List unescapedAnnotation() { + return getRuleContexts(UnescapedAnnotationContext.class); + } + public UnescapedAnnotationContext unescapedAnnotation(int i) { + return getRuleContext(UnescapedAnnotationContext.class,i); + } + public TerminalNode LabelDefinition() { return getToken(KotlinParser.LabelDefinition, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public AnnotatedLambdaContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotatedLambda; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterAnnotatedLambda(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitAnnotatedLambda(this); + } + } + + public final AnnotatedLambdaContext annotatedLambda() throws RecognitionException { + AnnotatedLambdaContext _localctx = new AnnotatedLambdaContext(_ctx, getState()); + enterRule(_localctx, 152, RULE_annotatedLambda); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1848); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 58)) & ~0x3f) == 0 && ((1L << (_la - 58)) & ((1L << (IMPORT - 58)) | (1L << (CONSTRUCTOR - 58)) | (1L << (BY - 58)) | (1L << (COMPANION - 58)) | (1L << (INIT - 58)) | (1L << (WHERE - 58)) | (1L << (CATCH - 58)) | (1L << (FINALLY - 58)) | (1L << (OUT - 58)) | (1L << (GETTER - 58)) | (1L << (SETTER - 58)) | (1L << (DYNAMIC - 58)) | (1L << (PUBLIC - 58)) | (1L << (PRIVATE - 58)) | (1L << (PROTECTED - 58)) | (1L << (INTERNAL - 58)) | (1L << (ENUM - 58)) | (1L << (SEALED - 58)) | (1L << (ANNOTATION - 58)) | (1L << (DATA - 58)) | (1L << (INNER - 58)) | (1L << (TAILREC - 58)) | (1L << (OPERATOR - 58)) | (1L << (INLINE - 58)) | (1L << (INFIX - 58)) | (1L << (EXTERNAL - 58)) | (1L << (SUSPEND - 58)) | (1L << (OVERRIDE - 58)) | (1L << (ABSTRACT - 58)) | (1L << (FINAL - 58)))) != 0) || ((((_la - 122)) & ~0x3f) == 0 && ((1L << (_la - 122)) & ((1L << (OPEN - 122)) | (1L << (CONST - 122)) | (1L << (LATEINIT - 122)) | (1L << (VARARG - 122)) | (1L << (NOINLINE - 122)) | (1L << (CROSSINLINE - 122)) | (1L << (REIFIED - 122)) | (1L << (Identifier - 122)))) != 0)) { + { + { + setState(1845); + unescapedAnnotation(); + } + } + setState(1850); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1852); + _la = _input.LA(1); + if (_la==LabelDefinition) { + { + setState(1851); + match(LabelDefinition); + } + } + + setState(1857); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1854); + match(NL); + } + } + setState(1859); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1860); + functionLiteral(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayAccessContext extends ParserRuleContext { + public TerminalNode LSQUARE() { return getToken(KotlinParser.LSQUARE, 0); } + public TerminalNode RSQUARE() { return getToken(KotlinParser.RSQUARE, 0); } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public List COMMA() { return getTokens(KotlinParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(KotlinParser.COMMA, i); + } + public ArrayAccessContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayAccess; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterArrayAccess(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitArrayAccess(this); + } + } + + public final ArrayAccessContext arrayAccess() throws RecognitionException { + ArrayAccessContext _localctx = new ArrayAccessContext(_ctx, getState()); + enterRule(_localctx, 154, RULE_arrayAccess); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1862); + match(LSQUARE); + setState(1871); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NL) | (1L << LPAREN) | (1L << LSQUARE) | (1L << LCURL) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << EXCL) | (1L << COLONCOLON) | (1L << Q_COLONCOLON) | (1L << AT) | (1L << RETURN_AT) | (1L << CONTINUE_AT) | (1L << BREAK_AT) | (1L << FILE) | (1L << IMPORT) | (1L << OBJECT) | (1L << VAL))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (CONSTRUCTOR - 66)) | (1L << (BY - 66)) | (1L << (COMPANION - 66)) | (1L << (INIT - 66)) | (1L << (THIS - 66)) | (1L << (SUPER - 66)) | (1L << (WHERE - 66)) | (1L << (IF - 66)) | (1L << (WHEN - 66)) | (1L << (TRY - 66)) | (1L << (CATCH - 66)) | (1L << (FINALLY - 66)) | (1L << (FOR - 66)) | (1L << (DO - 66)) | (1L << (WHILE - 66)) | (1L << (THROW - 66)) | (1L << (RETURN - 66)) | (1L << (CONTINUE - 66)) | (1L << (BREAK - 66)) | (1L << (OUT - 66)) | (1L << (FIELD - 66)) | (1L << (PROPERTY - 66)) | (1L << (GET - 66)) | (1L << (SET - 66)) | (1L << (GETTER - 66)) | (1L << (SETTER - 66)) | (1L << (RECEIVER - 66)) | (1L << (PARAM - 66)) | (1L << (SETPARAM - 66)) | (1L << (DELEGATE - 66)) | (1L << (DYNAMIC - 66)) | (1L << (PUBLIC - 66)) | (1L << (PRIVATE - 66)) | (1L << (PROTECTED - 66)) | (1L << (INTERNAL - 66)) | (1L << (ENUM - 66)) | (1L << (SEALED - 66)) | (1L << (ANNOTATION - 66)) | (1L << (DATA - 66)) | (1L << (INNER - 66)) | (1L << (TAILREC - 66)) | (1L << (OPERATOR - 66)) | (1L << (INLINE - 66)) | (1L << (INFIX - 66)) | (1L << (EXTERNAL - 66)) | (1L << (SUSPEND - 66)) | (1L << (OVERRIDE - 66)) | (1L << (ABSTRACT - 66)) | (1L << (FINAL - 66)) | (1L << (OPEN - 66)) | (1L << (CONST - 66)) | (1L << (LATEINIT - 66)) | (1L << (VARARG - 66)) | (1L << (NOINLINE - 66)) | (1L << (CROSSINLINE - 66)) | (1L << (REIFIED - 66)) | (1L << (QUOTE_OPEN - 66)))) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & ((1L << (TRIPLE_QUOTE_OPEN - 130)) | (1L << (RealLiteral - 130)) | (1L << (LongLiteral - 130)) | (1L << (IntegerLiteral - 130)) | (1L << (HexLiteral - 130)) | (1L << (BinLiteral - 130)) | (1L << (BooleanLiteral - 130)) | (1L << (NullLiteral - 130)) | (1L << (Identifier - 130)) | (1L << (LabelReference - 130)) | (1L << (LabelDefinition - 130)) | (1L << (CharacterLiteral - 130)))) != 0)) { + { + setState(1863); + expression(); + setState(1868); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(1864); + match(COMMA); + setState(1865); + expression(); + } + } + setState(1870); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + + setState(1873); + match(RSQUARE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ValueArgumentsContext extends ParserRuleContext { + public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); } + public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); } + public List valueArgument() { + return getRuleContexts(ValueArgumentContext.class); + } + public ValueArgumentContext valueArgument(int i) { + return getRuleContext(ValueArgumentContext.class,i); + } + public List COMMA() { return getTokens(KotlinParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(KotlinParser.COMMA, i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public ValueArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_valueArguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterValueArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitValueArguments(this); + } + } + + public final ValueArgumentsContext valueArguments() throws RecognitionException { + ValueArgumentsContext _localctx = new ValueArgumentsContext(_ctx, getState()); + enterRule(_localctx, 156, RULE_valueArguments); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1875); + match(LPAREN); + setState(1893); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NL) | (1L << LPAREN) | (1L << LSQUARE) | (1L << LCURL) | (1L << MULT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << EXCL) | (1L << COLONCOLON) | (1L << Q_COLONCOLON) | (1L << AT) | (1L << RETURN_AT) | (1L << CONTINUE_AT) | (1L << BREAK_AT) | (1L << FILE) | (1L << IMPORT) | (1L << OBJECT) | (1L << VAL))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (CONSTRUCTOR - 66)) | (1L << (BY - 66)) | (1L << (COMPANION - 66)) | (1L << (INIT - 66)) | (1L << (THIS - 66)) | (1L << (SUPER - 66)) | (1L << (WHERE - 66)) | (1L << (IF - 66)) | (1L << (WHEN - 66)) | (1L << (TRY - 66)) | (1L << (CATCH - 66)) | (1L << (FINALLY - 66)) | (1L << (FOR - 66)) | (1L << (DO - 66)) | (1L << (WHILE - 66)) | (1L << (THROW - 66)) | (1L << (RETURN - 66)) | (1L << (CONTINUE - 66)) | (1L << (BREAK - 66)) | (1L << (OUT - 66)) | (1L << (FIELD - 66)) | (1L << (PROPERTY - 66)) | (1L << (GET - 66)) | (1L << (SET - 66)) | (1L << (GETTER - 66)) | (1L << (SETTER - 66)) | (1L << (RECEIVER - 66)) | (1L << (PARAM - 66)) | (1L << (SETPARAM - 66)) | (1L << (DELEGATE - 66)) | (1L << (DYNAMIC - 66)) | (1L << (PUBLIC - 66)) | (1L << (PRIVATE - 66)) | (1L << (PROTECTED - 66)) | (1L << (INTERNAL - 66)) | (1L << (ENUM - 66)) | (1L << (SEALED - 66)) | (1L << (ANNOTATION - 66)) | (1L << (DATA - 66)) | (1L << (INNER - 66)) | (1L << (TAILREC - 66)) | (1L << (OPERATOR - 66)) | (1L << (INLINE - 66)) | (1L << (INFIX - 66)) | (1L << (EXTERNAL - 66)) | (1L << (SUSPEND - 66)) | (1L << (OVERRIDE - 66)) | (1L << (ABSTRACT - 66)) | (1L << (FINAL - 66)) | (1L << (OPEN - 66)) | (1L << (CONST - 66)) | (1L << (LATEINIT - 66)) | (1L << (VARARG - 66)) | (1L << (NOINLINE - 66)) | (1L << (CROSSINLINE - 66)) | (1L << (REIFIED - 66)) | (1L << (QUOTE_OPEN - 66)))) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & ((1L << (TRIPLE_QUOTE_OPEN - 130)) | (1L << (RealLiteral - 130)) | (1L << (LongLiteral - 130)) | (1L << (IntegerLiteral - 130)) | (1L << (HexLiteral - 130)) | (1L << (BinLiteral - 130)) | (1L << (BooleanLiteral - 130)) | (1L << (NullLiteral - 130)) | (1L << (Identifier - 130)) | (1L << (LabelReference - 130)) | (1L << (LabelDefinition - 130)) | (1L << (CharacterLiteral - 130)))) != 0)) { + { + setState(1876); + valueArgument(); + setState(1881); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,281,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1877); + match(COMMA); + setState(1878); + valueArgument(); + } + } + } + setState(1883); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,281,_ctx); + } + setState(1891); + _la = _input.LA(1); + if (_la==NL || _la==COMMA) { + { + setState(1887); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1884); + match(NL); + } + } + setState(1889); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1890); + match(COMMA); + } + } + + } + } + + setState(1895); + match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentsContext extends ParserRuleContext { + public TerminalNode LANGLE() { return getToken(KotlinParser.LANGLE, 0); } + public List typeProjection() { + return getRuleContexts(TypeProjectionContext.class); + } + public TypeProjectionContext typeProjection(int i) { + return getRuleContext(TypeProjectionContext.class,i); + } + public TerminalNode RANGLE() { return getToken(KotlinParser.RANGLE, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public List COMMA() { return getTokens(KotlinParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(KotlinParser.COMMA, i); + } + public TerminalNode QUEST() { return getToken(KotlinParser.QUEST, 0); } + public TypeArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterTypeArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitTypeArguments(this); + } + } + + public final TypeArgumentsContext typeArguments() throws RecognitionException { + TypeArgumentsContext _localctx = new TypeArgumentsContext(_ctx, getState()); + enterRule(_localctx, 158, RULE_typeArguments); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1897); + match(LANGLE); + setState(1901); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1898); + match(NL); + } + } + setState(1903); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1904); + typeProjection(); + setState(1915); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,287,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1908); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1905); + match(NL); + } + } + setState(1910); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1911); + match(COMMA); + setState(1912); + typeProjection(); + } + } + } + setState(1917); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,287,_ctx); + } + setState(1925); + switch ( getInterpreter().adaptivePredict(_input,289,_ctx) ) { + case 1: + { + setState(1921); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1918); + match(NL); + } + } + setState(1923); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1924); + match(COMMA); + } + break; + } + setState(1930); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1927); + match(NL); + } + } + setState(1932); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1933); + match(RANGLE); + setState(1935); + switch ( getInterpreter().adaptivePredict(_input,291,_ctx) ) { + case 1: + { + setState(1934); + match(QUEST); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeProjectionContext extends ParserRuleContext { + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public TypeProjectionModifierListContext typeProjectionModifierList() { + return getRuleContext(TypeProjectionModifierListContext.class,0); + } + public TerminalNode MULT() { return getToken(KotlinParser.MULT, 0); } + public TypeProjectionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeProjection; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterTypeProjection(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitTypeProjection(this); + } + } + + public final TypeProjectionContext typeProjection() throws RecognitionException { + TypeProjectionContext _localctx = new TypeProjectionContext(_ctx, getState()); + enterRule(_localctx, 160, RULE_typeProjection); + try { + setState(1942); + switch (_input.LA(1)) { + case LPAREN: + case AT: + case FILE: + case IMPORT: + case CONSTRUCTOR: + case BY: + case COMPANION: + case INIT: + case WHERE: + case CATCH: + case FINALLY: + case IN: + case OUT: + case FIELD: + case PROPERTY: + case GET: + case SET: + case GETTER: + case SETTER: + case RECEIVER: + case PARAM: + case SETPARAM: + case DELEGATE: + case DYNAMIC: + case PUBLIC: + case PRIVATE: + case PROTECTED: + case INTERNAL: + case ENUM: + case SEALED: + case ANNOTATION: + case DATA: + case INNER: + case TAILREC: + case OPERATOR: + case INLINE: + case INFIX: + case EXTERNAL: + case SUSPEND: + case OVERRIDE: + case ABSTRACT: + case FINAL: + case OPEN: + case CONST: + case LATEINIT: + case VARARG: + case NOINLINE: + case CROSSINLINE: + case REIFIED: + case Identifier: + case LabelReference: + enterOuterAlt(_localctx, 1); + { + setState(1938); + switch ( getInterpreter().adaptivePredict(_input,292,_ctx) ) { + case 1: + { + setState(1937); + typeProjectionModifierList(); + } + break; + } + setState(1940); + type(); + } + break; + case MULT: + enterOuterAlt(_localctx, 2); + { + setState(1941); + match(MULT); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeProjectionModifierListContext extends ParserRuleContext { + public List varianceAnnotation() { + return getRuleContexts(VarianceAnnotationContext.class); + } + public VarianceAnnotationContext varianceAnnotation(int i) { + return getRuleContext(VarianceAnnotationContext.class,i); + } + public TypeProjectionModifierListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeProjectionModifierList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterTypeProjectionModifierList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitTypeProjectionModifierList(this); + } + } + + public final TypeProjectionModifierListContext typeProjectionModifierList() throws RecognitionException { + TypeProjectionModifierListContext _localctx = new TypeProjectionModifierListContext(_ctx, getState()); + enterRule(_localctx, 162, RULE_typeProjectionModifierList); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1945); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(1944); + varianceAnnotation(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(1947); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,294,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ValueArgumentContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public SimpleIdentifierContext simpleIdentifier() { + return getRuleContext(SimpleIdentifierContext.class,0); + } + public TerminalNode ASSIGNMENT() { return getToken(KotlinParser.ASSIGNMENT, 0); } + public TerminalNode MULT() { return getToken(KotlinParser.MULT, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public ValueArgumentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_valueArgument; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterValueArgument(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitValueArgument(this); + } + } + + public final ValueArgumentContext valueArgument() throws RecognitionException { + ValueArgumentContext _localctx = new ValueArgumentContext(_ctx, getState()); + enterRule(_localctx, 164, RULE_valueArgument); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1963); + switch ( getInterpreter().adaptivePredict(_input,297,_ctx) ) { + case 1: + { + setState(1949); + simpleIdentifier(); + setState(1953); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(1950); + match(NL); + } + } + setState(1955); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1956); + match(ASSIGNMENT); + setState(1960); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,296,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1957); + match(NL); + } + } + } + setState(1962); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,296,_ctx); + } + } + break; + } + setState(1966); + _la = _input.LA(1); + if (_la==MULT) { + { + setState(1965); + match(MULT); + } + } + + setState(1971); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,299,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1968); + match(NL); + } + } + } + setState(1973); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,299,_ctx); + } + setState(1974); + expression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LiteralConstantContext extends ParserRuleContext { + public TerminalNode BooleanLiteral() { return getToken(KotlinParser.BooleanLiteral, 0); } + public TerminalNode IntegerLiteral() { return getToken(KotlinParser.IntegerLiteral, 0); } + public StringLiteralContext stringLiteral() { + return getRuleContext(StringLiteralContext.class,0); + } + public TerminalNode HexLiteral() { return getToken(KotlinParser.HexLiteral, 0); } + public TerminalNode BinLiteral() { return getToken(KotlinParser.BinLiteral, 0); } + public TerminalNode CharacterLiteral() { return getToken(KotlinParser.CharacterLiteral, 0); } + public TerminalNode RealLiteral() { return getToken(KotlinParser.RealLiteral, 0); } + public TerminalNode NullLiteral() { return getToken(KotlinParser.NullLiteral, 0); } + public TerminalNode LongLiteral() { return getToken(KotlinParser.LongLiteral, 0); } + public LiteralConstantContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_literalConstant; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterLiteralConstant(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitLiteralConstant(this); + } + } + + public final LiteralConstantContext literalConstant() throws RecognitionException { + LiteralConstantContext _localctx = new LiteralConstantContext(_ctx, getState()); + enterRule(_localctx, 166, RULE_literalConstant); + try { + setState(1985); + switch (_input.LA(1)) { + case BooleanLiteral: + enterOuterAlt(_localctx, 1); + { + setState(1976); + match(BooleanLiteral); + } + break; + case IntegerLiteral: + enterOuterAlt(_localctx, 2); + { + setState(1977); + match(IntegerLiteral); + } + break; + case QUOTE_OPEN: + case TRIPLE_QUOTE_OPEN: + enterOuterAlt(_localctx, 3); + { + setState(1978); + stringLiteral(); + } + break; + case HexLiteral: + enterOuterAlt(_localctx, 4); + { + setState(1979); + match(HexLiteral); + } + break; + case BinLiteral: + enterOuterAlt(_localctx, 5); + { + setState(1980); + match(BinLiteral); + } + break; + case CharacterLiteral: + enterOuterAlt(_localctx, 6); + { + setState(1981); + match(CharacterLiteral); + } + break; + case RealLiteral: + enterOuterAlt(_localctx, 7); + { + setState(1982); + match(RealLiteral); + } + break; + case NullLiteral: + enterOuterAlt(_localctx, 8); + { + setState(1983); + match(NullLiteral); + } + break; + case LongLiteral: + enterOuterAlt(_localctx, 9); + { + setState(1984); + match(LongLiteral); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StringLiteralContext extends ParserRuleContext { + public LineStringLiteralContext lineStringLiteral() { + return getRuleContext(LineStringLiteralContext.class,0); + } + public MultiLineStringLiteralContext multiLineStringLiteral() { + return getRuleContext(MultiLineStringLiteralContext.class,0); + } + public StringLiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_stringLiteral; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterStringLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitStringLiteral(this); + } + } + + public final StringLiteralContext stringLiteral() throws RecognitionException { + StringLiteralContext _localctx = new StringLiteralContext(_ctx, getState()); + enterRule(_localctx, 168, RULE_stringLiteral); + try { + setState(1989); + switch (_input.LA(1)) { + case QUOTE_OPEN: + enterOuterAlt(_localctx, 1); + { + setState(1987); + lineStringLiteral(); + } + break; + case TRIPLE_QUOTE_OPEN: + enterOuterAlt(_localctx, 2); + { + setState(1988); + multiLineStringLiteral(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LineStringLiteralContext extends ParserRuleContext { + public TerminalNode QUOTE_OPEN() { return getToken(KotlinParser.QUOTE_OPEN, 0); } + public TerminalNode QUOTE_CLOSE() { return getToken(KotlinParser.QUOTE_CLOSE, 0); } + public List lineStringContent() { + return getRuleContexts(LineStringContentContext.class); + } + public LineStringContentContext lineStringContent(int i) { + return getRuleContext(LineStringContentContext.class,i); + } + public List lineStringExpression() { + return getRuleContexts(LineStringExpressionContext.class); + } + public LineStringExpressionContext lineStringExpression(int i) { + return getRuleContext(LineStringExpressionContext.class,i); + } + public LineStringLiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lineStringLiteral; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterLineStringLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitLineStringLiteral(this); + } + } + + public final LineStringLiteralContext lineStringLiteral() throws RecognitionException { + LineStringLiteralContext _localctx = new LineStringLiteralContext(_ctx, getState()); + enterRule(_localctx, 170, RULE_lineStringLiteral); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1991); + match(QUOTE_OPEN); + setState(1996); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 156)) & ~0x3f) == 0 && ((1L << (_la - 156)) & ((1L << (LineStrRef - 156)) | (1L << (LineStrText - 156)) | (1L << (LineStrEscapedChar - 156)) | (1L << (LineStrExprStart - 156)))) != 0)) { + { + setState(1994); + switch (_input.LA(1)) { + case LineStrRef: + case LineStrText: + case LineStrEscapedChar: + { + setState(1992); + lineStringContent(); + } + break; + case LineStrExprStart: + { + setState(1993); + lineStringExpression(); + } + break; + default: + throw new NoViableAltException(this); + } + } + setState(1998); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1999); + match(QUOTE_CLOSE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MultiLineStringLiteralContext extends ParserRuleContext { + public TerminalNode TRIPLE_QUOTE_OPEN() { return getToken(KotlinParser.TRIPLE_QUOTE_OPEN, 0); } + public TerminalNode TRIPLE_QUOTE_CLOSE() { return getToken(KotlinParser.TRIPLE_QUOTE_CLOSE, 0); } + public List multiLineStringContent() { + return getRuleContexts(MultiLineStringContentContext.class); + } + public MultiLineStringContentContext multiLineStringContent(int i) { + return getRuleContext(MultiLineStringContentContext.class,i); + } + public List multiLineStringExpression() { + return getRuleContexts(MultiLineStringExpressionContext.class); + } + public MultiLineStringExpressionContext multiLineStringExpression(int i) { + return getRuleContext(MultiLineStringExpressionContext.class,i); + } + public List lineStringLiteral() { + return getRuleContexts(LineStringLiteralContext.class); + } + public LineStringLiteralContext lineStringLiteral(int i) { + return getRuleContext(LineStringLiteralContext.class,i); + } + public List MultiLineStringQuote() { return getTokens(KotlinParser.MultiLineStringQuote); } + public TerminalNode MultiLineStringQuote(int i) { + return getToken(KotlinParser.MultiLineStringQuote, i); + } + public MultiLineStringLiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_multiLineStringLiteral; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterMultiLineStringLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitMultiLineStringLiteral(this); + } + } + + public final MultiLineStringLiteralContext multiLineStringLiteral() throws RecognitionException { + MultiLineStringLiteralContext _localctx = new MultiLineStringLiteralContext(_ctx, getState()); + enterRule(_localctx, 172, RULE_multiLineStringLiteral); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2001); + match(TRIPLE_QUOTE_OPEN); + setState(2008); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 129)) & ~0x3f) == 0 && ((1L << (_la - 129)) & ((1L << (QUOTE_OPEN - 129)) | (1L << (MultiLineStringQuote - 129)) | (1L << (MultiLineStrRef - 129)) | (1L << (MultiLineStrText - 129)) | (1L << (MultiLineStrEscapedChar - 129)) | (1L << (MultiLineStrExprStart - 129)))) != 0)) { + { + setState(2006); + switch (_input.LA(1)) { + case MultiLineStrRef: + case MultiLineStrText: + case MultiLineStrEscapedChar: + { + setState(2002); + multiLineStringContent(); + } + break; + case MultiLineStrExprStart: + { + setState(2003); + multiLineStringExpression(); + } + break; + case QUOTE_OPEN: + { + setState(2004); + lineStringLiteral(); + } + break; + case MultiLineStringQuote: + { + setState(2005); + match(MultiLineStringQuote); + } + break; + default: + throw new NoViableAltException(this); + } + } + setState(2010); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2011); + match(TRIPLE_QUOTE_CLOSE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LineStringContentContext extends ParserRuleContext { + public TerminalNode LineStrText() { return getToken(KotlinParser.LineStrText, 0); } + public TerminalNode LineStrEscapedChar() { return getToken(KotlinParser.LineStrEscapedChar, 0); } + public TerminalNode LineStrRef() { return getToken(KotlinParser.LineStrRef, 0); } + public LineStringContentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lineStringContent; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterLineStringContent(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitLineStringContent(this); + } + } + + public final LineStringContentContext lineStringContent() throws RecognitionException { + LineStringContentContext _localctx = new LineStringContentContext(_ctx, getState()); + enterRule(_localctx, 174, RULE_lineStringContent); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2013); + _la = _input.LA(1); + if ( !(((((_la - 156)) & ~0x3f) == 0 && ((1L << (_la - 156)) & ((1L << (LineStrRef - 156)) | (1L << (LineStrText - 156)) | (1L << (LineStrEscapedChar - 156)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LineStringExpressionContext extends ParserRuleContext { + public TerminalNode LineStrExprStart() { return getToken(KotlinParser.LineStrExprStart, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode RCURL() { return getToken(KotlinParser.RCURL, 0); } + public LineStringExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lineStringExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterLineStringExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitLineStringExpression(this); + } + } + + public final LineStringExpressionContext lineStringExpression() throws RecognitionException { + LineStringExpressionContext _localctx = new LineStringExpressionContext(_ctx, getState()); + enterRule(_localctx, 176, RULE_lineStringExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(2015); + match(LineStrExprStart); + setState(2016); + expression(); + setState(2017); + match(RCURL); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MultiLineStringContentContext extends ParserRuleContext { + public TerminalNode MultiLineStrText() { return getToken(KotlinParser.MultiLineStrText, 0); } + public TerminalNode MultiLineStrEscapedChar() { return getToken(KotlinParser.MultiLineStrEscapedChar, 0); } + public TerminalNode MultiLineStrRef() { return getToken(KotlinParser.MultiLineStrRef, 0); } + public MultiLineStringContentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_multiLineStringContent; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterMultiLineStringContent(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitMultiLineStringContent(this); + } + } + + public final MultiLineStringContentContext multiLineStringContent() throws RecognitionException { + MultiLineStringContentContext _localctx = new MultiLineStringContentContext(_ctx, getState()); + enterRule(_localctx, 178, RULE_multiLineStringContent); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2019); + _la = _input.LA(1); + if ( !(((((_la - 162)) & ~0x3f) == 0 && ((1L << (_la - 162)) & ((1L << (MultiLineStrRef - 162)) | (1L << (MultiLineStrText - 162)) | (1L << (MultiLineStrEscapedChar - 162)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MultiLineStringExpressionContext extends ParserRuleContext { + public TerminalNode MultiLineStrExprStart() { return getToken(KotlinParser.MultiLineStrExprStart, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode RCURL() { return getToken(KotlinParser.RCURL, 0); } + public MultiLineStringExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_multiLineStringExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterMultiLineStringExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitMultiLineStringExpression(this); + } + } + + public final MultiLineStringExpressionContext multiLineStringExpression() throws RecognitionException { + MultiLineStringExpressionContext _localctx = new MultiLineStringExpressionContext(_ctx, getState()); + enterRule(_localctx, 180, RULE_multiLineStringExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(2021); + match(MultiLineStrExprStart); + setState(2022); + expression(); + setState(2023); + match(RCURL); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionLiteralContext extends ParserRuleContext { + public TerminalNode LCURL() { return getToken(KotlinParser.LCURL, 0); } + public StatementsContext statements() { + return getRuleContext(StatementsContext.class,0); + } + public TerminalNode RCURL() { return getToken(KotlinParser.RCURL, 0); } + public LambdaParametersContext lambdaParameters() { + return getRuleContext(LambdaParametersContext.class,0); + } + public TerminalNode ARROW() { return getToken(KotlinParser.ARROW, 0); } + public List annotations() { + return getRuleContexts(AnnotationsContext.class); + } + public AnnotationsContext annotations(int i) { + return getRuleContext(AnnotationsContext.class,i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public FunctionLiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionLiteral; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterFunctionLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitFunctionLiteral(this); + } + } + + public final FunctionLiteralContext functionLiteral() throws RecognitionException { + FunctionLiteralContext _localctx = new FunctionLiteralContext(_ctx, getState()); + enterRule(_localctx, 182, RULE_functionLiteral); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(2028); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==AT || _la==FILE || ((((_la - 93)) & ~0x3f) == 0 && ((1L << (_la - 93)) & ((1L << (FIELD - 93)) | (1L << (PROPERTY - 93)) | (1L << (GET - 93)) | (1L << (SET - 93)) | (1L << (RECEIVER - 93)) | (1L << (PARAM - 93)) | (1L << (SETPARAM - 93)) | (1L << (DELEGATE - 93)) | (1L << (LabelReference - 93)))) != 0)) { + { + { + setState(2025); + annotations(); + } + } + setState(2030); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2077); + switch ( getInterpreter().adaptivePredict(_input,313,_ctx) ) { + case 1: + { + setState(2031); + match(LCURL); + setState(2035); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,307,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2032); + match(NL); + } + } + } + setState(2037); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,307,_ctx); + } + setState(2038); + statements(); + setState(2042); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2039); + match(NL); + } + } + setState(2044); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2045); + match(RCURL); + } + break; + case 2: + { + setState(2047); + match(LCURL); + setState(2051); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,309,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2048); + match(NL); + } + } + } + setState(2053); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,309,_ctx); + } + setState(2054); + lambdaParameters(); + setState(2058); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2055); + match(NL); + } + } + setState(2060); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2061); + match(ARROW); + setState(2065); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,311,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2062); + match(NL); + } + } + } + setState(2067); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,311,_ctx); + } + setState(2068); + statements(); + setState(2072); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2069); + match(NL); + } + } + setState(2074); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2075); + match(RCURL); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LambdaParametersContext extends ParserRuleContext { + public List lambdaParameter() { + return getRuleContexts(LambdaParameterContext.class); + } + public LambdaParameterContext lambdaParameter(int i) { + return getRuleContext(LambdaParameterContext.class,i); + } + public List COMMA() { return getTokens(KotlinParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(KotlinParser.COMMA, i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public LambdaParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lambdaParameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterLambdaParameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitLambdaParameters(this); + } + } + + public final LambdaParametersContext lambdaParameters() throws RecognitionException { + LambdaParametersContext _localctx = new LambdaParametersContext(_ctx, getState()); + enterRule(_localctx, 184, RULE_lambdaParameters); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(2080); + _la = _input.LA(1); + if (_la==LPAREN || _la==IMPORT || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (CONSTRUCTOR - 66)) | (1L << (BY - 66)) | (1L << (COMPANION - 66)) | (1L << (INIT - 66)) | (1L << (WHERE - 66)) | (1L << (CATCH - 66)) | (1L << (FINALLY - 66)) | (1L << (OUT - 66)) | (1L << (GETTER - 66)) | (1L << (SETTER - 66)) | (1L << (DYNAMIC - 66)) | (1L << (PUBLIC - 66)) | (1L << (PRIVATE - 66)) | (1L << (PROTECTED - 66)) | (1L << (INTERNAL - 66)) | (1L << (ENUM - 66)) | (1L << (SEALED - 66)) | (1L << (ANNOTATION - 66)) | (1L << (DATA - 66)) | (1L << (INNER - 66)) | (1L << (TAILREC - 66)) | (1L << (OPERATOR - 66)) | (1L << (INLINE - 66)) | (1L << (INFIX - 66)) | (1L << (EXTERNAL - 66)) | (1L << (SUSPEND - 66)) | (1L << (OVERRIDE - 66)) | (1L << (ABSTRACT - 66)) | (1L << (FINAL - 66)) | (1L << (OPEN - 66)) | (1L << (CONST - 66)) | (1L << (LATEINIT - 66)) | (1L << (VARARG - 66)) | (1L << (NOINLINE - 66)) | (1L << (CROSSINLINE - 66)) | (1L << (REIFIED - 66)))) != 0) || _la==Identifier) { + { + setState(2079); + lambdaParameter(); + } + } + + setState(2098); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,317,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2085); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2082); + match(NL); + } + } + setState(2087); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2088); + match(COMMA); + setState(2092); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2089); + match(NL); + } + } + setState(2094); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2095); + lambdaParameter(); + } + } + } + setState(2100); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,317,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LambdaParameterContext extends ParserRuleContext { + public VariableDeclarationContext variableDeclaration() { + return getRuleContext(VariableDeclarationContext.class,0); + } + public MultiVariableDeclarationContext multiVariableDeclaration() { + return getRuleContext(MultiVariableDeclarationContext.class,0); + } + public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public LambdaParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lambdaParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterLambdaParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitLambdaParameter(this); + } + } + + public final LambdaParameterContext lambdaParameter() throws RecognitionException { + LambdaParameterContext _localctx = new LambdaParameterContext(_ctx, getState()); + enterRule(_localctx, 186, RULE_lambdaParameter); + int _la; + try { + setState(2119); + switch (_input.LA(1)) { + case IMPORT: + case CONSTRUCTOR: + case BY: + case COMPANION: + case INIT: + case WHERE: + case CATCH: + case FINALLY: + case OUT: + case GETTER: + case SETTER: + case DYNAMIC: + case PUBLIC: + case PRIVATE: + case PROTECTED: + case INTERNAL: + case ENUM: + case SEALED: + case ANNOTATION: + case DATA: + case INNER: + case TAILREC: + case OPERATOR: + case INLINE: + case INFIX: + case EXTERNAL: + case SUSPEND: + case OVERRIDE: + case ABSTRACT: + case FINAL: + case OPEN: + case CONST: + case LATEINIT: + case VARARG: + case NOINLINE: + case CROSSINLINE: + case REIFIED: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(2101); + variableDeclaration(); + } + break; + case LPAREN: + enterOuterAlt(_localctx, 2); + { + setState(2102); + multiVariableDeclaration(); + setState(2117); + switch ( getInterpreter().adaptivePredict(_input,320,_ctx) ) { + case 1: + { + setState(2106); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2103); + match(NL); + } + } + setState(2108); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2109); + match(COLON); + setState(2113); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2110); + match(NL); + } + } + setState(2115); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2116); + type(); + } + break; + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ObjectLiteralContext extends ParserRuleContext { + public TerminalNode OBJECT() { return getToken(KotlinParser.OBJECT, 0); } + public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); } + public DelegationSpecifiersContext delegationSpecifiers() { + return getRuleContext(DelegationSpecifiersContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public ObjectLiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_objectLiteral; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterObjectLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitObjectLiteral(this); + } + } + + public final ObjectLiteralContext objectLiteral() throws RecognitionException { + ObjectLiteralContext _localctx = new ObjectLiteralContext(_ctx, getState()); + enterRule(_localctx, 188, RULE_objectLiteral); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(2121); + match(OBJECT); + setState(2136); + switch ( getInterpreter().adaptivePredict(_input,324,_ctx) ) { + case 1: + { + setState(2125); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2122); + match(NL); + } + } + setState(2127); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2128); + match(COLON); + setState(2132); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2129); + match(NL); + } + } + setState(2134); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2135); + delegationSpecifiers(); + } + break; + } + setState(2141); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,325,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2138); + match(NL); + } + } + } + setState(2143); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,325,_ctx); + } + setState(2145); + switch ( getInterpreter().adaptivePredict(_input,326,_ctx) ) { + case 1: + { + setState(2144); + classBody(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CollectionLiteralContext extends ParserRuleContext { + public TerminalNode LSQUARE() { return getToken(KotlinParser.LSQUARE, 0); } + public TerminalNode RSQUARE() { return getToken(KotlinParser.RSQUARE, 0); } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public List COMMA() { return getTokens(KotlinParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(KotlinParser.COMMA, i); + } + public CollectionLiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_collectionLiteral; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterCollectionLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitCollectionLiteral(this); + } + } + + public final CollectionLiteralContext collectionLiteral() throws RecognitionException { + CollectionLiteralContext _localctx = new CollectionLiteralContext(_ctx, getState()); + enterRule(_localctx, 190, RULE_collectionLiteral); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2147); + match(LSQUARE); + setState(2149); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NL) | (1L << LPAREN) | (1L << LSQUARE) | (1L << LCURL) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << EXCL) | (1L << COLONCOLON) | (1L << Q_COLONCOLON) | (1L << AT) | (1L << RETURN_AT) | (1L << CONTINUE_AT) | (1L << BREAK_AT) | (1L << FILE) | (1L << IMPORT) | (1L << OBJECT) | (1L << VAL))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (CONSTRUCTOR - 66)) | (1L << (BY - 66)) | (1L << (COMPANION - 66)) | (1L << (INIT - 66)) | (1L << (THIS - 66)) | (1L << (SUPER - 66)) | (1L << (WHERE - 66)) | (1L << (IF - 66)) | (1L << (WHEN - 66)) | (1L << (TRY - 66)) | (1L << (CATCH - 66)) | (1L << (FINALLY - 66)) | (1L << (FOR - 66)) | (1L << (DO - 66)) | (1L << (WHILE - 66)) | (1L << (THROW - 66)) | (1L << (RETURN - 66)) | (1L << (CONTINUE - 66)) | (1L << (BREAK - 66)) | (1L << (OUT - 66)) | (1L << (FIELD - 66)) | (1L << (PROPERTY - 66)) | (1L << (GET - 66)) | (1L << (SET - 66)) | (1L << (GETTER - 66)) | (1L << (SETTER - 66)) | (1L << (RECEIVER - 66)) | (1L << (PARAM - 66)) | (1L << (SETPARAM - 66)) | (1L << (DELEGATE - 66)) | (1L << (DYNAMIC - 66)) | (1L << (PUBLIC - 66)) | (1L << (PRIVATE - 66)) | (1L << (PROTECTED - 66)) | (1L << (INTERNAL - 66)) | (1L << (ENUM - 66)) | (1L << (SEALED - 66)) | (1L << (ANNOTATION - 66)) | (1L << (DATA - 66)) | (1L << (INNER - 66)) | (1L << (TAILREC - 66)) | (1L << (OPERATOR - 66)) | (1L << (INLINE - 66)) | (1L << (INFIX - 66)) | (1L << (EXTERNAL - 66)) | (1L << (SUSPEND - 66)) | (1L << (OVERRIDE - 66)) | (1L << (ABSTRACT - 66)) | (1L << (FINAL - 66)) | (1L << (OPEN - 66)) | (1L << (CONST - 66)) | (1L << (LATEINIT - 66)) | (1L << (VARARG - 66)) | (1L << (NOINLINE - 66)) | (1L << (CROSSINLINE - 66)) | (1L << (REIFIED - 66)) | (1L << (QUOTE_OPEN - 66)))) != 0) || ((((_la - 130)) & ~0x3f) == 0 && ((1L << (_la - 130)) & ((1L << (TRIPLE_QUOTE_OPEN - 130)) | (1L << (RealLiteral - 130)) | (1L << (LongLiteral - 130)) | (1L << (IntegerLiteral - 130)) | (1L << (HexLiteral - 130)) | (1L << (BinLiteral - 130)) | (1L << (BooleanLiteral - 130)) | (1L << (NullLiteral - 130)) | (1L << (Identifier - 130)) | (1L << (LabelReference - 130)) | (1L << (LabelDefinition - 130)) | (1L << (CharacterLiteral - 130)))) != 0)) { + { + setState(2148); + expression(); + } + } + + setState(2155); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(2151); + match(COMMA); + setState(2152); + expression(); + } + } + setState(2157); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2158); + match(RSQUARE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ThisExpressionContext extends ParserRuleContext { + public TerminalNode THIS() { return getToken(KotlinParser.THIS, 0); } + public TerminalNode LabelReference() { return getToken(KotlinParser.LabelReference, 0); } + public ThisExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_thisExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterThisExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitThisExpression(this); + } + } + + public final ThisExpressionContext thisExpression() throws RecognitionException { + ThisExpressionContext _localctx = new ThisExpressionContext(_ctx, getState()); + enterRule(_localctx, 192, RULE_thisExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(2160); + match(THIS); + setState(2162); + switch ( getInterpreter().adaptivePredict(_input,329,_ctx) ) { + case 1: + { + setState(2161); + match(LabelReference); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SuperExpressionContext extends ParserRuleContext { + public TerminalNode SUPER() { return getToken(KotlinParser.SUPER, 0); } + public TerminalNode LANGLE() { return getToken(KotlinParser.LANGLE, 0); } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public TerminalNode RANGLE() { return getToken(KotlinParser.RANGLE, 0); } + public TerminalNode LabelReference() { return getToken(KotlinParser.LabelReference, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public SuperExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_superExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterSuperExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitSuperExpression(this); + } + } + + public final SuperExpressionContext superExpression() throws RecognitionException { + SuperExpressionContext _localctx = new SuperExpressionContext(_ctx, getState()); + enterRule(_localctx, 194, RULE_superExpression); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2164); + match(SUPER); + setState(2181); + switch ( getInterpreter().adaptivePredict(_input,332,_ctx) ) { + case 1: + { + setState(2165); + match(LANGLE); + setState(2169); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2166); + match(NL); + } + } + setState(2171); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2172); + type(); + setState(2176); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2173); + match(NL); + } + } + setState(2178); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2179); + match(RANGLE); + } + break; + } + setState(2184); + switch ( getInterpreter().adaptivePredict(_input,333,_ctx) ) { + case 1: + { + setState(2183); + match(LabelReference); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConditionalExpressionContext extends ParserRuleContext { + public IfExpressionContext ifExpression() { + return getRuleContext(IfExpressionContext.class,0); + } + public WhenExpressionContext whenExpression() { + return getRuleContext(WhenExpressionContext.class,0); + } + public ConditionalExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_conditionalExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterConditionalExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitConditionalExpression(this); + } + } + + public final ConditionalExpressionContext conditionalExpression() throws RecognitionException { + ConditionalExpressionContext _localctx = new ConditionalExpressionContext(_ctx, getState()); + enterRule(_localctx, 196, RULE_conditionalExpression); + try { + setState(2188); + switch (_input.LA(1)) { + case IF: + enterOuterAlt(_localctx, 1); + { + setState(2186); + ifExpression(); + } + break; + case WHEN: + enterOuterAlt(_localctx, 2); + { + setState(2187); + whenExpression(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IfExpressionContext extends ParserRuleContext { + public TerminalNode IF() { return getToken(KotlinParser.IF, 0); } + public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public List controlStructureBody() { + return getRuleContexts(ControlStructureBodyContext.class); + } + public ControlStructureBodyContext controlStructureBody(int i) { + return getRuleContext(ControlStructureBodyContext.class,i); + } + public TerminalNode SEMICOLON() { return getToken(KotlinParser.SEMICOLON, 0); } + public TerminalNode ELSE() { return getToken(KotlinParser.ELSE, 0); } + public IfExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_ifExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterIfExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitIfExpression(this); + } + } + + public final IfExpressionContext ifExpression() throws RecognitionException { + IfExpressionContext _localctx = new IfExpressionContext(_ctx, getState()); + enterRule(_localctx, 198, RULE_ifExpression); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(2190); + match(IF); + setState(2194); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2191); + match(NL); + } + } + setState(2196); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2197); + match(LPAREN); + setState(2198); + expression(); + setState(2199); + match(RPAREN); + setState(2203); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,336,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2200); + match(NL); + } + } + } + setState(2205); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,336,_ctx); + } + setState(2207); + switch ( getInterpreter().adaptivePredict(_input,337,_ctx) ) { + case 1: + { + setState(2206); + controlStructureBody(); + } + break; + } + setState(2210); + switch ( getInterpreter().adaptivePredict(_input,338,_ctx) ) { + case 1: + { + setState(2209); + match(SEMICOLON); + } + break; + } + setState(2228); + switch ( getInterpreter().adaptivePredict(_input,342,_ctx) ) { + case 1: + { + setState(2215); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2212); + match(NL); + } + } + setState(2217); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2218); + match(ELSE); + setState(2222); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,340,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2219); + match(NL); + } + } + } + setState(2224); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,340,_ctx); + } + setState(2226); + switch ( getInterpreter().adaptivePredict(_input,341,_ctx) ) { + case 1: + { + setState(2225); + controlStructureBody(); + } + break; + } + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ControlStructureBodyContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ControlStructureBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_controlStructureBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterControlStructureBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitControlStructureBody(this); + } + } + + public final ControlStructureBodyContext controlStructureBody() throws RecognitionException { + ControlStructureBodyContext _localctx = new ControlStructureBodyContext(_ctx, getState()); + enterRule(_localctx, 200, RULE_controlStructureBody); + try { + setState(2232); + switch ( getInterpreter().adaptivePredict(_input,343,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(2230); + block(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(2231); + expression(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class WhenExpressionContext extends ParserRuleContext { + public TerminalNode WHEN() { return getToken(KotlinParser.WHEN, 0); } + public TerminalNode LCURL() { return getToken(KotlinParser.LCURL, 0); } + public TerminalNode RCURL() { return getToken(KotlinParser.RCURL, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); } + public List whenEntry() { + return getRuleContexts(WhenEntryContext.class); + } + public WhenEntryContext whenEntry(int i) { + return getRuleContext(WhenEntryContext.class,i); + } + public WhenExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_whenExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterWhenExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitWhenExpression(this); + } + } + + public final WhenExpressionContext whenExpression() throws RecognitionException { + WhenExpressionContext _localctx = new WhenExpressionContext(_ctx, getState()); + enterRule(_localctx, 202, RULE_whenExpression); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(2234); + match(WHEN); + setState(2238); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,344,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2235); + match(NL); + } + } + } + setState(2240); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,344,_ctx); + } + setState(2245); + _la = _input.LA(1); + if (_la==LPAREN) { + { + setState(2241); + match(LPAREN); + setState(2242); + expression(); + setState(2243); + match(RPAREN); + } + } + + setState(2250); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2247); + match(NL); + } + } + setState(2252); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2253); + match(LCURL); + setState(2257); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,347,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2254); + match(NL); + } + } + } + setState(2259); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,347,_ctx); + } + setState(2269); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,349,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2260); + whenEntry(); + setState(2264); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,348,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2261); + match(NL); + } + } + } + setState(2266); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,348,_ctx); + } + } + } + } + setState(2271); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,349,_ctx); + } + setState(2275); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2272); + match(NL); + } + } + setState(2277); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2278); + match(RCURL); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class WhenEntryContext extends ParserRuleContext { + public List whenCondition() { + return getRuleContexts(WhenConditionContext.class); + } + public WhenConditionContext whenCondition(int i) { + return getRuleContext(WhenConditionContext.class,i); + } + public TerminalNode ARROW() { return getToken(KotlinParser.ARROW, 0); } + public ControlStructureBodyContext controlStructureBody() { + return getRuleContext(ControlStructureBodyContext.class,0); + } + public List COMMA() { return getTokens(KotlinParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(KotlinParser.COMMA, i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public SemiContext semi() { + return getRuleContext(SemiContext.class,0); + } + public TerminalNode ELSE() { return getToken(KotlinParser.ELSE, 0); } + public WhenEntryContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_whenEntry; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterWhenEntry(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitWhenEntry(this); + } + } + + public final WhenEntryContext whenEntry() throws RecognitionException { + WhenEntryContext _localctx = new WhenEntryContext(_ctx, getState()); + enterRule(_localctx, 204, RULE_whenEntry); + int _la; + try { + int _alt; + setState(2332); + switch (_input.LA(1)) { + case NL: + case LPAREN: + case LSQUARE: + case LCURL: + case ADD: + case SUB: + case INCR: + case DECR: + case EXCL: + case COLONCOLON: + case Q_COLONCOLON: + case AT: + case RETURN_AT: + case CONTINUE_AT: + case BREAK_AT: + case FILE: + case IMPORT: + case OBJECT: + case VAL: + case CONSTRUCTOR: + case BY: + case COMPANION: + case INIT: + case THIS: + case SUPER: + case WHERE: + case IF: + case WHEN: + case TRY: + case CATCH: + case FINALLY: + case FOR: + case DO: + case WHILE: + case THROW: + case RETURN: + case CONTINUE: + case BREAK: + case IS: + case IN: + case NOT_IS: + case NOT_IN: + case OUT: + case FIELD: + case PROPERTY: + case GET: + case SET: + case GETTER: + case SETTER: + case RECEIVER: + case PARAM: + case SETPARAM: + case DELEGATE: + case DYNAMIC: + case PUBLIC: + case PRIVATE: + case PROTECTED: + case INTERNAL: + case ENUM: + case SEALED: + case ANNOTATION: + case DATA: + case INNER: + case TAILREC: + case OPERATOR: + case INLINE: + case INFIX: + case EXTERNAL: + case SUSPEND: + case OVERRIDE: + case ABSTRACT: + case FINAL: + case OPEN: + case CONST: + case LATEINIT: + case VARARG: + case NOINLINE: + case CROSSINLINE: + case REIFIED: + case QUOTE_OPEN: + case TRIPLE_QUOTE_OPEN: + case RealLiteral: + case LongLiteral: + case IntegerLiteral: + case HexLiteral: + case BinLiteral: + case BooleanLiteral: + case NullLiteral: + case Identifier: + case LabelReference: + case LabelDefinition: + case CharacterLiteral: + enterOuterAlt(_localctx, 1); + { + setState(2280); + whenCondition(); + setState(2297); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,353,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2284); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2281); + match(NL); + } + } + setState(2286); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2287); + match(COMMA); + setState(2291); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,352,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2288); + match(NL); + } + } + } + setState(2293); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,352,_ctx); + } + setState(2294); + whenCondition(); + } + } + } + setState(2299); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,353,_ctx); + } + setState(2303); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2300); + match(NL); + } + } + setState(2305); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2306); + match(ARROW); + setState(2310); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,355,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2307); + match(NL); + } + } + } + setState(2312); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,355,_ctx); + } + setState(2313); + controlStructureBody(); + setState(2315); + switch ( getInterpreter().adaptivePredict(_input,356,_ctx) ) { + case 1: + { + setState(2314); + semi(); + } + break; + } + } + break; + case ELSE: + enterOuterAlt(_localctx, 2); + { + setState(2317); + match(ELSE); + setState(2321); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2318); + match(NL); + } + } + setState(2323); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2324); + match(ARROW); + setState(2328); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,358,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2325); + match(NL); + } + } + } + setState(2330); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,358,_ctx); + } + setState(2331); + controlStructureBody(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class WhenConditionContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public RangeTestContext rangeTest() { + return getRuleContext(RangeTestContext.class,0); + } + public TypeTestContext typeTest() { + return getRuleContext(TypeTestContext.class,0); + } + public WhenConditionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_whenCondition; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterWhenCondition(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitWhenCondition(this); + } + } + + public final WhenConditionContext whenCondition() throws RecognitionException { + WhenConditionContext _localctx = new WhenConditionContext(_ctx, getState()); + enterRule(_localctx, 206, RULE_whenCondition); + try { + setState(2337); + switch (_input.LA(1)) { + case NL: + case LPAREN: + case LSQUARE: + case LCURL: + case ADD: + case SUB: + case INCR: + case DECR: + case EXCL: + case COLONCOLON: + case Q_COLONCOLON: + case AT: + case RETURN_AT: + case CONTINUE_AT: + case BREAK_AT: + case FILE: + case IMPORT: + case OBJECT: + case VAL: + case CONSTRUCTOR: + case BY: + case COMPANION: + case INIT: + case THIS: + case SUPER: + case WHERE: + case IF: + case WHEN: + case TRY: + case CATCH: + case FINALLY: + case FOR: + case DO: + case WHILE: + case THROW: + case RETURN: + case CONTINUE: + case BREAK: + case OUT: + case FIELD: + case PROPERTY: + case GET: + case SET: + case GETTER: + case SETTER: + case RECEIVER: + case PARAM: + case SETPARAM: + case DELEGATE: + case DYNAMIC: + case PUBLIC: + case PRIVATE: + case PROTECTED: + case INTERNAL: + case ENUM: + case SEALED: + case ANNOTATION: + case DATA: + case INNER: + case TAILREC: + case OPERATOR: + case INLINE: + case INFIX: + case EXTERNAL: + case SUSPEND: + case OVERRIDE: + case ABSTRACT: + case FINAL: + case OPEN: + case CONST: + case LATEINIT: + case VARARG: + case NOINLINE: + case CROSSINLINE: + case REIFIED: + case QUOTE_OPEN: + case TRIPLE_QUOTE_OPEN: + case RealLiteral: + case LongLiteral: + case IntegerLiteral: + case HexLiteral: + case BinLiteral: + case BooleanLiteral: + case NullLiteral: + case Identifier: + case LabelReference: + case LabelDefinition: + case CharacterLiteral: + enterOuterAlt(_localctx, 1); + { + setState(2334); + expression(); + } + break; + case IN: + case NOT_IN: + enterOuterAlt(_localctx, 2); + { + setState(2335); + rangeTest(); + } + break; + case IS: + case NOT_IS: + enterOuterAlt(_localctx, 3); + { + setState(2336); + typeTest(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RangeTestContext extends ParserRuleContext { + public InOperatorContext inOperator() { + return getRuleContext(InOperatorContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public RangeTestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_rangeTest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterRangeTest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitRangeTest(this); + } + } + + public final RangeTestContext rangeTest() throws RecognitionException { + RangeTestContext _localctx = new RangeTestContext(_ctx, getState()); + enterRule(_localctx, 208, RULE_rangeTest); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(2339); + inOperator(); + setState(2343); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,361,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2340); + match(NL); + } + } + } + setState(2345); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,361,_ctx); + } + setState(2346); + expression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeTestContext extends ParserRuleContext { + public IsOperatorContext isOperator() { + return getRuleContext(IsOperatorContext.class,0); + } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public TypeTestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeTest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterTypeTest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitTypeTest(this); + } + } + + public final TypeTestContext typeTest() throws RecognitionException { + TypeTestContext _localctx = new TypeTestContext(_ctx, getState()); + enterRule(_localctx, 210, RULE_typeTest); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2348); + isOperator(); + setState(2352); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2349); + match(NL); + } + } + setState(2354); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2355); + type(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TryExpressionContext extends ParserRuleContext { + public TerminalNode TRY() { return getToken(KotlinParser.TRY, 0); } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public List catchBlock() { + return getRuleContexts(CatchBlockContext.class); + } + public CatchBlockContext catchBlock(int i) { + return getRuleContext(CatchBlockContext.class,i); + } + public FinallyBlockContext finallyBlock() { + return getRuleContext(FinallyBlockContext.class,0); + } + public TryExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_tryExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterTryExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitTryExpression(this); + } + } + + public final TryExpressionContext tryExpression() throws RecognitionException { + TryExpressionContext _localctx = new TryExpressionContext(_ctx, getState()); + enterRule(_localctx, 212, RULE_tryExpression); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(2357); + match(TRY); + setState(2361); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2358); + match(NL); + } + } + setState(2363); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2364); + block(); + setState(2374); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,365,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2368); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2365); + match(NL); + } + } + setState(2370); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2371); + catchBlock(); + } + } + } + setState(2376); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,365,_ctx); + } + setState(2384); + switch ( getInterpreter().adaptivePredict(_input,367,_ctx) ) { + case 1: + { + setState(2380); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2377); + match(NL); + } + } + setState(2382); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2383); + finallyBlock(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CatchBlockContext extends ParserRuleContext { + public TerminalNode CATCH() { return getToken(KotlinParser.CATCH, 0); } + public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); } + public SimpleIdentifierContext simpleIdentifier() { + return getRuleContext(SimpleIdentifierContext.class,0); + } + public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); } + public UserTypeContext userType() { + return getRuleContext(UserTypeContext.class,0); + } + public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public List annotations() { + return getRuleContexts(AnnotationsContext.class); + } + public AnnotationsContext annotations(int i) { + return getRuleContext(AnnotationsContext.class,i); + } + public CatchBlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_catchBlock; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterCatchBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitCatchBlock(this); + } + } + + public final CatchBlockContext catchBlock() throws RecognitionException { + CatchBlockContext _localctx = new CatchBlockContext(_ctx, getState()); + enterRule(_localctx, 214, RULE_catchBlock); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2386); + match(CATCH); + setState(2390); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2387); + match(NL); + } + } + setState(2392); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2393); + match(LPAREN); + setState(2397); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==AT || _la==FILE || ((((_la - 93)) & ~0x3f) == 0 && ((1L << (_la - 93)) & ((1L << (FIELD - 93)) | (1L << (PROPERTY - 93)) | (1L << (GET - 93)) | (1L << (SET - 93)) | (1L << (RECEIVER - 93)) | (1L << (PARAM - 93)) | (1L << (SETPARAM - 93)) | (1L << (DELEGATE - 93)) | (1L << (LabelReference - 93)))) != 0)) { + { + { + setState(2394); + annotations(); + } + } + setState(2399); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2400); + simpleIdentifier(); + setState(2401); + match(COLON); + setState(2402); + userType(); + setState(2403); + match(RPAREN); + setState(2407); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2404); + match(NL); + } + } + setState(2409); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2410); + block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FinallyBlockContext extends ParserRuleContext { + public TerminalNode FINALLY() { return getToken(KotlinParser.FINALLY, 0); } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public FinallyBlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_finallyBlock; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterFinallyBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitFinallyBlock(this); + } + } + + public final FinallyBlockContext finallyBlock() throws RecognitionException { + FinallyBlockContext _localctx = new FinallyBlockContext(_ctx, getState()); + enterRule(_localctx, 216, RULE_finallyBlock); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2412); + match(FINALLY); + setState(2416); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2413); + match(NL); + } + } + setState(2418); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2419); + block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LoopExpressionContext extends ParserRuleContext { + public ForExpressionContext forExpression() { + return getRuleContext(ForExpressionContext.class,0); + } + public WhileExpressionContext whileExpression() { + return getRuleContext(WhileExpressionContext.class,0); + } + public DoWhileExpressionContext doWhileExpression() { + return getRuleContext(DoWhileExpressionContext.class,0); + } + public LoopExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_loopExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterLoopExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitLoopExpression(this); + } + } + + public final LoopExpressionContext loopExpression() throws RecognitionException { + LoopExpressionContext _localctx = new LoopExpressionContext(_ctx, getState()); + enterRule(_localctx, 218, RULE_loopExpression); + try { + setState(2424); + switch (_input.LA(1)) { + case FOR: + enterOuterAlt(_localctx, 1); + { + setState(2421); + forExpression(); + } + break; + case WHILE: + enterOuterAlt(_localctx, 2); + { + setState(2422); + whileExpression(); + } + break; + case DO: + enterOuterAlt(_localctx, 3); + { + setState(2423); + doWhileExpression(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ForExpressionContext extends ParserRuleContext { + public TerminalNode FOR() { return getToken(KotlinParser.FOR, 0); } + public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); } + public TerminalNode IN() { return getToken(KotlinParser.IN, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); } + public VariableDeclarationContext variableDeclaration() { + return getRuleContext(VariableDeclarationContext.class,0); + } + public MultiVariableDeclarationContext multiVariableDeclaration() { + return getRuleContext(MultiVariableDeclarationContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public List annotations() { + return getRuleContexts(AnnotationsContext.class); + } + public AnnotationsContext annotations(int i) { + return getRuleContext(AnnotationsContext.class,i); + } + public ControlStructureBodyContext controlStructureBody() { + return getRuleContext(ControlStructureBodyContext.class,0); + } + public ForExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterForExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitForExpression(this); + } + } + + public final ForExpressionContext forExpression() throws RecognitionException { + ForExpressionContext _localctx = new ForExpressionContext(_ctx, getState()); + enterRule(_localctx, 220, RULE_forExpression); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(2426); + match(FOR); + setState(2430); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2427); + match(NL); + } + } + setState(2432); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2433); + match(LPAREN); + setState(2437); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==AT || _la==FILE || ((((_la - 93)) & ~0x3f) == 0 && ((1L << (_la - 93)) & ((1L << (FIELD - 93)) | (1L << (PROPERTY - 93)) | (1L << (GET - 93)) | (1L << (SET - 93)) | (1L << (RECEIVER - 93)) | (1L << (PARAM - 93)) | (1L << (SETPARAM - 93)) | (1L << (DELEGATE - 93)) | (1L << (LabelReference - 93)))) != 0)) { + { + { + setState(2434); + annotations(); + } + } + setState(2439); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2442); + switch (_input.LA(1)) { + case IMPORT: + case CONSTRUCTOR: + case BY: + case COMPANION: + case INIT: + case WHERE: + case CATCH: + case FINALLY: + case OUT: + case GETTER: + case SETTER: + case DYNAMIC: + case PUBLIC: + case PRIVATE: + case PROTECTED: + case INTERNAL: + case ENUM: + case SEALED: + case ANNOTATION: + case DATA: + case INNER: + case TAILREC: + case OPERATOR: + case INLINE: + case INFIX: + case EXTERNAL: + case SUSPEND: + case OVERRIDE: + case ABSTRACT: + case FINAL: + case OPEN: + case CONST: + case LATEINIT: + case VARARG: + case NOINLINE: + case CROSSINLINE: + case REIFIED: + case Identifier: + { + setState(2440); + variableDeclaration(); + } + break; + case LPAREN: + { + setState(2441); + multiVariableDeclaration(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(2444); + match(IN); + setState(2445); + expression(); + setState(2446); + match(RPAREN); + setState(2450); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,376,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2447); + match(NL); + } + } + } + setState(2452); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,376,_ctx); + } + setState(2454); + switch ( getInterpreter().adaptivePredict(_input,377,_ctx) ) { + case 1: + { + setState(2453); + controlStructureBody(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class WhileExpressionContext extends ParserRuleContext { + public TerminalNode WHILE() { return getToken(KotlinParser.WHILE, 0); } + public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public ControlStructureBodyContext controlStructureBody() { + return getRuleContext(ControlStructureBodyContext.class,0); + } + public WhileExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_whileExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterWhileExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitWhileExpression(this); + } + } + + public final WhileExpressionContext whileExpression() throws RecognitionException { + WhileExpressionContext _localctx = new WhileExpressionContext(_ctx, getState()); + enterRule(_localctx, 222, RULE_whileExpression); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(2456); + match(WHILE); + setState(2460); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2457); + match(NL); + } + } + setState(2462); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2463); + match(LPAREN); + setState(2464); + expression(); + setState(2465); + match(RPAREN); + setState(2469); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,379,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2466); + match(NL); + } + } + } + setState(2471); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,379,_ctx); + } + setState(2473); + switch ( getInterpreter().adaptivePredict(_input,380,_ctx) ) { + case 1: + { + setState(2472); + controlStructureBody(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DoWhileExpressionContext extends ParserRuleContext { + public TerminalNode DO() { return getToken(KotlinParser.DO, 0); } + public TerminalNode WHILE() { return getToken(KotlinParser.WHILE, 0); } + public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public ControlStructureBodyContext controlStructureBody() { + return getRuleContext(ControlStructureBodyContext.class,0); + } + public DoWhileExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_doWhileExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterDoWhileExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitDoWhileExpression(this); + } + } + + public final DoWhileExpressionContext doWhileExpression() throws RecognitionException { + DoWhileExpressionContext _localctx = new DoWhileExpressionContext(_ctx, getState()); + enterRule(_localctx, 224, RULE_doWhileExpression); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(2475); + match(DO); + setState(2479); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,381,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2476); + match(NL); + } + } + } + setState(2481); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,381,_ctx); + } + setState(2483); + switch ( getInterpreter().adaptivePredict(_input,382,_ctx) ) { + case 1: + { + setState(2482); + controlStructureBody(); + } + break; + } + setState(2488); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2485); + match(NL); + } + } + setState(2490); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2491); + match(WHILE); + setState(2495); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2492); + match(NL); + } + } + setState(2497); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2498); + match(LPAREN); + setState(2499); + expression(); + setState(2500); + match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class JumpExpressionContext extends ParserRuleContext { + public TerminalNode THROW() { return getToken(KotlinParser.THROW, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public TerminalNode RETURN() { return getToken(KotlinParser.RETURN, 0); } + public TerminalNode RETURN_AT() { return getToken(KotlinParser.RETURN_AT, 0); } + public TerminalNode CONTINUE() { return getToken(KotlinParser.CONTINUE, 0); } + public TerminalNode CONTINUE_AT() { return getToken(KotlinParser.CONTINUE_AT, 0); } + public TerminalNode BREAK() { return getToken(KotlinParser.BREAK, 0); } + public TerminalNode BREAK_AT() { return getToken(KotlinParser.BREAK_AT, 0); } + public JumpExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_jumpExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterJumpExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitJumpExpression(this); + } + } + + public final JumpExpressionContext jumpExpression() throws RecognitionException { + JumpExpressionContext _localctx = new JumpExpressionContext(_ctx, getState()); + enterRule(_localctx, 226, RULE_jumpExpression); + int _la; + try { + int _alt; + setState(2518); + switch (_input.LA(1)) { + case THROW: + enterOuterAlt(_localctx, 1); + { + setState(2502); + match(THROW); + setState(2506); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,385,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2503); + match(NL); + } + } + } + setState(2508); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,385,_ctx); + } + setState(2509); + expression(); + } + break; + case RETURN_AT: + case RETURN: + enterOuterAlt(_localctx, 2); + { + setState(2510); + _la = _input.LA(1); + if ( !(_la==RETURN_AT || _la==RETURN) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(2512); + switch ( getInterpreter().adaptivePredict(_input,386,_ctx) ) { + case 1: + { + setState(2511); + expression(); + } + break; + } + } + break; + case CONTINUE: + enterOuterAlt(_localctx, 3); + { + setState(2514); + match(CONTINUE); + } + break; + case CONTINUE_AT: + enterOuterAlt(_localctx, 4); + { + setState(2515); + match(CONTINUE_AT); + } + break; + case BREAK: + enterOuterAlt(_localctx, 5); + { + setState(2516); + match(BREAK); + } + break; + case BREAK_AT: + enterOuterAlt(_localctx, 6); + { + setState(2517); + match(BREAK_AT); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CallableReferenceContext extends ParserRuleContext { + public TerminalNode COLONCOLON() { return getToken(KotlinParser.COLONCOLON, 0); } + public TerminalNode Q_COLONCOLON() { return getToken(KotlinParser.Q_COLONCOLON, 0); } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public TerminalNode CLASS() { return getToken(KotlinParser.CLASS, 0); } + public UserTypeContext userType() { + return getRuleContext(UserTypeContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public List QUEST() { return getTokens(KotlinParser.QUEST); } + public TerminalNode QUEST(int i) { + return getToken(KotlinParser.QUEST, i); + } + public TerminalNode THIS() { return getToken(KotlinParser.THIS, 0); } + public CallableReferenceContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_callableReference; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterCallableReference(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitCallableReference(this); + } + } + + public final CallableReferenceContext callableReference() throws RecognitionException { + CallableReferenceContext _localctx = new CallableReferenceContext(_ctx, getState()); + enterRule(_localctx, 228, RULE_callableReference); + int _la; + try { + int _alt; + setState(2567); + switch (_input.LA(1)) { + case NL: + case COLONCOLON: + case Q_COLONCOLON: + case IMPORT: + case CONSTRUCTOR: + case BY: + case COMPANION: + case INIT: + case WHERE: + case CATCH: + case FINALLY: + case OUT: + case GETTER: + case SETTER: + case DYNAMIC: + case PUBLIC: + case PRIVATE: + case PROTECTED: + case INTERNAL: + case ENUM: + case SEALED: + case ANNOTATION: + case DATA: + case INNER: + case TAILREC: + case OPERATOR: + case INLINE: + case INFIX: + case EXTERNAL: + case SUSPEND: + case OVERRIDE: + case ABSTRACT: + case FINAL: + case OPEN: + case CONST: + case LATEINIT: + case VARARG: + case NOINLINE: + case CROSSINLINE: + case REIFIED: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(2533); + _la = _input.LA(1); + if (((((_la - 58)) & ~0x3f) == 0 && ((1L << (_la - 58)) & ((1L << (IMPORT - 58)) | (1L << (CONSTRUCTOR - 58)) | (1L << (BY - 58)) | (1L << (COMPANION - 58)) | (1L << (INIT - 58)) | (1L << (WHERE - 58)) | (1L << (CATCH - 58)) | (1L << (FINALLY - 58)) | (1L << (OUT - 58)) | (1L << (GETTER - 58)) | (1L << (SETTER - 58)) | (1L << (DYNAMIC - 58)) | (1L << (PUBLIC - 58)) | (1L << (PRIVATE - 58)) | (1L << (PROTECTED - 58)) | (1L << (INTERNAL - 58)) | (1L << (ENUM - 58)) | (1L << (SEALED - 58)) | (1L << (ANNOTATION - 58)) | (1L << (DATA - 58)) | (1L << (INNER - 58)) | (1L << (TAILREC - 58)) | (1L << (OPERATOR - 58)) | (1L << (INLINE - 58)) | (1L << (INFIX - 58)) | (1L << (EXTERNAL - 58)) | (1L << (SUSPEND - 58)) | (1L << (OVERRIDE - 58)) | (1L << (ABSTRACT - 58)) | (1L << (FINAL - 58)))) != 0) || ((((_la - 122)) & ~0x3f) == 0 && ((1L << (_la - 122)) & ((1L << (OPEN - 122)) | (1L << (CONST - 122)) | (1L << (LATEINIT - 122)) | (1L << (VARARG - 122)) | (1L << (NOINLINE - 122)) | (1L << (CROSSINLINE - 122)) | (1L << (REIFIED - 122)) | (1L << (Identifier - 122)))) != 0)) { + { + setState(2520); + userType(); + setState(2530); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==QUEST) { + { + { + setState(2521); + match(QUEST); + setState(2525); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,388,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2522); + match(NL); + } + } + } + setState(2527); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,388,_ctx); + } + } + } + setState(2532); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + + setState(2538); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2535); + match(NL); + } + } + setState(2540); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2541); + _la = _input.LA(1); + if ( !(_la==COLONCOLON || _la==Q_COLONCOLON) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(2545); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2542); + match(NL); + } + } + setState(2547); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2550); + switch (_input.LA(1)) { + case IMPORT: + case CONSTRUCTOR: + case BY: + case COMPANION: + case INIT: + case WHERE: + case CATCH: + case FINALLY: + case OUT: + case GETTER: + case SETTER: + case DYNAMIC: + case PUBLIC: + case PRIVATE: + case PROTECTED: + case INTERNAL: + case ENUM: + case SEALED: + case ANNOTATION: + case DATA: + case INNER: + case TAILREC: + case OPERATOR: + case INLINE: + case INFIX: + case EXTERNAL: + case SUSPEND: + case OVERRIDE: + case ABSTRACT: + case FINAL: + case OPEN: + case CONST: + case LATEINIT: + case VARARG: + case NOINLINE: + case CROSSINLINE: + case REIFIED: + case Identifier: + { + setState(2548); + identifier(); + } + break; + case CLASS: + { + setState(2549); + match(CLASS); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + case THIS: + enterOuterAlt(_localctx, 2); + { + setState(2552); + match(THIS); + setState(2556); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2553); + match(NL); + } + } + setState(2558); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2559); + match(COLONCOLON); + setState(2563); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2560); + match(NL); + } + } + setState(2565); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2566); + match(CLASS); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AssignmentOperatorContext extends ParserRuleContext { + public TerminalNode ASSIGNMENT() { return getToken(KotlinParser.ASSIGNMENT, 0); } + public TerminalNode ADD_ASSIGNMENT() { return getToken(KotlinParser.ADD_ASSIGNMENT, 0); } + public TerminalNode SUB_ASSIGNMENT() { return getToken(KotlinParser.SUB_ASSIGNMENT, 0); } + public TerminalNode MULT_ASSIGNMENT() { return getToken(KotlinParser.MULT_ASSIGNMENT, 0); } + public TerminalNode DIV_ASSIGNMENT() { return getToken(KotlinParser.DIV_ASSIGNMENT, 0); } + public TerminalNode MOD_ASSIGNMENT() { return getToken(KotlinParser.MOD_ASSIGNMENT, 0); } + public AssignmentOperatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_assignmentOperator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterAssignmentOperator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitAssignmentOperator(this); + } + } + + public final AssignmentOperatorContext assignmentOperator() throws RecognitionException { + AssignmentOperatorContext _localctx = new AssignmentOperatorContext(_ctx, getState()); + enterRule(_localctx, 230, RULE_assignmentOperator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2569); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ASSIGNMENT) | (1L << ADD_ASSIGNMENT) | (1L << SUB_ASSIGNMENT) | (1L << MULT_ASSIGNMENT) | (1L << DIV_ASSIGNMENT) | (1L << MOD_ASSIGNMENT))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EqualityOperationContext extends ParserRuleContext { + public TerminalNode EXCL_EQ() { return getToken(KotlinParser.EXCL_EQ, 0); } + public TerminalNode EXCL_EQEQ() { return getToken(KotlinParser.EXCL_EQEQ, 0); } + public TerminalNode EQEQ() { return getToken(KotlinParser.EQEQ, 0); } + public TerminalNode EQEQEQ() { return getToken(KotlinParser.EQEQEQ, 0); } + public EqualityOperationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_equalityOperation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterEqualityOperation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitEqualityOperation(this); + } + } + + public final EqualityOperationContext equalityOperation() throws RecognitionException { + EqualityOperationContext _localctx = new EqualityOperationContext(_ctx, getState()); + enterRule(_localctx, 232, RULE_equalityOperation); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2571); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << EXCL_EQ) | (1L << EXCL_EQEQ) | (1L << EQEQ) | (1L << EQEQEQ))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ComparisonOperatorContext extends ParserRuleContext { + public TerminalNode LANGLE() { return getToken(KotlinParser.LANGLE, 0); } + public TerminalNode RANGLE() { return getToken(KotlinParser.RANGLE, 0); } + public TerminalNode LE() { return getToken(KotlinParser.LE, 0); } + public TerminalNode GE() { return getToken(KotlinParser.GE, 0); } + public ComparisonOperatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_comparisonOperator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterComparisonOperator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitComparisonOperator(this); + } + } + + public final ComparisonOperatorContext comparisonOperator() throws RecognitionException { + ComparisonOperatorContext _localctx = new ComparisonOperatorContext(_ctx, getState()); + enterRule(_localctx, 234, RULE_comparisonOperator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2573); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LANGLE) | (1L << RANGLE) | (1L << LE) | (1L << GE))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InOperatorContext extends ParserRuleContext { + public TerminalNode IN() { return getToken(KotlinParser.IN, 0); } + public TerminalNode NOT_IN() { return getToken(KotlinParser.NOT_IN, 0); } + public InOperatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_inOperator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterInOperator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitInOperator(this); + } + } + + public final InOperatorContext inOperator() throws RecognitionException { + InOperatorContext _localctx = new InOperatorContext(_ctx, getState()); + enterRule(_localctx, 236, RULE_inOperator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2575); + _la = _input.LA(1); + if ( !(_la==IN || _la==NOT_IN) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IsOperatorContext extends ParserRuleContext { + public TerminalNode IS() { return getToken(KotlinParser.IS, 0); } + public TerminalNode NOT_IS() { return getToken(KotlinParser.NOT_IS, 0); } + public IsOperatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_isOperator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterIsOperator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitIsOperator(this); + } + } + + public final IsOperatorContext isOperator() throws RecognitionException { + IsOperatorContext _localctx = new IsOperatorContext(_ctx, getState()); + enterRule(_localctx, 238, RULE_isOperator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2577); + _la = _input.LA(1); + if ( !(_la==IS || _la==NOT_IS) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AdditiveOperatorContext extends ParserRuleContext { + public TerminalNode ADD() { return getToken(KotlinParser.ADD, 0); } + public TerminalNode SUB() { return getToken(KotlinParser.SUB, 0); } + public AdditiveOperatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_additiveOperator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterAdditiveOperator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitAdditiveOperator(this); + } + } + + public final AdditiveOperatorContext additiveOperator() throws RecognitionException { + AdditiveOperatorContext _localctx = new AdditiveOperatorContext(_ctx, getState()); + enterRule(_localctx, 240, RULE_additiveOperator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2579); + _la = _input.LA(1); + if ( !(_la==ADD || _la==SUB) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MultiplicativeOperationContext extends ParserRuleContext { + public TerminalNode MULT() { return getToken(KotlinParser.MULT, 0); } + public TerminalNode DIV() { return getToken(KotlinParser.DIV, 0); } + public TerminalNode MOD() { return getToken(KotlinParser.MOD, 0); } + public MultiplicativeOperationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_multiplicativeOperation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterMultiplicativeOperation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitMultiplicativeOperation(this); + } + } + + public final MultiplicativeOperationContext multiplicativeOperation() throws RecognitionException { + MultiplicativeOperationContext _localctx = new MultiplicativeOperationContext(_ctx, getState()); + enterRule(_localctx, 242, RULE_multiplicativeOperation); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2581); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << MULT) | (1L << MOD) | (1L << DIV))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeOperationContext extends ParserRuleContext { + public TerminalNode AS() { return getToken(KotlinParser.AS, 0); } + public TerminalNode AS_SAFE() { return getToken(KotlinParser.AS_SAFE, 0); } + public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); } + public TypeOperationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeOperation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterTypeOperation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitTypeOperation(this); + } + } + + public final TypeOperationContext typeOperation() throws RecognitionException { + TypeOperationContext _localctx = new TypeOperationContext(_ctx, getState()); + enterRule(_localctx, 244, RULE_typeOperation); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2583); + _la = _input.LA(1); + if ( !(((((_la - 25)) & ~0x3f) == 0 && ((1L << (_la - 25)) & ((1L << (COLON - 25)) | (1L << (AS_SAFE - 25)) | (1L << (AS - 25)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PrefixUnaryOperationContext extends ParserRuleContext { + public TerminalNode INCR() { return getToken(KotlinParser.INCR, 0); } + public TerminalNode DECR() { return getToken(KotlinParser.DECR, 0); } + public TerminalNode ADD() { return getToken(KotlinParser.ADD, 0); } + public TerminalNode SUB() { return getToken(KotlinParser.SUB, 0); } + public TerminalNode EXCL() { return getToken(KotlinParser.EXCL, 0); } + public AnnotationsContext annotations() { + return getRuleContext(AnnotationsContext.class,0); + } + public LabelDefinitionContext labelDefinition() { + return getRuleContext(LabelDefinitionContext.class,0); + } + public PrefixUnaryOperationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_prefixUnaryOperation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterPrefixUnaryOperation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitPrefixUnaryOperation(this); + } + } + + public final PrefixUnaryOperationContext prefixUnaryOperation() throws RecognitionException { + PrefixUnaryOperationContext _localctx = new PrefixUnaryOperationContext(_ctx, getState()); + enterRule(_localctx, 246, RULE_prefixUnaryOperation); + try { + setState(2592); + switch (_input.LA(1)) { + case INCR: + enterOuterAlt(_localctx, 1); + { + setState(2585); + match(INCR); + } + break; + case DECR: + enterOuterAlt(_localctx, 2); + { + setState(2586); + match(DECR); + } + break; + case ADD: + enterOuterAlt(_localctx, 3); + { + setState(2587); + match(ADD); + } + break; + case SUB: + enterOuterAlt(_localctx, 4); + { + setState(2588); + match(SUB); + } + break; + case EXCL: + enterOuterAlt(_localctx, 5); + { + setState(2589); + match(EXCL); + } + break; + case AT: + case FILE: + case FIELD: + case PROPERTY: + case GET: + case SET: + case RECEIVER: + case PARAM: + case SETPARAM: + case DELEGATE: + case LabelReference: + enterOuterAlt(_localctx, 6); + { + setState(2590); + annotations(); + } + break; + case LabelDefinition: + enterOuterAlt(_localctx, 7); + { + setState(2591); + labelDefinition(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PostfixUnaryOperationContext extends ParserRuleContext { + public TerminalNode INCR() { return getToken(KotlinParser.INCR, 0); } + public TerminalNode DECR() { return getToken(KotlinParser.DECR, 0); } + public List EXCL() { return getTokens(KotlinParser.EXCL); } + public TerminalNode EXCL(int i) { + return getToken(KotlinParser.EXCL, i); + } + public CallSuffixContext callSuffix() { + return getRuleContext(CallSuffixContext.class,0); + } + public ArrayAccessContext arrayAccess() { + return getRuleContext(ArrayAccessContext.class,0); + } + public MemberAccessOperatorContext memberAccessOperator() { + return getRuleContext(MemberAccessOperatorContext.class,0); + } + public PostfixUnaryExpressionContext postfixUnaryExpression() { + return getRuleContext(PostfixUnaryExpressionContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public PostfixUnaryOperationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_postfixUnaryOperation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterPostfixUnaryOperation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitPostfixUnaryOperation(this); + } + } + + public final PostfixUnaryOperationContext postfixUnaryOperation() throws RecognitionException { + PostfixUnaryOperationContext _localctx = new PostfixUnaryOperationContext(_ctx, getState()); + enterRule(_localctx, 248, RULE_postfixUnaryOperation); + int _la; + try { + setState(2609); + switch ( getInterpreter().adaptivePredict(_input,399,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(2594); + match(INCR); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(2595); + match(DECR); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(2596); + match(EXCL); + setState(2597); + match(EXCL); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(2598); + callSuffix(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(2599); + arrayAccess(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(2603); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2600); + match(NL); + } + } + setState(2605); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2606); + memberAccessOperator(); + setState(2607); + postfixUnaryExpression(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MemberAccessOperatorContext extends ParserRuleContext { + public TerminalNode DOT() { return getToken(KotlinParser.DOT, 0); } + public TerminalNode QUEST() { return getToken(KotlinParser.QUEST, 0); } + public MemberAccessOperatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_memberAccessOperator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterMemberAccessOperator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitMemberAccessOperator(this); + } + } + + public final MemberAccessOperatorContext memberAccessOperator() throws RecognitionException { + MemberAccessOperatorContext _localctx = new MemberAccessOperatorContext(_ctx, getState()); + enterRule(_localctx, 250, RULE_memberAccessOperator); + try { + setState(2614); + switch (_input.LA(1)) { + case DOT: + enterOuterAlt(_localctx, 1); + { + setState(2611); + match(DOT); + } + break; + case QUEST: + enterOuterAlt(_localctx, 2); + { + setState(2612); + match(QUEST); + setState(2613); + match(DOT); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ModifierListContext extends ParserRuleContext { + public List annotations() { + return getRuleContexts(AnnotationsContext.class); + } + public AnnotationsContext annotations(int i) { + return getRuleContext(AnnotationsContext.class,i); + } + public List modifier() { + return getRuleContexts(ModifierContext.class); + } + public ModifierContext modifier(int i) { + return getRuleContext(ModifierContext.class,i); + } + public ModifierListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_modifierList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterModifierList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitModifierList(this); + } + } + + public final ModifierListContext modifierList() throws RecognitionException { + ModifierListContext _localctx = new ModifierListContext(_ctx, getState()); + enterRule(_localctx, 252, RULE_modifierList); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(2618); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + setState(2618); + switch (_input.LA(1)) { + case AT: + case FILE: + case FIELD: + case PROPERTY: + case GET: + case SET: + case RECEIVER: + case PARAM: + case SETPARAM: + case DELEGATE: + case LabelReference: + { + setState(2616); + annotations(); + } + break; + case IN: + case OUT: + case PUBLIC: + case PRIVATE: + case PROTECTED: + case INTERNAL: + case ENUM: + case SEALED: + case ANNOTATION: + case DATA: + case INNER: + case TAILREC: + case OPERATOR: + case INLINE: + case INFIX: + case EXTERNAL: + case SUSPEND: + case OVERRIDE: + case ABSTRACT: + case FINAL: + case OPEN: + case CONST: + case LATEINIT: + case VARARG: + case NOINLINE: + case CROSSINLINE: + case REIFIED: + { + setState(2617); + modifier(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(2620); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,402,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ModifierContext extends ParserRuleContext { + public ClassModifierContext classModifier() { + return getRuleContext(ClassModifierContext.class,0); + } + public MemberModifierContext memberModifier() { + return getRuleContext(MemberModifierContext.class,0); + } + public VisibilityModifierContext visibilityModifier() { + return getRuleContext(VisibilityModifierContext.class,0); + } + public VarianceAnnotationContext varianceAnnotation() { + return getRuleContext(VarianceAnnotationContext.class,0); + } + public FunctionModifierContext functionModifier() { + return getRuleContext(FunctionModifierContext.class,0); + } + public PropertyModifierContext propertyModifier() { + return getRuleContext(PropertyModifierContext.class,0); + } + public InheritanceModifierContext inheritanceModifier() { + return getRuleContext(InheritanceModifierContext.class,0); + } + public ParameterModifierContext parameterModifier() { + return getRuleContext(ParameterModifierContext.class,0); + } + public TypeParameterModifierContext typeParameterModifier() { + return getRuleContext(TypeParameterModifierContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public ModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_modifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitModifier(this); + } + } + + public final ModifierContext modifier() throws RecognitionException { + ModifierContext _localctx = new ModifierContext(_ctx, getState()); + enterRule(_localctx, 254, RULE_modifier); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(2631); + switch (_input.LA(1)) { + case ENUM: + case SEALED: + case ANNOTATION: + case DATA: + case INNER: + { + setState(2622); + classModifier(); + } + break; + case OVERRIDE: + case LATEINIT: + { + setState(2623); + memberModifier(); + } + break; + case PUBLIC: + case PRIVATE: + case PROTECTED: + case INTERNAL: + { + setState(2624); + visibilityModifier(); + } + break; + case IN: + case OUT: + { + setState(2625); + varianceAnnotation(); + } + break; + case TAILREC: + case OPERATOR: + case INLINE: + case INFIX: + case EXTERNAL: + case SUSPEND: + { + setState(2626); + functionModifier(); + } + break; + case CONST: + { + setState(2627); + propertyModifier(); + } + break; + case ABSTRACT: + case FINAL: + case OPEN: + { + setState(2628); + inheritanceModifier(); + } + break; + case VARARG: + case NOINLINE: + case CROSSINLINE: + { + setState(2629); + parameterModifier(); + } + break; + case REIFIED: + { + setState(2630); + typeParameterModifier(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(2636); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,404,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2633); + match(NL); + } + } + } + setState(2638); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,404,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassModifierContext extends ParserRuleContext { + public TerminalNode ENUM() { return getToken(KotlinParser.ENUM, 0); } + public TerminalNode SEALED() { return getToken(KotlinParser.SEALED, 0); } + public TerminalNode ANNOTATION() { return getToken(KotlinParser.ANNOTATION, 0); } + public TerminalNode DATA() { return getToken(KotlinParser.DATA, 0); } + public TerminalNode INNER() { return getToken(KotlinParser.INNER, 0); } + public ClassModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterClassModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitClassModifier(this); + } + } + + public final ClassModifierContext classModifier() throws RecognitionException { + ClassModifierContext _localctx = new ClassModifierContext(_ctx, getState()); + enterRule(_localctx, 256, RULE_classModifier); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2639); + _la = _input.LA(1); + if ( !(((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (ENUM - 108)) | (1L << (SEALED - 108)) | (1L << (ANNOTATION - 108)) | (1L << (DATA - 108)) | (1L << (INNER - 108)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MemberModifierContext extends ParserRuleContext { + public TerminalNode OVERRIDE() { return getToken(KotlinParser.OVERRIDE, 0); } + public TerminalNode LATEINIT() { return getToken(KotlinParser.LATEINIT, 0); } + public MemberModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_memberModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterMemberModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitMemberModifier(this); + } + } + + public final MemberModifierContext memberModifier() throws RecognitionException { + MemberModifierContext _localctx = new MemberModifierContext(_ctx, getState()); + enterRule(_localctx, 258, RULE_memberModifier); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2641); + _la = _input.LA(1); + if ( !(_la==OVERRIDE || _la==LATEINIT) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VisibilityModifierContext extends ParserRuleContext { + public TerminalNode PUBLIC() { return getToken(KotlinParser.PUBLIC, 0); } + public TerminalNode PRIVATE() { return getToken(KotlinParser.PRIVATE, 0); } + public TerminalNode INTERNAL() { return getToken(KotlinParser.INTERNAL, 0); } + public TerminalNode PROTECTED() { return getToken(KotlinParser.PROTECTED, 0); } + public VisibilityModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_visibilityModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterVisibilityModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitVisibilityModifier(this); + } + } + + public final VisibilityModifierContext visibilityModifier() throws RecognitionException { + VisibilityModifierContext _localctx = new VisibilityModifierContext(_ctx, getState()); + enterRule(_localctx, 260, RULE_visibilityModifier); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2643); + _la = _input.LA(1); + if ( !(((((_la - 104)) & ~0x3f) == 0 && ((1L << (_la - 104)) & ((1L << (PUBLIC - 104)) | (1L << (PRIVATE - 104)) | (1L << (PROTECTED - 104)) | (1L << (INTERNAL - 104)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VarianceAnnotationContext extends ParserRuleContext { + public TerminalNode IN() { return getToken(KotlinParser.IN, 0); } + public TerminalNode OUT() { return getToken(KotlinParser.OUT, 0); } + public VarianceAnnotationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_varianceAnnotation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterVarianceAnnotation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitVarianceAnnotation(this); + } + } + + public final VarianceAnnotationContext varianceAnnotation() throws RecognitionException { + VarianceAnnotationContext _localctx = new VarianceAnnotationContext(_ctx, getState()); + enterRule(_localctx, 262, RULE_varianceAnnotation); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2645); + _la = _input.LA(1); + if ( !(_la==IN || _la==OUT) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionModifierContext extends ParserRuleContext { + public TerminalNode TAILREC() { return getToken(KotlinParser.TAILREC, 0); } + public TerminalNode OPERATOR() { return getToken(KotlinParser.OPERATOR, 0); } + public TerminalNode INFIX() { return getToken(KotlinParser.INFIX, 0); } + public TerminalNode INLINE() { return getToken(KotlinParser.INLINE, 0); } + public TerminalNode EXTERNAL() { return getToken(KotlinParser.EXTERNAL, 0); } + public TerminalNode SUSPEND() { return getToken(KotlinParser.SUSPEND, 0); } + public FunctionModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterFunctionModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitFunctionModifier(this); + } + } + + public final FunctionModifierContext functionModifier() throws RecognitionException { + FunctionModifierContext _localctx = new FunctionModifierContext(_ctx, getState()); + enterRule(_localctx, 264, RULE_functionModifier); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2647); + _la = _input.LA(1); + if ( !(((((_la - 113)) & ~0x3f) == 0 && ((1L << (_la - 113)) & ((1L << (TAILREC - 113)) | (1L << (OPERATOR - 113)) | (1L << (INLINE - 113)) | (1L << (INFIX - 113)) | (1L << (EXTERNAL - 113)) | (1L << (SUSPEND - 113)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PropertyModifierContext extends ParserRuleContext { + public TerminalNode CONST() { return getToken(KotlinParser.CONST, 0); } + public PropertyModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_propertyModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterPropertyModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitPropertyModifier(this); + } + } + + public final PropertyModifierContext propertyModifier() throws RecognitionException { + PropertyModifierContext _localctx = new PropertyModifierContext(_ctx, getState()); + enterRule(_localctx, 266, RULE_propertyModifier); + try { + enterOuterAlt(_localctx, 1); + { + setState(2649); + match(CONST); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InheritanceModifierContext extends ParserRuleContext { + public TerminalNode ABSTRACT() { return getToken(KotlinParser.ABSTRACT, 0); } + public TerminalNode FINAL() { return getToken(KotlinParser.FINAL, 0); } + public TerminalNode OPEN() { return getToken(KotlinParser.OPEN, 0); } + public InheritanceModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_inheritanceModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterInheritanceModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitInheritanceModifier(this); + } + } + + public final InheritanceModifierContext inheritanceModifier() throws RecognitionException { + InheritanceModifierContext _localctx = new InheritanceModifierContext(_ctx, getState()); + enterRule(_localctx, 268, RULE_inheritanceModifier); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2651); + _la = _input.LA(1); + if ( !(((((_la - 120)) & ~0x3f) == 0 && ((1L << (_la - 120)) & ((1L << (ABSTRACT - 120)) | (1L << (FINAL - 120)) | (1L << (OPEN - 120)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ParameterModifierContext extends ParserRuleContext { + public TerminalNode VARARG() { return getToken(KotlinParser.VARARG, 0); } + public TerminalNode NOINLINE() { return getToken(KotlinParser.NOINLINE, 0); } + public TerminalNode CROSSINLINE() { return getToken(KotlinParser.CROSSINLINE, 0); } + public ParameterModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_parameterModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterParameterModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitParameterModifier(this); + } + } + + public final ParameterModifierContext parameterModifier() throws RecognitionException { + ParameterModifierContext _localctx = new ParameterModifierContext(_ctx, getState()); + enterRule(_localctx, 270, RULE_parameterModifier); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2653); + _la = _input.LA(1); + if ( !(((((_la - 125)) & ~0x3f) == 0 && ((1L << (_la - 125)) & ((1L << (VARARG - 125)) | (1L << (NOINLINE - 125)) | (1L << (CROSSINLINE - 125)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParameterModifierContext extends ParserRuleContext { + public TerminalNode REIFIED() { return getToken(KotlinParser.REIFIED, 0); } + public TypeParameterModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameterModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterTypeParameterModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitTypeParameterModifier(this); + } + } + + public final TypeParameterModifierContext typeParameterModifier() throws RecognitionException { + TypeParameterModifierContext _localctx = new TypeParameterModifierContext(_ctx, getState()); + enterRule(_localctx, 272, RULE_typeParameterModifier); + try { + enterOuterAlt(_localctx, 1); + { + setState(2655); + match(REIFIED); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LabelDefinitionContext extends ParserRuleContext { + public TerminalNode LabelDefinition() { return getToken(KotlinParser.LabelDefinition, 0); } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public LabelDefinitionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_labelDefinition; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterLabelDefinition(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitLabelDefinition(this); + } + } + + public final LabelDefinitionContext labelDefinition() throws RecognitionException { + LabelDefinitionContext _localctx = new LabelDefinitionContext(_ctx, getState()); + enterRule(_localctx, 274, RULE_labelDefinition); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(2657); + match(LabelDefinition); + setState(2661); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,405,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2658); + match(NL); + } + } + } + setState(2663); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,405,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationsContext extends ParserRuleContext { + public AnnotationContext annotation() { + return getRuleContext(AnnotationContext.class,0); + } + public AnnotationListContext annotationList() { + return getRuleContext(AnnotationListContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public AnnotationsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotations; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterAnnotations(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitAnnotations(this); + } + } + + public final AnnotationsContext annotations() throws RecognitionException { + AnnotationsContext _localctx = new AnnotationsContext(_ctx, getState()); + enterRule(_localctx, 276, RULE_annotations); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(2666); + switch ( getInterpreter().adaptivePredict(_input,406,_ctx) ) { + case 1: + { + setState(2664); + annotation(); + } + break; + case 2: + { + setState(2665); + annotationList(); + } + break; + } + setState(2671); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,407,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2668); + match(NL); + } + } + } + setState(2673); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,407,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationContext extends ParserRuleContext { + public AnnotationUseSiteTargetContext annotationUseSiteTarget() { + return getRuleContext(AnnotationUseSiteTargetContext.class,0); + } + public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); } + public UnescapedAnnotationContext unescapedAnnotation() { + return getRuleContext(UnescapedAnnotationContext.class,0); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public TerminalNode LabelReference() { return getToken(KotlinParser.LabelReference, 0); } + public List DOT() { return getTokens(KotlinParser.DOT); } + public TerminalNode DOT(int i) { + return getToken(KotlinParser.DOT, i); + } + public List simpleIdentifier() { + return getRuleContexts(SimpleIdentifierContext.class); + } + public SimpleIdentifierContext simpleIdentifier(int i) { + return getRuleContext(SimpleIdentifierContext.class,i); + } + public TypeArgumentsContext typeArguments() { + return getRuleContext(TypeArgumentsContext.class,0); + } + public ValueArgumentsContext valueArguments() { + return getRuleContext(ValueArgumentsContext.class,0); + } + public AnnotationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterAnnotation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitAnnotation(this); + } + } + + public final AnnotationContext annotation() throws RecognitionException { + AnnotationContext _localctx = new AnnotationContext(_ctx, getState()); + enterRule(_localctx, 278, RULE_annotation); + int _la; + try { + int _alt; + setState(2728); + switch (_input.LA(1)) { + case FILE: + case FIELD: + case PROPERTY: + case GET: + case SET: + case RECEIVER: + case PARAM: + case SETPARAM: + case DELEGATE: + enterOuterAlt(_localctx, 1); + { + setState(2674); + annotationUseSiteTarget(); + setState(2678); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2675); + match(NL); + } + } + setState(2680); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2681); + match(COLON); + setState(2685); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2682); + match(NL); + } + } + setState(2687); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2688); + unescapedAnnotation(); + } + break; + case LabelReference: + enterOuterAlt(_localctx, 2); + { + setState(2690); + match(LabelReference); + setState(2707); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,412,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2694); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2691); + match(NL); + } + } + setState(2696); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2697); + match(DOT); + setState(2701); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2698); + match(NL); + } + } + setState(2703); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2704); + simpleIdentifier(); + } + } + } + setState(2709); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,412,_ctx); + } + setState(2717); + switch ( getInterpreter().adaptivePredict(_input,414,_ctx) ) { + case 1: + { + setState(2713); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2710); + match(NL); + } + } + setState(2715); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2716); + typeArguments(); + } + break; + } + setState(2726); + switch ( getInterpreter().adaptivePredict(_input,416,_ctx) ) { + case 1: + { + setState(2722); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2719); + match(NL); + } + } + setState(2724); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2725); + valueArguments(); + } + break; + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationListContext extends ParserRuleContext { + public AnnotationUseSiteTargetContext annotationUseSiteTarget() { + return getRuleContext(AnnotationUseSiteTargetContext.class,0); + } + public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); } + public TerminalNode LSQUARE() { return getToken(KotlinParser.LSQUARE, 0); } + public TerminalNode RSQUARE() { return getToken(KotlinParser.RSQUARE, 0); } + public List unescapedAnnotation() { + return getRuleContexts(UnescapedAnnotationContext.class); + } + public UnescapedAnnotationContext unescapedAnnotation(int i) { + return getRuleContext(UnescapedAnnotationContext.class,i); + } + public TerminalNode AT() { return getToken(KotlinParser.AT, 0); } + public AnnotationListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterAnnotationList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitAnnotationList(this); + } + } + + public final AnnotationListContext annotationList() throws RecognitionException { + AnnotationListContext _localctx = new AnnotationListContext(_ctx, getState()); + enterRule(_localctx, 280, RULE_annotationList); + int _la; + try { + setState(2749); + switch (_input.LA(1)) { + case FILE: + case FIELD: + case PROPERTY: + case GET: + case SET: + case RECEIVER: + case PARAM: + case SETPARAM: + case DELEGATE: + enterOuterAlt(_localctx, 1); + { + setState(2730); + annotationUseSiteTarget(); + setState(2731); + match(COLON); + setState(2732); + match(LSQUARE); + setState(2734); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(2733); + unescapedAnnotation(); + } + } + setState(2736); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( ((((_la - 58)) & ~0x3f) == 0 && ((1L << (_la - 58)) & ((1L << (IMPORT - 58)) | (1L << (CONSTRUCTOR - 58)) | (1L << (BY - 58)) | (1L << (COMPANION - 58)) | (1L << (INIT - 58)) | (1L << (WHERE - 58)) | (1L << (CATCH - 58)) | (1L << (FINALLY - 58)) | (1L << (OUT - 58)) | (1L << (GETTER - 58)) | (1L << (SETTER - 58)) | (1L << (DYNAMIC - 58)) | (1L << (PUBLIC - 58)) | (1L << (PRIVATE - 58)) | (1L << (PROTECTED - 58)) | (1L << (INTERNAL - 58)) | (1L << (ENUM - 58)) | (1L << (SEALED - 58)) | (1L << (ANNOTATION - 58)) | (1L << (DATA - 58)) | (1L << (INNER - 58)) | (1L << (TAILREC - 58)) | (1L << (OPERATOR - 58)) | (1L << (INLINE - 58)) | (1L << (INFIX - 58)) | (1L << (EXTERNAL - 58)) | (1L << (SUSPEND - 58)) | (1L << (OVERRIDE - 58)) | (1L << (ABSTRACT - 58)) | (1L << (FINAL - 58)))) != 0) || ((((_la - 122)) & ~0x3f) == 0 && ((1L << (_la - 122)) & ((1L << (OPEN - 122)) | (1L << (CONST - 122)) | (1L << (LATEINIT - 122)) | (1L << (VARARG - 122)) | (1L << (NOINLINE - 122)) | (1L << (CROSSINLINE - 122)) | (1L << (REIFIED - 122)) | (1L << (Identifier - 122)))) != 0) ); + setState(2738); + match(RSQUARE); + } + break; + case AT: + enterOuterAlt(_localctx, 2); + { + setState(2740); + match(AT); + setState(2741); + match(LSQUARE); + setState(2743); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(2742); + unescapedAnnotation(); + } + } + setState(2745); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( ((((_la - 58)) & ~0x3f) == 0 && ((1L << (_la - 58)) & ((1L << (IMPORT - 58)) | (1L << (CONSTRUCTOR - 58)) | (1L << (BY - 58)) | (1L << (COMPANION - 58)) | (1L << (INIT - 58)) | (1L << (WHERE - 58)) | (1L << (CATCH - 58)) | (1L << (FINALLY - 58)) | (1L << (OUT - 58)) | (1L << (GETTER - 58)) | (1L << (SETTER - 58)) | (1L << (DYNAMIC - 58)) | (1L << (PUBLIC - 58)) | (1L << (PRIVATE - 58)) | (1L << (PROTECTED - 58)) | (1L << (INTERNAL - 58)) | (1L << (ENUM - 58)) | (1L << (SEALED - 58)) | (1L << (ANNOTATION - 58)) | (1L << (DATA - 58)) | (1L << (INNER - 58)) | (1L << (TAILREC - 58)) | (1L << (OPERATOR - 58)) | (1L << (INLINE - 58)) | (1L << (INFIX - 58)) | (1L << (EXTERNAL - 58)) | (1L << (SUSPEND - 58)) | (1L << (OVERRIDE - 58)) | (1L << (ABSTRACT - 58)) | (1L << (FINAL - 58)))) != 0) || ((((_la - 122)) & ~0x3f) == 0 && ((1L << (_la - 122)) & ((1L << (OPEN - 122)) | (1L << (CONST - 122)) | (1L << (LATEINIT - 122)) | (1L << (VARARG - 122)) | (1L << (NOINLINE - 122)) | (1L << (CROSSINLINE - 122)) | (1L << (REIFIED - 122)) | (1L << (Identifier - 122)))) != 0) ); + setState(2747); + match(RSQUARE); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationUseSiteTargetContext extends ParserRuleContext { + public TerminalNode FIELD() { return getToken(KotlinParser.FIELD, 0); } + public TerminalNode FILE() { return getToken(KotlinParser.FILE, 0); } + public TerminalNode PROPERTY() { return getToken(KotlinParser.PROPERTY, 0); } + public TerminalNode GET() { return getToken(KotlinParser.GET, 0); } + public TerminalNode SET() { return getToken(KotlinParser.SET, 0); } + public TerminalNode RECEIVER() { return getToken(KotlinParser.RECEIVER, 0); } + public TerminalNode PARAM() { return getToken(KotlinParser.PARAM, 0); } + public TerminalNode SETPARAM() { return getToken(KotlinParser.SETPARAM, 0); } + public TerminalNode DELEGATE() { return getToken(KotlinParser.DELEGATE, 0); } + public AnnotationUseSiteTargetContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationUseSiteTarget; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterAnnotationUseSiteTarget(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitAnnotationUseSiteTarget(this); + } + } + + public final AnnotationUseSiteTargetContext annotationUseSiteTarget() throws RecognitionException { + AnnotationUseSiteTargetContext _localctx = new AnnotationUseSiteTargetContext(_ctx, getState()); + enterRule(_localctx, 282, RULE_annotationUseSiteTarget); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2751); + _la = _input.LA(1); + if ( !(((((_la - 56)) & ~0x3f) == 0 && ((1L << (_la - 56)) & ((1L << (FILE - 56)) | (1L << (FIELD - 56)) | (1L << (PROPERTY - 56)) | (1L << (GET - 56)) | (1L << (SET - 56)) | (1L << (RECEIVER - 56)) | (1L << (PARAM - 56)) | (1L << (SETPARAM - 56)) | (1L << (DELEGATE - 56)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class UnescapedAnnotationContext extends ParserRuleContext { + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public TypeArgumentsContext typeArguments() { + return getRuleContext(TypeArgumentsContext.class,0); + } + public ValueArgumentsContext valueArguments() { + return getRuleContext(ValueArgumentsContext.class,0); + } + public UnescapedAnnotationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_unescapedAnnotation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterUnescapedAnnotation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitUnescapedAnnotation(this); + } + } + + public final UnescapedAnnotationContext unescapedAnnotation() throws RecognitionException { + UnescapedAnnotationContext _localctx = new UnescapedAnnotationContext(_ctx, getState()); + enterRule(_localctx, 284, RULE_unescapedAnnotation); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2753); + identifier(); + setState(2755); + _la = _input.LA(1); + if (_la==LANGLE) { + { + setState(2754); + typeArguments(); + } + } + + setState(2758); + switch ( getInterpreter().adaptivePredict(_input,422,_ctx) ) { + case 1: + { + setState(2757); + valueArguments(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IdentifierContext extends ParserRuleContext { + public List simpleIdentifier() { + return getRuleContexts(SimpleIdentifierContext.class); + } + public SimpleIdentifierContext simpleIdentifier(int i) { + return getRuleContext(SimpleIdentifierContext.class,i); + } + public List DOT() { return getTokens(KotlinParser.DOT); } + public TerminalNode DOT(int i) { + return getToken(KotlinParser.DOT, i); + } + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public IdentifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_identifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterIdentifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitIdentifier(this); + } + } + + public final IdentifierContext identifier() throws RecognitionException { + IdentifierContext _localctx = new IdentifierContext(_ctx, getState()); + enterRule(_localctx, 286, RULE_identifier); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(2760); + simpleIdentifier(); + setState(2771); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,424,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2764); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2761); + match(NL); + } + } + setState(2766); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2767); + match(DOT); + setState(2768); + simpleIdentifier(); + } + } + } + setState(2773); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,424,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SimpleIdentifierContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(KotlinParser.Identifier, 0); } + public TerminalNode ABSTRACT() { return getToken(KotlinParser.ABSTRACT, 0); } + public TerminalNode ANNOTATION() { return getToken(KotlinParser.ANNOTATION, 0); } + public TerminalNode BY() { return getToken(KotlinParser.BY, 0); } + public TerminalNode CATCH() { return getToken(KotlinParser.CATCH, 0); } + public TerminalNode COMPANION() { return getToken(KotlinParser.COMPANION, 0); } + public TerminalNode CONSTRUCTOR() { return getToken(KotlinParser.CONSTRUCTOR, 0); } + public TerminalNode CROSSINLINE() { return getToken(KotlinParser.CROSSINLINE, 0); } + public TerminalNode DATA() { return getToken(KotlinParser.DATA, 0); } + public TerminalNode DYNAMIC() { return getToken(KotlinParser.DYNAMIC, 0); } + public TerminalNode ENUM() { return getToken(KotlinParser.ENUM, 0); } + public TerminalNode EXTERNAL() { return getToken(KotlinParser.EXTERNAL, 0); } + public TerminalNode FINAL() { return getToken(KotlinParser.FINAL, 0); } + public TerminalNode FINALLY() { return getToken(KotlinParser.FINALLY, 0); } + public TerminalNode GETTER() { return getToken(KotlinParser.GETTER, 0); } + public TerminalNode IMPORT() { return getToken(KotlinParser.IMPORT, 0); } + public TerminalNode INFIX() { return getToken(KotlinParser.INFIX, 0); } + public TerminalNode INIT() { return getToken(KotlinParser.INIT, 0); } + public TerminalNode INLINE() { return getToken(KotlinParser.INLINE, 0); } + public TerminalNode INNER() { return getToken(KotlinParser.INNER, 0); } + public TerminalNode INTERNAL() { return getToken(KotlinParser.INTERNAL, 0); } + public TerminalNode LATEINIT() { return getToken(KotlinParser.LATEINIT, 0); } + public TerminalNode NOINLINE() { return getToken(KotlinParser.NOINLINE, 0); } + public TerminalNode OPEN() { return getToken(KotlinParser.OPEN, 0); } + public TerminalNode OPERATOR() { return getToken(KotlinParser.OPERATOR, 0); } + public TerminalNode OUT() { return getToken(KotlinParser.OUT, 0); } + public TerminalNode OVERRIDE() { return getToken(KotlinParser.OVERRIDE, 0); } + public TerminalNode PRIVATE() { return getToken(KotlinParser.PRIVATE, 0); } + public TerminalNode PROTECTED() { return getToken(KotlinParser.PROTECTED, 0); } + public TerminalNode PUBLIC() { return getToken(KotlinParser.PUBLIC, 0); } + public TerminalNode REIFIED() { return getToken(KotlinParser.REIFIED, 0); } + public TerminalNode SEALED() { return getToken(KotlinParser.SEALED, 0); } + public TerminalNode TAILREC() { return getToken(KotlinParser.TAILREC, 0); } + public TerminalNode SETTER() { return getToken(KotlinParser.SETTER, 0); } + public TerminalNode VARARG() { return getToken(KotlinParser.VARARG, 0); } + public TerminalNode WHERE() { return getToken(KotlinParser.WHERE, 0); } + public TerminalNode CONST() { return getToken(KotlinParser.CONST, 0); } + public TerminalNode SUSPEND() { return getToken(KotlinParser.SUSPEND, 0); } + public SimpleIdentifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_simpleIdentifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterSimpleIdentifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitSimpleIdentifier(this); + } + } + + public final SimpleIdentifierContext simpleIdentifier() throws RecognitionException { + SimpleIdentifierContext _localctx = new SimpleIdentifierContext(_ctx, getState()); + enterRule(_localctx, 288, RULE_simpleIdentifier); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2774); + _la = _input.LA(1); + if ( !(((((_la - 58)) & ~0x3f) == 0 && ((1L << (_la - 58)) & ((1L << (IMPORT - 58)) | (1L << (CONSTRUCTOR - 58)) | (1L << (BY - 58)) | (1L << (COMPANION - 58)) | (1L << (INIT - 58)) | (1L << (WHERE - 58)) | (1L << (CATCH - 58)) | (1L << (FINALLY - 58)) | (1L << (OUT - 58)) | (1L << (GETTER - 58)) | (1L << (SETTER - 58)) | (1L << (DYNAMIC - 58)) | (1L << (PUBLIC - 58)) | (1L << (PRIVATE - 58)) | (1L << (PROTECTED - 58)) | (1L << (INTERNAL - 58)) | (1L << (ENUM - 58)) | (1L << (SEALED - 58)) | (1L << (ANNOTATION - 58)) | (1L << (DATA - 58)) | (1L << (INNER - 58)) | (1L << (TAILREC - 58)) | (1L << (OPERATOR - 58)) | (1L << (INLINE - 58)) | (1L << (INFIX - 58)) | (1L << (EXTERNAL - 58)) | (1L << (SUSPEND - 58)) | (1L << (OVERRIDE - 58)) | (1L << (ABSTRACT - 58)) | (1L << (FINAL - 58)))) != 0) || ((((_la - 122)) & ~0x3f) == 0 && ((1L << (_la - 122)) & ((1L << (OPEN - 122)) | (1L << (CONST - 122)) | (1L << (LATEINIT - 122)) | (1L << (VARARG - 122)) | (1L << (NOINLINE - 122)) | (1L << (CROSSINLINE - 122)) | (1L << (REIFIED - 122)) | (1L << (Identifier - 122)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SemiContext extends ParserRuleContext { + public List NL() { return getTokens(KotlinParser.NL); } + public TerminalNode NL(int i) { + return getToken(KotlinParser.NL, i); + } + public TerminalNode SEMICOLON() { return getToken(KotlinParser.SEMICOLON, 0); } + public SemiContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_semi; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterSemi(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitSemi(this); + } + } + + public final SemiContext semi() throws RecognitionException { + SemiContext _localctx = new SemiContext(_ctx, getState()); + enterRule(_localctx, 290, RULE_semi); + int _la; + try { + int _alt; + setState(2794); + switch ( getInterpreter().adaptivePredict(_input,428,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(2777); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(2776); + match(NL); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(2779); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,425,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(2784); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==NL) { + { + { + setState(2781); + match(NL); + } + } + setState(2786); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(2787); + match(SEMICOLON); + setState(2791); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,427,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(2788); + match(NL); + } + } + } + setState(2793); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,427,_ctx); + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnysemiContext extends ParserRuleContext { + public TerminalNode NL() { return getToken(KotlinParser.NL, 0); } + public TerminalNode SEMICOLON() { return getToken(KotlinParser.SEMICOLON, 0); } + public AnysemiContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_anysemi; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).enterAnysemi(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KotlinParserListener ) ((KotlinParserListener)listener).exitAnysemi(this); + } + } + + public final AnysemiContext anysemi() throws RecognitionException { + AnysemiContext _localctx = new AnysemiContext(_ctx, getState()); + enterRule(_localctx, 292, RULE_anysemi); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(2796); + _la = _input.LA(1); + if ( !(_la==NL || _la==SEMICOLON) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + private static final int _serializedATNSegments = 2; + private static final String _serializedATNSegment0 = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\u00ac\u0af1\4\2\t"+ + "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ + "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ + "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ + "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ + "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+ + "k\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4"+ + "w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t\u0080"+ + "\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083\4\u0084\t\u0084\4\u0085"+ + "\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087\4\u0088\t\u0088\4\u0089\t\u0089"+ + "\4\u008a\t\u008a\4\u008b\t\u008b\4\u008c\t\u008c\4\u008d\t\u008d\4\u008e"+ + "\t\u008e\4\u008f\t\u008f\4\u0090\t\u0090\4\u0091\t\u0091\4\u0092\t\u0092"+ + "\4\u0093\t\u0093\4\u0094\t\u0094\3\2\7\2\u012a\n\2\f\2\16\2\u012d\13\2"+ + "\3\2\3\2\7\2\u0131\n\2\f\2\16\2\u0134\13\2\3\2\3\2\6\2\u0138\n\2\r\2\16"+ + "\2\u0139\3\2\5\2\u013d\n\2\7\2\u013f\n\2\f\2\16\2\u0142\13\2\5\2\u0144"+ + "\n\2\3\2\3\2\3\3\7\3\u0149\n\3\f\3\16\3\u014c\13\3\3\3\3\3\7\3\u0150\n"+ + "\3\f\3\16\3\u0153\13\3\3\3\3\3\6\3\u0157\n\3\r\3\16\3\u0158\3\3\5\3\u015c"+ + "\n\3\7\3\u015e\n\3\f\3\16\3\u0161\13\3\5\3\u0163\n\3\3\3\3\3\3\4\5\4\u0168"+ + "\n\4\3\4\3\4\3\4\3\5\6\5\u016e\n\5\r\5\16\5\u016f\3\6\3\6\3\6\3\6\6\6"+ + "\u0176\n\6\r\6\16\6\u0177\3\6\3\6\3\6\5\6\u017d\n\6\3\6\5\6\u0180\n\6"+ + "\6\6\u0182\n\6\r\6\16\6\u0183\3\7\5\7\u0187\n\7\3\7\3\7\3\7\5\7\u018c"+ + "\n\7\5\7\u018e\n\7\3\b\7\b\u0191\n\b\f\b\16\b\u0194\13\b\3\t\3\t\3\t\3"+ + "\t\3\t\5\t\u019b\n\t\3\t\5\t\u019e\n\t\3\n\3\n\3\n\3\13\3\13\3\13\3\13"+ + "\3\13\5\13\u01a8\n\13\3\f\5\f\u01ab\n\f\3\f\3\f\7\f\u01af\n\f\f\f\16\f"+ + "\u01b2\13\f\3\f\3\f\7\f\u01b6\n\f\f\f\16\f\u01b9\13\f\3\f\5\f\u01bc\n"+ + "\f\3\f\7\f\u01bf\n\f\f\f\16\f\u01c2\13\f\3\f\5\f\u01c5\n\f\3\f\7\f\u01c8"+ + "\n\f\f\f\16\f\u01cb\13\f\3\f\3\f\7\f\u01cf\n\f\f\f\16\f\u01d2\13\f\3\f"+ + "\5\f\u01d5\n\f\3\f\7\f\u01d8\n\f\f\f\16\f\u01db\13\f\3\f\5\f\u01de\n\f"+ + "\3\f\7\f\u01e1\n\f\f\f\16\f\u01e4\13\f\3\f\3\f\7\f\u01e8\n\f\f\f\16\f"+ + "\u01eb\13\f\3\f\5\f\u01ee\n\f\3\r\5\r\u01f1\n\r\3\r\3\r\7\r\u01f5\n\r"+ + "\f\r\16\r\u01f8\13\r\5\r\u01fa\n\r\3\r\3\r\3\16\3\16\3\16\3\16\7\16\u0202"+ + "\n\16\f\16\16\16\u0205\13\16\3\16\5\16\u0208\n\16\5\16\u020a\n\16\3\16"+ + "\3\16\3\17\5\17\u020f\n\17\3\17\5\17\u0212\n\17\3\17\3\17\3\17\3\17\3"+ + "\17\5\17\u0219\n\17\3\20\7\20\u021c\n\20\f\20\16\20\u021f\13\20\3\20\3"+ + "\20\7\20\u0223\n\20\f\20\16\20\u0226\13\20\3\20\3\20\7\20\u022a\n\20\f"+ + "\20\16\20\u022d\13\20\3\20\7\20\u0230\n\20\f\20\16\20\u0233\13\20\3\20"+ + "\7\20\u0236\n\20\f\20\16\20\u0239\13\20\3\21\3\21\3\21\5\21\u023e\n\21"+ + "\3\22\3\22\3\22\3\23\3\23\7\23\u0245\n\23\f\23\16\23\u0248\13\23\3\23"+ + "\3\23\7\23\u024c\n\23\f\23\16\23\u024f\13\23\3\23\3\23\3\24\3\24\7\24"+ + "\u0255\n\24\f\24\16\24\u0258\13\24\3\24\7\24\u025b\n\24\f\24\16\24\u025e"+ + "\13\24\3\24\7\24\u0261\n\24\f\24\16\24\u0264\13\24\3\24\3\24\3\25\3\25"+ + "\3\25\3\25\3\25\3\25\3\25\3\25\5\25\u0270\n\25\3\25\6\25\u0273\n\25\r"+ + "\25\16\25\u0274\3\26\3\26\7\26\u0279\n\26\f\26\16\26\u027c\13\26\3\26"+ + "\3\26\3\27\5\27\u0281\n\27\3\27\3\27\7\27\u0285\n\27\f\27\16\27\u0288"+ + "\13\27\3\27\3\27\7\27\u028c\n\27\f\27\16\27\u028f\13\27\3\27\3\27\7\27"+ + "\u0293\n\27\f\27\16\27\u0296\13\27\3\27\5\27\u0299\n\27\3\27\7\27\u029c"+ + "\n\27\f\27\16\27\u029f\13\27\3\27\5\27\u02a2\n\27\3\30\3\30\7\30\u02a6"+ + "\n\30\f\30\16\30\u02a9\13\30\3\30\3\30\3\30\7\30\u02ae\n\30\f\30\16\30"+ + "\u02b1\13\30\3\30\5\30\u02b4\n\30\3\31\3\31\7\31\u02b8\n\31\f\31\16\31"+ + "\u02bb\13\31\3\31\5\31\u02be\n\31\3\31\7\31\u02c1\n\31\f\31\16\31\u02c4"+ + "\13\31\3\31\3\31\7\31\u02c8\n\31\f\31\16\31\u02cb\13\31\3\31\7\31\u02ce"+ + "\n\31\f\31\16\31\u02d1\13\31\5\31\u02d3\n\31\3\31\7\31\u02d6\n\31\f\31"+ + "\16\31\u02d9\13\31\3\31\3\31\3\32\3\32\7\32\u02df\n\32\f\32\16\32\u02e2"+ + "\13\32\6\32\u02e4\n\32\r\32\16\32\u02e5\3\32\5\32\u02e9\n\32\3\33\7\33"+ + "\u02ec\n\33\f\33\16\33\u02ef\13\33\3\33\3\33\7\33\u02f3\n\33\f\33\16\33"+ + "\u02f6\13\33\3\33\5\33\u02f9\n\33\3\33\7\33\u02fc\n\33\f\33\16\33\u02ff"+ + "\13\33\3\33\5\33\u0302\n\33\3\33\7\33\u0305\n\33\f\33\16\33\u0308\13\33"+ + "\3\33\5\33\u030b\n\33\3\34\5\34\u030e\n\34\3\34\3\34\7\34\u0312\n\34\f"+ + "\34\16\34\u0315\13\34\3\34\3\34\7\34\u0319\n\34\f\34\16\34\u031c\13\34"+ + "\3\34\3\34\5\34\u0320\n\34\3\34\7\34\u0323\n\34\f\34\16\34\u0326\13\34"+ + "\3\34\5\34\u0329\n\34\3\34\7\34\u032c\n\34\f\34\16\34\u032f\13\34\3\34"+ + "\3\34\7\34\u0333\n\34\f\34\16\34\u0336\13\34\3\34\3\34\5\34\u033a\n\34"+ + "\3\34\7\34\u033d\n\34\f\34\16\34\u0340\13\34\3\34\5\34\u0343\n\34\3\34"+ + "\7\34\u0346\n\34\f\34\16\34\u0349\13\34\3\34\3\34\7\34\u034d\n\34\f\34"+ + "\16\34\u0350\13\34\3\34\3\34\7\34\u0354\n\34\f\34\16\34\u0357\13\34\3"+ + "\34\5\34\u035a\n\34\3\34\7\34\u035d\n\34\f\34\16\34\u0360\13\34\3\34\5"+ + "\34\u0363\n\34\3\34\7\34\u0366\n\34\f\34\16\34\u0369\13\34\3\34\5\34\u036c"+ + "\n\34\3\35\3\35\3\35\3\35\7\35\u0372\n\35\f\35\16\35\u0375\13\35\3\35"+ + "\5\35\u0378\n\35\5\35\u037a\n\35\3\35\3\35\3\36\5\36\u037f\n\36\3\36\3"+ + "\36\3\36\5\36\u0384\n\36\3\37\3\37\3\37\3\37\3 \5 \u038b\n \3 \3 \3 \5"+ + " \u0390\n \3!\3!\3!\7!\u0395\n!\f!\16!\u0398\13!\3!\5!\u039b\n!\3\"\5"+ + "\"\u039e\n\"\3\"\3\"\7\"\u03a2\n\"\f\"\16\"\u03a5\13\"\3\"\3\"\7\"\u03a9"+ + "\n\"\f\"\16\"\u03ac\13\"\3\"\5\"\u03af\n\"\3\"\7\"\u03b2\n\"\f\"\16\""+ + "\u03b5\13\"\3\"\3\"\7\"\u03b9\n\"\f\"\16\"\u03bc\13\"\3\"\5\"\u03bf\n"+ + "\"\3\"\7\"\u03c2\n\"\f\"\16\"\u03c5\13\"\3\"\5\"\u03c8\n\"\3#\5#\u03cb"+ + "\n#\3#\3#\7#\u03cf\n#\f#\16#\u03d2\13#\3#\5#\u03d5\n#\3#\3#\7#\u03d9\n"+ + "#\f#\16#\u03dc\13#\3#\5#\u03df\n#\3#\7#\u03e2\n#\f#\16#\u03e5\13#\3#\3"+ + "#\7#\u03e9\n#\f#\16#\u03ec\13#\3#\5#\u03ef\n#\3#\7#\u03f2\n#\f#\16#\u03f5"+ + "\13#\3#\5#\u03f8\n#\3$\5$\u03fb\n$\3$\3$\7$\u03ff\n$\f$\16$\u0402\13$"+ + "\3$\5$\u0405\n$\3$\7$\u0408\n$\f$\16$\u040b\13$\3$\3$\7$\u040f\n$\f$\16"+ + "$\u0412\13$\3$\3$\5$\u0416\n$\3$\7$\u0419\n$\f$\16$\u041c\13$\3$\3$\5"+ + "$\u0420\n$\3$\7$\u0423\n$\f$\16$\u0426\13$\3$\5$\u0429\n$\3$\7$\u042c"+ + "\n$\f$\16$\u042f\13$\3$\3$\7$\u0433\n$\f$\16$\u0436\13$\3$\5$\u0439\n"+ + "$\3$\7$\u043c\n$\f$\16$\u043f\13$\3$\3$\3$\3$\5$\u0445\n$\3$\7$\u0448"+ + "\n$\f$\16$\u044b\13$\3$\3$\3$\3$\5$\u0451\n$\5$\u0453\n$\3%\3%\3%\3%\7"+ + "%\u0459\n%\f%\16%\u045c\13%\3%\3%\3&\3&\3&\5&\u0463\n&\3\'\5\'\u0466\n"+ + "\'\3\'\3\'\5\'\u046a\n\'\3\'\3\'\7\'\u046e\n\'\f\'\16\'\u0471\13\'\3\'"+ + "\3\'\3\'\7\'\u0476\n\'\f\'\16\'\u0479\13\'\3\'\3\'\7\'\u047d\n\'\f\'\16"+ + "\'\u0480\13\'\3\'\5\'\u0483\n\'\3\'\7\'\u0486\n\'\f\'\16\'\u0489\13\'"+ + "\3\'\3\'\3\'\7\'\u048e\n\'\f\'\16\'\u0491\13\'\3\'\5\'\u0494\n\'\5\'\u0496"+ + "\n\'\3(\5(\u0499\n(\3(\3(\5(\u049d\n(\3(\3(\7(\u04a1\n(\f(\16(\u04a4\13"+ + "(\3(\3(\3(\7(\u04a9\n(\f(\16(\u04ac\13(\3(\3(\5(\u04b0\n(\3(\3(\7(\u04b4"+ + "\n(\f(\16(\u04b7\13(\3(\3(\5(\u04bb\n(\3)\5)\u04be\n)\3)\3)\7)\u04c2\n"+ + ")\f)\16)\u04c5\13)\3)\3)\7)\u04c9\n)\f)\16)\u04cc\13)\3)\5)\u04cf\n)\3"+ + ")\7)\u04d2\n)\f)\16)\u04d5\13)\3)\3)\7)\u04d9\n)\f)\16)\u04dc\13)\3)\3"+ + ")\3*\3*\7*\u04e2\n*\f*\16*\u04e5\13*\3*\3*\7*\u04e9\n*\f*\16*\u04ec\13"+ + "*\3*\3*\7*\u04f0\n*\f*\16*\u04f3\13*\3*\7*\u04f6\n*\f*\16*\u04f9\13*\3"+ + "*\7*\u04fc\n*\f*\16*\u04ff\13*\3*\5*\u0502\n*\3*\7*\u0505\n*\f*\16*\u0508"+ + "\13*\3*\3*\3+\5+\u050d\n+\3+\7+\u0510\n+\f+\16+\u0513\13+\3+\3+\5+\u0517"+ + "\n+\3+\7+\u051a\n+\f+\16+\u051d\13+\3+\3+\7+\u0521\n+\f+\16+\u0524\13"+ + "+\3+\5+\u0527\n+\3,\5,\u052a\n,\3,\3,\3,\3,\5,\u0530\n,\3-\3-\3-\7-\u0535"+ + "\n-\f-\16-\u0538\13-\6-\u053a\n-\r-\16-\u053b\3.\3.\3.\3.\3/\3/\5/\u0544"+ + "\n/\3/\7/\u0547\n/\f/\16/\u054a\13/\3/\6/\u054d\n/\r/\16/\u054e\3\60\3"+ + "\60\3\60\3\60\3\60\3\60\5\60\u0557\n\60\3\61\3\61\7\61\u055b\n\61\f\61"+ + "\16\61\u055e\13\61\3\61\3\61\7\61\u0562\n\61\f\61\16\61\u0565\13\61\5"+ + "\61\u0567\n\61\3\61\3\61\7\61\u056b\n\61\f\61\16\61\u056e\13\61\3\61\3"+ + "\61\7\61\u0572\n\61\f\61\16\61\u0575\13\61\3\61\3\61\3\62\3\62\3\62\5"+ + "\62\u057c\n\62\3\63\3\63\7\63\u0580\n\63\f\63\16\63\u0583\13\63\3\63\3"+ + "\63\7\63\u0587\n\63\f\63\16\63\u058a\13\63\3\63\7\63\u058d\n\63\f\63\16"+ + "\63\u0590\13\63\3\64\3\64\7\64\u0594\n\64\f\64\16\64\u0597\13\64\3\64"+ + "\5\64\u059a\n\64\3\65\3\65\7\65\u059e\n\65\f\65\16\65\u05a1\13\65\3\65"+ + "\3\65\5\65\u05a5\n\65\3\65\7\65\u05a8\n\65\f\65\16\65\u05ab\13\65\3\65"+ + "\3\65\7\65\u05af\n\65\f\65\16\65\u05b2\13\65\3\65\3\65\5\65\u05b6\n\65"+ + "\7\65\u05b8\n\65\f\65\16\65\u05bb\13\65\3\65\7\65\u05be\n\65\f\65\16\65"+ + "\u05c1\13\65\3\65\5\65\u05c4\n\65\3\65\7\65\u05c7\n\65\f\65\16\65\u05ca"+ + "\13\65\3\65\3\65\3\66\3\66\7\66\u05d0\n\66\f\66\16\66\u05d3\13\66\3\66"+ + "\3\66\7\66\u05d7\n\66\f\66\16\66\u05da\13\66\3\66\3\66\7\66\u05de\n\66"+ + "\f\66\16\66\u05e1\13\66\3\66\7\66\u05e4\n\66\f\66\16\66\u05e7\13\66\3"+ + "\67\7\67\u05ea\n\67\f\67\16\67\u05ed\13\67\3\67\3\67\7\67\u05f1\n\67\f"+ + "\67\16\67\u05f4\13\67\3\67\3\67\7\67\u05f8\n\67\f\67\16\67\u05fb\13\67"+ + "\3\67\3\67\38\38\38\38\39\79\u0604\n9\f9\169\u0607\139\39\39\69\u060b"+ + "\n9\r9\169\u060c\39\59\u0610\n9\79\u0612\n9\f9\169\u0615\139\59\u0617"+ + "\n9\3:\3:\5:\u061b\n:\3;\7;\u061e\n;\f;\16;\u0621\13;\3;\7;\u0624\n;\f"+ + ";\16;\u0627\13;\3;\3;\3<\7<\u062c\n<\f<\16<\u062f\13<\3<\3<\3<\3<\5<\u0635"+ + "\n<\3=\3=\3=\3=\7=\u063b\n=\f=\16=\u063e\13=\3>\3>\7>\u0642\n>\f>\16>"+ + "\u0645\13>\3>\3>\7>\u0649\n>\f>\16>\u064c\13>\3>\7>\u064f\n>\f>\16>\u0652"+ + "\13>\3?\3?\7?\u0656\n?\f?\16?\u0659\13?\3?\3?\7?\u065d\n?\f?\16?\u0660"+ + "\13?\3?\7?\u0663\n?\f?\16?\u0666\13?\3@\3@\3@\7@\u066b\n@\f@\16@\u066e"+ + "\13@\3@\3@\7@\u0672\n@\f@\16@\u0675\13@\3A\3A\3A\7A\u067a\nA\fA\16A\u067d"+ + "\13A\3A\3A\5A\u0681\nA\3B\3B\3B\7B\u0686\nB\fB\16B\u0689\13B\3B\3B\6B"+ + "\u068d\nB\rB\16B\u068e\3B\3B\7B\u0693\nB\fB\16B\u0696\13B\3B\3B\5B\u069a"+ + "\nB\3C\3C\7C\u069e\nC\fC\16C\u06a1\13C\3C\3C\7C\u06a5\nC\fC\16C\u06a8"+ + "\13C\3C\7C\u06ab\nC\fC\16C\u06ae\13C\3D\3D\3D\7D\u06b3\nD\fD\16D\u06b6"+ + "\13D\3D\3D\7D\u06ba\nD\fD\16D\u06bd\13D\3E\3E\3E\7E\u06c2\nE\fE\16E\u06c5"+ + "\13E\3E\7E\u06c8\nE\fE\16E\u06cb\13E\3F\3F\3F\7F\u06d0\nF\fF\16F\u06d3"+ + "\13F\3F\3F\7F\u06d7\nF\fF\16F\u06da\13F\3G\3G\3G\7G\u06df\nG\fG\16G\u06e2"+ + "\13G\3G\3G\7G\u06e6\nG\fG\16G\u06e9\13G\3H\3H\7H\u06ed\nH\fH\16H\u06f0"+ + "\13H\3H\3H\3H\7H\u06f5\nH\fH\16H\u06f8\13H\3I\7I\u06fb\nI\fI\16I\u06fe"+ + "\13I\3I\3I\3J\3J\5J\u0704\nJ\3J\7J\u0707\nJ\fJ\16J\u070a\13J\3K\3K\3K"+ + "\3K\3K\3K\3K\3K\3K\3K\3K\3K\3K\3K\5K\u071a\nK\3L\3L\3L\3L\3M\3M\5M\u0722"+ + "\nM\3M\7M\u0725\nM\fM\16M\u0728\13M\3M\3M\7M\u072c\nM\fM\16M\u072f\13"+ + "M\3M\6M\u0732\nM\rM\16M\u0733\5M\u0736\nM\3N\7N\u0739\nN\fN\16N\u073c"+ + "\13N\3N\5N\u073f\nN\3N\7N\u0742\nN\fN\16N\u0745\13N\3N\3N\3O\3O\3O\3O"+ + "\7O\u074d\nO\fO\16O\u0750\13O\5O\u0752\nO\3O\3O\3P\3P\3P\3P\7P\u075a\n"+ + "P\fP\16P\u075d\13P\3P\7P\u0760\nP\fP\16P\u0763\13P\3P\5P\u0766\nP\5P\u0768"+ + "\nP\3P\3P\3Q\3Q\7Q\u076e\nQ\fQ\16Q\u0771\13Q\3Q\3Q\7Q\u0775\nQ\fQ\16Q"+ + "\u0778\13Q\3Q\3Q\7Q\u077c\nQ\fQ\16Q\u077f\13Q\3Q\7Q\u0782\nQ\fQ\16Q\u0785"+ + "\13Q\3Q\5Q\u0788\nQ\3Q\7Q\u078b\nQ\fQ\16Q\u078e\13Q\3Q\3Q\5Q\u0792\nQ"+ + "\3R\5R\u0795\nR\3R\3R\5R\u0799\nR\3S\6S\u079c\nS\rS\16S\u079d\3T\3T\7"+ + "T\u07a2\nT\fT\16T\u07a5\13T\3T\3T\7T\u07a9\nT\fT\16T\u07ac\13T\5T\u07ae"+ + "\nT\3T\5T\u07b1\nT\3T\7T\u07b4\nT\fT\16T\u07b7\13T\3T\3T\3U\3U\3U\3U\3"+ + "U\3U\3U\3U\3U\5U\u07c4\nU\3V\3V\5V\u07c8\nV\3W\3W\3W\7W\u07cd\nW\fW\16"+ + "W\u07d0\13W\3W\3W\3X\3X\3X\3X\3X\7X\u07d9\nX\fX\16X\u07dc\13X\3X\3X\3"+ + "Y\3Y\3Z\3Z\3Z\3Z\3[\3[\3\\\3\\\3\\\3\\\3]\7]\u07ed\n]\f]\16]\u07f0\13"+ + "]\3]\3]\7]\u07f4\n]\f]\16]\u07f7\13]\3]\3]\7]\u07fb\n]\f]\16]\u07fe\13"+ + "]\3]\3]\3]\3]\7]\u0804\n]\f]\16]\u0807\13]\3]\3]\7]\u080b\n]\f]\16]\u080e"+ + "\13]\3]\3]\7]\u0812\n]\f]\16]\u0815\13]\3]\3]\7]\u0819\n]\f]\16]\u081c"+ + "\13]\3]\3]\5]\u0820\n]\3^\5^\u0823\n^\3^\7^\u0826\n^\f^\16^\u0829\13^"+ + "\3^\3^\7^\u082d\n^\f^\16^\u0830\13^\3^\7^\u0833\n^\f^\16^\u0836\13^\3"+ + "_\3_\3_\7_\u083b\n_\f_\16_\u083e\13_\3_\3_\7_\u0842\n_\f_\16_\u0845\13"+ + "_\3_\5_\u0848\n_\5_\u084a\n_\3`\3`\7`\u084e\n`\f`\16`\u0851\13`\3`\3`"+ + "\7`\u0855\n`\f`\16`\u0858\13`\3`\5`\u085b\n`\3`\7`\u085e\n`\f`\16`\u0861"+ + "\13`\3`\5`\u0864\n`\3a\3a\5a\u0868\na\3a\3a\7a\u086c\na\fa\16a\u086f\13"+ + "a\3a\3a\3b\3b\5b\u0875\nb\3c\3c\3c\7c\u087a\nc\fc\16c\u087d\13c\3c\3c"+ + "\7c\u0881\nc\fc\16c\u0884\13c\3c\3c\5c\u0888\nc\3c\5c\u088b\nc\3d\3d\5"+ + "d\u088f\nd\3e\3e\7e\u0893\ne\fe\16e\u0896\13e\3e\3e\3e\3e\7e\u089c\ne"+ + "\fe\16e\u089f\13e\3e\5e\u08a2\ne\3e\5e\u08a5\ne\3e\7e\u08a8\ne\fe\16e"+ + "\u08ab\13e\3e\3e\7e\u08af\ne\fe\16e\u08b2\13e\3e\5e\u08b5\ne\5e\u08b7"+ + "\ne\3f\3f\5f\u08bb\nf\3g\3g\7g\u08bf\ng\fg\16g\u08c2\13g\3g\3g\3g\3g\5"+ + "g\u08c8\ng\3g\7g\u08cb\ng\fg\16g\u08ce\13g\3g\3g\7g\u08d2\ng\fg\16g\u08d5"+ + "\13g\3g\3g\7g\u08d9\ng\fg\16g\u08dc\13g\7g\u08de\ng\fg\16g\u08e1\13g\3"+ + "g\7g\u08e4\ng\fg\16g\u08e7\13g\3g\3g\3h\3h\7h\u08ed\nh\fh\16h\u08f0\13"+ + "h\3h\3h\7h\u08f4\nh\fh\16h\u08f7\13h\3h\7h\u08fa\nh\fh\16h\u08fd\13h\3"+ + "h\7h\u0900\nh\fh\16h\u0903\13h\3h\3h\7h\u0907\nh\fh\16h\u090a\13h\3h\3"+ + "h\5h\u090e\nh\3h\3h\7h\u0912\nh\fh\16h\u0915\13h\3h\3h\7h\u0919\nh\fh"+ + "\16h\u091c\13h\3h\5h\u091f\nh\3i\3i\3i\5i\u0924\ni\3j\3j\7j\u0928\nj\f"+ + "j\16j\u092b\13j\3j\3j\3k\3k\7k\u0931\nk\fk\16k\u0934\13k\3k\3k\3l\3l\7"+ + "l\u093a\nl\fl\16l\u093d\13l\3l\3l\7l\u0941\nl\fl\16l\u0944\13l\3l\7l\u0947"+ + "\nl\fl\16l\u094a\13l\3l\7l\u094d\nl\fl\16l\u0950\13l\3l\5l\u0953\nl\3"+ + "m\3m\7m\u0957\nm\fm\16m\u095a\13m\3m\3m\7m\u095e\nm\fm\16m\u0961\13m\3"+ + "m\3m\3m\3m\3m\7m\u0968\nm\fm\16m\u096b\13m\3m\3m\3n\3n\7n\u0971\nn\fn"+ + "\16n\u0974\13n\3n\3n\3o\3o\3o\5o\u097b\no\3p\3p\7p\u097f\np\fp\16p\u0982"+ + "\13p\3p\3p\7p\u0986\np\fp\16p\u0989\13p\3p\3p\5p\u098d\np\3p\3p\3p\3p"+ + "\7p\u0993\np\fp\16p\u0996\13p\3p\5p\u0999\np\3q\3q\7q\u099d\nq\fq\16q"+ + "\u09a0\13q\3q\3q\3q\3q\7q\u09a6\nq\fq\16q\u09a9\13q\3q\5q\u09ac\nq\3r"+ + "\3r\7r\u09b0\nr\fr\16r\u09b3\13r\3r\5r\u09b6\nr\3r\7r\u09b9\nr\fr\16r"+ + "\u09bc\13r\3r\3r\7r\u09c0\nr\fr\16r\u09c3\13r\3r\3r\3r\3r\3s\3s\7s\u09cb"+ + "\ns\fs\16s\u09ce\13s\3s\3s\3s\5s\u09d3\ns\3s\3s\3s\3s\5s\u09d9\ns\3t\3"+ + "t\3t\7t\u09de\nt\ft\16t\u09e1\13t\7t\u09e3\nt\ft\16t\u09e6\13t\5t\u09e8"+ + "\nt\3t\7t\u09eb\nt\ft\16t\u09ee\13t\3t\3t\7t\u09f2\nt\ft\16t\u09f5\13"+ + "t\3t\3t\5t\u09f9\nt\3t\3t\7t\u09fd\nt\ft\16t\u0a00\13t\3t\3t\7t\u0a04"+ + "\nt\ft\16t\u0a07\13t\3t\5t\u0a0a\nt\3u\3u\3v\3v\3w\3w\3x\3x\3y\3y\3z\3"+ + "z\3{\3{\3|\3|\3}\3}\3}\3}\3}\3}\3}\5}\u0a23\n}\3~\3~\3~\3~\3~\3~\3~\7"+ + "~\u0a2c\n~\f~\16~\u0a2f\13~\3~\3~\3~\5~\u0a34\n~\3\177\3\177\3\177\5\177"+ + "\u0a39\n\177\3\u0080\3\u0080\6\u0080\u0a3d\n\u0080\r\u0080\16\u0080\u0a3e"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\5\u0081\u0a4a\n\u0081\3\u0081\7\u0081\u0a4d\n\u0081\f\u0081\16\u0081"+ + "\u0a50\13\u0081\3\u0082\3\u0082\3\u0083\3\u0083\3\u0084\3\u0084\3\u0085"+ + "\3\u0085\3\u0086\3\u0086\3\u0087\3\u0087\3\u0088\3\u0088\3\u0089\3\u0089"+ + "\3\u008a\3\u008a\3\u008b\3\u008b\7\u008b\u0a66\n\u008b\f\u008b\16\u008b"+ + "\u0a69\13\u008b\3\u008c\3\u008c\5\u008c\u0a6d\n\u008c\3\u008c\7\u008c"+ + "\u0a70\n\u008c\f\u008c\16\u008c\u0a73\13\u008c\3\u008d\3\u008d\7\u008d"+ + "\u0a77\n\u008d\f\u008d\16\u008d\u0a7a\13\u008d\3\u008d\3\u008d\7\u008d"+ + "\u0a7e\n\u008d\f\u008d\16\u008d\u0a81\13\u008d\3\u008d\3\u008d\3\u008d"+ + "\3\u008d\7\u008d\u0a87\n\u008d\f\u008d\16\u008d\u0a8a\13\u008d\3\u008d"+ + "\3\u008d\7\u008d\u0a8e\n\u008d\f\u008d\16\u008d\u0a91\13\u008d\3\u008d"+ + "\7\u008d\u0a94\n\u008d\f\u008d\16\u008d\u0a97\13\u008d\3\u008d\7\u008d"+ + "\u0a9a\n\u008d\f\u008d\16\u008d\u0a9d\13\u008d\3\u008d\5\u008d\u0aa0\n"+ + "\u008d\3\u008d\7\u008d\u0aa3\n\u008d\f\u008d\16\u008d\u0aa6\13\u008d\3"+ + "\u008d\5\u008d\u0aa9\n\u008d\5\u008d\u0aab\n\u008d\3\u008e\3\u008e\3\u008e"+ + "\3\u008e\6\u008e\u0ab1\n\u008e\r\u008e\16\u008e\u0ab2\3\u008e\3\u008e"+ + "\3\u008e\3\u008e\3\u008e\6\u008e\u0aba\n\u008e\r\u008e\16\u008e\u0abb"+ + "\3\u008e\3\u008e\5\u008e\u0ac0\n\u008e\3\u008f\3\u008f\3\u0090\3\u0090"+ + "\5\u0090\u0ac6\n\u0090\3\u0090\5\u0090\u0ac9\n\u0090\3\u0091\3\u0091\7"+ + "\u0091\u0acd\n\u0091\f\u0091\16\u0091\u0ad0\13\u0091\3\u0091\3\u0091\7"+ + "\u0091\u0ad4\n\u0091\f\u0091\16\u0091\u0ad7\13\u0091\3\u0092\3\u0092\3"+ + "\u0093\6\u0093\u0adc\n\u0093\r\u0093\16\u0093\u0add\3\u0093\7\u0093\u0ae1"+ + "\n\u0093\f\u0093\16\u0093\u0ae4\13\u0093\3\u0093\3\u0093\7\u0093\u0ae8"+ + "\n\u0093\f\u0093\16\u0093\u0aeb\13\u0093\5\u0093\u0aed\n\u0093\3\u0094"+ + "\3\u0094\3\u0094\2\2\u0095\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$"+ + "&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~\u0080\u0082\u0084"+ + "\u0086\u0088\u008a\u008c\u008e\u0090\u0092\u0094\u0096\u0098\u009a\u009c"+ + "\u009e\u00a0\u00a2\u00a4\u00a6\u00a8\u00aa\u00ac\u00ae\u00b0\u00b2\u00b4"+ + "\u00b6\u00b8\u00ba\u00bc\u00be\u00c0\u00c2\u00c4\u00c6\u00c8\u00ca\u00cc"+ + "\u00ce\u00d0\u00d2\u00d4\u00d6\u00d8\u00da\u00dc\u00de\u00e0\u00e2\u00e4"+ + "\u00e6\u00e8\u00ea\u00ec\u00ee\u00f0\u00f2\u00f4\u00f6\u00f8\u00fa\u00fc"+ + "\u00fe\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114"+ + "\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\2\33\3\2=>\3\2"+ + "AB\4\2\35\35EE\3\2\u009e\u00a0\3\2\u00a4\u00a6\4\2\67\67VV\3\2&\'\3\2"+ + "\35\"\4\2\61\62\64\65\3\2-\60\4\2[[]]\4\2ZZ\\\\\3\2\24\25\3\2\21\23\5"+ + "\2\33\33\63\63YY\3\2nr\4\2yy~~\3\2jm\4\2[[^^\3\2sx\3\2z|\3\2\177\u0081"+ + "\5\2::_beh\n\2<\u038a\3\2\2\2@"+ + "\u039a\3\2\2\2B\u039d\3\2\2\2D\u03ca\3\2\2\2F\u03fa\3\2\2\2H\u0454\3\2"+ + "\2\2J\u045f\3\2\2\2L\u0495\3\2\2\2N\u04ba\3\2\2\2P\u04bd\3\2\2\2R\u04df"+ + "\3\2\2\2T\u050c\3\2\2\2V\u0529\3\2\2\2X\u0539\3\2\2\2Z\u053d\3\2\2\2\\"+ + "\u0543\3\2\2\2^\u0556\3\2\2\2`\u0566\3\2\2\2b\u057b\3\2\2\2d\u057d\3\2"+ + "\2\2f\u0591\3\2\2\2h\u059b\3\2\2\2j\u05cd\3\2\2\2l\u05eb\3\2\2\2n\u05fe"+ + "\3\2\2\2p\u0605\3\2\2\2r\u061a\3\2\2\2t\u061f\3\2\2\2v\u062d\3\2\2\2x"+ + "\u0636\3\2\2\2z\u063f\3\2\2\2|\u0653\3\2\2\2~\u0667\3\2\2\2\u0080\u0676"+ + "\3\2\2\2\u0082\u0682\3\2\2\2\u0084\u069b\3\2\2\2\u0086\u06af\3\2\2\2\u0088"+ + "\u06be\3\2\2\2\u008a\u06cc\3\2\2\2\u008c\u06db\3\2\2\2\u008e\u06ea\3\2"+ + "\2\2\u0090\u06fc\3\2\2\2\u0092\u0703\3\2\2\2\u0094\u0719\3\2\2\2\u0096"+ + "\u071b\3\2\2\2\u0098\u0735\3\2\2\2\u009a\u073a\3\2\2\2\u009c\u0748\3\2"+ + "\2\2\u009e\u0755\3\2\2\2\u00a0\u076b\3\2\2\2\u00a2\u0798\3\2\2\2\u00a4"+ + "\u079b\3\2\2\2\u00a6\u07ad\3\2\2\2\u00a8\u07c3\3\2\2\2\u00aa\u07c7\3\2"+ + "\2\2\u00ac\u07c9\3\2\2\2\u00ae\u07d3\3\2\2\2\u00b0\u07df\3\2\2\2\u00b2"+ + "\u07e1\3\2\2\2\u00b4\u07e5\3\2\2\2\u00b6\u07e7\3\2\2\2\u00b8\u07ee\3\2"+ + "\2\2\u00ba\u0822\3\2\2\2\u00bc\u0849\3\2\2\2\u00be\u084b\3\2\2\2\u00c0"+ + "\u0865\3\2\2\2\u00c2\u0872\3\2\2\2\u00c4\u0876\3\2\2\2\u00c6\u088e\3\2"+ + "\2\2\u00c8\u0890\3\2\2\2\u00ca\u08ba\3\2\2\2\u00cc\u08bc\3\2\2\2\u00ce"+ + "\u091e\3\2\2\2\u00d0\u0923\3\2\2\2\u00d2\u0925\3\2\2\2\u00d4\u092e\3\2"+ + "\2\2\u00d6\u0937\3\2\2\2\u00d8\u0954\3\2\2\2\u00da\u096e\3\2\2\2\u00dc"+ + "\u097a\3\2\2\2\u00de\u097c\3\2\2\2\u00e0\u099a\3\2\2\2\u00e2\u09ad\3\2"+ + "\2\2\u00e4\u09d8\3\2\2\2\u00e6\u0a09\3\2\2\2\u00e8\u0a0b\3\2\2\2\u00ea"+ + "\u0a0d\3\2\2\2\u00ec\u0a0f\3\2\2\2\u00ee\u0a11\3\2\2\2\u00f0\u0a13\3\2"+ + "\2\2\u00f2\u0a15\3\2\2\2\u00f4\u0a17\3\2\2\2\u00f6\u0a19\3\2\2\2\u00f8"+ + "\u0a22\3\2\2\2\u00fa\u0a33\3\2\2\2\u00fc\u0a38\3\2\2\2\u00fe\u0a3c\3\2"+ + "\2\2\u0100\u0a49\3\2\2\2\u0102\u0a51\3\2\2\2\u0104\u0a53\3\2\2\2\u0106"+ + "\u0a55\3\2\2\2\u0108\u0a57\3\2\2\2\u010a\u0a59\3\2\2\2\u010c\u0a5b\3\2"+ + "\2\2\u010e\u0a5d\3\2\2\2\u0110\u0a5f\3\2\2\2\u0112\u0a61\3\2\2\2\u0114"+ + "\u0a63\3\2\2\2\u0116\u0a6c\3\2\2\2\u0118\u0aaa\3\2\2\2\u011a\u0abf\3\2"+ + "\2\2\u011c\u0ac1\3\2\2\2\u011e\u0ac3\3\2\2\2\u0120\u0aca\3\2\2\2\u0122"+ + "\u0ad8\3\2\2\2\u0124\u0aec\3\2\2\2\u0126\u0aee\3\2\2\2\u0128\u012a\7\7"+ + "\2\2\u0129\u0128\3\2\2\2\u012a\u012d\3\2\2\2\u012b\u0129\3\2\2\2\u012b"+ + "\u012c\3\2\2\2\u012c\u012e\3\2\2\2\u012d\u012b\3\2\2\2\u012e\u0132\5\6"+ + "\4\2\u012f\u0131\5\u0126\u0094\2\u0130\u012f\3\2\2\2\u0131\u0134\3\2\2"+ + "\2\u0132\u0130\3\2\2\2\u0132\u0133\3\2\2\2\u0133\u0143\3\2\2\2\u0134\u0132"+ + "\3\2\2\2\u0135\u0140\5\24\13\2\u0136\u0138\5\u0126\u0094\2\u0137\u0136"+ + "\3\2\2\2\u0138\u0139\3\2\2\2\u0139\u0137\3\2\2\2\u0139\u013a\3\2\2\2\u013a"+ + "\u013c\3\2\2\2\u013b\u013d\5\24\13\2\u013c\u013b\3\2\2\2\u013c\u013d\3"+ + "\2\2\2\u013d\u013f\3\2\2\2\u013e\u0137\3\2\2\2\u013f\u0142\3\2\2\2\u0140"+ + "\u013e\3\2\2\2\u0140\u0141\3\2\2\2\u0141\u0144\3\2\2\2\u0142\u0140\3\2"+ + "\2\2\u0143\u0135\3\2\2\2\u0143\u0144\3\2\2\2\u0144\u0145\3\2\2\2\u0145"+ + "\u0146\7\2\2\3\u0146\3\3\2\2\2\u0147\u0149\7\7\2\2\u0148\u0147\3\2\2\2"+ + "\u0149\u014c\3\2\2\2\u014a\u0148\3\2\2\2\u014a\u014b\3\2\2\2\u014b\u014d"+ + "\3\2\2\2\u014c\u014a\3\2\2\2\u014d\u0151\5\6\4\2\u014e\u0150\5\u0126\u0094"+ + "\2\u014f\u014e\3\2\2\2\u0150\u0153\3\2\2\2\u0151\u014f\3\2\2\2\u0151\u0152"+ + "\3\2\2\2\u0152\u0162\3\2\2\2\u0153\u0151\3\2\2\2\u0154\u015f\5x=\2\u0155"+ + "\u0157\5\u0126\u0094\2\u0156\u0155\3\2\2\2\u0157\u0158\3\2\2\2\u0158\u0156"+ + "\3\2\2\2\u0158\u0159\3\2\2\2\u0159\u015b\3\2\2\2\u015a\u015c\5x=\2\u015b"+ + "\u015a\3\2\2\2\u015b\u015c\3\2\2\2\u015c\u015e\3\2\2\2\u015d\u0156\3\2"+ + "\2\2\u015e\u0161\3\2\2\2\u015f\u015d\3\2\2\2\u015f\u0160\3\2\2\2\u0160"+ + "\u0163\3\2\2\2\u0161\u015f\3\2\2\2\u0162\u0154\3\2\2\2\u0162\u0163\3\2"+ + "\2\2\u0163\u0164\3\2\2\2\u0164\u0165\7\2\2\3\u0165\5\3\2\2\2\u0166\u0168"+ + "\5\b\5\2\u0167\u0166\3\2\2\2\u0167\u0168\3\2\2\2\u0168\u0169\3\2\2\2\u0169"+ + "\u016a\5\f\7\2\u016a\u016b\5\16\b\2\u016b\7\3\2\2\2\u016c\u016e\5\n\6"+ + "\2\u016d\u016c\3\2\2\2\u016e\u016f\3\2\2\2\u016f\u016d\3\2\2\2\u016f\u0170"+ + "\3\2\2\2\u0170\t\3\2\2\2\u0171\u0172\7:\2\2\u0172\u017c\7\33\2\2\u0173"+ + "\u0175\7\r\2\2\u0174\u0176\5\u011e\u0090\2\u0175\u0174\3\2\2\2\u0176\u0177"+ + "\3\2\2\2\u0177\u0175\3\2\2\2\u0177\u0178\3\2\2\2\u0178\u0179\3\2\2\2\u0179"+ + "\u017a\7\16\2\2\u017a\u017d\3\2\2\2\u017b\u017d\5\u011e\u0090\2\u017c"+ + "\u0173\3\2\2\2\u017c\u017b\3\2\2\2\u017d\u017f\3\2\2\2\u017e\u0180\5\u0124"+ + "\u0093\2\u017f\u017e\3\2\2\2\u017f\u0180\3\2\2\2\u0180\u0182\3\2\2\2\u0181"+ + "\u0171\3\2\2\2\u0182\u0183\3\2\2\2\u0183\u0181\3\2\2\2\u0183\u0184\3\2"+ + "\2\2\u0184\13\3\2\2\2\u0185\u0187\5\u00fe\u0080\2\u0186\u0185\3\2\2\2"+ + "\u0186\u0187\3\2\2\2\u0187\u0188\3\2\2\2\u0188\u0189\7;\2\2\u0189\u018b"+ + "\5\u0120\u0091\2\u018a\u018c\5\u0124\u0093\2\u018b\u018a\3\2\2\2\u018b"+ + "\u018c\3\2\2\2\u018c\u018e\3\2\2\2\u018d\u0186\3\2\2\2\u018d\u018e\3\2"+ + "\2\2\u018e\r\3\2\2\2\u018f\u0191\5\20\t\2\u0190\u018f\3\2\2\2\u0191\u0194"+ + "\3\2\2\2\u0192\u0190\3\2\2\2\u0192\u0193\3\2\2\2\u0193\17\3\2\2\2\u0194"+ + "\u0192\3\2\2\2\u0195\u0196\7<\2\2\u0196\u019a\5\u0120\u0091\2\u0197\u0198"+ + "\7\t\2\2\u0198\u019b\7\21\2\2\u0199\u019b\5\22\n\2\u019a\u0197\3\2\2\2"+ + "\u019a\u0199\3\2\2\2\u019a\u019b\3\2\2\2\u019b\u019d\3\2\2\2\u019c\u019e"+ + "\5\u0124\u0093\2\u019d\u019c\3\2\2\2\u019d\u019e\3\2\2\2\u019e\21\3\2"+ + "\2\2\u019f\u01a0\7Y\2\2\u01a0\u01a1\5\u0122\u0092\2\u01a1\23\3\2\2\2\u01a2"+ + "\u01a8\5\26\f\2\u01a3\u01a8\5B\"\2\u01a4\u01a8\5\66\34\2\u01a5\u01a8\5"+ + "F$\2\u01a6\u01a8\5P)\2\u01a7\u01a2\3\2\2\2\u01a7\u01a3\3\2\2\2\u01a7\u01a4"+ + "\3\2\2\2\u01a7\u01a5\3\2\2\2\u01a7\u01a6\3\2\2\2\u01a8\25\3\2\2\2\u01a9"+ + "\u01ab\5\u00fe\u0080\2\u01aa\u01a9\3\2\2\2\u01aa\u01ab\3\2\2\2\u01ab\u01ac"+ + "\3\2\2\2\u01ac\u01b0\t\2\2\2\u01ad\u01af\7\7\2\2\u01ae\u01ad\3\2\2\2\u01af"+ + "\u01b2\3\2\2\2\u01b0\u01ae\3\2\2\2\u01b0\u01b1\3\2\2\2\u01b1\u01b3\3\2"+ + "\2\2\u01b2\u01b0\3\2\2\2\u01b3\u01bb\5\u0122\u0092\2\u01b4\u01b6\7\7\2"+ + "\2\u01b5\u01b4\3\2\2\2\u01b6\u01b9\3\2\2\2\u01b7\u01b5\3\2\2\2\u01b7\u01b8"+ + "\3\2\2\2\u01b8\u01ba\3\2\2\2\u01b9\u01b7\3\2\2\2\u01ba\u01bc\5R*\2\u01bb"+ + "\u01b7\3\2\2\2\u01bb\u01bc\3\2\2\2\u01bc\u01c4\3\2\2\2\u01bd\u01bf\7\7"+ + "\2\2\u01be\u01bd\3\2\2\2\u01bf\u01c2\3\2\2\2\u01c0\u01be\3\2\2\2\u01c0"+ + "\u01c1\3\2\2\2\u01c1\u01c3\3\2\2\2\u01c2\u01c0\3\2\2\2\u01c3\u01c5\5\30"+ + "\r\2\u01c4\u01c0\3\2\2\2\u01c4\u01c5\3\2\2\2\u01c5\u01d4\3\2\2\2\u01c6"+ + "\u01c8\7\7\2\2\u01c7\u01c6\3\2\2\2\u01c8\u01cb\3\2\2\2\u01c9\u01c7\3\2"+ + "\2\2\u01c9\u01ca\3\2\2\2\u01ca\u01cc\3\2\2\2\u01cb\u01c9\3\2\2\2\u01cc"+ + "\u01d0\7\33\2\2\u01cd\u01cf\7\7\2\2\u01ce\u01cd\3\2\2\2\u01cf\u01d2\3"+ + "\2\2\2\u01d0\u01ce\3\2\2\2\u01d0\u01d1\3\2\2\2\u01d1\u01d3\3\2\2\2\u01d2"+ + "\u01d0\3\2\2\2\u01d3\u01d5\5\36\20\2\u01d4\u01c9\3\2\2\2\u01d4\u01d5\3"+ + "\2\2\2\u01d5\u01dd\3\2\2\2\u01d6\u01d8\7\7\2\2\u01d7\u01d6\3\2\2\2\u01d8"+ + "\u01db\3\2\2\2\u01d9\u01d7\3\2\2\2\u01d9\u01da\3\2\2\2\u01da\u01dc\3\2"+ + "\2\2\u01db\u01d9\3\2\2\2\u01dc\u01de\5j\66\2\u01dd\u01d9\3\2\2\2\u01dd"+ + "\u01de\3\2\2\2\u01de\u01ed\3\2\2\2\u01df\u01e1\7\7\2\2\u01e0\u01df\3\2"+ + "\2\2\u01e1\u01e4\3\2\2\2\u01e2\u01e0\3\2\2\2\u01e2\u01e3\3\2\2\2\u01e3"+ + "\u01e5\3\2\2\2\u01e4\u01e2\3\2\2\2\u01e5\u01ee\5&\24\2\u01e6\u01e8\7\7"+ + "\2\2\u01e7\u01e6\3\2\2\2\u01e8\u01eb\3\2\2\2\u01e9\u01e7\3\2\2\2\u01e9"+ + "\u01ea\3\2\2\2\u01ea\u01ec\3\2\2\2\u01eb\u01e9\3\2\2\2\u01ec\u01ee\5\60"+ + "\31\2\u01ed\u01e2\3\2\2\2\u01ed\u01e9\3\2\2\2\u01ed\u01ee\3\2\2\2\u01ee"+ + "\27\3\2\2\2\u01ef\u01f1\5\u00fe\u0080\2\u01f0\u01ef\3\2\2\2\u01f0\u01f1"+ + "\3\2\2\2\u01f1\u01f9\3\2\2\2\u01f2\u01f6\7D\2\2\u01f3\u01f5\7\7\2\2\u01f4"+ + "\u01f3\3\2\2\2\u01f5\u01f8\3\2\2\2\u01f6\u01f4\3\2\2\2\u01f6\u01f7\3\2"+ + "\2\2\u01f7\u01fa\3\2\2\2\u01f8\u01f6\3\2\2\2\u01f9\u01f2\3\2\2\2\u01f9"+ + "\u01fa\3\2\2\2\u01fa\u01fb\3\2\2\2\u01fb\u01fc\5\32\16\2\u01fc\31\3\2"+ + "\2\2\u01fd\u0209\7\13\2\2\u01fe\u0203\5\34\17\2\u01ff\u0200\7\n\2\2\u0200"+ + "\u0202\5\34\17\2\u0201\u01ff\3\2\2\2\u0202\u0205\3\2\2\2\u0203\u0201\3"+ + "\2\2\2\u0203\u0204\3\2\2\2\u0204\u0207\3\2\2\2\u0205\u0203\3\2\2\2\u0206"+ + "\u0208\7\n\2\2\u0207\u0206\3\2\2\2\u0207\u0208\3\2\2\2\u0208\u020a\3\2"+ + "\2\2\u0209\u01fe\3\2\2\2\u0209\u020a\3\2\2\2\u020a\u020b\3\2\2\2\u020b"+ + "\u020c\7\f\2\2\u020c\33\3\2\2\2\u020d\u020f\5\u00fe\u0080\2\u020e\u020d"+ + "\3\2\2\2\u020e\u020f\3\2\2\2\u020f\u0211\3\2\2\2\u0210\u0212\t\3\2\2\u0211"+ + "\u0210\3\2\2\2\u0211\u0212\3\2\2\2\u0212\u0213\3\2\2\2\u0213\u0214\5\u0122"+ + "\u0092\2\u0214\u0215\7\33\2\2\u0215\u0218\5V,\2\u0216\u0217\7\35\2\2\u0217"+ + "\u0219\5x=\2\u0218\u0216\3\2\2\2\u0218\u0219\3\2\2\2\u0219\35\3\2\2\2"+ + "\u021a\u021c\5\u0116\u008c\2\u021b\u021a\3\2\2\2\u021c\u021f\3\2\2\2\u021d"+ + "\u021b\3\2\2\2\u021d\u021e\3\2\2\2\u021e\u0220\3\2\2\2\u021f\u021d\3\2"+ + "\2\2\u0220\u0237\5 \21\2\u0221\u0223\7\7\2\2\u0222\u0221\3\2\2\2\u0223"+ + "\u0226\3\2\2\2\u0224\u0222\3\2\2\2\u0224\u0225\3\2\2\2\u0225\u0227\3\2"+ + "\2\2\u0226\u0224\3\2\2\2\u0227\u022b\7\n\2\2\u0228\u022a\7\7\2\2\u0229"+ + "\u0228\3\2\2\2\u022a\u022d\3\2\2\2\u022b\u0229\3\2\2\2\u022b\u022c\3\2"+ + "\2\2\u022c\u0231\3\2\2\2\u022d\u022b\3\2\2\2\u022e\u0230\5\u0116\u008c"+ + "\2\u022f\u022e\3\2\2\2\u0230\u0233\3\2\2\2\u0231\u022f\3\2\2\2\u0231\u0232"+ + "\3\2\2\2\u0232\u0234\3\2\2\2\u0233\u0231\3\2\2\2\u0234\u0236\5 \21\2\u0235"+ + "\u0224\3\2\2\2\u0236\u0239\3\2\2\2\u0237\u0235\3\2\2\2\u0237\u0238\3\2"+ + "\2\2\u0238\37\3\2\2\2\u0239\u0237\3\2\2\2\u023a\u023e\5\"\22\2\u023b\u023e"+ + "\5d\63\2\u023c\u023e\5$\23\2\u023d\u023a\3\2\2\2\u023d\u023b\3\2\2\2\u023d"+ + "\u023c\3\2\2\2\u023e!\3\2\2\2\u023f\u0240\5d\63\2\u0240\u0241\5\u0098"+ + "M\2\u0241#\3\2\2\2\u0242\u0246\5d\63\2\u0243\u0245\7\7\2\2\u0244\u0243"+ + "\3\2\2\2\u0245\u0248\3\2\2\2\u0246\u0244\3\2\2\2\u0246\u0247\3\2\2\2\u0247"+ + "\u0249\3\2\2\2\u0248\u0246\3\2\2\2\u0249\u024d\7E\2\2\u024a\u024c\7\7"+ + "\2\2\u024b\u024a\3\2\2\2\u024c\u024f\3\2\2\2\u024d\u024b\3\2\2\2\u024d"+ + "\u024e\3\2\2\2\u024e\u0250\3\2\2\2\u024f\u024d\3\2\2\2\u0250\u0251\5x"+ + "=\2\u0251%\3\2\2\2\u0252\u0256\7\17\2\2\u0253\u0255\7\7\2\2\u0254\u0253"+ + "\3\2\2\2\u0255\u0258\3\2\2\2\u0256\u0254\3\2\2\2\u0256\u0257\3\2\2\2\u0257"+ + "\u025c\3\2\2\2\u0258\u0256\3\2\2\2\u0259\u025b\5(\25\2\u025a\u0259\3\2"+ + "\2\2\u025b\u025e\3\2\2\2\u025c\u025a\3\2\2\2\u025c\u025d\3\2\2\2\u025d"+ + "\u0262\3\2\2\2\u025e\u025c\3\2\2\2\u025f\u0261\7\7\2\2\u0260\u025f\3\2"+ + "\2\2\u0261\u0264\3\2\2\2\u0262\u0260\3\2\2\2\u0262\u0263\3\2\2\2\u0263"+ + "\u0265\3\2\2\2\u0264\u0262\3\2\2\2\u0265\u0266\7\20\2\2\u0266\'\3\2\2"+ + "\2\u0267\u0270\5\26\f\2\u0268\u0270\5\66\34\2\u0269\u0270\5B\"\2\u026a"+ + "\u0270\5D#\2\u026b\u0270\5F$\2\u026c\u0270\5*\26\2\u026d\u0270\5,\27\2"+ + "\u026e\u0270\5P)\2\u026f\u0267\3\2\2\2\u026f\u0268\3\2\2\2\u026f\u0269"+ + "\3\2\2\2\u026f\u026a\3\2\2\2\u026f\u026b\3\2\2\2\u026f\u026c\3\2\2\2\u026f"+ + "\u026d\3\2\2\2\u026f\u026e\3\2\2\2\u0270\u0272\3\2\2\2\u0271\u0273\5\u0126"+ + "\u0094\2\u0272\u0271\3\2\2\2\u0273\u0274\3\2\2\2\u0274\u0272\3\2\2\2\u0274"+ + "\u0275\3\2\2\2\u0275)\3\2\2\2\u0276\u027a\7G\2\2\u0277\u0279\7\7\2\2\u0278"+ + "\u0277\3\2\2\2\u0279\u027c\3\2\2\2\u027a\u0278\3\2\2\2\u027a\u027b\3\2"+ + "\2\2\u027b\u027d\3\2\2\2\u027c\u027a\3\2\2\2\u027d\u027e\5n8\2\u027e+"+ + "\3\2\2\2\u027f\u0281\5\u00fe\u0080\2\u0280\u027f\3\2\2\2\u0280\u0281\3"+ + "\2\2\2\u0281\u0282\3\2\2\2\u0282\u0286\7D\2\2\u0283\u0285\7\7\2\2\u0284"+ + "\u0283\3\2\2\2\u0285\u0288\3\2\2\2\u0286\u0284\3\2\2\2\u0286\u0287\3\2"+ + "\2\2\u0287\u0289\3\2\2\2\u0288\u0286\3\2\2\2\u0289\u0298\58\35\2\u028a"+ + "\u028c\7\7\2\2\u028b\u028a\3\2\2\2\u028c\u028f\3\2\2\2\u028d\u028b\3\2"+ + "\2\2\u028d\u028e\3\2\2\2\u028e\u0290\3\2\2\2\u028f\u028d\3\2\2\2\u0290"+ + "\u0294\7\33\2\2\u0291\u0293\7\7\2\2\u0292\u0291\3\2\2\2\u0293\u0296\3"+ + "\2\2\2\u0294\u0292\3\2\2\2\u0294\u0295\3\2\2\2\u0295\u0297\3\2\2\2\u0296"+ + "\u0294\3\2\2\2\u0297\u0299\5.\30\2\u0298\u028d\3\2\2\2\u0298\u0299\3\2"+ + "\2\2\u0299\u029d\3\2\2\2\u029a\u029c\7\7\2\2\u029b\u029a\3\2\2\2\u029c"+ + "\u029f\3\2\2\2\u029d\u029b\3\2\2\2\u029d\u029e\3\2\2\2\u029e\u02a1\3\2"+ + "\2\2\u029f\u029d\3\2\2\2\u02a0\u02a2\5n8\2\u02a1\u02a0\3\2\2\2\u02a1\u02a2"+ + "\3\2\2\2\u02a2-\3\2\2\2\u02a3\u02a7\7H\2\2\u02a4\u02a6\7\7\2\2\u02a5\u02a4"+ + "\3\2\2\2\u02a6\u02a9\3\2\2\2\u02a7\u02a5\3\2\2\2\u02a7\u02a8\3\2\2\2\u02a8"+ + "\u02aa\3\2\2\2\u02a9\u02a7\3\2\2\2\u02aa\u02b4\5\u009eP\2\u02ab\u02af"+ + "\7I\2\2\u02ac\u02ae\7\7\2\2\u02ad\u02ac\3\2\2\2\u02ae\u02b1\3\2\2\2\u02af"+ + "\u02ad\3\2\2\2\u02af\u02b0\3\2\2\2\u02b0\u02b2\3\2\2\2\u02b1\u02af\3\2"+ + "\2\2\u02b2\u02b4\5\u009eP\2\u02b3\u02a3\3\2\2\2\u02b3\u02ab\3\2\2\2\u02b4"+ + "/\3\2\2\2\u02b5\u02b9\7\17\2\2\u02b6\u02b8\7\7\2\2\u02b7\u02b6\3\2\2\2"+ + "\u02b8\u02bb\3\2\2\2\u02b9\u02b7\3\2\2\2\u02b9\u02ba\3\2\2\2\u02ba\u02bd"+ + "\3\2\2\2\u02bb\u02b9\3\2\2\2\u02bc\u02be\5\62\32\2\u02bd\u02bc\3\2\2\2"+ + "\u02bd\u02be\3\2\2\2\u02be\u02d2\3\2\2\2\u02bf\u02c1\7\7\2\2\u02c0\u02bf"+ + "\3\2\2\2\u02c1\u02c4\3\2\2\2\u02c2\u02c0\3\2\2\2\u02c2\u02c3\3\2\2\2\u02c3"+ + "\u02c5\3\2\2\2\u02c4\u02c2\3\2\2\2\u02c5\u02c9\7\34\2\2\u02c6\u02c8\7"+ + "\7\2\2\u02c7\u02c6\3\2\2\2\u02c8\u02cb\3\2\2\2\u02c9\u02c7\3\2\2\2\u02c9"+ + "\u02ca\3\2\2\2\u02ca\u02cf\3\2\2\2\u02cb\u02c9\3\2\2\2\u02cc\u02ce\5("+ + "\25\2\u02cd\u02cc\3\2\2\2\u02ce\u02d1\3\2\2\2\u02cf\u02cd\3\2\2\2\u02cf"+ + "\u02d0\3\2\2\2\u02d0\u02d3\3\2\2\2\u02d1\u02cf\3\2\2\2\u02d2\u02c2\3\2"+ + "\2\2\u02d2\u02d3\3\2\2\2\u02d3\u02d7\3\2\2\2\u02d4\u02d6\7\7\2\2\u02d5"+ + "\u02d4\3\2\2\2\u02d6\u02d9\3\2\2\2\u02d7\u02d5\3\2\2\2\u02d7\u02d8\3\2"+ + "\2\2\u02d8\u02da\3\2\2\2\u02d9\u02d7\3\2\2\2\u02da\u02db\7\20\2\2\u02db"+ + "\61\3\2\2\2\u02dc\u02e0\5\64\33\2\u02dd\u02df\7\7\2\2\u02de\u02dd\3\2"+ + "\2\2\u02df\u02e2\3\2\2\2\u02e0\u02de\3\2\2\2\u02e0\u02e1\3\2\2\2\u02e1"+ + "\u02e4\3\2\2\2\u02e2\u02e0\3\2\2\2\u02e3\u02dc\3\2\2\2\u02e4\u02e5\3\2"+ + "\2\2\u02e5\u02e3\3\2\2\2\u02e5\u02e6\3\2\2\2\u02e6\u02e8\3\2\2\2\u02e7"+ + "\u02e9\7\34\2\2\u02e8\u02e7\3\2\2\2\u02e8\u02e9\3\2\2\2\u02e9\63\3\2\2"+ + "\2\u02ea\u02ec\5\u0116\u008c\2\u02eb\u02ea\3\2\2\2\u02ec\u02ef\3\2\2\2"+ + "\u02ed\u02eb\3\2\2\2\u02ed\u02ee\3\2\2\2\u02ee\u02f0\3\2\2\2\u02ef\u02ed"+ + "\3\2\2\2\u02f0\u02f8\5\u0122\u0092\2\u02f1\u02f3\7\7\2\2\u02f2\u02f1\3"+ + "\2\2\2\u02f3\u02f6\3\2\2\2\u02f4\u02f2\3\2\2\2\u02f4\u02f5\3\2\2\2\u02f5"+ + "\u02f7\3\2\2\2\u02f6\u02f4\3\2\2\2\u02f7\u02f9\5\u009eP\2\u02f8\u02f4"+ + "\3\2\2\2\u02f8\u02f9\3\2\2\2\u02f9\u0301\3\2\2\2\u02fa\u02fc\7\7\2\2\u02fb"+ + "\u02fa\3\2\2\2\u02fc\u02ff\3\2\2\2\u02fd\u02fb\3\2\2\2\u02fd\u02fe\3\2"+ + "\2\2\u02fe\u0300\3\2\2\2\u02ff\u02fd\3\2\2\2\u0300\u0302\5&\24\2\u0301"+ + "\u02fd\3\2\2\2\u0301\u0302\3\2\2\2\u0302\u030a\3\2\2\2\u0303\u0305\7\7"+ + "\2\2\u0304\u0303\3\2\2\2\u0305\u0308\3\2\2\2\u0306\u0304\3\2\2\2\u0306"+ + "\u0307\3\2\2\2\u0307\u0309\3\2\2\2\u0308\u0306\3\2\2\2\u0309\u030b\7\n"+ + "\2\2\u030a\u0306\3\2\2\2\u030a\u030b\3\2\2\2\u030b\65\3\2\2\2\u030c\u030e"+ + "\5\u00fe\u0080\2\u030d\u030c\3\2\2\2\u030d\u030e\3\2\2\2\u030e\u030f\3"+ + "\2\2\2\u030f\u031f\7?\2\2\u0310\u0312\7\7\2\2\u0311\u0310\3\2\2\2\u0312"+ + "\u0315\3\2\2\2\u0313\u0311\3\2\2\2\u0313\u0314\3\2\2\2\u0314\u0316\3\2"+ + "\2\2\u0315\u0313\3\2\2\2\u0316\u031a\5V,\2\u0317\u0319\7\7\2\2\u0318\u0317"+ + "\3\2\2\2\u0319\u031c\3\2\2\2\u031a\u0318\3\2\2\2\u031a\u031b\3\2\2\2\u031b"+ + "\u031d\3\2\2\2\u031c\u031a\3\2\2\2\u031d\u031e\7\t\2\2\u031e\u0320\3\2"+ + "\2\2\u031f\u0313\3\2\2\2\u031f\u0320\3\2\2\2\u0320\u0328\3\2\2\2\u0321"+ + "\u0323\7\7\2\2\u0322\u0321\3\2\2\2\u0323\u0326\3\2\2\2\u0324\u0322\3\2"+ + "\2\2\u0324\u0325\3\2\2\2\u0325\u0327\3\2\2\2\u0326\u0324\3\2\2\2\u0327"+ + "\u0329\5R*\2\u0328\u0324\3\2\2\2\u0328\u0329\3\2\2\2\u0329\u0339\3\2\2"+ + "\2\u032a\u032c\7\7\2\2\u032b\u032a\3\2\2\2\u032c\u032f\3\2\2\2\u032d\u032b"+ + "\3\2\2\2\u032d\u032e\3\2\2\2\u032e\u0330\3\2\2\2\u032f\u032d\3\2\2\2\u0330"+ + "\u0334\5> \2\u0331\u0333\7\7\2\2\u0332\u0331\3\2\2\2\u0333\u0336\3\2\2"+ + "\2\u0334\u0332\3\2\2\2\u0334\u0335\3\2\2\2\u0335\u0337\3\2\2\2\u0336\u0334"+ + "\3\2\2\2\u0337\u0338\7\t\2\2\u0338\u033a\3\2\2\2\u0339\u032d\3\2\2\2\u0339"+ + "\u033a\3\2\2\2\u033a\u0342\3\2\2\2\u033b\u033d\7\7\2\2\u033c\u033b\3\2"+ + "\2\2\u033d\u0340\3\2\2\2\u033e\u033c\3\2\2\2\u033e\u033f\3\2\2\2\u033f"+ + "\u0341\3\2\2\2\u0340\u033e\3\2\2\2\u0341\u0343\5\u0120\u0091\2\u0342\u033e"+ + "\3\2\2\2\u0342\u0343\3\2\2\2\u0343\u0347\3\2\2\2\u0344\u0346\7\7\2\2\u0345"+ + "\u0344\3\2\2\2\u0346\u0349\3\2\2\2\u0347\u0345\3\2\2\2\u0347\u0348\3\2"+ + "\2\2\u0348\u034a\3\2\2\2\u0349\u0347\3\2\2\2\u034a\u0359\58\35\2\u034b"+ + "\u034d\7\7\2\2\u034c\u034b\3\2\2\2\u034d\u0350\3\2\2\2\u034e\u034c\3\2"+ + "\2\2\u034e\u034f\3\2\2\2\u034f\u0351\3\2\2\2\u0350\u034e\3\2\2\2\u0351"+ + "\u0355\7\33\2\2\u0352\u0354\7\7\2\2\u0353\u0352\3\2\2\2\u0354\u0357\3"+ + "\2\2\2\u0355\u0353\3\2\2\2\u0355\u0356\3\2\2\2\u0356\u0358\3\2\2\2\u0357"+ + "\u0355\3\2\2\2\u0358\u035a\5V,\2\u0359\u034e\3\2\2\2\u0359\u035a\3\2\2"+ + "\2\u035a\u0362\3\2\2\2\u035b\u035d\7\7\2\2\u035c\u035b\3\2\2\2\u035d\u0360"+ + "\3\2\2\2\u035e\u035c\3\2\2\2\u035e\u035f\3\2\2\2\u035f\u0361\3\2\2\2\u0360"+ + "\u035e\3\2\2\2\u0361\u0363\5j\66\2\u0362\u035e\3\2\2\2\u0362\u0363\3\2"+ + "\2\2\u0363\u036b\3\2\2\2\u0364\u0366\7\7\2\2\u0365\u0364\3\2\2\2\u0366"+ + "\u0369\3\2\2\2\u0367\u0365\3\2\2\2\u0367\u0368\3\2\2\2\u0368\u036a\3\2"+ + "\2\2\u0369\u0367\3\2\2\2\u036a\u036c\5@!\2\u036b\u0367\3\2\2\2\u036b\u036c"+ + "\3\2\2\2\u036c\67\3\2\2\2\u036d\u0379\7\13\2\2\u036e\u0373\5:\36\2\u036f"+ + "\u0370\7\n\2\2\u0370\u0372\5:\36\2\u0371\u036f\3\2\2\2\u0372\u0375\3\2"+ + "\2\2\u0373\u0371\3\2\2\2\u0373\u0374\3\2\2\2\u0374\u0377\3\2\2\2\u0375"+ + "\u0373\3\2\2\2\u0376\u0378\7\n\2\2\u0377\u0376\3\2\2\2\u0377\u0378\3\2"+ + "\2\2\u0378\u037a\3\2\2\2\u0379\u036e\3\2\2\2\u0379\u037a\3\2\2\2\u037a"+ + "\u037b\3\2\2\2\u037b\u037c\7\f\2\2\u037c9\3\2\2\2\u037d\u037f\5\u00fe"+ + "\u0080\2\u037e\u037d\3\2\2\2\u037e\u037f\3\2\2\2\u037f\u0380\3\2\2\2\u0380"+ + "\u0383\5<\37\2\u0381\u0382\7\35\2\2\u0382\u0384\5x=\2\u0383\u0381\3\2"+ + "\2\2\u0383\u0384\3\2\2\2\u0384;\3\2\2\2\u0385\u0386\5\u0122\u0092\2\u0386"+ + "\u0387\7\33\2\2\u0387\u0388\5V,\2\u0388=\3\2\2\2\u0389\u038b\5X-\2\u038a"+ + "\u0389\3\2\2\2\u038a\u038b\3\2\2\2\u038b\u038f\3\2\2\2\u038c\u0390\5Z"+ + ".\2\u038d\u0390\5\\/\2\u038e\u0390\5^\60\2\u038f\u038c\3\2\2\2\u038f\u038d"+ + "\3\2\2\2\u038f\u038e\3\2\2\2\u0390?\3\2\2\2\u0391\u039b\5n8\2\u0392\u0396"+ + "\7\35\2\2\u0393\u0395\7\7\2\2\u0394\u0393\3\2\2\2\u0395\u0398\3\2\2\2"+ + "\u0396\u0394\3\2\2\2\u0396\u0397\3\2\2\2\u0397\u0399\3\2\2\2\u0398\u0396"+ + "\3\2\2\2\u0399\u039b\5x=\2\u039a\u0391\3\2\2\2\u039a\u0392\3\2\2\2\u039b"+ + "A\3\2\2\2\u039c\u039e\5\u00fe\u0080\2\u039d\u039c\3\2\2\2\u039d\u039e"+ + "\3\2\2\2\u039e\u039f\3\2\2\2\u039f\u03a3\7@\2\2\u03a0\u03a2\7\7\2\2\u03a1"+ + "\u03a0\3\2\2\2\u03a2\u03a5\3\2\2\2\u03a3\u03a1\3\2\2\2\u03a3\u03a4\3\2"+ + "\2\2\u03a4\u03a6\3\2\2\2\u03a5\u03a3\3\2\2\2\u03a6\u03ae\5\u0122\u0092"+ + "\2\u03a7\u03a9\7\7\2\2\u03a8\u03a7\3\2\2\2\u03a9\u03ac\3\2\2\2\u03aa\u03a8"+ + "\3\2\2\2\u03aa\u03ab\3\2\2\2\u03ab\u03ad\3\2\2\2\u03ac\u03aa\3\2\2\2\u03ad"+ + "\u03af\5\30\r\2\u03ae\u03aa\3\2\2\2\u03ae\u03af\3\2\2\2\u03af\u03be\3"+ + "\2\2\2\u03b0\u03b2\7\7\2\2\u03b1\u03b0\3\2\2\2\u03b2\u03b5\3\2\2\2\u03b3"+ + "\u03b1\3\2\2\2\u03b3\u03b4\3\2\2\2\u03b4\u03b6\3\2\2\2\u03b5\u03b3\3\2"+ + "\2\2\u03b6\u03ba\7\33\2\2\u03b7\u03b9\7\7\2\2\u03b8\u03b7\3\2\2\2\u03b9"+ + "\u03bc\3\2\2\2\u03ba\u03b8\3\2\2\2\u03ba\u03bb\3\2\2\2\u03bb\u03bd\3\2"+ + "\2\2\u03bc\u03ba\3\2\2\2\u03bd\u03bf\5\36\20\2\u03be\u03b3\3\2\2\2\u03be"+ + "\u03bf\3\2\2\2\u03bf\u03c7\3\2\2\2\u03c0\u03c2\7\7\2\2\u03c1\u03c0\3\2"+ + "\2\2\u03c2\u03c5\3\2\2\2\u03c3\u03c1\3\2\2\2\u03c3\u03c4\3\2\2\2\u03c4"+ + "\u03c6\3\2\2\2\u03c5\u03c3\3\2\2\2\u03c6\u03c8\5&\24\2\u03c7\u03c3\3\2"+ + "\2\2\u03c7\u03c8\3\2\2\2\u03c8C\3\2\2\2\u03c9\u03cb\5\u00fe\u0080\2\u03ca"+ + "\u03c9\3\2\2\2\u03ca\u03cb\3\2\2\2\u03cb\u03cc\3\2\2\2\u03cc\u03d0\7F"+ + "\2\2\u03cd\u03cf\7\7\2\2\u03ce\u03cd\3\2\2\2\u03cf\u03d2\3\2\2\2\u03d0"+ + "\u03ce\3\2\2\2\u03d0\u03d1\3\2\2\2\u03d1\u03d4\3\2\2\2\u03d2\u03d0\3\2"+ + "\2\2\u03d3\u03d5\5\u00fe\u0080\2\u03d4\u03d3\3\2\2\2\u03d4\u03d5\3\2\2"+ + "\2\u03d5\u03d6\3\2\2\2\u03d6\u03de\7@\2\2\u03d7\u03d9\7\7\2\2\u03d8\u03d7"+ + "\3\2\2\2\u03d9\u03dc\3\2\2\2\u03da\u03d8\3\2\2\2\u03da\u03db\3\2\2\2\u03db"+ + "\u03dd\3\2\2\2\u03dc\u03da\3\2\2\2\u03dd\u03df\5\u0122\u0092\2\u03de\u03da"+ + "\3\2\2\2\u03de\u03df\3\2\2\2\u03df\u03ee\3\2\2\2\u03e0\u03e2\7\7\2\2\u03e1"+ + "\u03e0\3\2\2\2\u03e2\u03e5\3\2\2\2\u03e3\u03e1\3\2\2\2\u03e3\u03e4\3\2"+ + "\2\2\u03e4\u03e6\3\2\2\2\u03e5\u03e3\3\2\2\2\u03e6\u03ea\7\33\2\2\u03e7"+ + "\u03e9\7\7\2\2\u03e8\u03e7\3\2\2\2\u03e9\u03ec\3\2\2\2\u03ea\u03e8\3\2"+ + "\2\2\u03ea\u03eb\3\2\2\2\u03eb\u03ed\3\2\2\2\u03ec\u03ea\3\2\2\2\u03ed"+ + "\u03ef\5\36\20\2\u03ee\u03e3\3\2\2\2\u03ee\u03ef\3\2\2\2\u03ef\u03f7\3"+ + "\2\2\2\u03f0\u03f2\7\7\2\2\u03f1\u03f0\3\2\2\2\u03f2\u03f5\3\2\2\2\u03f3"+ + "\u03f1\3\2\2\2\u03f3\u03f4\3\2\2\2\u03f4\u03f6\3\2\2\2\u03f5\u03f3\3\2"+ + "\2\2\u03f6\u03f8\5&\24\2\u03f7\u03f3\3\2\2\2\u03f7\u03f8\3\2\2\2\u03f8"+ + "E\3\2\2\2\u03f9\u03fb\5\u00fe\u0080\2\u03fa\u03f9\3\2\2\2\u03fa\u03fb"+ + "\3\2\2\2\u03fb\u03fc\3\2\2\2\u03fc\u0404\t\3\2\2\u03fd\u03ff\7\7\2\2\u03fe"+ + "\u03fd\3\2\2\2\u03ff\u0402\3\2\2\2\u0400\u03fe\3\2\2\2\u0400\u0401\3\2"+ + "\2\2\u0401\u0403\3\2\2\2\u0402\u0400\3\2\2\2\u0403\u0405\5R*\2\u0404\u0400"+ + "\3\2\2\2\u0404\u0405\3\2\2\2\u0405\u0415\3\2\2\2\u0406\u0408\7\7\2\2\u0407"+ + "\u0406\3\2\2\2\u0408\u040b\3\2\2\2\u0409\u0407\3\2\2\2\u0409\u040a\3\2"+ + "\2\2\u040a\u040c\3\2\2\2\u040b\u0409\3\2\2\2\u040c\u0410\5V,\2\u040d\u040f"+ + "\7\7\2\2\u040e\u040d\3\2\2\2\u040f\u0412\3\2\2\2\u0410\u040e\3\2\2\2\u0410"+ + "\u0411\3\2\2\2\u0411\u0413\3\2\2\2\u0412\u0410\3\2\2\2\u0413\u0414\7\t"+ + "\2\2\u0414\u0416\3\2\2\2\u0415\u0409\3\2\2\2\u0415\u0416\3\2\2\2\u0416"+ + "\u041a\3\2\2\2\u0417\u0419\7\7\2\2\u0418\u0417\3\2\2\2\u0419\u041c\3\2"+ + "\2\2\u041a\u0418\3\2\2\2\u041a\u041b\3\2\2\2\u041b\u041f\3\2\2\2\u041c"+ + "\u041a\3\2\2\2\u041d\u0420\5H%\2\u041e\u0420\5J&\2\u041f\u041d\3\2\2\2"+ + "\u041f\u041e\3\2\2\2\u0420\u0428\3\2\2\2\u0421\u0423\7\7\2\2\u0422\u0421"+ + "\3\2\2\2\u0423\u0426\3\2\2\2\u0424\u0422\3\2\2\2\u0424\u0425\3\2\2\2\u0425"+ + "\u0427\3\2\2\2\u0426\u0424\3\2\2\2\u0427\u0429\5j\66\2\u0428\u0424\3\2"+ + "\2\2\u0428\u0429\3\2\2\2\u0429\u0438\3\2\2\2\u042a\u042c\7\7\2\2\u042b"+ + "\u042a\3\2\2\2\u042c\u042f\3\2\2\2\u042d\u042b\3\2\2\2\u042d\u042e\3\2"+ + "\2\2\u042e\u0430\3\2\2\2\u042f\u042d\3\2\2\2\u0430\u0434\t\4\2\2\u0431"+ + "\u0433\7\7\2\2\u0432\u0431\3\2\2\2\u0433\u0436\3\2\2\2\u0434\u0432\3\2"+ + "\2\2\u0434\u0435\3\2\2\2\u0435\u0437\3\2\2\2\u0436\u0434\3\2\2\2\u0437"+ + "\u0439\5x=\2\u0438\u042d\3\2\2\2\u0438\u0439\3\2\2\2\u0439\u0452\3\2\2"+ + "\2\u043a\u043c\7\7\2\2\u043b\u043a\3\2\2\2\u043c\u043f\3\2\2\2\u043d\u043b"+ + "\3\2\2\2\u043d\u043e\3\2\2\2\u043e\u0440\3\2\2\2\u043f\u043d\3\2\2\2\u0440"+ + "\u0444\5L\'\2\u0441\u0442\5\u0124\u0093\2\u0442\u0443\5N(\2\u0443\u0445"+ + "\3\2\2\2\u0444\u0441\3\2\2\2\u0444\u0445\3\2\2\2\u0445\u0453\3\2\2\2\u0446"+ + "\u0448\7\7\2\2\u0447\u0446\3\2\2\2\u0448\u044b\3\2\2\2\u0449\u0447\3\2"+ + "\2\2\u0449\u044a\3\2\2\2\u044a\u044c\3\2\2\2\u044b\u0449\3\2\2\2\u044c"+ + "\u0450\5N(\2\u044d\u044e\5\u0124\u0093\2\u044e\u044f\5L\'\2\u044f\u0451"+ + "\3\2\2\2\u0450\u044d\3\2\2\2\u0450\u0451\3\2\2\2\u0451\u0453\3\2\2\2\u0452"+ + "\u043d\3\2\2\2\u0452\u0449\3\2\2\2\u0452\u0453\3\2\2\2\u0453G\3\2\2\2"+ + "\u0454\u0455\7\13\2\2\u0455\u045a\5J&\2\u0456\u0457\7\n\2\2\u0457\u0459"+ + "\5J&\2\u0458\u0456\3\2\2\2\u0459\u045c\3\2\2\2\u045a\u0458\3\2\2\2\u045a"+ + "\u045b\3\2\2\2\u045b\u045d\3\2\2\2\u045c\u045a\3\2\2\2\u045d\u045e\7\f"+ + "\2\2\u045eI\3\2\2\2\u045f\u0462\5\u0122\u0092\2\u0460\u0461\7\33\2\2\u0461"+ + "\u0463\5V,\2\u0462\u0460\3\2\2\2\u0462\u0463\3\2\2\2\u0463K\3\2\2\2\u0464"+ + "\u0466\5\u00fe\u0080\2\u0465\u0464\3\2\2\2\u0465\u0466\3\2\2\2\u0466\u0467"+ + "\3\2\2\2\u0467\u0496\7c\2\2\u0468\u046a\5\u00fe\u0080\2\u0469\u0468\3"+ + "\2\2\2\u0469\u046a\3\2\2\2\u046a\u046b\3\2\2\2\u046b\u046f\7c\2\2\u046c"+ + "\u046e\7\7\2\2\u046d\u046c\3\2\2\2\u046e\u0471\3\2\2\2\u046f\u046d\3\2"+ + "\2\2\u046f\u0470\3\2\2\2\u0470\u0472\3\2\2\2\u0471\u046f\3\2\2\2\u0472"+ + "\u0473\7\13\2\2\u0473\u0482\7\f\2\2\u0474\u0476\7\7\2\2\u0475\u0474\3"+ + "\2\2\2\u0476\u0479\3\2\2\2\u0477\u0475\3\2\2\2\u0477\u0478\3\2\2\2\u0478"+ + "\u047a\3\2\2\2\u0479\u0477\3\2\2\2\u047a\u047e\7\33\2\2\u047b\u047d\7"+ + "\7\2\2\u047c\u047b\3\2\2\2\u047d\u0480\3\2\2\2\u047e\u047c\3\2\2\2\u047e"+ + "\u047f\3\2\2\2\u047f\u0481\3\2\2\2\u0480\u047e\3\2\2\2\u0481\u0483\5V"+ + ",\2\u0482\u0477\3\2\2\2\u0482\u0483\3\2\2\2\u0483\u0487\3\2\2\2\u0484"+ + "\u0486\7\7\2\2\u0485\u0484\3\2\2\2\u0486\u0489\3\2\2\2\u0487\u0485\3\2"+ + "\2\2\u0487\u0488\3\2\2\2\u0488\u0493\3\2\2\2\u0489\u0487\3\2\2\2\u048a"+ + "\u0494\5n8\2\u048b\u048f\7\35\2\2\u048c\u048e\7\7\2\2\u048d\u048c\3\2"+ + "\2\2\u048e\u0491\3\2\2\2\u048f\u048d\3\2\2\2\u048f\u0490\3\2\2\2\u0490"+ + "\u0492\3\2\2\2\u0491\u048f\3\2\2\2\u0492\u0494\5x=\2\u0493\u048a\3\2\2"+ + "\2\u0493\u048b\3\2\2\2\u0494\u0496\3\2\2\2\u0495\u0465\3\2\2\2\u0495\u0469"+ + "\3\2\2\2\u0496M\3\2\2\2\u0497\u0499\5\u00fe\u0080\2\u0498\u0497\3\2\2"+ + "\2\u0498\u0499\3\2\2\2\u0499\u049a\3\2\2\2\u049a\u04bb\7d\2\2\u049b\u049d"+ + "\5\u00fe\u0080\2\u049c\u049b\3\2\2\2\u049c\u049d\3\2\2\2\u049d\u049e\3"+ + "\2\2\2\u049e\u04a2\7d\2\2\u049f\u04a1\7\7\2\2\u04a0\u049f\3\2\2\2\u04a1"+ + "\u04a4\3\2\2\2\u04a2\u04a0\3\2\2\2\u04a2\u04a3\3\2\2\2\u04a3\u04a5\3\2"+ + "\2\2\u04a4\u04a2\3\2\2\2\u04a5\u04aa\7\13\2\2\u04a6\u04a9\5\u0116\u008c"+ + "\2\u04a7\u04a9\5\u0110\u0089\2\u04a8\u04a6\3\2\2\2\u04a8\u04a7\3\2\2\2"+ + "\u04a9\u04ac\3\2\2\2\u04aa\u04a8\3\2\2\2\u04aa\u04ab\3\2\2\2\u04ab\u04af"+ + "\3\2\2\2\u04ac\u04aa\3\2\2\2\u04ad\u04b0\5\u0122\u0092\2\u04ae\u04b0\5"+ + "<\37\2\u04af\u04ad\3\2\2\2\u04af\u04ae\3\2\2\2\u04b0\u04b1\3\2\2\2\u04b1"+ + "\u04b5\7\f\2\2\u04b2\u04b4\7\7\2\2\u04b3\u04b2\3\2\2\2\u04b4\u04b7\3\2"+ + "\2\2\u04b5\u04b3\3\2\2\2\u04b5\u04b6\3\2\2\2\u04b6\u04b8\3\2\2\2\u04b7"+ + "\u04b5\3\2\2\2\u04b8\u04b9\5@!\2\u04b9\u04bb\3\2\2\2\u04ba\u0498\3\2\2"+ + "\2\u04ba\u049c\3\2\2\2\u04bbO\3\2\2\2\u04bc\u04be\5\u00fe\u0080\2\u04bd"+ + "\u04bc\3\2\2\2\u04bd\u04be\3\2\2\2\u04be\u04bf\3\2\2\2\u04bf\u04c3\7C"+ + "\2\2\u04c0\u04c2\7\7\2\2\u04c1\u04c0\3\2\2\2\u04c2\u04c5\3\2\2\2\u04c3"+ + "\u04c1\3\2\2\2\u04c3\u04c4\3\2\2\2\u04c4\u04c6\3\2\2\2\u04c5\u04c3\3\2"+ + "\2\2\u04c6\u04ce\5\u0122\u0092\2\u04c7\u04c9\7\7\2\2\u04c8\u04c7\3\2\2"+ + "\2\u04c9\u04cc\3\2\2\2\u04ca\u04c8\3\2\2\2\u04ca\u04cb\3\2\2\2\u04cb\u04cd"+ + "\3\2\2\2\u04cc\u04ca\3\2\2\2\u04cd\u04cf\5R*\2\u04ce\u04ca\3\2\2\2\u04ce"+ + "\u04cf\3\2\2\2\u04cf\u04d3\3\2\2\2\u04d0\u04d2\7\7\2\2\u04d1\u04d0\3\2"+ + "\2\2\u04d2\u04d5\3\2\2\2\u04d3\u04d1\3\2\2\2\u04d3\u04d4\3\2\2\2\u04d4"+ + "\u04d6\3\2\2\2\u04d5\u04d3\3\2\2\2\u04d6\u04da\7\35\2\2\u04d7\u04d9\7"+ + "\7\2\2\u04d8\u04d7\3\2\2\2\u04d9\u04dc\3\2\2\2\u04da\u04d8\3\2\2\2\u04da"+ + "\u04db\3\2\2\2\u04db\u04dd\3\2\2\2\u04dc\u04da\3\2\2\2\u04dd\u04de\5V"+ + ",\2\u04deQ\3\2\2\2\u04df\u04e3\7-\2\2\u04e0\u04e2\7\7\2\2\u04e1\u04e0"+ + "\3\2\2\2\u04e2\u04e5\3\2\2\2\u04e3\u04e1\3\2\2\2\u04e3\u04e4\3\2\2\2\u04e4"+ + "\u04e6\3\2\2\2\u04e5\u04e3\3\2\2\2\u04e6\u04f7\5T+\2\u04e7\u04e9\7\7\2"+ + "\2\u04e8\u04e7\3\2\2\2\u04e9\u04ec\3\2\2\2\u04ea\u04e8\3\2\2\2\u04ea\u04eb"+ + "\3\2\2\2\u04eb\u04ed\3\2\2\2\u04ec\u04ea\3\2\2\2\u04ed\u04f1\7\n\2\2\u04ee"+ + "\u04f0\7\7\2\2\u04ef\u04ee\3\2\2\2\u04f0\u04f3\3\2\2\2\u04f1\u04ef\3\2"+ + "\2\2\u04f1\u04f2\3\2\2\2\u04f2\u04f4\3\2\2\2\u04f3\u04f1\3\2\2\2\u04f4"+ + "\u04f6\5T+\2\u04f5\u04ea\3\2\2\2\u04f6\u04f9\3\2\2\2\u04f7\u04f5\3\2\2"+ + "\2\u04f7\u04f8\3\2\2\2\u04f8\u0501\3\2\2\2\u04f9\u04f7\3\2\2\2\u04fa\u04fc"+ + "\7\7\2\2\u04fb\u04fa\3\2\2\2\u04fc\u04ff\3\2\2\2\u04fd\u04fb\3\2\2\2\u04fd"+ + "\u04fe\3\2\2\2\u04fe\u0500\3\2\2\2\u04ff\u04fd\3\2\2\2\u0500\u0502\7\n"+ + "\2\2\u0501\u04fd\3\2\2\2\u0501\u0502\3\2\2\2\u0502\u0506\3\2\2\2\u0503"+ + "\u0505\7\7\2\2\u0504\u0503\3\2\2\2\u0505\u0508\3\2\2\2\u0506\u0504\3\2"+ + "\2\2\u0506\u0507\3\2\2\2\u0507\u0509\3\2\2\2\u0508\u0506\3\2\2\2\u0509"+ + "\u050a\7.\2\2\u050aS\3\2\2\2\u050b\u050d\5\u00fe\u0080\2\u050c\u050b\3"+ + "\2\2\2\u050c\u050d\3\2\2\2\u050d\u0511\3\2\2\2\u050e\u0510\7\7\2\2\u050f"+ + "\u050e\3\2\2\2\u0510\u0513\3\2\2\2\u0511\u050f\3\2\2\2\u0511\u0512\3\2"+ + "\2\2\u0512\u0516\3\2\2\2\u0513\u0511\3\2\2\2\u0514\u0517\5\u0122\u0092"+ + "\2\u0515\u0517\7\21\2\2\u0516\u0514\3\2\2\2\u0516\u0515\3\2\2\2\u0517"+ + "\u0526\3\2\2\2\u0518\u051a\7\7\2\2\u0519\u0518\3\2\2\2\u051a\u051d\3\2"+ + "\2\2\u051b\u0519\3\2\2\2\u051b\u051c\3\2\2\2\u051c\u051e\3\2\2\2\u051d"+ + "\u051b\3\2\2\2\u051e\u0522\7\33\2\2\u051f\u0521\7\7\2\2\u0520\u051f\3"+ + "\2\2\2\u0521\u0524\3\2\2\2\u0522\u0520\3\2\2\2\u0522\u0523\3\2\2\2\u0523"+ + "\u0525\3\2\2\2\u0524\u0522\3\2\2\2\u0525\u0527\5V,\2\u0526\u051b\3\2\2"+ + "\2\u0526\u0527\3\2\2\2\u0527U\3\2\2\2\u0528\u052a\5X-\2\u0529\u0528\3"+ + "\2\2\2\u0529\u052a\3\2\2\2\u052a\u052f\3\2\2\2\u052b\u0530\5`\61\2\u052c"+ + "\u0530\5Z.\2\u052d\u0530\5\\/\2\u052e\u0530\5^\60\2\u052f\u052b\3\2\2"+ + "\2\u052f\u052c\3\2\2\2\u052f\u052d\3\2\2\2\u052f\u052e\3\2\2\2\u0530W"+ + "\3\2\2\2\u0531\u053a\5\u0116\u008c\2\u0532\u0536\7x\2\2\u0533\u0535\7"+ + "\7\2\2\u0534\u0533\3\2\2\2\u0535\u0538\3\2\2\2\u0536\u0534\3\2\2\2\u0536"+ + "\u0537\3\2\2\2\u0537\u053a\3\2\2\2\u0538\u0536\3\2\2\2\u0539\u0531\3\2"+ + "\2\2\u0539\u0532\3\2\2\2\u053a\u053b\3\2\2\2\u053b\u0539\3\2\2\2\u053b"+ + "\u053c\3\2\2\2\u053cY\3\2\2\2\u053d\u053e\7\13\2\2\u053e\u053f\5V,\2\u053f"+ + "\u0540\7\f\2\2\u0540[\3\2\2\2\u0541\u0544\5^\60\2\u0542\u0544\5Z.\2\u0543"+ + "\u0541\3\2\2\2\u0543\u0542\3\2\2\2\u0544\u0548\3\2\2\2\u0545\u0547\7\7"+ + "\2\2\u0546\u0545\3\2\2\2\u0547\u054a\3\2\2\2\u0548\u0546\3\2\2\2\u0548"+ + "\u0549\3\2\2\2\u0549\u054c\3\2\2\2\u054a\u0548\3\2\2\2\u054b\u054d\7+"+ + "\2\2\u054c\u054b\3\2\2\2\u054d\u054e\3\2\2\2\u054e\u054c\3\2\2\2\u054e"+ + "\u054f\3\2\2\2\u054f]\3\2\2\2\u0550\u0551\7\13\2\2\u0551\u0552\5^\60\2"+ + "\u0552\u0553\7\f\2\2\u0553\u0557\3\2\2\2\u0554\u0557\5d\63\2\u0555\u0557"+ + "\7i\2\2\u0556\u0550\3\2\2\2\u0556\u0554\3\2\2\2\u0556\u0555\3\2\2\2\u0557"+ + "_\3\2\2\2\u0558\u055c\5b\62\2\u0559\u055b\7\7\2\2\u055a\u0559\3\2\2\2"+ + "\u055b\u055e\3\2\2\2\u055c\u055a\3\2\2\2\u055c\u055d\3\2\2\2\u055d\u055f"+ + "\3\2\2\2\u055e\u055c\3\2\2\2\u055f\u0563\7\t\2\2\u0560\u0562\7\7\2\2\u0561"+ + "\u0560\3\2\2\2\u0562\u0565\3\2\2\2\u0563\u0561\3\2\2\2\u0563\u0564\3\2"+ + "\2\2\u0564\u0567\3\2\2\2\u0565\u0563\3\2\2\2\u0566\u0558\3\2\2\2\u0566"+ + "\u0567\3\2\2\2\u0567\u0568\3\2\2\2\u0568\u056c\5h\65\2\u0569\u056b\7\7"+ + "\2\2\u056a\u0569\3\2\2\2\u056b\u056e\3\2\2\2\u056c\u056a\3\2\2\2\u056c"+ + "\u056d\3\2\2\2\u056d\u056f\3\2\2\2\u056e\u056c\3\2\2\2\u056f\u0573\7#"+ + "\2\2\u0570\u0572\7\7\2\2\u0571\u0570\3\2\2\2\u0572\u0575\3\2\2\2\u0573"+ + "\u0571\3\2\2\2\u0573\u0574\3\2\2\2\u0574\u0576\3\2\2\2\u0575\u0573\3\2"+ + "\2\2\u0576\u0577\5V,\2\u0577a\3\2\2\2\u0578\u057c\5Z.\2\u0579\u057c\5"+ + "\\/\2\u057a\u057c\5^\60\2\u057b\u0578\3\2\2\2\u057b\u0579\3\2\2\2\u057b"+ + "\u057a\3\2\2\2\u057cc\3\2\2\2\u057d\u058e\5f\64\2\u057e\u0580\7\7\2\2"+ + "\u057f\u057e\3\2\2\2\u0580\u0583\3\2\2\2\u0581\u057f\3\2\2\2\u0581\u0582"+ + "\3\2\2\2\u0582\u0584\3\2\2\2\u0583\u0581\3\2\2\2\u0584\u0588\7\t\2\2\u0585"+ + "\u0587\7\7\2\2\u0586\u0585\3\2\2\2\u0587\u058a\3\2\2\2\u0588\u0586\3\2"+ + "\2\2\u0588\u0589\3\2\2\2\u0589\u058b\3\2\2\2\u058a\u0588\3\2\2\2\u058b"+ + "\u058d\5f\64\2\u058c\u0581\3\2\2\2\u058d\u0590\3\2\2\2\u058e\u058c\3\2"+ + "\2\2\u058e\u058f\3\2\2\2\u058fe\3\2\2\2\u0590\u058e\3\2\2\2\u0591\u0599"+ + "\5\u0122\u0092\2\u0592\u0594\7\7\2\2\u0593\u0592\3\2\2\2\u0594\u0597\3"+ + "\2\2\2\u0595\u0593\3\2\2\2\u0595\u0596\3\2\2\2\u0596\u0598\3\2\2\2\u0597"+ + "\u0595\3\2\2\2\u0598\u059a\5\u00a0Q\2\u0599\u0595\3\2\2\2\u0599\u059a"+ + "\3\2\2\2\u059ag\3\2\2\2\u059b\u059f\7\13\2\2\u059c\u059e\7\7\2\2\u059d"+ + "\u059c\3\2\2\2\u059e\u05a1\3\2\2\2\u059f\u059d\3\2\2\2\u059f\u05a0\3\2"+ + "\2\2\u05a0\u05a4\3\2\2\2\u05a1\u059f\3\2\2\2\u05a2\u05a5\5<\37\2\u05a3"+ + "\u05a5\5V,\2\u05a4\u05a2\3\2\2\2\u05a4\u05a3\3\2\2\2\u05a4\u05a5\3\2\2"+ + "\2\u05a5\u05b9\3\2\2\2\u05a6\u05a8\7\7\2\2\u05a7\u05a6\3\2\2\2\u05a8\u05ab"+ + "\3\2\2\2\u05a9\u05a7\3\2\2\2\u05a9\u05aa\3\2\2\2\u05aa\u05ac\3\2\2\2\u05ab"+ + "\u05a9\3\2\2\2\u05ac\u05b0\7\n\2\2\u05ad\u05af\7\7\2\2\u05ae\u05ad\3\2"+ + "\2\2\u05af\u05b2\3\2\2\2\u05b0\u05ae\3\2\2\2\u05b0\u05b1\3\2\2\2\u05b1"+ + "\u05b5\3\2\2\2\u05b2\u05b0\3\2\2\2\u05b3\u05b6\5<\37\2\u05b4\u05b6\5V"+ + ",\2\u05b5\u05b3\3\2\2\2\u05b5\u05b4\3\2\2\2\u05b6\u05b8\3\2\2\2\u05b7"+ + "\u05a9\3\2\2\2\u05b8\u05bb\3\2\2\2\u05b9\u05b7\3\2\2\2\u05b9\u05ba\3\2"+ + "\2\2\u05ba\u05c3\3\2\2\2\u05bb\u05b9\3\2\2\2\u05bc\u05be\7\7\2\2\u05bd"+ + "\u05bc\3\2\2\2\u05be\u05c1\3\2\2\2\u05bf\u05bd\3\2\2\2\u05bf\u05c0\3\2"+ + "\2\2\u05c0\u05c2\3\2\2\2\u05c1\u05bf\3\2\2\2\u05c2\u05c4\7\n\2\2\u05c3"+ + "\u05bf\3\2\2\2\u05c3\u05c4\3\2\2\2\u05c4\u05c8\3\2\2\2\u05c5\u05c7\7\7"+ + "\2\2\u05c6\u05c5\3\2\2\2\u05c7\u05ca\3\2\2\2\u05c8\u05c6\3\2\2\2\u05c8"+ + "\u05c9\3\2\2\2\u05c9\u05cb\3\2\2\2\u05ca\u05c8\3\2\2\2\u05cb\u05cc\7\f"+ + "\2\2\u05cci\3\2\2\2\u05cd\u05d1\7K\2\2\u05ce\u05d0\7\7\2\2\u05cf\u05ce"+ + "\3\2\2\2\u05d0\u05d3\3\2\2\2\u05d1\u05cf\3\2\2\2\u05d1\u05d2\3\2\2\2\u05d2"+ + "\u05d4\3\2\2\2\u05d3\u05d1\3\2\2\2\u05d4\u05e5\5l\67\2\u05d5\u05d7\7\7"+ + "\2\2\u05d6\u05d5\3\2\2\2\u05d7\u05da\3\2\2\2\u05d8\u05d6\3\2\2\2\u05d8"+ + "\u05d9\3\2\2\2\u05d9\u05db\3\2\2\2\u05da\u05d8\3\2\2\2\u05db\u05df\7\n"+ + "\2\2\u05dc\u05de\7\7\2\2\u05dd\u05dc\3\2\2\2\u05de\u05e1\3\2\2\2\u05df"+ + "\u05dd\3\2\2\2\u05df\u05e0\3\2\2\2\u05e0\u05e2\3\2\2\2\u05e1\u05df\3\2"+ + "\2\2\u05e2\u05e4\5l\67\2\u05e3\u05d8\3\2\2\2\u05e4\u05e7\3\2\2\2\u05e5"+ + "\u05e3\3\2\2\2\u05e5\u05e6\3\2\2\2\u05e6k\3\2\2\2\u05e7\u05e5\3\2\2\2"+ + "\u05e8\u05ea\5\u0116\u008c\2\u05e9\u05e8\3\2\2\2\u05ea\u05ed\3\2\2\2\u05eb"+ + "\u05e9\3\2\2\2\u05eb\u05ec\3\2\2\2\u05ec\u05ee\3\2\2\2\u05ed\u05eb\3\2"+ + "\2\2\u05ee\u05f2\5\u0122\u0092\2\u05ef\u05f1\7\7\2\2\u05f0\u05ef\3\2\2"+ + "\2\u05f1\u05f4\3\2\2\2\u05f2\u05f0\3\2\2\2\u05f2\u05f3\3\2\2\2\u05f3\u05f5"+ + "\3\2\2\2\u05f4\u05f2\3\2\2\2\u05f5\u05f9\7\33\2\2\u05f6\u05f8\7\7\2\2"+ + "\u05f7\u05f6\3\2\2\2\u05f8\u05fb\3\2\2\2\u05f9\u05f7\3\2\2\2\u05f9\u05fa"+ + "\3\2\2\2\u05fa\u05fc\3\2\2\2\u05fb\u05f9\3\2\2\2\u05fc\u05fd\5V,\2\u05fd"+ + "m\3\2\2\2\u05fe\u05ff\7\17\2\2\u05ff\u0600\5p9\2\u0600\u0601\7\20\2\2"+ + "\u0601o\3\2\2\2\u0602\u0604\5\u0126\u0094\2\u0603\u0602\3\2\2\2\u0604"+ + "\u0607\3\2\2\2\u0605\u0603\3\2\2\2\u0605\u0606\3\2\2\2\u0606\u0616\3\2"+ + "\2\2\u0607\u0605\3\2\2\2\u0608\u0613\5r:\2\u0609\u060b\5\u0126\u0094\2"+ + "\u060a\u0609\3\2\2\2\u060b\u060c\3\2\2\2\u060c\u060a\3\2\2\2\u060c\u060d"+ + "\3\2\2\2\u060d\u060f\3\2\2\2\u060e\u0610\5r:\2\u060f\u060e\3\2\2\2\u060f"+ + "\u0610\3\2\2\2\u0610\u0612\3\2\2\2\u0611\u060a\3\2\2\2\u0612\u0615\3\2"+ + "\2\2\u0613\u0611\3\2\2\2\u0613\u0614\3\2\2\2\u0614\u0617\3\2\2\2\u0615"+ + "\u0613\3\2\2\2\u0616\u0608\3\2\2\2\u0616\u0617\3\2\2\2\u0617q\3\2\2\2"+ + "\u0618\u061b\5v<\2\u0619\u061b\5t;\2\u061a\u0618\3\2\2\2\u061a\u0619\3"+ + "\2\2\2\u061bs\3\2\2\2\u061c\u061e\5\u0116\u008c\2\u061d\u061c\3\2\2\2"+ + "\u061e\u0621\3\2\2\2\u061f\u061d\3\2\2\2\u061f\u0620\3\2\2\2\u0620\u0625"+ + "\3\2\2\2\u0621\u061f\3\2\2\2\u0622\u0624\7\7\2\2\u0623\u0622\3\2\2\2\u0624"+ + "\u0627\3\2\2\2\u0625\u0623\3\2\2\2\u0625\u0626\3\2\2\2\u0626\u0628\3\2"+ + "\2\2\u0627\u0625\3\2\2\2\u0628\u0629\5x=\2\u0629u\3\2\2\2\u062a\u062c"+ + "\5\u0114\u008b\2\u062b\u062a\3\2\2\2\u062c\u062f\3\2\2\2\u062d\u062b\3"+ + "\2\2\2\u062d\u062e\3\2\2\2\u062e\u0634\3\2\2\2\u062f\u062d\3\2\2\2\u0630"+ + "\u0635\5\26\f\2\u0631\u0635\5\66\34\2\u0632\u0635\5F$\2\u0633\u0635\5"+ + "P)\2\u0634\u0630\3\2\2\2\u0634\u0631\3\2\2\2\u0634\u0632\3\2\2\2\u0634"+ + "\u0633\3\2\2\2\u0635w\3\2\2\2\u0636\u063c\5z>\2\u0637\u0638\5\u00e8u\2"+ + "\u0638\u0639\5z>\2\u0639\u063b\3\2\2\2\u063a\u0637\3\2\2\2\u063b\u063e"+ + "\3\2\2\2\u063c\u063a\3\2\2\2\u063c\u063d\3\2\2\2\u063dy\3\2\2\2\u063e"+ + "\u063c\3\2\2\2\u063f\u0650\5|?\2\u0640\u0642\7\7\2\2\u0641\u0640\3\2\2"+ + "\2\u0642\u0645\3\2\2\2\u0643\u0641\3\2\2\2\u0643\u0644\3\2\2\2\u0644\u0646"+ + "\3\2\2\2\u0645\u0643\3\2\2\2\u0646\u064a\7\31\2\2\u0647\u0649\7\7\2\2"+ + "\u0648\u0647\3\2\2\2\u0649\u064c\3\2\2\2\u064a\u0648\3\2\2\2\u064a\u064b"+ + "\3\2\2\2\u064b\u064d\3\2\2\2\u064c\u064a\3\2\2\2\u064d\u064f\5|?\2\u064e"+ + "\u0643\3\2\2\2\u064f\u0652\3\2\2\2\u0650\u064e\3\2\2\2\u0650\u0651\3\2"+ + "\2\2\u0651{\3\2\2\2\u0652\u0650\3\2\2\2\u0653\u0664\5~@\2\u0654\u0656"+ + "\7\7\2\2\u0655\u0654\3\2\2\2\u0656\u0659\3\2\2\2\u0657\u0655\3\2\2\2\u0657"+ + "\u0658\3\2\2\2\u0658\u065a\3\2\2\2\u0659\u0657\3\2\2\2\u065a\u065e\7\30"+ + "\2\2\u065b\u065d\7\7\2\2\u065c\u065b\3\2\2\2\u065d\u0660\3\2\2\2\u065e"+ + "\u065c\3\2\2\2\u065e\u065f\3\2\2\2\u065f\u0661\3\2\2\2\u0660\u065e\3\2"+ + "\2\2\u0661\u0663\5~@\2\u0662\u0657\3\2\2\2\u0663\u0666\3\2\2\2\u0664\u0662"+ + "\3\2\2\2\u0664\u0665\3\2\2\2\u0665}\3\2\2\2\u0666\u0664\3\2\2\2\u0667"+ + "\u0673\5\u0080A\2\u0668\u066c\5\u00eav\2\u0669\u066b\7\7\2\2\u066a\u0669"+ + "\3\2\2\2\u066b\u066e\3\2\2\2\u066c\u066a\3\2\2\2\u066c\u066d\3\2\2\2\u066d"+ + "\u066f\3\2\2\2\u066e\u066c\3\2\2\2\u066f\u0670\5\u0080A\2\u0670\u0672"+ + "\3\2\2\2\u0671\u0668\3\2\2\2\u0672\u0675\3\2\2\2\u0673\u0671\3\2\2\2\u0673"+ + "\u0674\3\2\2\2\u0674\177\3\2\2\2\u0675\u0673\3\2\2\2\u0676\u0680\5\u0082"+ + "B\2\u0677\u067b\5\u00ecw\2\u0678\u067a\7\7\2\2\u0679\u0678\3\2\2\2\u067a"+ + "\u067d\3\2\2\2\u067b\u0679\3\2\2\2\u067b\u067c\3\2\2\2\u067c\u067e\3\2"+ + "\2\2\u067d\u067b\3\2\2\2\u067e\u067f\5\u0082B\2\u067f\u0681\3\2\2\2\u0680"+ + "\u0677\3\2\2\2\u0680\u0681\3\2\2\2\u0681\u0081\3\2\2\2\u0682\u0699\5\u0084"+ + "C\2\u0683\u0687\5\u00eex\2\u0684\u0686\7\7\2\2\u0685\u0684\3\2\2\2\u0686"+ + "\u0689\3\2\2\2\u0687\u0685\3\2\2\2\u0687\u0688\3\2\2\2\u0688\u068a\3\2"+ + "\2\2\u0689\u0687\3\2\2\2\u068a\u068b\5\u0084C\2\u068b\u068d\3\2\2\2\u068c"+ + "\u0683\3\2\2\2\u068d\u068e\3\2\2\2\u068e\u068c\3\2\2\2\u068e\u068f\3\2"+ + "\2\2\u068f\u069a\3\2\2\2\u0690\u0694\5\u00f0y\2\u0691\u0693\7\7\2\2\u0692"+ + "\u0691\3\2\2\2\u0693\u0696\3\2\2\2\u0694\u0692\3\2\2\2\u0694\u0695\3\2"+ + "\2\2\u0695\u0697\3\2\2\2\u0696\u0694\3\2\2\2\u0697\u0698\5V,\2\u0698\u069a"+ + "\3\2\2\2\u0699\u068c\3\2\2\2\u0699\u0690\3\2\2\2\u0699\u069a\3\2\2\2\u069a"+ + "\u0083\3\2\2\2\u069b\u06ac\5\u0086D\2\u069c\u069e\7\7\2\2\u069d\u069c"+ + "\3\2\2\2\u069e\u06a1\3\2\2\2\u069f\u069d\3\2\2\2\u069f\u06a0\3\2\2\2\u06a0"+ + "\u06a2\3\2\2\2\u06a1\u069f\3\2\2\2\u06a2\u06a6\7,\2\2\u06a3\u06a5\7\7"+ + "\2\2\u06a4\u06a3\3\2\2\2\u06a5\u06a8\3\2\2\2\u06a6\u06a4\3\2\2\2\u06a6"+ + "\u06a7\3\2\2\2\u06a7\u06a9\3\2\2\2\u06a8\u06a6\3\2\2\2\u06a9\u06ab\5\u0086"+ + "D\2\u06aa\u069f\3\2\2\2\u06ab\u06ae\3\2\2\2\u06ac\u06aa\3\2\2\2\u06ac"+ + "\u06ad\3\2\2\2\u06ad\u0085\3\2\2\2\u06ae\u06ac\3\2\2\2\u06af\u06bb\5\u0088"+ + "E\2\u06b0\u06b4\5\u0122\u0092\2\u06b1\u06b3\7\7\2\2\u06b2\u06b1\3\2\2"+ + "\2\u06b3\u06b6\3\2\2\2\u06b4\u06b2\3\2\2\2\u06b4\u06b5\3\2\2\2\u06b5\u06b7"+ + "\3\2\2\2\u06b6\u06b4\3\2\2\2\u06b7\u06b8\5\u0088E\2\u06b8\u06ba\3\2\2"+ + "\2\u06b9\u06b0\3\2\2\2\u06ba\u06bd\3\2\2\2\u06bb\u06b9\3\2\2\2\u06bb\u06bc"+ + "\3\2\2\2\u06bc\u0087\3\2\2\2\u06bd\u06bb\3\2\2\2\u06be\u06c9\5\u008aF"+ + "\2\u06bf\u06c3\7%\2\2\u06c0\u06c2\7\7\2\2\u06c1\u06c0\3\2\2\2\u06c2\u06c5"+ + "\3\2\2\2\u06c3\u06c1\3\2\2\2\u06c3\u06c4\3\2\2\2\u06c4\u06c6\3\2\2\2\u06c5"+ + "\u06c3\3\2\2\2\u06c6\u06c8\5\u008aF\2\u06c7\u06bf\3\2\2\2\u06c8\u06cb"+ + "\3\2\2\2\u06c9\u06c7\3\2\2\2\u06c9\u06ca\3\2\2\2\u06ca\u0089\3\2\2\2\u06cb"+ + "\u06c9\3\2\2\2\u06cc\u06d8\5\u008cG\2\u06cd\u06d1\5\u00f2z\2\u06ce\u06d0"+ + "\7\7\2\2\u06cf\u06ce\3\2\2\2\u06d0\u06d3\3\2\2\2\u06d1\u06cf\3\2\2\2\u06d1"+ + "\u06d2\3\2\2\2\u06d2\u06d4\3\2\2\2\u06d3\u06d1\3\2\2\2\u06d4\u06d5\5\u008c"+ + "G\2\u06d5\u06d7\3\2\2\2\u06d6\u06cd\3\2\2\2\u06d7\u06da\3\2\2\2\u06d8"+ + "\u06d6\3\2\2\2\u06d8\u06d9\3\2\2\2\u06d9\u008b\3\2\2\2\u06da\u06d8\3\2"+ + "\2\2\u06db\u06e7\5\u008eH\2\u06dc\u06e0\5\u00f4{\2\u06dd\u06df\7\7\2\2"+ + "\u06de\u06dd\3\2\2\2\u06df\u06e2\3\2\2\2\u06e0\u06de\3\2\2\2\u06e0\u06e1"+ + "\3\2\2\2\u06e1\u06e3\3\2\2\2\u06e2\u06e0\3\2\2\2\u06e3\u06e4\5\u008eH"+ + "\2\u06e4\u06e6\3\2\2\2\u06e5\u06dc\3\2\2\2\u06e6\u06e9\3\2\2\2\u06e7\u06e5"+ + "\3\2\2\2\u06e7\u06e8\3\2\2\2\u06e8\u008d\3\2\2\2\u06e9\u06e7\3\2\2\2\u06ea"+ + "\u06f6\5\u0090I\2\u06eb\u06ed\7\7\2\2\u06ec\u06eb\3\2\2\2\u06ed\u06f0"+ + "\3\2\2\2\u06ee\u06ec\3\2\2\2\u06ee\u06ef\3\2\2\2\u06ef\u06f1\3\2\2\2\u06f0"+ + "\u06ee\3\2\2\2\u06f1\u06f2\5\u00f6|\2\u06f2\u06f3\5\u0090I\2\u06f3\u06f5"+ + "\3\2\2\2\u06f4\u06ee\3\2\2\2\u06f5\u06f8\3\2\2\2\u06f6\u06f4\3\2\2\2\u06f6"+ + "\u06f7\3\2\2\2\u06f7\u008f\3\2\2\2\u06f8\u06f6\3\2\2\2\u06f9\u06fb\5\u00f8"+ + "}\2\u06fa\u06f9\3\2\2\2\u06fb\u06fe\3\2\2\2\u06fc\u06fa\3\2\2\2\u06fc"+ + "\u06fd\3\2\2\2\u06fd\u06ff\3\2\2\2\u06fe\u06fc\3\2\2\2\u06ff\u0700\5\u0092"+ + "J\2\u0700\u0091\3\2\2\2\u0701\u0704\5\u0094K\2\u0702\u0704\5\u00e6t\2"+ + "\u0703\u0701\3\2\2\2\u0703\u0702\3\2\2\2\u0704\u0708\3\2\2\2\u0705\u0707"+ + "\5\u00fa~\2\u0706\u0705\3\2\2\2\u0707\u070a\3\2\2\2\u0708\u0706\3\2\2"+ + "\2\u0708\u0709\3\2\2\2\u0709\u0093\3\2\2\2\u070a\u0708\3\2\2\2\u070b\u071a"+ + "\5\u0096L\2\u070c\u071a\5\u00a8U\2\u070d\u071a\5\u00b8]\2\u070e\u071a"+ + "\5\u00c2b\2\u070f\u071a\5\u00c4c\2\u0710\u071a\5\u00c6d\2\u0711\u071a"+ + "\5\u00d6l\2\u0712\u071a\5\u00be`\2\u0713\u071a\5\u00e4s\2\u0714\u071a"+ + "\5\u00dco\2\u0715\u071a\5\u00c0a\2\u0716\u071a\5\u0122\u0092\2\u0717\u0718"+ + "\7A\2\2\u0718\u071a\5\u0120\u0091\2\u0719\u070b\3\2\2\2\u0719\u070c\3"+ + "\2\2\2\u0719\u070d\3\2\2\2\u0719\u070e\3\2\2\2\u0719\u070f\3\2\2\2\u0719"+ + "\u0710\3\2\2\2\u0719\u0711\3\2\2\2\u0719\u0712\3\2\2\2\u0719\u0713\3\2"+ + "\2\2\u0719\u0714\3\2\2\2\u0719\u0715\3\2\2\2\u0719\u0716\3\2\2\2\u0719"+ + "\u0717\3\2\2\2\u071a\u0095\3\2\2\2\u071b\u071c\7\13\2\2\u071c\u071d\5"+ + "x=\2\u071d\u071e\7\f\2\2\u071e\u0097\3\2\2\2\u071f\u0721\5\u00a0Q\2\u0720"+ + "\u0722\5\u009eP\2\u0721\u0720\3\2\2\2\u0721\u0722\3\2\2\2\u0722\u0726"+ + "\3\2\2\2\u0723\u0725\5\u009aN\2\u0724\u0723\3\2\2\2\u0725\u0728\3\2\2"+ + "\2\u0726\u0724\3\2\2\2\u0726\u0727\3\2\2\2\u0727\u0736\3\2\2\2\u0728\u0726"+ + "\3\2\2\2\u0729\u072d\5\u009eP\2\u072a\u072c\5\u009aN\2\u072b\u072a\3\2"+ + "\2\2\u072c\u072f\3\2\2\2\u072d\u072b\3\2\2\2\u072d\u072e\3\2\2\2\u072e"+ + "\u0736\3\2\2\2\u072f\u072d\3\2\2\2\u0730\u0732\5\u009aN\2\u0731\u0730"+ + "\3\2\2\2\u0732\u0733\3\2\2\2\u0733\u0731\3\2\2\2\u0733\u0734\3\2\2\2\u0734"+ + "\u0736\3\2\2\2\u0735\u071f\3\2\2\2\u0735\u0729\3\2\2\2\u0735\u0731\3\2"+ + "\2\2\u0736\u0099\3\2\2\2\u0737\u0739\5\u011e\u0090\2\u0738\u0737\3\2\2"+ + "\2\u0739\u073c\3\2\2\2\u073a\u0738\3\2\2\2\u073a\u073b\3\2\2\2\u073b\u073e"+ + "\3\2\2\2\u073c\u073a\3\2\2\2\u073d\u073f\7\u0090\2\2\u073e\u073d\3\2\2"+ + "\2\u073e\u073f\3\2\2\2\u073f\u0743\3\2\2\2\u0740\u0742\7\7\2\2\u0741\u0740"+ + "\3\2\2\2\u0742\u0745\3\2\2\2\u0743\u0741\3\2\2\2\u0743\u0744\3\2\2\2\u0744"+ + "\u0746\3\2\2\2\u0745\u0743\3\2\2\2\u0746\u0747\5\u00b8]\2\u0747\u009b"+ + "\3\2\2\2\u0748\u0751\7\r\2\2\u0749\u074e\5x=\2\u074a\u074b\7\n\2\2\u074b"+ + "\u074d\5x=\2\u074c\u074a\3\2\2\2\u074d\u0750\3\2\2\2\u074e\u074c\3\2\2"+ + "\2\u074e\u074f\3\2\2\2\u074f\u0752\3\2\2\2\u0750\u074e\3\2\2\2\u0751\u0749"+ + "\3\2\2\2\u0751\u0752\3\2\2\2\u0752\u0753\3\2\2\2\u0753\u0754\7\16\2\2"+ + "\u0754\u009d\3\2\2\2\u0755\u0767\7\13\2\2\u0756\u075b\5\u00a6T\2\u0757"+ + "\u0758\7\n\2\2\u0758\u075a\5\u00a6T\2\u0759\u0757\3\2\2\2\u075a\u075d"+ + "\3\2\2\2\u075b\u0759\3\2\2\2\u075b\u075c\3\2\2\2\u075c\u0765\3\2\2\2\u075d"+ + "\u075b\3\2\2\2\u075e\u0760\7\7\2\2\u075f\u075e\3\2\2\2\u0760\u0763\3\2"+ + "\2\2\u0761\u075f\3\2\2\2\u0761\u0762\3\2\2\2\u0762\u0764\3\2\2\2\u0763"+ + "\u0761\3\2\2\2\u0764\u0766\7\n\2\2\u0765\u0761\3\2\2\2\u0765\u0766\3\2"+ + "\2\2\u0766\u0768\3\2\2\2\u0767\u0756\3\2\2\2\u0767\u0768\3\2\2\2\u0768"+ + "\u0769\3\2\2\2\u0769\u076a\7\f\2\2\u076a\u009f\3\2\2\2\u076b\u076f\7-"+ + "\2\2\u076c\u076e\7\7\2\2\u076d\u076c\3\2\2\2\u076e\u0771\3\2\2\2\u076f"+ + "\u076d\3\2\2\2\u076f\u0770\3\2\2\2\u0770\u0772\3\2\2\2\u0771\u076f\3\2"+ + "\2\2\u0772\u077d\5\u00a2R\2\u0773\u0775\7\7\2\2\u0774\u0773\3\2\2\2\u0775"+ + "\u0778\3\2\2\2\u0776\u0774\3\2\2\2\u0776\u0777\3\2\2\2\u0777\u0779\3\2"+ + "\2\2\u0778\u0776\3\2\2\2\u0779\u077a\7\n\2\2\u077a\u077c\5\u00a2R\2\u077b"+ + "\u0776\3\2\2\2\u077c\u077f\3\2\2\2\u077d\u077b\3\2\2\2\u077d\u077e\3\2"+ + "\2\2\u077e\u0787\3\2\2\2\u077f\u077d\3\2\2\2\u0780\u0782\7\7\2\2\u0781"+ + "\u0780\3\2\2\2\u0782\u0785\3\2\2\2\u0783\u0781\3\2\2\2\u0783\u0784\3\2"+ + "\2\2\u0784\u0786\3\2\2\2\u0785\u0783\3\2\2\2\u0786\u0788\7\n\2\2\u0787"+ + "\u0783\3\2\2\2\u0787\u0788\3\2\2\2\u0788\u078c\3\2\2\2\u0789\u078b\7\7"+ + "\2\2\u078a\u0789\3\2\2\2\u078b\u078e\3\2\2\2\u078c\u078a\3\2\2\2\u078c"+ + "\u078d\3\2\2\2\u078d\u078f\3\2\2\2\u078e\u078c\3\2\2\2\u078f\u0791\7."+ + "\2\2\u0790\u0792\7+\2\2\u0791\u0790\3\2\2\2\u0791\u0792\3\2\2\2\u0792"+ + "\u00a1\3\2\2\2\u0793\u0795\5\u00a4S\2\u0794\u0793\3\2\2\2\u0794\u0795"+ + "\3\2\2\2\u0795\u0796\3\2\2\2\u0796\u0799\5V,\2\u0797\u0799\7\21\2\2\u0798"+ + "\u0794\3\2\2\2\u0798\u0797\3\2\2\2\u0799\u00a3\3\2\2\2\u079a\u079c\5\u0108"+ + "\u0085\2\u079b\u079a\3\2\2\2\u079c\u079d\3\2\2\2\u079d\u079b\3\2\2\2\u079d"+ + "\u079e\3\2\2\2\u079e\u00a5\3\2\2\2\u079f\u07a3\5\u0122\u0092\2\u07a0\u07a2"+ + "\7\7\2\2\u07a1\u07a0\3\2\2\2\u07a2\u07a5\3\2\2\2\u07a3\u07a1\3\2\2\2\u07a3"+ + "\u07a4\3\2\2\2\u07a4\u07a6\3\2\2\2\u07a5\u07a3\3\2\2\2\u07a6\u07aa\7\35"+ + "\2\2\u07a7\u07a9\7\7\2\2\u07a8\u07a7\3\2\2\2\u07a9\u07ac\3\2\2\2\u07aa"+ + "\u07a8\3\2\2\2\u07aa\u07ab\3\2\2\2\u07ab\u07ae\3\2\2\2\u07ac\u07aa\3\2"+ + "\2\2\u07ad\u079f\3\2\2\2\u07ad\u07ae\3\2\2\2\u07ae\u07b0\3\2\2\2\u07af"+ + "\u07b1\7\21\2\2\u07b0\u07af\3\2\2\2\u07b0\u07b1\3\2\2\2\u07b1\u07b5\3"+ + "\2\2\2\u07b2\u07b4\7\7\2\2\u07b3\u07b2\3\2\2\2\u07b4\u07b7\3\2\2\2\u07b5"+ + "\u07b3\3\2\2\2\u07b5\u07b6\3\2\2\2\u07b6\u07b8\3\2\2\2\u07b7\u07b5\3\2"+ + "\2\2\u07b8\u07b9\5x=\2\u07b9\u00a7\3\2\2\2\u07ba\u07c4\7\u008c\2\2\u07bb"+ + "\u07c4\7\u0089\2\2\u07bc\u07c4\5\u00aaV\2\u07bd\u07c4\7\u008a\2\2\u07be"+ + "\u07c4\7\u008b\2\2\u07bf\u07c4\7\u0092\2\2\u07c0\u07c4\7\u0085\2\2\u07c1"+ + "\u07c4\7\u008d\2\2\u07c2\u07c4\7\u0088\2\2\u07c3\u07ba\3\2\2\2\u07c3\u07bb"+ + "\3\2\2\2\u07c3\u07bc\3\2\2\2\u07c3\u07bd\3\2\2\2\u07c3\u07be\3\2\2\2\u07c3"+ + "\u07bf\3\2\2\2\u07c3\u07c0\3\2\2\2\u07c3\u07c1\3\2\2\2\u07c3\u07c2\3\2"+ + "\2\2\u07c4\u00a9\3\2\2\2\u07c5\u07c8\5\u00acW\2\u07c6\u07c8\5\u00aeX\2"+ + "\u07c7\u07c5\3\2\2\2\u07c7\u07c6\3\2\2\2\u07c8\u00ab\3\2\2\2\u07c9\u07ce"+ + "\7\u0083\2\2\u07ca\u07cd\5\u00b0Y\2\u07cb\u07cd\5\u00b2Z\2\u07cc\u07ca"+ + "\3\2\2\2\u07cc\u07cb\3\2\2\2\u07cd\u07d0\3\2\2\2\u07ce\u07cc\3\2\2\2\u07ce"+ + "\u07cf\3\2\2\2\u07cf\u07d1\3\2\2\2\u07d0\u07ce\3\2\2\2\u07d1\u07d2\7\u009d"+ + "\2\2\u07d2\u00ad\3\2\2\2\u07d3\u07da\7\u0084\2\2\u07d4\u07d9\5\u00b4["+ + "\2\u07d5\u07d9\5\u00b6\\\2\u07d6\u07d9\5\u00acW\2\u07d7\u07d9\7\u00a3"+ + "\2\2\u07d8\u07d4\3\2\2\2\u07d8\u07d5\3\2\2\2\u07d8\u07d6\3\2\2\2\u07d8"+ + "\u07d7\3\2\2\2\u07d9\u07dc\3\2\2\2\u07da\u07d8\3\2\2\2\u07da\u07db\3\2"+ + "\2\2\u07db\u07dd\3\2\2\2\u07dc\u07da\3\2\2\2\u07dd\u07de\7\u00a2\2\2\u07de"+ + "\u00af\3\2\2\2\u07df\u07e0\t\5\2\2\u07e0\u00b1\3\2\2\2\u07e1\u07e2\7\u00a1"+ + "\2\2\u07e2\u07e3\5x=\2\u07e3\u07e4\7\20\2\2\u07e4\u00b3\3\2\2\2\u07e5"+ + "\u07e6\t\6\2\2\u07e6\u00b5\3\2\2\2\u07e7\u07e8\7\u00a7\2\2\u07e8\u07e9"+ + "\5x=\2\u07e9\u07ea\7\20\2\2\u07ea\u00b7\3\2\2\2\u07eb\u07ed\5\u0116\u008c"+ + "\2\u07ec\u07eb\3\2\2\2\u07ed\u07f0\3\2\2\2\u07ee\u07ec\3\2\2\2\u07ee\u07ef"+ + "\3\2\2\2\u07ef\u081f\3\2\2\2\u07f0\u07ee\3\2\2\2\u07f1\u07f5\7\17\2\2"+ + "\u07f2\u07f4\7\7\2\2\u07f3\u07f2\3\2\2\2\u07f4\u07f7\3\2\2\2\u07f5\u07f3"+ + "\3\2\2\2\u07f5\u07f6\3\2\2\2\u07f6\u07f8\3\2\2\2\u07f7\u07f5\3\2\2\2\u07f8"+ + "\u07fc\5p9\2\u07f9\u07fb\7\7\2\2\u07fa\u07f9\3\2\2\2\u07fb\u07fe\3\2\2"+ + "\2\u07fc\u07fa\3\2\2\2\u07fc\u07fd\3\2\2\2\u07fd\u07ff\3\2\2\2\u07fe\u07fc"+ + "\3\2\2\2\u07ff\u0800\7\20\2\2\u0800\u0820\3\2\2\2\u0801\u0805\7\17\2\2"+ + "\u0802\u0804\7\7\2\2\u0803\u0802\3\2\2\2\u0804\u0807\3\2\2\2\u0805\u0803"+ + "\3\2\2\2\u0805\u0806\3\2\2\2\u0806\u0808\3\2\2\2\u0807\u0805\3\2\2\2\u0808"+ + "\u080c\5\u00ba^\2\u0809\u080b\7\7\2\2\u080a\u0809\3\2\2\2\u080b\u080e"+ + "\3\2\2\2\u080c\u080a\3\2\2\2\u080c\u080d\3\2\2\2\u080d\u080f\3\2\2\2\u080e"+ + "\u080c\3\2\2\2\u080f\u0813\7#\2\2\u0810\u0812\7\7\2\2\u0811\u0810\3\2"+ + "\2\2\u0812\u0815\3\2\2\2\u0813\u0811\3\2\2\2\u0813\u0814\3\2\2\2\u0814"+ + "\u0816\3\2\2\2\u0815\u0813\3\2\2\2\u0816\u081a\5p9\2\u0817\u0819\7\7\2"+ + "\2\u0818\u0817\3\2\2\2\u0819\u081c\3\2\2\2\u081a\u0818\3\2\2\2\u081a\u081b"+ + "\3\2\2\2\u081b\u081d\3\2\2\2\u081c\u081a\3\2\2\2\u081d\u081e\7\20\2\2"+ + "\u081e\u0820\3\2\2\2\u081f\u07f1\3\2\2\2\u081f\u0801\3\2\2\2\u0820\u00b9"+ + "\3\2\2\2\u0821\u0823\5\u00bc_\2\u0822\u0821\3\2\2\2\u0822\u0823\3\2\2"+ + "\2\u0823\u0834\3\2\2\2\u0824\u0826\7\7\2\2\u0825\u0824\3\2\2\2\u0826\u0829"+ + "\3\2\2\2\u0827\u0825\3\2\2\2\u0827\u0828\3\2\2\2\u0828\u082a\3\2\2\2\u0829"+ + "\u0827\3\2\2\2\u082a\u082e\7\n\2\2\u082b\u082d\7\7\2\2\u082c\u082b\3\2"+ + "\2\2\u082d\u0830\3\2\2\2\u082e\u082c\3\2\2\2\u082e\u082f\3\2\2\2\u082f"+ + "\u0831\3\2\2\2\u0830\u082e\3\2\2\2\u0831\u0833\5\u00bc_\2\u0832\u0827"+ + "\3\2\2\2\u0833\u0836\3\2\2\2\u0834\u0832\3\2\2\2\u0834\u0835\3\2\2\2\u0835"+ + "\u00bb\3\2\2\2\u0836\u0834\3\2\2\2\u0837\u084a\5J&\2\u0838\u0847\5H%\2"+ + "\u0839\u083b\7\7\2\2\u083a\u0839\3\2\2\2\u083b\u083e\3\2\2\2\u083c\u083a"+ + "\3\2\2\2\u083c\u083d\3\2\2\2\u083d\u083f\3\2\2\2\u083e\u083c\3\2\2\2\u083f"+ + "\u0843\7\33\2\2\u0840\u0842\7\7\2\2\u0841\u0840\3\2\2\2\u0842\u0845\3"+ + "\2\2\2\u0843\u0841\3\2\2\2\u0843\u0844\3\2\2\2\u0844\u0846\3\2\2\2\u0845"+ + "\u0843\3\2\2\2\u0846\u0848\5V,\2\u0847\u083c\3\2\2\2\u0847\u0848\3\2\2"+ + "\2\u0848\u084a\3\2\2\2\u0849\u0837\3\2\2\2\u0849\u0838\3\2\2\2\u084a\u00bd"+ + "\3\2\2\2\u084b\u085a\7@\2\2\u084c\u084e\7\7\2\2\u084d\u084c\3\2\2\2\u084e"+ + "\u0851\3\2\2\2\u084f\u084d\3\2\2\2\u084f\u0850\3\2\2\2\u0850\u0852\3\2"+ + "\2\2\u0851\u084f\3\2\2\2\u0852\u0856\7\33\2\2\u0853\u0855\7\7\2\2\u0854"+ + "\u0853\3\2\2\2\u0855\u0858\3\2\2\2\u0856\u0854\3\2\2\2\u0856\u0857\3\2"+ + "\2\2\u0857\u0859\3\2\2\2\u0858\u0856\3\2\2\2\u0859\u085b\5\36\20\2\u085a"+ + "\u084f\3\2\2\2\u085a\u085b\3\2\2\2\u085b\u085f\3\2\2\2\u085c\u085e\7\7"+ + "\2\2\u085d\u085c\3\2\2\2\u085e\u0861\3\2\2\2\u085f\u085d\3\2\2\2\u085f"+ + "\u0860\3\2\2\2\u0860\u0863\3\2\2\2\u0861\u085f\3\2\2\2\u0862\u0864\5&"+ + "\24\2\u0863\u0862\3\2\2\2\u0863\u0864\3\2\2\2\u0864\u00bf\3\2\2\2\u0865"+ + "\u0867\7\r\2\2\u0866\u0868\5x=\2\u0867\u0866\3\2\2\2\u0867\u0868\3\2\2"+ + "\2\u0868\u086d\3\2\2\2\u0869\u086a\7\n\2\2\u086a\u086c\5x=\2\u086b\u0869"+ + "\3\2\2\2\u086c\u086f\3\2\2\2\u086d\u086b\3\2\2\2\u086d\u086e\3\2\2\2\u086e"+ + "\u0870\3\2\2\2\u086f\u086d\3\2\2\2\u0870\u0871\7\16\2\2\u0871\u00c1\3"+ + "\2\2\2\u0872\u0874\7H\2\2\u0873\u0875\7\u008f\2\2\u0874\u0873\3\2\2\2"+ + "\u0874\u0875\3\2\2\2\u0875\u00c3\3\2\2\2\u0876\u0887\7I\2\2\u0877\u087b"+ + "\7-\2\2\u0878\u087a\7\7\2\2\u0879\u0878\3\2\2\2\u087a\u087d\3\2\2\2\u087b"+ + "\u0879\3\2\2\2\u087b\u087c\3\2\2\2\u087c\u087e\3\2\2\2\u087d\u087b\3\2"+ + "\2\2\u087e\u0882\5V,\2\u087f\u0881\7\7\2\2\u0880\u087f\3\2\2\2\u0881\u0884"+ + "\3\2\2\2\u0882\u0880\3\2\2\2\u0882\u0883\3\2\2\2\u0883\u0885\3\2\2\2\u0884"+ + "\u0882\3\2\2\2\u0885\u0886\7.\2\2\u0886\u0888\3\2\2\2\u0887\u0877\3\2"+ + "\2\2\u0887\u0888\3\2\2\2\u0888\u088a\3\2\2\2\u0889\u088b\7\u008f\2\2\u088a"+ + "\u0889\3\2\2\2\u088a\u088b\3\2\2\2\u088b\u00c5\3\2\2\2\u088c\u088f\5\u00c8"+ + "e\2\u088d\u088f\5\u00ccg\2\u088e\u088c\3\2\2\2\u088e\u088d\3\2\2\2\u088f"+ + "\u00c7\3\2\2\2\u0890\u0894\7L\2\2\u0891\u0893\7\7\2\2\u0892\u0891\3\2"+ + "\2\2\u0893\u0896\3\2\2\2\u0894\u0892\3\2\2\2\u0894\u0895\3\2\2\2\u0895"+ + "\u0897\3\2\2\2\u0896\u0894\3\2\2\2\u0897\u0898\7\13\2\2\u0898\u0899\5"+ + "x=\2\u0899\u089d\7\f\2\2\u089a\u089c\7\7\2\2\u089b\u089a\3\2\2\2\u089c"+ + "\u089f\3\2\2\2\u089d\u089b\3\2\2\2\u089d\u089e\3\2\2\2\u089e\u08a1\3\2"+ + "\2\2\u089f\u089d\3\2\2\2\u08a0\u08a2\5\u00caf\2\u08a1\u08a0\3\2\2\2\u08a1"+ + "\u08a2\3\2\2\2\u08a2\u08a4\3\2\2\2\u08a3\u08a5\7\34\2\2\u08a4\u08a3\3"+ + "\2\2\2\u08a4\u08a5\3\2\2\2\u08a5\u08b6\3\2\2\2\u08a6\u08a8\7\7\2\2\u08a7"+ + "\u08a6\3\2\2\2\u08a8\u08ab\3\2\2\2\u08a9\u08a7\3\2\2\2\u08a9\u08aa\3\2"+ + "\2\2\u08aa\u08ac\3\2\2\2\u08ab\u08a9\3\2\2\2\u08ac\u08b0\7M\2\2\u08ad"+ + "\u08af\7\7\2\2\u08ae\u08ad\3\2\2\2\u08af\u08b2\3\2\2\2\u08b0\u08ae\3\2"+ + "\2\2\u08b0\u08b1\3\2\2\2\u08b1\u08b4\3\2\2\2\u08b2\u08b0\3\2\2\2\u08b3"+ + "\u08b5\5\u00caf\2\u08b4\u08b3\3\2\2\2\u08b4\u08b5\3\2\2\2\u08b5\u08b7"+ + "\3\2\2\2\u08b6\u08a9\3\2\2\2\u08b6\u08b7\3\2\2\2\u08b7\u00c9\3\2\2\2\u08b8"+ + "\u08bb\5n8\2\u08b9\u08bb\5x=\2\u08ba\u08b8\3\2\2\2\u08ba\u08b9\3\2\2\2"+ + "\u08bb\u00cb\3\2\2\2\u08bc\u08c0\7N\2\2\u08bd\u08bf\7\7\2\2\u08be\u08bd"+ + "\3\2\2\2\u08bf\u08c2\3\2\2\2\u08c0\u08be\3\2\2\2\u08c0\u08c1\3\2\2\2\u08c1"+ + "\u08c7\3\2\2\2\u08c2\u08c0\3\2\2\2\u08c3\u08c4\7\13\2\2\u08c4\u08c5\5"+ + "x=\2\u08c5\u08c6\7\f\2\2\u08c6\u08c8\3\2\2\2\u08c7\u08c3\3\2\2\2\u08c7"+ + "\u08c8\3\2\2\2\u08c8\u08cc\3\2\2\2\u08c9\u08cb\7\7\2\2\u08ca\u08c9\3\2"+ + "\2\2\u08cb\u08ce\3\2\2\2\u08cc\u08ca\3\2\2\2\u08cc\u08cd\3\2\2\2\u08cd"+ + "\u08cf\3\2\2\2\u08ce\u08cc\3\2\2\2\u08cf\u08d3\7\17\2\2\u08d0\u08d2\7"+ + "\7\2\2\u08d1\u08d0\3\2\2\2\u08d2\u08d5\3\2\2\2\u08d3\u08d1\3\2\2\2\u08d3"+ + "\u08d4\3\2\2\2\u08d4\u08df\3\2\2\2\u08d5\u08d3\3\2\2\2\u08d6\u08da\5\u00ce"+ + "h\2\u08d7\u08d9\7\7\2\2\u08d8\u08d7\3\2\2\2\u08d9\u08dc\3\2\2\2\u08da"+ + "\u08d8\3\2\2\2\u08da\u08db\3\2\2\2\u08db\u08de\3\2\2\2\u08dc\u08da\3\2"+ + "\2\2\u08dd\u08d6\3\2\2\2\u08de\u08e1\3\2\2\2\u08df\u08dd\3\2\2\2\u08df"+ + "\u08e0\3\2\2\2\u08e0\u08e5\3\2\2\2\u08e1\u08df\3\2\2\2\u08e2\u08e4\7\7"+ + "\2\2\u08e3\u08e2\3\2\2\2\u08e4\u08e7\3\2\2\2\u08e5\u08e3\3\2\2\2\u08e5"+ + "\u08e6\3\2\2\2\u08e6\u08e8\3\2\2\2\u08e7\u08e5\3\2\2\2\u08e8\u08e9\7\20"+ + "\2\2\u08e9\u00cd\3\2\2\2\u08ea\u08fb\5\u00d0i\2\u08eb\u08ed\7\7\2\2\u08ec"+ + "\u08eb\3\2\2\2\u08ed\u08f0\3\2\2\2\u08ee\u08ec\3\2\2\2\u08ee\u08ef\3\2"+ + "\2\2\u08ef\u08f1\3\2\2\2\u08f0\u08ee\3\2\2\2\u08f1\u08f5\7\n\2\2\u08f2"+ + "\u08f4\7\7\2\2\u08f3\u08f2\3\2\2\2\u08f4\u08f7\3\2\2\2\u08f5\u08f3\3\2"+ + "\2\2\u08f5\u08f6\3\2\2\2\u08f6\u08f8\3\2\2\2\u08f7\u08f5\3\2\2\2"; + private static final String _serializedATNSegment1 = + "\u08f8\u08fa\5\u00d0i\2\u08f9\u08ee\3\2\2\2\u08fa\u08fd\3\2\2\2\u08fb"+ + "\u08f9\3\2\2\2\u08fb\u08fc\3\2\2\2\u08fc\u0901\3\2\2\2\u08fd\u08fb\3\2"+ + "\2\2\u08fe\u0900\7\7\2\2\u08ff\u08fe\3\2\2\2\u0900\u0903\3\2\2\2\u0901"+ + "\u08ff\3\2\2\2\u0901\u0902\3\2\2\2\u0902\u0904\3\2\2\2\u0903\u0901\3\2"+ + "\2\2\u0904\u0908\7#\2\2\u0905\u0907\7\7\2\2\u0906\u0905\3\2\2\2\u0907"+ + "\u090a\3\2\2\2\u0908\u0906\3\2\2\2\u0908\u0909\3\2\2\2\u0909\u090b\3\2"+ + "\2\2\u090a\u0908\3\2\2\2\u090b\u090d\5\u00caf\2\u090c\u090e\5\u0124\u0093"+ + "\2\u090d\u090c\3\2\2\2\u090d\u090e\3\2\2\2\u090e\u091f\3\2\2\2\u090f\u0913"+ + "\7M\2\2\u0910\u0912\7\7\2\2\u0911\u0910\3\2\2\2\u0912\u0915\3\2\2\2\u0913"+ + "\u0911\3\2\2\2\u0913\u0914\3\2\2\2\u0914\u0916\3\2\2\2\u0915\u0913\3\2"+ + "\2\2\u0916\u091a\7#\2\2\u0917\u0919\7\7\2\2\u0918\u0917\3\2\2\2\u0919"+ + "\u091c\3\2\2\2\u091a\u0918\3\2\2\2\u091a\u091b\3\2\2\2\u091b\u091d\3\2"+ + "\2\2\u091c\u091a\3\2\2\2\u091d\u091f\5\u00caf\2\u091e\u08ea\3\2\2\2\u091e"+ + "\u090f\3\2\2\2\u091f\u00cf\3\2\2\2\u0920\u0924\5x=\2\u0921\u0924\5\u00d2"+ + "j\2\u0922\u0924\5\u00d4k\2\u0923\u0920\3\2\2\2\u0923\u0921\3\2\2\2\u0923"+ + "\u0922\3\2\2\2\u0924\u00d1\3\2\2\2\u0925\u0929\5\u00eex\2\u0926\u0928"+ + "\7\7\2\2\u0927\u0926\3\2\2\2\u0928\u092b\3\2\2\2\u0929\u0927\3\2\2\2\u0929"+ + "\u092a\3\2\2\2\u092a\u092c\3\2\2\2\u092b\u0929\3\2\2\2\u092c\u092d\5x"+ + "=\2\u092d\u00d3\3\2\2\2\u092e\u0932\5\u00f0y\2\u092f\u0931\7\7\2\2\u0930"+ + "\u092f\3\2\2\2\u0931\u0934\3\2\2\2\u0932\u0930\3\2\2\2\u0932\u0933\3\2"+ + "\2\2\u0933\u0935\3\2\2\2\u0934\u0932\3\2\2\2\u0935\u0936\5V,\2\u0936\u00d5"+ + "\3\2\2\2\u0937\u093b\7O\2\2\u0938\u093a\7\7\2\2\u0939\u0938\3\2\2\2\u093a"+ + "\u093d\3\2\2\2\u093b\u0939\3\2\2\2\u093b\u093c\3\2\2\2\u093c\u093e\3\2"+ + "\2\2\u093d\u093b\3\2\2\2\u093e\u0948\5n8\2\u093f\u0941\7\7\2\2\u0940\u093f"+ + "\3\2\2\2\u0941\u0944\3\2\2\2\u0942\u0940\3\2\2\2\u0942\u0943\3\2\2\2\u0943"+ + "\u0945\3\2\2\2\u0944\u0942\3\2\2\2\u0945\u0947\5\u00d8m\2\u0946\u0942"+ + "\3\2\2\2\u0947\u094a\3\2\2\2\u0948\u0946\3\2\2\2\u0948\u0949\3\2\2\2\u0949"+ + "\u0952\3\2\2\2\u094a\u0948\3\2\2\2\u094b\u094d\7\7\2\2\u094c\u094b\3\2"+ + "\2\2\u094d\u0950\3\2\2\2\u094e\u094c\3\2\2\2\u094e\u094f\3\2\2\2\u094f"+ + "\u0951\3\2\2\2\u0950\u094e\3\2\2\2\u0951\u0953\5\u00dan\2\u0952\u094e"+ + "\3\2\2\2\u0952\u0953\3\2\2\2\u0953\u00d7\3\2\2\2\u0954\u0958\7P\2\2\u0955"+ + "\u0957\7\7\2\2\u0956\u0955\3\2\2\2\u0957\u095a\3\2\2\2\u0958\u0956\3\2"+ + "\2\2\u0958\u0959\3\2\2\2\u0959\u095b\3\2\2\2\u095a\u0958\3\2\2\2\u095b"+ + "\u095f\7\13\2\2\u095c\u095e\5\u0116\u008c\2\u095d\u095c\3\2\2\2\u095e"+ + "\u0961\3\2\2\2\u095f\u095d\3\2\2\2\u095f\u0960\3\2\2\2\u0960\u0962\3\2"+ + "\2\2\u0961\u095f\3\2\2\2\u0962\u0963\5\u0122\u0092\2\u0963\u0964\7\33"+ + "\2\2\u0964\u0965\5d\63\2\u0965\u0969\7\f\2\2\u0966\u0968\7\7\2\2\u0967"+ + "\u0966\3\2\2\2\u0968\u096b\3\2\2\2\u0969\u0967\3\2\2\2\u0969\u096a\3\2"+ + "\2\2\u096a\u096c\3\2\2\2\u096b\u0969\3\2\2\2\u096c\u096d\5n8\2\u096d\u00d9"+ + "\3\2\2\2\u096e\u0972\7Q\2\2\u096f\u0971\7\7\2\2\u0970\u096f\3\2\2\2\u0971"+ + "\u0974\3\2\2\2\u0972\u0970\3\2\2\2\u0972\u0973\3\2\2\2\u0973\u0975\3\2"+ + "\2\2\u0974\u0972\3\2\2\2\u0975\u0976\5n8\2\u0976\u00db\3\2\2\2\u0977\u097b"+ + "\5\u00dep\2\u0978\u097b\5\u00e0q\2\u0979\u097b\5\u00e2r\2\u097a\u0977"+ + "\3\2\2\2\u097a\u0978\3\2\2\2\u097a\u0979\3\2\2\2\u097b\u00dd\3\2\2\2\u097c"+ + "\u0980\7R\2\2\u097d\u097f\7\7\2\2\u097e\u097d\3\2\2\2\u097f\u0982\3\2"+ + "\2\2\u0980\u097e\3\2\2\2\u0980\u0981\3\2\2\2\u0981\u0983\3\2\2\2\u0982"+ + "\u0980\3\2\2\2\u0983\u0987\7\13\2\2\u0984\u0986\5\u0116\u008c\2\u0985"+ + "\u0984\3\2\2\2\u0986\u0989\3\2\2\2\u0987\u0985\3\2\2\2\u0987\u0988\3\2"+ + "\2\2\u0988\u098c\3\2\2\2\u0989\u0987\3\2\2\2\u098a\u098d\5J&\2\u098b\u098d"+ + "\5H%\2\u098c\u098a\3\2\2\2\u098c\u098b\3\2\2\2\u098d\u098e\3\2\2\2\u098e"+ + "\u098f\7[\2\2\u098f\u0990\5x=\2\u0990\u0994\7\f\2\2\u0991\u0993\7\7\2"+ + "\2\u0992\u0991\3\2\2\2\u0993\u0996\3\2\2\2\u0994\u0992\3\2\2\2\u0994\u0995"+ + "\3\2\2\2\u0995\u0998\3\2\2\2\u0996\u0994\3\2\2\2\u0997\u0999\5\u00caf"+ + "\2\u0998\u0997\3\2\2\2\u0998\u0999\3\2\2\2\u0999\u00df\3\2\2\2\u099a\u099e"+ + "\7T\2\2\u099b\u099d\7\7\2\2\u099c\u099b\3\2\2\2\u099d\u09a0\3\2\2\2\u099e"+ + "\u099c\3\2\2\2\u099e\u099f\3\2\2\2\u099f\u09a1\3\2\2\2\u09a0\u099e\3\2"+ + "\2\2\u09a1\u09a2\7\13\2\2\u09a2\u09a3\5x=\2\u09a3\u09a7\7\f\2\2\u09a4"+ + "\u09a6\7\7\2\2\u09a5\u09a4\3\2\2\2\u09a6\u09a9\3\2\2\2\u09a7\u09a5\3\2"+ + "\2\2\u09a7\u09a8\3\2\2\2\u09a8\u09ab\3\2\2\2\u09a9\u09a7\3\2\2\2\u09aa"+ + "\u09ac\5\u00caf\2\u09ab\u09aa\3\2\2\2\u09ab\u09ac\3\2\2\2\u09ac\u00e1"+ + "\3\2\2\2\u09ad\u09b1\7S\2\2\u09ae\u09b0\7\7\2\2\u09af\u09ae\3\2\2\2\u09b0"+ + "\u09b3\3\2\2\2\u09b1\u09af\3\2\2\2\u09b1\u09b2\3\2\2\2\u09b2\u09b5\3\2"+ + "\2\2\u09b3\u09b1\3\2\2\2\u09b4\u09b6\5\u00caf\2\u09b5\u09b4\3\2\2\2\u09b5"+ + "\u09b6\3\2\2\2\u09b6\u09ba\3\2\2\2\u09b7\u09b9\7\7\2\2\u09b8\u09b7\3\2"+ + "\2\2\u09b9\u09bc\3\2\2\2\u09ba\u09b8\3\2\2\2\u09ba\u09bb\3\2\2\2\u09bb"+ + "\u09bd\3\2\2\2\u09bc\u09ba\3\2\2\2\u09bd\u09c1\7T\2\2\u09be\u09c0\7\7"+ + "\2\2\u09bf\u09be\3\2\2\2\u09c0\u09c3\3\2\2\2\u09c1\u09bf\3\2\2\2\u09c1"+ + "\u09c2\3\2\2\2\u09c2\u09c4\3\2\2\2\u09c3\u09c1\3\2\2\2\u09c4\u09c5\7\13"+ + "\2\2\u09c5\u09c6\5x=\2\u09c6\u09c7\7\f\2\2\u09c7\u00e3\3\2\2\2\u09c8\u09cc"+ + "\7U\2\2\u09c9\u09cb\7\7\2\2\u09ca\u09c9\3\2\2\2\u09cb\u09ce\3\2\2\2\u09cc"+ + "\u09ca\3\2\2\2\u09cc\u09cd\3\2\2\2\u09cd\u09cf\3\2\2\2\u09ce\u09cc\3\2"+ + "\2\2\u09cf\u09d9\5x=\2\u09d0\u09d2\t\7\2\2\u09d1\u09d3\5x=\2\u09d2\u09d1"+ + "\3\2\2\2\u09d2\u09d3\3\2\2\2\u09d3\u09d9\3\2\2\2\u09d4\u09d9\7W\2\2\u09d5"+ + "\u09d9\78\2\2\u09d6\u09d9\7X\2\2\u09d7\u09d9\79\2\2\u09d8\u09c8\3\2\2"+ + "\2\u09d8\u09d0\3\2\2\2\u09d8\u09d4\3\2\2\2\u09d8\u09d5\3\2\2\2\u09d8\u09d6"+ + "\3\2\2\2\u09d8\u09d7\3\2\2\2\u09d9\u00e5\3\2\2\2\u09da\u09e4\5d\63\2\u09db"+ + "\u09df\7+\2\2\u09dc\u09de\7\7\2\2\u09dd\u09dc\3\2\2\2\u09de\u09e1\3\2"+ + "\2\2\u09df\u09dd\3\2\2\2\u09df\u09e0\3\2\2\2\u09e0\u09e3\3\2\2\2\u09e1"+ + "\u09df\3\2\2\2\u09e2\u09db\3\2\2\2\u09e3\u09e6\3\2\2\2\u09e4\u09e2\3\2"+ + "\2\2\u09e4\u09e5\3\2\2\2\u09e5\u09e8\3\2\2\2\u09e6\u09e4\3\2\2\2\u09e7"+ + "\u09da\3\2\2\2\u09e7\u09e8\3\2\2\2\u09e8\u09ec\3\2\2\2\u09e9\u09eb\7\7"+ + "\2\2\u09ea\u09e9\3\2\2\2\u09eb\u09ee\3\2\2\2\u09ec\u09ea\3\2\2\2\u09ec"+ + "\u09ed\3\2\2\2\u09ed\u09ef\3\2\2\2\u09ee\u09ec\3\2\2\2\u09ef\u09f3\t\b"+ + "\2\2\u09f0\u09f2\7\7\2\2\u09f1\u09f0\3\2\2\2\u09f2\u09f5\3\2\2\2\u09f3"+ + "\u09f1\3\2\2\2\u09f3\u09f4\3\2\2\2\u09f4\u09f8\3\2\2\2\u09f5\u09f3\3\2"+ + "\2\2\u09f6\u09f9\5\u0120\u0091\2\u09f7\u09f9\7=\2\2\u09f8\u09f6\3\2\2"+ + "\2\u09f8\u09f7\3\2\2\2\u09f9\u0a0a\3\2\2\2\u09fa\u09fe\7H\2\2\u09fb\u09fd"+ + "\7\7\2\2\u09fc\u09fb\3\2\2\2\u09fd\u0a00\3\2\2\2\u09fe\u09fc\3\2\2\2\u09fe"+ + "\u09ff\3\2\2\2\u09ff\u0a01\3\2\2\2\u0a00\u09fe\3\2\2\2\u0a01\u0a05\7&"+ + "\2\2\u0a02\u0a04\7\7\2\2\u0a03\u0a02\3\2\2\2\u0a04\u0a07\3\2\2\2\u0a05"+ + "\u0a03\3\2\2\2\u0a05\u0a06\3\2\2\2\u0a06\u0a08\3\2\2\2\u0a07\u0a05\3\2"+ + "\2\2\u0a08\u0a0a\7=\2\2\u0a09\u09e7\3\2\2\2\u0a09\u09fa\3\2\2\2\u0a0a"+ + "\u00e7\3\2\2\2\u0a0b\u0a0c\t\t\2\2\u0a0c\u00e9\3\2\2\2\u0a0d\u0a0e\t\n"+ + "\2\2\u0a0e\u00eb\3\2\2\2\u0a0f\u0a10\t\13\2\2\u0a10\u00ed\3\2\2\2\u0a11"+ + "\u0a12\t\f\2\2\u0a12\u00ef\3\2\2\2\u0a13\u0a14\t\r\2\2\u0a14\u00f1\3\2"+ + "\2\2\u0a15\u0a16\t\16\2\2\u0a16\u00f3\3\2\2\2\u0a17\u0a18\t\17\2\2\u0a18"+ + "\u00f5\3\2\2\2\u0a19\u0a1a\t\20\2\2\u0a1a\u00f7\3\2\2\2\u0a1b\u0a23\7"+ + "\26\2\2\u0a1c\u0a23\7\27\2\2\u0a1d\u0a23\7\24\2\2\u0a1e\u0a23\7\25\2\2"+ + "\u0a1f\u0a23\7\32\2\2\u0a20\u0a23\5\u0116\u008c\2\u0a21\u0a23\5\u0114"+ + "\u008b\2\u0a22\u0a1b\3\2\2\2\u0a22\u0a1c\3\2\2\2\u0a22\u0a1d\3\2\2\2\u0a22"+ + "\u0a1e\3\2\2\2\u0a22\u0a1f\3\2\2\2\u0a22\u0a20\3\2\2\2\u0a22\u0a21\3\2"+ + "\2\2\u0a23\u00f9\3\2\2\2\u0a24\u0a34\7\26\2\2\u0a25\u0a34\7\27\2\2\u0a26"+ + "\u0a27\7\32\2\2\u0a27\u0a34\7\32\2\2\u0a28\u0a34\5\u0098M\2\u0a29\u0a34"+ + "\5\u009cO\2\u0a2a\u0a2c\7\7\2\2\u0a2b\u0a2a\3\2\2\2\u0a2c\u0a2f\3\2\2"+ + "\2\u0a2d\u0a2b\3\2\2\2\u0a2d\u0a2e\3\2\2\2\u0a2e\u0a30\3\2\2\2\u0a2f\u0a2d"+ + "\3\2\2\2\u0a30\u0a31\5\u00fc\177\2\u0a31\u0a32\5\u0092J\2\u0a32\u0a34"+ + "\3\2\2\2\u0a33\u0a24\3\2\2\2\u0a33\u0a25\3\2\2\2\u0a33\u0a26\3\2\2\2\u0a33"+ + "\u0a28\3\2\2\2\u0a33\u0a29\3\2\2\2\u0a33\u0a2d\3\2\2\2\u0a34\u00fb\3\2"+ + "\2\2\u0a35\u0a39\7\t\2\2\u0a36\u0a37\7+\2\2\u0a37\u0a39\7\t\2\2\u0a38"+ + "\u0a35\3\2\2\2\u0a38\u0a36\3\2\2\2\u0a39\u00fd\3\2\2\2\u0a3a\u0a3d\5\u0116"+ + "\u008c\2\u0a3b\u0a3d\5\u0100\u0081\2\u0a3c\u0a3a\3\2\2\2\u0a3c\u0a3b\3"+ + "\2\2\2\u0a3d\u0a3e\3\2\2\2\u0a3e\u0a3c\3\2\2\2\u0a3e\u0a3f\3\2\2\2\u0a3f"+ + "\u00ff\3\2\2\2\u0a40\u0a4a\5\u0102\u0082\2\u0a41\u0a4a\5\u0104\u0083\2"+ + "\u0a42\u0a4a\5\u0106\u0084\2\u0a43\u0a4a\5\u0108\u0085\2\u0a44\u0a4a\5"+ + "\u010a\u0086\2\u0a45\u0a4a\5\u010c\u0087\2\u0a46\u0a4a\5\u010e\u0088\2"+ + "\u0a47\u0a4a\5\u0110\u0089\2\u0a48\u0a4a\5\u0112\u008a\2\u0a49\u0a40\3"+ + "\2\2\2\u0a49\u0a41\3\2\2\2\u0a49\u0a42\3\2\2\2\u0a49\u0a43\3\2\2\2\u0a49"+ + "\u0a44\3\2\2\2\u0a49\u0a45\3\2\2\2\u0a49\u0a46\3\2\2\2\u0a49\u0a47\3\2"+ + "\2\2\u0a49\u0a48\3\2\2\2\u0a4a\u0a4e\3\2\2\2\u0a4b\u0a4d\7\7\2\2\u0a4c"+ + "\u0a4b\3\2\2\2\u0a4d\u0a50\3\2\2\2\u0a4e\u0a4c\3\2\2\2\u0a4e\u0a4f\3\2"+ + "\2\2\u0a4f\u0101\3\2\2\2\u0a50\u0a4e\3\2\2\2\u0a51\u0a52\t\21\2\2\u0a52"+ + "\u0103\3\2\2\2\u0a53\u0a54\t\22\2\2\u0a54\u0105\3\2\2\2\u0a55\u0a56\t"+ + "\23\2\2\u0a56\u0107\3\2\2\2\u0a57\u0a58\t\24\2\2\u0a58\u0109\3\2\2\2\u0a59"+ + "\u0a5a\t\25\2\2\u0a5a\u010b\3\2\2\2\u0a5b\u0a5c\7}\2\2\u0a5c\u010d\3\2"+ + "\2\2\u0a5d\u0a5e\t\26\2\2\u0a5e\u010f\3\2\2\2\u0a5f\u0a60\t\27\2\2\u0a60"+ + "\u0111\3\2\2\2\u0a61\u0a62\7\u0082\2\2\u0a62\u0113\3\2\2\2\u0a63\u0a67"+ + "\7\u0090\2\2\u0a64\u0a66\7\7\2\2\u0a65\u0a64\3\2\2\2\u0a66\u0a69\3\2\2"+ + "\2\u0a67\u0a65\3\2\2\2\u0a67\u0a68\3\2\2\2\u0a68\u0115\3\2\2\2\u0a69\u0a67"+ + "\3\2\2\2\u0a6a\u0a6d\5\u0118\u008d\2\u0a6b\u0a6d\5\u011a\u008e\2\u0a6c"+ + "\u0a6a\3\2\2\2\u0a6c\u0a6b\3\2\2\2\u0a6d\u0a71\3\2\2\2\u0a6e\u0a70\7\7"+ + "\2\2\u0a6f\u0a6e\3\2\2\2\u0a70\u0a73\3\2\2\2\u0a71\u0a6f\3\2\2\2\u0a71"+ + "\u0a72\3\2\2\2\u0a72\u0117\3\2\2\2\u0a73\u0a71\3\2\2\2\u0a74\u0a78\5\u011c"+ + "\u008f\2\u0a75\u0a77\7\7\2\2\u0a76\u0a75\3\2\2\2\u0a77\u0a7a\3\2\2\2\u0a78"+ + "\u0a76\3\2\2\2\u0a78\u0a79\3\2\2\2\u0a79\u0a7b\3\2\2\2\u0a7a\u0a78\3\2"+ + "\2\2\u0a7b\u0a7f\7\33\2\2\u0a7c\u0a7e\7\7\2\2\u0a7d\u0a7c\3\2\2\2\u0a7e"+ + "\u0a81\3\2\2\2\u0a7f\u0a7d\3\2\2\2\u0a7f\u0a80\3\2\2\2\u0a80\u0a82\3\2"+ + "\2\2\u0a81\u0a7f\3\2\2\2\u0a82\u0a83\5\u011e\u0090\2\u0a83\u0aab\3\2\2"+ + "\2\u0a84\u0a95\7\u008f\2\2\u0a85\u0a87\7\7\2\2\u0a86\u0a85\3\2\2\2\u0a87"+ + "\u0a8a\3\2\2\2\u0a88\u0a86\3\2\2\2\u0a88\u0a89\3\2\2\2\u0a89\u0a8b\3\2"+ + "\2\2\u0a8a\u0a88\3\2\2\2\u0a8b\u0a8f\7\t\2\2\u0a8c\u0a8e\7\7\2\2\u0a8d"+ + "\u0a8c\3\2\2\2\u0a8e\u0a91\3\2\2\2\u0a8f\u0a8d\3\2\2\2\u0a8f\u0a90\3\2"+ + "\2\2\u0a90\u0a92\3\2\2\2\u0a91\u0a8f\3\2\2\2\u0a92\u0a94\5\u0122\u0092"+ + "\2\u0a93\u0a88\3\2\2\2\u0a94\u0a97\3\2\2\2\u0a95\u0a93\3\2\2\2\u0a95\u0a96"+ + "\3\2\2\2\u0a96\u0a9f\3\2\2\2\u0a97\u0a95\3\2\2\2\u0a98\u0a9a\7\7\2\2\u0a99"+ + "\u0a98\3\2\2\2\u0a9a\u0a9d\3\2\2\2\u0a9b\u0a99\3\2\2\2\u0a9b\u0a9c\3\2"+ + "\2\2\u0a9c\u0a9e\3\2\2\2\u0a9d\u0a9b\3\2\2\2\u0a9e\u0aa0\5\u00a0Q\2\u0a9f"+ + "\u0a9b\3\2\2\2\u0a9f\u0aa0\3\2\2\2\u0aa0\u0aa8\3\2\2\2\u0aa1\u0aa3\7\7"+ + "\2\2\u0aa2\u0aa1\3\2\2\2\u0aa3\u0aa6\3\2\2\2\u0aa4\u0aa2\3\2\2\2\u0aa4"+ + "\u0aa5\3\2\2\2\u0aa5\u0aa7\3\2\2\2\u0aa6\u0aa4\3\2\2\2\u0aa7\u0aa9\5\u009e"+ + "P\2\u0aa8\u0aa4\3\2\2\2\u0aa8\u0aa9\3\2\2\2\u0aa9\u0aab\3\2\2\2\u0aaa"+ + "\u0a74\3\2\2\2\u0aaa\u0a84\3\2\2\2\u0aab\u0119\3\2\2\2\u0aac\u0aad\5\u011c"+ + "\u008f\2\u0aad\u0aae\7\33\2\2\u0aae\u0ab0\7\r\2\2\u0aaf\u0ab1\5\u011e"+ + "\u0090\2\u0ab0\u0aaf\3\2\2\2\u0ab1\u0ab2\3\2\2\2\u0ab2\u0ab0\3\2\2\2\u0ab2"+ + "\u0ab3\3\2\2\2\u0ab3\u0ab4\3\2\2\2\u0ab4\u0ab5\7\16\2\2\u0ab5\u0ac0\3"+ + "\2\2\2\u0ab6\u0ab7\7*\2\2\u0ab7\u0ab9\7\r\2\2\u0ab8\u0aba\5\u011e\u0090"+ + "\2\u0ab9\u0ab8\3\2\2\2\u0aba\u0abb\3\2\2\2\u0abb\u0ab9\3\2\2\2\u0abb\u0abc"+ + "\3\2\2\2\u0abc\u0abd\3\2\2\2\u0abd\u0abe\7\16\2\2\u0abe\u0ac0\3\2\2\2"+ + "\u0abf\u0aac\3\2\2\2\u0abf\u0ab6\3\2\2\2\u0ac0\u011b\3\2\2\2\u0ac1\u0ac2"+ + "\t\30\2\2\u0ac2\u011d\3\2\2\2\u0ac3\u0ac5\5\u0120\u0091\2\u0ac4\u0ac6"+ + "\5\u00a0Q\2\u0ac5\u0ac4\3\2\2\2\u0ac5\u0ac6\3\2\2\2\u0ac6\u0ac8\3\2\2"+ + "\2\u0ac7\u0ac9\5\u009eP\2\u0ac8\u0ac7\3\2\2\2\u0ac8\u0ac9\3\2\2\2\u0ac9"+ + "\u011f\3\2\2\2\u0aca\u0ad5\5\u0122\u0092\2\u0acb\u0acd\7\7\2\2\u0acc\u0acb"+ + "\3\2\2\2\u0acd\u0ad0\3\2\2\2\u0ace\u0acc\3\2\2\2\u0ace\u0acf\3\2\2\2\u0acf"+ + "\u0ad1\3\2\2\2\u0ad0\u0ace\3\2\2\2\u0ad1\u0ad2\7\t\2\2\u0ad2\u0ad4\5\u0122"+ + "\u0092\2\u0ad3\u0ace\3\2\2\2\u0ad4\u0ad7\3\2\2\2\u0ad5\u0ad3\3\2\2\2\u0ad5"+ + "\u0ad6\3\2\2\2\u0ad6\u0121\3\2\2\2\u0ad7\u0ad5\3\2\2\2\u0ad8\u0ad9\t\31"+ + "\2\2\u0ad9\u0123\3\2\2\2\u0ada\u0adc\7\7\2\2\u0adb\u0ada\3\2\2\2\u0adc"+ + "\u0add\3\2\2\2\u0add\u0adb\3\2\2\2\u0add\u0ade\3\2\2\2\u0ade\u0aed\3\2"+ + "\2\2\u0adf\u0ae1\7\7\2\2\u0ae0\u0adf\3\2\2\2\u0ae1\u0ae4\3\2\2\2\u0ae2"+ + "\u0ae0\3\2\2\2\u0ae2\u0ae3\3\2\2\2\u0ae3\u0ae5\3\2\2\2\u0ae4\u0ae2\3\2"+ + "\2\2\u0ae5\u0ae9\7\34\2\2\u0ae6\u0ae8\7\7\2\2\u0ae7\u0ae6\3\2\2\2\u0ae8"+ + "\u0aeb\3\2\2\2\u0ae9\u0ae7\3\2\2\2\u0ae9\u0aea\3\2\2\2\u0aea\u0aed\3\2"+ + "\2\2\u0aeb\u0ae9\3\2\2\2\u0aec\u0adb\3\2\2\2\u0aec\u0ae2\3\2\2\2\u0aed"+ + "\u0125\3\2\2\2\u0aee\u0aef\t\32\2\2\u0aef\u0127\3\2\2\2\u01af\u012b\u0132"+ + "\u0139\u013c\u0140\u0143\u014a\u0151\u0158\u015b\u015f\u0162\u0167\u016f"+ + "\u0177\u017c\u017f\u0183\u0186\u018b\u018d\u0192\u019a\u019d\u01a7\u01aa"+ + "\u01b0\u01b7\u01bb\u01c0\u01c4\u01c9\u01d0\u01d4\u01d9\u01dd\u01e2\u01e9"+ + "\u01ed\u01f0\u01f6\u01f9\u0203\u0207\u0209\u020e\u0211\u0218\u021d\u0224"+ + "\u022b\u0231\u0237\u023d\u0246\u024d\u0256\u025c\u0262\u026f\u0274\u027a"+ + "\u0280\u0286\u028d\u0294\u0298\u029d\u02a1\u02a7\u02af\u02b3\u02b9\u02bd"+ + "\u02c2\u02c9\u02cf\u02d2\u02d7\u02e0\u02e5\u02e8\u02ed\u02f4\u02f8\u02fd"+ + "\u0301\u0306\u030a\u030d\u0313\u031a\u031f\u0324\u0328\u032d\u0334\u0339"+ + "\u033e\u0342\u0347\u034e\u0355\u0359\u035e\u0362\u0367\u036b\u0373\u0377"+ + "\u0379\u037e\u0383\u038a\u038f\u0396\u039a\u039d\u03a3\u03aa\u03ae\u03b3"+ + "\u03ba\u03be\u03c3\u03c7\u03ca\u03d0\u03d4\u03da\u03de\u03e3\u03ea\u03ee"+ + "\u03f3\u03f7\u03fa\u0400\u0404\u0409\u0410\u0415\u041a\u041f\u0424\u0428"+ + "\u042d\u0434\u0438\u043d\u0444\u0449\u0450\u0452\u045a\u0462\u0465\u0469"+ + "\u046f\u0477\u047e\u0482\u0487\u048f\u0493\u0495\u0498\u049c\u04a2\u04a8"+ + "\u04aa\u04af\u04b5\u04ba\u04bd\u04c3\u04ca\u04ce\u04d3\u04da\u04e3\u04ea"+ + "\u04f1\u04f7\u04fd\u0501\u0506\u050c\u0511\u0516\u051b\u0522\u0526\u0529"+ + "\u052f\u0536\u0539\u053b\u0543\u0548\u054e\u0556\u055c\u0563\u0566\u056c"+ + "\u0573\u057b\u0581\u0588\u058e\u0595\u0599\u059f\u05a4\u05a9\u05b0\u05b5"+ + "\u05b9\u05bf\u05c3\u05c8\u05d1\u05d8\u05df\u05e5\u05eb\u05f2\u05f9\u0605"+ + "\u060c\u060f\u0613\u0616\u061a\u061f\u0625\u062d\u0634\u063c\u0643\u064a"+ + "\u0650\u0657\u065e\u0664\u066c\u0673\u067b\u0680\u0687\u068e\u0694\u0699"+ + "\u069f\u06a6\u06ac\u06b4\u06bb\u06c3\u06c9\u06d1\u06d8\u06e0\u06e7\u06ee"+ + "\u06f6\u06fc\u0703\u0708\u0719\u0721\u0726\u072d\u0733\u0735\u073a\u073e"+ + "\u0743\u074e\u0751\u075b\u0761\u0765\u0767\u076f\u0776\u077d\u0783\u0787"+ + "\u078c\u0791\u0794\u0798\u079d\u07a3\u07aa\u07ad\u07b0\u07b5\u07c3\u07c7"+ + "\u07cc\u07ce\u07d8\u07da\u07ee\u07f5\u07fc\u0805\u080c\u0813\u081a\u081f"+ + "\u0822\u0827\u082e\u0834\u083c\u0843\u0847\u0849\u084f\u0856\u085a\u085f"+ + "\u0863\u0867\u086d\u0874\u087b\u0882\u0887\u088a\u088e\u0894\u089d\u08a1"+ + "\u08a4\u08a9\u08b0\u08b4\u08b6\u08ba\u08c0\u08c7\u08cc\u08d3\u08da\u08df"+ + "\u08e5\u08ee\u08f5\u08fb\u0901\u0908\u090d\u0913\u091a\u091e\u0923\u0929"+ + "\u0932\u093b\u0942\u0948\u094e\u0952\u0958\u095f\u0969\u0972\u097a\u0980"+ + "\u0987\u098c\u0994\u0998\u099e\u09a7\u09ab\u09b1\u09b5\u09ba\u09c1\u09cc"+ + "\u09d2\u09d8\u09df\u09e4\u09e7\u09ec\u09f3\u09f8\u09fe\u0a05\u0a09\u0a22"+ + "\u0a2d\u0a33\u0a38\u0a3c\u0a3e\u0a49\u0a4e\u0a67\u0a6c\u0a71\u0a78\u0a7f"+ + "\u0a88\u0a8f\u0a95\u0a9b\u0a9f\u0aa4\u0aa8\u0aaa\u0ab2\u0abb\u0abf\u0ac5"+ + "\u0ac8\u0ace\u0ad5\u0add\u0ae2\u0ae9\u0aec"; + public static final String _serializedATN = Utils.join( + new String[] { + _serializedATNSegment0, + _serializedATNSegment1 + }, + "" + ); + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/src/main/java/grammar/KotlinParser.tokens b/src/main/java/grammar/KotlinParser.tokens new file mode 100644 index 00000000..fd7e0648 --- /dev/null +++ b/src/main/java/grammar/KotlinParser.tokens @@ -0,0 +1,288 @@ +ShebangLine=1 +DelimitedComment=2 +LineComment=3 +WS=4 +NL=5 +RESERVED=6 +DOT=7 +COMMA=8 +LPAREN=9 +RPAREN=10 +LSQUARE=11 +RSQUARE=12 +LCURL=13 +RCURL=14 +MULT=15 +MOD=16 +DIV=17 +ADD=18 +SUB=19 +INCR=20 +DECR=21 +CONJ=22 +DISJ=23 +EXCL=24 +COLON=25 +SEMICOLON=26 +ASSIGNMENT=27 +ADD_ASSIGNMENT=28 +SUB_ASSIGNMENT=29 +MULT_ASSIGNMENT=30 +DIV_ASSIGNMENT=31 +MOD_ASSIGNMENT=32 +ARROW=33 +DOUBLE_ARROW=34 +RANGE=35 +COLONCOLON=36 +Q_COLONCOLON=37 +DOUBLE_SEMICOLON=38 +HASH=39 +AT=40 +QUEST=41 +ELVIS=42 +LANGLE=43 +RANGLE=44 +LE=45 +GE=46 +EXCL_EQ=47 +EXCL_EQEQ=48 +AS_SAFE=49 +EQEQ=50 +EQEQEQ=51 +SINGLE_QUOTE=52 +RETURN_AT=53 +CONTINUE_AT=54 +BREAK_AT=55 +FILE=56 +PACKAGE=57 +IMPORT=58 +CLASS=59 +INTERFACE=60 +FUN=61 +OBJECT=62 +VAL=63 +VAR=64 +TYPE_ALIAS=65 +CONSTRUCTOR=66 +BY=67 +COMPANION=68 +INIT=69 +THIS=70 +SUPER=71 +TYPEOF=72 +WHERE=73 +IF=74 +ELSE=75 +WHEN=76 +TRY=77 +CATCH=78 +FINALLY=79 +FOR=80 +DO=81 +WHILE=82 +THROW=83 +RETURN=84 +CONTINUE=85 +BREAK=86 +AS=87 +IS=88 +IN=89 +NOT_IS=90 +NOT_IN=91 +OUT=92 +FIELD=93 +PROPERTY=94 +GET=95 +SET=96 +GETTER=97 +SETTER=98 +RECEIVER=99 +PARAM=100 +SETPARAM=101 +DELEGATE=102 +DYNAMIC=103 +PUBLIC=104 +PRIVATE=105 +PROTECTED=106 +INTERNAL=107 +ENUM=108 +SEALED=109 +ANNOTATION=110 +DATA=111 +INNER=112 +TAILREC=113 +OPERATOR=114 +INLINE=115 +INFIX=116 +EXTERNAL=117 +SUSPEND=118 +OVERRIDE=119 +ABSTRACT=120 +FINAL=121 +OPEN=122 +CONST=123 +LATEINIT=124 +VARARG=125 +NOINLINE=126 +CROSSINLINE=127 +REIFIED=128 +QUOTE_OPEN=129 +TRIPLE_QUOTE_OPEN=130 +RealLiteral=131 +FloatLiteral=132 +DoubleLiteral=133 +LongLiteral=134 +IntegerLiteral=135 +HexLiteral=136 +BinLiteral=137 +BooleanLiteral=138 +NullLiteral=139 +Identifier=140 +LabelReference=141 +LabelDefinition=142 +FieldIdentifier=143 +CharacterLiteral=144 +UNICODE_CLASS_LL=145 +UNICODE_CLASS_LM=146 +UNICODE_CLASS_LO=147 +UNICODE_CLASS_LT=148 +UNICODE_CLASS_LU=149 +UNICODE_CLASS_ND=150 +UNICODE_CLASS_NL=151 +Inside_Comment=152 +Inside_WS=153 +Inside_NL=154 +QUOTE_CLOSE=155 +LineStrRef=156 +LineStrText=157 +LineStrEscapedChar=158 +LineStrExprStart=159 +TRIPLE_QUOTE_CLOSE=160 +MultiLineStringQuote=161 +MultiLineStrRef=162 +MultiLineStrText=163 +MultiLineStrEscapedChar=164 +MultiLineStrExprStart=165 +MultiLineNL=166 +StrExpr_IN=167 +StrExpr_Comment=168 +StrExpr_WS=169 +StrExpr_NL=170 +'...'=6 +'.'=7 +','=8 +'('=9 +'['=11 +'{'=13 +'}'=14 +'*'=15 +'%'=16 +'/'=17 +'+'=18 +'-'=19 +'++'=20 +'--'=21 +'&&'=22 +'||'=23 +'!'=24 +':'=25 +';'=26 +'='=27 +'+='=28 +'-='=29 +'*='=30 +'/='=31 +'%='=32 +'->'=33 +'=>'=34 +'..'=35 +'::'=36 +'?::'=37 +';;'=38 +'#'=39 +'@'=40 +'?'=41 +'?:'=42 +'<'=43 +'>'=44 +'<='=45 +'>='=46 +'!='=47 +'!=='=48 +'as?'=49 +'=='=50 +'==='=51 +'\''=52 +'@file'=56 +'package'=57 +'import'=58 +'class'=59 +'interface'=60 +'fun'=61 +'object'=62 +'val'=63 +'var'=64 +'typealias'=65 +'constructor'=66 +'by'=67 +'companion'=68 +'init'=69 +'this'=70 +'super'=71 +'typeof'=72 +'where'=73 +'if'=74 +'else'=75 +'when'=76 +'try'=77 +'catch'=78 +'finally'=79 +'for'=80 +'do'=81 +'while'=82 +'throw'=83 +'return'=84 +'continue'=85 +'break'=86 +'as'=87 +'is'=88 +'in'=89 +'out'=92 +'@field'=93 +'@property'=94 +'@get'=95 +'@set'=96 +'get'=97 +'set'=98 +'@receiver'=99 +'@param'=100 +'@setparam'=101 +'@delegate'=102 +'dynamic'=103 +'public'=104 +'private'=105 +'protected'=106 +'internal'=107 +'enum'=108 +'sealed'=109 +'annotation'=110 +'data'=111 +'inner'=112 +'tailrec'=113 +'operator'=114 +'inline'=115 +'infix'=116 +'external'=117 +'suspend'=118 +'override'=119 +'abstract'=120 +'final'=121 +'open'=122 +'const'=123 +'lateinit'=124 +'vararg'=125 +'noinline'=126 +'crossinline'=127 +'reified'=128 +'"""'=130 +'null'=139 diff --git a/src/main/java/grammar/KotlinParserBaseListener.java b/src/main/java/grammar/KotlinParserBaseListener.java new file mode 100644 index 00000000..b635b097 --- /dev/null +++ b/src/main/java/grammar/KotlinParserBaseListener.java @@ -0,0 +1,1804 @@ +// Generated from KotlinParser.g4 by ANTLR 4.5 +package grammar; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ErrorNode; +import org.antlr.v4.runtime.tree.TerminalNode; + +/** + * This class provides an empty implementation of {@link KotlinParserListener}, + * which can be extended to create a listener which only needs to handle a subset + * of the available methods. + */ +public class KotlinParserBaseListener implements KotlinParserListener { + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterKotlinFile(KotlinParser.KotlinFileContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitKotlinFile(KotlinParser.KotlinFileContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterScript(KotlinParser.ScriptContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitScript(KotlinParser.ScriptContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPreamble(KotlinParser.PreambleContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPreamble(KotlinParser.PreambleContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFileAnnotations(KotlinParser.FileAnnotationsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFileAnnotations(KotlinParser.FileAnnotationsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFileAnnotation(KotlinParser.FileAnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFileAnnotation(KotlinParser.FileAnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPackageHeader(KotlinParser.PackageHeaderContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPackageHeader(KotlinParser.PackageHeaderContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterImportList(KotlinParser.ImportListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitImportList(KotlinParser.ImportListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterImportHeader(KotlinParser.ImportHeaderContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitImportHeader(KotlinParser.ImportHeaderContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterImportAlias(KotlinParser.ImportAliasContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitImportAlias(KotlinParser.ImportAliasContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTopLevelObject(KotlinParser.TopLevelObjectContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTopLevelObject(KotlinParser.TopLevelObjectContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassDeclaration(KotlinParser.ClassDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassDeclaration(KotlinParser.ClassDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPrimaryConstructor(KotlinParser.PrimaryConstructorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPrimaryConstructor(KotlinParser.PrimaryConstructorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassParameters(KotlinParser.ClassParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassParameters(KotlinParser.ClassParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassParameter(KotlinParser.ClassParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassParameter(KotlinParser.ClassParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDelegationSpecifiers(KotlinParser.DelegationSpecifiersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDelegationSpecifiers(KotlinParser.DelegationSpecifiersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDelegationSpecifier(KotlinParser.DelegationSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDelegationSpecifier(KotlinParser.DelegationSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterConstructorInvocation(KotlinParser.ConstructorInvocationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitConstructorInvocation(KotlinParser.ConstructorInvocationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterExplicitDelegation(KotlinParser.ExplicitDelegationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitExplicitDelegation(KotlinParser.ExplicitDelegationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassBody(KotlinParser.ClassBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassBody(KotlinParser.ClassBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassMemberDeclaration(KotlinParser.ClassMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassMemberDeclaration(KotlinParser.ClassMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAnonymousInitializer(KotlinParser.AnonymousInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAnonymousInitializer(KotlinParser.AnonymousInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSecondaryConstructor(KotlinParser.SecondaryConstructorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSecondaryConstructor(KotlinParser.SecondaryConstructorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterConstructorDelegationCall(KotlinParser.ConstructorDelegationCallContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitConstructorDelegationCall(KotlinParser.ConstructorDelegationCallContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEnumClassBody(KotlinParser.EnumClassBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEnumClassBody(KotlinParser.EnumClassBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEnumEntries(KotlinParser.EnumEntriesContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEnumEntries(KotlinParser.EnumEntriesContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEnumEntry(KotlinParser.EnumEntryContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEnumEntry(KotlinParser.EnumEntryContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFunctionDeclaration(KotlinParser.FunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFunctionDeclaration(KotlinParser.FunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFunctionValueParameters(KotlinParser.FunctionValueParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFunctionValueParameters(KotlinParser.FunctionValueParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFunctionValueParameter(KotlinParser.FunctionValueParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFunctionValueParameter(KotlinParser.FunctionValueParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterParameter(KotlinParser.ParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitParameter(KotlinParser.ParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterReceiverType(KotlinParser.ReceiverTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitReceiverType(KotlinParser.ReceiverTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFunctionBody(KotlinParser.FunctionBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFunctionBody(KotlinParser.FunctionBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterObjectDeclaration(KotlinParser.ObjectDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitObjectDeclaration(KotlinParser.ObjectDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterCompanionObject(KotlinParser.CompanionObjectContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitCompanionObject(KotlinParser.CompanionObjectContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPropertyDeclaration(KotlinParser.PropertyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPropertyDeclaration(KotlinParser.PropertyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMultiVariableDeclaration(KotlinParser.MultiVariableDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMultiVariableDeclaration(KotlinParser.MultiVariableDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterVariableDeclaration(KotlinParser.VariableDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitVariableDeclaration(KotlinParser.VariableDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterGetter(KotlinParser.GetterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitGetter(KotlinParser.GetterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSetter(KotlinParser.SetterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSetter(KotlinParser.SetterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeAlias(KotlinParser.TypeAliasContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeAlias(KotlinParser.TypeAliasContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeParameters(KotlinParser.TypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeParameters(KotlinParser.TypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeParameter(KotlinParser.TypeParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeParameter(KotlinParser.TypeParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterType(KotlinParser.TypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitType(KotlinParser.TypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeModifierList(KotlinParser.TypeModifierListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeModifierList(KotlinParser.TypeModifierListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterParenthesizedType(KotlinParser.ParenthesizedTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitParenthesizedType(KotlinParser.ParenthesizedTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterNullableType(KotlinParser.NullableTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitNullableType(KotlinParser.NullableTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeReference(KotlinParser.TypeReferenceContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeReference(KotlinParser.TypeReferenceContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFunctionType(KotlinParser.FunctionTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFunctionType(KotlinParser.FunctionTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFunctionTypeReceiver(KotlinParser.FunctionTypeReceiverContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFunctionTypeReceiver(KotlinParser.FunctionTypeReceiverContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterUserType(KotlinParser.UserTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitUserType(KotlinParser.UserTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSimpleUserType(KotlinParser.SimpleUserTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSimpleUserType(KotlinParser.SimpleUserTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFunctionTypeParameters(KotlinParser.FunctionTypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFunctionTypeParameters(KotlinParser.FunctionTypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeConstraints(KotlinParser.TypeConstraintsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeConstraints(KotlinParser.TypeConstraintsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeConstraint(KotlinParser.TypeConstraintContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeConstraint(KotlinParser.TypeConstraintContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterBlock(KotlinParser.BlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitBlock(KotlinParser.BlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterStatements(KotlinParser.StatementsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitStatements(KotlinParser.StatementsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterStatement(KotlinParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitStatement(KotlinParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterBlockLevelExpression(KotlinParser.BlockLevelExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitBlockLevelExpression(KotlinParser.BlockLevelExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDeclaration(KotlinParser.DeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDeclaration(KotlinParser.DeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterExpression(KotlinParser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitExpression(KotlinParser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDisjunction(KotlinParser.DisjunctionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDisjunction(KotlinParser.DisjunctionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterConjunction(KotlinParser.ConjunctionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitConjunction(KotlinParser.ConjunctionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEqualityComparison(KotlinParser.EqualityComparisonContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEqualityComparison(KotlinParser.EqualityComparisonContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterComparison(KotlinParser.ComparisonContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitComparison(KotlinParser.ComparisonContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterNamedInfix(KotlinParser.NamedInfixContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitNamedInfix(KotlinParser.NamedInfixContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterElvisExpression(KotlinParser.ElvisExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitElvisExpression(KotlinParser.ElvisExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterInfixFunctionCall(KotlinParser.InfixFunctionCallContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitInfixFunctionCall(KotlinParser.InfixFunctionCallContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterRangeExpression(KotlinParser.RangeExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitRangeExpression(KotlinParser.RangeExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAdditiveExpression(KotlinParser.AdditiveExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAdditiveExpression(KotlinParser.AdditiveExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMultiplicativeExpression(KotlinParser.MultiplicativeExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMultiplicativeExpression(KotlinParser.MultiplicativeExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeRHS(KotlinParser.TypeRHSContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeRHS(KotlinParser.TypeRHSContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPrefixUnaryExpression(KotlinParser.PrefixUnaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPrefixUnaryExpression(KotlinParser.PrefixUnaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPostfixUnaryExpression(KotlinParser.PostfixUnaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPostfixUnaryExpression(KotlinParser.PostfixUnaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAtomicExpression(KotlinParser.AtomicExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAtomicExpression(KotlinParser.AtomicExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterParenthesizedExpression(KotlinParser.ParenthesizedExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitParenthesizedExpression(KotlinParser.ParenthesizedExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterCallSuffix(KotlinParser.CallSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitCallSuffix(KotlinParser.CallSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAnnotatedLambda(KotlinParser.AnnotatedLambdaContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAnnotatedLambda(KotlinParser.AnnotatedLambdaContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArrayAccess(KotlinParser.ArrayAccessContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArrayAccess(KotlinParser.ArrayAccessContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterValueArguments(KotlinParser.ValueArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitValueArguments(KotlinParser.ValueArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeArguments(KotlinParser.TypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeArguments(KotlinParser.TypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeProjection(KotlinParser.TypeProjectionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeProjection(KotlinParser.TypeProjectionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeProjectionModifierList(KotlinParser.TypeProjectionModifierListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeProjectionModifierList(KotlinParser.TypeProjectionModifierListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterValueArgument(KotlinParser.ValueArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitValueArgument(KotlinParser.ValueArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLiteralConstant(KotlinParser.LiteralConstantContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLiteralConstant(KotlinParser.LiteralConstantContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterStringLiteral(KotlinParser.StringLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitStringLiteral(KotlinParser.StringLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLineStringLiteral(KotlinParser.LineStringLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLineStringLiteral(KotlinParser.LineStringLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMultiLineStringLiteral(KotlinParser.MultiLineStringLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMultiLineStringLiteral(KotlinParser.MultiLineStringLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLineStringContent(KotlinParser.LineStringContentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLineStringContent(KotlinParser.LineStringContentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLineStringExpression(KotlinParser.LineStringExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLineStringExpression(KotlinParser.LineStringExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMultiLineStringContent(KotlinParser.MultiLineStringContentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMultiLineStringContent(KotlinParser.MultiLineStringContentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMultiLineStringExpression(KotlinParser.MultiLineStringExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMultiLineStringExpression(KotlinParser.MultiLineStringExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFunctionLiteral(KotlinParser.FunctionLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFunctionLiteral(KotlinParser.FunctionLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLambdaParameters(KotlinParser.LambdaParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLambdaParameters(KotlinParser.LambdaParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLambdaParameter(KotlinParser.LambdaParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLambdaParameter(KotlinParser.LambdaParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterObjectLiteral(KotlinParser.ObjectLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitObjectLiteral(KotlinParser.ObjectLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterCollectionLiteral(KotlinParser.CollectionLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitCollectionLiteral(KotlinParser.CollectionLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterThisExpression(KotlinParser.ThisExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitThisExpression(KotlinParser.ThisExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSuperExpression(KotlinParser.SuperExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSuperExpression(KotlinParser.SuperExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterConditionalExpression(KotlinParser.ConditionalExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitConditionalExpression(KotlinParser.ConditionalExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterIfExpression(KotlinParser.IfExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitIfExpression(KotlinParser.IfExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterControlStructureBody(KotlinParser.ControlStructureBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitControlStructureBody(KotlinParser.ControlStructureBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterWhenExpression(KotlinParser.WhenExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitWhenExpression(KotlinParser.WhenExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterWhenEntry(KotlinParser.WhenEntryContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitWhenEntry(KotlinParser.WhenEntryContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterWhenCondition(KotlinParser.WhenConditionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitWhenCondition(KotlinParser.WhenConditionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterRangeTest(KotlinParser.RangeTestContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitRangeTest(KotlinParser.RangeTestContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeTest(KotlinParser.TypeTestContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeTest(KotlinParser.TypeTestContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTryExpression(KotlinParser.TryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTryExpression(KotlinParser.TryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterCatchBlock(KotlinParser.CatchBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitCatchBlock(KotlinParser.CatchBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFinallyBlock(KotlinParser.FinallyBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFinallyBlock(KotlinParser.FinallyBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLoopExpression(KotlinParser.LoopExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLoopExpression(KotlinParser.LoopExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterForExpression(KotlinParser.ForExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitForExpression(KotlinParser.ForExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterWhileExpression(KotlinParser.WhileExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitWhileExpression(KotlinParser.WhileExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDoWhileExpression(KotlinParser.DoWhileExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDoWhileExpression(KotlinParser.DoWhileExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterJumpExpression(KotlinParser.JumpExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitJumpExpression(KotlinParser.JumpExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterCallableReference(KotlinParser.CallableReferenceContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitCallableReference(KotlinParser.CallableReferenceContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAssignmentOperator(KotlinParser.AssignmentOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAssignmentOperator(KotlinParser.AssignmentOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEqualityOperation(KotlinParser.EqualityOperationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEqualityOperation(KotlinParser.EqualityOperationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterComparisonOperator(KotlinParser.ComparisonOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitComparisonOperator(KotlinParser.ComparisonOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterInOperator(KotlinParser.InOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitInOperator(KotlinParser.InOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterIsOperator(KotlinParser.IsOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitIsOperator(KotlinParser.IsOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAdditiveOperator(KotlinParser.AdditiveOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAdditiveOperator(KotlinParser.AdditiveOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMultiplicativeOperation(KotlinParser.MultiplicativeOperationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMultiplicativeOperation(KotlinParser.MultiplicativeOperationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeOperation(KotlinParser.TypeOperationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeOperation(KotlinParser.TypeOperationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPrefixUnaryOperation(KotlinParser.PrefixUnaryOperationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPrefixUnaryOperation(KotlinParser.PrefixUnaryOperationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPostfixUnaryOperation(KotlinParser.PostfixUnaryOperationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPostfixUnaryOperation(KotlinParser.PostfixUnaryOperationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMemberAccessOperator(KotlinParser.MemberAccessOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMemberAccessOperator(KotlinParser.MemberAccessOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterModifierList(KotlinParser.ModifierListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitModifierList(KotlinParser.ModifierListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterModifier(KotlinParser.ModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitModifier(KotlinParser.ModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassModifier(KotlinParser.ClassModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassModifier(KotlinParser.ClassModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMemberModifier(KotlinParser.MemberModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMemberModifier(KotlinParser.MemberModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterVisibilityModifier(KotlinParser.VisibilityModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitVisibilityModifier(KotlinParser.VisibilityModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterVarianceAnnotation(KotlinParser.VarianceAnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitVarianceAnnotation(KotlinParser.VarianceAnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFunctionModifier(KotlinParser.FunctionModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFunctionModifier(KotlinParser.FunctionModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPropertyModifier(KotlinParser.PropertyModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPropertyModifier(KotlinParser.PropertyModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterInheritanceModifier(KotlinParser.InheritanceModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitInheritanceModifier(KotlinParser.InheritanceModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterParameterModifier(KotlinParser.ParameterModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitParameterModifier(KotlinParser.ParameterModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeParameterModifier(KotlinParser.TypeParameterModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeParameterModifier(KotlinParser.TypeParameterModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLabelDefinition(KotlinParser.LabelDefinitionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLabelDefinition(KotlinParser.LabelDefinitionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAnnotations(KotlinParser.AnnotationsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAnnotations(KotlinParser.AnnotationsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAnnotation(KotlinParser.AnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAnnotation(KotlinParser.AnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAnnotationList(KotlinParser.AnnotationListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAnnotationList(KotlinParser.AnnotationListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAnnotationUseSiteTarget(KotlinParser.AnnotationUseSiteTargetContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAnnotationUseSiteTarget(KotlinParser.AnnotationUseSiteTargetContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterUnescapedAnnotation(KotlinParser.UnescapedAnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitUnescapedAnnotation(KotlinParser.UnescapedAnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterIdentifier(KotlinParser.IdentifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitIdentifier(KotlinParser.IdentifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSimpleIdentifier(KotlinParser.SimpleIdentifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSimpleIdentifier(KotlinParser.SimpleIdentifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSemi(KotlinParser.SemiContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSemi(KotlinParser.SemiContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAnysemi(KotlinParser.AnysemiContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAnysemi(KotlinParser.AnysemiContext ctx) { } + + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void visitTerminal(TerminalNode node) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void visitErrorNode(ErrorNode node) { } +} \ No newline at end of file diff --git a/src/main/java/grammar/KotlinParserListener.java b/src/main/java/grammar/KotlinParserListener.java new file mode 100644 index 00000000..9b7811a9 --- /dev/null +++ b/src/main/java/grammar/KotlinParserListener.java @@ -0,0 +1,1481 @@ +// Generated from KotlinParser.g4 by ANTLR 4.5 +package grammar; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link KotlinParser}. + */ +public interface KotlinParserListener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link KotlinParser#kotlinFile}. + * @param ctx the parse tree + */ + void enterKotlinFile(KotlinParser.KotlinFileContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#kotlinFile}. + * @param ctx the parse tree + */ + void exitKotlinFile(KotlinParser.KotlinFileContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#script}. + * @param ctx the parse tree + */ + void enterScript(KotlinParser.ScriptContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#script}. + * @param ctx the parse tree + */ + void exitScript(KotlinParser.ScriptContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#preamble}. + * @param ctx the parse tree + */ + void enterPreamble(KotlinParser.PreambleContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#preamble}. + * @param ctx the parse tree + */ + void exitPreamble(KotlinParser.PreambleContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#fileAnnotations}. + * @param ctx the parse tree + */ + void enterFileAnnotations(KotlinParser.FileAnnotationsContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#fileAnnotations}. + * @param ctx the parse tree + */ + void exitFileAnnotations(KotlinParser.FileAnnotationsContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#fileAnnotation}. + * @param ctx the parse tree + */ + void enterFileAnnotation(KotlinParser.FileAnnotationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#fileAnnotation}. + * @param ctx the parse tree + */ + void exitFileAnnotation(KotlinParser.FileAnnotationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#packageHeader}. + * @param ctx the parse tree + */ + void enterPackageHeader(KotlinParser.PackageHeaderContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#packageHeader}. + * @param ctx the parse tree + */ + void exitPackageHeader(KotlinParser.PackageHeaderContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#importList}. + * @param ctx the parse tree + */ + void enterImportList(KotlinParser.ImportListContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#importList}. + * @param ctx the parse tree + */ + void exitImportList(KotlinParser.ImportListContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#importHeader}. + * @param ctx the parse tree + */ + void enterImportHeader(KotlinParser.ImportHeaderContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#importHeader}. + * @param ctx the parse tree + */ + void exitImportHeader(KotlinParser.ImportHeaderContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#importAlias}. + * @param ctx the parse tree + */ + void enterImportAlias(KotlinParser.ImportAliasContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#importAlias}. + * @param ctx the parse tree + */ + void exitImportAlias(KotlinParser.ImportAliasContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#topLevelObject}. + * @param ctx the parse tree + */ + void enterTopLevelObject(KotlinParser.TopLevelObjectContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#topLevelObject}. + * @param ctx the parse tree + */ + void exitTopLevelObject(KotlinParser.TopLevelObjectContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#classDeclaration}. + * @param ctx the parse tree + */ + void enterClassDeclaration(KotlinParser.ClassDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#classDeclaration}. + * @param ctx the parse tree + */ + void exitClassDeclaration(KotlinParser.ClassDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#primaryConstructor}. + * @param ctx the parse tree + */ + void enterPrimaryConstructor(KotlinParser.PrimaryConstructorContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#primaryConstructor}. + * @param ctx the parse tree + */ + void exitPrimaryConstructor(KotlinParser.PrimaryConstructorContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#classParameters}. + * @param ctx the parse tree + */ + void enterClassParameters(KotlinParser.ClassParametersContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#classParameters}. + * @param ctx the parse tree + */ + void exitClassParameters(KotlinParser.ClassParametersContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#classParameter}. + * @param ctx the parse tree + */ + void enterClassParameter(KotlinParser.ClassParameterContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#classParameter}. + * @param ctx the parse tree + */ + void exitClassParameter(KotlinParser.ClassParameterContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#delegationSpecifiers}. + * @param ctx the parse tree + */ + void enterDelegationSpecifiers(KotlinParser.DelegationSpecifiersContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#delegationSpecifiers}. + * @param ctx the parse tree + */ + void exitDelegationSpecifiers(KotlinParser.DelegationSpecifiersContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#delegationSpecifier}. + * @param ctx the parse tree + */ + void enterDelegationSpecifier(KotlinParser.DelegationSpecifierContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#delegationSpecifier}. + * @param ctx the parse tree + */ + void exitDelegationSpecifier(KotlinParser.DelegationSpecifierContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#constructorInvocation}. + * @param ctx the parse tree + */ + void enterConstructorInvocation(KotlinParser.ConstructorInvocationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#constructorInvocation}. + * @param ctx the parse tree + */ + void exitConstructorInvocation(KotlinParser.ConstructorInvocationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#explicitDelegation}. + * @param ctx the parse tree + */ + void enterExplicitDelegation(KotlinParser.ExplicitDelegationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#explicitDelegation}. + * @param ctx the parse tree + */ + void exitExplicitDelegation(KotlinParser.ExplicitDelegationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#classBody}. + * @param ctx the parse tree + */ + void enterClassBody(KotlinParser.ClassBodyContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#classBody}. + * @param ctx the parse tree + */ + void exitClassBody(KotlinParser.ClassBodyContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#classMemberDeclaration}. + * @param ctx the parse tree + */ + void enterClassMemberDeclaration(KotlinParser.ClassMemberDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#classMemberDeclaration}. + * @param ctx the parse tree + */ + void exitClassMemberDeclaration(KotlinParser.ClassMemberDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#anonymousInitializer}. + * @param ctx the parse tree + */ + void enterAnonymousInitializer(KotlinParser.AnonymousInitializerContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#anonymousInitializer}. + * @param ctx the parse tree + */ + void exitAnonymousInitializer(KotlinParser.AnonymousInitializerContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#secondaryConstructor}. + * @param ctx the parse tree + */ + void enterSecondaryConstructor(KotlinParser.SecondaryConstructorContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#secondaryConstructor}. + * @param ctx the parse tree + */ + void exitSecondaryConstructor(KotlinParser.SecondaryConstructorContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#constructorDelegationCall}. + * @param ctx the parse tree + */ + void enterConstructorDelegationCall(KotlinParser.ConstructorDelegationCallContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#constructorDelegationCall}. + * @param ctx the parse tree + */ + void exitConstructorDelegationCall(KotlinParser.ConstructorDelegationCallContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#enumClassBody}. + * @param ctx the parse tree + */ + void enterEnumClassBody(KotlinParser.EnumClassBodyContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#enumClassBody}. + * @param ctx the parse tree + */ + void exitEnumClassBody(KotlinParser.EnumClassBodyContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#enumEntries}. + * @param ctx the parse tree + */ + void enterEnumEntries(KotlinParser.EnumEntriesContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#enumEntries}. + * @param ctx the parse tree + */ + void exitEnumEntries(KotlinParser.EnumEntriesContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#enumEntry}. + * @param ctx the parse tree + */ + void enterEnumEntry(KotlinParser.EnumEntryContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#enumEntry}. + * @param ctx the parse tree + */ + void exitEnumEntry(KotlinParser.EnumEntryContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#functionDeclaration}. + * @param ctx the parse tree + */ + void enterFunctionDeclaration(KotlinParser.FunctionDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#functionDeclaration}. + * @param ctx the parse tree + */ + void exitFunctionDeclaration(KotlinParser.FunctionDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#functionValueParameters}. + * @param ctx the parse tree + */ + void enterFunctionValueParameters(KotlinParser.FunctionValueParametersContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#functionValueParameters}. + * @param ctx the parse tree + */ + void exitFunctionValueParameters(KotlinParser.FunctionValueParametersContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#functionValueParameter}. + * @param ctx the parse tree + */ + void enterFunctionValueParameter(KotlinParser.FunctionValueParameterContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#functionValueParameter}. + * @param ctx the parse tree + */ + void exitFunctionValueParameter(KotlinParser.FunctionValueParameterContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#parameter}. + * @param ctx the parse tree + */ + void enterParameter(KotlinParser.ParameterContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#parameter}. + * @param ctx the parse tree + */ + void exitParameter(KotlinParser.ParameterContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#receiverType}. + * @param ctx the parse tree + */ + void enterReceiverType(KotlinParser.ReceiverTypeContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#receiverType}. + * @param ctx the parse tree + */ + void exitReceiverType(KotlinParser.ReceiverTypeContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#functionBody}. + * @param ctx the parse tree + */ + void enterFunctionBody(KotlinParser.FunctionBodyContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#functionBody}. + * @param ctx the parse tree + */ + void exitFunctionBody(KotlinParser.FunctionBodyContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#objectDeclaration}. + * @param ctx the parse tree + */ + void enterObjectDeclaration(KotlinParser.ObjectDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#objectDeclaration}. + * @param ctx the parse tree + */ + void exitObjectDeclaration(KotlinParser.ObjectDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#companionObject}. + * @param ctx the parse tree + */ + void enterCompanionObject(KotlinParser.CompanionObjectContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#companionObject}. + * @param ctx the parse tree + */ + void exitCompanionObject(KotlinParser.CompanionObjectContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#propertyDeclaration}. + * @param ctx the parse tree + */ + void enterPropertyDeclaration(KotlinParser.PropertyDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#propertyDeclaration}. + * @param ctx the parse tree + */ + void exitPropertyDeclaration(KotlinParser.PropertyDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#multiVariableDeclaration}. + * @param ctx the parse tree + */ + void enterMultiVariableDeclaration(KotlinParser.MultiVariableDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#multiVariableDeclaration}. + * @param ctx the parse tree + */ + void exitMultiVariableDeclaration(KotlinParser.MultiVariableDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#variableDeclaration}. + * @param ctx the parse tree + */ + void enterVariableDeclaration(KotlinParser.VariableDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#variableDeclaration}. + * @param ctx the parse tree + */ + void exitVariableDeclaration(KotlinParser.VariableDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#getter}. + * @param ctx the parse tree + */ + void enterGetter(KotlinParser.GetterContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#getter}. + * @param ctx the parse tree + */ + void exitGetter(KotlinParser.GetterContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#setter}. + * @param ctx the parse tree + */ + void enterSetter(KotlinParser.SetterContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#setter}. + * @param ctx the parse tree + */ + void exitSetter(KotlinParser.SetterContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#typeAlias}. + * @param ctx the parse tree + */ + void enterTypeAlias(KotlinParser.TypeAliasContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#typeAlias}. + * @param ctx the parse tree + */ + void exitTypeAlias(KotlinParser.TypeAliasContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#typeParameters}. + * @param ctx the parse tree + */ + void enterTypeParameters(KotlinParser.TypeParametersContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#typeParameters}. + * @param ctx the parse tree + */ + void exitTypeParameters(KotlinParser.TypeParametersContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#typeParameter}. + * @param ctx the parse tree + */ + void enterTypeParameter(KotlinParser.TypeParameterContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#typeParameter}. + * @param ctx the parse tree + */ + void exitTypeParameter(KotlinParser.TypeParameterContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#type}. + * @param ctx the parse tree + */ + void enterType(KotlinParser.TypeContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#type}. + * @param ctx the parse tree + */ + void exitType(KotlinParser.TypeContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#typeModifierList}. + * @param ctx the parse tree + */ + void enterTypeModifierList(KotlinParser.TypeModifierListContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#typeModifierList}. + * @param ctx the parse tree + */ + void exitTypeModifierList(KotlinParser.TypeModifierListContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#parenthesizedType}. + * @param ctx the parse tree + */ + void enterParenthesizedType(KotlinParser.ParenthesizedTypeContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#parenthesizedType}. + * @param ctx the parse tree + */ + void exitParenthesizedType(KotlinParser.ParenthesizedTypeContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#nullableType}. + * @param ctx the parse tree + */ + void enterNullableType(KotlinParser.NullableTypeContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#nullableType}. + * @param ctx the parse tree + */ + void exitNullableType(KotlinParser.NullableTypeContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#typeReference}. + * @param ctx the parse tree + */ + void enterTypeReference(KotlinParser.TypeReferenceContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#typeReference}. + * @param ctx the parse tree + */ + void exitTypeReference(KotlinParser.TypeReferenceContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#functionType}. + * @param ctx the parse tree + */ + void enterFunctionType(KotlinParser.FunctionTypeContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#functionType}. + * @param ctx the parse tree + */ + void exitFunctionType(KotlinParser.FunctionTypeContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#functionTypeReceiver}. + * @param ctx the parse tree + */ + void enterFunctionTypeReceiver(KotlinParser.FunctionTypeReceiverContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#functionTypeReceiver}. + * @param ctx the parse tree + */ + void exitFunctionTypeReceiver(KotlinParser.FunctionTypeReceiverContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#userType}. + * @param ctx the parse tree + */ + void enterUserType(KotlinParser.UserTypeContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#userType}. + * @param ctx the parse tree + */ + void exitUserType(KotlinParser.UserTypeContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#simpleUserType}. + * @param ctx the parse tree + */ + void enterSimpleUserType(KotlinParser.SimpleUserTypeContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#simpleUserType}. + * @param ctx the parse tree + */ + void exitSimpleUserType(KotlinParser.SimpleUserTypeContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#functionTypeParameters}. + * @param ctx the parse tree + */ + void enterFunctionTypeParameters(KotlinParser.FunctionTypeParametersContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#functionTypeParameters}. + * @param ctx the parse tree + */ + void exitFunctionTypeParameters(KotlinParser.FunctionTypeParametersContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#typeConstraints}. + * @param ctx the parse tree + */ + void enterTypeConstraints(KotlinParser.TypeConstraintsContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#typeConstraints}. + * @param ctx the parse tree + */ + void exitTypeConstraints(KotlinParser.TypeConstraintsContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#typeConstraint}. + * @param ctx the parse tree + */ + void enterTypeConstraint(KotlinParser.TypeConstraintContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#typeConstraint}. + * @param ctx the parse tree + */ + void exitTypeConstraint(KotlinParser.TypeConstraintContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#block}. + * @param ctx the parse tree + */ + void enterBlock(KotlinParser.BlockContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#block}. + * @param ctx the parse tree + */ + void exitBlock(KotlinParser.BlockContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#statements}. + * @param ctx the parse tree + */ + void enterStatements(KotlinParser.StatementsContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#statements}. + * @param ctx the parse tree + */ + void exitStatements(KotlinParser.StatementsContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#statement}. + * @param ctx the parse tree + */ + void enterStatement(KotlinParser.StatementContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#statement}. + * @param ctx the parse tree + */ + void exitStatement(KotlinParser.StatementContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#blockLevelExpression}. + * @param ctx the parse tree + */ + void enterBlockLevelExpression(KotlinParser.BlockLevelExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#blockLevelExpression}. + * @param ctx the parse tree + */ + void exitBlockLevelExpression(KotlinParser.BlockLevelExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#declaration}. + * @param ctx the parse tree + */ + void enterDeclaration(KotlinParser.DeclarationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#declaration}. + * @param ctx the parse tree + */ + void exitDeclaration(KotlinParser.DeclarationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#expression}. + * @param ctx the parse tree + */ + void enterExpression(KotlinParser.ExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#expression}. + * @param ctx the parse tree + */ + void exitExpression(KotlinParser.ExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#disjunction}. + * @param ctx the parse tree + */ + void enterDisjunction(KotlinParser.DisjunctionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#disjunction}. + * @param ctx the parse tree + */ + void exitDisjunction(KotlinParser.DisjunctionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#conjunction}. + * @param ctx the parse tree + */ + void enterConjunction(KotlinParser.ConjunctionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#conjunction}. + * @param ctx the parse tree + */ + void exitConjunction(KotlinParser.ConjunctionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#equalityComparison}. + * @param ctx the parse tree + */ + void enterEqualityComparison(KotlinParser.EqualityComparisonContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#equalityComparison}. + * @param ctx the parse tree + */ + void exitEqualityComparison(KotlinParser.EqualityComparisonContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#comparison}. + * @param ctx the parse tree + */ + void enterComparison(KotlinParser.ComparisonContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#comparison}. + * @param ctx the parse tree + */ + void exitComparison(KotlinParser.ComparisonContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#namedInfix}. + * @param ctx the parse tree + */ + void enterNamedInfix(KotlinParser.NamedInfixContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#namedInfix}. + * @param ctx the parse tree + */ + void exitNamedInfix(KotlinParser.NamedInfixContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#elvisExpression}. + * @param ctx the parse tree + */ + void enterElvisExpression(KotlinParser.ElvisExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#elvisExpression}. + * @param ctx the parse tree + */ + void exitElvisExpression(KotlinParser.ElvisExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#infixFunctionCall}. + * @param ctx the parse tree + */ + void enterInfixFunctionCall(KotlinParser.InfixFunctionCallContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#infixFunctionCall}. + * @param ctx the parse tree + */ + void exitInfixFunctionCall(KotlinParser.InfixFunctionCallContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#rangeExpression}. + * @param ctx the parse tree + */ + void enterRangeExpression(KotlinParser.RangeExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#rangeExpression}. + * @param ctx the parse tree + */ + void exitRangeExpression(KotlinParser.RangeExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#additiveExpression}. + * @param ctx the parse tree + */ + void enterAdditiveExpression(KotlinParser.AdditiveExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#additiveExpression}. + * @param ctx the parse tree + */ + void exitAdditiveExpression(KotlinParser.AdditiveExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#multiplicativeExpression}. + * @param ctx the parse tree + */ + void enterMultiplicativeExpression(KotlinParser.MultiplicativeExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#multiplicativeExpression}. + * @param ctx the parse tree + */ + void exitMultiplicativeExpression(KotlinParser.MultiplicativeExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#typeRHS}. + * @param ctx the parse tree + */ + void enterTypeRHS(KotlinParser.TypeRHSContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#typeRHS}. + * @param ctx the parse tree + */ + void exitTypeRHS(KotlinParser.TypeRHSContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#prefixUnaryExpression}. + * @param ctx the parse tree + */ + void enterPrefixUnaryExpression(KotlinParser.PrefixUnaryExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#prefixUnaryExpression}. + * @param ctx the parse tree + */ + void exitPrefixUnaryExpression(KotlinParser.PrefixUnaryExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#postfixUnaryExpression}. + * @param ctx the parse tree + */ + void enterPostfixUnaryExpression(KotlinParser.PostfixUnaryExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#postfixUnaryExpression}. + * @param ctx the parse tree + */ + void exitPostfixUnaryExpression(KotlinParser.PostfixUnaryExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#atomicExpression}. + * @param ctx the parse tree + */ + void enterAtomicExpression(KotlinParser.AtomicExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#atomicExpression}. + * @param ctx the parse tree + */ + void exitAtomicExpression(KotlinParser.AtomicExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#parenthesizedExpression}. + * @param ctx the parse tree + */ + void enterParenthesizedExpression(KotlinParser.ParenthesizedExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#parenthesizedExpression}. + * @param ctx the parse tree + */ + void exitParenthesizedExpression(KotlinParser.ParenthesizedExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#callSuffix}. + * @param ctx the parse tree + */ + void enterCallSuffix(KotlinParser.CallSuffixContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#callSuffix}. + * @param ctx the parse tree + */ + void exitCallSuffix(KotlinParser.CallSuffixContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#annotatedLambda}. + * @param ctx the parse tree + */ + void enterAnnotatedLambda(KotlinParser.AnnotatedLambdaContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#annotatedLambda}. + * @param ctx the parse tree + */ + void exitAnnotatedLambda(KotlinParser.AnnotatedLambdaContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#arrayAccess}. + * @param ctx the parse tree + */ + void enterArrayAccess(KotlinParser.ArrayAccessContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#arrayAccess}. + * @param ctx the parse tree + */ + void exitArrayAccess(KotlinParser.ArrayAccessContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#valueArguments}. + * @param ctx the parse tree + */ + void enterValueArguments(KotlinParser.ValueArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#valueArguments}. + * @param ctx the parse tree + */ + void exitValueArguments(KotlinParser.ValueArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#typeArguments}. + * @param ctx the parse tree + */ + void enterTypeArguments(KotlinParser.TypeArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#typeArguments}. + * @param ctx the parse tree + */ + void exitTypeArguments(KotlinParser.TypeArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#typeProjection}. + * @param ctx the parse tree + */ + void enterTypeProjection(KotlinParser.TypeProjectionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#typeProjection}. + * @param ctx the parse tree + */ + void exitTypeProjection(KotlinParser.TypeProjectionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#typeProjectionModifierList}. + * @param ctx the parse tree + */ + void enterTypeProjectionModifierList(KotlinParser.TypeProjectionModifierListContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#typeProjectionModifierList}. + * @param ctx the parse tree + */ + void exitTypeProjectionModifierList(KotlinParser.TypeProjectionModifierListContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#valueArgument}. + * @param ctx the parse tree + */ + void enterValueArgument(KotlinParser.ValueArgumentContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#valueArgument}. + * @param ctx the parse tree + */ + void exitValueArgument(KotlinParser.ValueArgumentContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#literalConstant}. + * @param ctx the parse tree + */ + void enterLiteralConstant(KotlinParser.LiteralConstantContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#literalConstant}. + * @param ctx the parse tree + */ + void exitLiteralConstant(KotlinParser.LiteralConstantContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#stringLiteral}. + * @param ctx the parse tree + */ + void enterStringLiteral(KotlinParser.StringLiteralContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#stringLiteral}. + * @param ctx the parse tree + */ + void exitStringLiteral(KotlinParser.StringLiteralContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#lineStringLiteral}. + * @param ctx the parse tree + */ + void enterLineStringLiteral(KotlinParser.LineStringLiteralContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#lineStringLiteral}. + * @param ctx the parse tree + */ + void exitLineStringLiteral(KotlinParser.LineStringLiteralContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#multiLineStringLiteral}. + * @param ctx the parse tree + */ + void enterMultiLineStringLiteral(KotlinParser.MultiLineStringLiteralContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#multiLineStringLiteral}. + * @param ctx the parse tree + */ + void exitMultiLineStringLiteral(KotlinParser.MultiLineStringLiteralContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#lineStringContent}. + * @param ctx the parse tree + */ + void enterLineStringContent(KotlinParser.LineStringContentContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#lineStringContent}. + * @param ctx the parse tree + */ + void exitLineStringContent(KotlinParser.LineStringContentContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#lineStringExpression}. + * @param ctx the parse tree + */ + void enterLineStringExpression(KotlinParser.LineStringExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#lineStringExpression}. + * @param ctx the parse tree + */ + void exitLineStringExpression(KotlinParser.LineStringExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#multiLineStringContent}. + * @param ctx the parse tree + */ + void enterMultiLineStringContent(KotlinParser.MultiLineStringContentContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#multiLineStringContent}. + * @param ctx the parse tree + */ + void exitMultiLineStringContent(KotlinParser.MultiLineStringContentContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#multiLineStringExpression}. + * @param ctx the parse tree + */ + void enterMultiLineStringExpression(KotlinParser.MultiLineStringExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#multiLineStringExpression}. + * @param ctx the parse tree + */ + void exitMultiLineStringExpression(KotlinParser.MultiLineStringExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#functionLiteral}. + * @param ctx the parse tree + */ + void enterFunctionLiteral(KotlinParser.FunctionLiteralContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#functionLiteral}. + * @param ctx the parse tree + */ + void exitFunctionLiteral(KotlinParser.FunctionLiteralContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#lambdaParameters}. + * @param ctx the parse tree + */ + void enterLambdaParameters(KotlinParser.LambdaParametersContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#lambdaParameters}. + * @param ctx the parse tree + */ + void exitLambdaParameters(KotlinParser.LambdaParametersContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#lambdaParameter}. + * @param ctx the parse tree + */ + void enterLambdaParameter(KotlinParser.LambdaParameterContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#lambdaParameter}. + * @param ctx the parse tree + */ + void exitLambdaParameter(KotlinParser.LambdaParameterContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#objectLiteral}. + * @param ctx the parse tree + */ + void enterObjectLiteral(KotlinParser.ObjectLiteralContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#objectLiteral}. + * @param ctx the parse tree + */ + void exitObjectLiteral(KotlinParser.ObjectLiteralContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#collectionLiteral}. + * @param ctx the parse tree + */ + void enterCollectionLiteral(KotlinParser.CollectionLiteralContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#collectionLiteral}. + * @param ctx the parse tree + */ + void exitCollectionLiteral(KotlinParser.CollectionLiteralContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#thisExpression}. + * @param ctx the parse tree + */ + void enterThisExpression(KotlinParser.ThisExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#thisExpression}. + * @param ctx the parse tree + */ + void exitThisExpression(KotlinParser.ThisExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#superExpression}. + * @param ctx the parse tree + */ + void enterSuperExpression(KotlinParser.SuperExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#superExpression}. + * @param ctx the parse tree + */ + void exitSuperExpression(KotlinParser.SuperExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#conditionalExpression}. + * @param ctx the parse tree + */ + void enterConditionalExpression(KotlinParser.ConditionalExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#conditionalExpression}. + * @param ctx the parse tree + */ + void exitConditionalExpression(KotlinParser.ConditionalExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#ifExpression}. + * @param ctx the parse tree + */ + void enterIfExpression(KotlinParser.IfExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#ifExpression}. + * @param ctx the parse tree + */ + void exitIfExpression(KotlinParser.IfExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#controlStructureBody}. + * @param ctx the parse tree + */ + void enterControlStructureBody(KotlinParser.ControlStructureBodyContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#controlStructureBody}. + * @param ctx the parse tree + */ + void exitControlStructureBody(KotlinParser.ControlStructureBodyContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#whenExpression}. + * @param ctx the parse tree + */ + void enterWhenExpression(KotlinParser.WhenExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#whenExpression}. + * @param ctx the parse tree + */ + void exitWhenExpression(KotlinParser.WhenExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#whenEntry}. + * @param ctx the parse tree + */ + void enterWhenEntry(KotlinParser.WhenEntryContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#whenEntry}. + * @param ctx the parse tree + */ + void exitWhenEntry(KotlinParser.WhenEntryContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#whenCondition}. + * @param ctx the parse tree + */ + void enterWhenCondition(KotlinParser.WhenConditionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#whenCondition}. + * @param ctx the parse tree + */ + void exitWhenCondition(KotlinParser.WhenConditionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#rangeTest}. + * @param ctx the parse tree + */ + void enterRangeTest(KotlinParser.RangeTestContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#rangeTest}. + * @param ctx the parse tree + */ + void exitRangeTest(KotlinParser.RangeTestContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#typeTest}. + * @param ctx the parse tree + */ + void enterTypeTest(KotlinParser.TypeTestContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#typeTest}. + * @param ctx the parse tree + */ + void exitTypeTest(KotlinParser.TypeTestContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#tryExpression}. + * @param ctx the parse tree + */ + void enterTryExpression(KotlinParser.TryExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#tryExpression}. + * @param ctx the parse tree + */ + void exitTryExpression(KotlinParser.TryExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#catchBlock}. + * @param ctx the parse tree + */ + void enterCatchBlock(KotlinParser.CatchBlockContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#catchBlock}. + * @param ctx the parse tree + */ + void exitCatchBlock(KotlinParser.CatchBlockContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#finallyBlock}. + * @param ctx the parse tree + */ + void enterFinallyBlock(KotlinParser.FinallyBlockContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#finallyBlock}. + * @param ctx the parse tree + */ + void exitFinallyBlock(KotlinParser.FinallyBlockContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#loopExpression}. + * @param ctx the parse tree + */ + void enterLoopExpression(KotlinParser.LoopExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#loopExpression}. + * @param ctx the parse tree + */ + void exitLoopExpression(KotlinParser.LoopExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#forExpression}. + * @param ctx the parse tree + */ + void enterForExpression(KotlinParser.ForExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#forExpression}. + * @param ctx the parse tree + */ + void exitForExpression(KotlinParser.ForExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#whileExpression}. + * @param ctx the parse tree + */ + void enterWhileExpression(KotlinParser.WhileExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#whileExpression}. + * @param ctx the parse tree + */ + void exitWhileExpression(KotlinParser.WhileExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#doWhileExpression}. + * @param ctx the parse tree + */ + void enterDoWhileExpression(KotlinParser.DoWhileExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#doWhileExpression}. + * @param ctx the parse tree + */ + void exitDoWhileExpression(KotlinParser.DoWhileExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#jumpExpression}. + * @param ctx the parse tree + */ + void enterJumpExpression(KotlinParser.JumpExpressionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#jumpExpression}. + * @param ctx the parse tree + */ + void exitJumpExpression(KotlinParser.JumpExpressionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#callableReference}. + * @param ctx the parse tree + */ + void enterCallableReference(KotlinParser.CallableReferenceContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#callableReference}. + * @param ctx the parse tree + */ + void exitCallableReference(KotlinParser.CallableReferenceContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#assignmentOperator}. + * @param ctx the parse tree + */ + void enterAssignmentOperator(KotlinParser.AssignmentOperatorContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#assignmentOperator}. + * @param ctx the parse tree + */ + void exitAssignmentOperator(KotlinParser.AssignmentOperatorContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#equalityOperation}. + * @param ctx the parse tree + */ + void enterEqualityOperation(KotlinParser.EqualityOperationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#equalityOperation}. + * @param ctx the parse tree + */ + void exitEqualityOperation(KotlinParser.EqualityOperationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#comparisonOperator}. + * @param ctx the parse tree + */ + void enterComparisonOperator(KotlinParser.ComparisonOperatorContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#comparisonOperator}. + * @param ctx the parse tree + */ + void exitComparisonOperator(KotlinParser.ComparisonOperatorContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#inOperator}. + * @param ctx the parse tree + */ + void enterInOperator(KotlinParser.InOperatorContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#inOperator}. + * @param ctx the parse tree + */ + void exitInOperator(KotlinParser.InOperatorContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#isOperator}. + * @param ctx the parse tree + */ + void enterIsOperator(KotlinParser.IsOperatorContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#isOperator}. + * @param ctx the parse tree + */ + void exitIsOperator(KotlinParser.IsOperatorContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#additiveOperator}. + * @param ctx the parse tree + */ + void enterAdditiveOperator(KotlinParser.AdditiveOperatorContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#additiveOperator}. + * @param ctx the parse tree + */ + void exitAdditiveOperator(KotlinParser.AdditiveOperatorContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#multiplicativeOperation}. + * @param ctx the parse tree + */ + void enterMultiplicativeOperation(KotlinParser.MultiplicativeOperationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#multiplicativeOperation}. + * @param ctx the parse tree + */ + void exitMultiplicativeOperation(KotlinParser.MultiplicativeOperationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#typeOperation}. + * @param ctx the parse tree + */ + void enterTypeOperation(KotlinParser.TypeOperationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#typeOperation}. + * @param ctx the parse tree + */ + void exitTypeOperation(KotlinParser.TypeOperationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#prefixUnaryOperation}. + * @param ctx the parse tree + */ + void enterPrefixUnaryOperation(KotlinParser.PrefixUnaryOperationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#prefixUnaryOperation}. + * @param ctx the parse tree + */ + void exitPrefixUnaryOperation(KotlinParser.PrefixUnaryOperationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#postfixUnaryOperation}. + * @param ctx the parse tree + */ + void enterPostfixUnaryOperation(KotlinParser.PostfixUnaryOperationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#postfixUnaryOperation}. + * @param ctx the parse tree + */ + void exitPostfixUnaryOperation(KotlinParser.PostfixUnaryOperationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#memberAccessOperator}. + * @param ctx the parse tree + */ + void enterMemberAccessOperator(KotlinParser.MemberAccessOperatorContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#memberAccessOperator}. + * @param ctx the parse tree + */ + void exitMemberAccessOperator(KotlinParser.MemberAccessOperatorContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#modifierList}. + * @param ctx the parse tree + */ + void enterModifierList(KotlinParser.ModifierListContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#modifierList}. + * @param ctx the parse tree + */ + void exitModifierList(KotlinParser.ModifierListContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#modifier}. + * @param ctx the parse tree + */ + void enterModifier(KotlinParser.ModifierContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#modifier}. + * @param ctx the parse tree + */ + void exitModifier(KotlinParser.ModifierContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#classModifier}. + * @param ctx the parse tree + */ + void enterClassModifier(KotlinParser.ClassModifierContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#classModifier}. + * @param ctx the parse tree + */ + void exitClassModifier(KotlinParser.ClassModifierContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#memberModifier}. + * @param ctx the parse tree + */ + void enterMemberModifier(KotlinParser.MemberModifierContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#memberModifier}. + * @param ctx the parse tree + */ + void exitMemberModifier(KotlinParser.MemberModifierContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#visibilityModifier}. + * @param ctx the parse tree + */ + void enterVisibilityModifier(KotlinParser.VisibilityModifierContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#visibilityModifier}. + * @param ctx the parse tree + */ + void exitVisibilityModifier(KotlinParser.VisibilityModifierContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#varianceAnnotation}. + * @param ctx the parse tree + */ + void enterVarianceAnnotation(KotlinParser.VarianceAnnotationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#varianceAnnotation}. + * @param ctx the parse tree + */ + void exitVarianceAnnotation(KotlinParser.VarianceAnnotationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#functionModifier}. + * @param ctx the parse tree + */ + void enterFunctionModifier(KotlinParser.FunctionModifierContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#functionModifier}. + * @param ctx the parse tree + */ + void exitFunctionModifier(KotlinParser.FunctionModifierContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#propertyModifier}. + * @param ctx the parse tree + */ + void enterPropertyModifier(KotlinParser.PropertyModifierContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#propertyModifier}. + * @param ctx the parse tree + */ + void exitPropertyModifier(KotlinParser.PropertyModifierContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#inheritanceModifier}. + * @param ctx the parse tree + */ + void enterInheritanceModifier(KotlinParser.InheritanceModifierContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#inheritanceModifier}. + * @param ctx the parse tree + */ + void exitInheritanceModifier(KotlinParser.InheritanceModifierContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#parameterModifier}. + * @param ctx the parse tree + */ + void enterParameterModifier(KotlinParser.ParameterModifierContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#parameterModifier}. + * @param ctx the parse tree + */ + void exitParameterModifier(KotlinParser.ParameterModifierContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#typeParameterModifier}. + * @param ctx the parse tree + */ + void enterTypeParameterModifier(KotlinParser.TypeParameterModifierContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#typeParameterModifier}. + * @param ctx the parse tree + */ + void exitTypeParameterModifier(KotlinParser.TypeParameterModifierContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#labelDefinition}. + * @param ctx the parse tree + */ + void enterLabelDefinition(KotlinParser.LabelDefinitionContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#labelDefinition}. + * @param ctx the parse tree + */ + void exitLabelDefinition(KotlinParser.LabelDefinitionContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#annotations}. + * @param ctx the parse tree + */ + void enterAnnotations(KotlinParser.AnnotationsContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#annotations}. + * @param ctx the parse tree + */ + void exitAnnotations(KotlinParser.AnnotationsContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#annotation}. + * @param ctx the parse tree + */ + void enterAnnotation(KotlinParser.AnnotationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#annotation}. + * @param ctx the parse tree + */ + void exitAnnotation(KotlinParser.AnnotationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#annotationList}. + * @param ctx the parse tree + */ + void enterAnnotationList(KotlinParser.AnnotationListContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#annotationList}. + * @param ctx the parse tree + */ + void exitAnnotationList(KotlinParser.AnnotationListContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#annotationUseSiteTarget}. + * @param ctx the parse tree + */ + void enterAnnotationUseSiteTarget(KotlinParser.AnnotationUseSiteTargetContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#annotationUseSiteTarget}. + * @param ctx the parse tree + */ + void exitAnnotationUseSiteTarget(KotlinParser.AnnotationUseSiteTargetContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#unescapedAnnotation}. + * @param ctx the parse tree + */ + void enterUnescapedAnnotation(KotlinParser.UnescapedAnnotationContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#unescapedAnnotation}. + * @param ctx the parse tree + */ + void exitUnescapedAnnotation(KotlinParser.UnescapedAnnotationContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#identifier}. + * @param ctx the parse tree + */ + void enterIdentifier(KotlinParser.IdentifierContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#identifier}. + * @param ctx the parse tree + */ + void exitIdentifier(KotlinParser.IdentifierContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#simpleIdentifier}. + * @param ctx the parse tree + */ + void enterSimpleIdentifier(KotlinParser.SimpleIdentifierContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#simpleIdentifier}. + * @param ctx the parse tree + */ + void exitSimpleIdentifier(KotlinParser.SimpleIdentifierContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#semi}. + * @param ctx the parse tree + */ + void enterSemi(KotlinParser.SemiContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#semi}. + * @param ctx the parse tree + */ + void exitSemi(KotlinParser.SemiContext ctx); + /** + * Enter a parse tree produced by {@link KotlinParser#anysemi}. + * @param ctx the parse tree + */ + void enterAnysemi(KotlinParser.AnysemiContext ctx); + /** + * Exit a parse tree produced by {@link KotlinParser#anysemi}. + * @param ctx the parse tree + */ + void exitAnysemi(KotlinParser.AnysemiContext ctx); +} \ No newline at end of file diff --git a/src/main/java/grammar/PythonLexer.java b/src/main/java/grammar/PythonLexer.java new file mode 100644 index 00000000..cd8dafc4 --- /dev/null +++ b/src/main/java/grammar/PythonLexer.java @@ -0,0 +1,614 @@ +// Generated from PythonLexer.g4 by ANTLR 4.5 +package grammar; +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class PythonLexer extends PythonLexerBase { + static { RuntimeMetaData.checkVersion("4.5", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + INDENT=1, DEDENT=2, LINE_BREAK=3, DEF=4, RETURN=5, RAISE=6, FROM=7, IMPORT=8, + NONLOCAL=9, AS=10, GLOBAL=11, ASSERT=12, IF=13, ELIF=14, ELSE=15, WHILE=16, + FOR=17, IN=18, TRY=19, NONE=20, FINALLY=21, WITH=22, EXCEPT=23, LAMBDA=24, + OR=25, AND=26, NOT=27, IS=28, CLASS=29, YIELD=30, DEL=31, PASS=32, CONTINUE=33, + BREAK=34, ASYNC=35, AWAIT=36, PRINT=37, EXEC=38, TRUE=39, FALSE=40, DOT=41, + ELLIPSIS=42, REVERSE_QUOTE=43, STAR=44, COMMA=45, COLON=46, SEMI_COLON=47, + POWER=48, ASSIGN=49, OR_OP=50, XOR=51, AND_OP=52, LEFT_SHIFT=53, RIGHT_SHIFT=54, + ADD=55, MINUS=56, DIV=57, MOD=58, IDIV=59, NOT_OP=60, LESS_THAN=61, GREATER_THAN=62, + EQUALS=63, GT_EQ=64, LT_EQ=65, NOT_EQ_1=66, NOT_EQ_2=67, AT=68, ARROW=69, + ADD_ASSIGN=70, SUB_ASSIGN=71, MULT_ASSIGN=72, AT_ASSIGN=73, DIV_ASSIGN=74, + MOD_ASSIGN=75, AND_ASSIGN=76, OR_ASSIGN=77, XOR_ASSIGN=78, LEFT_SHIFT_ASSIGN=79, + RIGHT_SHIFT_ASSIGN=80, POWER_ASSIGN=81, IDIV_ASSIGN=82, STRING=83, DECIMAL_INTEGER=84, + OCT_INTEGER=85, HEX_INTEGER=86, BIN_INTEGER=87, IMAG_NUMBER=88, FLOAT_NUMBER=89, + OPEN_PAREN=90, CLOSE_PAREN=91, OPEN_BRACE=92, CLOSE_BRACE=93, OPEN_BRACKET=94, + CLOSE_BRACKET=95, NAME=96, LINE_JOIN=97, NEWLINE=98, WS=99, COMMENT=100; + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + public static final String[] ruleNames = { + "DEF", "RETURN", "RAISE", "FROM", "IMPORT", "NONLOCAL", "AS", "GLOBAL", + "ASSERT", "IF", "ELIF", "ELSE", "WHILE", "FOR", "IN", "TRY", "NONE", "FINALLY", + "WITH", "EXCEPT", "LAMBDA", "OR", "AND", "NOT", "IS", "CLASS", "YIELD", + "DEL", "PASS", "CONTINUE", "BREAK", "ASYNC", "AWAIT", "PRINT", "EXEC", + "TRUE", "FALSE", "DOT", "ELLIPSIS", "REVERSE_QUOTE", "STAR", "COMMA", + "COLON", "SEMI_COLON", "POWER", "ASSIGN", "OR_OP", "XOR", "AND_OP", "LEFT_SHIFT", + "RIGHT_SHIFT", "ADD", "MINUS", "DIV", "MOD", "IDIV", "NOT_OP", "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", "STRING", "DECIMAL_INTEGER", + "OCT_INTEGER", "HEX_INTEGER", "BIN_INTEGER", "IMAG_NUMBER", "FLOAT_NUMBER", + "OPEN_PAREN", "CLOSE_PAREN", "OPEN_BRACE", "CLOSE_BRACE", "OPEN_BRACKET", + "CLOSE_BRACKET", "NAME", "LINE_JOIN", "NEWLINE", "WS", "COMMENT", "SHORT_STRING", + "LONG_STRING", "LONG_STRING_ITEM", "RN", "EXPONENT_OR_POINT_FLOAT", "POINT_FLOAT", + "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", + "ID_CONTINUE", "ID_START" + }; + + private static final String[] _LITERAL_NAMES = { + null, null, null, null, "'def'", "'return'", "'raise'", "'from'", "'import'", + "'nonlocal'", "'as'", "'global'", "'assert'", "'if'", "'elif'", "'else'", + "'while'", "'for'", "'in'", "'try'", "'None'", "'finally'", "'with'", + "'except'", "'lambda'", "'or'", "'and'", "'not'", "'is'", "'class'", "'yield'", + "'del'", "'pass'", "'continue'", "'break'", "'async'", "'await'", "'print'", + "'exec'", "'True'", "'False'", "'.'", "'...'", "'`'", "'*'", "','", "':'", + "';'", "'**'", "'='", "'|'", "'^'", "'&'", "'<<'", "'>>'", "'+'", "'-'", + "'/'", "'%'", "'//'", "'~'", "'<'", "'>'", "'=='", "'>='", "'<='", "'<>'", + "'!='", "'@'", "'->'", "'+='", "'-='", "'*='", "'@='", "'/='", "'%='", + "'&='", "'|='", "'^='", "'<<='", "'>>='", "'**='", "'//='", null, null, + null, null, null, null, null, "'('", "')'", "'{'", "'}'", "'['", "']'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, "INDENT", "DEDENT", "LINE_BREAK", "DEF", "RETURN", "RAISE", "FROM", + "IMPORT", "NONLOCAL", "AS", "GLOBAL", "ASSERT", "IF", "ELIF", "ELSE", + "WHILE", "FOR", "IN", "TRY", "NONE", "FINALLY", "WITH", "EXCEPT", "LAMBDA", + "OR", "AND", "NOT", "IS", "CLASS", "YIELD", "DEL", "PASS", "CONTINUE", + "BREAK", "ASYNC", "AWAIT", "PRINT", "EXEC", "TRUE", "FALSE", "DOT", "ELLIPSIS", + "REVERSE_QUOTE", "STAR", "COMMA", "COLON", "SEMI_COLON", "POWER", "ASSIGN", + "OR_OP", "XOR", "AND_OP", "LEFT_SHIFT", "RIGHT_SHIFT", "ADD", "MINUS", + "DIV", "MOD", "IDIV", "NOT_OP", "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", "STRING", "DECIMAL_INTEGER", "OCT_INTEGER", + "HEX_INTEGER", "BIN_INTEGER", "IMAG_NUMBER", "FLOAT_NUMBER", "OPEN_PAREN", + "CLOSE_PAREN", "OPEN_BRACE", "CLOSE_BRACE", "OPEN_BRACKET", "CLOSE_BRACKET", + "NAME", "LINE_JOIN", "NEWLINE", "WS", "COMMENT" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + + public PythonLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "PythonLexer.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + @Override + public void action(RuleContext _localctx, int ruleIndex, int actionIndex) { + switch (ruleIndex) { + case 86: + OPEN_PAREN_action((RuleContext)_localctx, actionIndex); + break; + case 87: + CLOSE_PAREN_action((RuleContext)_localctx, actionIndex); + break; + case 88: + OPEN_BRACE_action((RuleContext)_localctx, actionIndex); + break; + case 89: + CLOSE_BRACE_action((RuleContext)_localctx, actionIndex); + break; + case 90: + OPEN_BRACKET_action((RuleContext)_localctx, actionIndex); + break; + case 91: + CLOSE_BRACKET_action((RuleContext)_localctx, actionIndex); + break; + case 94: + NEWLINE_action((RuleContext)_localctx, actionIndex); + break; + case 95: + WS_action((RuleContext)_localctx, actionIndex); + break; + } + } + private void OPEN_PAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 0: + this.IncIndentLevel(); + break; + } + } + private void CLOSE_PAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 1: + this.DecIndentLevel(); + break; + } + } + private void OPEN_BRACE_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 2: + this.IncIndentLevel(); + break; + } + } + private void CLOSE_BRACE_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 3: + this.DecIndentLevel(); + break; + } + } + private void OPEN_BRACKET_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 4: + this.IncIndentLevel(); + break; + } + } + private void CLOSE_BRACKET_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 5: + this.DecIndentLevel(); + break; + } + } + private void NEWLINE_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 6: + this.HandleNewLine(); + break; + } + } + private void WS_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 7: + this.HandleSpaces(); + break; + } + } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2f\u0358\b\1\4\2\t"+ + "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ + "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ + "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ + "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ + "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+ + "k\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3"+ + "\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3"+ + "\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\t\3\t"+ + "\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\f\3"+ + "\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\16\3\17"+ + "\3\17\3\17\3\17\3\20\3\20\3\20\3\21\3\21\3\21\3\21\3\22\3\22\3\22\3\22"+ + "\3\22\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\24\3\24\3\24\3\24\3\24"+ + "\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\26\3\26\3\26\3\26\3\26\3\26\3\26"+ + "\3\27\3\27\3\27\3\30\3\30\3\30\3\30\3\31\3\31\3\31\3\31\3\32\3\32\3\32"+ + "\3\33\3\33\3\33\3\33\3\33\3\33\3\34\3\34\3\34\3\34\3\34\3\34\3\35\3\35"+ + "\3\35\3\35\3\36\3\36\3\36\3\36\3\36\3\37\3\37\3\37\3\37\3\37\3\37\3\37"+ + "\3\37\3\37\3 \3 \3 \3 \3 \3 \3!\3!\3!\3!\3!\3!\3\"\3\"\3\"\3\"\3\"\3\""+ + "\3#\3#\3#\3#\3#\3#\3$\3$\3$\3$\3$\3%\3%\3%\3%\3%\3&\3&\3&\3&\3&\3&\3\'"+ + "\3\'\3(\3(\3(\3(\3)\3)\3*\3*\3+\3+\3,\3,\3-\3-\3.\3.\3.\3/\3/\3\60\3\60"+ + "\3\61\3\61\3\62\3\62\3\63\3\63\3\63\3\64\3\64\3\64\3\65\3\65\3\66\3\66"+ + "\3\67\3\67\38\38\39\39\39\3:\3:\3;\3;\3<\3<\3=\3=\3=\3>\3>\3>\3?\3?\3"+ + "?\3@\3@\3@\3A\3A\3A\3B\3B\3C\3C\3C\3D\3D\3D\3E\3E\3E\3F\3F\3F\3G\3G\3"+ + "G\3H\3H\3H\3I\3I\3I\3J\3J\3J\3K\3K\3K\3L\3L\3L\3M\3M\3M\3M\3N\3N\3N\3"+ + "N\3O\3O\3O\3O\3P\3P\3P\3P\3Q\3Q\3Q\5Q\u0221\nQ\3Q\3Q\5Q\u0225\nQ\5Q\u0227"+ + "\nQ\3Q\3Q\5Q\u022b\nQ\3Q\3Q\5Q\u022f\nQ\3Q\3Q\5Q\u0233\nQ\3Q\3Q\5Q\u0237"+ + "\nQ\5Q\u0239\nQ\3R\3R\7R\u023d\nR\fR\16R\u0240\13R\3R\6R\u0243\nR\rR\16"+ + "R\u0244\5R\u0247\nR\3S\3S\3S\6S\u024c\nS\rS\16S\u024d\3T\3T\3T\6T\u0253"+ + "\nT\rT\16T\u0254\3U\3U\3U\6U\u025a\nU\rU\16U\u025b\3V\3V\6V\u0260\nV\r"+ + "V\16V\u0261\5V\u0264\nV\3V\3V\3W\3W\3X\3X\3X\3Y\3Y\3Y\3Z\3Z\3Z\3[\3[\3"+ + "[\3\\\3\\\3\\\3]\3]\3]\3^\3^\7^\u027e\n^\f^\16^\u0281\13^\3_\3_\7_\u0285"+ + "\n_\f_\16_\u0288\13_\3_\3_\3_\3_\3`\3`\3`\3`\3`\3a\6a\u0294\na\ra\16a"+ + "\u0295\3a\3a\3a\3a\3b\3b\7b\u029e\nb\fb\16b\u02a1\13b\3b\3b\3c\3c\3c\3"+ + "c\5c\u02a9\nc\3c\7c\u02ac\nc\fc\16c\u02af\13c\3c\3c\3c\3c\3c\5c\u02b6"+ + "\nc\3c\7c\u02b9\nc\fc\16c\u02bc\13c\3c\5c\u02bf\nc\3d\3d\3d\3d\3d\7d\u02c6"+ + "\nd\fd\16d\u02c9\13d\3d\3d\3d\3d\3d\3d\3d\3d\7d\u02d3\nd\fd\16d\u02d6"+ + "\13d\3d\3d\3d\5d\u02db\nd\3e\3e\3e\3e\5e\u02e1\ne\5e\u02e3\ne\3f\5f\u02e6"+ + "\nf\3f\3f\3g\6g\u02eb\ng\rg\16g\u02ec\3g\5g\u02f0\ng\3g\3g\5g\u02f4\n"+ + "g\3g\6g\u02f7\ng\rg\16g\u02f8\3g\5g\u02fc\ng\3h\7h\u02ff\nh\fh\16h\u0302"+ + "\13h\3h\3h\6h\u0306\nh\rh\16h\u0307\3h\6h\u030b\nh\rh\16h\u030c\3h\5h"+ + "\u0310\nh\3i\3i\3i\7i\u0315\ni\fi\16i\u0318\13i\3i\3i\3i\3i\7i\u031e\n"+ + "i\fi\16i\u0321\13i\3i\5i\u0324\ni\3j\3j\3j\3j\3j\7j\u032b\nj\fj\16j\u032e"+ + "\13j\3j\3j\3j\3j\3j\3j\3j\3j\7j\u0338\nj\fj\16j\u033b\13j\3j\3j\3j\5j"+ + "\u0340\nj\3k\3k\5k\u0344\nk\3l\5l\u0347\nl\3m\5m\u034a\nm\3n\5n\u034d"+ + "\nn\3o\3o\3o\3p\3p\5p\u0354\np\3q\5q\u0357\nq\6\u02c7\u02d4\u032c\u0339"+ + "\2r\3\6\5\7\7\b\t\t\13\n\r\13\17\f\21\r\23\16\25\17\27\20\31\21\33\22"+ + "\35\23\37\24!\25#\26%\27\'\30)\31+\32-\33/\34\61\35\63\36\65\37\67 9!"+ + ";\"=#?$A%C&E\'G(I)K*M+O,Q-S.U/W\60Y\61[\62]\63_\64a\65c\66e\67g8i9k:m"+ + ";ou?w@yA{B}C\177D\u0081E\u0083F\u0085G\u0087H\u0089I\u008bJ\u008d"+ + "K\u008fL\u0091M\u0093N\u0095O\u0097P\u0099Q\u009bR\u009dS\u009fT\u00a1"+ + "U\u00a3V\u00a5W\u00a7X\u00a9Y\u00abZ\u00ad[\u00af\\\u00b1]\u00b3^\u00b5"+ + "_\u00b7`\u00b9a\u00bbb\u00bdc\u00bfd\u00c1e\u00c3f\u00c5\2\u00c7\2\u00c9"+ + "\2\u00cb\2\u00cd\2\u00cf\2\u00d1\2\u00d3\2\u00d5\2\u00d7\2\u00d9\2\u00db"+ + "\2\u00dd\2\u00df\2\u00e1\2\3\2\33\4\2WWww\4\2HHhh\4\2TTtt\4\2DDdd\3\2"+ + "\63;\3\2\62;\4\2QQqq\3\2\629\4\2ZZzz\5\2\62;CHch\3\2\62\63\4\2LLll\4\2"+ + "\13\13\"\"\4\2\f\f\16\17\6\2\f\f\17\17))^^\6\2\f\f\17\17$$^^\3\2^^\4\2"+ + "GGgg\4\2--//\7\2\2\13\r\16\20(*]_\u0081\7\2\2\13\r\16\20#%]_\u0081\4\2"+ + "\2]_\u0081\3\2\2\u0081\u0096\2\62;\u0302\u0371\u0485\u0488\u0593\u05bb"+ + "\u05bd\u05bf\u05c1\u05c1\u05c3\u05c4\u05c6\u05c7\u05c9\u05c9\u0612\u0617"+ + "\u064d\u0660\u0662\u066b\u0672\u0672\u06d8\u06de\u06e1\u06e6\u06e9\u06ea"+ + "\u06ec\u06ef\u06f2\u06fb\u0713\u0713\u0732\u074c\u07a8\u07b2\u0903\u0905"+ + "\u093e\u093e\u0940\u094f\u0953\u0956\u0964\u0965\u0968\u0971\u0983\u0985"+ + "\u09be\u09be\u09c0\u09c6\u09c9\u09ca\u09cd\u09cf\u09d9\u09d9\u09e4\u09e5"+ + "\u09e8\u09f1\u0a03\u0a05\u0a3e\u0a3e\u0a40\u0a44\u0a49\u0a4a\u0a4d\u0a4f"+ + "\u0a68\u0a73\u0a83\u0a85\u0abe\u0abe\u0ac0\u0ac7\u0ac9\u0acb\u0acd\u0acf"+ + "\u0ae4\u0ae5\u0ae8\u0af1\u0b03\u0b05\u0b3e\u0b3e\u0b40\u0b45\u0b49\u0b4a"+ + "\u0b4d\u0b4f\u0b58\u0b59\u0b68\u0b71\u0b84\u0b84\u0bc0\u0bc4\u0bc8\u0bca"+ + "\u0bcc\u0bcf\u0bd9\u0bd9\u0be8\u0bf1\u0c03\u0c05\u0c40\u0c46\u0c48\u0c4a"+ + "\u0c4c\u0c4f\u0c57\u0c58\u0c68\u0c71\u0c84\u0c85\u0cbe\u0cbe\u0cc0\u0cc6"+ + "\u0cc8\u0cca\u0ccc\u0ccf\u0cd7\u0cd8\u0ce8\u0cf1\u0d04\u0d05\u0d40\u0d45"+ + "\u0d48\u0d4a\u0d4c\u0d4f\u0d59\u0d59\u0d68\u0d71\u0d84\u0d85\u0dcc\u0dcc"+ + "\u0dd1\u0dd6\u0dd8\u0dd8\u0dda\u0de1\u0df4\u0df5\u0e33\u0e33\u0e36\u0e3c"+ + "\u0e49\u0e50\u0e52\u0e5b\u0eb3\u0eb3\u0eb6\u0ebb\u0ebd\u0ebe\u0eca\u0ecf"+ + "\u0ed2\u0edb\u0f1a\u0f1b\u0f22\u0f2b\u0f37\u0f37\u0f39\u0f39\u0f3b\u0f3b"+ + "\u0f40\u0f41\u0f73\u0f86\u0f88\u0f89\u0f92\u0f99\u0f9b\u0fbe\u0fc8\u0fc8"+ + "\u102e\u1034\u1038\u103b\u1042\u104b\u1058\u105b\u1361\u1361\u136b\u1373"+ + "\u1714\u1716\u1734\u1736\u1754\u1755\u1774\u1775\u17b8\u17d5\u17df\u17df"+ + "\u17e2\u17eb\u180d\u180f\u1812\u181b\u18ab\u18ab\u1922\u192d\u1932\u193d"+ + "\u1948\u1951\u19b2\u19c2\u19ca\u19cb\u19d2\u19db\u1a19\u1a1d\u1dc2\u1dc5"+ + "\u2041\u2042\u2056\u2056\u20d2\u20de\u20e3\u20e3\u20e7\u20ed\u302c\u3031"+ + "\u309b\u309c\ua804\ua804\ua808\ua808\ua80d\ua80d\ua825\ua829\ufb20\ufb20"+ + "\ufe02\ufe11\ufe22\ufe25\ufe35\ufe36\ufe4f\ufe51\uff12\uff1b\uff41\uff41"+ + "\u0129\2C\\aac|\u00ac\u00ac\u00b7\u00b7\u00bc\u00bc\u00c2\u00d8\u00da"+ + "\u00f8\u00fa\u0243\u0252\u02c3\u02c8\u02d3\u02e2\u02e6\u02f0\u02f0\u037c"+ + "\u037c\u0388\u0388\u038a\u038c\u038e\u038e\u0390\u03a3\u03a5\u03d0\u03d2"+ + "\u03f7\u03f9\u0483\u048c\u04d0\u04d2\u04fb\u0502\u0511\u0533\u0558\u055b"+ + "\u055b\u0563\u0589\u05d2\u05ec\u05f2\u05f4\u0623\u063c\u0642\u064c\u0670"+ + "\u0671\u0673\u06d5\u06d7\u06d7\u06e7\u06e8\u06f0\u06f1\u06fc\u06fe\u0701"+ + "\u0701\u0712\u0712\u0714\u0731\u074f\u076f\u0782\u07a7\u07b3\u07b3\u0906"+ + "\u093b\u093f\u093f\u0952\u0952\u095a\u0963\u097f\u097f\u0987\u098e\u0991"+ + "\u0992\u0995\u09aa\u09ac\u09b2\u09b4\u09b4\u09b8\u09bb\u09bf\u09bf\u09d0"+ + "\u09d0\u09de\u09df\u09e1\u09e3\u09f2\u09f3\u0a07\u0a0c\u0a11\u0a12\u0a15"+ + "\u0a2a\u0a2c\u0a32\u0a34\u0a35\u0a37\u0a38\u0a3a\u0a3b\u0a5b\u0a5e\u0a60"+ + "\u0a60\u0a74\u0a76\u0a87\u0a8f\u0a91\u0a93\u0a95\u0aaa\u0aac\u0ab2\u0ab4"+ + "\u0ab5\u0ab7\u0abb\u0abf\u0abf\u0ad2\u0ad2\u0ae2\u0ae3\u0b07\u0b0e\u0b11"+ + "\u0b12\u0b15\u0b2a\u0b2c\u0b32\u0b34\u0b35\u0b37\u0b3b\u0b3f\u0b3f\u0b5e"+ + "\u0b5f\u0b61\u0b63\u0b73\u0b73\u0b85\u0b85\u0b87\u0b8c\u0b90\u0b92\u0b94"+ + "\u0b97\u0b9b\u0b9c\u0b9e\u0b9e\u0ba0\u0ba1\u0ba5\u0ba6\u0baa\u0bac\u0bb0"+ + "\u0bbb\u0c07\u0c0e\u0c10\u0c12\u0c14\u0c2a\u0c2c\u0c35\u0c37\u0c3b\u0c62"+ + "\u0c63\u0c87\u0c8e\u0c90\u0c92\u0c94\u0caa\u0cac\u0cb5\u0cb7\u0cbb\u0cbf"+ + "\u0cbf\u0ce0\u0ce0\u0ce2\u0ce3\u0d07\u0d0e\u0d10\u0d12\u0d14\u0d2a\u0d2c"+ + "\u0d3b\u0d62\u0d63\u0d87\u0d98\u0d9c\u0db3\u0db5\u0dbd\u0dbf\u0dbf\u0dc2"+ + "\u0dc8\u0e03\u0e32\u0e34\u0e35\u0e42\u0e48\u0e83\u0e84\u0e86\u0e86\u0e89"+ + "\u0e8a\u0e8c\u0e8c\u0e8f\u0e8f\u0e96\u0e99\u0e9b\u0ea1\u0ea3\u0ea5\u0ea7"+ + "\u0ea7\u0ea9\u0ea9\u0eac\u0ead\u0eaf\u0eb2\u0eb4\u0eb5\u0ebf\u0ebf\u0ec2"+ + "\u0ec6\u0ec8\u0ec8\u0ede\u0edf\u0f02\u0f02\u0f42\u0f49\u0f4b\u0f6c\u0f8a"+ + "\u0f8d\u1002\u1023\u1025\u1029\u102b\u102c\u1052\u1057\u10a2\u10c7\u10d2"+ + "\u10fc\u10fe\u10fe\u1102\u115b\u1161\u11a4\u11aa\u11fb\u1202\u124a\u124c"+ + "\u124f\u1252\u1258\u125a\u125a\u125c\u125f\u1262\u128a\u128c\u128f\u1292"+ + "\u12b2\u12b4\u12b7\u12ba\u12c0\u12c2\u12c2\u12c4\u12c7\u12ca\u12d8\u12da"+ + "\u1312\u1314\u1317\u131a\u135c\u1382\u1391\u13a2\u13f6\u1403\u166e\u1671"+ + "\u1678\u1683\u169c\u16a2\u16ec\u16f0\u16f2\u1702\u170e\u1710\u1713\u1722"+ + "\u1733\u1742\u1753\u1762\u176e\u1770\u1772\u1782\u17b5\u17d9\u17d9\u17de"+ + "\u17de\u1822\u1879\u1882\u18aa\u1902\u191e\u1952\u196f\u1972\u1976\u1982"+ + "\u19ab\u19c3\u19c9\u1a02\u1a18\u1d02\u1dc1\u1e02\u1e9d\u1ea2\u1efb\u1f02"+ + "\u1f17\u1f1a\u1f1f\u1f22\u1f47\u1f4a\u1f4f\u1f52\u1f59\u1f5b\u1f5b\u1f5d"+ + "\u1f5d\u1f5f\u1f5f\u1f61\u1f7f\u1f82\u1fb6\u1fb8\u1fbe\u1fc0\u1fc0\u1fc4"+ + "\u1fc6\u1fc8\u1fce\u1fd2\u1fd5\u1fd8\u1fdd\u1fe2\u1fee\u1ff4\u1ff6\u1ff8"+ + "\u1ffe\u2073\u2073\u2081\u2081\u2092\u2096\u2104\u2104\u2109\u2109\u210c"+ + "\u2115\u2117\u2117\u211a\u211f\u2126\u2126\u2128\u2128\u212a\u212a\u212c"+ + "\u2133\u2135\u213b\u213e\u2141\u2147\u214b\u2162\u2185\u2c02\u2c30\u2c32"+ + "\u2c60\u2c82\u2ce6\u2d02\u2d27\u2d32\u2d67\u2d71\u2d71\u2d82\u2d98\u2da2"+ + "\u2da8\u2daa\u2db0\u2db2\u2db8\u2dba\u2dc0\u2dc2\u2dc8\u2dca\u2dd0\u2dd2"+ + "\u2dd8\u2dda\u2de0\u3007\u3009\u3023\u302b\u3033\u3037\u303a\u303e\u3043"+ + "\u3098\u309d\u30a1\u30a3\u30fc\u30fe\u3101\u3107\u312e\u3133\u3190\u31a2"+ + "\u31b9\u31f2\u3201\u3402\u4db7\u4e02\u9fbd\ua002\ua48e\ua802\ua803\ua805"+ + "\ua807\ua809\ua80c\ua80e\ua824\uac02\ud7a5\uf902\ufa2f\ufa32\ufa6c\ufa72"+ + "\ufadb\ufb02\ufb08\ufb15\ufb19\ufb1f\ufb1f\ufb21\ufb2a\ufb2c\ufb38\ufb3a"+ + "\ufb3e\ufb40\ufb40\ufb42\ufb43\ufb45\ufb46\ufb48\ufbb3\ufbd5\ufd3f\ufd52"+ + "\ufd91\ufd94\ufdc9\ufdf2\ufdfd\ufe72\ufe76\ufe78\ufefe\uff23\uff3c\uff43"+ + "\uff5c\uff68\uffc0\uffc4\uffc9\uffcc\uffd1\uffd4\uffd9\uffdc\uffde\u037e"+ + "\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2"+ + "\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2"+ + "\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2"+ + "\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2"+ + "\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3"+ + "\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2"+ + "\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2"+ + "U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3"+ + "\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2\2k\3\2\2\2\2m\3\2\2"+ + "\2\2o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\2u\3\2\2\2\2w\3\2\2\2\2y\3\2\2\2\2"+ + "{\3\2\2\2\2}\3\2\2\2\2\177\3\2\2\2\2\u0081\3\2\2\2\2\u0083\3\2\2\2\2\u0085"+ + "\3\2\2\2\2\u0087\3\2\2\2\2\u0089\3\2\2\2\2\u008b\3\2\2\2\2\u008d\3\2\2"+ + "\2\2\u008f\3\2\2\2\2\u0091\3\2\2\2\2\u0093\3\2\2\2\2\u0095\3\2\2\2\2\u0097"+ + "\3\2\2\2\2\u0099\3\2\2\2\2\u009b\3\2\2\2\2\u009d\3\2\2\2\2\u009f\3\2\2"+ + "\2\2\u00a1\3\2\2\2\2\u00a3\3\2\2\2\2\u00a5\3\2\2\2\2\u00a7\3\2\2\2\2\u00a9"+ + "\3\2\2\2\2\u00ab\3\2\2\2\2\u00ad\3\2\2\2\2\u00af\3\2\2\2\2\u00b1\3\2\2"+ + "\2\2\u00b3\3\2\2\2\2\u00b5\3\2\2\2\2\u00b7\3\2\2\2\2\u00b9\3\2\2\2\2\u00bb"+ + "\3\2\2\2\2\u00bd\3\2\2\2\2\u00bf\3\2\2\2\2\u00c1\3\2\2\2\2\u00c3\3\2\2"+ + "\2\3\u00e3\3\2\2\2\5\u00e7\3\2\2\2\7\u00ee\3\2\2\2\t\u00f4\3\2\2\2\13"+ + "\u00f9\3\2\2\2\r\u0100\3\2\2\2\17\u0109\3\2\2\2\21\u010c\3\2\2\2\23\u0113"+ + "\3\2\2\2\25\u011a\3\2\2\2\27\u011d\3\2\2\2\31\u0122\3\2\2\2\33\u0127\3"+ + "\2\2\2\35\u012d\3\2\2\2\37\u0131\3\2\2\2!\u0134\3\2\2\2#\u0138\3\2\2\2"+ + "%\u013d\3\2\2\2\'\u0145\3\2\2\2)\u014a\3\2\2\2+\u0151\3\2\2\2-\u0158\3"+ + "\2\2\2/\u015b\3\2\2\2\61\u015f\3\2\2\2\63\u0163\3\2\2\2\65\u0166\3\2\2"+ + "\2\67\u016c\3\2\2\29\u0172\3\2\2\2;\u0176\3\2\2\2=\u017b\3\2\2\2?\u0184"+ + "\3\2\2\2A\u018a\3\2\2\2C\u0190\3\2\2\2E\u0196\3\2\2\2G\u019c\3\2\2\2I"+ + "\u01a1\3\2\2\2K\u01a6\3\2\2\2M\u01ac\3\2\2\2O\u01ae\3\2\2\2Q\u01b2\3\2"+ + "\2\2S\u01b4\3\2\2\2U\u01b6\3\2\2\2W\u01b8\3\2\2\2Y\u01ba\3\2\2\2[\u01bc"+ + "\3\2\2\2]\u01bf\3\2\2\2_\u01c1\3\2\2\2a\u01c3\3\2\2\2c\u01c5\3\2\2\2e"+ + "\u01c7\3\2\2\2g\u01ca\3\2\2\2i\u01cd\3\2\2\2k\u01cf\3\2\2\2m\u01d1\3\2"+ + "\2\2o\u01d3\3\2\2\2q\u01d5\3\2\2\2s\u01d8\3\2\2\2u\u01da\3\2\2\2w\u01dc"+ + "\3\2\2\2y\u01de\3\2\2\2{\u01e1\3\2\2\2}\u01e4\3\2\2\2\177\u01e7\3\2\2"+ + "\2\u0081\u01ea\3\2\2\2\u0083\u01ed\3\2\2\2\u0085\u01ef\3\2\2\2\u0087\u01f2"+ + "\3\2\2\2\u0089\u01f5\3\2\2\2\u008b\u01f8\3\2\2\2\u008d\u01fb\3\2\2\2\u008f"+ + "\u01fe\3\2\2\2\u0091\u0201\3\2\2\2\u0093\u0204\3\2\2\2\u0095\u0207\3\2"+ + "\2\2\u0097\u020a\3\2\2\2\u0099\u020d\3\2\2\2\u009b\u0211\3\2\2\2\u009d"+ + "\u0215\3\2\2\2\u009f\u0219\3\2\2\2\u00a1\u0238\3\2\2\2\u00a3\u0246\3\2"+ + "\2\2\u00a5\u0248\3\2\2\2\u00a7\u024f\3\2\2\2\u00a9\u0256\3\2\2\2\u00ab"+ + "\u0263\3\2\2\2\u00ad\u0267\3\2\2\2\u00af\u0269\3\2\2\2\u00b1\u026c\3\2"+ + "\2\2\u00b3\u026f\3\2\2\2\u00b5\u0272\3\2\2\2\u00b7\u0275\3\2\2\2\u00b9"+ + "\u0278\3\2\2\2\u00bb\u027b\3\2\2\2\u00bd\u0282\3\2\2\2\u00bf\u028d\3\2"+ + "\2\2\u00c1\u0293\3\2\2\2\u00c3\u029b\3\2\2\2\u00c5\u02be\3\2\2\2\u00c7"+ + "\u02da\3\2\2\2\u00c9\u02e2\3\2\2\2\u00cb\u02e5\3\2\2\2\u00cd\u02fb\3\2"+ + "\2\2\u00cf\u030f\3\2\2\2\u00d1\u0323\3\2\2\2\u00d3\u033f\3\2\2\2\u00d5"+ + "\u0343\3\2\2\2\u00d7\u0346\3\2\2\2\u00d9\u0349\3\2\2\2\u00db\u034c\3\2"+ + "\2\2\u00dd\u034e\3\2\2\2\u00df\u0353\3\2\2\2\u00e1\u0356\3\2\2\2\u00e3"+ + "\u00e4\7f\2\2\u00e4\u00e5\7g\2\2\u00e5\u00e6\7h\2\2\u00e6\4\3\2\2\2\u00e7"+ + "\u00e8\7t\2\2\u00e8\u00e9\7g\2\2\u00e9\u00ea\7v\2\2\u00ea\u00eb\7w\2\2"+ + "\u00eb\u00ec\7t\2\2\u00ec\u00ed\7p\2\2\u00ed\6\3\2\2\2\u00ee\u00ef\7t"+ + "\2\2\u00ef\u00f0\7c\2\2\u00f0\u00f1\7k\2\2\u00f1\u00f2\7u\2\2\u00f2\u00f3"+ + "\7g\2\2\u00f3\b\3\2\2\2\u00f4\u00f5\7h\2\2\u00f5\u00f6\7t\2\2\u00f6\u00f7"+ + "\7q\2\2\u00f7\u00f8\7o\2\2\u00f8\n\3\2\2\2\u00f9\u00fa\7k\2\2\u00fa\u00fb"+ + "\7o\2\2\u00fb\u00fc\7r\2\2\u00fc\u00fd\7q\2\2\u00fd\u00fe\7t\2\2\u00fe"+ + "\u00ff\7v\2\2\u00ff\f\3\2\2\2\u0100\u0101\7p\2\2\u0101\u0102\7q\2\2\u0102"+ + "\u0103\7p\2\2\u0103\u0104\7n\2\2\u0104\u0105\7q\2\2\u0105\u0106\7e\2\2"+ + "\u0106\u0107\7c\2\2\u0107\u0108\7n\2\2\u0108\16\3\2\2\2\u0109\u010a\7"+ + "c\2\2\u010a\u010b\7u\2\2\u010b\20\3\2\2\2\u010c\u010d\7i\2\2\u010d\u010e"+ + "\7n\2\2\u010e\u010f\7q\2\2\u010f\u0110\7d\2\2\u0110\u0111\7c\2\2\u0111"+ + "\u0112\7n\2\2\u0112\22\3\2\2\2\u0113\u0114\7c\2\2\u0114\u0115\7u\2\2\u0115"+ + "\u0116\7u\2\2\u0116\u0117\7g\2\2\u0117\u0118\7t\2\2\u0118\u0119\7v\2\2"+ + "\u0119\24\3\2\2\2\u011a\u011b\7k\2\2\u011b\u011c\7h\2\2\u011c\26\3\2\2"+ + "\2\u011d\u011e\7g\2\2\u011e\u011f\7n\2\2\u011f\u0120\7k\2\2\u0120\u0121"+ + "\7h\2\2\u0121\30\3\2\2\2\u0122\u0123\7g\2\2\u0123\u0124\7n\2\2\u0124\u0125"+ + "\7u\2\2\u0125\u0126\7g\2\2\u0126\32\3\2\2\2\u0127\u0128\7y\2\2\u0128\u0129"+ + "\7j\2\2\u0129\u012a\7k\2\2\u012a\u012b\7n\2\2\u012b\u012c\7g\2\2\u012c"+ + "\34\3\2\2\2\u012d\u012e\7h\2\2\u012e\u012f\7q\2\2\u012f\u0130\7t\2\2\u0130"+ + "\36\3\2\2\2\u0131\u0132\7k\2\2\u0132\u0133\7p\2\2\u0133 \3\2\2\2\u0134"+ + "\u0135\7v\2\2\u0135\u0136\7t\2\2\u0136\u0137\7{\2\2\u0137\"\3\2\2\2\u0138"+ + "\u0139\7P\2\2\u0139\u013a\7q\2\2\u013a\u013b\7p\2\2\u013b\u013c\7g\2\2"+ + "\u013c$\3\2\2\2\u013d\u013e\7h\2\2\u013e\u013f\7k\2\2\u013f\u0140\7p\2"+ + "\2\u0140\u0141\7c\2\2\u0141\u0142\7n\2\2\u0142\u0143\7n\2\2\u0143\u0144"+ + "\7{\2\2\u0144&\3\2\2\2\u0145\u0146\7y\2\2\u0146\u0147\7k\2\2\u0147\u0148"+ + "\7v\2\2\u0148\u0149\7j\2\2\u0149(\3\2\2\2\u014a\u014b\7g\2\2\u014b\u014c"+ + "\7z\2\2\u014c\u014d\7e\2\2\u014d\u014e\7g\2\2\u014e\u014f\7r\2\2\u014f"+ + "\u0150\7v\2\2\u0150*\3\2\2\2\u0151\u0152\7n\2\2\u0152\u0153\7c\2\2\u0153"+ + "\u0154\7o\2\2\u0154\u0155\7d\2\2\u0155\u0156\7f\2\2\u0156\u0157\7c\2\2"+ + "\u0157,\3\2\2\2\u0158\u0159\7q\2\2\u0159\u015a\7t\2\2\u015a.\3\2\2\2\u015b"+ + "\u015c\7c\2\2\u015c\u015d\7p\2\2\u015d\u015e\7f\2\2\u015e\60\3\2\2\2\u015f"+ + "\u0160\7p\2\2\u0160\u0161\7q\2\2\u0161\u0162\7v\2\2\u0162\62\3\2\2\2\u0163"+ + "\u0164\7k\2\2\u0164\u0165\7u\2\2\u0165\64\3\2\2\2\u0166\u0167\7e\2\2\u0167"+ + "\u0168\7n\2\2\u0168\u0169\7c\2\2\u0169\u016a\7u\2\2\u016a\u016b\7u\2\2"+ + "\u016b\66\3\2\2\2\u016c\u016d\7{\2\2\u016d\u016e\7k\2\2\u016e\u016f\7"+ + "g\2\2\u016f\u0170\7n\2\2\u0170\u0171\7f\2\2\u01718\3\2\2\2\u0172\u0173"+ + "\7f\2\2\u0173\u0174\7g\2\2\u0174\u0175\7n\2\2\u0175:\3\2\2\2\u0176\u0177"+ + "\7r\2\2\u0177\u0178\7c\2\2\u0178\u0179\7u\2\2\u0179\u017a\7u\2\2\u017a"+ + "<\3\2\2\2\u017b\u017c\7e\2\2\u017c\u017d\7q\2\2\u017d\u017e\7p\2\2\u017e"+ + "\u017f\7v\2\2\u017f\u0180\7k\2\2\u0180\u0181\7p\2\2\u0181\u0182\7w\2\2"+ + "\u0182\u0183\7g\2\2\u0183>\3\2\2\2\u0184\u0185\7d\2\2\u0185\u0186\7t\2"+ + "\2\u0186\u0187\7g\2\2\u0187\u0188\7c\2\2\u0188\u0189\7m\2\2\u0189@\3\2"+ + "\2\2\u018a\u018b\7c\2\2\u018b\u018c\7u\2\2\u018c\u018d\7{\2\2\u018d\u018e"+ + "\7p\2\2\u018e\u018f\7e\2\2\u018fB\3\2\2\2\u0190\u0191\7c\2\2\u0191\u0192"+ + "\7y\2\2\u0192\u0193\7c\2\2\u0193\u0194\7k\2\2\u0194\u0195\7v\2\2\u0195"+ + "D\3\2\2\2\u0196\u0197\7r\2\2\u0197\u0198\7t\2\2\u0198\u0199\7k\2\2\u0199"+ + "\u019a\7p\2\2\u019a\u019b\7v\2\2\u019bF\3\2\2\2\u019c\u019d\7g\2\2\u019d"+ + "\u019e\7z\2\2\u019e\u019f\7g\2\2\u019f\u01a0\7e\2\2\u01a0H\3\2\2\2\u01a1"+ + "\u01a2\7V\2\2\u01a2\u01a3\7t\2\2\u01a3\u01a4\7w\2\2\u01a4\u01a5\7g\2\2"+ + "\u01a5J\3\2\2\2\u01a6\u01a7\7H\2\2\u01a7\u01a8\7c\2\2\u01a8\u01a9\7n\2"+ + "\2\u01a9\u01aa\7u\2\2\u01aa\u01ab\7g\2\2\u01abL\3\2\2\2\u01ac\u01ad\7"+ + "\60\2\2\u01adN\3\2\2\2\u01ae\u01af\7\60\2\2\u01af\u01b0\7\60\2\2\u01b0"+ + "\u01b1\7\60\2\2\u01b1P\3\2\2\2\u01b2\u01b3\7b\2\2\u01b3R\3\2\2\2\u01b4"+ + "\u01b5\7,\2\2\u01b5T\3\2\2\2\u01b6\u01b7\7.\2\2\u01b7V\3\2\2\2\u01b8\u01b9"+ + "\7<\2\2\u01b9X\3\2\2\2\u01ba\u01bb\7=\2\2\u01bbZ\3\2\2\2\u01bc\u01bd\7"+ + ",\2\2\u01bd\u01be\7,\2\2\u01be\\\3\2\2\2\u01bf\u01c0\7?\2\2\u01c0^\3\2"+ + "\2\2\u01c1\u01c2\7~\2\2\u01c2`\3\2\2\2\u01c3\u01c4\7`\2\2\u01c4b\3\2\2"+ + "\2\u01c5\u01c6\7(\2\2\u01c6d\3\2\2\2\u01c7\u01c8\7>\2\2\u01c8\u01c9\7"+ + ">\2\2\u01c9f\3\2\2\2\u01ca\u01cb\7@\2\2\u01cb\u01cc\7@\2\2\u01cch\3\2"+ + "\2\2\u01cd\u01ce\7-\2\2\u01cej\3\2\2\2\u01cf\u01d0\7/\2\2\u01d0l\3\2\2"+ + "\2\u01d1\u01d2\7\61\2\2\u01d2n\3\2\2\2\u01d3\u01d4\7\'\2\2\u01d4p\3\2"+ + "\2\2\u01d5\u01d6\7\61\2\2\u01d6\u01d7\7\61\2\2\u01d7r\3\2\2\2\u01d8\u01d9"+ + "\7\u0080\2\2\u01d9t\3\2\2\2\u01da\u01db\7>\2\2\u01dbv\3\2\2\2\u01dc\u01dd"+ + "\7@\2\2\u01ddx\3\2\2\2\u01de\u01df\7?\2\2\u01df\u01e0\7?\2\2\u01e0z\3"+ + "\2\2\2\u01e1\u01e2\7@\2\2\u01e2\u01e3\7?\2\2\u01e3|\3\2\2\2\u01e4\u01e5"+ + "\7>\2\2\u01e5\u01e6\7?\2\2\u01e6~\3\2\2\2\u01e7\u01e8\7>\2\2\u01e8\u01e9"+ + "\7@\2\2\u01e9\u0080\3\2\2\2\u01ea\u01eb\7#\2\2\u01eb\u01ec\7?\2\2\u01ec"+ + "\u0082\3\2\2\2\u01ed\u01ee\7B\2\2\u01ee\u0084\3\2\2\2\u01ef\u01f0\7/\2"+ + "\2\u01f0\u01f1\7@\2\2\u01f1\u0086\3\2\2\2\u01f2\u01f3\7-\2\2\u01f3\u01f4"+ + "\7?\2\2\u01f4\u0088\3\2\2\2\u01f5\u01f6\7/\2\2\u01f6\u01f7\7?\2\2\u01f7"+ + "\u008a\3\2\2\2\u01f8\u01f9\7,\2\2\u01f9\u01fa\7?\2\2\u01fa\u008c\3\2\2"+ + "\2\u01fb\u01fc\7B\2\2\u01fc\u01fd\7?\2\2\u01fd\u008e\3\2\2\2\u01fe\u01ff"+ + "\7\61\2\2\u01ff\u0200\7?\2\2\u0200\u0090\3\2\2\2\u0201\u0202\7\'\2\2\u0202"+ + "\u0203\7?\2\2\u0203\u0092\3\2\2\2\u0204\u0205\7(\2\2\u0205\u0206\7?\2"+ + "\2\u0206\u0094\3\2\2\2\u0207\u0208\7~\2\2\u0208\u0209\7?\2\2\u0209\u0096"+ + "\3\2\2\2\u020a\u020b\7`\2\2\u020b\u020c\7?\2\2\u020c\u0098\3\2\2\2\u020d"+ + "\u020e\7>\2\2\u020e\u020f\7>\2\2\u020f\u0210\7?\2\2\u0210\u009a\3\2\2"+ + "\2\u0211\u0212\7@\2\2\u0212\u0213\7@\2\2\u0213\u0214\7?\2\2\u0214\u009c"+ + "\3\2\2\2\u0215\u0216\7,\2\2\u0216\u0217\7,\2\2\u0217\u0218\7?\2\2\u0218"+ + "\u009e\3\2\2\2\u0219\u021a\7\61\2\2\u021a\u021b\7\61\2\2\u021b\u021c\7"+ + "?\2\2\u021c\u00a0\3\2\2\2\u021d\u0227\t\2\2\2\u021e\u0220\t\3\2\2\u021f"+ + "\u0221\t\4\2\2\u0220\u021f\3\2\2\2\u0220\u0221\3\2\2\2\u0221\u0227\3\2"+ + "\2\2\u0222\u0224\t\4\2\2\u0223\u0225\t\3\2\2\u0224\u0223\3\2\2\2\u0224"+ + "\u0225\3\2\2\2\u0225\u0227\3\2\2\2\u0226\u021d\3\2\2\2\u0226\u021e\3\2"+ + "\2\2\u0226\u0222\3\2\2\2\u0226\u0227\3\2\2\2\u0227\u022a\3\2\2\2\u0228"+ + "\u022b\5\u00c5c\2\u0229\u022b\5\u00c7d\2\u022a\u0228\3\2\2\2\u022a\u0229"+ + "\3\2\2\2\u022b\u0239\3\2\2\2\u022c\u022e\t\5\2\2\u022d\u022f\t\4\2\2\u022e"+ + "\u022d\3\2\2\2\u022e\u022f\3\2\2\2\u022f\u0233\3\2\2\2\u0230\u0231\t\4"+ + "\2\2\u0231\u0233\t\5\2\2\u0232\u022c\3\2\2\2\u0232\u0230\3\2\2\2\u0233"+ + "\u0236\3\2\2\2\u0234\u0237\5\u00d1i\2\u0235\u0237\5\u00d3j\2\u0236\u0234"+ + "\3\2\2\2\u0236\u0235\3\2\2\2\u0237\u0239\3\2\2\2\u0238\u0226\3\2\2\2\u0238"+ + "\u0232\3\2\2\2\u0239\u00a2\3\2\2\2\u023a\u023e\t\6\2\2\u023b\u023d\t\7"+ + "\2\2\u023c\u023b\3\2\2\2\u023d\u0240\3\2\2\2\u023e\u023c\3\2\2\2\u023e"+ + "\u023f\3\2\2\2\u023f\u0247\3\2\2\2\u0240\u023e\3\2\2\2\u0241\u0243\7\62"+ + "\2\2\u0242\u0241\3\2\2\2\u0243\u0244\3\2\2\2\u0244\u0242\3\2\2\2\u0244"+ + "\u0245\3\2\2\2\u0245\u0247\3\2\2\2\u0246\u023a\3\2\2\2\u0246\u0242\3\2"+ + "\2\2\u0247\u00a4\3\2\2\2\u0248\u0249\7\62\2\2\u0249\u024b\t\b\2\2\u024a"+ + "\u024c\t\t\2\2\u024b\u024a\3\2\2\2\u024c\u024d\3\2\2\2\u024d\u024b\3\2"+ + "\2\2\u024d\u024e\3\2\2\2\u024e\u00a6\3\2\2\2\u024f\u0250\7\62\2\2\u0250"+ + "\u0252\t\n\2\2\u0251\u0253\t\13\2\2\u0252\u0251\3\2\2\2\u0253\u0254\3"+ + "\2\2\2\u0254\u0252\3\2\2\2\u0254\u0255\3\2\2\2\u0255\u00a8\3\2\2\2\u0256"+ + "\u0257\7\62\2\2\u0257\u0259\t\5\2\2\u0258\u025a\t\f\2\2\u0259\u0258\3"+ + "\2\2\2\u025a\u025b\3\2\2\2\u025b\u0259\3\2\2\2\u025b\u025c\3\2\2\2\u025c"+ + "\u00aa\3\2\2\2\u025d\u0264\5\u00cdg\2\u025e\u0260\t\7\2\2\u025f\u025e"+ + "\3\2\2\2\u0260\u0261\3\2\2\2\u0261\u025f\3\2\2\2\u0261\u0262\3\2\2\2\u0262"+ + "\u0264\3\2\2\2\u0263\u025d\3\2\2\2\u0263\u025f\3\2\2\2\u0264\u0265\3\2"+ + "\2\2\u0265\u0266\t\r\2\2\u0266\u00ac\3\2\2\2\u0267\u0268\5\u00cdg\2\u0268"+ + "\u00ae\3\2\2\2\u0269\u026a\7*\2\2\u026a\u026b\bX\2\2\u026b\u00b0\3\2\2"+ + "\2\u026c\u026d\7+\2\2\u026d\u026e\bY\3\2\u026e\u00b2\3\2\2\2\u026f\u0270"+ + "\7}\2\2\u0270\u0271\bZ\4\2\u0271\u00b4\3\2\2\2\u0272\u0273\7\177\2\2\u0273"+ + "\u0274\b[\5\2\u0274\u00b6\3\2\2\2\u0275\u0276\7]\2\2\u0276\u0277\b\\\6"+ + "\2\u0277\u00b8\3\2\2\2\u0278\u0279\7_\2\2\u0279\u027a\b]\7\2\u027a\u00ba"+ + "\3\2\2\2\u027b\u027f\5\u00e1q\2\u027c\u027e\5\u00dfp\2\u027d\u027c\3\2"+ + "\2\2\u027e\u0281\3\2\2\2\u027f\u027d\3\2\2\2\u027f\u0280\3\2\2\2\u0280"+ + "\u00bc\3\2\2\2\u0281\u027f\3\2\2\2\u0282\u0286\7^\2\2\u0283\u0285\t\16"+ + "\2\2\u0284\u0283\3\2\2\2\u0285\u0288\3\2\2\2\u0286\u0284\3\2\2\2\u0286"+ + "\u0287\3\2\2\2\u0287\u0289\3\2\2\2\u0288\u0286\3\2\2\2\u0289\u028a\5\u00cb"+ + "f\2\u028a\u028b\3\2\2\2\u028b\u028c\b_\b\2\u028c\u00be\3\2\2\2\u028d\u028e"+ + "\5\u00cbf\2\u028e\u028f\b`\t\2\u028f\u0290\3\2\2\2\u0290\u0291\b`\b\2"+ + "\u0291\u00c0\3\2\2\2\u0292\u0294\t\16\2\2\u0293\u0292\3\2\2\2\u0294\u0295"+ + "\3\2\2\2\u0295\u0293\3\2\2\2\u0295\u0296\3\2\2\2\u0296\u0297\3\2\2\2\u0297"+ + "\u0298\ba\n\2\u0298\u0299\3\2\2\2\u0299\u029a\ba\b\2\u029a\u00c2\3\2\2"+ + "\2\u029b\u029f\7%\2\2\u029c\u029e\n\17\2\2\u029d\u029c\3\2\2\2\u029e\u02a1"+ + "\3\2\2\2\u029f\u029d\3\2\2\2\u029f\u02a0\3\2\2\2\u02a0\u02a2\3\2\2\2\u02a1"+ + "\u029f\3\2\2\2\u02a2\u02a3\bb\b\2\u02a3\u00c4\3\2\2\2\u02a4\u02ad\7)\2"+ + "\2\u02a5\u02a8\7^\2\2\u02a6\u02a9\5\u00cbf\2\u02a7\u02a9\13\2\2\2\u02a8"+ + "\u02a6\3\2\2\2\u02a8\u02a7\3\2\2\2\u02a9\u02ac\3\2\2\2\u02aa\u02ac\n\20"+ + "\2\2\u02ab\u02a5\3\2\2\2\u02ab\u02aa\3\2\2\2\u02ac\u02af\3\2\2\2\u02ad"+ + "\u02ab\3\2\2\2\u02ad\u02ae\3\2\2\2\u02ae\u02b0\3\2\2\2\u02af\u02ad\3\2"+ + "\2\2\u02b0\u02bf\7)\2\2\u02b1\u02ba\7$\2\2\u02b2\u02b5\7^\2\2\u02b3\u02b6"+ + "\5\u00cbf\2\u02b4\u02b6\13\2\2\2\u02b5\u02b3\3\2\2\2\u02b5\u02b4\3\2\2"+ + "\2\u02b6\u02b9\3\2\2\2\u02b7\u02b9\n\21\2\2\u02b8\u02b2\3\2\2\2\u02b8"+ + "\u02b7\3\2\2\2\u02b9\u02bc\3\2\2\2\u02ba\u02b8\3\2\2\2\u02ba\u02bb\3\2"+ + "\2\2\u02bb\u02bd\3\2\2\2\u02bc\u02ba\3\2\2\2\u02bd\u02bf\7$\2\2\u02be"+ + "\u02a4\3\2\2\2\u02be\u02b1\3\2\2\2\u02bf\u00c6\3\2\2\2\u02c0\u02c1\7)"+ + "\2\2\u02c1\u02c2\7)\2\2\u02c2\u02c3\7)\2\2\u02c3\u02c7\3\2\2\2\u02c4\u02c6"+ + "\5\u00c9e\2\u02c5\u02c4\3\2\2\2\u02c6\u02c9\3\2\2\2\u02c7\u02c8\3\2\2"+ + "\2\u02c7\u02c5\3\2\2\2\u02c8\u02ca\3\2\2\2\u02c9\u02c7\3\2\2\2\u02ca\u02cb"+ + "\7)\2\2\u02cb\u02cc\7)\2\2\u02cc\u02db\7)\2\2\u02cd\u02ce\7$\2\2\u02ce"+ + "\u02cf\7$\2\2\u02cf\u02d0\7$\2\2\u02d0\u02d4\3\2\2\2\u02d1\u02d3\5\u00c9"+ + "e\2\u02d2\u02d1\3\2\2\2\u02d3\u02d6\3\2\2\2\u02d4\u02d5\3\2\2\2\u02d4"+ + "\u02d2\3\2\2\2\u02d5\u02d7\3\2\2\2\u02d6\u02d4\3\2\2\2\u02d7\u02d8\7$"+ + "\2\2\u02d8\u02d9\7$\2\2\u02d9\u02db\7$\2\2\u02da\u02c0\3\2\2\2\u02da\u02cd"+ + "\3\2\2\2\u02db\u00c8\3\2\2\2\u02dc\u02e3\n\22\2\2\u02dd\u02e0\7^\2\2\u02de"+ + "\u02e1\5\u00cbf\2\u02df\u02e1\13\2\2\2\u02e0\u02de\3\2\2\2\u02e0\u02df"+ + "\3\2\2\2\u02e1\u02e3\3\2\2\2\u02e2\u02dc\3\2\2\2\u02e2\u02dd\3\2\2\2\u02e3"+ + "\u00ca\3\2\2\2\u02e4\u02e6\7\17\2\2\u02e5\u02e4\3\2\2\2\u02e5\u02e6\3"+ + "\2\2\2\u02e6\u02e7\3\2\2\2\u02e7\u02e8\7\f\2\2\u02e8\u00cc\3\2\2\2\u02e9"+ + "\u02eb\t\7\2\2\u02ea\u02e9\3\2\2\2\u02eb\u02ec\3\2\2\2\u02ec\u02ea\3\2"+ + "\2\2\u02ec\u02ed\3\2\2\2\u02ed\u02f0\3\2\2\2\u02ee\u02f0\5\u00cfh\2\u02ef"+ + "\u02ea\3\2\2\2\u02ef\u02ee\3\2\2\2\u02f0\u02f1\3\2\2\2\u02f1\u02f3\t\23"+ + "\2\2\u02f2\u02f4\t\24\2\2\u02f3\u02f2\3\2\2\2\u02f3\u02f4\3\2\2\2\u02f4"+ + "\u02f6\3\2\2\2\u02f5\u02f7\t\7\2\2\u02f6\u02f5\3\2\2\2\u02f7\u02f8\3\2"+ + "\2\2\u02f8\u02f6\3\2\2\2\u02f8\u02f9\3\2\2\2\u02f9\u02fc\3\2\2\2\u02fa"+ + "\u02fc\5\u00cfh\2\u02fb\u02ef\3\2\2\2\u02fb\u02fa\3\2\2\2\u02fc\u00ce"+ + "\3\2\2\2\u02fd\u02ff\t\7\2\2\u02fe\u02fd\3\2\2\2\u02ff\u0302\3\2\2\2\u0300"+ + "\u02fe\3\2\2\2\u0300\u0301\3\2\2\2\u0301\u0303\3\2\2\2\u0302\u0300\3\2"+ + "\2\2\u0303\u0305\7\60\2\2\u0304\u0306\t\7\2\2\u0305\u0304\3\2\2\2\u0306"+ + "\u0307\3\2\2\2\u0307\u0305\3\2\2\2\u0307\u0308\3\2\2\2\u0308\u0310\3\2"+ + "\2\2\u0309\u030b\t\7\2\2\u030a\u0309\3\2\2\2\u030b\u030c\3\2\2\2\u030c"+ + "\u030a\3\2\2\2\u030c\u030d\3\2\2\2\u030d\u030e\3\2\2\2\u030e\u0310\7\60"+ + "\2\2\u030f\u0300\3\2\2\2\u030f\u030a\3\2\2\2\u0310\u00d0\3\2\2\2\u0311"+ + "\u0316\7)\2\2\u0312\u0315\5\u00d7l\2\u0313\u0315\5\u00ddo\2\u0314\u0312"+ + "\3\2\2\2\u0314\u0313\3\2\2\2\u0315\u0318\3\2\2\2\u0316\u0314\3\2\2\2\u0316"+ + "\u0317\3\2\2\2\u0317\u0319\3\2\2\2\u0318\u0316\3\2\2\2\u0319\u0324\7)"+ + "\2\2\u031a\u031f\7$\2\2\u031b\u031e\5\u00d9m\2\u031c\u031e\5\u00ddo\2"+ + "\u031d\u031b\3\2\2\2\u031d\u031c\3\2\2\2\u031e\u0321\3\2\2\2\u031f\u031d"+ + "\3\2\2\2\u031f\u0320\3\2\2\2\u0320\u0322\3\2\2\2\u0321\u031f\3\2\2\2\u0322"+ + "\u0324\7$\2\2\u0323\u0311\3\2\2\2\u0323\u031a\3\2\2\2\u0324\u00d2\3\2"+ + "\2\2\u0325\u0326\7)\2\2\u0326\u0327\7)\2\2\u0327\u0328\7)\2\2\u0328\u032c"+ + "\3\2\2\2\u0329\u032b\5\u00d5k\2\u032a\u0329\3\2\2\2\u032b\u032e\3\2\2"+ + "\2\u032c\u032d\3\2\2\2\u032c\u032a\3\2\2\2\u032d\u032f\3\2\2\2\u032e\u032c"+ + "\3\2\2\2\u032f\u0330\7)\2\2\u0330\u0331\7)\2\2\u0331\u0340\7)\2\2\u0332"+ + "\u0333\7$\2\2\u0333\u0334\7$\2\2\u0334\u0335\7$\2\2\u0335\u0339\3\2\2"+ + "\2\u0336\u0338\5\u00d5k\2\u0337\u0336\3\2\2\2\u0338\u033b\3\2\2\2\u0339"+ + "\u033a\3\2\2\2\u0339\u0337\3\2\2\2\u033a\u033c\3\2\2\2\u033b\u0339\3\2"+ + "\2\2\u033c\u033d\7$\2\2\u033d\u033e\7$\2\2\u033e\u0340\7$\2\2\u033f\u0325"+ + "\3\2\2\2\u033f\u0332\3\2\2\2\u0340\u00d4\3\2\2\2\u0341\u0344\5\u00dbn"+ + "\2\u0342\u0344\5\u00ddo\2\u0343\u0341\3\2\2\2\u0343\u0342\3\2\2\2\u0344"+ + "\u00d6\3\2\2\2\u0345\u0347\t\25\2\2\u0346\u0345\3\2\2\2\u0347\u00d8\3"+ + "\2\2\2\u0348\u034a\t\26\2\2\u0349\u0348\3\2\2\2\u034a\u00da\3\2\2\2\u034b"+ + "\u034d\t\27\2\2\u034c\u034b\3\2\2\2\u034d\u00dc\3\2\2\2\u034e\u034f\7"+ + "^\2\2\u034f\u0350\t\30\2\2\u0350\u00de\3\2\2\2\u0351\u0354\5\u00e1q\2"+ + "\u0352\u0354\t\31\2\2\u0353\u0351\3\2\2\2\u0353\u0352\3\2\2\2\u0354\u00e0"+ + "\3\2\2\2\u0355\u0357\t\32\2\2\u0356\u0355\3\2\2\2\u0357\u00e2\3\2\2\2"+ + ";\2\u0220\u0224\u0226\u022a\u022e\u0232\u0236\u0238\u023e\u0244\u0246"+ + "\u024d\u0254\u025b\u0261\u0263\u027f\u0286\u0295\u029f\u02a8\u02ab\u02ad"+ + "\u02b5\u02b8\u02ba\u02be\u02c7\u02d4\u02da\u02e0\u02e2\u02e5\u02ec\u02ef"+ + "\u02f3\u02f8\u02fb\u0300\u0307\u030c\u030f\u0314\u0316\u031d\u031f\u0323"+ + "\u032c\u0339\u033f\u0343\u0346\u0349\u034c\u0353\u0356\13\3X\2\3Y\3\3"+ + "Z\4\3[\5\3\\\6\3]\7\2\3\2\3`\b\3a\t"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/src/main/java/grammar/PythonLexer.tokens b/src/main/java/grammar/PythonLexer.tokens new file mode 100644 index 00000000..1282117c --- /dev/null +++ b/src/main/java/grammar/PythonLexer.tokens @@ -0,0 +1,185 @@ +INDENT=1 +DEDENT=2 +LINE_BREAK=3 +DEF=4 +RETURN=5 +RAISE=6 +FROM=7 +IMPORT=8 +NONLOCAL=9 +AS=10 +GLOBAL=11 +ASSERT=12 +IF=13 +ELIF=14 +ELSE=15 +WHILE=16 +FOR=17 +IN=18 +TRY=19 +NONE=20 +FINALLY=21 +WITH=22 +EXCEPT=23 +LAMBDA=24 +OR=25 +AND=26 +NOT=27 +IS=28 +CLASS=29 +YIELD=30 +DEL=31 +PASS=32 +CONTINUE=33 +BREAK=34 +ASYNC=35 +AWAIT=36 +PRINT=37 +EXEC=38 +TRUE=39 +FALSE=40 +DOT=41 +ELLIPSIS=42 +REVERSE_QUOTE=43 +STAR=44 +COMMA=45 +COLON=46 +SEMI_COLON=47 +POWER=48 +ASSIGN=49 +OR_OP=50 +XOR=51 +AND_OP=52 +LEFT_SHIFT=53 +RIGHT_SHIFT=54 +ADD=55 +MINUS=56 +DIV=57 +MOD=58 +IDIV=59 +NOT_OP=60 +LESS_THAN=61 +GREATER_THAN=62 +EQUALS=63 +GT_EQ=64 +LT_EQ=65 +NOT_EQ_1=66 +NOT_EQ_2=67 +AT=68 +ARROW=69 +ADD_ASSIGN=70 +SUB_ASSIGN=71 +MULT_ASSIGN=72 +AT_ASSIGN=73 +DIV_ASSIGN=74 +MOD_ASSIGN=75 +AND_ASSIGN=76 +OR_ASSIGN=77 +XOR_ASSIGN=78 +LEFT_SHIFT_ASSIGN=79 +RIGHT_SHIFT_ASSIGN=80 +POWER_ASSIGN=81 +IDIV_ASSIGN=82 +STRING=83 +DECIMAL_INTEGER=84 +OCT_INTEGER=85 +HEX_INTEGER=86 +BIN_INTEGER=87 +IMAG_NUMBER=88 +FLOAT_NUMBER=89 +OPEN_PAREN=90 +CLOSE_PAREN=91 +OPEN_BRACE=92 +CLOSE_BRACE=93 +OPEN_BRACKET=94 +CLOSE_BRACKET=95 +NAME=96 +LINE_JOIN=97 +NEWLINE=98 +WS=99 +COMMENT=100 +'def'=4 +'return'=5 +'raise'=6 +'from'=7 +'import'=8 +'nonlocal'=9 +'as'=10 +'global'=11 +'assert'=12 +'if'=13 +'elif'=14 +'else'=15 +'while'=16 +'for'=17 +'in'=18 +'try'=19 +'None'=20 +'finally'=21 +'with'=22 +'except'=23 +'lambda'=24 +'or'=25 +'and'=26 +'not'=27 +'is'=28 +'class'=29 +'yield'=30 +'del'=31 +'pass'=32 +'continue'=33 +'break'=34 +'async'=35 +'await'=36 +'print'=37 +'exec'=38 +'True'=39 +'False'=40 +'.'=41 +'...'=42 +'`'=43 +'*'=44 +','=45 +':'=46 +';'=47 +'**'=48 +'='=49 +'|'=50 +'^'=51 +'&'=52 +'<<'=53 +'>>'=54 +'+'=55 +'-'=56 +'/'=57 +'%'=58 +'//'=59 +'~'=60 +'<'=61 +'>'=62 +'=='=63 +'>='=64 +'<='=65 +'<>'=66 +'!='=67 +'@'=68 +'->'=69 +'+='=70 +'-='=71 +'*='=72 +'@='=73 +'/='=74 +'%='=75 +'&='=76 +'|='=77 +'^='=78 +'<<='=79 +'>>='=80 +'**='=81 +'//='=82 +'('=90 +')'=91 +'{'=92 +'}'=93 +'['=94 +']'=95 diff --git a/src/main/java/grammar/PythonLexerBase.java b/src/main/java/grammar/PythonLexerBase.java new file mode 100644 index 00000000..5c25fb6e --- /dev/null +++ b/src/main/java/grammar/PythonLexerBase.java @@ -0,0 +1,185 @@ +package grammar; + +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.CommonToken; +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.Token; + +import java.util.ArrayDeque; +import java.util.Deque; + +public abstract class PythonLexerBase extends Lexer { + public static int TabSize = 8; + + // The amount of opened braces, brackets and parenthesis. + private int _opened; + + // The stack that keeps track of the indentation level. + private final Deque _indents = new ArrayDeque<>(); + + // A circular buffer where extra tokens are pushed on (see the NEWLINE and WS lexer rules). + private int _firstTokensInd; + private int _lastTokenInd; + private Token[] _buffer = new Token[32]; + private Token _lastToken; + + protected PythonLexerBase(CharStream input) { + super(input); + } + + @Override + public void emit(Token token) { + super.setToken(token); + + if (_buffer[_firstTokensInd] != null) + { + _lastTokenInd = IncTokenInd(_lastTokenInd); + + if (_lastTokenInd == _firstTokensInd) + { + // Enlarge buffer + Token[] newArray = new Token[_buffer.length * 2]; + int destInd = newArray.length - (_buffer.length - _firstTokensInd); + + System.arraycopy(_buffer, 0, newArray, 0, _firstTokensInd); + System.arraycopy(_buffer, _firstTokensInd, newArray, destInd, _buffer.length - _firstTokensInd); + + _firstTokensInd = destInd; + _buffer = newArray; + } + } + + _buffer[_lastTokenInd] = token; + _lastToken = token; + } + + @Override + public Token nextToken() { + // Check if the end-of-file is ahead and there are still some DEDENTS expected. + if (_input.LA(1) == EOF && _indents.size() > 0) + { + if (_buffer[_lastTokenInd] == null || _buffer[_lastTokenInd].getType() != PythonLexer.LINE_BREAK) + { + // First emit an extra line break that serves as the end of the statement. + emit(PythonLexer.LINE_BREAK); + } + + // Now emit as much DEDENT tokens as needed. + while (_indents.size() != 0) + { + emit(PythonLexer.DEDENT); + _indents.pop(); + } + } + + Token next = super.nextToken(); + + if (_buffer[_firstTokensInd] == null) + { + return next; + } + + Token result = _buffer[_firstTokensInd]; + _buffer[_firstTokensInd] = null; + + if (_firstTokensInd != _lastTokenInd) + { + _firstTokensInd = IncTokenInd(_firstTokensInd); + } + + return result; + } + + protected void HandleNewLine() { + emit(PythonLexer.NEWLINE, HIDDEN, getText()); + + char next = (char) _input.LA(1); + + // Process whitespaces in HandleSpaces + if (next != ' ' && next != '\t' && IsNotNewLineOrComment(next)) + { + ProcessNewLine(0); + } + } + + protected void HandleSpaces() { + char next = (char) _input.LA(1); + + if ((_lastToken == null || _lastToken.getType() == PythonLexer.NEWLINE) && IsNotNewLineOrComment(next)) + { + // Calculates the indentation of the provided spaces, taking the + // following rules into account: + // + // "Tabs are replaced (from left to right) by one to eight spaces + // such that the total number of characters up to and including + // the replacement is a multiple of eight [...]" + // + // -- https://docs.python.org/3.1/reference/lexical_analysis.html#indentation + + int indent = 0; + String text = getText(); + + for (int i = 0; i < text.length(); i++) { + indent += text.charAt(i) == '\t' ? TabSize - indent % TabSize : 1; + } + + ProcessNewLine(indent); + } + + emit(PythonLexer.WS, HIDDEN, getText()); + } + + protected void IncIndentLevel() { + _opened++; + } + + protected void DecIndentLevel() { + if (_opened > 0) { + --_opened; + } + } + + private boolean IsNotNewLineOrComment(char next) { + return _opened == 0 && next != '\r' && next != '\n' && next != '\f' && next != '#'; + } + + private void ProcessNewLine(int indent) { + emit(PythonLexer.LINE_BREAK); + + int previous = _indents.size() == 0 ? 0 : _indents.peek(); + + if (indent > previous) + { + _indents.push(indent); + emit(PythonLexer.INDENT); + } + else + { + // Possibly emit more than 1 DEDENT token. + while (_indents.size() != 0 && _indents.peek() > indent) + { + emit(PythonLexer.DEDENT); + _indents.pop(); + } + } + } + + private int IncTokenInd(int ind) { + return (ind + 1) % _buffer.length; + } + + private void emit(int tokenType) { + emit(tokenType, DEFAULT_TOKEN_CHANNEL, ""); + } + + private void emit(int tokenType, int channel, String text) { + int charIndex = getCharIndex(); + CommonToken token = new CommonToken(_tokenFactorySourcePair, tokenType, channel, charIndex - text.length(), charIndex - 1); + token.setLine(getLine()); + token.setCharPositionInLine(getCharPositionInLine()); + token.setText(text); + + emit(token); + } +} + diff --git a/src/main/java/grammar/PythonParser.java b/src/main/java/grammar/PythonParser.java new file mode 100644 index 00000000..895e3e59 --- /dev/null +++ b/src/main/java/grammar/PythonParser.java @@ -0,0 +1,6793 @@ +// Generated from PythonParser.g4 by ANTLR 4.5 +package grammar; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.misc.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; +import java.util.Iterator; +import java.util.ArrayList; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class PythonParser extends PythonParserBase { + static { RuntimeMetaData.checkVersion("4.5", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + INDENT=1, DEDENT=2, LINE_BREAK=3, DEF=4, RETURN=5, RAISE=6, FROM=7, IMPORT=8, + NONLOCAL=9, AS=10, GLOBAL=11, ASSERT=12, IF=13, ELIF=14, ELSE=15, WHILE=16, + FOR=17, IN=18, TRY=19, NONE=20, FINALLY=21, WITH=22, EXCEPT=23, LAMBDA=24, + OR=25, AND=26, NOT=27, IS=28, CLASS=29, YIELD=30, DEL=31, PASS=32, CONTINUE=33, + BREAK=34, ASYNC=35, AWAIT=36, PRINT=37, EXEC=38, TRUE=39, FALSE=40, DOT=41, + ELLIPSIS=42, REVERSE_QUOTE=43, STAR=44, COMMA=45, COLON=46, SEMI_COLON=47, + POWER=48, ASSIGN=49, OR_OP=50, XOR=51, AND_OP=52, LEFT_SHIFT=53, RIGHT_SHIFT=54, + ADD=55, MINUS=56, DIV=57, MOD=58, IDIV=59, NOT_OP=60, LESS_THAN=61, GREATER_THAN=62, + EQUALS=63, GT_EQ=64, LT_EQ=65, NOT_EQ_1=66, NOT_EQ_2=67, AT=68, ARROW=69, + ADD_ASSIGN=70, SUB_ASSIGN=71, MULT_ASSIGN=72, AT_ASSIGN=73, DIV_ASSIGN=74, + MOD_ASSIGN=75, AND_ASSIGN=76, OR_ASSIGN=77, XOR_ASSIGN=78, LEFT_SHIFT_ASSIGN=79, + RIGHT_SHIFT_ASSIGN=80, POWER_ASSIGN=81, IDIV_ASSIGN=82, STRING=83, DECIMAL_INTEGER=84, + OCT_INTEGER=85, HEX_INTEGER=86, BIN_INTEGER=87, IMAG_NUMBER=88, FLOAT_NUMBER=89, + OPEN_PAREN=90, CLOSE_PAREN=91, OPEN_BRACE=92, CLOSE_BRACE=93, OPEN_BRACKET=94, + CLOSE_BRACKET=95, NAME=96, LINE_JOIN=97, NEWLINE=98, WS=99, COMMENT=100; + public static final int + RULE_root = 0, RULE_single_input = 1, RULE_file_input = 2, RULE_eval_input = 3, + RULE_stmt = 4, RULE_compound_stmt = 5, RULE_suite = 6, RULE_decorator = 7, + RULE_elif_clause = 8, RULE_else_clause = 9, RULE_finally_clause = 10, + RULE_with_item = 11, RULE_except_clause = 12, RULE_classdef = 13, RULE_funcdef = 14, + RULE_typedargslist = 15, RULE_args = 16, RULE_kwargs = 17, RULE_def_parameters = 18, + RULE_def_parameter = 19, RULE_named_parameter = 20, RULE_simple_stmt = 21, + RULE_small_stmt = 22, RULE_testlist_star_expr = 23, RULE_star_expr = 24, + RULE_assign_part = 25, RULE_exprlist = 26, RULE_import_as_names = 27, + RULE_import_as_name = 28, RULE_dotted_as_names = 29, RULE_dotted_as_name = 30, + RULE_test = 31, RULE_varargslist = 32, RULE_vardef_parameters = 33, RULE_vardef_parameter = 34, + RULE_varargs = 35, RULE_varkwargs = 36, RULE_logical_test = 37, RULE_comparison = 38, + RULE_expr = 39, RULE_atom = 40, RULE_dictorsetmaker = 41, RULE_testlist_comp = 42, + RULE_testlist = 43, RULE_dotted_name = 44, RULE_name = 45, RULE_number = 46, + RULE_integer = 47, RULE_yield_expr = 48, RULE_yield_arg = 49, RULE_trailer = 50, + RULE_arguments = 51, RULE_arglist = 52, RULE_argument = 53, RULE_subscriptlist = 54, + RULE_subscript = 55, RULE_sliceop = 56, RULE_comp_for = 57, RULE_comp_iter = 58; + public static final String[] ruleNames = { + "root", "single_input", "file_input", "eval_input", "stmt", "compound_stmt", + "suite", "decorator", "elif_clause", "else_clause", "finally_clause", + "with_item", "except_clause", "classdef", "funcdef", "typedargslist", + "args", "kwargs", "def_parameters", "def_parameter", "named_parameter", + "simple_stmt", "small_stmt", "testlist_star_expr", "star_expr", "assign_part", + "exprlist", "import_as_names", "import_as_name", "dotted_as_names", "dotted_as_name", + "test", "varargslist", "vardef_parameters", "vardef_parameter", "varargs", + "varkwargs", "logical_test", "comparison", "expr", "atom", "dictorsetmaker", + "testlist_comp", "testlist", "dotted_name", "name", "number", "integer", + "yield_expr", "yield_arg", "trailer", "arguments", "arglist", "argument", + "subscriptlist", "subscript", "sliceop", "comp_for", "comp_iter" + }; + + private static final String[] _LITERAL_NAMES = { + null, null, null, null, "'def'", "'return'", "'raise'", "'from'", "'import'", + "'nonlocal'", "'as'", "'global'", "'assert'", "'if'", "'elif'", "'else'", + "'while'", "'for'", "'in'", "'try'", "'None'", "'finally'", "'with'", + "'except'", "'lambda'", "'or'", "'and'", "'not'", "'is'", "'class'", "'yield'", + "'del'", "'pass'", "'continue'", "'break'", "'async'", "'await'", "'print'", + "'exec'", "'True'", "'False'", "'.'", "'...'", "'`'", "'*'", "','", "':'", + "';'", "'**'", "'='", "'|'", "'^'", "'&'", "'<<'", "'>>'", "'+'", "'-'", + "'/'", "'%'", "'//'", "'~'", "'<'", "'>'", "'=='", "'>='", "'<='", "'<>'", + "'!='", "'@'", "'->'", "'+='", "'-='", "'*='", "'@='", "'/='", "'%='", + "'&='", "'|='", "'^='", "'<<='", "'>>='", "'**='", "'//='", null, null, + null, null, null, null, null, "'('", "')'", "'{'", "'}'", "'['", "']'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, "INDENT", "DEDENT", "LINE_BREAK", "DEF", "RETURN", "RAISE", "FROM", + "IMPORT", "NONLOCAL", "AS", "GLOBAL", "ASSERT", "IF", "ELIF", "ELSE", + "WHILE", "FOR", "IN", "TRY", "NONE", "FINALLY", "WITH", "EXCEPT", "LAMBDA", + "OR", "AND", "NOT", "IS", "CLASS", "YIELD", "DEL", "PASS", "CONTINUE", + "BREAK", "ASYNC", "AWAIT", "PRINT", "EXEC", "TRUE", "FALSE", "DOT", "ELLIPSIS", + "REVERSE_QUOTE", "STAR", "COMMA", "COLON", "SEMI_COLON", "POWER", "ASSIGN", + "OR_OP", "XOR", "AND_OP", "LEFT_SHIFT", "RIGHT_SHIFT", "ADD", "MINUS", + "DIV", "MOD", "IDIV", "NOT_OP", "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", "STRING", "DECIMAL_INTEGER", "OCT_INTEGER", + "HEX_INTEGER", "BIN_INTEGER", "IMAG_NUMBER", "FLOAT_NUMBER", "OPEN_PAREN", + "CLOSE_PAREN", "OPEN_BRACE", "CLOSE_BRACE", "OPEN_BRACKET", "CLOSE_BRACKET", + "NAME", "LINE_JOIN", "NEWLINE", "WS", "COMMENT" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + @Override + public String getGrammarFileName() { return "PythonParser.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public PythonParser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + public static class RootContext extends ParserRuleContext { + public TerminalNode EOF() { return getToken(PythonParser.EOF, 0); } + public Single_inputContext single_input() { + return getRuleContext(Single_inputContext.class,0); + } + public File_inputContext file_input() { + return getRuleContext(File_inputContext.class,0); + } + public Eval_inputContext eval_input() { + return getRuleContext(Eval_inputContext.class,0); + } + public RootContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_root; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterRoot(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitRoot(this); + } + } + + public final RootContext root() throws RecognitionException { + RootContext _localctx = new RootContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_root); + try { + enterOuterAlt(_localctx, 1); + { + setState(121); + switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) { + case 1: + { + setState(118); + single_input(); + } + break; + case 2: + { + setState(119); + file_input(); + } + break; + case 3: + { + setState(120); + eval_input(); + } + break; + } + setState(123); + match(EOF); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Single_inputContext extends ParserRuleContext { + public TerminalNode LINE_BREAK() { return getToken(PythonParser.LINE_BREAK, 0); } + public Simple_stmtContext simple_stmt() { + return getRuleContext(Simple_stmtContext.class,0); + } + public Compound_stmtContext compound_stmt() { + return getRuleContext(Compound_stmtContext.class,0); + } + public Single_inputContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_single_input; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterSingle_input(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitSingle_input(this); + } + } + + public final Single_inputContext single_input() throws RecognitionException { + Single_inputContext _localctx = new Single_inputContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_single_input); + try { + setState(130); + switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(125); + match(LINE_BREAK); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(126); + simple_stmt(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(127); + compound_stmt(); + setState(128); + match(LINE_BREAK); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class File_inputContext extends ParserRuleContext { + public List LINE_BREAK() { return getTokens(PythonParser.LINE_BREAK); } + public TerminalNode LINE_BREAK(int i) { + return getToken(PythonParser.LINE_BREAK, i); + } + public List stmt() { + return getRuleContexts(StmtContext.class); + } + public StmtContext stmt(int i) { + return getRuleContext(StmtContext.class,i); + } + public File_inputContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_file_input; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterFile_input(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitFile_input(this); + } + } + + public final File_inputContext file_input() throws RecognitionException { + File_inputContext _localctx = new File_inputContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_file_input); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(134); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + setState(134); + switch ( getInterpreter().adaptivePredict(_input,2,_ctx) ) { + case 1: + { + setState(132); + match(LINE_BREAK); + } + break; + case 2: + { + setState(133); + stmt(); + } + break; + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(136); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,3,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Eval_inputContext extends ParserRuleContext { + public TestlistContext testlist() { + return getRuleContext(TestlistContext.class,0); + } + public List LINE_BREAK() { return getTokens(PythonParser.LINE_BREAK); } + public TerminalNode LINE_BREAK(int i) { + return getToken(PythonParser.LINE_BREAK, i); + } + public Eval_inputContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_eval_input; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterEval_input(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitEval_input(this); + } + } + + public final Eval_inputContext eval_input() throws RecognitionException { + Eval_inputContext _localctx = new Eval_inputContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_eval_input); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(138); + testlist(); + setState(142); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LINE_BREAK) { + { + { + setState(139); + match(LINE_BREAK); + } + } + setState(144); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StmtContext extends ParserRuleContext { + public Simple_stmtContext simple_stmt() { + return getRuleContext(Simple_stmtContext.class,0); + } + public Compound_stmtContext compound_stmt() { + return getRuleContext(Compound_stmtContext.class,0); + } + public StmtContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_stmt; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterStmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitStmt(this); + } + } + + public final StmtContext stmt() throws RecognitionException { + StmtContext _localctx = new StmtContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_stmt); + try { + setState(147); + switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(145); + simple_stmt(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(146); + compound_stmt(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Compound_stmtContext extends ParserRuleContext { + public Compound_stmtContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_compound_stmt; } + + public Compound_stmtContext() { } + public void copyFrom(Compound_stmtContext ctx) { + super.copyFrom(ctx); + } + } + public static class While_stmtContext extends Compound_stmtContext { + public TerminalNode WHILE() { return getToken(PythonParser.WHILE, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public Else_clauseContext else_clause() { + return getRuleContext(Else_clauseContext.class,0); + } + public While_stmtContext(Compound_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterWhile_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitWhile_stmt(this); + } + } + public static class Try_stmtContext extends Compound_stmtContext { + public TerminalNode TRY() { return getToken(PythonParser.TRY, 0); } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public Finally_clauseContext finally_clause() { + return getRuleContext(Finally_clauseContext.class,0); + } + public List except_clause() { + return getRuleContexts(Except_clauseContext.class); + } + public Except_clauseContext except_clause(int i) { + return getRuleContext(Except_clauseContext.class,i); + } + public Else_clauseContext else_clause() { + return getRuleContext(Else_clauseContext.class,0); + } + public Try_stmtContext(Compound_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterTry_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitTry_stmt(this); + } + } + public static class If_stmtContext extends Compound_stmtContext { + public TestContext cond; + public TerminalNode IF() { return getToken(PythonParser.IF, 0); } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public List elif_clause() { + return getRuleContexts(Elif_clauseContext.class); + } + public Elif_clauseContext elif_clause(int i) { + return getRuleContext(Elif_clauseContext.class,i); + } + public Else_clauseContext else_clause() { + return getRuleContext(Else_clauseContext.class,0); + } + public If_stmtContext(Compound_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterIf_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitIf_stmt(this); + } + } + public static class With_stmtContext extends Compound_stmtContext { + public TerminalNode WITH() { return getToken(PythonParser.WITH, 0); } + public List with_item() { + return getRuleContexts(With_itemContext.class); + } + public With_itemContext with_item(int i) { + return getRuleContext(With_itemContext.class,i); + } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public TerminalNode ASYNC() { return getToken(PythonParser.ASYNC, 0); } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public With_stmtContext(Compound_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterWith_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitWith_stmt(this); + } + } + public static class Class_or_func_def_stmtContext extends Compound_stmtContext { + public ClassdefContext classdef() { + return getRuleContext(ClassdefContext.class,0); + } + public FuncdefContext funcdef() { + return getRuleContext(FuncdefContext.class,0); + } + public List decorator() { + return getRuleContexts(DecoratorContext.class); + } + public DecoratorContext decorator(int i) { + return getRuleContext(DecoratorContext.class,i); + } + public Class_or_func_def_stmtContext(Compound_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterClass_or_func_def_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitClass_or_func_def_stmt(this); + } + } + public static class For_stmtContext extends Compound_stmtContext { + public TerminalNode FOR() { return getToken(PythonParser.FOR, 0); } + public ExprlistContext exprlist() { + return getRuleContext(ExprlistContext.class,0); + } + public TerminalNode IN() { return getToken(PythonParser.IN, 0); } + public TestlistContext testlist() { + return getRuleContext(TestlistContext.class,0); + } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public TerminalNode ASYNC() { return getToken(PythonParser.ASYNC, 0); } + public Else_clauseContext else_clause() { + return getRuleContext(Else_clauseContext.class,0); + } + public For_stmtContext(Compound_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterFor_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitFor_stmt(this); + } + } + + public final Compound_stmtContext compound_stmt() throws RecognitionException { + Compound_stmtContext _localctx = new Compound_stmtContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_compound_stmt); + int _la; + try { + int _alt; + setState(223); + switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) { + case 1: + _localctx = new If_stmtContext(_localctx); + enterOuterAlt(_localctx, 1); + { + setState(149); + match(IF); + setState(150); + ((If_stmtContext)_localctx).cond = test(); + setState(151); + match(COLON); + setState(152); + suite(); + setState(156); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,6,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(153); + elif_clause(); + } + } + } + setState(158); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,6,_ctx); + } + setState(160); + switch ( getInterpreter().adaptivePredict(_input,7,_ctx) ) { + case 1: + { + setState(159); + else_clause(); + } + break; + } + } + break; + case 2: + _localctx = new While_stmtContext(_localctx); + enterOuterAlt(_localctx, 2); + { + setState(162); + match(WHILE); + setState(163); + test(); + setState(164); + match(COLON); + setState(165); + suite(); + setState(167); + switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) { + case 1: + { + setState(166); + else_clause(); + } + break; + } + } + break; + case 3: + _localctx = new For_stmtContext(_localctx); + enterOuterAlt(_localctx, 3); + { + setState(170); + _la = _input.LA(1); + if (_la==ASYNC) { + { + setState(169); + match(ASYNC); + } + } + + setState(172); + match(FOR); + setState(173); + exprlist(); + setState(174); + match(IN); + setState(175); + testlist(); + setState(176); + match(COLON); + setState(177); + suite(); + setState(179); + switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) { + case 1: + { + setState(178); + else_clause(); + } + break; + } + } + break; + case 4: + _localctx = new Try_stmtContext(_localctx); + enterOuterAlt(_localctx, 4); + { + setState(181); + match(TRY); + setState(182); + match(COLON); + setState(183); + suite(); + setState(196); + switch (_input.LA(1)) { + case EXCEPT: + { + setState(185); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(184); + except_clause(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(187); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,11,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + setState(190); + switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) { + case 1: + { + setState(189); + else_clause(); + } + break; + } + setState(193); + switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) { + case 1: + { + setState(192); + finally_clause(); + } + break; + } + } + break; + case FINALLY: + { + setState(195); + finally_clause(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + case 5: + _localctx = new With_stmtContext(_localctx); + enterOuterAlt(_localctx, 5); + { + setState(199); + _la = _input.LA(1); + if (_la==ASYNC) { + { + setState(198); + match(ASYNC); + } + } + + setState(201); + match(WITH); + setState(202); + with_item(); + setState(207); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(203); + match(COMMA); + setState(204); + with_item(); + } + } + setState(209); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(210); + match(COLON); + setState(211); + suite(); + } + break; + case 6: + _localctx = new Class_or_func_def_stmtContext(_localctx); + enterOuterAlt(_localctx, 6); + { + setState(216); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==AT) { + { + { + setState(213); + decorator(); + } + } + setState(218); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(221); + switch (_input.LA(1)) { + case CLASS: + { + setState(219); + classdef(); + } + break; + case DEF: + case ASYNC: + { + setState(220); + funcdef(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SuiteContext extends ParserRuleContext { + public Simple_stmtContext simple_stmt() { + return getRuleContext(Simple_stmtContext.class,0); + } + public TerminalNode LINE_BREAK() { return getToken(PythonParser.LINE_BREAK, 0); } + public TerminalNode INDENT() { return getToken(PythonParser.INDENT, 0); } + public TerminalNode DEDENT() { return getToken(PythonParser.DEDENT, 0); } + public List stmt() { + return getRuleContexts(StmtContext.class); + } + public StmtContext stmt(int i) { + return getRuleContext(StmtContext.class,i); + } + public SuiteContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_suite; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterSuite(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitSuite(this); + } + } + + public final SuiteContext suite() throws RecognitionException { + SuiteContext _localctx = new SuiteContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_suite); + try { + int _alt; + setState(235); + switch ( getInterpreter().adaptivePredict(_input,21,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(225); + simple_stmt(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(226); + match(LINE_BREAK); + setState(227); + match(INDENT); + setState(229); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(228); + stmt(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(231); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,20,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + setState(233); + match(DEDENT); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DecoratorContext extends ParserRuleContext { + public TerminalNode AT() { return getToken(PythonParser.AT, 0); } + public Dotted_nameContext dotted_name() { + return getRuleContext(Dotted_nameContext.class,0); + } + public TerminalNode LINE_BREAK() { return getToken(PythonParser.LINE_BREAK, 0); } + public TerminalNode OPEN_PAREN() { return getToken(PythonParser.OPEN_PAREN, 0); } + public TerminalNode CLOSE_PAREN() { return getToken(PythonParser.CLOSE_PAREN, 0); } + public ArglistContext arglist() { + return getRuleContext(ArglistContext.class,0); + } + public DecoratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_decorator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterDecorator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitDecorator(this); + } + } + + public final DecoratorContext decorator() throws RecognitionException { + DecoratorContext _localctx = new DecoratorContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_decorator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(237); + match(AT); + setState(238); + dotted_name(0); + setState(244); + _la = _input.LA(1); + if (_la==OPEN_PAREN) { + { + setState(239); + match(OPEN_PAREN); + setState(241); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << STAR) | (1L << POWER) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(240); + arglist(); + } + } + + setState(243); + match(CLOSE_PAREN); + } + } + + setState(246); + match(LINE_BREAK); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Elif_clauseContext extends ParserRuleContext { + public TerminalNode ELIF() { return getToken(PythonParser.ELIF, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public Elif_clauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elif_clause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterElif_clause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitElif_clause(this); + } + } + + public final Elif_clauseContext elif_clause() throws RecognitionException { + Elif_clauseContext _localctx = new Elif_clauseContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_elif_clause); + try { + enterOuterAlt(_localctx, 1); + { + setState(248); + match(ELIF); + setState(249); + test(); + setState(250); + match(COLON); + setState(251); + suite(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Else_clauseContext extends ParserRuleContext { + public TerminalNode ELSE() { return getToken(PythonParser.ELSE, 0); } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public Else_clauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_else_clause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterElse_clause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitElse_clause(this); + } + } + + public final Else_clauseContext else_clause() throws RecognitionException { + Else_clauseContext _localctx = new Else_clauseContext(_ctx, getState()); + enterRule(_localctx, 18, RULE_else_clause); + try { + enterOuterAlt(_localctx, 1); + { + setState(253); + match(ELSE); + setState(254); + match(COLON); + setState(255); + suite(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Finally_clauseContext extends ParserRuleContext { + public TerminalNode FINALLY() { return getToken(PythonParser.FINALLY, 0); } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public Finally_clauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_finally_clause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterFinally_clause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitFinally_clause(this); + } + } + + public final Finally_clauseContext finally_clause() throws RecognitionException { + Finally_clauseContext _localctx = new Finally_clauseContext(_ctx, getState()); + enterRule(_localctx, 20, RULE_finally_clause); + try { + enterOuterAlt(_localctx, 1); + { + setState(257); + match(FINALLY); + setState(258); + match(COLON); + setState(259); + suite(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class With_itemContext extends ParserRuleContext { + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public TerminalNode AS() { return getToken(PythonParser.AS, 0); } + public ExprContext expr() { + return getRuleContext(ExprContext.class,0); + } + public With_itemContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_with_item; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterWith_item(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitWith_item(this); + } + } + + public final With_itemContext with_item() throws RecognitionException { + With_itemContext _localctx = new With_itemContext(_ctx, getState()); + enterRule(_localctx, 22, RULE_with_item); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(261); + test(); + setState(264); + _la = _input.LA(1); + if (_la==AS) { + { + setState(262); + match(AS); + setState(263); + expr(0); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Except_clauseContext extends ParserRuleContext { + public TerminalNode EXCEPT() { return getToken(PythonParser.EXCEPT, 0); } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public TerminalNode COMMA() { return getToken(PythonParser.COMMA, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public TerminalNode AS() { return getToken(PythonParser.AS, 0); } + public Except_clauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_except_clause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterExcept_clause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitExcept_clause(this); + } + } + + public final Except_clauseContext except_clause() throws RecognitionException { + Except_clauseContext _localctx = new Except_clauseContext(_ctx, getState()); + enterRule(_localctx, 24, RULE_except_clause); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(266); + match(EXCEPT); + setState(280); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(267); + test(); + setState(278); + switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) { + case 1: + { + setState(268); + if (!(this.CheckVersion(2))) throw new FailedPredicateException(this, "this.CheckVersion(2)"); + setState(269); + match(COMMA); + setState(270); + name(); + this.SetVersion(2); + } + break; + case 2: + { + setState(273); + if (!(this.CheckVersion(3))) throw new FailedPredicateException(this, "this.CheckVersion(3)"); + setState(274); + match(AS); + setState(275); + name(); + this.SetVersion(3); + } + break; + } + } + } + + setState(282); + match(COLON); + setState(283); + suite(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassdefContext extends ParserRuleContext { + public TerminalNode CLASS() { return getToken(PythonParser.CLASS, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public TerminalNode OPEN_PAREN() { return getToken(PythonParser.OPEN_PAREN, 0); } + public TerminalNode CLOSE_PAREN() { return getToken(PythonParser.CLOSE_PAREN, 0); } + public ArglistContext arglist() { + return getRuleContext(ArglistContext.class,0); + } + public ClassdefContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classdef; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterClassdef(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitClassdef(this); + } + } + + public final ClassdefContext classdef() throws RecognitionException { + ClassdefContext _localctx = new ClassdefContext(_ctx, getState()); + enterRule(_localctx, 26, RULE_classdef); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(285); + match(CLASS); + setState(286); + name(); + setState(292); + _la = _input.LA(1); + if (_la==OPEN_PAREN) { + { + setState(287); + match(OPEN_PAREN); + setState(289); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << STAR) | (1L << POWER) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(288); + arglist(); + } + } + + setState(291); + match(CLOSE_PAREN); + } + } + + setState(294); + match(COLON); + setState(295); + suite(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FuncdefContext extends ParserRuleContext { + public TerminalNode DEF() { return getToken(PythonParser.DEF, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public TerminalNode OPEN_PAREN() { return getToken(PythonParser.OPEN_PAREN, 0); } + public TerminalNode CLOSE_PAREN() { return getToken(PythonParser.CLOSE_PAREN, 0); } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public TerminalNode ASYNC() { return getToken(PythonParser.ASYNC, 0); } + public TypedargslistContext typedargslist() { + return getRuleContext(TypedargslistContext.class,0); + } + public TerminalNode ARROW() { return getToken(PythonParser.ARROW, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public FuncdefContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_funcdef; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterFuncdef(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitFuncdef(this); + } + } + + public final FuncdefContext funcdef() throws RecognitionException { + FuncdefContext _localctx = new FuncdefContext(_ctx, getState()); + enterRule(_localctx, 28, RULE_funcdef); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(298); + _la = _input.LA(1); + if (_la==ASYNC) { + { + setState(297); + match(ASYNC); + } + } + + setState(300); + match(DEF); + setState(301); + name(); + setState(302); + match(OPEN_PAREN); + setState(304); + _la = _input.LA(1); + if (((((_la - 39)) & ~0x3f) == 0 && ((1L << (_la - 39)) & ((1L << (TRUE - 39)) | (1L << (FALSE - 39)) | (1L << (STAR - 39)) | (1L << (POWER - 39)) | (1L << (NAME - 39)))) != 0)) { + { + setState(303); + typedargslist(); + } + } + + setState(306); + match(CLOSE_PAREN); + setState(309); + _la = _input.LA(1); + if (_la==ARROW) { + { + setState(307); + match(ARROW); + setState(308); + test(); + } + } + + setState(311); + match(COLON); + setState(312); + suite(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypedargslistContext extends ParserRuleContext { + public ArgsContext args() { + return getRuleContext(ArgsContext.class,0); + } + public KwargsContext kwargs() { + return getRuleContext(KwargsContext.class,0); + } + public List def_parameters() { + return getRuleContexts(Def_parametersContext.class); + } + public Def_parametersContext def_parameters(int i) { + return getRuleContext(Def_parametersContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public TypedargslistContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typedargslist; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterTypedargslist(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitTypedargslist(this); + } + } + + public final TypedargslistContext typedargslist() throws RecognitionException { + TypedargslistContext _localctx = new TypedargslistContext(_ctx, getState()); + enterRule(_localctx, 30, RULE_typedargslist); + int _la; + try { + setState(338); + switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(317); + switch ( getInterpreter().adaptivePredict(_input,32,_ctx) ) { + case 1: + { + setState(314); + def_parameters(); + setState(315); + match(COMMA); + } + break; + } + setState(329); + switch (_input.LA(1)) { + case STAR: + { + setState(319); + args(); + setState(322); + switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) { + case 1: + { + setState(320); + match(COMMA); + setState(321); + def_parameters(); + } + break; + } + setState(326); + switch ( getInterpreter().adaptivePredict(_input,34,_ctx) ) { + case 1: + { + setState(324); + match(COMMA); + setState(325); + kwargs(); + } + break; + } + } + break; + case POWER: + { + setState(328); + kwargs(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(332); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(331); + match(COMMA); + } + } + + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(334); + def_parameters(); + setState(336); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(335); + match(COMMA); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArgsContext extends ParserRuleContext { + public TerminalNode STAR() { return getToken(PythonParser.STAR, 0); } + public Named_parameterContext named_parameter() { + return getRuleContext(Named_parameterContext.class,0); + } + public ArgsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_args; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterArgs(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitArgs(this); + } + } + + public final ArgsContext args() throws RecognitionException { + ArgsContext _localctx = new ArgsContext(_ctx, getState()); + enterRule(_localctx, 32, RULE_args); + try { + enterOuterAlt(_localctx, 1); + { + setState(340); + match(STAR); + setState(341); + named_parameter(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class KwargsContext extends ParserRuleContext { + public TerminalNode POWER() { return getToken(PythonParser.POWER, 0); } + public Named_parameterContext named_parameter() { + return getRuleContext(Named_parameterContext.class,0); + } + public KwargsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_kwargs; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterKwargs(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitKwargs(this); + } + } + + public final KwargsContext kwargs() throws RecognitionException { + KwargsContext _localctx = new KwargsContext(_ctx, getState()); + enterRule(_localctx, 34, RULE_kwargs); + try { + enterOuterAlt(_localctx, 1); + { + setState(343); + match(POWER); + setState(344); + named_parameter(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Def_parametersContext extends ParserRuleContext { + public List def_parameter() { + return getRuleContexts(Def_parameterContext.class); + } + public Def_parameterContext def_parameter(int i) { + return getRuleContext(Def_parameterContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Def_parametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_def_parameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterDef_parameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitDef_parameters(this); + } + } + + public final Def_parametersContext def_parameters() throws RecognitionException { + Def_parametersContext _localctx = new Def_parametersContext(_ctx, getState()); + enterRule(_localctx, 36, RULE_def_parameters); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(346); + def_parameter(); + setState(351); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,39,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(347); + match(COMMA); + setState(348); + def_parameter(); + } + } + } + setState(353); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,39,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Def_parameterContext extends ParserRuleContext { + public Named_parameterContext named_parameter() { + return getRuleContext(Named_parameterContext.class,0); + } + public TerminalNode ASSIGN() { return getToken(PythonParser.ASSIGN, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public TerminalNode STAR() { return getToken(PythonParser.STAR, 0); } + public Def_parameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_def_parameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterDef_parameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitDef_parameter(this); + } + } + + public final Def_parameterContext def_parameter() throws RecognitionException { + Def_parameterContext _localctx = new Def_parameterContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_def_parameter); + int _la; + try { + setState(360); + switch (_input.LA(1)) { + case TRUE: + case FALSE: + case NAME: + enterOuterAlt(_localctx, 1); + { + setState(354); + named_parameter(); + setState(357); + _la = _input.LA(1); + if (_la==ASSIGN) { + { + setState(355); + match(ASSIGN); + setState(356); + test(); + } + } + + } + break; + case STAR: + enterOuterAlt(_localctx, 2); + { + setState(359); + match(STAR); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Named_parameterContext extends ParserRuleContext { + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public Named_parameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_named_parameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterNamed_parameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitNamed_parameter(this); + } + } + + public final Named_parameterContext named_parameter() throws RecognitionException { + Named_parameterContext _localctx = new Named_parameterContext(_ctx, getState()); + enterRule(_localctx, 40, RULE_named_parameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(362); + name(); + setState(365); + _la = _input.LA(1); + if (_la==COLON) { + { + setState(363); + match(COLON); + setState(364); + test(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Simple_stmtContext extends ParserRuleContext { + public List small_stmt() { + return getRuleContexts(Small_stmtContext.class); + } + public Small_stmtContext small_stmt(int i) { + return getRuleContext(Small_stmtContext.class,i); + } + public TerminalNode LINE_BREAK() { return getToken(PythonParser.LINE_BREAK, 0); } + public TerminalNode EOF() { return getToken(PythonParser.EOF, 0); } + public List SEMI_COLON() { return getTokens(PythonParser.SEMI_COLON); } + public TerminalNode SEMI_COLON(int i) { + return getToken(PythonParser.SEMI_COLON, i); + } + public Simple_stmtContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_simple_stmt; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterSimple_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitSimple_stmt(this); + } + } + + public final Simple_stmtContext simple_stmt() throws RecognitionException { + Simple_stmtContext _localctx = new Simple_stmtContext(_ctx, getState()); + enterRule(_localctx, 42, RULE_simple_stmt); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(367); + small_stmt(); + setState(372); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,43,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(368); + match(SEMI_COLON); + setState(369); + small_stmt(); + } + } + } + setState(374); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,43,_ctx); + } + setState(376); + _la = _input.LA(1); + if (_la==SEMI_COLON) { + { + setState(375); + match(SEMI_COLON); + } + } + + setState(378); + _la = _input.LA(1); + if ( !(_la==EOF || _la==LINE_BREAK) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Small_stmtContext extends ParserRuleContext { + public Small_stmtContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_small_stmt; } + + public Small_stmtContext() { } + public void copyFrom(Small_stmtContext ctx) { + super.copyFrom(ctx); + } + } + public static class Assert_stmtContext extends Small_stmtContext { + public TerminalNode ASSERT() { return getToken(PythonParser.ASSERT, 0); } + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public TerminalNode COMMA() { return getToken(PythonParser.COMMA, 0); } + public Assert_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterAssert_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitAssert_stmt(this); + } + } + public static class Nonlocal_stmtContext extends Small_stmtContext { + public TerminalNode NONLOCAL() { return getToken(PythonParser.NONLOCAL, 0); } + public List name() { + return getRuleContexts(NameContext.class); + } + public NameContext name(int i) { + return getRuleContext(NameContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Nonlocal_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterNonlocal_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitNonlocal_stmt(this); + } + } + public static class Pass_stmtContext extends Small_stmtContext { + public TerminalNode PASS() { return getToken(PythonParser.PASS, 0); } + public Pass_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterPass_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitPass_stmt(this); + } + } + public static class Import_stmtContext extends Small_stmtContext { + public TerminalNode IMPORT() { return getToken(PythonParser.IMPORT, 0); } + public Dotted_as_namesContext dotted_as_names() { + return getRuleContext(Dotted_as_namesContext.class,0); + } + public Import_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterImport_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitImport_stmt(this); + } + } + public static class Expr_stmtContext extends Small_stmtContext { + public Testlist_star_exprContext testlist_star_expr() { + return getRuleContext(Testlist_star_exprContext.class,0); + } + public Assign_partContext assign_part() { + return getRuleContext(Assign_partContext.class,0); + } + public Expr_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterExpr_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitExpr_stmt(this); + } + } + public static class Raise_stmtContext extends Small_stmtContext { + public TerminalNode RAISE() { return getToken(PythonParser.RAISE, 0); } + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public TerminalNode FROM() { return getToken(PythonParser.FROM, 0); } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Raise_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterRaise_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitRaise_stmt(this); + } + } + public static class Yield_stmtContext extends Small_stmtContext { + public Yield_exprContext yield_expr() { + return getRuleContext(Yield_exprContext.class,0); + } + public Yield_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterYield_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitYield_stmt(this); + } + } + public static class From_stmtContext extends Small_stmtContext { + public TerminalNode FROM() { return getToken(PythonParser.FROM, 0); } + public TerminalNode IMPORT() { return getToken(PythonParser.IMPORT, 0); } + public Dotted_nameContext dotted_name() { + return getRuleContext(Dotted_nameContext.class,0); + } + public TerminalNode STAR() { return getToken(PythonParser.STAR, 0); } + public TerminalNode OPEN_PAREN() { return getToken(PythonParser.OPEN_PAREN, 0); } + public Import_as_namesContext import_as_names() { + return getRuleContext(Import_as_namesContext.class,0); + } + public TerminalNode CLOSE_PAREN() { return getToken(PythonParser.CLOSE_PAREN, 0); } + public List DOT() { return getTokens(PythonParser.DOT); } + public TerminalNode DOT(int i) { + return getToken(PythonParser.DOT, i); + } + public List ELLIPSIS() { return getTokens(PythonParser.ELLIPSIS); } + public TerminalNode ELLIPSIS(int i) { + return getToken(PythonParser.ELLIPSIS, i); + } + public From_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterFrom_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitFrom_stmt(this); + } + } + public static class Global_stmtContext extends Small_stmtContext { + public TerminalNode GLOBAL() { return getToken(PythonParser.GLOBAL, 0); } + public List name() { + return getRuleContexts(NameContext.class); + } + public NameContext name(int i) { + return getRuleContext(NameContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Global_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterGlobal_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitGlobal_stmt(this); + } + } + public static class Continue_stmtContext extends Small_stmtContext { + public TerminalNode CONTINUE() { return getToken(PythonParser.CONTINUE, 0); } + public Continue_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterContinue_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitContinue_stmt(this); + } + } + public static class Exec_stmtContext extends Small_stmtContext { + public TerminalNode EXEC() { return getToken(PythonParser.EXEC, 0); } + public ExprContext expr() { + return getRuleContext(ExprContext.class,0); + } + public TerminalNode IN() { return getToken(PythonParser.IN, 0); } + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public TerminalNode COMMA() { return getToken(PythonParser.COMMA, 0); } + public Exec_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterExec_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitExec_stmt(this); + } + } + public static class Break_stmtContext extends Small_stmtContext { + public TerminalNode BREAK() { return getToken(PythonParser.BREAK, 0); } + public Break_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterBreak_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitBreak_stmt(this); + } + } + public static class Del_stmtContext extends Small_stmtContext { + public TerminalNode DEL() { return getToken(PythonParser.DEL, 0); } + public ExprlistContext exprlist() { + return getRuleContext(ExprlistContext.class,0); + } + public Del_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterDel_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitDel_stmt(this); + } + } + public static class Print_stmtContext extends Small_stmtContext { + public TerminalNode PRINT() { return getToken(PythonParser.PRINT, 0); } + public TerminalNode RIGHT_SHIFT() { return getToken(PythonParser.RIGHT_SHIFT, 0); } + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Print_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterPrint_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitPrint_stmt(this); + } + } + public static class Return_stmtContext extends Small_stmtContext { + public TerminalNode RETURN() { return getToken(PythonParser.RETURN, 0); } + public TestlistContext testlist() { + return getRuleContext(TestlistContext.class,0); + } + public Return_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterReturn_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitReturn_stmt(this); + } + } + + public final Small_stmtContext small_stmt() throws RecognitionException { + Small_stmtContext _localctx = new Small_stmtContext(_ctx, getState()); + enterRule(_localctx, 44, RULE_small_stmt); + int _la; + try { + int _alt; + setState(504); + switch ( getInterpreter().adaptivePredict(_input,65,_ctx) ) { + case 1: + _localctx = new Expr_stmtContext(_localctx); + enterOuterAlt(_localctx, 1); + { + setState(380); + testlist_star_expr(); + setState(382); + switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) { + case 1: + { + setState(381); + assign_part(); + } + break; + } + } + break; + case 2: + _localctx = new Print_stmtContext(_localctx); + enterOuterAlt(_localctx, 2); + { + setState(384); + if (!(this.CheckVersion(2))) throw new FailedPredicateException(this, "this.CheckVersion(2)"); + setState(385); + match(PRINT); + setState(408); + switch (_input.LA(1)) { + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + { + setState(386); + test(); + setState(391); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,46,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(387); + match(COMMA); + setState(388); + test(); + } + } + } + setState(393); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,46,_ctx); + } + setState(395); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(394); + match(COMMA); + } + } + + } + } + break; + case RIGHT_SHIFT: + { + setState(397); + match(RIGHT_SHIFT); + setState(398); + test(); + { + setState(401); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(399); + match(COMMA); + setState(400); + test(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(403); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,48,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + setState(406); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(405); + match(COMMA); + } + } + + } + } + break; + default: + throw new NoViableAltException(this); + } + this.SetVersion(2); + } + break; + case 3: + _localctx = new Del_stmtContext(_localctx); + enterOuterAlt(_localctx, 3); + { + setState(412); + match(DEL); + setState(413); + exprlist(); + } + break; + case 4: + _localctx = new Pass_stmtContext(_localctx); + enterOuterAlt(_localctx, 4); + { + setState(414); + match(PASS); + } + break; + case 5: + _localctx = new Break_stmtContext(_localctx); + enterOuterAlt(_localctx, 5); + { + setState(415); + match(BREAK); + } + break; + case 6: + _localctx = new Continue_stmtContext(_localctx); + enterOuterAlt(_localctx, 6); + { + setState(416); + match(CONTINUE); + } + break; + case 7: + _localctx = new Return_stmtContext(_localctx); + enterOuterAlt(_localctx, 7); + { + setState(417); + match(RETURN); + setState(419); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(418); + testlist(); + } + } + + } + break; + case 8: + _localctx = new Raise_stmtContext(_localctx); + enterOuterAlt(_localctx, 8); + { + setState(421); + match(RAISE); + setState(431); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(422); + test(); + setState(429); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(423); + match(COMMA); + setState(424); + test(); + setState(427); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(425); + match(COMMA); + setState(426); + test(); + } + } + + } + } + + } + } + + setState(435); + _la = _input.LA(1); + if (_la==FROM) { + { + setState(433); + match(FROM); + setState(434); + test(); + } + } + + } + break; + case 9: + _localctx = new Yield_stmtContext(_localctx); + enterOuterAlt(_localctx, 9); + { + setState(437); + yield_expr(); + } + break; + case 10: + _localctx = new Import_stmtContext(_localctx); + enterOuterAlt(_localctx, 10); + { + setState(438); + match(IMPORT); + setState(439); + dotted_as_names(); + } + break; + case 11: + _localctx = new From_stmtContext(_localctx); + enterOuterAlt(_localctx, 11); + { + setState(440); + match(FROM); + setState(453); + switch ( getInterpreter().adaptivePredict(_input,58,_ctx) ) { + case 1: + { + setState(444); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==DOT || _la==ELLIPSIS) { + { + { + setState(441); + _la = _input.LA(1); + if ( !(_la==DOT || _la==ELLIPSIS) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + setState(446); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(447); + dotted_name(0); + } + break; + case 2: + { + setState(449); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(448); + _la = _input.LA(1); + if ( !(_la==DOT || _la==ELLIPSIS) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + setState(451); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==DOT || _la==ELLIPSIS ); + } + break; + } + setState(455); + match(IMPORT); + setState(462); + switch (_input.LA(1)) { + case STAR: + { + setState(456); + match(STAR); + } + break; + case OPEN_PAREN: + { + setState(457); + match(OPEN_PAREN); + setState(458); + import_as_names(); + setState(459); + match(CLOSE_PAREN); + } + break; + case TRUE: + case FALSE: + case NAME: + { + setState(461); + import_as_names(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + case 12: + _localctx = new Global_stmtContext(_localctx); + enterOuterAlt(_localctx, 12); + { + setState(464); + match(GLOBAL); + setState(465); + name(); + setState(470); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(466); + match(COMMA); + setState(467); + name(); + } + } + setState(472); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + case 13: + _localctx = new Exec_stmtContext(_localctx); + enterOuterAlt(_localctx, 13); + { + setState(473); + if (!(this.CheckVersion(2))) throw new FailedPredicateException(this, "this.CheckVersion(2)"); + setState(474); + match(EXEC); + setState(475); + expr(0); + setState(482); + _la = _input.LA(1); + if (_la==IN) { + { + setState(476); + match(IN); + setState(477); + test(); + setState(480); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(478); + match(COMMA); + setState(479); + test(); + } + } + + } + } + + this.SetVersion(2); + } + break; + case 14: + _localctx = new Assert_stmtContext(_localctx); + enterOuterAlt(_localctx, 14); + { + setState(486); + match(ASSERT); + setState(487); + test(); + setState(490); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(488); + match(COMMA); + setState(489); + test(); + } + } + + } + break; + case 15: + _localctx = new Nonlocal_stmtContext(_localctx); + enterOuterAlt(_localctx, 15); + { + setState(492); + if (!(this.CheckVersion(3))) throw new FailedPredicateException(this, "this.CheckVersion(3)"); + setState(493); + match(NONLOCAL); + setState(494); + name(); + setState(499); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(495); + match(COMMA); + setState(496); + name(); + } + } + setState(501); + _errHandler.sync(this); + _la = _input.LA(1); + } + this.SetVersion(3); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Testlist_star_exprContext extends ParserRuleContext { + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public List star_expr() { + return getRuleContexts(Star_exprContext.class); + } + public Star_exprContext star_expr(int i) { + return getRuleContext(Star_exprContext.class,i); + } + public TestlistContext testlist() { + return getRuleContext(TestlistContext.class,0); + } + public Testlist_star_exprContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_testlist_star_expr; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterTestlist_star_expr(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitTestlist_star_expr(this); + } + } + + public final Testlist_star_exprContext testlist_star_expr() throws RecognitionException { + Testlist_star_exprContext _localctx = new Testlist_star_exprContext(_ctx, getState()); + enterRule(_localctx, 46, RULE_testlist_star_expr); + try { + int _alt; + setState(521); + switch ( getInterpreter().adaptivePredict(_input,69,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(512); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(508); + switch (_input.LA(1)) { + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + setState(506); + test(); + } + break; + case STAR: + { + setState(507); + star_expr(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(510); + match(COMMA); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(514); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,67,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + setState(518); + switch ( getInterpreter().adaptivePredict(_input,68,_ctx) ) { + case 1: + { + setState(516); + test(); + } + break; + case 2: + { + setState(517); + star_expr(); + } + break; + } + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(520); + testlist(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Star_exprContext extends ParserRuleContext { + public TerminalNode STAR() { return getToken(PythonParser.STAR, 0); } + public ExprContext expr() { + return getRuleContext(ExprContext.class,0); + } + public Star_exprContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_star_expr; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterStar_expr(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitStar_expr(this); + } + } + + public final Star_exprContext star_expr() throws RecognitionException { + Star_exprContext _localctx = new Star_exprContext(_ctx, getState()); + enterRule(_localctx, 48, RULE_star_expr); + try { + enterOuterAlt(_localctx, 1); + { + setState(523); + match(STAR); + setState(524); + expr(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Assign_partContext extends ParserRuleContext { + public Token op; + public List ASSIGN() { return getTokens(PythonParser.ASSIGN); } + public TerminalNode ASSIGN(int i) { + return getToken(PythonParser.ASSIGN, i); + } + public List testlist_star_expr() { + return getRuleContexts(Testlist_star_exprContext.class); + } + public Testlist_star_exprContext testlist_star_expr(int i) { + return getRuleContext(Testlist_star_exprContext.class,i); + } + public Yield_exprContext yield_expr() { + return getRuleContext(Yield_exprContext.class,0); + } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public TestlistContext testlist() { + return getRuleContext(TestlistContext.class,0); + } + public TerminalNode ADD_ASSIGN() { return getToken(PythonParser.ADD_ASSIGN, 0); } + public TerminalNode SUB_ASSIGN() { return getToken(PythonParser.SUB_ASSIGN, 0); } + public TerminalNode MULT_ASSIGN() { return getToken(PythonParser.MULT_ASSIGN, 0); } + public TerminalNode AT_ASSIGN() { return getToken(PythonParser.AT_ASSIGN, 0); } + public TerminalNode DIV_ASSIGN() { return getToken(PythonParser.DIV_ASSIGN, 0); } + public TerminalNode MOD_ASSIGN() { return getToken(PythonParser.MOD_ASSIGN, 0); } + public TerminalNode AND_ASSIGN() { return getToken(PythonParser.AND_ASSIGN, 0); } + public TerminalNode OR_ASSIGN() { return getToken(PythonParser.OR_ASSIGN, 0); } + public TerminalNode XOR_ASSIGN() { return getToken(PythonParser.XOR_ASSIGN, 0); } + public TerminalNode LEFT_SHIFT_ASSIGN() { return getToken(PythonParser.LEFT_SHIFT_ASSIGN, 0); } + public TerminalNode RIGHT_SHIFT_ASSIGN() { return getToken(PythonParser.RIGHT_SHIFT_ASSIGN, 0); } + public TerminalNode POWER_ASSIGN() { return getToken(PythonParser.POWER_ASSIGN, 0); } + public TerminalNode IDIV_ASSIGN() { return getToken(PythonParser.IDIV_ASSIGN, 0); } + public Assign_partContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_assign_part; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterAssign_part(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitAssign_part(this); + } + } + + public final Assign_partContext assign_part() throws RecognitionException { + Assign_partContext _localctx = new Assign_partContext(_ctx, getState()); + enterRule(_localctx, 50, RULE_assign_part); + int _la; + try { + int _alt; + setState(556); + switch ( getInterpreter().adaptivePredict(_input,75,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(526); + match(ASSIGN); + setState(540); + switch (_input.LA(1)) { + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case STAR: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + setState(527); + testlist_star_expr(); + setState(532); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,70,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(528); + match(ASSIGN); + setState(529); + testlist_star_expr(); + } + } + } + setState(534); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,70,_ctx); + } + setState(537); + _la = _input.LA(1); + if (_la==ASSIGN) { + { + setState(535); + match(ASSIGN); + setState(536); + yield_expr(); + } + } + + } + break; + case YIELD: + { + setState(539); + yield_expr(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(542); + if (!(this.CheckVersion(3))) throw new FailedPredicateException(this, "this.CheckVersion(3)"); + setState(543); + match(COLON); + setState(544); + test(); + setState(547); + _la = _input.LA(1); + if (_la==ASSIGN) { + { + setState(545); + match(ASSIGN); + setState(546); + testlist(); + } + } + + this.SetVersion(3); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(551); + ((Assign_partContext)_localctx).op = _input.LT(1); + _la = _input.LA(1); + if ( !(((((_la - 70)) & ~0x3f) == 0 && ((1L << (_la - 70)) & ((1L << (ADD_ASSIGN - 70)) | (1L << (SUB_ASSIGN - 70)) | (1L << (MULT_ASSIGN - 70)) | (1L << (AT_ASSIGN - 70)) | (1L << (DIV_ASSIGN - 70)) | (1L << (MOD_ASSIGN - 70)) | (1L << (AND_ASSIGN - 70)) | (1L << (OR_ASSIGN - 70)) | (1L << (XOR_ASSIGN - 70)) | (1L << (LEFT_SHIFT_ASSIGN - 70)) | (1L << (RIGHT_SHIFT_ASSIGN - 70)) | (1L << (POWER_ASSIGN - 70)) | (1L << (IDIV_ASSIGN - 70)))) != 0)) ) { + ((Assign_partContext)_localctx).op = (Token)_errHandler.recoverInline(this); + } else { + consume(); + } + setState(554); + switch (_input.LA(1)) { + case YIELD: + { + setState(552); + yield_expr(); + } + break; + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + setState(553); + testlist(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExprlistContext extends ParserRuleContext { + public List expr() { + return getRuleContexts(ExprContext.class); + } + public ExprContext expr(int i) { + return getRuleContext(ExprContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public ExprlistContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_exprlist; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterExprlist(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitExprlist(this); + } + } + + public final ExprlistContext exprlist() throws RecognitionException { + ExprlistContext _localctx = new ExprlistContext(_ctx, getState()); + enterRule(_localctx, 52, RULE_exprlist); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(558); + expr(0); + setState(563); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,76,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(559); + match(COMMA); + setState(560); + expr(0); + } + } + } + setState(565); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,76,_ctx); + } + setState(567); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(566); + match(COMMA); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Import_as_namesContext extends ParserRuleContext { + public List import_as_name() { + return getRuleContexts(Import_as_nameContext.class); + } + public Import_as_nameContext import_as_name(int i) { + return getRuleContext(Import_as_nameContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Import_as_namesContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_import_as_names; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterImport_as_names(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitImport_as_names(this); + } + } + + public final Import_as_namesContext import_as_names() throws RecognitionException { + Import_as_namesContext _localctx = new Import_as_namesContext(_ctx, getState()); + enterRule(_localctx, 54, RULE_import_as_names); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(569); + import_as_name(); + setState(574); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,78,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(570); + match(COMMA); + setState(571); + import_as_name(); + } + } + } + setState(576); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,78,_ctx); + } + setState(578); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(577); + match(COMMA); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Import_as_nameContext extends ParserRuleContext { + public List name() { + return getRuleContexts(NameContext.class); + } + public NameContext name(int i) { + return getRuleContext(NameContext.class,i); + } + public TerminalNode AS() { return getToken(PythonParser.AS, 0); } + public Import_as_nameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_import_as_name; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterImport_as_name(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitImport_as_name(this); + } + } + + public final Import_as_nameContext import_as_name() throws RecognitionException { + Import_as_nameContext _localctx = new Import_as_nameContext(_ctx, getState()); + enterRule(_localctx, 56, RULE_import_as_name); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(580); + name(); + setState(583); + _la = _input.LA(1); + if (_la==AS) { + { + setState(581); + match(AS); + setState(582); + name(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Dotted_as_namesContext extends ParserRuleContext { + public List dotted_as_name() { + return getRuleContexts(Dotted_as_nameContext.class); + } + public Dotted_as_nameContext dotted_as_name(int i) { + return getRuleContext(Dotted_as_nameContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Dotted_as_namesContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_dotted_as_names; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterDotted_as_names(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitDotted_as_names(this); + } + } + + public final Dotted_as_namesContext dotted_as_names() throws RecognitionException { + Dotted_as_namesContext _localctx = new Dotted_as_namesContext(_ctx, getState()); + enterRule(_localctx, 58, RULE_dotted_as_names); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(585); + dotted_as_name(); + setState(590); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(586); + match(COMMA); + setState(587); + dotted_as_name(); + } + } + setState(592); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Dotted_as_nameContext extends ParserRuleContext { + public Dotted_nameContext dotted_name() { + return getRuleContext(Dotted_nameContext.class,0); + } + public TerminalNode AS() { return getToken(PythonParser.AS, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public Dotted_as_nameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_dotted_as_name; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterDotted_as_name(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitDotted_as_name(this); + } + } + + public final Dotted_as_nameContext dotted_as_name() throws RecognitionException { + Dotted_as_nameContext _localctx = new Dotted_as_nameContext(_ctx, getState()); + enterRule(_localctx, 60, RULE_dotted_as_name); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(593); + dotted_name(0); + setState(596); + _la = _input.LA(1); + if (_la==AS) { + { + setState(594); + match(AS); + setState(595); + name(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TestContext extends ParserRuleContext { + public List logical_test() { + return getRuleContexts(Logical_testContext.class); + } + public Logical_testContext logical_test(int i) { + return getRuleContext(Logical_testContext.class,i); + } + public TerminalNode IF() { return getToken(PythonParser.IF, 0); } + public TerminalNode ELSE() { return getToken(PythonParser.ELSE, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public TerminalNode LAMBDA() { return getToken(PythonParser.LAMBDA, 0); } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public VarargslistContext varargslist() { + return getRuleContext(VarargslistContext.class,0); + } + public TestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_test; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterTest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitTest(this); + } + } + + public final TestContext test() throws RecognitionException { + TestContext _localctx = new TestContext(_ctx, getState()); + enterRule(_localctx, 62, RULE_test); + int _la; + try { + setState(612); + switch (_input.LA(1)) { + case NONE: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + enterOuterAlt(_localctx, 1); + { + setState(598); + logical_test(0); + setState(604); + switch ( getInterpreter().adaptivePredict(_input,83,_ctx) ) { + case 1: + { + setState(599); + match(IF); + setState(600); + logical_test(0); + setState(601); + match(ELSE); + setState(602); + test(); + } + break; + } + } + break; + case LAMBDA: + enterOuterAlt(_localctx, 2); + { + setState(606); + match(LAMBDA); + setState(608); + _la = _input.LA(1); + if (((((_la - 39)) & ~0x3f) == 0 && ((1L << (_la - 39)) & ((1L << (TRUE - 39)) | (1L << (FALSE - 39)) | (1L << (STAR - 39)) | (1L << (POWER - 39)) | (1L << (NAME - 39)))) != 0)) { + { + setState(607); + varargslist(); + } + } + + setState(610); + match(COLON); + setState(611); + test(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VarargslistContext extends ParserRuleContext { + public VarargsContext varargs() { + return getRuleContext(VarargsContext.class,0); + } + public VarkwargsContext varkwargs() { + return getRuleContext(VarkwargsContext.class,0); + } + public List vardef_parameters() { + return getRuleContexts(Vardef_parametersContext.class); + } + public Vardef_parametersContext vardef_parameters(int i) { + return getRuleContext(Vardef_parametersContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public VarargslistContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_varargslist; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterVarargslist(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitVarargslist(this); + } + } + + public final VarargslistContext varargslist() throws RecognitionException { + VarargslistContext _localctx = new VarargslistContext(_ctx, getState()); + enterRule(_localctx, 64, RULE_varargslist); + int _la; + try { + setState(638); + switch ( getInterpreter().adaptivePredict(_input,92,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(617); + switch ( getInterpreter().adaptivePredict(_input,86,_ctx) ) { + case 1: + { + setState(614); + vardef_parameters(); + setState(615); + match(COMMA); + } + break; + } + setState(629); + switch (_input.LA(1)) { + case STAR: + { + setState(619); + varargs(); + setState(622); + switch ( getInterpreter().adaptivePredict(_input,87,_ctx) ) { + case 1: + { + setState(620); + match(COMMA); + setState(621); + vardef_parameters(); + } + break; + } + setState(626); + switch ( getInterpreter().adaptivePredict(_input,88,_ctx) ) { + case 1: + { + setState(624); + match(COMMA); + setState(625); + varkwargs(); + } + break; + } + } + break; + case POWER: + { + setState(628); + varkwargs(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(632); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(631); + match(COMMA); + } + } + + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(634); + vardef_parameters(); + setState(636); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(635); + match(COMMA); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Vardef_parametersContext extends ParserRuleContext { + public List vardef_parameter() { + return getRuleContexts(Vardef_parameterContext.class); + } + public Vardef_parameterContext vardef_parameter(int i) { + return getRuleContext(Vardef_parameterContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Vardef_parametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_vardef_parameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterVardef_parameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitVardef_parameters(this); + } + } + + public final Vardef_parametersContext vardef_parameters() throws RecognitionException { + Vardef_parametersContext _localctx = new Vardef_parametersContext(_ctx, getState()); + enterRule(_localctx, 66, RULE_vardef_parameters); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(640); + vardef_parameter(); + setState(645); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,93,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(641); + match(COMMA); + setState(642); + vardef_parameter(); + } + } + } + setState(647); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,93,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Vardef_parameterContext extends ParserRuleContext { + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public TerminalNode ASSIGN() { return getToken(PythonParser.ASSIGN, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public TerminalNode STAR() { return getToken(PythonParser.STAR, 0); } + public Vardef_parameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_vardef_parameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterVardef_parameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitVardef_parameter(this); + } + } + + public final Vardef_parameterContext vardef_parameter() throws RecognitionException { + Vardef_parameterContext _localctx = new Vardef_parameterContext(_ctx, getState()); + enterRule(_localctx, 68, RULE_vardef_parameter); + int _la; + try { + setState(654); + switch (_input.LA(1)) { + case TRUE: + case FALSE: + case NAME: + enterOuterAlt(_localctx, 1); + { + setState(648); + name(); + setState(651); + _la = _input.LA(1); + if (_la==ASSIGN) { + { + setState(649); + match(ASSIGN); + setState(650); + test(); + } + } + + } + break; + case STAR: + enterOuterAlt(_localctx, 2); + { + setState(653); + match(STAR); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VarargsContext extends ParserRuleContext { + public TerminalNode STAR() { return getToken(PythonParser.STAR, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public VarargsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_varargs; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterVarargs(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitVarargs(this); + } + } + + public final VarargsContext varargs() throws RecognitionException { + VarargsContext _localctx = new VarargsContext(_ctx, getState()); + enterRule(_localctx, 70, RULE_varargs); + try { + enterOuterAlt(_localctx, 1); + { + setState(656); + match(STAR); + setState(657); + name(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VarkwargsContext extends ParserRuleContext { + public TerminalNode POWER() { return getToken(PythonParser.POWER, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public VarkwargsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_varkwargs; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterVarkwargs(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitVarkwargs(this); + } + } + + public final VarkwargsContext varkwargs() throws RecognitionException { + VarkwargsContext _localctx = new VarkwargsContext(_ctx, getState()); + enterRule(_localctx, 72, RULE_varkwargs); + try { + enterOuterAlt(_localctx, 1); + { + setState(659); + match(POWER); + setState(660); + name(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Logical_testContext extends ParserRuleContext { + public Token op; + public TerminalNode NOT() { return getToken(PythonParser.NOT, 0); } + public List logical_test() { + return getRuleContexts(Logical_testContext.class); + } + public Logical_testContext logical_test(int i) { + return getRuleContext(Logical_testContext.class,i); + } + public ComparisonContext comparison() { + return getRuleContext(ComparisonContext.class,0); + } + public TerminalNode AND() { return getToken(PythonParser.AND, 0); } + public TerminalNode OR() { return getToken(PythonParser.OR, 0); } + public Logical_testContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_logical_test; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterLogical_test(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitLogical_test(this); + } + } + + public final Logical_testContext logical_test() throws RecognitionException { + return logical_test(0); + } + + private Logical_testContext logical_test(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + Logical_testContext _localctx = new Logical_testContext(_ctx, _parentState); + Logical_testContext _prevctx = _localctx; + int _startState = 74; + enterRecursionRule(_localctx, 74, RULE_logical_test, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(666); + switch (_input.LA(1)) { + case NOT: + { + setState(663); + match(NOT); + setState(664); + logical_test(3); + } + break; + case NONE: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + setState(665); + comparison(0); + } + break; + default: + throw new NoViableAltException(this); + } + _ctx.stop = _input.LT(-1); + setState(676); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,98,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(674); + switch ( getInterpreter().adaptivePredict(_input,97,_ctx) ) { + case 1: + { + _localctx = new Logical_testContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_logical_test); + setState(668); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(669); + ((Logical_testContext)_localctx).op = match(AND); + setState(670); + logical_test(3); + } + break; + case 2: + { + _localctx = new Logical_testContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_logical_test); + setState(671); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(672); + ((Logical_testContext)_localctx).op = match(OR); + setState(673); + logical_test(2); + } + break; + } + } + } + setState(678); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,98,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class ComparisonContext extends ParserRuleContext { + public Token optional; + public ExprContext expr() { + return getRuleContext(ExprContext.class,0); + } + public List comparison() { + return getRuleContexts(ComparisonContext.class); + } + public ComparisonContext comparison(int i) { + return getRuleContext(ComparisonContext.class,i); + } + public TerminalNode LESS_THAN() { return getToken(PythonParser.LESS_THAN, 0); } + public TerminalNode GREATER_THAN() { return getToken(PythonParser.GREATER_THAN, 0); } + public TerminalNode EQUALS() { return getToken(PythonParser.EQUALS, 0); } + public TerminalNode GT_EQ() { return getToken(PythonParser.GT_EQ, 0); } + public TerminalNode LT_EQ() { return getToken(PythonParser.LT_EQ, 0); } + public TerminalNode NOT_EQ_1() { return getToken(PythonParser.NOT_EQ_1, 0); } + public TerminalNode NOT_EQ_2() { return getToken(PythonParser.NOT_EQ_2, 0); } + public TerminalNode IN() { return getToken(PythonParser.IN, 0); } + public TerminalNode IS() { return getToken(PythonParser.IS, 0); } + public TerminalNode NOT() { return getToken(PythonParser.NOT, 0); } + public ComparisonContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_comparison; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterComparison(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitComparison(this); + } + } + + public final ComparisonContext comparison() throws RecognitionException { + return comparison(0); + } + + private ComparisonContext comparison(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ComparisonContext _localctx = new ComparisonContext(_ctx, _parentState); + ComparisonContext _prevctx = _localctx; + int _startState = 76; + enterRecursionRule(_localctx, 76, RULE_comparison, _p); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(680); + expr(0); + } + _ctx.stop = _input.LT(-1); + setState(703); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,102,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new ComparisonContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_comparison); + setState(682); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(698); + switch (_input.LA(1)) { + case LESS_THAN: + { + setState(683); + match(LESS_THAN); + } + break; + case GREATER_THAN: + { + setState(684); + match(GREATER_THAN); + } + break; + case EQUALS: + { + setState(685); + match(EQUALS); + } + break; + case GT_EQ: + { + setState(686); + match(GT_EQ); + } + break; + case LT_EQ: + { + setState(687); + match(LT_EQ); + } + break; + case NOT_EQ_1: + { + setState(688); + match(NOT_EQ_1); + } + break; + case NOT_EQ_2: + { + setState(689); + match(NOT_EQ_2); + } + break; + case IN: + case NOT: + { + setState(691); + _la = _input.LA(1); + if (_la==NOT) { + { + setState(690); + ((ComparisonContext)_localctx).optional = match(NOT); + } + } + + setState(693); + match(IN); + } + break; + case IS: + { + setState(694); + match(IS); + setState(696); + _la = _input.LA(1); + if (_la==NOT) { + { + setState(695); + ((ComparisonContext)_localctx).optional = match(NOT); + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + setState(700); + comparison(3); + } + } + } + setState(705); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,102,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class ExprContext extends ParserRuleContext { + public Token op; + public List expr() { + return getRuleContexts(ExprContext.class); + } + public ExprContext expr(int i) { + return getRuleContext(ExprContext.class,i); + } + public TerminalNode ADD() { return getToken(PythonParser.ADD, 0); } + public TerminalNode MINUS() { return getToken(PythonParser.MINUS, 0); } + public TerminalNode NOT_OP() { return getToken(PythonParser.NOT_OP, 0); } + public AtomContext atom() { + return getRuleContext(AtomContext.class,0); + } + public TerminalNode AWAIT() { return getToken(PythonParser.AWAIT, 0); } + public List trailer() { + return getRuleContexts(TrailerContext.class); + } + public TrailerContext trailer(int i) { + return getRuleContext(TrailerContext.class,i); + } + public TerminalNode POWER() { return getToken(PythonParser.POWER, 0); } + public TerminalNode STAR() { return getToken(PythonParser.STAR, 0); } + public TerminalNode DIV() { return getToken(PythonParser.DIV, 0); } + public TerminalNode MOD() { return getToken(PythonParser.MOD, 0); } + public TerminalNode IDIV() { return getToken(PythonParser.IDIV, 0); } + public TerminalNode AT() { return getToken(PythonParser.AT, 0); } + public TerminalNode LEFT_SHIFT() { return getToken(PythonParser.LEFT_SHIFT, 0); } + public TerminalNode RIGHT_SHIFT() { return getToken(PythonParser.RIGHT_SHIFT, 0); } + public TerminalNode AND_OP() { return getToken(PythonParser.AND_OP, 0); } + public TerminalNode XOR() { return getToken(PythonParser.XOR, 0); } + public TerminalNode OR_OP() { return getToken(PythonParser.OR_OP, 0); } + public ExprContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expr; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterExpr(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitExpr(this); + } + } + + public final ExprContext expr() throws RecognitionException { + return expr(0); + } + + private ExprContext expr(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ExprContext _localctx = new ExprContext(_ctx, _parentState); + ExprContext _prevctx = _localctx; + int _startState = 78; + enterRecursionRule(_localctx, 78, RULE_expr, _p); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(719); + switch ( getInterpreter().adaptivePredict(_input,105,_ctx) ) { + case 1: + { + setState(707); + ((ExprContext)_localctx).op = _input.LT(1); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0)) ) { + ((ExprContext)_localctx).op = (Token)_errHandler.recoverInline(this); + } else { + consume(); + } + setState(708); + expr(7); + } + break; + case 2: + { + setState(710); + _la = _input.LA(1); + if (_la==AWAIT) { + { + setState(709); + match(AWAIT); + } + } + + setState(712); + atom(); + setState(716); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,104,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(713); + trailer(); + } + } + } + setState(718); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,104,_ctx); + } + } + break; + } + _ctx.stop = _input.LT(-1); + setState(744); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,107,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(742); + switch ( getInterpreter().adaptivePredict(_input,106,_ctx) ) { + case 1: + { + _localctx = new ExprContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expr); + setState(721); + if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); + setState(722); + ((ExprContext)_localctx).op = match(POWER); + setState(723); + expr(8); + } + break; + case 2: + { + _localctx = new ExprContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expr); + setState(724); + if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); + setState(725); + ((ExprContext)_localctx).op = _input.LT(1); + _la = _input.LA(1); + if ( !(((((_la - 44)) & ~0x3f) == 0 && ((1L << (_la - 44)) & ((1L << (STAR - 44)) | (1L << (DIV - 44)) | (1L << (MOD - 44)) | (1L << (IDIV - 44)) | (1L << (AT - 44)))) != 0)) ) { + ((ExprContext)_localctx).op = (Token)_errHandler.recoverInline(this); + } else { + consume(); + } + setState(726); + expr(7); + } + break; + case 3: + { + _localctx = new ExprContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expr); + setState(727); + if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); + setState(728); + ((ExprContext)_localctx).op = _input.LT(1); + _la = _input.LA(1); + if ( !(_la==ADD || _la==MINUS) ) { + ((ExprContext)_localctx).op = (Token)_errHandler.recoverInline(this); + } else { + consume(); + } + setState(729); + expr(6); + } + break; + case 4: + { + _localctx = new ExprContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expr); + setState(730); + if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)"); + setState(731); + ((ExprContext)_localctx).op = _input.LT(1); + _la = _input.LA(1); + if ( !(_la==LEFT_SHIFT || _la==RIGHT_SHIFT) ) { + ((ExprContext)_localctx).op = (Token)_errHandler.recoverInline(this); + } else { + consume(); + } + setState(732); + expr(5); + } + break; + case 5: + { + _localctx = new ExprContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expr); + setState(733); + if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); + setState(734); + ((ExprContext)_localctx).op = match(AND_OP); + setState(735); + expr(4); + } + break; + case 6: + { + _localctx = new ExprContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expr); + setState(736); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(737); + ((ExprContext)_localctx).op = match(XOR); + setState(738); + expr(3); + } + break; + case 7: + { + _localctx = new ExprContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expr); + setState(739); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(740); + ((ExprContext)_localctx).op = match(OR_OP); + setState(741); + expr(2); + } + break; + } + } + } + setState(746); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,107,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class AtomContext extends ParserRuleContext { + public TerminalNode OPEN_PAREN() { return getToken(PythonParser.OPEN_PAREN, 0); } + public TerminalNode CLOSE_PAREN() { return getToken(PythonParser.CLOSE_PAREN, 0); } + public Yield_exprContext yield_expr() { + return getRuleContext(Yield_exprContext.class,0); + } + public Testlist_compContext testlist_comp() { + return getRuleContext(Testlist_compContext.class,0); + } + public TerminalNode OPEN_BRACKET() { return getToken(PythonParser.OPEN_BRACKET, 0); } + public TerminalNode CLOSE_BRACKET() { return getToken(PythonParser.CLOSE_BRACKET, 0); } + public TerminalNode OPEN_BRACE() { return getToken(PythonParser.OPEN_BRACE, 0); } + public TerminalNode CLOSE_BRACE() { return getToken(PythonParser.CLOSE_BRACE, 0); } + public DictorsetmakerContext dictorsetmaker() { + return getRuleContext(DictorsetmakerContext.class,0); + } + public List REVERSE_QUOTE() { return getTokens(PythonParser.REVERSE_QUOTE); } + public TerminalNode REVERSE_QUOTE(int i) { + return getToken(PythonParser.REVERSE_QUOTE, i); + } + public TestlistContext testlist() { + return getRuleContext(TestlistContext.class,0); + } + public TerminalNode COMMA() { return getToken(PythonParser.COMMA, 0); } + public TerminalNode ELLIPSIS() { return getToken(PythonParser.ELLIPSIS, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public TerminalNode PRINT() { return getToken(PythonParser.PRINT, 0); } + public TerminalNode EXEC() { return getToken(PythonParser.EXEC, 0); } + public NumberContext number() { + return getRuleContext(NumberContext.class,0); + } + public TerminalNode MINUS() { return getToken(PythonParser.MINUS, 0); } + public TerminalNode NONE() { return getToken(PythonParser.NONE, 0); } + public List STRING() { return getTokens(PythonParser.STRING); } + public TerminalNode STRING(int i) { + return getToken(PythonParser.STRING, i); + } + public AtomContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_atom; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterAtom(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitAtom(this); + } + } + + public final AtomContext atom() throws RecognitionException { + AtomContext _localctx = new AtomContext(_ctx, getState()); + enterRule(_localctx, 80, RULE_atom); + int _la; + try { + int _alt; + setState(784); + switch (_input.LA(1)) { + case OPEN_PAREN: + enterOuterAlt(_localctx, 1); + { + setState(747); + match(OPEN_PAREN); + setState(750); + switch (_input.LA(1)) { + case YIELD: + { + setState(748); + yield_expr(); + } + break; + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case STAR: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + setState(749); + testlist_comp(); + } + break; + case CLOSE_PAREN: + break; + default: + throw new NoViableAltException(this); + } + setState(752); + match(CLOSE_PAREN); + } + break; + case OPEN_BRACKET: + enterOuterAlt(_localctx, 2); + { + setState(753); + match(OPEN_BRACKET); + setState(755); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << STAR) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(754); + testlist_comp(); + } + } + + setState(757); + match(CLOSE_BRACKET); + } + break; + case OPEN_BRACE: + enterOuterAlt(_localctx, 3); + { + setState(758); + match(OPEN_BRACE); + setState(760); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << STAR) | (1L << POWER) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(759); + dictorsetmaker(); + } + } + + setState(762); + match(CLOSE_BRACE); + } + break; + case REVERSE_QUOTE: + enterOuterAlt(_localctx, 4); + { + setState(763); + match(REVERSE_QUOTE); + setState(764); + testlist(); + setState(766); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(765); + match(COMMA); + } + } + + setState(768); + match(REVERSE_QUOTE); + } + break; + case ELLIPSIS: + enterOuterAlt(_localctx, 5); + { + setState(770); + match(ELLIPSIS); + } + break; + case TRUE: + case FALSE: + case NAME: + enterOuterAlt(_localctx, 6); + { + setState(771); + name(); + } + break; + case PRINT: + enterOuterAlt(_localctx, 7); + { + setState(772); + match(PRINT); + } + break; + case EXEC: + enterOuterAlt(_localctx, 8); + { + setState(773); + match(EXEC); + } + break; + case MINUS: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + enterOuterAlt(_localctx, 9); + { + setState(775); + _la = _input.LA(1); + if (_la==MINUS) { + { + setState(774); + match(MINUS); + } + } + + setState(777); + number(); + } + break; + case NONE: + enterOuterAlt(_localctx, 10); + { + setState(778); + match(NONE); + } + break; + case STRING: + enterOuterAlt(_localctx, 11); + { + setState(780); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(779); + match(STRING); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(782); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,113,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DictorsetmakerContext extends ParserRuleContext { + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public List COLON() { return getTokens(PythonParser.COLON); } + public TerminalNode COLON(int i) { + return getToken(PythonParser.COLON, i); + } + public List POWER() { return getTokens(PythonParser.POWER); } + public TerminalNode POWER(int i) { + return getToken(PythonParser.POWER, i); + } + public List expr() { + return getRuleContexts(ExprContext.class); + } + public ExprContext expr(int i) { + return getRuleContext(ExprContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Comp_forContext comp_for() { + return getRuleContext(Comp_forContext.class,0); + } + public Testlist_compContext testlist_comp() { + return getRuleContext(Testlist_compContext.class,0); + } + public DictorsetmakerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_dictorsetmaker; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterDictorsetmaker(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitDictorsetmaker(this); + } + } + + public final DictorsetmakerContext dictorsetmaker() throws RecognitionException { + DictorsetmakerContext _localctx = new DictorsetmakerContext(_ctx, getState()); + enterRule(_localctx, 82, RULE_dictorsetmaker); + int _la; + try { + int _alt; + setState(817); + switch ( getInterpreter().adaptivePredict(_input,119,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(792); + switch (_input.LA(1)) { + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + setState(786); + test(); + setState(787); + match(COLON); + setState(788); + test(); + } + break; + case POWER: + { + setState(790); + match(POWER); + setState(791); + expr(0); + } + break; + default: + throw new NoViableAltException(this); + } + setState(805); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,117,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(794); + match(COMMA); + setState(801); + switch (_input.LA(1)) { + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + setState(795); + test(); + setState(796); + match(COLON); + setState(797); + test(); + } + break; + case POWER: + { + setState(799); + match(POWER); + setState(800); + expr(0); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + } + setState(807); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,117,_ctx); + } + setState(809); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(808); + match(COMMA); + } + } + + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(811); + test(); + setState(812); + match(COLON); + setState(813); + test(); + setState(814); + comp_for(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(816); + testlist_comp(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Testlist_compContext extends ParserRuleContext { + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public List star_expr() { + return getRuleContexts(Star_exprContext.class); + } + public Star_exprContext star_expr(int i) { + return getRuleContext(Star_exprContext.class,i); + } + public Comp_forContext comp_for() { + return getRuleContext(Comp_forContext.class,0); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Testlist_compContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_testlist_comp; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterTestlist_comp(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitTestlist_comp(this); + } + } + + public final Testlist_compContext testlist_comp() throws RecognitionException { + Testlist_compContext _localctx = new Testlist_compContext(_ctx, getState()); + enterRule(_localctx, 84, RULE_testlist_comp); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(821); + switch (_input.LA(1)) { + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + setState(819); + test(); + } + break; + case STAR: + { + setState(820); + star_expr(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(837); + switch (_input.LA(1)) { + case FOR: + { + setState(823); + comp_for(); + } + break; + case COMMA: + case CLOSE_PAREN: + case CLOSE_BRACE: + case CLOSE_BRACKET: + { + setState(831); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,122,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(824); + match(COMMA); + setState(827); + switch (_input.LA(1)) { + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + setState(825); + test(); + } + break; + case STAR: + { + setState(826); + star_expr(); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + } + setState(833); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,122,_ctx); + } + setState(835); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(834); + match(COMMA); + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TestlistContext extends ParserRuleContext { + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public TestlistContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_testlist; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterTestlist(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitTestlist(this); + } + } + + public final TestlistContext testlist() throws RecognitionException { + TestlistContext _localctx = new TestlistContext(_ctx, getState()); + enterRule(_localctx, 86, RULE_testlist); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(839); + test(); + setState(844); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,125,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(840); + match(COMMA); + setState(841); + test(); + } + } + } + setState(846); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,125,_ctx); + } + setState(848); + switch ( getInterpreter().adaptivePredict(_input,126,_ctx) ) { + case 1: + { + setState(847); + match(COMMA); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Dotted_nameContext extends ParserRuleContext { + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public Dotted_nameContext dotted_name() { + return getRuleContext(Dotted_nameContext.class,0); + } + public TerminalNode DOT() { return getToken(PythonParser.DOT, 0); } + public Dotted_nameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_dotted_name; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterDotted_name(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitDotted_name(this); + } + } + + public final Dotted_nameContext dotted_name() throws RecognitionException { + return dotted_name(0); + } + + private Dotted_nameContext dotted_name(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + Dotted_nameContext _localctx = new Dotted_nameContext(_ctx, _parentState); + Dotted_nameContext _prevctx = _localctx; + int _startState = 88; + enterRecursionRule(_localctx, 88, RULE_dotted_name, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(851); + name(); + } + _ctx.stop = _input.LT(-1); + setState(858); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,127,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new Dotted_nameContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_dotted_name); + setState(853); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(854); + match(DOT); + setState(855); + name(); + } + } + } + setState(860); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,127,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class NameContext extends ParserRuleContext { + public TerminalNode NAME() { return getToken(PythonParser.NAME, 0); } + public TerminalNode TRUE() { return getToken(PythonParser.TRUE, 0); } + public TerminalNode FALSE() { return getToken(PythonParser.FALSE, 0); } + public NameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_name; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitName(this); + } + } + + public final NameContext name() throws RecognitionException { + NameContext _localctx = new NameContext(_ctx, getState()); + enterRule(_localctx, 90, RULE_name); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(861); + _la = _input.LA(1); + if ( !(((((_la - 39)) & ~0x3f) == 0 && ((1L << (_la - 39)) & ((1L << (TRUE - 39)) | (1L << (FALSE - 39)) | (1L << (NAME - 39)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NumberContext extends ParserRuleContext { + public IntegerContext integer() { + return getRuleContext(IntegerContext.class,0); + } + public TerminalNode IMAG_NUMBER() { return getToken(PythonParser.IMAG_NUMBER, 0); } + public TerminalNode FLOAT_NUMBER() { return getToken(PythonParser.FLOAT_NUMBER, 0); } + public NumberContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_number; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterNumber(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitNumber(this); + } + } + + public final NumberContext number() throws RecognitionException { + NumberContext _localctx = new NumberContext(_ctx, getState()); + enterRule(_localctx, 92, RULE_number); + try { + setState(866); + switch (_input.LA(1)) { + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + enterOuterAlt(_localctx, 1); + { + setState(863); + integer(); + } + break; + case IMAG_NUMBER: + enterOuterAlt(_localctx, 2); + { + setState(864); + match(IMAG_NUMBER); + } + break; + case FLOAT_NUMBER: + enterOuterAlt(_localctx, 3); + { + setState(865); + match(FLOAT_NUMBER); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IntegerContext extends ParserRuleContext { + public TerminalNode DECIMAL_INTEGER() { return getToken(PythonParser.DECIMAL_INTEGER, 0); } + public TerminalNode OCT_INTEGER() { return getToken(PythonParser.OCT_INTEGER, 0); } + public TerminalNode HEX_INTEGER() { return getToken(PythonParser.HEX_INTEGER, 0); } + public TerminalNode BIN_INTEGER() { return getToken(PythonParser.BIN_INTEGER, 0); } + public IntegerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_integer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterInteger(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitInteger(this); + } + } + + public final IntegerContext integer() throws RecognitionException { + IntegerContext _localctx = new IntegerContext(_ctx, getState()); + enterRule(_localctx, 94, RULE_integer); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(868); + _la = _input.LA(1); + if ( !(((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & ((1L << (DECIMAL_INTEGER - 84)) | (1L << (OCT_INTEGER - 84)) | (1L << (HEX_INTEGER - 84)) | (1L << (BIN_INTEGER - 84)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Yield_exprContext extends ParserRuleContext { + public TerminalNode YIELD() { return getToken(PythonParser.YIELD, 0); } + public Yield_argContext yield_arg() { + return getRuleContext(Yield_argContext.class,0); + } + public Yield_exprContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_yield_expr; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterYield_expr(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitYield_expr(this); + } + } + + public final Yield_exprContext yield_expr() throws RecognitionException { + Yield_exprContext _localctx = new Yield_exprContext(_ctx, getState()); + enterRule(_localctx, 96, RULE_yield_expr); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(870); + match(YIELD); + setState(872); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << FROM) | (1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(871); + yield_arg(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Yield_argContext extends ParserRuleContext { + public TerminalNode FROM() { return getToken(PythonParser.FROM, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public TestlistContext testlist() { + return getRuleContext(TestlistContext.class,0); + } + public Yield_argContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_yield_arg; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterYield_arg(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitYield_arg(this); + } + } + + public final Yield_argContext yield_arg() throws RecognitionException { + Yield_argContext _localctx = new Yield_argContext(_ctx, getState()); + enterRule(_localctx, 98, RULE_yield_arg); + try { + setState(877); + switch (_input.LA(1)) { + case FROM: + enterOuterAlt(_localctx, 1); + { + setState(874); + match(FROM); + setState(875); + test(); + } + break; + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + enterOuterAlt(_localctx, 2); + { + setState(876); + testlist(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TrailerContext extends ParserRuleContext { + public TerminalNode DOT() { return getToken(PythonParser.DOT, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public TrailerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_trailer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterTrailer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitTrailer(this); + } + } + + public final TrailerContext trailer() throws RecognitionException { + TrailerContext _localctx = new TrailerContext(_ctx, getState()); + enterRule(_localctx, 100, RULE_trailer); + try { + setState(885); + switch (_input.LA(1)) { + case DOT: + enterOuterAlt(_localctx, 1); + { + setState(879); + match(DOT); + setState(880); + name(); + setState(882); + switch ( getInterpreter().adaptivePredict(_input,131,_ctx) ) { + case 1: + { + setState(881); + arguments(); + } + break; + } + } + break; + case OPEN_PAREN: + case OPEN_BRACKET: + enterOuterAlt(_localctx, 2); + { + setState(884); + arguments(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArgumentsContext extends ParserRuleContext { + public TerminalNode OPEN_PAREN() { return getToken(PythonParser.OPEN_PAREN, 0); } + public TerminalNode CLOSE_PAREN() { return getToken(PythonParser.CLOSE_PAREN, 0); } + public ArglistContext arglist() { + return getRuleContext(ArglistContext.class,0); + } + public TerminalNode OPEN_BRACKET() { return getToken(PythonParser.OPEN_BRACKET, 0); } + public SubscriptlistContext subscriptlist() { + return getRuleContext(SubscriptlistContext.class,0); + } + public TerminalNode CLOSE_BRACKET() { return getToken(PythonParser.CLOSE_BRACKET, 0); } + public ArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitArguments(this); + } + } + + public final ArgumentsContext arguments() throws RecognitionException { + ArgumentsContext _localctx = new ArgumentsContext(_ctx, getState()); + enterRule(_localctx, 102, RULE_arguments); + int _la; + try { + setState(896); + switch (_input.LA(1)) { + case OPEN_PAREN: + enterOuterAlt(_localctx, 1); + { + setState(887); + match(OPEN_PAREN); + setState(889); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << STAR) | (1L << POWER) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(888); + arglist(); + } + } + + setState(891); + match(CLOSE_PAREN); + } + break; + case OPEN_BRACKET: + enterOuterAlt(_localctx, 2); + { + setState(892); + match(OPEN_BRACKET); + setState(893); + subscriptlist(); + setState(894); + match(CLOSE_BRACKET); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArglistContext extends ParserRuleContext { + public List argument() { + return getRuleContexts(ArgumentContext.class); + } + public ArgumentContext argument(int i) { + return getRuleContext(ArgumentContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public ArglistContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arglist; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterArglist(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitArglist(this); + } + } + + public final ArglistContext arglist() throws RecognitionException { + ArglistContext _localctx = new ArglistContext(_ctx, getState()); + enterRule(_localctx, 104, RULE_arglist); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(898); + argument(); + setState(903); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,135,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(899); + match(COMMA); + setState(900); + argument(); + } + } + } + setState(905); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,135,_ctx); + } + setState(907); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(906); + match(COMMA); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArgumentContext extends ParserRuleContext { + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public Comp_forContext comp_for() { + return getRuleContext(Comp_forContext.class,0); + } + public TerminalNode ASSIGN() { return getToken(PythonParser.ASSIGN, 0); } + public TerminalNode POWER() { return getToken(PythonParser.POWER, 0); } + public TerminalNode STAR() { return getToken(PythonParser.STAR, 0); } + public ArgumentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_argument; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterArgument(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitArgument(this); + } + } + + public final ArgumentContext argument() throws RecognitionException { + ArgumentContext _localctx = new ArgumentContext(_ctx, getState()); + enterRule(_localctx, 106, RULE_argument); + int _la; + try { + setState(917); + switch (_input.LA(1)) { + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + enterOuterAlt(_localctx, 1); + { + setState(909); + test(); + setState(913); + switch (_input.LA(1)) { + case FOR: + { + setState(910); + comp_for(); + } + break; + case ASSIGN: + { + setState(911); + match(ASSIGN); + setState(912); + test(); + } + break; + case COMMA: + case CLOSE_PAREN: + break; + default: + throw new NoViableAltException(this); + } + } + break; + case STAR: + case POWER: + enterOuterAlt(_localctx, 2); + { + setState(915); + _la = _input.LA(1); + if ( !(_la==STAR || _la==POWER) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(916); + test(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SubscriptlistContext extends ParserRuleContext { + public List subscript() { + return getRuleContexts(SubscriptContext.class); + } + public SubscriptContext subscript(int i) { + return getRuleContext(SubscriptContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public SubscriptlistContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_subscriptlist; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterSubscriptlist(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitSubscriptlist(this); + } + } + + public final SubscriptlistContext subscriptlist() throws RecognitionException { + SubscriptlistContext _localctx = new SubscriptlistContext(_ctx, getState()); + enterRule(_localctx, 108, RULE_subscriptlist); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(919); + subscript(); + setState(924); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,139,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(920); + match(COMMA); + setState(921); + subscript(); + } + } + } + setState(926); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,139,_ctx); + } + setState(928); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(927); + match(COMMA); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SubscriptContext extends ParserRuleContext { + public TerminalNode ELLIPSIS() { return getToken(PythonParser.ELLIPSIS, 0); } + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SliceopContext sliceop() { + return getRuleContext(SliceopContext.class,0); + } + public SubscriptContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_subscript; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterSubscript(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitSubscript(this); + } + } + + public final SubscriptContext subscript() throws RecognitionException { + SubscriptContext _localctx = new SubscriptContext(_ctx, getState()); + enterRule(_localctx, 110, RULE_subscript); + int _la; + try { + setState(948); + switch ( getInterpreter().adaptivePredict(_input,146,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(930); + match(ELLIPSIS); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(931); + test(); + setState(939); + _la = _input.LA(1); + if (_la==COLON) { + { + setState(932); + match(COLON); + setState(934); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(933); + test(); + } + } + + setState(937); + _la = _input.LA(1); + if (_la==COLON) { + { + setState(936); + sliceop(); + } + } + + } + } + + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(941); + match(COLON); + setState(943); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(942); + test(); + } + } + + setState(946); + _la = _input.LA(1); + if (_la==COLON) { + { + setState(945); + sliceop(); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SliceopContext extends ParserRuleContext { + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public SliceopContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_sliceop; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterSliceop(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitSliceop(this); + } + } + + public final SliceopContext sliceop() throws RecognitionException { + SliceopContext _localctx = new SliceopContext(_ctx, getState()); + enterRule(_localctx, 112, RULE_sliceop); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(950); + match(COLON); + setState(952); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(951); + test(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Comp_forContext extends ParserRuleContext { + public TerminalNode FOR() { return getToken(PythonParser.FOR, 0); } + public ExprlistContext exprlist() { + return getRuleContext(ExprlistContext.class,0); + } + public TerminalNode IN() { return getToken(PythonParser.IN, 0); } + public Logical_testContext logical_test() { + return getRuleContext(Logical_testContext.class,0); + } + public Comp_iterContext comp_iter() { + return getRuleContext(Comp_iterContext.class,0); + } + public Comp_forContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_comp_for; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterComp_for(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitComp_for(this); + } + } + + public final Comp_forContext comp_for() throws RecognitionException { + Comp_forContext _localctx = new Comp_forContext(_ctx, getState()); + enterRule(_localctx, 114, RULE_comp_for); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(954); + match(FOR); + setState(955); + exprlist(); + setState(956); + match(IN); + setState(957); + logical_test(0); + setState(959); + _la = _input.LA(1); + if (_la==IF || _la==FOR) { + { + setState(958); + comp_iter(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Comp_iterContext extends ParserRuleContext { + public Comp_forContext comp_for() { + return getRuleContext(Comp_forContext.class,0); + } + public TerminalNode IF() { return getToken(PythonParser.IF, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public Comp_iterContext comp_iter() { + return getRuleContext(Comp_iterContext.class,0); + } + public Comp_iterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_comp_iter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterComp_iter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitComp_iter(this); + } + } + + public final Comp_iterContext comp_iter() throws RecognitionException { + Comp_iterContext _localctx = new Comp_iterContext(_ctx, getState()); + enterRule(_localctx, 116, RULE_comp_iter); + int _la; + try { + setState(967); + switch (_input.LA(1)) { + case FOR: + enterOuterAlt(_localctx, 1); + { + setState(961); + comp_for(); + } + break; + case IF: + enterOuterAlt(_localctx, 2); + { + setState(962); + match(IF); + setState(963); + test(); + setState(965); + _la = _input.LA(1); + if (_la==IF || _la==FOR) { + { + setState(964); + comp_iter(); + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 12: + return except_clause_sempred((Except_clauseContext)_localctx, predIndex); + case 22: + return small_stmt_sempred((Small_stmtContext)_localctx, predIndex); + case 25: + return assign_part_sempred((Assign_partContext)_localctx, predIndex); + case 37: + return logical_test_sempred((Logical_testContext)_localctx, predIndex); + case 38: + return comparison_sempred((ComparisonContext)_localctx, predIndex); + case 39: + return expr_sempred((ExprContext)_localctx, predIndex); + case 44: + return dotted_name_sempred((Dotted_nameContext)_localctx, predIndex); + } + return true; + } + private boolean except_clause_sempred(Except_clauseContext _localctx, int predIndex) { + switch (predIndex) { + case 0: + return this.CheckVersion(2); + case 1: + return this.CheckVersion(3); + } + return true; + } + private boolean small_stmt_sempred(Small_stmtContext _localctx, int predIndex) { + switch (predIndex) { + case 2: + return this.CheckVersion(2); + case 3: + return this.CheckVersion(2); + case 4: + return this.CheckVersion(3); + } + return true; + } + private boolean assign_part_sempred(Assign_partContext _localctx, int predIndex) { + switch (predIndex) { + case 5: + return this.CheckVersion(3); + } + return true; + } + private boolean logical_test_sempred(Logical_testContext _localctx, int predIndex) { + switch (predIndex) { + case 6: + return precpred(_ctx, 2); + case 7: + return precpred(_ctx, 1); + } + return true; + } + private boolean comparison_sempred(ComparisonContext _localctx, int predIndex) { + switch (predIndex) { + case 8: + return precpred(_ctx, 2); + } + return true; + } + private boolean expr_sempred(ExprContext _localctx, int predIndex) { + switch (predIndex) { + case 9: + return precpred(_ctx, 8); + case 10: + return precpred(_ctx, 6); + case 11: + return precpred(_ctx, 5); + case 12: + return precpred(_ctx, 4); + case 13: + return precpred(_ctx, 3); + case 14: + return precpred(_ctx, 2); + case 15: + return precpred(_ctx, 1); + } + return true; + } + private boolean dotted_name_sempred(Dotted_nameContext _localctx, int predIndex) { + switch (predIndex) { + case 16: + return precpred(_ctx, 2); + } + return true; + } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3f\u03cc\4\2\t\2\4"+ + "\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+ + "\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ + "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\3\2\3"+ + "\2\3\2\5\2|\n\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\5\3\u0085\n\3\3\4\3\4\6\4"+ + "\u0089\n\4\r\4\16\4\u008a\3\5\3\5\7\5\u008f\n\5\f\5\16\5\u0092\13\5\3"+ + "\6\3\6\5\6\u0096\n\6\3\7\3\7\3\7\3\7\3\7\7\7\u009d\n\7\f\7\16\7\u00a0"+ + "\13\7\3\7\5\7\u00a3\n\7\3\7\3\7\3\7\3\7\3\7\5\7\u00aa\n\7\3\7\5\7\u00ad"+ + "\n\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\5\7\u00b6\n\7\3\7\3\7\3\7\3\7\6\7\u00bc"+ + "\n\7\r\7\16\7\u00bd\3\7\5\7\u00c1\n\7\3\7\5\7\u00c4\n\7\3\7\5\7\u00c7"+ + "\n\7\3\7\5\7\u00ca\n\7\3\7\3\7\3\7\3\7\7\7\u00d0\n\7\f\7\16\7\u00d3\13"+ + "\7\3\7\3\7\3\7\3\7\7\7\u00d9\n\7\f\7\16\7\u00dc\13\7\3\7\3\7\5\7\u00e0"+ + "\n\7\5\7\u00e2\n\7\3\b\3\b\3\b\3\b\6\b\u00e8\n\b\r\b\16\b\u00e9\3\b\3"+ + "\b\5\b\u00ee\n\b\3\t\3\t\3\t\3\t\5\t\u00f4\n\t\3\t\5\t\u00f7\n\t\3\t\3"+ + "\t\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\r\3\r\3\r"+ + "\5\r\u010b\n\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16"+ + "\3\16\5\16\u0119\n\16\5\16\u011b\n\16\3\16\3\16\3\16\3\17\3\17\3\17\3"+ + "\17\5\17\u0124\n\17\3\17\5\17\u0127\n\17\3\17\3\17\3\17\3\20\5\20\u012d"+ + "\n\20\3\20\3\20\3\20\3\20\5\20\u0133\n\20\3\20\3\20\3\20\5\20\u0138\n"+ + "\20\3\20\3\20\3\20\3\21\3\21\3\21\5\21\u0140\n\21\3\21\3\21\3\21\5\21"+ + "\u0145\n\21\3\21\3\21\5\21\u0149\n\21\3\21\5\21\u014c\n\21\3\21\5\21\u014f"+ + "\n\21\3\21\3\21\5\21\u0153\n\21\5\21\u0155\n\21\3\22\3\22\3\22\3\23\3"+ + "\23\3\23\3\24\3\24\3\24\7\24\u0160\n\24\f\24\16\24\u0163\13\24\3\25\3"+ + "\25\3\25\5\25\u0168\n\25\3\25\5\25\u016b\n\25\3\26\3\26\3\26\5\26\u0170"+ + "\n\26\3\27\3\27\3\27\7\27\u0175\n\27\f\27\16\27\u0178\13\27\3\27\5\27"+ + "\u017b\n\27\3\27\3\27\3\30\3\30\5\30\u0181\n\30\3\30\3\30\3\30\3\30\3"+ + "\30\7\30\u0188\n\30\f\30\16\30\u018b\13\30\3\30\5\30\u018e\n\30\3\30\3"+ + "\30\3\30\3\30\6\30\u0194\n\30\r\30\16\30\u0195\3\30\5\30\u0199\n\30\5"+ + "\30\u019b\n\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\5\30\u01a6"+ + "\n\30\3\30\3\30\3\30\3\30\3\30\3\30\5\30\u01ae\n\30\5\30\u01b0\n\30\5"+ + "\30\u01b2\n\30\3\30\3\30\5\30\u01b6\n\30\3\30\3\30\3\30\3\30\3\30\7\30"+ + "\u01bd\n\30\f\30\16\30\u01c0\13\30\3\30\3\30\6\30\u01c4\n\30\r\30\16\30"+ + "\u01c5\5\30\u01c8\n\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\5\30\u01d1\n"+ + "\30\3\30\3\30\3\30\3\30\7\30\u01d7\n\30\f\30\16\30\u01da\13\30\3\30\3"+ + "\30\3\30\3\30\3\30\3\30\3\30\5\30\u01e3\n\30\5\30\u01e5\n\30\3\30\3\30"+ + "\3\30\3\30\3\30\3\30\5\30\u01ed\n\30\3\30\3\30\3\30\3\30\3\30\7\30\u01f4"+ + "\n\30\f\30\16\30\u01f7\13\30\3\30\3\30\5\30\u01fb\n\30\3\31\3\31\5\31"+ + "\u01ff\n\31\3\31\3\31\6\31\u0203\n\31\r\31\16\31\u0204\3\31\3\31\5\31"+ + "\u0209\n\31\3\31\5\31\u020c\n\31\3\32\3\32\3\32\3\33\3\33\3\33\3\33\7"+ + "\33\u0215\n\33\f\33\16\33\u0218\13\33\3\33\3\33\5\33\u021c\n\33\3\33\5"+ + "\33\u021f\n\33\3\33\3\33\3\33\3\33\3\33\5\33\u0226\n\33\3\33\3\33\3\33"+ + "\3\33\3\33\5\33\u022d\n\33\5\33\u022f\n\33\3\34\3\34\3\34\7\34\u0234\n"+ + "\34\f\34\16\34\u0237\13\34\3\34\5\34\u023a\n\34\3\35\3\35\3\35\7\35\u023f"+ + "\n\35\f\35\16\35\u0242\13\35\3\35\5\35\u0245\n\35\3\36\3\36\3\36\5\36"+ + "\u024a\n\36\3\37\3\37\3\37\7\37\u024f\n\37\f\37\16\37\u0252\13\37\3 \3"+ + " \3 \5 \u0257\n \3!\3!\3!\3!\3!\3!\5!\u025f\n!\3!\3!\5!\u0263\n!\3!\3"+ + "!\5!\u0267\n!\3\"\3\"\3\"\5\"\u026c\n\"\3\"\3\"\3\"\5\"\u0271\n\"\3\""+ + "\3\"\5\"\u0275\n\"\3\"\5\"\u0278\n\"\3\"\5\"\u027b\n\"\3\"\3\"\5\"\u027f"+ + "\n\"\5\"\u0281\n\"\3#\3#\3#\7#\u0286\n#\f#\16#\u0289\13#\3$\3$\3$\5$\u028e"+ + "\n$\3$\5$\u0291\n$\3%\3%\3%\3&\3&\3&\3\'\3\'\3\'\3\'\5\'\u029d\n\'\3\'"+ + "\3\'\3\'\3\'\3\'\3\'\7\'\u02a5\n\'\f\'\16\'\u02a8\13\'\3(\3(\3(\3(\3("+ + "\3(\3(\3(\3(\3(\3(\3(\5(\u02b6\n(\3(\3(\3(\5(\u02bb\n(\5(\u02bd\n(\3("+ + "\7(\u02c0\n(\f(\16(\u02c3\13(\3)\3)\3)\3)\5)\u02c9\n)\3)\3)\7)\u02cd\n"+ + ")\f)\16)\u02d0\13)\5)\u02d2\n)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)"+ + "\3)\3)\3)\3)\3)\3)\3)\3)\7)\u02e9\n)\f)\16)\u02ec\13)\3*\3*\3*\5*\u02f1"+ + "\n*\3*\3*\3*\5*\u02f6\n*\3*\3*\3*\5*\u02fb\n*\3*\3*\3*\3*\5*\u0301\n*"+ + "\3*\3*\3*\3*\3*\3*\3*\5*\u030a\n*\3*\3*\3*\6*\u030f\n*\r*\16*\u0310\5"+ + "*\u0313\n*\3+\3+\3+\3+\3+\3+\5+\u031b\n+\3+\3+\3+\3+\3+\3+\3+\5+\u0324"+ + "\n+\7+\u0326\n+\f+\16+\u0329\13+\3+\5+\u032c\n+\3+\3+\3+\3+\3+\3+\5+\u0334"+ + "\n+\3,\3,\5,\u0338\n,\3,\3,\3,\3,\5,\u033e\n,\7,\u0340\n,\f,\16,\u0343"+ + "\13,\3,\5,\u0346\n,\5,\u0348\n,\3-\3-\3-\7-\u034d\n-\f-\16-\u0350\13-"+ + "\3-\5-\u0353\n-\3.\3.\3.\3.\3.\3.\7.\u035b\n.\f.\16.\u035e\13.\3/\3/\3"+ + "\60\3\60\3\60\5\60\u0365\n\60\3\61\3\61\3\62\3\62\5\62\u036b\n\62\3\63"+ + "\3\63\3\63\5\63\u0370\n\63\3\64\3\64\3\64\5\64\u0375\n\64\3\64\5\64\u0378"+ + "\n\64\3\65\3\65\5\65\u037c\n\65\3\65\3\65\3\65\3\65\3\65\5\65\u0383\n"+ + "\65\3\66\3\66\3\66\7\66\u0388\n\66\f\66\16\66\u038b\13\66\3\66\5\66\u038e"+ + "\n\66\3\67\3\67\3\67\3\67\5\67\u0394\n\67\3\67\3\67\5\67\u0398\n\67\3"+ + "8\38\38\78\u039d\n8\f8\168\u03a0\138\38\58\u03a3\n8\39\39\39\39\59\u03a9"+ + "\n9\39\59\u03ac\n9\59\u03ae\n9\39\39\59\u03b2\n9\39\59\u03b5\n9\59\u03b7"+ + "\n9\3:\3:\5:\u03bb\n:\3;\3;\3;\3;\3;\5;\u03c2\n;\3<\3<\3<\3<\5<\u03c8"+ + "\n<\5<\u03ca\n<\3<\2\6LNPZ=\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \""+ + "$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtv\2\f\3\3\5\5\3\2+,"+ + "\3\2HT\4\29:>>\5\2..;=FF\3\29:\3\2\678\4\2)*bb\3\2VY\4\2..\62\62\u0459"+ + "\2{\3\2\2\2\4\u0084\3\2\2\2\6\u0088\3\2\2\2\b\u008c\3\2\2\2\n\u0095\3"+ + "\2\2\2\f\u00e1\3\2\2\2\16\u00ed\3\2\2\2\20\u00ef\3\2\2\2\22\u00fa\3\2"+ + "\2\2\24\u00ff\3\2\2\2\26\u0103\3\2\2\2\30\u0107\3\2\2\2\32\u010c\3\2\2"+ + "\2\34\u011f\3\2\2\2\36\u012c\3\2\2\2 \u0154\3\2\2\2\"\u0156\3\2\2\2$\u0159"+ + "\3\2\2\2&\u015c\3\2\2\2(\u016a\3\2\2\2*\u016c\3\2\2\2,\u0171\3\2\2\2."+ + "\u01fa\3\2\2\2\60\u020b\3\2\2\2\62\u020d\3\2\2\2\64\u022e\3\2\2\2\66\u0230"+ + "\3\2\2\28\u023b\3\2\2\2:\u0246\3\2\2\2<\u024b\3\2\2\2>\u0253\3\2\2\2@"+ + "\u0266\3\2\2\2B\u0280\3\2\2\2D\u0282\3\2\2\2F\u0290\3\2\2\2H\u0292\3\2"+ + "\2\2J\u0295\3\2\2\2L\u029c\3\2\2\2N\u02a9\3\2\2\2P\u02d1\3\2\2\2R\u0312"+ + "\3\2\2\2T\u0333\3\2\2\2V\u0337\3\2\2\2X\u0349\3\2\2\2Z\u0354\3\2\2\2\\"+ + "\u035f\3\2\2\2^\u0364\3\2\2\2`\u0366\3\2\2\2b\u0368\3\2\2\2d\u036f\3\2"+ + "\2\2f\u0377\3\2\2\2h\u0382\3\2\2\2j\u0384\3\2\2\2l\u0397\3\2\2\2n\u0399"+ + "\3\2\2\2p\u03b6\3\2\2\2r\u03b8\3\2\2\2t\u03bc\3\2\2\2v\u03c9\3\2\2\2x"+ + "|\5\4\3\2y|\5\6\4\2z|\5\b\5\2{x\3\2\2\2{y\3\2\2\2{z\3\2\2\2{|\3\2\2\2"+ + "|}\3\2\2\2}~\7\2\2\3~\3\3\2\2\2\177\u0085\7\5\2\2\u0080\u0085\5,\27\2"+ + "\u0081\u0082\5\f\7\2\u0082\u0083\7\5\2\2\u0083\u0085\3\2\2\2\u0084\177"+ + "\3\2\2\2\u0084\u0080\3\2\2\2\u0084\u0081\3\2\2\2\u0085\5\3\2\2\2\u0086"+ + "\u0089\7\5\2\2\u0087\u0089\5\n\6\2\u0088\u0086\3\2\2\2\u0088\u0087\3\2"+ + "\2\2\u0089\u008a\3\2\2\2\u008a\u0088\3\2\2\2\u008a\u008b\3\2\2\2\u008b"+ + "\7\3\2\2\2\u008c\u0090\5X-\2\u008d\u008f\7\5\2\2\u008e\u008d\3\2\2\2\u008f"+ + "\u0092\3\2\2\2\u0090\u008e\3\2\2\2\u0090\u0091\3\2\2\2\u0091\t\3\2\2\2"+ + "\u0092\u0090\3\2\2\2\u0093\u0096\5,\27\2\u0094\u0096\5\f\7\2\u0095\u0093"+ + "\3\2\2\2\u0095\u0094\3\2\2\2\u0096\13\3\2\2\2\u0097\u0098\7\17\2\2\u0098"+ + "\u0099\5@!\2\u0099\u009a\7\60\2\2\u009a\u009e\5\16\b\2\u009b\u009d\5\22"+ + "\n\2\u009c\u009b\3\2\2\2\u009d\u00a0\3\2\2\2\u009e\u009c\3\2\2\2\u009e"+ + "\u009f\3\2\2\2\u009f\u00a2\3\2\2\2\u00a0\u009e\3\2\2\2\u00a1\u00a3\5\24"+ + "\13\2\u00a2\u00a1\3\2\2\2\u00a2\u00a3\3\2\2\2\u00a3\u00e2\3\2\2\2\u00a4"+ + "\u00a5\7\22\2\2\u00a5\u00a6\5@!\2\u00a6\u00a7\7\60\2\2\u00a7\u00a9\5\16"+ + "\b\2\u00a8\u00aa\5\24\13\2\u00a9\u00a8\3\2\2\2\u00a9\u00aa\3\2\2\2\u00aa"+ + "\u00e2\3\2\2\2\u00ab\u00ad\7%\2\2\u00ac\u00ab\3\2\2\2\u00ac\u00ad\3\2"+ + "\2\2\u00ad\u00ae\3\2\2\2\u00ae\u00af\7\23\2\2\u00af\u00b0\5\66\34\2\u00b0"+ + "\u00b1\7\24\2\2\u00b1\u00b2\5X-\2\u00b2\u00b3\7\60\2\2\u00b3\u00b5\5\16"+ + "\b\2\u00b4\u00b6\5\24\13\2\u00b5\u00b4\3\2\2\2\u00b5\u00b6\3\2\2\2\u00b6"+ + "\u00e2\3\2\2\2\u00b7\u00b8\7\25\2\2\u00b8\u00b9\7\60\2\2\u00b9\u00c6\5"+ + "\16\b\2\u00ba\u00bc\5\32\16\2\u00bb\u00ba\3\2\2\2\u00bc\u00bd\3\2\2\2"+ + "\u00bd\u00bb\3\2\2\2\u00bd\u00be\3\2\2\2\u00be\u00c0\3\2\2\2\u00bf\u00c1"+ + "\5\24\13\2\u00c0\u00bf\3\2\2\2\u00c0\u00c1\3\2\2\2\u00c1\u00c3\3\2\2\2"+ + "\u00c2\u00c4\5\26\f\2\u00c3\u00c2\3\2\2\2\u00c3\u00c4\3\2\2\2\u00c4\u00c7"+ + "\3\2\2\2\u00c5\u00c7\5\26\f\2\u00c6\u00bb\3\2\2\2\u00c6\u00c5\3\2\2\2"+ + "\u00c7\u00e2\3\2\2\2\u00c8\u00ca\7%\2\2\u00c9\u00c8\3\2\2\2\u00c9\u00ca"+ + "\3\2\2\2\u00ca\u00cb\3\2\2\2\u00cb\u00cc\7\30\2\2\u00cc\u00d1\5\30\r\2"+ + "\u00cd\u00ce\7/\2\2\u00ce\u00d0\5\30\r\2\u00cf\u00cd\3\2\2\2\u00d0\u00d3"+ + "\3\2\2\2\u00d1\u00cf\3\2\2\2\u00d1\u00d2\3\2\2\2\u00d2\u00d4\3\2\2\2\u00d3"+ + "\u00d1\3\2\2\2\u00d4\u00d5\7\60\2\2\u00d5\u00d6\5\16\b\2\u00d6\u00e2\3"+ + "\2\2\2\u00d7\u00d9\5\20\t\2\u00d8\u00d7\3\2\2\2\u00d9\u00dc\3\2\2\2\u00da"+ + "\u00d8\3\2\2\2\u00da\u00db\3\2\2\2\u00db\u00df\3\2\2\2\u00dc\u00da\3\2"+ + "\2\2\u00dd\u00e0\5\34\17\2\u00de\u00e0\5\36\20\2\u00df\u00dd\3\2\2\2\u00df"+ + "\u00de\3\2\2\2\u00e0\u00e2\3\2\2\2\u00e1\u0097\3\2\2\2\u00e1\u00a4\3\2"+ + "\2\2\u00e1\u00ac\3\2\2\2\u00e1\u00b7\3\2\2\2\u00e1\u00c9\3\2\2\2\u00e1"+ + "\u00da\3\2\2\2\u00e2\r\3\2\2\2\u00e3\u00ee\5,\27\2\u00e4\u00e5\7\5\2\2"+ + "\u00e5\u00e7\7\3\2\2\u00e6\u00e8\5\n\6\2\u00e7\u00e6\3\2\2\2\u00e8\u00e9"+ + "\3\2\2\2\u00e9\u00e7\3\2\2\2\u00e9\u00ea\3\2\2\2\u00ea\u00eb\3\2\2\2\u00eb"+ + "\u00ec\7\4\2\2\u00ec\u00ee\3\2\2\2\u00ed\u00e3\3\2\2\2\u00ed\u00e4\3\2"+ + "\2\2\u00ee\17\3\2\2\2\u00ef\u00f0\7F\2\2\u00f0\u00f6\5Z.\2\u00f1\u00f3"+ + "\7\\\2\2\u00f2\u00f4\5j\66\2\u00f3\u00f2\3\2\2\2\u00f3\u00f4\3\2\2\2\u00f4"+ + "\u00f5\3\2\2\2\u00f5\u00f7\7]\2\2\u00f6\u00f1\3\2\2\2\u00f6\u00f7\3\2"+ + "\2\2\u00f7\u00f8\3\2\2\2\u00f8\u00f9\7\5\2\2\u00f9\21\3\2\2\2\u00fa\u00fb"+ + "\7\20\2\2\u00fb\u00fc\5@!\2\u00fc\u00fd\7\60\2\2\u00fd\u00fe\5\16\b\2"+ + "\u00fe\23\3\2\2\2\u00ff\u0100\7\21\2\2\u0100\u0101\7\60\2\2\u0101\u0102"+ + "\5\16\b\2\u0102\25\3\2\2\2\u0103\u0104\7\27\2\2\u0104\u0105\7\60\2\2\u0105"+ + "\u0106\5\16\b\2\u0106\27\3\2\2\2\u0107\u010a\5@!\2\u0108\u0109\7\f\2\2"+ + "\u0109\u010b\5P)\2\u010a\u0108\3\2\2\2\u010a\u010b\3\2\2\2\u010b\31\3"+ + "\2\2\2\u010c\u011a\7\31\2\2\u010d\u0118\5@!\2\u010e\u010f\6\16\2\2\u010f"+ + "\u0110\7/\2\2\u0110\u0111\5\\/\2\u0111\u0112\b\16\1\2\u0112\u0119\3\2"+ + "\2\2\u0113\u0114\6\16\3\2\u0114\u0115\7\f\2\2\u0115\u0116\5\\/\2\u0116"+ + "\u0117\b\16\1\2\u0117\u0119\3\2\2\2\u0118\u010e\3\2\2\2\u0118\u0113\3"+ + "\2\2\2\u0118\u0119\3\2\2\2\u0119\u011b\3\2\2\2\u011a\u010d\3\2\2\2\u011a"+ + "\u011b\3\2\2\2\u011b\u011c\3\2\2\2\u011c\u011d\7\60\2\2\u011d\u011e\5"+ + "\16\b\2\u011e\33\3\2\2\2\u011f\u0120\7\37\2\2\u0120\u0126\5\\/\2\u0121"+ + "\u0123\7\\\2\2\u0122\u0124\5j\66\2\u0123\u0122\3\2\2\2\u0123\u0124\3\2"+ + "\2\2\u0124\u0125\3\2\2\2\u0125\u0127\7]\2\2\u0126\u0121\3\2\2\2\u0126"+ + "\u0127\3\2\2\2\u0127\u0128\3\2\2\2\u0128\u0129\7\60\2\2\u0129\u012a\5"+ + "\16\b\2\u012a\35\3\2\2\2\u012b\u012d\7%\2\2\u012c\u012b\3\2\2\2\u012c"+ + "\u012d\3\2\2\2\u012d\u012e\3\2\2\2\u012e\u012f\7\6\2\2\u012f\u0130\5\\"+ + "/\2\u0130\u0132\7\\\2\2\u0131\u0133\5 \21\2\u0132\u0131\3\2\2\2\u0132"+ + "\u0133\3\2\2\2\u0133\u0134\3\2\2\2\u0134\u0137\7]\2\2\u0135\u0136\7G\2"+ + "\2\u0136\u0138\5@!\2\u0137\u0135\3\2\2\2\u0137\u0138\3\2\2\2\u0138\u0139"+ + "\3\2\2\2\u0139\u013a\7\60\2\2\u013a\u013b\5\16\b\2\u013b\37\3\2\2\2\u013c"+ + "\u013d\5&\24\2\u013d\u013e\7/\2\2\u013e\u0140\3\2\2\2\u013f\u013c\3\2"+ + "\2\2\u013f\u0140\3\2\2\2\u0140\u014b\3\2\2\2\u0141\u0144\5\"\22\2\u0142"+ + "\u0143\7/\2\2\u0143\u0145\5&\24\2\u0144\u0142\3\2\2\2\u0144\u0145\3\2"+ + "\2\2\u0145\u0148\3\2\2\2\u0146\u0147\7/\2\2\u0147\u0149\5$\23\2\u0148"+ + "\u0146\3\2\2\2\u0148\u0149\3\2\2\2\u0149\u014c\3\2\2\2\u014a\u014c\5$"+ + "\23\2\u014b\u0141\3\2\2\2\u014b\u014a\3\2\2\2\u014c\u014e\3\2\2\2\u014d"+ + "\u014f\7/\2\2\u014e\u014d\3\2\2\2\u014e\u014f\3\2\2\2\u014f\u0155\3\2"+ + "\2\2\u0150\u0152\5&\24\2\u0151\u0153\7/\2\2\u0152\u0151\3\2\2\2\u0152"+ + "\u0153\3\2\2\2\u0153\u0155\3\2\2\2\u0154\u013f\3\2\2\2\u0154\u0150\3\2"+ + "\2\2\u0155!\3\2\2\2\u0156\u0157\7.\2\2\u0157\u0158\5*\26\2\u0158#\3\2"+ + "\2\2\u0159\u015a\7\62\2\2\u015a\u015b\5*\26\2\u015b%\3\2\2\2\u015c\u0161"+ + "\5(\25\2\u015d\u015e\7/\2\2\u015e\u0160\5(\25\2\u015f\u015d\3\2\2\2\u0160"+ + "\u0163\3\2\2\2\u0161\u015f\3\2\2\2\u0161\u0162\3\2\2\2\u0162\'\3\2\2\2"+ + "\u0163\u0161\3\2\2\2\u0164\u0167\5*\26\2\u0165\u0166\7\63\2\2\u0166\u0168"+ + "\5@!\2\u0167\u0165\3\2\2\2\u0167\u0168\3\2\2\2\u0168\u016b\3\2\2\2\u0169"+ + "\u016b\7.\2\2\u016a\u0164\3\2\2\2\u016a\u0169\3\2\2\2\u016b)\3\2\2\2\u016c"+ + "\u016f\5\\/\2\u016d\u016e\7\60\2\2\u016e\u0170\5@!\2\u016f\u016d\3\2\2"+ + "\2\u016f\u0170\3\2\2\2\u0170+\3\2\2\2\u0171\u0176\5.\30\2\u0172\u0173"+ + "\7\61\2\2\u0173\u0175\5.\30\2\u0174\u0172\3\2\2\2\u0175\u0178\3\2\2\2"+ + "\u0176\u0174\3\2\2\2\u0176\u0177\3\2\2\2\u0177\u017a\3\2\2\2\u0178\u0176"+ + "\3\2\2\2\u0179\u017b\7\61\2\2\u017a\u0179\3\2\2\2\u017a\u017b\3\2\2\2"+ + "\u017b\u017c\3\2\2\2\u017c\u017d\t\2\2\2\u017d-\3\2\2\2\u017e\u0180\5"+ + "\60\31\2\u017f\u0181\5\64\33\2\u0180\u017f\3\2\2\2\u0180\u0181\3\2\2\2"+ + "\u0181\u01fb\3\2\2\2\u0182\u0183\6\30\4\2\u0183\u019a\7\'\2\2\u0184\u0189"+ + "\5@!\2\u0185\u0186\7/\2\2\u0186\u0188\5@!\2\u0187\u0185\3\2\2\2\u0188"+ + "\u018b\3\2\2\2\u0189\u0187\3\2\2\2\u0189\u018a\3\2\2\2\u018a\u018d\3\2"+ + "\2\2\u018b\u0189\3\2\2\2\u018c\u018e\7/\2\2\u018d\u018c\3\2\2\2\u018d"+ + "\u018e\3\2\2\2\u018e\u019b\3\2\2\2\u018f\u0190\78\2\2\u0190\u0193\5@!"+ + "\2\u0191\u0192\7/\2\2\u0192\u0194\5@!\2\u0193\u0191\3\2\2\2\u0194\u0195"+ + "\3\2\2\2\u0195\u0193\3\2\2\2\u0195\u0196\3\2\2\2\u0196\u0198\3\2\2\2\u0197"+ + "\u0199\7/\2\2\u0198\u0197\3\2\2\2\u0198\u0199\3\2\2\2\u0199\u019b\3\2"+ + "\2\2\u019a\u0184\3\2\2\2\u019a\u018f\3\2\2\2\u019b\u019c\3\2\2\2\u019c"+ + "\u019d\b\30\1\2\u019d\u01fb\3\2\2\2\u019e\u019f\7!\2\2\u019f\u01fb\5\66"+ + "\34\2\u01a0\u01fb\7\"\2\2\u01a1\u01fb\7$\2\2\u01a2\u01fb\7#\2\2\u01a3"+ + "\u01a5\7\7\2\2\u01a4\u01a6\5X-\2\u01a5\u01a4\3\2\2\2\u01a5\u01a6\3\2\2"+ + "\2\u01a6\u01fb\3\2\2\2\u01a7\u01b1\7\b\2\2\u01a8\u01af\5@!\2\u01a9\u01aa"+ + "\7/\2\2\u01aa\u01ad\5@!\2\u01ab\u01ac\7/\2\2\u01ac\u01ae\5@!\2\u01ad\u01ab"+ + "\3\2\2\2\u01ad\u01ae\3\2\2\2\u01ae\u01b0\3\2\2\2\u01af\u01a9\3\2\2\2\u01af"+ + "\u01b0\3\2\2\2\u01b0\u01b2\3\2\2\2\u01b1\u01a8\3\2\2\2\u01b1\u01b2\3\2"+ + "\2\2\u01b2\u01b5\3\2\2\2\u01b3\u01b4\7\t\2\2\u01b4\u01b6\5@!\2\u01b5\u01b3"+ + "\3\2\2\2\u01b5\u01b6\3\2\2\2\u01b6\u01fb\3\2\2\2\u01b7\u01fb\5b\62\2\u01b8"+ + "\u01b9\7\n\2\2\u01b9\u01fb\5<\37\2\u01ba\u01c7\7\t\2\2\u01bb\u01bd\t\3"+ + "\2\2\u01bc\u01bb\3\2\2\2\u01bd\u01c0\3\2\2\2\u01be\u01bc\3\2\2\2\u01be"+ + "\u01bf\3\2\2\2\u01bf\u01c1\3\2\2\2\u01c0\u01be\3\2\2\2\u01c1\u01c8\5Z"+ + ".\2\u01c2\u01c4\t\3\2\2\u01c3\u01c2\3\2\2\2\u01c4\u01c5\3\2\2\2\u01c5"+ + "\u01c3\3\2\2\2\u01c5\u01c6\3\2\2\2\u01c6\u01c8\3\2\2\2\u01c7\u01be\3\2"+ + "\2\2\u01c7\u01c3\3\2\2\2\u01c8\u01c9\3\2\2\2\u01c9\u01d0\7\n\2\2\u01ca"+ + "\u01d1\7.\2\2\u01cb\u01cc\7\\\2\2\u01cc\u01cd\58\35\2\u01cd\u01ce\7]\2"+ + "\2\u01ce\u01d1\3\2\2\2\u01cf\u01d1\58\35\2\u01d0\u01ca\3\2\2\2\u01d0\u01cb"+ + "\3\2\2\2\u01d0\u01cf\3\2\2\2\u01d1\u01fb\3\2\2\2\u01d2\u01d3\7\r\2\2\u01d3"+ + "\u01d8\5\\/\2\u01d4\u01d5\7/\2\2\u01d5\u01d7\5\\/\2\u01d6\u01d4\3\2\2"+ + "\2\u01d7\u01da\3\2\2\2\u01d8\u01d6\3\2\2\2\u01d8\u01d9\3\2\2\2\u01d9\u01fb"+ + "\3\2\2\2\u01da\u01d8\3\2\2\2\u01db\u01dc\6\30\5\2\u01dc\u01dd\7(\2\2\u01dd"+ + "\u01e4\5P)\2\u01de\u01df\7\24\2\2\u01df\u01e2\5@!\2\u01e0\u01e1\7/\2\2"+ + "\u01e1\u01e3\5@!\2\u01e2\u01e0\3\2\2\2\u01e2\u01e3\3\2\2\2\u01e3\u01e5"+ + "\3\2\2\2\u01e4\u01de\3\2\2\2\u01e4\u01e5\3\2\2\2\u01e5\u01e6\3\2\2\2\u01e6"+ + "\u01e7\b\30\1\2\u01e7\u01fb\3\2\2\2\u01e8\u01e9\7\16\2\2\u01e9\u01ec\5"+ + "@!\2\u01ea\u01eb\7/\2\2\u01eb\u01ed\5@!\2\u01ec\u01ea\3\2\2\2\u01ec\u01ed"+ + "\3\2\2\2\u01ed\u01fb\3\2\2\2\u01ee\u01ef\6\30\6\2\u01ef\u01f0\7\13\2\2"+ + "\u01f0\u01f5\5\\/\2\u01f1\u01f2\7/\2\2\u01f2\u01f4\5\\/\2\u01f3\u01f1"+ + "\3\2\2\2\u01f4\u01f7\3\2\2\2\u01f5\u01f3\3\2\2\2\u01f5\u01f6\3\2\2\2\u01f6"+ + "\u01f8\3\2\2\2\u01f7\u01f5\3\2\2\2\u01f8\u01f9\b\30\1\2\u01f9\u01fb\3"+ + "\2\2\2\u01fa\u017e\3\2\2\2\u01fa\u0182\3\2\2\2\u01fa\u019e\3\2\2\2\u01fa"+ + "\u01a0\3\2\2\2\u01fa\u01a1\3\2\2\2\u01fa\u01a2\3\2\2\2\u01fa\u01a3\3\2"+ + "\2\2\u01fa\u01a7\3\2\2\2\u01fa\u01b7\3\2\2\2\u01fa\u01b8\3\2\2\2\u01fa"+ + "\u01ba\3\2\2\2\u01fa\u01d2\3\2\2\2\u01fa\u01db\3\2\2\2\u01fa\u01e8\3\2"+ + "\2\2\u01fa\u01ee\3\2\2\2\u01fb/\3\2\2\2\u01fc\u01ff\5@!\2\u01fd\u01ff"+ + "\5\62\32\2\u01fe\u01fc\3\2\2\2\u01fe\u01fd\3\2\2\2\u01ff\u0200\3\2\2\2"+ + "\u0200\u0201\7/\2\2\u0201\u0203\3\2\2\2\u0202\u01fe\3\2\2\2\u0203\u0204"+ + "\3\2\2\2\u0204\u0202\3\2\2\2\u0204\u0205\3\2\2\2\u0205\u0208\3\2\2\2\u0206"+ + "\u0209\5@!\2\u0207\u0209\5\62\32\2\u0208\u0206\3\2\2\2\u0208\u0207\3\2"+ + "\2\2\u0208\u0209\3\2\2\2\u0209\u020c\3\2\2\2\u020a\u020c\5X-\2\u020b\u0202"+ + "\3\2\2\2\u020b\u020a\3\2\2\2\u020c\61\3\2\2\2\u020d\u020e\7.\2\2\u020e"+ + "\u020f\5P)\2\u020f\63\3\2\2\2\u0210\u021e\7\63\2\2\u0211\u0216\5\60\31"+ + "\2\u0212\u0213\7\63\2\2\u0213\u0215\5\60\31\2\u0214\u0212\3\2\2\2\u0215"+ + "\u0218\3\2\2\2\u0216\u0214\3\2\2\2\u0216\u0217\3\2\2\2\u0217\u021b\3\2"+ + "\2\2\u0218\u0216\3\2\2\2\u0219\u021a\7\63\2\2\u021a\u021c\5b\62\2\u021b"+ + "\u0219\3\2\2\2\u021b\u021c\3\2\2\2\u021c\u021f\3\2\2\2\u021d\u021f\5b"+ + "\62\2\u021e\u0211\3\2\2\2\u021e\u021d\3\2\2\2\u021f\u022f\3\2\2\2\u0220"+ + "\u0221\6\33\7\2\u0221\u0222\7\60\2\2\u0222\u0225\5@!\2\u0223\u0224\7\63"+ + "\2\2\u0224\u0226\5X-\2\u0225\u0223\3\2\2\2\u0225\u0226\3\2\2\2\u0226\u0227"+ + "\3\2\2\2\u0227\u0228\b\33\1\2\u0228\u022f\3\2\2\2\u0229\u022c\t\4\2\2"+ + "\u022a\u022d\5b\62\2\u022b\u022d\5X-\2\u022c\u022a\3\2\2\2\u022c\u022b"+ + "\3\2\2\2\u022d\u022f\3\2\2\2\u022e\u0210\3\2\2\2\u022e\u0220\3\2\2\2\u022e"+ + "\u0229\3\2\2\2\u022f\65\3\2\2\2\u0230\u0235\5P)\2\u0231\u0232\7/\2\2\u0232"+ + "\u0234\5P)\2\u0233\u0231\3\2\2\2\u0234\u0237\3\2\2\2\u0235\u0233\3\2\2"+ + "\2\u0235\u0236\3\2\2\2\u0236\u0239\3\2\2\2\u0237\u0235\3\2\2\2\u0238\u023a"+ + "\7/\2\2\u0239\u0238\3\2\2\2\u0239\u023a\3\2\2\2\u023a\67\3\2\2\2\u023b"+ + "\u0240\5:\36\2\u023c\u023d\7/\2\2\u023d\u023f\5:\36\2\u023e\u023c\3\2"+ + "\2\2\u023f\u0242\3\2\2\2\u0240\u023e\3\2\2\2\u0240\u0241\3\2\2\2\u0241"+ + "\u0244\3\2\2\2\u0242\u0240\3\2\2\2\u0243\u0245\7/\2\2\u0244\u0243\3\2"+ + "\2\2\u0244\u0245\3\2\2\2\u02459\3\2\2\2\u0246\u0249\5\\/\2\u0247\u0248"+ + "\7\f\2\2\u0248\u024a\5\\/\2\u0249\u0247\3\2\2\2\u0249\u024a\3\2\2\2\u024a"+ + ";\3\2\2\2\u024b\u0250\5> \2\u024c\u024d\7/\2\2\u024d\u024f\5> \2\u024e"+ + "\u024c\3\2\2\2\u024f\u0252\3\2\2\2\u0250\u024e\3\2\2\2\u0250\u0251\3\2"+ + "\2\2\u0251=\3\2\2\2\u0252\u0250\3\2\2\2\u0253\u0256\5Z.\2\u0254\u0255"+ + "\7\f\2\2\u0255\u0257\5\\/\2\u0256\u0254\3\2\2\2\u0256\u0257\3\2\2\2\u0257"+ + "?\3\2\2\2\u0258\u025e\5L\'\2\u0259\u025a\7\17\2\2\u025a\u025b\5L\'\2\u025b"+ + "\u025c\7\21\2\2\u025c\u025d\5@!\2\u025d\u025f\3\2\2\2\u025e\u0259\3\2"+ + "\2\2\u025e\u025f\3\2\2\2\u025f\u0267\3\2\2\2\u0260\u0262\7\32\2\2\u0261"+ + "\u0263\5B\"\2\u0262\u0261\3\2\2\2\u0262\u0263\3\2\2\2\u0263\u0264\3\2"+ + "\2\2\u0264\u0265\7\60\2\2\u0265\u0267\5@!\2\u0266\u0258\3\2\2\2\u0266"+ + "\u0260\3\2\2\2\u0267A\3\2\2\2\u0268\u0269\5D#\2\u0269\u026a\7/\2\2\u026a"+ + "\u026c\3\2\2\2\u026b\u0268\3\2\2\2\u026b\u026c\3\2\2\2\u026c\u0277\3\2"+ + "\2\2\u026d\u0270\5H%\2\u026e\u026f\7/\2\2\u026f\u0271\5D#\2\u0270\u026e"+ + "\3\2\2\2\u0270\u0271\3\2\2\2\u0271\u0274\3\2\2\2\u0272\u0273\7/\2\2\u0273"+ + "\u0275\5J&\2\u0274\u0272\3\2\2\2\u0274\u0275\3\2\2\2\u0275\u0278\3\2\2"+ + "\2\u0276\u0278\5J&\2\u0277\u026d\3\2\2\2\u0277\u0276\3\2\2\2\u0278\u027a"+ + "\3\2\2\2\u0279\u027b\7/\2\2\u027a\u0279\3\2\2\2\u027a\u027b\3\2\2\2\u027b"+ + "\u0281\3\2\2\2\u027c\u027e\5D#\2\u027d\u027f\7/\2\2\u027e\u027d\3\2\2"+ + "\2\u027e\u027f\3\2\2\2\u027f\u0281\3\2\2\2\u0280\u026b\3\2\2\2\u0280\u027c"+ + "\3\2\2\2\u0281C\3\2\2\2\u0282\u0287\5F$\2\u0283\u0284\7/\2\2\u0284\u0286"+ + "\5F$\2\u0285\u0283\3\2\2\2\u0286\u0289\3\2\2\2\u0287\u0285\3\2\2\2\u0287"+ + "\u0288\3\2\2\2\u0288E\3\2\2\2\u0289\u0287\3\2\2\2\u028a\u028d\5\\/\2\u028b"+ + "\u028c\7\63\2\2\u028c\u028e\5@!\2\u028d\u028b\3\2\2\2\u028d\u028e\3\2"+ + "\2\2\u028e\u0291\3\2\2\2\u028f\u0291\7.\2\2\u0290\u028a\3\2\2\2\u0290"+ + "\u028f\3\2\2\2\u0291G\3\2\2\2\u0292\u0293\7.\2\2\u0293\u0294\5\\/\2\u0294"+ + "I\3\2\2\2\u0295\u0296\7\62\2\2\u0296\u0297\5\\/\2\u0297K\3\2\2\2\u0298"+ + "\u0299\b\'\1\2\u0299\u029a\7\35\2\2\u029a\u029d\5L\'\5\u029b\u029d\5N"+ + "(\2\u029c\u0298\3\2\2\2\u029c\u029b\3\2\2\2\u029d\u02a6\3\2\2\2\u029e"+ + "\u029f\f\4\2\2\u029f\u02a0\7\34\2\2\u02a0\u02a5\5L\'\5\u02a1\u02a2\f\3"+ + "\2\2\u02a2\u02a3\7\33\2\2\u02a3\u02a5\5L\'\4\u02a4\u029e\3\2\2\2\u02a4"+ + "\u02a1\3\2\2\2\u02a5\u02a8\3\2\2\2\u02a6\u02a4\3\2\2\2\u02a6\u02a7\3\2"+ + "\2\2\u02a7M\3\2\2\2\u02a8\u02a6\3\2\2\2\u02a9\u02aa\b(\1\2\u02aa\u02ab"+ + "\5P)\2\u02ab\u02c1\3\2\2\2\u02ac\u02bc\f\4\2\2\u02ad\u02bd\7?\2\2\u02ae"+ + "\u02bd\7@\2\2\u02af\u02bd\7A\2\2\u02b0\u02bd\7B\2\2\u02b1\u02bd\7C\2\2"+ + "\u02b2\u02bd\7D\2\2\u02b3\u02bd\7E\2\2\u02b4\u02b6\7\35\2\2\u02b5\u02b4"+ + "\3\2\2\2\u02b5\u02b6\3\2\2\2\u02b6\u02b7\3\2\2\2\u02b7\u02bd\7\24\2\2"+ + "\u02b8\u02ba\7\36\2\2\u02b9\u02bb\7\35\2\2\u02ba\u02b9\3\2\2\2\u02ba\u02bb"+ + "\3\2\2\2\u02bb\u02bd\3\2\2\2\u02bc\u02ad\3\2\2\2\u02bc\u02ae\3\2\2\2\u02bc"+ + "\u02af\3\2\2\2\u02bc\u02b0\3\2\2\2\u02bc\u02b1\3\2\2\2\u02bc\u02b2\3\2"+ + "\2\2\u02bc\u02b3\3\2\2\2\u02bc\u02b5\3\2\2\2\u02bc\u02b8\3\2\2\2\u02bd"+ + "\u02be\3\2\2\2\u02be\u02c0\5N(\5\u02bf\u02ac\3\2\2\2\u02c0\u02c3\3\2\2"+ + "\2\u02c1\u02bf\3\2\2\2\u02c1\u02c2\3\2\2\2\u02c2O\3\2\2\2\u02c3\u02c1"+ + "\3\2\2\2\u02c4\u02c5\b)\1\2\u02c5\u02c6\t\5\2\2\u02c6\u02d2\5P)\t\u02c7"+ + "\u02c9\7&\2\2\u02c8\u02c7\3\2\2\2\u02c8\u02c9\3\2\2\2\u02c9\u02ca\3\2"+ + "\2\2\u02ca\u02ce\5R*\2\u02cb\u02cd\5f\64\2\u02cc\u02cb\3\2\2\2\u02cd\u02d0"+ + "\3\2\2\2\u02ce\u02cc\3\2\2\2\u02ce\u02cf\3\2\2\2\u02cf\u02d2\3\2\2\2\u02d0"+ + "\u02ce\3\2\2\2\u02d1\u02c4\3\2\2\2\u02d1\u02c8\3\2\2\2\u02d2\u02ea\3\2"+ + "\2\2\u02d3\u02d4\f\n\2\2\u02d4\u02d5\7\62\2\2\u02d5\u02e9\5P)\n\u02d6"+ + "\u02d7\f\b\2\2\u02d7\u02d8\t\6\2\2\u02d8\u02e9\5P)\t\u02d9\u02da\f\7\2"+ + "\2\u02da\u02db\t\7\2\2\u02db\u02e9\5P)\b\u02dc\u02dd\f\6\2\2\u02dd\u02de"+ + "\t\b\2\2\u02de\u02e9\5P)\7\u02df\u02e0\f\5\2\2\u02e0\u02e1\7\66\2\2\u02e1"+ + "\u02e9\5P)\6\u02e2\u02e3\f\4\2\2\u02e3\u02e4\7\65\2\2\u02e4\u02e9\5P)"+ + "\5\u02e5\u02e6\f\3\2\2\u02e6\u02e7\7\64\2\2\u02e7\u02e9\5P)\4\u02e8\u02d3"+ + "\3\2\2\2\u02e8\u02d6\3\2\2\2\u02e8\u02d9\3\2\2\2\u02e8\u02dc\3\2\2\2\u02e8"+ + "\u02df\3\2\2\2\u02e8\u02e2\3\2\2\2\u02e8\u02e5\3\2\2\2\u02e9\u02ec\3\2"+ + "\2\2\u02ea\u02e8\3\2\2\2\u02ea\u02eb\3\2\2\2\u02ebQ\3\2\2\2\u02ec\u02ea"+ + "\3\2\2\2\u02ed\u02f0\7\\\2\2\u02ee\u02f1\5b\62\2\u02ef\u02f1\5V,\2\u02f0"+ + "\u02ee\3\2\2\2\u02f0\u02ef\3\2\2\2\u02f0\u02f1\3\2\2\2\u02f1\u02f2\3\2"+ + "\2\2\u02f2\u0313\7]\2\2\u02f3\u02f5\7`\2\2\u02f4\u02f6\5V,\2\u02f5\u02f4"+ + "\3\2\2\2\u02f5\u02f6\3\2\2\2\u02f6\u02f7\3\2\2\2\u02f7\u0313\7a\2\2\u02f8"+ + "\u02fa\7^\2\2\u02f9\u02fb\5T+\2\u02fa\u02f9\3\2\2\2\u02fa\u02fb\3\2\2"+ + "\2\u02fb\u02fc\3\2\2\2\u02fc\u0313\7_\2\2\u02fd\u02fe\7-\2\2\u02fe\u0300"+ + "\5X-\2\u02ff\u0301\7/\2\2\u0300\u02ff\3\2\2\2\u0300\u0301\3\2\2\2\u0301"+ + "\u0302\3\2\2\2\u0302\u0303\7-\2\2\u0303\u0313\3\2\2\2\u0304\u0313\7,\2"+ + "\2\u0305\u0313\5\\/\2\u0306\u0313\7\'\2\2\u0307\u0313\7(\2\2\u0308\u030a"+ + "\7:\2\2\u0309\u0308\3\2\2\2\u0309\u030a\3\2\2\2\u030a\u030b\3\2\2\2\u030b"+ + "\u0313\5^\60\2\u030c\u0313\7\26\2\2\u030d\u030f\7U\2\2\u030e\u030d\3\2"+ + "\2\2\u030f\u0310\3\2\2\2\u0310\u030e\3\2\2\2\u0310\u0311\3\2\2\2\u0311"+ + "\u0313\3\2\2\2\u0312\u02ed\3\2\2\2\u0312\u02f3\3\2\2\2\u0312\u02f8\3\2"+ + "\2\2\u0312\u02fd\3\2\2\2\u0312\u0304\3\2\2\2\u0312\u0305\3\2\2\2\u0312"+ + "\u0306\3\2\2\2\u0312\u0307\3\2\2\2\u0312\u0309\3\2\2\2\u0312\u030c\3\2"+ + "\2\2\u0312\u030e\3\2\2\2\u0313S\3\2\2\2\u0314\u0315\5@!\2\u0315\u0316"+ + "\7\60\2\2\u0316\u0317\5@!\2\u0317\u031b\3\2\2\2\u0318\u0319\7\62\2\2\u0319"+ + "\u031b\5P)\2\u031a\u0314\3\2\2\2\u031a\u0318\3\2\2\2\u031b\u0327\3\2\2"+ + "\2\u031c\u0323\7/\2\2\u031d\u031e\5@!\2\u031e\u031f\7\60\2\2\u031f\u0320"+ + "\5@!\2\u0320\u0324\3\2\2\2\u0321\u0322\7\62\2\2\u0322\u0324\5P)\2\u0323"+ + "\u031d\3\2\2\2\u0323\u0321\3\2\2\2\u0324\u0326\3\2\2\2\u0325\u031c\3\2"+ + "\2\2\u0326\u0329\3\2\2\2\u0327\u0325\3\2\2\2\u0327\u0328\3\2\2\2\u0328"+ + "\u032b\3\2\2\2\u0329\u0327\3\2\2\2\u032a\u032c\7/\2\2\u032b\u032a\3\2"+ + "\2\2\u032b\u032c\3\2\2\2\u032c\u0334\3\2\2\2\u032d\u032e\5@!\2\u032e\u032f"+ + "\7\60\2\2\u032f\u0330\5@!\2\u0330\u0331\5t;\2\u0331\u0334\3\2\2\2\u0332"+ + "\u0334\5V,\2\u0333\u031a\3\2\2\2\u0333\u032d\3\2\2\2\u0333\u0332\3\2\2"+ + "\2\u0334U\3\2\2\2\u0335\u0338\5@!\2\u0336\u0338\5\62\32\2\u0337\u0335"+ + "\3\2\2\2\u0337\u0336\3\2\2\2\u0338\u0347\3\2\2\2\u0339\u0348\5t;\2\u033a"+ + "\u033d\7/\2\2\u033b\u033e\5@!\2\u033c\u033e\5\62\32\2\u033d\u033b\3\2"+ + "\2\2\u033d\u033c\3\2\2\2\u033e\u0340\3\2\2\2\u033f\u033a\3\2\2\2\u0340"+ + "\u0343\3\2\2\2\u0341\u033f\3\2\2\2\u0341\u0342\3\2\2\2\u0342\u0345\3\2"+ + "\2\2\u0343\u0341\3\2\2\2\u0344\u0346\7/\2\2\u0345\u0344\3\2\2\2\u0345"+ + "\u0346\3\2\2\2\u0346\u0348\3\2\2\2\u0347\u0339\3\2\2\2\u0347\u0341\3\2"+ + "\2\2\u0348W\3\2\2\2\u0349\u034e\5@!\2\u034a\u034b\7/\2\2\u034b\u034d\5"+ + "@!\2\u034c\u034a\3\2\2\2\u034d\u0350\3\2\2\2\u034e\u034c\3\2\2\2\u034e"+ + "\u034f\3\2\2\2\u034f\u0352\3\2\2\2\u0350\u034e\3\2\2\2\u0351\u0353\7/"+ + "\2\2\u0352\u0351\3\2\2\2\u0352\u0353\3\2\2\2\u0353Y\3\2\2\2\u0354\u0355"+ + "\b.\1\2\u0355\u0356\5\\/\2\u0356\u035c\3\2\2\2\u0357\u0358\f\4\2\2\u0358"+ + "\u0359\7+\2\2\u0359\u035b\5\\/\2\u035a\u0357\3\2\2\2\u035b\u035e\3\2\2"+ + "\2\u035c\u035a\3\2\2\2\u035c\u035d\3\2\2\2\u035d[\3\2\2\2\u035e\u035c"+ + "\3\2\2\2\u035f\u0360\t\t\2\2\u0360]\3\2\2\2\u0361\u0365\5`\61\2\u0362"+ + "\u0365\7Z\2\2\u0363\u0365\7[\2\2\u0364\u0361\3\2\2\2\u0364\u0362\3\2\2"+ + "\2\u0364\u0363\3\2\2\2\u0365_\3\2\2\2\u0366\u0367\t\n\2\2\u0367a\3\2\2"+ + "\2\u0368\u036a\7 \2\2\u0369\u036b\5d\63\2\u036a\u0369\3\2\2\2\u036a\u036b"+ + "\3\2\2\2\u036bc\3\2\2\2\u036c\u036d\7\t\2\2\u036d\u0370\5@!\2\u036e\u0370"+ + "\5X-\2\u036f\u036c\3\2\2\2\u036f\u036e\3\2\2\2\u0370e\3\2\2\2\u0371\u0372"+ + "\7+\2\2\u0372\u0374\5\\/\2\u0373\u0375\5h\65\2\u0374\u0373\3\2\2\2\u0374"+ + "\u0375\3\2\2\2\u0375\u0378\3\2\2\2\u0376\u0378\5h\65\2\u0377\u0371\3\2"+ + "\2\2\u0377\u0376\3\2\2\2\u0378g\3\2\2\2\u0379\u037b\7\\\2\2\u037a\u037c"+ + "\5j\66\2\u037b\u037a\3\2\2\2\u037b\u037c\3\2\2\2\u037c\u037d\3\2\2\2\u037d"+ + "\u0383\7]\2\2\u037e\u037f\7`\2\2\u037f\u0380\5n8\2\u0380\u0381\7a\2\2"+ + "\u0381\u0383\3\2\2\2\u0382\u0379\3\2\2\2\u0382\u037e\3\2\2\2\u0383i\3"+ + "\2\2\2\u0384\u0389\5l\67\2\u0385\u0386\7/\2\2\u0386\u0388\5l\67\2\u0387"+ + "\u0385\3\2\2\2\u0388\u038b\3\2\2\2\u0389\u0387\3\2\2\2\u0389\u038a\3\2"+ + "\2\2\u038a\u038d\3\2\2\2\u038b\u0389\3\2\2\2\u038c\u038e\7/\2\2\u038d"+ + "\u038c\3\2\2\2\u038d\u038e\3\2\2\2\u038ek\3\2\2\2\u038f\u0393\5@!\2\u0390"+ + "\u0394\5t;\2\u0391\u0392\7\63\2\2\u0392\u0394\5@!\2\u0393\u0390\3\2\2"+ + "\2\u0393\u0391\3\2\2\2\u0393\u0394\3\2\2\2\u0394\u0398\3\2\2\2\u0395\u0396"+ + "\t\13\2\2\u0396\u0398\5@!\2\u0397\u038f\3\2\2\2\u0397\u0395\3\2\2\2\u0398"+ + "m\3\2\2\2\u0399\u039e\5p9\2\u039a\u039b\7/\2\2\u039b\u039d\5p9\2\u039c"+ + "\u039a\3\2\2\2\u039d\u03a0\3\2\2\2\u039e\u039c\3\2\2\2\u039e\u039f\3\2"+ + "\2\2\u039f\u03a2\3\2\2\2\u03a0\u039e\3\2\2\2\u03a1\u03a3\7/\2\2\u03a2"+ + "\u03a1\3\2\2\2\u03a2\u03a3\3\2\2\2\u03a3o\3\2\2\2\u03a4\u03b7\7,\2\2\u03a5"+ + "\u03ad\5@!\2\u03a6\u03a8\7\60\2\2\u03a7\u03a9\5@!\2\u03a8\u03a7\3\2\2"+ + "\2\u03a8\u03a9\3\2\2\2\u03a9\u03ab\3\2\2\2\u03aa\u03ac\5r:\2\u03ab\u03aa"+ + "\3\2\2\2\u03ab\u03ac\3\2\2\2\u03ac\u03ae\3\2\2\2\u03ad\u03a6\3\2\2\2\u03ad"+ + "\u03ae\3\2\2\2\u03ae\u03b7\3\2\2\2\u03af\u03b1\7\60\2\2\u03b0\u03b2\5"+ + "@!\2\u03b1\u03b0\3\2\2\2\u03b1\u03b2\3\2\2\2\u03b2\u03b4\3\2\2\2\u03b3"+ + "\u03b5\5r:\2\u03b4\u03b3\3\2\2\2\u03b4\u03b5\3\2\2\2\u03b5\u03b7\3\2\2"+ + "\2\u03b6\u03a4\3\2\2\2\u03b6\u03a5\3\2\2\2\u03b6\u03af\3\2\2\2\u03b7q"+ + "\3\2\2\2\u03b8\u03ba\7\60\2\2\u03b9\u03bb\5@!\2\u03ba\u03b9\3\2\2\2\u03ba"+ + "\u03bb\3\2\2\2\u03bbs\3\2\2\2\u03bc\u03bd\7\23\2\2\u03bd\u03be\5\66\34"+ + "\2\u03be\u03bf\7\24\2\2\u03bf\u03c1\5L\'\2\u03c0\u03c2\5v<\2\u03c1\u03c0"+ + "\3\2\2\2\u03c1\u03c2\3\2\2\2\u03c2u\3\2\2\2\u03c3\u03ca\5t;\2\u03c4\u03c5"+ + "\7\17\2\2\u03c5\u03c7\5@!\2\u03c6\u03c8\5v<\2\u03c7\u03c6\3\2\2\2\u03c7"+ + "\u03c8\3\2\2\2\u03c8\u03ca\3\2\2\2\u03c9\u03c3\3\2\2\2\u03c9\u03c4\3\2"+ + "\2\2\u03caw\3\2\2\2\u0099{\u0084\u0088\u008a\u0090\u0095\u009e\u00a2\u00a9"+ + "\u00ac\u00b5\u00bd\u00c0\u00c3\u00c6\u00c9\u00d1\u00da\u00df\u00e1\u00e9"+ + "\u00ed\u00f3\u00f6\u010a\u0118\u011a\u0123\u0126\u012c\u0132\u0137\u013f"+ + "\u0144\u0148\u014b\u014e\u0152\u0154\u0161\u0167\u016a\u016f\u0176\u017a"+ + "\u0180\u0189\u018d\u0195\u0198\u019a\u01a5\u01ad\u01af\u01b1\u01b5\u01be"+ + "\u01c5\u01c7\u01d0\u01d8\u01e2\u01e4\u01ec\u01f5\u01fa\u01fe\u0204\u0208"+ + "\u020b\u0216\u021b\u021e\u0225\u022c\u022e\u0235\u0239\u0240\u0244\u0249"+ + "\u0250\u0256\u025e\u0262\u0266\u026b\u0270\u0274\u0277\u027a\u027e\u0280"+ + "\u0287\u028d\u0290\u029c\u02a4\u02a6\u02b5\u02ba\u02bc\u02c1\u02c8\u02ce"+ + "\u02d1\u02e8\u02ea\u02f0\u02f5\u02fa\u0300\u0309\u0310\u0312\u031a\u0323"+ + "\u0327\u032b\u0333\u0337\u033d\u0341\u0345\u0347\u034e\u0352\u035c\u0364"+ + "\u036a\u036f\u0374\u0377\u037b\u0382\u0389\u038d\u0393\u0397\u039e\u03a2"+ + "\u03a8\u03ab\u03ad\u03b1\u03b4\u03b6\u03ba\u03c1\u03c7\u03c9"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/src/main/java/grammar/PythonParser.tokens b/src/main/java/grammar/PythonParser.tokens new file mode 100644 index 00000000..1282117c --- /dev/null +++ b/src/main/java/grammar/PythonParser.tokens @@ -0,0 +1,185 @@ +INDENT=1 +DEDENT=2 +LINE_BREAK=3 +DEF=4 +RETURN=5 +RAISE=6 +FROM=7 +IMPORT=8 +NONLOCAL=9 +AS=10 +GLOBAL=11 +ASSERT=12 +IF=13 +ELIF=14 +ELSE=15 +WHILE=16 +FOR=17 +IN=18 +TRY=19 +NONE=20 +FINALLY=21 +WITH=22 +EXCEPT=23 +LAMBDA=24 +OR=25 +AND=26 +NOT=27 +IS=28 +CLASS=29 +YIELD=30 +DEL=31 +PASS=32 +CONTINUE=33 +BREAK=34 +ASYNC=35 +AWAIT=36 +PRINT=37 +EXEC=38 +TRUE=39 +FALSE=40 +DOT=41 +ELLIPSIS=42 +REVERSE_QUOTE=43 +STAR=44 +COMMA=45 +COLON=46 +SEMI_COLON=47 +POWER=48 +ASSIGN=49 +OR_OP=50 +XOR=51 +AND_OP=52 +LEFT_SHIFT=53 +RIGHT_SHIFT=54 +ADD=55 +MINUS=56 +DIV=57 +MOD=58 +IDIV=59 +NOT_OP=60 +LESS_THAN=61 +GREATER_THAN=62 +EQUALS=63 +GT_EQ=64 +LT_EQ=65 +NOT_EQ_1=66 +NOT_EQ_2=67 +AT=68 +ARROW=69 +ADD_ASSIGN=70 +SUB_ASSIGN=71 +MULT_ASSIGN=72 +AT_ASSIGN=73 +DIV_ASSIGN=74 +MOD_ASSIGN=75 +AND_ASSIGN=76 +OR_ASSIGN=77 +XOR_ASSIGN=78 +LEFT_SHIFT_ASSIGN=79 +RIGHT_SHIFT_ASSIGN=80 +POWER_ASSIGN=81 +IDIV_ASSIGN=82 +STRING=83 +DECIMAL_INTEGER=84 +OCT_INTEGER=85 +HEX_INTEGER=86 +BIN_INTEGER=87 +IMAG_NUMBER=88 +FLOAT_NUMBER=89 +OPEN_PAREN=90 +CLOSE_PAREN=91 +OPEN_BRACE=92 +CLOSE_BRACE=93 +OPEN_BRACKET=94 +CLOSE_BRACKET=95 +NAME=96 +LINE_JOIN=97 +NEWLINE=98 +WS=99 +COMMENT=100 +'def'=4 +'return'=5 +'raise'=6 +'from'=7 +'import'=8 +'nonlocal'=9 +'as'=10 +'global'=11 +'assert'=12 +'if'=13 +'elif'=14 +'else'=15 +'while'=16 +'for'=17 +'in'=18 +'try'=19 +'None'=20 +'finally'=21 +'with'=22 +'except'=23 +'lambda'=24 +'or'=25 +'and'=26 +'not'=27 +'is'=28 +'class'=29 +'yield'=30 +'del'=31 +'pass'=32 +'continue'=33 +'break'=34 +'async'=35 +'await'=36 +'print'=37 +'exec'=38 +'True'=39 +'False'=40 +'.'=41 +'...'=42 +'`'=43 +'*'=44 +','=45 +':'=46 +';'=47 +'**'=48 +'='=49 +'|'=50 +'^'=51 +'&'=52 +'<<'=53 +'>>'=54 +'+'=55 +'-'=56 +'/'=57 +'%'=58 +'//'=59 +'~'=60 +'<'=61 +'>'=62 +'=='=63 +'>='=64 +'<='=65 +'<>'=66 +'!='=67 +'@'=68 +'->'=69 +'+='=70 +'-='=71 +'*='=72 +'@='=73 +'/='=74 +'%='=75 +'&='=76 +'|='=77 +'^='=78 +'<<='=79 +'>>='=80 +'**='=81 +'//='=82 +'('=90 +')'=91 +'{'=92 +'}'=93 +'['=94 +']'=95 diff --git a/src/main/java/grammar/PythonParserBase.java b/src/main/java/grammar/PythonParserBase.java new file mode 100644 index 00000000..84790864 --- /dev/null +++ b/src/main/java/grammar/PythonParserBase.java @@ -0,0 +1,26 @@ +package grammar; + +import org.antlr.v4.runtime.Parser; +import org.antlr.v4.runtime.TokenStream; + +public abstract class PythonParserBase extends Parser +{ + public PythonVersion Version = PythonVersion.Autodetect; + + protected PythonParserBase(TokenStream input) { + super(input); + } + + protected boolean CheckVersion(int version) { + return Version == PythonVersion.Autodetect || version == Version.getValue(); + } + + protected void SetVersion(int requiredVersion) { + if (requiredVersion == 2) { + Version = PythonVersion.Python2; + } else if (requiredVersion == 3) { + Version = PythonVersion.Python3; + } + } +} + diff --git a/src/main/java/grammar/PythonParserBaseListener.java b/src/main/java/grammar/PythonParserBaseListener.java new file mode 100644 index 00000000..71c2c288 --- /dev/null +++ b/src/main/java/grammar/PythonParserBaseListener.java @@ -0,0 +1,976 @@ +// Generated from PythonParser.g4 by ANTLR 4.5 +package grammar; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ErrorNode; +import org.antlr.v4.runtime.tree.TerminalNode; + +/** + * This class provides an empty implementation of {@link PythonParserListener}, + * which can be extended to create a listener which only needs to handle a subset + * of the available methods. + */ +public class PythonParserBaseListener implements PythonParserListener { + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterRoot(PythonParser.RootContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitRoot(PythonParser.RootContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSingle_input(PythonParser.Single_inputContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSingle_input(PythonParser.Single_inputContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFile_input(PythonParser.File_inputContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFile_input(PythonParser.File_inputContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEval_input(PythonParser.Eval_inputContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEval_input(PythonParser.Eval_inputContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterStmt(PythonParser.StmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitStmt(PythonParser.StmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterIf_stmt(PythonParser.If_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitIf_stmt(PythonParser.If_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterWhile_stmt(PythonParser.While_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitWhile_stmt(PythonParser.While_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFor_stmt(PythonParser.For_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFor_stmt(PythonParser.For_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTry_stmt(PythonParser.Try_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTry_stmt(PythonParser.Try_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterWith_stmt(PythonParser.With_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitWith_stmt(PythonParser.With_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClass_or_func_def_stmt(PythonParser.Class_or_func_def_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClass_or_func_def_stmt(PythonParser.Class_or_func_def_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSuite(PythonParser.SuiteContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSuite(PythonParser.SuiteContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDecorator(PythonParser.DecoratorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDecorator(PythonParser.DecoratorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterElif_clause(PythonParser.Elif_clauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitElif_clause(PythonParser.Elif_clauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterElse_clause(PythonParser.Else_clauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitElse_clause(PythonParser.Else_clauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFinally_clause(PythonParser.Finally_clauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFinally_clause(PythonParser.Finally_clauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterWith_item(PythonParser.With_itemContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitWith_item(PythonParser.With_itemContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterExcept_clause(PythonParser.Except_clauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitExcept_clause(PythonParser.Except_clauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassdef(PythonParser.ClassdefContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassdef(PythonParser.ClassdefContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFuncdef(PythonParser.FuncdefContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFuncdef(PythonParser.FuncdefContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypedargslist(PythonParser.TypedargslistContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypedargslist(PythonParser.TypedargslistContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArgs(PythonParser.ArgsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArgs(PythonParser.ArgsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterKwargs(PythonParser.KwargsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitKwargs(PythonParser.KwargsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDef_parameters(PythonParser.Def_parametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDef_parameters(PythonParser.Def_parametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDef_parameter(PythonParser.Def_parameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDef_parameter(PythonParser.Def_parameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterNamed_parameter(PythonParser.Named_parameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitNamed_parameter(PythonParser.Named_parameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSimple_stmt(PythonParser.Simple_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSimple_stmt(PythonParser.Simple_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterExpr_stmt(PythonParser.Expr_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitExpr_stmt(PythonParser.Expr_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPrint_stmt(PythonParser.Print_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPrint_stmt(PythonParser.Print_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDel_stmt(PythonParser.Del_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDel_stmt(PythonParser.Del_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPass_stmt(PythonParser.Pass_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPass_stmt(PythonParser.Pass_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterBreak_stmt(PythonParser.Break_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitBreak_stmt(PythonParser.Break_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterContinue_stmt(PythonParser.Continue_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitContinue_stmt(PythonParser.Continue_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterReturn_stmt(PythonParser.Return_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitReturn_stmt(PythonParser.Return_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterRaise_stmt(PythonParser.Raise_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitRaise_stmt(PythonParser.Raise_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterYield_stmt(PythonParser.Yield_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitYield_stmt(PythonParser.Yield_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterImport_stmt(PythonParser.Import_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitImport_stmt(PythonParser.Import_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFrom_stmt(PythonParser.From_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFrom_stmt(PythonParser.From_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterGlobal_stmt(PythonParser.Global_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitGlobal_stmt(PythonParser.Global_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterExec_stmt(PythonParser.Exec_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitExec_stmt(PythonParser.Exec_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAssert_stmt(PythonParser.Assert_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAssert_stmt(PythonParser.Assert_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterNonlocal_stmt(PythonParser.Nonlocal_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitNonlocal_stmt(PythonParser.Nonlocal_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTestlist_star_expr(PythonParser.Testlist_star_exprContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTestlist_star_expr(PythonParser.Testlist_star_exprContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterStar_expr(PythonParser.Star_exprContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitStar_expr(PythonParser.Star_exprContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAssign_part(PythonParser.Assign_partContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAssign_part(PythonParser.Assign_partContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterExprlist(PythonParser.ExprlistContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitExprlist(PythonParser.ExprlistContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterImport_as_names(PythonParser.Import_as_namesContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitImport_as_names(PythonParser.Import_as_namesContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterImport_as_name(PythonParser.Import_as_nameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitImport_as_name(PythonParser.Import_as_nameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDotted_as_names(PythonParser.Dotted_as_namesContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDotted_as_names(PythonParser.Dotted_as_namesContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDotted_as_name(PythonParser.Dotted_as_nameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDotted_as_name(PythonParser.Dotted_as_nameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTest(PythonParser.TestContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTest(PythonParser.TestContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterVarargslist(PythonParser.VarargslistContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitVarargslist(PythonParser.VarargslistContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterVardef_parameters(PythonParser.Vardef_parametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitVardef_parameters(PythonParser.Vardef_parametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterVardef_parameter(PythonParser.Vardef_parameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitVardef_parameter(PythonParser.Vardef_parameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterVarargs(PythonParser.VarargsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitVarargs(PythonParser.VarargsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterVarkwargs(PythonParser.VarkwargsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitVarkwargs(PythonParser.VarkwargsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLogical_test(PythonParser.Logical_testContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLogical_test(PythonParser.Logical_testContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterComparison(PythonParser.ComparisonContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitComparison(PythonParser.ComparisonContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterExpr(PythonParser.ExprContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitExpr(PythonParser.ExprContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAtom(PythonParser.AtomContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAtom(PythonParser.AtomContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDictorsetmaker(PythonParser.DictorsetmakerContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDictorsetmaker(PythonParser.DictorsetmakerContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTestlist_comp(PythonParser.Testlist_compContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTestlist_comp(PythonParser.Testlist_compContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTestlist(PythonParser.TestlistContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTestlist(PythonParser.TestlistContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDotted_name(PythonParser.Dotted_nameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDotted_name(PythonParser.Dotted_nameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterName(PythonParser.NameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitName(PythonParser.NameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterNumber(PythonParser.NumberContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitNumber(PythonParser.NumberContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterInteger(PythonParser.IntegerContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitInteger(PythonParser.IntegerContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterYield_expr(PythonParser.Yield_exprContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitYield_expr(PythonParser.Yield_exprContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterYield_arg(PythonParser.Yield_argContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitYield_arg(PythonParser.Yield_argContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTrailer(PythonParser.TrailerContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTrailer(PythonParser.TrailerContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArguments(PythonParser.ArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArguments(PythonParser.ArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArglist(PythonParser.ArglistContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArglist(PythonParser.ArglistContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArgument(PythonParser.ArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArgument(PythonParser.ArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSubscriptlist(PythonParser.SubscriptlistContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSubscriptlist(PythonParser.SubscriptlistContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSubscript(PythonParser.SubscriptContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSubscript(PythonParser.SubscriptContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSliceop(PythonParser.SliceopContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSliceop(PythonParser.SliceopContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterComp_for(PythonParser.Comp_forContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitComp_for(PythonParser.Comp_forContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterComp_iter(PythonParser.Comp_iterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitComp_iter(PythonParser.Comp_iterContext ctx) { } + + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void visitTerminal(TerminalNode node) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void visitErrorNode(ErrorNode node) { } +} \ No newline at end of file diff --git a/src/main/java/grammar/PythonParserListener.java b/src/main/java/grammar/PythonParserListener.java new file mode 100644 index 00000000..65361571 --- /dev/null +++ b/src/main/java/grammar/PythonParserListener.java @@ -0,0 +1,833 @@ +// Generated from PythonParser.g4 by ANTLR 4.5 +package grammar; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link PythonParser}. + */ +public interface PythonParserListener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link PythonParser#root}. + * @param ctx the parse tree + */ + void enterRoot(PythonParser.RootContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#root}. + * @param ctx the parse tree + */ + void exitRoot(PythonParser.RootContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#single_input}. + * @param ctx the parse tree + */ + void enterSingle_input(PythonParser.Single_inputContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#single_input}. + * @param ctx the parse tree + */ + void exitSingle_input(PythonParser.Single_inputContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#file_input}. + * @param ctx the parse tree + */ + void enterFile_input(PythonParser.File_inputContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#file_input}. + * @param ctx the parse tree + */ + void exitFile_input(PythonParser.File_inputContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#eval_input}. + * @param ctx the parse tree + */ + void enterEval_input(PythonParser.Eval_inputContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#eval_input}. + * @param ctx the parse tree + */ + void exitEval_input(PythonParser.Eval_inputContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#stmt}. + * @param ctx the parse tree + */ + void enterStmt(PythonParser.StmtContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#stmt}. + * @param ctx the parse tree + */ + void exitStmt(PythonParser.StmtContext ctx); + /** + * Enter a parse tree produced by the {@code if_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void enterIf_stmt(PythonParser.If_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code if_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void exitIf_stmt(PythonParser.If_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code while_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void enterWhile_stmt(PythonParser.While_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code while_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void exitWhile_stmt(PythonParser.While_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code for_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void enterFor_stmt(PythonParser.For_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code for_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void exitFor_stmt(PythonParser.For_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code try_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void enterTry_stmt(PythonParser.Try_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code try_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void exitTry_stmt(PythonParser.Try_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code with_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void enterWith_stmt(PythonParser.With_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code with_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void exitWith_stmt(PythonParser.With_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code class_or_func_def_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void enterClass_or_func_def_stmt(PythonParser.Class_or_func_def_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code class_or_func_def_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void exitClass_or_func_def_stmt(PythonParser.Class_or_func_def_stmtContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#suite}. + * @param ctx the parse tree + */ + void enterSuite(PythonParser.SuiteContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#suite}. + * @param ctx the parse tree + */ + void exitSuite(PythonParser.SuiteContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#decorator}. + * @param ctx the parse tree + */ + void enterDecorator(PythonParser.DecoratorContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#decorator}. + * @param ctx the parse tree + */ + void exitDecorator(PythonParser.DecoratorContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#elif_clause}. + * @param ctx the parse tree + */ + void enterElif_clause(PythonParser.Elif_clauseContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#elif_clause}. + * @param ctx the parse tree + */ + void exitElif_clause(PythonParser.Elif_clauseContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#else_clause}. + * @param ctx the parse tree + */ + void enterElse_clause(PythonParser.Else_clauseContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#else_clause}. + * @param ctx the parse tree + */ + void exitElse_clause(PythonParser.Else_clauseContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#finally_clause}. + * @param ctx the parse tree + */ + void enterFinally_clause(PythonParser.Finally_clauseContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#finally_clause}. + * @param ctx the parse tree + */ + void exitFinally_clause(PythonParser.Finally_clauseContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#with_item}. + * @param ctx the parse tree + */ + void enterWith_item(PythonParser.With_itemContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#with_item}. + * @param ctx the parse tree + */ + void exitWith_item(PythonParser.With_itemContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#except_clause}. + * @param ctx the parse tree + */ + void enterExcept_clause(PythonParser.Except_clauseContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#except_clause}. + * @param ctx the parse tree + */ + void exitExcept_clause(PythonParser.Except_clauseContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#classdef}. + * @param ctx the parse tree + */ + void enterClassdef(PythonParser.ClassdefContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#classdef}. + * @param ctx the parse tree + */ + void exitClassdef(PythonParser.ClassdefContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#funcdef}. + * @param ctx the parse tree + */ + void enterFuncdef(PythonParser.FuncdefContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#funcdef}. + * @param ctx the parse tree + */ + void exitFuncdef(PythonParser.FuncdefContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#typedargslist}. + * @param ctx the parse tree + */ + void enterTypedargslist(PythonParser.TypedargslistContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#typedargslist}. + * @param ctx the parse tree + */ + void exitTypedargslist(PythonParser.TypedargslistContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#args}. + * @param ctx the parse tree + */ + void enterArgs(PythonParser.ArgsContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#args}. + * @param ctx the parse tree + */ + void exitArgs(PythonParser.ArgsContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#kwargs}. + * @param ctx the parse tree + */ + void enterKwargs(PythonParser.KwargsContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#kwargs}. + * @param ctx the parse tree + */ + void exitKwargs(PythonParser.KwargsContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#def_parameters}. + * @param ctx the parse tree + */ + void enterDef_parameters(PythonParser.Def_parametersContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#def_parameters}. + * @param ctx the parse tree + */ + void exitDef_parameters(PythonParser.Def_parametersContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#def_parameter}. + * @param ctx the parse tree + */ + void enterDef_parameter(PythonParser.Def_parameterContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#def_parameter}. + * @param ctx the parse tree + */ + void exitDef_parameter(PythonParser.Def_parameterContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#named_parameter}. + * @param ctx the parse tree + */ + void enterNamed_parameter(PythonParser.Named_parameterContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#named_parameter}. + * @param ctx the parse tree + */ + void exitNamed_parameter(PythonParser.Named_parameterContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#simple_stmt}. + * @param ctx the parse tree + */ + void enterSimple_stmt(PythonParser.Simple_stmtContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#simple_stmt}. + * @param ctx the parse tree + */ + void exitSimple_stmt(PythonParser.Simple_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code expr_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterExpr_stmt(PythonParser.Expr_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code expr_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitExpr_stmt(PythonParser.Expr_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code print_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterPrint_stmt(PythonParser.Print_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code print_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitPrint_stmt(PythonParser.Print_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code del_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterDel_stmt(PythonParser.Del_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code del_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitDel_stmt(PythonParser.Del_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code pass_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterPass_stmt(PythonParser.Pass_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code pass_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitPass_stmt(PythonParser.Pass_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code break_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterBreak_stmt(PythonParser.Break_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code break_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitBreak_stmt(PythonParser.Break_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code continue_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterContinue_stmt(PythonParser.Continue_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code continue_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitContinue_stmt(PythonParser.Continue_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code return_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterReturn_stmt(PythonParser.Return_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code return_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitReturn_stmt(PythonParser.Return_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code raise_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterRaise_stmt(PythonParser.Raise_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code raise_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitRaise_stmt(PythonParser.Raise_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code yield_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterYield_stmt(PythonParser.Yield_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code yield_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitYield_stmt(PythonParser.Yield_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code import_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterImport_stmt(PythonParser.Import_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code import_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitImport_stmt(PythonParser.Import_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code from_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterFrom_stmt(PythonParser.From_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code from_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitFrom_stmt(PythonParser.From_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code global_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterGlobal_stmt(PythonParser.Global_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code global_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitGlobal_stmt(PythonParser.Global_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code exec_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterExec_stmt(PythonParser.Exec_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code exec_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitExec_stmt(PythonParser.Exec_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code assert_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterAssert_stmt(PythonParser.Assert_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code assert_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitAssert_stmt(PythonParser.Assert_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code nonlocal_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterNonlocal_stmt(PythonParser.Nonlocal_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code nonlocal_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitNonlocal_stmt(PythonParser.Nonlocal_stmtContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#testlist_star_expr}. + * @param ctx the parse tree + */ + void enterTestlist_star_expr(PythonParser.Testlist_star_exprContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#testlist_star_expr}. + * @param ctx the parse tree + */ + void exitTestlist_star_expr(PythonParser.Testlist_star_exprContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#star_expr}. + * @param ctx the parse tree + */ + void enterStar_expr(PythonParser.Star_exprContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#star_expr}. + * @param ctx the parse tree + */ + void exitStar_expr(PythonParser.Star_exprContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#assign_part}. + * @param ctx the parse tree + */ + void enterAssign_part(PythonParser.Assign_partContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#assign_part}. + * @param ctx the parse tree + */ + void exitAssign_part(PythonParser.Assign_partContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#exprlist}. + * @param ctx the parse tree + */ + void enterExprlist(PythonParser.ExprlistContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#exprlist}. + * @param ctx the parse tree + */ + void exitExprlist(PythonParser.ExprlistContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#import_as_names}. + * @param ctx the parse tree + */ + void enterImport_as_names(PythonParser.Import_as_namesContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#import_as_names}. + * @param ctx the parse tree + */ + void exitImport_as_names(PythonParser.Import_as_namesContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#import_as_name}. + * @param ctx the parse tree + */ + void enterImport_as_name(PythonParser.Import_as_nameContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#import_as_name}. + * @param ctx the parse tree + */ + void exitImport_as_name(PythonParser.Import_as_nameContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#dotted_as_names}. + * @param ctx the parse tree + */ + void enterDotted_as_names(PythonParser.Dotted_as_namesContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#dotted_as_names}. + * @param ctx the parse tree + */ + void exitDotted_as_names(PythonParser.Dotted_as_namesContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#dotted_as_name}. + * @param ctx the parse tree + */ + void enterDotted_as_name(PythonParser.Dotted_as_nameContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#dotted_as_name}. + * @param ctx the parse tree + */ + void exitDotted_as_name(PythonParser.Dotted_as_nameContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#test}. + * @param ctx the parse tree + */ + void enterTest(PythonParser.TestContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#test}. + * @param ctx the parse tree + */ + void exitTest(PythonParser.TestContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#varargslist}. + * @param ctx the parse tree + */ + void enterVarargslist(PythonParser.VarargslistContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#varargslist}. + * @param ctx the parse tree + */ + void exitVarargslist(PythonParser.VarargslistContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#vardef_parameters}. + * @param ctx the parse tree + */ + void enterVardef_parameters(PythonParser.Vardef_parametersContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#vardef_parameters}. + * @param ctx the parse tree + */ + void exitVardef_parameters(PythonParser.Vardef_parametersContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#vardef_parameter}. + * @param ctx the parse tree + */ + void enterVardef_parameter(PythonParser.Vardef_parameterContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#vardef_parameter}. + * @param ctx the parse tree + */ + void exitVardef_parameter(PythonParser.Vardef_parameterContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#varargs}. + * @param ctx the parse tree + */ + void enterVarargs(PythonParser.VarargsContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#varargs}. + * @param ctx the parse tree + */ + void exitVarargs(PythonParser.VarargsContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#varkwargs}. + * @param ctx the parse tree + */ + void enterVarkwargs(PythonParser.VarkwargsContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#varkwargs}. + * @param ctx the parse tree + */ + void exitVarkwargs(PythonParser.VarkwargsContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#logical_test}. + * @param ctx the parse tree + */ + void enterLogical_test(PythonParser.Logical_testContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#logical_test}. + * @param ctx the parse tree + */ + void exitLogical_test(PythonParser.Logical_testContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#comparison}. + * @param ctx the parse tree + */ + void enterComparison(PythonParser.ComparisonContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#comparison}. + * @param ctx the parse tree + */ + void exitComparison(PythonParser.ComparisonContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#expr}. + * @param ctx the parse tree + */ + void enterExpr(PythonParser.ExprContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#expr}. + * @param ctx the parse tree + */ + void exitExpr(PythonParser.ExprContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#atom}. + * @param ctx the parse tree + */ + void enterAtom(PythonParser.AtomContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#atom}. + * @param ctx the parse tree + */ + void exitAtom(PythonParser.AtomContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#dictorsetmaker}. + * @param ctx the parse tree + */ + void enterDictorsetmaker(PythonParser.DictorsetmakerContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#dictorsetmaker}. + * @param ctx the parse tree + */ + void exitDictorsetmaker(PythonParser.DictorsetmakerContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#testlist_comp}. + * @param ctx the parse tree + */ + void enterTestlist_comp(PythonParser.Testlist_compContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#testlist_comp}. + * @param ctx the parse tree + */ + void exitTestlist_comp(PythonParser.Testlist_compContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#testlist}. + * @param ctx the parse tree + */ + void enterTestlist(PythonParser.TestlistContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#testlist}. + * @param ctx the parse tree + */ + void exitTestlist(PythonParser.TestlistContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#dotted_name}. + * @param ctx the parse tree + */ + void enterDotted_name(PythonParser.Dotted_nameContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#dotted_name}. + * @param ctx the parse tree + */ + void exitDotted_name(PythonParser.Dotted_nameContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#name}. + * @param ctx the parse tree + */ + void enterName(PythonParser.NameContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#name}. + * @param ctx the parse tree + */ + void exitName(PythonParser.NameContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#number}. + * @param ctx the parse tree + */ + void enterNumber(PythonParser.NumberContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#number}. + * @param ctx the parse tree + */ + void exitNumber(PythonParser.NumberContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#integer}. + * @param ctx the parse tree + */ + void enterInteger(PythonParser.IntegerContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#integer}. + * @param ctx the parse tree + */ + void exitInteger(PythonParser.IntegerContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#yield_expr}. + * @param ctx the parse tree + */ + void enterYield_expr(PythonParser.Yield_exprContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#yield_expr}. + * @param ctx the parse tree + */ + void exitYield_expr(PythonParser.Yield_exprContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#yield_arg}. + * @param ctx the parse tree + */ + void enterYield_arg(PythonParser.Yield_argContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#yield_arg}. + * @param ctx the parse tree + */ + void exitYield_arg(PythonParser.Yield_argContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#trailer}. + * @param ctx the parse tree + */ + void enterTrailer(PythonParser.TrailerContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#trailer}. + * @param ctx the parse tree + */ + void exitTrailer(PythonParser.TrailerContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#arguments}. + * @param ctx the parse tree + */ + void enterArguments(PythonParser.ArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#arguments}. + * @param ctx the parse tree + */ + void exitArguments(PythonParser.ArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#arglist}. + * @param ctx the parse tree + */ + void enterArglist(PythonParser.ArglistContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#arglist}. + * @param ctx the parse tree + */ + void exitArglist(PythonParser.ArglistContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#argument}. + * @param ctx the parse tree + */ + void enterArgument(PythonParser.ArgumentContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#argument}. + * @param ctx the parse tree + */ + void exitArgument(PythonParser.ArgumentContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#subscriptlist}. + * @param ctx the parse tree + */ + void enterSubscriptlist(PythonParser.SubscriptlistContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#subscriptlist}. + * @param ctx the parse tree + */ + void exitSubscriptlist(PythonParser.SubscriptlistContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#subscript}. + * @param ctx the parse tree + */ + void enterSubscript(PythonParser.SubscriptContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#subscript}. + * @param ctx the parse tree + */ + void exitSubscript(PythonParser.SubscriptContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#sliceop}. + * @param ctx the parse tree + */ + void enterSliceop(PythonParser.SliceopContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#sliceop}. + * @param ctx the parse tree + */ + void exitSliceop(PythonParser.SliceopContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#comp_for}. + * @param ctx the parse tree + */ + void enterComp_for(PythonParser.Comp_forContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#comp_for}. + * @param ctx the parse tree + */ + void exitComp_for(PythonParser.Comp_forContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#comp_iter}. + * @param ctx the parse tree + */ + void enterComp_iter(PythonParser.Comp_iterContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#comp_iter}. + * @param ctx the parse tree + */ + void exitComp_iter(PythonParser.Comp_iterContext ctx); +} \ No newline at end of file diff --git a/src/main/java/grammar/PythonVersion.java b/src/main/java/grammar/PythonVersion.java new file mode 100644 index 00000000..50fae9e1 --- /dev/null +++ b/src/main/java/grammar/PythonVersion.java @@ -0,0 +1,17 @@ +package grammar; + +public enum PythonVersion { + Autodetect(0), + Python2(2), + Python3(3); + + private final int value; + + PythonVersion(int value) { + this.value = value; + } + + public int getValue() { + return value; + } +} diff --git a/src/main/java/grammar/TypeScriptLexer.java b/src/main/java/grammar/TypeScriptLexer.java new file mode 100644 index 00000000..381a8cff --- /dev/null +++ b/src/main/java/grammar/TypeScriptLexer.java @@ -0,0 +1,716 @@ +// Generated from TypeScriptLexer.g4 by ANTLR 4.5 +package grammar; +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class TypeScriptLexer extends TypeScriptLexerBase { + static { RuntimeMetaData.checkVersion("4.5", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + MultiLineComment=1, SingleLineComment=2, RegularExpressionLiteral=3, OpenBracket=4, + CloseBracket=5, OpenParen=6, CloseParen=7, OpenBrace=8, TemplateCloseBrace=9, + CloseBrace=10, SemiColon=11, Comma=12, Assign=13, QuestionMark=14, Colon=15, + Ellipsis=16, Dot=17, PlusPlus=18, MinusMinus=19, Plus=20, Minus=21, BitNot=22, + Not=23, Multiply=24, Divide=25, Modulus=26, RightShiftArithmetic=27, LeftShiftArithmetic=28, + RightShiftLogical=29, LessThan=30, MoreThan=31, LessThanEquals=32, GreaterThanEquals=33, + Equals_=34, NotEquals=35, IdentityEquals=36, IdentityNotEquals=37, BitAnd=38, + BitXOr=39, BitOr=40, And=41, Or=42, MultiplyAssign=43, DivideAssign=44, + ModulusAssign=45, PlusAssign=46, MinusAssign=47, LeftShiftArithmeticAssign=48, + RightShiftArithmeticAssign=49, RightShiftLogicalAssign=50, BitAndAssign=51, + BitXorAssign=52, BitOrAssign=53, ARROW=54, NullLiteral=55, BooleanLiteral=56, + DecimalLiteral=57, HexIntegerLiteral=58, OctalIntegerLiteral=59, OctalIntegerLiteral2=60, + BinaryIntegerLiteral=61, Break=62, Do=63, Instanceof=64, Typeof=65, Case=66, + Else=67, New=68, Var=69, Catch=70, Finally=71, Return=72, Void=73, Continue=74, + For=75, Switch=76, While=77, Debugger=78, Function_=79, This=80, With=81, + Default=82, If=83, Throw=84, Delete=85, In=86, Try=87, As=88, From=89, + ReadOnly=90, Async=91, Class=92, Enum=93, Extends=94, Super=95, Const=96, + Export=97, Import=98, Implements=99, Let=100, Private=101, Public=102, + Interface=103, Package=104, Protected=105, Static=106, Yield=107, Any=108, + Number=109, Boolean=110, String=111, Symbol=112, TypeAlias=113, Get=114, + Set=115, Constructor=116, Namespace=117, Require=118, Module=119, Declare=120, + Abstract=121, Is=122, At=123, Identifier=124, StringLiteral=125, BackTick=126, + WhiteSpaces=127, LineTerminator=128, HtmlComment=129, CDataComment=130, + UnexpectedCharacter=131, TemplateStringEscapeAtom=132, TemplateStringStartExpression=133, + TemplateStringAtom=134; + public static final int + ERROR=2; + public static final int TEMPLATE = 1; + public static String[] modeNames = { + "DEFAULT_MODE", "TEMPLATE" + }; + + public static final String[] ruleNames = { + "MultiLineComment", "SingleLineComment", "RegularExpressionLiteral", "OpenBracket", + "CloseBracket", "OpenParen", "CloseParen", "OpenBrace", "TemplateCloseBrace", + "CloseBrace", "SemiColon", "Comma", "Assign", "QuestionMark", "Colon", + "Ellipsis", "Dot", "PlusPlus", "MinusMinus", "Plus", "Minus", "BitNot", + "Not", "Multiply", "Divide", "Modulus", "RightShiftArithmetic", "LeftShiftArithmetic", + "RightShiftLogical", "LessThan", "MoreThan", "LessThanEquals", "GreaterThanEquals", + "Equals_", "NotEquals", "IdentityEquals", "IdentityNotEquals", "BitAnd", + "BitXOr", "BitOr", "And", "Or", "MultiplyAssign", "DivideAssign", "ModulusAssign", + "PlusAssign", "MinusAssign", "LeftShiftArithmeticAssign", "RightShiftArithmeticAssign", + "RightShiftLogicalAssign", "BitAndAssign", "BitXorAssign", "BitOrAssign", + "ARROW", "NullLiteral", "BooleanLiteral", "DecimalLiteral", "HexIntegerLiteral", + "OctalIntegerLiteral", "OctalIntegerLiteral2", "BinaryIntegerLiteral", + "Break", "Do", "Instanceof", "Typeof", "Case", "Else", "New", "Var", "Catch", + "Finally", "Return", "Void", "Continue", "For", "Switch", "While", "Debugger", + "Function_", "This", "With", "Default", "If", "Throw", "Delete", "In", + "Try", "As", "From", "ReadOnly", "Async", "Class", "Enum", "Extends", + "Super", "Const", "Export", "Import", "Implements", "Let", "Private", + "Public", "Interface", "Package", "Protected", "Static", "Yield", "Any", + "Number", "Boolean", "String", "Symbol", "TypeAlias", "Get", "Set", "Constructor", + "Namespace", "Require", "Module", "Declare", "Abstract", "Is", "At", "Identifier", + "StringLiteral", "BackTick", "WhiteSpaces", "LineTerminator", "HtmlComment", + "CDataComment", "UnexpectedCharacter", "TemplateStringEscapeAtom", "BackTickInside", + "TemplateStringStartExpression", "TemplateStringAtom", "DoubleStringCharacter", + "SingleStringCharacter", "EscapeSequence", "CharacterEscapeSequence", + "HexEscapeSequence", "UnicodeEscapeSequence", "ExtendedUnicodeEscapeSequence", + "SingleEscapeCharacter", "NonEscapeCharacter", "EscapeCharacter", "LineContinuation", + "HexDigit", "DecimalIntegerLiteral", "ExponentPart", "IdentifierPart", + "IdentifierStart", "RegularExpressionFirstChar", "RegularExpressionChar", + "RegularExpressionClassChar", "RegularExpressionBackslashSequence" + }; + + private static final String[] _LITERAL_NAMES = { + null, null, null, null, "'['", "']'", "'('", "')'", "'{'", null, "'}'", + "';'", "','", "'='", "'?'", "':'", "'...'", "'.'", "'++'", "'--'", "'+'", + "'-'", "'~'", "'!'", "'*'", "'/'", "'%'", "'>>'", "'<<'", "'>>>'", "'<'", + "'>'", "'<='", "'>='", "'=='", "'!='", "'==='", "'!=='", "'&'", "'^'", + "'|'", "'&&'", "'||'", "'*='", "'/='", "'%='", "'+='", "'-='", "'<<='", + "'>>='", "'>>>='", "'&='", "'^='", "'|='", "'=>'", "'null'", null, null, + null, null, null, null, "'break'", "'do'", "'instanceof'", "'typeof'", + "'case'", "'else'", "'new'", "'var'", "'catch'", "'finally'", "'return'", + "'void'", "'continue'", "'for'", "'switch'", "'while'", "'debugger'", + "'function'", "'this'", "'with'", "'default'", "'if'", "'throw'", "'delete'", + "'in'", "'try'", "'as'", "'from'", "'readonly'", "'async'", "'class'", + "'enum'", "'extends'", "'super'", "'const'", "'export'", "'import'", "'implements'", + "'let'", "'private'", "'public'", "'interface'", "'package'", "'protected'", + "'static'", "'yield'", "'any'", "'number'", "'boolean'", "'string'", "'symbol'", + "'type'", "'get'", "'set'", "'constructor'", "'namespace'", "'require'", + "'module'", "'declare'", "'abstract'", "'is'", "'@'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, "MultiLineComment", "SingleLineComment", "RegularExpressionLiteral", + "OpenBracket", "CloseBracket", "OpenParen", "CloseParen", "OpenBrace", + "TemplateCloseBrace", "CloseBrace", "SemiColon", "Comma", "Assign", "QuestionMark", + "Colon", "Ellipsis", "Dot", "PlusPlus", "MinusMinus", "Plus", "Minus", + "BitNot", "Not", "Multiply", "Divide", "Modulus", "RightShiftArithmetic", + "LeftShiftArithmetic", "RightShiftLogical", "LessThan", "MoreThan", "LessThanEquals", + "GreaterThanEquals", "Equals_", "NotEquals", "IdentityEquals", "IdentityNotEquals", + "BitAnd", "BitXOr", "BitOr", "And", "Or", "MultiplyAssign", "DivideAssign", + "ModulusAssign", "PlusAssign", "MinusAssign", "LeftShiftArithmeticAssign", + "RightShiftArithmeticAssign", "RightShiftLogicalAssign", "BitAndAssign", + "BitXorAssign", "BitOrAssign", "ARROW", "NullLiteral", "BooleanLiteral", + "DecimalLiteral", "HexIntegerLiteral", "OctalIntegerLiteral", "OctalIntegerLiteral2", + "BinaryIntegerLiteral", "Break", "Do", "Instanceof", "Typeof", "Case", + "Else", "New", "Var", "Catch", "Finally", "Return", "Void", "Continue", + "For", "Switch", "While", "Debugger", "Function_", "This", "With", "Default", + "If", "Throw", "Delete", "In", "Try", "As", "From", "ReadOnly", "Async", + "Class", "Enum", "Extends", "Super", "Const", "Export", "Import", "Implements", + "Let", "Private", "Public", "Interface", "Package", "Protected", "Static", + "Yield", "Any", "Number", "Boolean", "String", "Symbol", "TypeAlias", + "Get", "Set", "Constructor", "Namespace", "Require", "Module", "Declare", + "Abstract", "Is", "At", "Identifier", "StringLiteral", "BackTick", "WhiteSpaces", + "LineTerminator", "HtmlComment", "CDataComment", "UnexpectedCharacter", + "TemplateStringEscapeAtom", "TemplateStringStartExpression", "TemplateStringAtom" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + + public TypeScriptLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "TypeScriptLexer.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + @Override + public void action(RuleContext _localctx, int ruleIndex, int actionIndex) { + switch (ruleIndex) { + case 7: + OpenBrace_action((RuleContext)_localctx, actionIndex); + break; + case 9: + CloseBrace_action((RuleContext)_localctx, actionIndex); + break; + case 124: + StringLiteral_action((RuleContext)_localctx, actionIndex); + break; + case 125: + BackTick_action((RuleContext)_localctx, actionIndex); + break; + case 132: + BackTickInside_action((RuleContext)_localctx, actionIndex); + break; + case 133: + TemplateStringStartExpression_action((RuleContext)_localctx, actionIndex); + break; + } + } + private void OpenBrace_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 0: + this.ProcessOpenBrace(); + break; + } + } + private void CloseBrace_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 1: + this.ProcessCloseBrace(); + break; + } + } + private void StringLiteral_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 2: + this.ProcessStringLiteral(); + break; + } + } + private void BackTick_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 3: + this.IncreaseTemplateDepth(); + break; + } + } + private void BackTickInside_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 4: + this.DecreaseTemplateDepth(); + break; + } + } + private void TemplateStringStartExpression_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 5: + this.StartTemplateString(); + break; + } + } + @Override + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 2: + return RegularExpressionLiteral_sempred((RuleContext)_localctx, predIndex); + case 8: + return TemplateCloseBrace_sempred((RuleContext)_localctx, predIndex); + case 58: + return OctalIntegerLiteral_sempred((RuleContext)_localctx, predIndex); + } + return true; + } + private boolean RegularExpressionLiteral_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 0: + return this.IsRegexPossible(); + } + return true; + } + private boolean TemplateCloseBrace_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 1: + return this.IsInTemplateString(); + } + return true; + } + private boolean OctalIntegerLiteral_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 2: + return !this.IsStrictMode(); + } + return true; + } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\u0088\u04a1\b\1\b"+ + "\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n"+ + "\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21"+ + "\4\22\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30"+ + "\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37"+ + "\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t"+ + "*\4+\t+\4,\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63"+ + "\4\64\t\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t"+ + "<\4=\t=\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4"+ + "H\tH\4I\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\t"+ + "S\4T\tT\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^"+ + "\4_\t_\4`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j"+ + "\tj\4k\tk\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu"+ + "\4v\tv\4w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080"+ + "\t\u0080\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083\4\u0084\t\u0084"+ + "\4\u0085\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087\4\u0088\t\u0088\4\u0089"+ + "\t\u0089\4\u008a\t\u008a\4\u008b\t\u008b\4\u008c\t\u008c\4\u008d\t\u008d"+ + "\4\u008e\t\u008e\4\u008f\t\u008f\4\u0090\t\u0090\4\u0091\t\u0091\4\u0092"+ + "\t\u0092\4\u0093\t\u0093\4\u0094\t\u0094\4\u0095\t\u0095\4\u0096\t\u0096"+ + "\4\u0097\t\u0097\4\u0098\t\u0098\4\u0099\t\u0099\4\u009a\t\u009a\4\u009b"+ + "\t\u009b\4\u009c\t\u009c\3\2\3\2\3\2\3\2\7\2\u013f\n\2\f\2\16\2\u0142"+ + "\13\2\3\2\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3\7\3\u014d\n\3\f\3\16\3\u0150"+ + "\13\3\3\3\3\3\3\4\3\4\3\4\7\4\u0157\n\4\f\4\16\4\u015a\13\4\3\4\3\4\3"+ + "\4\7\4\u015f\n\4\f\4\16\4\u0162\13\4\3\5\3\5\3\6\3\6\3\7\3\7\3\b\3\b\3"+ + "\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\f\3\f\3\r\3\r\3\16\3\16"+ + "\3\17\3\17\3\20\3\20\3\21\3\21\3\21\3\21\3\22\3\22\3\23\3\23\3\23\3\24"+ + "\3\24\3\24\3\25\3\25\3\26\3\26\3\27\3\27\3\30\3\30\3\31\3\31\3\32\3\32"+ + "\3\33\3\33\3\34\3\34\3\34\3\35\3\35\3\35\3\36\3\36\3\36\3\36\3\37\3\37"+ + "\3 \3 \3!\3!\3!\3\"\3\"\3\"\3#\3#\3#\3$\3$\3$\3%\3%\3%\3%\3&\3&\3&\3&"+ + "\3\'\3\'\3(\3(\3)\3)\3*\3*\3*\3+\3+\3+\3,\3,\3,\3-\3-\3-\3.\3.\3.\3/\3"+ + "/\3/\3\60\3\60\3\60\3\61\3\61\3\61\3\61\3\62\3\62\3\62\3\62\3\63\3\63"+ + "\3\63\3\63\3\63\3\64\3\64\3\64\3\65\3\65\3\65\3\66\3\66\3\66\3\67\3\67"+ + "\3\67\38\38\38\38\38\39\39\39\39\39\39\39\39\39\59\u01ff\n9\3:\3:\3:\7"+ + ":\u0204\n:\f:\16:\u0207\13:\3:\5:\u020a\n:\3:\3:\6:\u020e\n:\r:\16:\u020f"+ + "\3:\5:\u0213\n:\3:\3:\5:\u0217\n:\5:\u0219\n:\3;\3;\3;\6;\u021e\n;\r;"+ + "\16;\u021f\3<\3<\6<\u0224\n<\r<\16<\u0225\3<\3<\3=\3=\3=\6=\u022d\n=\r"+ + "=\16=\u022e\3>\3>\3>\6>\u0234\n>\r>\16>\u0235\3?\3?\3?\3?\3?\3?\3@\3@"+ + "\3@\3A\3A\3A\3A\3A\3A\3A\3A\3A\3A\3A\3B\3B\3B\3B\3B\3B\3B\3C\3C\3C\3C"+ + "\3C\3D\3D\3D\3D\3D\3E\3E\3E\3E\3F\3F\3F\3F\3G\3G\3G\3G\3G\3G\3H\3H\3H"+ + "\3H\3H\3H\3H\3H\3I\3I\3I\3I\3I\3I\3I\3J\3J\3J\3J\3J\3K\3K\3K\3K\3K\3K"+ + "\3K\3K\3K\3L\3L\3L\3L\3M\3M\3M\3M\3M\3M\3M\3N\3N\3N\3N\3N\3N\3O\3O\3O"+ + "\3O\3O\3O\3O\3O\3O\3P\3P\3P\3P\3P\3P\3P\3P\3P\3Q\3Q\3Q\3Q\3Q\3R\3R\3R"+ + "\3R\3R\3S\3S\3S\3S\3S\3S\3S\3S\3T\3T\3T\3U\3U\3U\3U\3U\3U\3V\3V\3V\3V"+ + "\3V\3V\3V\3W\3W\3W\3X\3X\3X\3X\3Y\3Y\3Y\3Z\3Z\3Z\3Z\3Z\3[\3[\3[\3[\3["+ + "\3[\3[\3[\3[\3\\\3\\\3\\\3\\\3\\\3\\\3]\3]\3]\3]\3]\3]\3^\3^\3^\3^\3^"+ + "\3_\3_\3_\3_\3_\3_\3_\3_\3`\3`\3`\3`\3`\3`\3a\3a\3a\3a\3a\3a\3b\3b\3b"+ + "\3b\3b\3b\3b\3c\3c\3c\3c\3c\3c\3c\3d\3d\3d\3d\3d\3d\3d\3d\3d\3d\3d\3e"+ + "\3e\3e\3e\3f\3f\3f\3f\3f\3f\3f\3f\3g\3g\3g\3g\3g\3g\3g\3h\3h\3h\3h\3h"+ + "\3h\3h\3h\3h\3h\3i\3i\3i\3i\3i\3i\3i\3i\3j\3j\3j\3j\3j\3j\3j\3j\3j\3j"+ + "\3k\3k\3k\3k\3k\3k\3k\3l\3l\3l\3l\3l\3l\3m\3m\3m\3m\3n\3n\3n\3n\3n\3n"+ + "\3n\3o\3o\3o\3o\3o\3o\3o\3o\3p\3p\3p\3p\3p\3p\3p\3q\3q\3q\3q\3q\3q\3q"+ + "\3r\3r\3r\3r\3r\3s\3s\3s\3s\3t\3t\3t\3t\3u\3u\3u\3u\3u\3u\3u\3u\3u\3u"+ + "\3u\3u\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3w\3w\3w\3w\3w\3w\3w\3w\3x\3x\3x"+ + "\3x\3x\3x\3x\3y\3y\3y\3y\3y\3y\3y\3y\3z\3z\3z\3z\3z\3z\3z\3z\3z\3{\3{"+ + "\3{\3|\3|\3}\3}\7}\u03ca\n}\f}\16}\u03cd\13}\3~\3~\7~\u03d1\n~\f~\16~"+ + "\u03d4\13~\3~\3~\3~\7~\u03d9\n~\f~\16~\u03dc\13~\3~\5~\u03df\n~\3~\3~"+ + "\3\177\3\177\3\177\3\177\3\177\3\u0080\6\u0080\u03e9\n\u0080\r\u0080\16"+ + "\u0080\u03ea\3\u0080\3\u0080\3\u0081\3\u0081\3\u0081\3\u0081\3\u0082\3"+ + "\u0082\3\u0082\3\u0082\3\u0082\3\u0082\7\u0082\u03f9\n\u0082\f\u0082\16"+ + "\u0082\u03fc\13\u0082\3\u0082\3\u0082\3\u0082\3\u0082\3\u0082\3\u0082"+ + "\3\u0083\3\u0083\3\u0083\3\u0083\3\u0083\3\u0083\3\u0083\3\u0083\3\u0083"+ + "\3\u0083\3\u0083\7\u0083\u040f\n\u0083\f\u0083\16\u0083\u0412\13\u0083"+ + "\3\u0083\3\u0083\3\u0083\3\u0083\3\u0083\3\u0083\3\u0084\3\u0084\3\u0084"+ + "\3\u0084\3\u0085\3\u0085\3\u0085\3\u0086\3\u0086\3\u0086\3\u0086\3\u0086"+ + "\3\u0086\3\u0087\3\u0087\3\u0087\3\u0087\3\u0087\3\u0087\3\u0087\3\u0088"+ + "\3\u0088\3\u0089\3\u0089\3\u0089\3\u0089\5\u0089\u0434\n\u0089\3\u008a"+ + "\3\u008a\3\u008a\3\u008a\5\u008a\u043a\n\u008a\3\u008b\3\u008b\3\u008b"+ + "\3\u008b\3\u008b\5\u008b\u0441\n\u008b\3\u008c\3\u008c\5\u008c\u0445\n"+ + "\u008c\3\u008d\3\u008d\3\u008d\3\u008d\3\u008e\3\u008e\3\u008e\3\u008e"+ + "\3\u008e\3\u008e\3\u008f\3\u008f\3\u008f\6\u008f\u0454\n\u008f\r\u008f"+ + "\16\u008f\u0455\3\u008f\3\u008f\3\u0090\3\u0090\3\u0091\3\u0091\3\u0092"+ + "\3\u0092\5\u0092\u0460\n\u0092\3\u0093\3\u0093\3\u0093\3\u0094\3\u0094"+ + "\3\u0095\3\u0095\3\u0095\7\u0095\u046a\n\u0095\f\u0095\16\u0095\u046d"+ + "\13\u0095\5\u0095\u046f\n\u0095\3\u0096\3\u0096\5\u0096\u0473\n\u0096"+ + "\3\u0096\6\u0096\u0476\n\u0096\r\u0096\16\u0096\u0477\3\u0097\3\u0097"+ + "\5\u0097\u047c\n\u0097\3\u0098\3\u0098\3\u0098\5\u0098\u0481\n\u0098\3"+ + "\u0099\3\u0099\3\u0099\3\u0099\7\u0099\u0487\n\u0099\f\u0099\16\u0099"+ + "\u048a\13\u0099\3\u0099\5\u0099\u048d\n\u0099\3\u009a\3\u009a\3\u009a"+ + "\3\u009a\7\u009a\u0493\n\u009a\f\u009a\16\u009a\u0496\13\u009a\3\u009a"+ + "\5\u009a\u0499\n\u009a\3\u009b\3\u009b\5\u009b\u049d\n\u009b\3\u009c\3"+ + "\u009c\3\u009c\5\u0140\u03fa\u0410\2\u009d\4\3\6\4\b\5\n\6\f\7\16\b\20"+ + "\t\22\n\24\13\26\f\30\r\32\16\34\17\36\20 \21\"\22$\23&\24(\25*\26,\27"+ + ".\30\60\31\62\32\64\33\66\348\35:\36<\37> @!B\"D#F$H%J&L\'N(P)R*T+V,X"+ + "-Z.\\/^\60`\61b\62d\63f\64h\65j\66l\67n8p9r:t;v|?~@\u0080A\u0082"+ + "B\u0084C\u0086D\u0088E\u008aF\u008cG\u008eH\u0090I\u0092J\u0094K\u0096"+ + "L\u0098M\u009aN\u009cO\u009eP\u00a0Q\u00a2R\u00a4S\u00a6T\u00a8U\u00aa"+ + "V\u00acW\u00aeX\u00b0Y\u00b2Z\u00b4[\u00b6\\\u00b8]\u00ba^\u00bc_\u00be"+ + "`\u00c0a\u00c2b\u00c4c\u00c6d\u00c8e\u00caf\u00ccg\u00ceh\u00d0i\u00d2"+ + "j\u00d4k\u00d6l\u00d8m\u00dan\u00dco\u00dep\u00e0q\u00e2r\u00e4s\u00e6"+ + "t\u00e8u\u00eav\u00ecw\u00eex\u00f0y\u00f2z\u00f4{\u00f6|\u00f8}\u00fa"+ + "~\u00fc\177\u00fe\u0080\u0100\u0081\u0102\u0082\u0104\u0083\u0106\u0084"+ + "\u0108\u0085\u010a\u0086\u010c\2\u010e\u0087\u0110\u0088\u0112\2\u0114"+ + "\2\u0116\2\u0118\2\u011a\2\u011c\2\u011e\2\u0120\2\u0122\2\u0124\2\u0126"+ + "\2\u0128\2\u012a\2\u012c\2\u012e\2\u0130\2\u0132\2\u0134\2\u0136\2\u0138"+ + "\2\4\2\3\31\5\2\f\f\17\17\u202a\u202b\3\2\62;\4\2ZZzz\3\2\629\4\2QQqq"+ + "\4\2DDdd\3\2\62\63\6\2\13\13\r\16\"\"\u00a2\u00a2\4\2^^bb\6\2\f\f\17\17"+ + "$$^^\6\2\f\f\17\17))^^\13\2$$))^^ddhhppttvvxx\16\2\f\f\17\17$$))\62;^"+ + "^ddhhppttvxzz\5\2\62;wwzz\5\2\62;CHch\3\2\63;\4\2GGgg\4\2--//\13\2OPR"+ + "R^^efpprr}}\177\177\u200e\u200f\t\2&&NN^^aarr}}\177\177\b\2\f\f\17\17"+ + ",,\61\61]^\u202a\u202b\7\2\f\f\17\17\61\61]^\u202a\u202b\6\2\f\f\17\17"+ + "^_\u202a\u202b\u04ba\2\4\3\2\2\2\2\6\3\2\2\2\2\b\3\2\2\2\2\n\3\2\2\2\2"+ + "\f\3\2\2\2\2\16\3\2\2\2\2\20\3\2\2\2\2\22\3\2\2\2\2\24\3\2\2\2\2\26\3"+ + "\2\2\2\2\30\3\2\2\2\2\32\3\2\2\2\2\34\3\2\2\2\2\36\3\2\2\2\2 \3\2\2\2"+ + "\2\"\3\2\2\2\2$\3\2\2\2\2&\3\2\2\2\2(\3\2\2\2\2*\3\2\2\2\2,\3\2\2\2\2"+ + ".\3\2\2\2\2\60\3\2\2\2\2\62\3\2\2\2\2\64\3\2\2\2\2\66\3\2\2\2\28\3\2\2"+ + "\2\2:\3\2\2\2\2<\3\2\2\2\2>\3\2\2\2\2@\3\2\2\2\2B\3\2\2\2\2D\3\2\2\2\2"+ + "F\3\2\2\2\2H\3\2\2\2\2J\3\2\2\2\2L\3\2\2\2\2N\3\2\2\2\2P\3\2\2\2\2R\3"+ + "\2\2\2\2T\3\2\2\2\2V\3\2\2\2\2X\3\2\2\2\2Z\3\2\2\2\2\\\3\2\2\2\2^\3\2"+ + "\2\2\2`\3\2\2\2\2b\3\2\2\2\2d\3\2\2\2\2f\3\2\2\2\2h\3\2\2\2\2j\3\2\2\2"+ + "\2l\3\2\2\2\2n\3\2\2\2\2p\3\2\2\2\2r\3\2\2\2\2t\3\2\2\2\2v\3\2\2\2\2x"+ + "\3\2\2\2\2z\3\2\2\2\2|\3\2\2\2\2~\3\2\2\2\2\u0080\3\2\2\2\2\u0082\3\2"+ + "\2\2\2\u0084\3\2\2\2\2\u0086\3\2\2\2\2\u0088\3\2\2\2\2\u008a\3\2\2\2\2"+ + "\u008c\3\2\2\2\2\u008e\3\2\2\2\2\u0090\3\2\2\2\2\u0092\3\2\2\2\2\u0094"+ + "\3\2\2\2\2\u0096\3\2\2\2\2\u0098\3\2\2\2\2\u009a\3\2\2\2\2\u009c\3\2\2"+ + "\2\2\u009e\3\2\2\2\2\u00a0\3\2\2\2\2\u00a2\3\2\2\2\2\u00a4\3\2\2\2\2\u00a6"+ + "\3\2\2\2\2\u00a8\3\2\2\2\2\u00aa\3\2\2\2\2\u00ac\3\2\2\2\2\u00ae\3\2\2"+ + "\2\2\u00b0\3\2\2\2\2\u00b2\3\2\2\2\2\u00b4\3\2\2\2\2\u00b6\3\2\2\2\2\u00b8"+ + "\3\2\2\2\2\u00ba\3\2\2\2\2\u00bc\3\2\2\2\2\u00be\3\2\2\2\2\u00c0\3\2\2"+ + "\2\2\u00c2\3\2\2\2\2\u00c4\3\2\2\2\2\u00c6\3\2\2\2\2\u00c8\3\2\2\2\2\u00ca"+ + "\3\2\2\2\2\u00cc\3\2\2\2\2\u00ce\3\2\2\2\2\u00d0\3\2\2\2\2\u00d2\3\2\2"+ + "\2\2\u00d4\3\2\2\2\2\u00d6\3\2\2\2\2\u00d8\3\2\2\2\2\u00da\3\2\2\2\2\u00dc"+ + "\3\2\2\2\2\u00de\3\2\2\2\2\u00e0\3\2\2\2\2\u00e2\3\2\2\2\2\u00e4\3\2\2"+ + "\2\2\u00e6\3\2\2\2\2\u00e8\3\2\2\2\2\u00ea\3\2\2\2\2\u00ec\3\2\2\2\2\u00ee"+ + "\3\2\2\2\2\u00f0\3\2\2\2\2\u00f2\3\2\2\2\2\u00f4\3\2\2\2\2\u00f6\3\2\2"+ + "\2\2\u00f8\3\2\2\2\2\u00fa\3\2\2\2\2\u00fc\3\2\2\2\2\u00fe\3\2\2\2\2\u0100"+ + "\3\2\2\2\2\u0102\3\2\2\2\2\u0104\3\2\2\2\2\u0106\3\2\2\2\2\u0108\3\2\2"+ + "\2\3\u010a\3\2\2\2\3\u010c\3\2\2\2\3\u010e\3\2\2\2\3\u0110\3\2\2\2\4\u013a"+ + "\3\2\2\2\6\u0148\3\2\2\2\b\u0153\3\2\2\2\n\u0163\3\2\2\2\f\u0165\3\2\2"+ + "\2\16\u0167\3\2\2\2\20\u0169\3\2\2\2\22\u016b\3\2\2\2\24\u016e\3\2\2\2"+ + "\26\u0173\3\2\2\2\30\u0176\3\2\2\2\32\u0178\3\2\2\2\34\u017a\3\2\2\2\36"+ + "\u017c\3\2\2\2 \u017e\3\2\2\2\"\u0180\3\2\2\2$\u0184\3\2\2\2&\u0186\3"+ + "\2\2\2(\u0189\3\2\2\2*\u018c\3\2\2\2,\u018e\3\2\2\2.\u0190\3\2\2\2\60"+ + "\u0192\3\2\2\2\62\u0194\3\2\2\2\64\u0196\3\2\2\2\66\u0198\3\2\2\28\u019a"+ + "\3\2\2\2:\u019d\3\2\2\2<\u01a0\3\2\2\2>\u01a4\3\2\2\2@\u01a6\3\2\2\2B"+ + "\u01a8\3\2\2\2D\u01ab\3\2\2\2F\u01ae\3\2\2\2H\u01b1\3\2\2\2J\u01b4\3\2"+ + "\2\2L\u01b8\3\2\2\2N\u01bc\3\2\2\2P\u01be\3\2\2\2R\u01c0\3\2\2\2T\u01c2"+ + "\3\2\2\2V\u01c5\3\2\2\2X\u01c8\3\2\2\2Z\u01cb\3\2\2\2\\\u01ce\3\2\2\2"+ + "^\u01d1\3\2\2\2`\u01d4\3\2\2\2b\u01d7\3\2\2\2d\u01db\3\2\2\2f\u01df\3"+ + "\2\2\2h\u01e4\3\2\2\2j\u01e7\3\2\2\2l\u01ea\3\2\2\2n\u01ed\3\2\2\2p\u01f0"+ + "\3\2\2\2r\u01fe\3\2\2\2t\u0218\3\2\2\2v\u021a\3\2\2\2x\u0221\3\2\2\2z"+ + "\u0229\3\2\2\2|\u0230\3\2\2\2~\u0237\3\2\2\2\u0080\u023d\3\2\2\2\u0082"+ + "\u0240\3\2\2\2\u0084\u024b\3\2\2\2\u0086\u0252\3\2\2\2\u0088\u0257\3\2"+ + "\2\2\u008a\u025c\3\2\2\2\u008c\u0260\3\2\2\2\u008e\u0264\3\2\2\2\u0090"+ + "\u026a\3\2\2\2\u0092\u0272\3\2\2\2\u0094\u0279\3\2\2\2\u0096\u027e\3\2"+ + "\2\2\u0098\u0287\3\2\2\2\u009a\u028b\3\2\2\2\u009c\u0292\3\2\2\2\u009e"+ + "\u0298\3\2\2\2\u00a0\u02a1\3\2\2\2\u00a2\u02aa\3\2\2\2\u00a4\u02af\3\2"+ + "\2\2\u00a6\u02b4\3\2\2\2\u00a8\u02bc\3\2\2\2\u00aa\u02bf\3\2\2\2\u00ac"+ + "\u02c5\3\2\2\2\u00ae\u02cc\3\2\2\2\u00b0\u02cf\3\2\2\2\u00b2\u02d3\3\2"+ + "\2\2\u00b4\u02d6\3\2\2\2\u00b6\u02db\3\2\2\2\u00b8\u02e4\3\2\2\2\u00ba"+ + "\u02ea\3\2\2\2\u00bc\u02f0\3\2\2\2\u00be\u02f5\3\2\2\2\u00c0\u02fd\3\2"+ + "\2\2\u00c2\u0303\3\2\2\2\u00c4\u0309\3\2\2\2\u00c6\u0310\3\2\2\2\u00c8"+ + "\u0317\3\2\2\2\u00ca\u0322\3\2\2\2\u00cc\u0326\3\2\2\2\u00ce\u032e\3\2"+ + "\2\2\u00d0\u0335\3\2\2\2\u00d2\u033f\3\2\2\2\u00d4\u0347\3\2\2\2\u00d6"+ + "\u0351\3\2\2\2\u00d8\u0358\3\2\2\2\u00da\u035e\3\2\2\2\u00dc\u0362\3\2"+ + "\2\2\u00de\u0369\3\2\2\2\u00e0\u0371\3\2\2\2\u00e2\u0378\3\2\2\2\u00e4"+ + "\u037f\3\2\2\2\u00e6\u0384\3\2\2\2\u00e8\u0388\3\2\2\2\u00ea\u038c\3\2"+ + "\2\2\u00ec\u0398\3\2\2\2\u00ee\u03a2\3\2\2\2\u00f0\u03aa\3\2\2\2\u00f2"+ + "\u03b1\3\2\2\2\u00f4\u03b9\3\2\2\2\u00f6\u03c2\3\2\2\2\u00f8\u03c5\3\2"+ + "\2\2\u00fa\u03c7\3\2\2\2\u00fc\u03de\3\2\2\2\u00fe\u03e2\3\2\2\2\u0100"+ + "\u03e8\3\2\2\2\u0102\u03ee\3\2\2\2\u0104\u03f2\3\2\2\2\u0106\u0403\3\2"+ + "\2\2\u0108\u0419\3\2\2\2\u010a\u041d\3\2\2\2\u010c\u0420\3\2\2\2\u010e"+ + "\u0426\3\2\2\2\u0110\u042d\3\2\2\2\u0112\u0433\3\2\2\2\u0114\u0439\3\2"+ + "\2\2\u0116\u0440\3\2\2\2\u0118\u0444\3\2\2\2\u011a\u0446\3\2\2\2\u011c"+ + "\u044a\3\2\2\2\u011e\u0450\3\2\2\2\u0120\u0459\3\2\2\2\u0122\u045b\3\2"+ + "\2\2\u0124\u045f\3\2\2\2\u0126\u0461\3\2\2\2\u0128\u0464\3\2\2\2\u012a"+ + "\u046e\3\2\2\2\u012c\u0470\3\2\2\2\u012e\u047b\3\2\2\2\u0130\u0480\3\2"+ + "\2\2\u0132\u048c\3\2\2\2\u0134\u0498\3\2\2\2\u0136\u049c\3\2\2\2\u0138"+ + "\u049e\3\2\2\2\u013a\u013b\7\61\2\2\u013b\u013c\7,\2\2\u013c\u0140\3\2"+ + "\2\2\u013d\u013f\13\2\2\2\u013e\u013d\3\2\2\2\u013f\u0142\3\2\2\2\u0140"+ + "\u0141\3\2\2\2\u0140\u013e\3\2\2\2\u0141\u0143\3\2\2\2\u0142\u0140\3\2"+ + "\2\2\u0143\u0144\7,\2\2\u0144\u0145\7\61\2\2\u0145\u0146\3\2\2\2\u0146"+ + "\u0147\b\2\2\2\u0147\5\3\2\2\2\u0148\u0149\7\61\2\2\u0149\u014a\7\61\2"+ + "\2\u014a\u014e\3\2\2\2\u014b\u014d\n\2\2\2\u014c\u014b\3\2\2\2\u014d\u0150"+ + "\3\2\2\2\u014e\u014c\3\2\2\2\u014e\u014f\3\2\2\2\u014f\u0151\3\2\2\2\u0150"+ + "\u014e\3\2\2\2\u0151\u0152\b\3\2\2\u0152\7\3\2\2\2\u0153\u0154\7\61\2"+ + "\2\u0154\u0158\5\u0132\u0099\2\u0155\u0157\5\u0134\u009a\2\u0156\u0155"+ + "\3\2\2\2\u0157\u015a\3\2\2\2\u0158\u0156\3\2\2\2\u0158\u0159\3\2\2\2\u0159"+ + "\u015b\3\2\2\2\u015a\u0158\3\2\2\2\u015b\u015c\6\4\2\2\u015c\u0160\7\61"+ + "\2\2\u015d\u015f\5\u012e\u0097\2\u015e\u015d\3\2\2\2\u015f\u0162\3\2\2"+ + "\2\u0160\u015e\3\2\2\2\u0160\u0161\3\2\2\2\u0161\t\3\2\2\2\u0162\u0160"+ + "\3\2\2\2\u0163\u0164\7]\2\2\u0164\13\3\2\2\2\u0165\u0166\7_\2\2\u0166"+ + "\r\3\2\2\2\u0167\u0168\7*\2\2\u0168\17\3\2\2\2\u0169\u016a\7+\2\2\u016a"+ + "\21\3\2\2\2\u016b\u016c\7}\2\2\u016c\u016d\b\t\3\2\u016d\23\3\2\2\2\u016e"+ + "\u016f\6\n\3\2\u016f\u0170\7\177\2\2\u0170\u0171\3\2\2\2\u0171\u0172\b"+ + "\n\4\2\u0172\25\3\2\2\2\u0173\u0174\7\177\2\2\u0174\u0175\b\13\5\2\u0175"+ + "\27\3\2\2\2\u0176\u0177\7=\2\2\u0177\31\3\2\2\2\u0178\u0179\7.\2\2\u0179"+ + "\33\3\2\2\2\u017a\u017b\7?\2\2\u017b\35\3\2\2\2\u017c\u017d\7A\2\2\u017d"+ + "\37\3\2\2\2\u017e\u017f\7<\2\2\u017f!\3\2\2\2\u0180\u0181\7\60\2\2\u0181"+ + "\u0182\7\60\2\2\u0182\u0183\7\60\2\2\u0183#\3\2\2\2\u0184\u0185\7\60\2"+ + "\2\u0185%\3\2\2\2\u0186\u0187\7-\2\2\u0187\u0188\7-\2\2\u0188\'\3\2\2"+ + "\2\u0189\u018a\7/\2\2\u018a\u018b\7/\2\2\u018b)\3\2\2\2\u018c\u018d\7"+ + "-\2\2\u018d+\3\2\2\2\u018e\u018f\7/\2\2\u018f-\3\2\2\2\u0190\u0191\7\u0080"+ + "\2\2\u0191/\3\2\2\2\u0192\u0193\7#\2\2\u0193\61\3\2\2\2\u0194\u0195\7"+ + ",\2\2\u0195\63\3\2\2\2\u0196\u0197\7\61\2\2\u0197\65\3\2\2\2\u0198\u0199"+ + "\7\'\2\2\u0199\67\3\2\2\2\u019a\u019b\7@\2\2\u019b\u019c\7@\2\2\u019c"+ + "9\3\2\2\2\u019d\u019e\7>\2\2\u019e\u019f\7>\2\2\u019f;\3\2\2\2\u01a0\u01a1"+ + "\7@\2\2\u01a1\u01a2\7@\2\2\u01a2\u01a3\7@\2\2\u01a3=\3\2\2\2\u01a4\u01a5"+ + "\7>\2\2\u01a5?\3\2\2\2\u01a6\u01a7\7@\2\2\u01a7A\3\2\2\2\u01a8\u01a9\7"+ + ">\2\2\u01a9\u01aa\7?\2\2\u01aaC\3\2\2\2\u01ab\u01ac\7@\2\2\u01ac\u01ad"+ + "\7?\2\2\u01adE\3\2\2\2\u01ae\u01af\7?\2\2\u01af\u01b0\7?\2\2\u01b0G\3"+ + "\2\2\2\u01b1\u01b2\7#\2\2\u01b2\u01b3\7?\2\2\u01b3I\3\2\2\2\u01b4\u01b5"+ + "\7?\2\2\u01b5\u01b6\7?\2\2\u01b6\u01b7\7?\2\2\u01b7K\3\2\2\2\u01b8\u01b9"+ + "\7#\2\2\u01b9\u01ba\7?\2\2\u01ba\u01bb\7?\2\2\u01bbM\3\2\2\2\u01bc\u01bd"+ + "\7(\2\2\u01bdO\3\2\2\2\u01be\u01bf\7`\2\2\u01bfQ\3\2\2\2\u01c0\u01c1\7"+ + "~\2\2\u01c1S\3\2\2\2\u01c2\u01c3\7(\2\2\u01c3\u01c4\7(\2\2\u01c4U\3\2"+ + "\2\2\u01c5\u01c6\7~\2\2\u01c6\u01c7\7~\2\2\u01c7W\3\2\2\2\u01c8\u01c9"+ + "\7,\2\2\u01c9\u01ca\7?\2\2\u01caY\3\2\2\2\u01cb\u01cc\7\61\2\2\u01cc\u01cd"+ + "\7?\2\2\u01cd[\3\2\2\2\u01ce\u01cf\7\'\2\2\u01cf\u01d0\7?\2\2\u01d0]\3"+ + "\2\2\2\u01d1\u01d2\7-\2\2\u01d2\u01d3\7?\2\2\u01d3_\3\2\2\2\u01d4\u01d5"+ + "\7/\2\2\u01d5\u01d6\7?\2\2\u01d6a\3\2\2\2\u01d7\u01d8\7>\2\2\u01d8\u01d9"+ + "\7>\2\2\u01d9\u01da\7?\2\2\u01dac\3\2\2\2\u01db\u01dc\7@\2\2\u01dc\u01dd"+ + "\7@\2\2\u01dd\u01de\7?\2\2\u01dee\3\2\2\2\u01df\u01e0\7@\2\2\u01e0\u01e1"+ + "\7@\2\2\u01e1\u01e2\7@\2\2\u01e2\u01e3\7?\2\2\u01e3g\3\2\2\2\u01e4\u01e5"+ + "\7(\2\2\u01e5\u01e6\7?\2\2\u01e6i\3\2\2\2\u01e7\u01e8\7`\2\2\u01e8\u01e9"+ + "\7?\2\2\u01e9k\3\2\2\2\u01ea\u01eb\7~\2\2\u01eb\u01ec\7?\2\2\u01ecm\3"+ + "\2\2\2\u01ed\u01ee\7?\2\2\u01ee\u01ef\7@\2\2\u01efo\3\2\2\2\u01f0\u01f1"+ + "\7p\2\2\u01f1\u01f2\7w\2\2\u01f2\u01f3\7n\2\2\u01f3\u01f4\7n\2\2\u01f4"+ + "q\3\2\2\2\u01f5\u01f6\7v\2\2\u01f6\u01f7\7t\2\2\u01f7\u01f8\7w\2\2\u01f8"+ + "\u01ff\7g\2\2\u01f9\u01fa\7h\2\2\u01fa\u01fb\7c\2\2\u01fb\u01fc\7n\2\2"+ + "\u01fc\u01fd\7u\2\2\u01fd\u01ff\7g\2\2\u01fe\u01f5\3\2\2\2\u01fe\u01f9"+ + "\3\2\2\2\u01ffs\3\2\2\2\u0200\u0201\5\u012a\u0095\2\u0201\u0205\7\60\2"+ + "\2\u0202\u0204\t\3\2\2\u0203\u0202\3\2\2\2\u0204\u0207\3\2\2\2\u0205\u0203"+ + "\3\2\2\2\u0205\u0206\3\2\2\2\u0206\u0209\3\2\2\2\u0207\u0205\3\2\2\2\u0208"+ + "\u020a\5\u012c\u0096\2\u0209\u0208\3\2\2\2\u0209\u020a\3\2\2\2\u020a\u0219"+ + "\3\2\2\2\u020b\u020d\7\60\2\2\u020c\u020e\t\3\2\2\u020d\u020c\3\2\2\2"+ + "\u020e\u020f\3\2\2\2\u020f\u020d\3\2\2\2\u020f\u0210\3\2\2\2\u0210\u0212"+ + "\3\2\2\2\u0211\u0213\5\u012c\u0096\2\u0212\u0211\3\2\2\2\u0212\u0213\3"+ + "\2\2\2\u0213\u0219\3\2\2\2\u0214\u0216\5\u012a\u0095\2\u0215\u0217\5\u012c"+ + "\u0096\2\u0216\u0215\3\2\2\2\u0216\u0217\3\2\2\2\u0217\u0219\3\2\2\2\u0218"+ + "\u0200\3\2\2\2\u0218\u020b\3\2\2\2\u0218\u0214\3\2\2\2\u0219u\3\2\2\2"+ + "\u021a\u021b\7\62\2\2\u021b\u021d\t\4\2\2\u021c\u021e\5\u0128\u0094\2"+ + "\u021d\u021c\3\2\2\2\u021e\u021f\3\2\2\2\u021f\u021d\3\2\2\2\u021f\u0220"+ + "\3\2\2\2\u0220w\3\2\2\2\u0221\u0223\7\62\2\2\u0222\u0224\t\5\2\2\u0223"+ + "\u0222\3\2\2\2\u0224\u0225\3\2\2\2\u0225\u0223\3\2\2\2\u0225\u0226\3\2"+ + "\2\2\u0226\u0227\3\2\2\2\u0227\u0228\6<\4\2\u0228y\3\2\2\2\u0229\u022a"+ + "\7\62\2\2\u022a\u022c\t\6\2\2\u022b\u022d\t\5\2\2\u022c\u022b\3\2\2\2"+ + "\u022d\u022e\3\2\2\2\u022e\u022c\3\2\2\2\u022e\u022f\3\2\2\2\u022f{\3"+ + "\2\2\2\u0230\u0231\7\62\2\2\u0231\u0233\t\7\2\2\u0232\u0234\t\b\2\2\u0233"+ + "\u0232\3\2\2\2\u0234\u0235\3\2\2\2\u0235\u0233\3\2\2\2\u0235\u0236\3\2"+ + "\2\2\u0236}\3\2\2\2\u0237\u0238\7d\2\2\u0238\u0239\7t\2\2\u0239\u023a"+ + "\7g\2\2\u023a\u023b\7c\2\2\u023b\u023c\7m\2\2\u023c\177\3\2\2\2\u023d"+ + "\u023e\7f\2\2\u023e\u023f\7q\2\2\u023f\u0081\3\2\2\2\u0240\u0241\7k\2"+ + "\2\u0241\u0242\7p\2\2\u0242\u0243\7u\2\2\u0243\u0244\7v\2\2\u0244\u0245"+ + "\7c\2\2\u0245\u0246\7p\2\2\u0246\u0247\7e\2\2\u0247\u0248\7g\2\2\u0248"+ + "\u0249\7q\2\2\u0249\u024a\7h\2\2\u024a\u0083\3\2\2\2\u024b\u024c\7v\2"+ + "\2\u024c\u024d\7{\2\2\u024d\u024e\7r\2\2\u024e\u024f\7g\2\2\u024f\u0250"+ + "\7q\2\2\u0250\u0251\7h\2\2\u0251\u0085\3\2\2\2\u0252\u0253\7e\2\2\u0253"+ + "\u0254\7c\2\2\u0254\u0255\7u\2\2\u0255\u0256\7g\2\2\u0256\u0087\3\2\2"+ + "\2\u0257\u0258\7g\2\2\u0258\u0259\7n\2\2\u0259\u025a\7u\2\2\u025a\u025b"+ + "\7g\2\2\u025b\u0089\3\2\2\2\u025c\u025d\7p\2\2\u025d\u025e\7g\2\2\u025e"+ + "\u025f\7y\2\2\u025f\u008b\3\2\2\2\u0260\u0261\7x\2\2\u0261\u0262\7c\2"+ + "\2\u0262\u0263\7t\2\2\u0263\u008d\3\2\2\2\u0264\u0265\7e\2\2\u0265\u0266"+ + "\7c\2\2\u0266\u0267\7v\2\2\u0267\u0268\7e\2\2\u0268\u0269\7j\2\2\u0269"+ + "\u008f\3\2\2\2\u026a\u026b\7h\2\2\u026b\u026c\7k\2\2\u026c\u026d\7p\2"+ + "\2\u026d\u026e\7c\2\2\u026e\u026f\7n\2\2\u026f\u0270\7n\2\2\u0270\u0271"+ + "\7{\2\2\u0271\u0091\3\2\2\2\u0272\u0273\7t\2\2\u0273\u0274\7g\2\2\u0274"+ + "\u0275\7v\2\2\u0275\u0276\7w\2\2\u0276\u0277\7t\2\2\u0277\u0278\7p\2\2"+ + "\u0278\u0093\3\2\2\2\u0279\u027a\7x\2\2\u027a\u027b\7q\2\2\u027b\u027c"+ + "\7k\2\2\u027c\u027d\7f\2\2\u027d\u0095\3\2\2\2\u027e\u027f\7e\2\2\u027f"+ + "\u0280\7q\2\2\u0280\u0281\7p\2\2\u0281\u0282\7v\2\2\u0282\u0283\7k\2\2"+ + "\u0283\u0284\7p\2\2\u0284\u0285\7w\2\2\u0285\u0286\7g\2\2\u0286\u0097"+ + "\3\2\2\2\u0287\u0288\7h\2\2\u0288\u0289\7q\2\2\u0289\u028a\7t\2\2\u028a"+ + "\u0099\3\2\2\2\u028b\u028c\7u\2\2\u028c\u028d\7y\2\2\u028d\u028e\7k\2"+ + "\2\u028e\u028f\7v\2\2\u028f\u0290\7e\2\2\u0290\u0291\7j\2\2\u0291\u009b"+ + "\3\2\2\2\u0292\u0293\7y\2\2\u0293\u0294\7j\2\2\u0294\u0295\7k\2\2\u0295"+ + "\u0296\7n\2\2\u0296\u0297\7g\2\2\u0297\u009d\3\2\2\2\u0298\u0299\7f\2"+ + "\2\u0299\u029a\7g\2\2\u029a\u029b\7d\2\2\u029b\u029c\7w\2\2\u029c\u029d"+ + "\7i\2\2\u029d\u029e\7i\2\2\u029e\u029f\7g\2\2\u029f\u02a0\7t\2\2\u02a0"+ + "\u009f\3\2\2\2\u02a1\u02a2\7h\2\2\u02a2\u02a3\7w\2\2\u02a3\u02a4\7p\2"+ + "\2\u02a4\u02a5\7e\2\2\u02a5\u02a6\7v\2\2\u02a6\u02a7\7k\2\2\u02a7\u02a8"+ + "\7q\2\2\u02a8\u02a9\7p\2\2\u02a9\u00a1\3\2\2\2\u02aa\u02ab\7v\2\2\u02ab"+ + "\u02ac\7j\2\2\u02ac\u02ad\7k\2\2\u02ad\u02ae\7u\2\2\u02ae\u00a3\3\2\2"+ + "\2\u02af\u02b0\7y\2\2\u02b0\u02b1\7k\2\2\u02b1\u02b2\7v\2\2\u02b2\u02b3"+ + "\7j\2\2\u02b3\u00a5\3\2\2\2\u02b4\u02b5\7f\2\2\u02b5\u02b6\7g\2\2\u02b6"+ + "\u02b7\7h\2\2\u02b7\u02b8\7c\2\2\u02b8\u02b9\7w\2\2\u02b9\u02ba\7n\2\2"+ + "\u02ba\u02bb\7v\2\2\u02bb\u00a7\3\2\2\2\u02bc\u02bd\7k\2\2\u02bd\u02be"+ + "\7h\2\2\u02be\u00a9\3\2\2\2\u02bf\u02c0\7v\2\2\u02c0\u02c1\7j\2\2\u02c1"+ + "\u02c2\7t\2\2\u02c2\u02c3\7q\2\2\u02c3\u02c4\7y\2\2\u02c4\u00ab\3\2\2"+ + "\2\u02c5\u02c6\7f\2\2\u02c6\u02c7\7g\2\2\u02c7\u02c8\7n\2\2\u02c8\u02c9"+ + "\7g\2\2\u02c9\u02ca\7v\2\2\u02ca\u02cb\7g\2\2\u02cb\u00ad\3\2\2\2\u02cc"+ + "\u02cd\7k\2\2\u02cd\u02ce\7p\2\2\u02ce\u00af\3\2\2\2\u02cf\u02d0\7v\2"+ + "\2\u02d0\u02d1\7t\2\2\u02d1\u02d2\7{\2\2\u02d2\u00b1\3\2\2\2\u02d3\u02d4"+ + "\7c\2\2\u02d4\u02d5\7u\2\2\u02d5\u00b3\3\2\2\2\u02d6\u02d7\7h\2\2\u02d7"+ + "\u02d8\7t\2\2\u02d8\u02d9\7q\2\2\u02d9\u02da\7o\2\2\u02da\u00b5\3\2\2"+ + "\2\u02db\u02dc\7t\2\2\u02dc\u02dd\7g\2\2\u02dd\u02de\7c\2\2\u02de\u02df"+ + "\7f\2\2\u02df\u02e0\7q\2\2\u02e0\u02e1\7p\2\2\u02e1\u02e2\7n\2\2\u02e2"+ + "\u02e3\7{\2\2\u02e3\u00b7\3\2\2\2\u02e4\u02e5\7c\2\2\u02e5\u02e6\7u\2"+ + "\2\u02e6\u02e7\7{\2\2\u02e7\u02e8\7p\2\2\u02e8\u02e9\7e\2\2\u02e9\u00b9"+ + "\3\2\2\2\u02ea\u02eb\7e\2\2\u02eb\u02ec\7n\2\2\u02ec\u02ed\7c\2\2\u02ed"+ + "\u02ee\7u\2\2\u02ee\u02ef\7u\2\2\u02ef\u00bb\3\2\2\2\u02f0\u02f1\7g\2"+ + "\2\u02f1\u02f2\7p\2\2\u02f2\u02f3\7w\2\2\u02f3\u02f4\7o\2\2\u02f4\u00bd"+ + "\3\2\2\2\u02f5\u02f6\7g\2\2\u02f6\u02f7\7z\2\2\u02f7\u02f8\7v\2\2\u02f8"+ + "\u02f9\7g\2\2\u02f9\u02fa\7p\2\2\u02fa\u02fb\7f\2\2\u02fb\u02fc\7u\2\2"+ + "\u02fc\u00bf\3\2\2\2\u02fd\u02fe\7u\2\2\u02fe\u02ff\7w\2\2\u02ff\u0300"+ + "\7r\2\2\u0300\u0301\7g\2\2\u0301\u0302\7t\2\2\u0302\u00c1\3\2\2\2\u0303"+ + "\u0304\7e\2\2\u0304\u0305\7q\2\2\u0305\u0306\7p\2\2\u0306\u0307\7u\2\2"+ + "\u0307\u0308\7v\2\2\u0308\u00c3\3\2\2\2\u0309\u030a\7g\2\2\u030a\u030b"+ + "\7z\2\2\u030b\u030c\7r\2\2\u030c\u030d\7q\2\2\u030d\u030e\7t\2\2\u030e"+ + "\u030f\7v\2\2\u030f\u00c5\3\2\2\2\u0310\u0311\7k\2\2\u0311\u0312\7o\2"+ + "\2\u0312\u0313\7r\2\2\u0313\u0314\7q\2\2\u0314\u0315\7t\2\2\u0315\u0316"+ + "\7v\2\2\u0316\u00c7\3\2\2\2\u0317\u0318\7k\2\2\u0318\u0319\7o\2\2\u0319"+ + "\u031a\7r\2\2\u031a\u031b\7n\2\2\u031b\u031c\7g\2\2\u031c\u031d\7o\2\2"+ + "\u031d\u031e\7g\2\2\u031e\u031f\7p\2\2\u031f\u0320\7v\2\2\u0320\u0321"+ + "\7u\2\2\u0321\u00c9\3\2\2\2\u0322\u0323\7n\2\2\u0323\u0324\7g\2\2\u0324"+ + "\u0325\7v\2\2\u0325\u00cb\3\2\2\2\u0326\u0327\7r\2\2\u0327\u0328\7t\2"+ + "\2\u0328\u0329\7k\2\2\u0329\u032a\7x\2\2\u032a\u032b\7c\2\2\u032b\u032c"+ + "\7v\2\2\u032c\u032d\7g\2\2\u032d\u00cd\3\2\2\2\u032e\u032f\7r\2\2\u032f"+ + "\u0330\7w\2\2\u0330\u0331\7d\2\2\u0331\u0332\7n\2\2\u0332\u0333\7k\2\2"+ + "\u0333\u0334\7e\2\2\u0334\u00cf\3\2\2\2\u0335\u0336\7k\2\2\u0336\u0337"+ + "\7p\2\2\u0337\u0338\7v\2\2\u0338\u0339\7g\2\2\u0339\u033a\7t\2\2\u033a"+ + "\u033b\7h\2\2\u033b\u033c\7c\2\2\u033c\u033d\7e\2\2\u033d\u033e\7g\2\2"+ + "\u033e\u00d1\3\2\2\2\u033f\u0340\7r\2\2\u0340\u0341\7c\2\2\u0341\u0342"+ + "\7e\2\2\u0342\u0343\7m\2\2\u0343\u0344\7c\2\2\u0344\u0345\7i\2\2\u0345"+ + "\u0346\7g\2\2\u0346\u00d3\3\2\2\2\u0347\u0348\7r\2\2\u0348\u0349\7t\2"+ + "\2\u0349\u034a\7q\2\2\u034a\u034b\7v\2\2\u034b\u034c\7g\2\2\u034c\u034d"+ + "\7e\2\2\u034d\u034e\7v\2\2\u034e\u034f\7g\2\2\u034f\u0350\7f\2\2\u0350"+ + "\u00d5\3\2\2\2\u0351\u0352\7u\2\2\u0352\u0353\7v\2\2\u0353\u0354\7c\2"+ + "\2\u0354\u0355\7v\2\2\u0355\u0356\7k\2\2\u0356\u0357\7e\2\2\u0357\u00d7"+ + "\3\2\2\2\u0358\u0359\7{\2\2\u0359\u035a\7k\2\2\u035a\u035b\7g\2\2\u035b"+ + "\u035c\7n\2\2\u035c\u035d\7f\2\2\u035d\u00d9\3\2\2\2\u035e\u035f\7c\2"+ + "\2\u035f\u0360\7p\2\2\u0360\u0361\7{\2\2\u0361\u00db\3\2\2\2\u0362\u0363"+ + "\7p\2\2\u0363\u0364\7w\2\2\u0364\u0365\7o\2\2\u0365\u0366\7d\2\2\u0366"+ + "\u0367\7g\2\2\u0367\u0368\7t\2\2\u0368\u00dd\3\2\2\2\u0369\u036a\7d\2"+ + "\2\u036a\u036b\7q\2\2\u036b\u036c\7q\2\2\u036c\u036d\7n\2\2\u036d\u036e"+ + "\7g\2\2\u036e\u036f\7c\2\2\u036f\u0370\7p\2\2\u0370\u00df\3\2\2\2\u0371"+ + "\u0372\7u\2\2\u0372\u0373\7v\2\2\u0373\u0374\7t\2\2\u0374\u0375\7k\2\2"+ + "\u0375\u0376\7p\2\2\u0376\u0377\7i\2\2\u0377\u00e1\3\2\2\2\u0378\u0379"+ + "\7u\2\2\u0379\u037a\7{\2\2\u037a\u037b\7o\2\2\u037b\u037c\7d\2\2\u037c"+ + "\u037d\7q\2\2\u037d\u037e\7n\2\2\u037e\u00e3\3\2\2\2\u037f\u0380\7v\2"+ + "\2\u0380\u0381\7{\2\2\u0381\u0382\7r\2\2\u0382\u0383\7g\2\2\u0383\u00e5"+ + "\3\2\2\2\u0384\u0385\7i\2\2\u0385\u0386\7g\2\2\u0386\u0387\7v\2\2\u0387"+ + "\u00e7\3\2\2\2\u0388\u0389\7u\2\2\u0389\u038a\7g\2\2\u038a\u038b\7v\2"+ + "\2\u038b\u00e9\3\2\2\2\u038c\u038d\7e\2\2\u038d\u038e\7q\2\2\u038e\u038f"+ + "\7p\2\2\u038f\u0390\7u\2\2\u0390\u0391\7v\2\2\u0391\u0392\7t\2\2\u0392"+ + "\u0393\7w\2\2\u0393\u0394\7e\2\2\u0394\u0395\7v\2\2\u0395\u0396\7q\2\2"+ + "\u0396\u0397\7t\2\2\u0397\u00eb\3\2\2\2\u0398\u0399\7p\2\2\u0399\u039a"+ + "\7c\2\2\u039a\u039b\7o\2\2\u039b\u039c\7g\2\2\u039c\u039d\7u\2\2\u039d"+ + "\u039e\7r\2\2\u039e\u039f\7c\2\2\u039f\u03a0\7e\2\2\u03a0\u03a1\7g\2\2"+ + "\u03a1\u00ed\3\2\2\2\u03a2\u03a3\7t\2\2\u03a3\u03a4\7g\2\2\u03a4\u03a5"+ + "\7s\2\2\u03a5\u03a6\7w\2\2\u03a6\u03a7\7k\2\2\u03a7\u03a8\7t\2\2\u03a8"+ + "\u03a9\7g\2\2\u03a9\u00ef\3\2\2\2\u03aa\u03ab\7o\2\2\u03ab\u03ac\7q\2"+ + "\2\u03ac\u03ad\7f\2\2\u03ad\u03ae\7w\2\2\u03ae\u03af\7n\2\2\u03af\u03b0"+ + "\7g\2\2\u03b0\u00f1\3\2\2\2\u03b1\u03b2\7f\2\2\u03b2\u03b3\7g\2\2\u03b3"+ + "\u03b4\7e\2\2\u03b4\u03b5\7n\2\2\u03b5\u03b6\7c\2\2\u03b6\u03b7\7t\2\2"+ + "\u03b7\u03b8\7g\2\2\u03b8\u00f3\3\2\2\2\u03b9\u03ba\7c\2\2\u03ba\u03bb"+ + "\7d\2\2\u03bb\u03bc\7u\2\2\u03bc\u03bd\7v\2\2\u03bd\u03be\7t\2\2\u03be"+ + "\u03bf\7c\2\2\u03bf\u03c0\7e\2\2\u03c0\u03c1\7v\2\2\u03c1\u00f5\3\2\2"+ + "\2\u03c2\u03c3\7k\2\2\u03c3\u03c4\7u\2\2\u03c4\u00f7\3\2\2\2\u03c5\u03c6"+ + "\7B\2\2\u03c6\u00f9\3\2\2\2\u03c7\u03cb\5\u0130\u0098\2\u03c8\u03ca\5"+ + "\u012e\u0097\2\u03c9\u03c8\3\2\2\2\u03ca\u03cd\3\2\2\2\u03cb\u03c9\3\2"+ + "\2\2\u03cb\u03cc\3\2\2\2\u03cc\u00fb\3\2\2\2\u03cd\u03cb\3\2\2\2\u03ce"+ + "\u03d2\7$\2\2\u03cf\u03d1\5\u0112\u0089\2\u03d0\u03cf\3\2\2\2\u03d1\u03d4"+ + "\3\2\2\2\u03d2\u03d0\3\2\2\2\u03d2\u03d3\3\2\2\2\u03d3\u03d5\3\2\2\2\u03d4"+ + "\u03d2\3\2\2\2\u03d5\u03df\7$\2\2\u03d6\u03da\7)\2\2\u03d7\u03d9\5\u0114"+ + "\u008a\2\u03d8\u03d7\3\2\2\2\u03d9\u03dc\3\2\2\2\u03da\u03d8\3\2\2\2\u03da"+ + "\u03db\3\2\2\2\u03db\u03dd\3\2\2\2\u03dc\u03da\3\2\2\2\u03dd\u03df\7)"+ + "\2\2\u03de\u03ce\3\2\2\2\u03de\u03d6\3\2\2\2\u03df\u03e0\3\2\2\2\u03e0"+ + "\u03e1\b~\6\2\u03e1\u00fd\3\2\2\2\u03e2\u03e3\7b\2\2\u03e3\u03e4\b\177"+ + "\7\2\u03e4\u03e5\3\2\2\2\u03e5\u03e6\b\177\b\2\u03e6\u00ff\3\2\2\2\u03e7"+ + "\u03e9\t\t\2\2\u03e8\u03e7\3\2\2\2\u03e9\u03ea\3\2\2\2\u03ea\u03e8\3\2"+ + "\2\2\u03ea\u03eb\3\2\2\2\u03eb\u03ec\3\2\2\2\u03ec\u03ed\b\u0080\2\2\u03ed"+ + "\u0101\3\2\2\2\u03ee\u03ef\t\2\2\2\u03ef\u03f0\3\2\2\2\u03f0\u03f1\b\u0081"+ + "\2\2\u03f1\u0103\3\2\2\2\u03f2\u03f3\7>\2\2\u03f3\u03f4\7#\2\2\u03f4\u03f5"+ + "\7/\2\2\u03f5\u03f6\7/\2\2\u03f6\u03fa\3\2\2\2\u03f7\u03f9\13\2\2\2\u03f8"+ + "\u03f7\3\2\2\2\u03f9\u03fc\3\2\2\2\u03fa\u03fb\3\2\2\2\u03fa\u03f8\3\2"+ + "\2\2\u03fb\u03fd\3\2\2\2\u03fc\u03fa\3\2\2\2\u03fd\u03fe\7/\2\2\u03fe"+ + "\u03ff\7/\2\2\u03ff\u0400\7@\2\2\u0400\u0401\3\2\2\2\u0401\u0402\b\u0082"+ + "\2\2\u0402\u0105\3\2\2\2\u0403\u0404\7>\2\2\u0404\u0405\7#\2\2\u0405\u0406"+ + "\7]\2\2\u0406\u0407\7E\2\2\u0407\u0408\7F\2\2\u0408\u0409\7C\2\2\u0409"+ + "\u040a\7V\2\2\u040a\u040b\7C\2\2\u040b\u040c\7]\2\2\u040c\u0410\3\2\2"+ + "\2\u040d\u040f\13\2\2\2\u040e\u040d\3\2\2\2\u040f\u0412\3\2\2\2\u0410"+ + "\u0411\3\2\2\2\u0410\u040e\3\2\2\2\u0411\u0413\3\2\2\2\u0412\u0410\3\2"+ + "\2\2\u0413\u0414\7_\2\2\u0414\u0415\7_\2\2\u0415\u0416\7@\2\2\u0416\u0417"+ + "\3\2\2\2\u0417\u0418\b\u0083\2\2\u0418\u0107\3\2\2\2\u0419\u041a\13\2"+ + "\2\2\u041a\u041b\3\2\2\2\u041b\u041c\b\u0084\t\2\u041c\u0109\3\2\2\2\u041d"+ + "\u041e\7^\2\2\u041e\u041f\13\2\2\2\u041f\u010b\3\2\2\2\u0420\u0421\7b"+ + "\2\2\u0421\u0422\b\u0086\n\2\u0422\u0423\3\2\2\2\u0423\u0424\b\u0086\13"+ + "\2\u0424\u0425\b\u0086\4\2\u0425\u010d\3\2\2\2\u0426\u0427\7&\2\2\u0427"+ + "\u0428\7}\2\2\u0428\u0429\3\2\2\2\u0429\u042a\b\u0087\f\2\u042a\u042b"+ + "\3\2\2\2\u042b\u042c\b\u0087\r\2\u042c\u010f\3\2\2\2\u042d\u042e\n\n\2"+ + "\2\u042e\u0111\3\2\2\2\u042f\u0434\n\13\2\2\u0430\u0431\7^\2\2\u0431\u0434"+ + "\5\u0116\u008b\2\u0432\u0434\5\u0126\u0093\2\u0433\u042f\3\2\2\2\u0433"+ + "\u0430\3\2\2\2\u0433\u0432\3\2\2\2\u0434\u0113\3\2\2\2\u0435\u043a\n\f"+ + "\2\2\u0436\u0437\7^\2\2\u0437\u043a\5\u0116\u008b\2\u0438\u043a\5\u0126"+ + "\u0093\2\u0439\u0435\3\2\2\2\u0439\u0436\3\2\2\2\u0439\u0438\3\2\2\2\u043a"+ + "\u0115\3\2\2\2\u043b\u0441\5\u0118\u008c\2\u043c\u0441\7\62\2\2\u043d"+ + "\u0441\5\u011a\u008d\2\u043e\u0441\5\u011c\u008e\2\u043f\u0441\5\u011e"+ + "\u008f\2\u0440\u043b\3\2\2\2\u0440\u043c\3\2\2\2\u0440\u043d\3\2\2\2\u0440"+ + "\u043e\3\2\2\2\u0440\u043f\3\2\2\2\u0441\u0117\3\2\2\2\u0442\u0445\5\u0120"+ + "\u0090\2\u0443\u0445\5\u0122\u0091\2\u0444\u0442\3\2\2\2\u0444\u0443\3"+ + "\2\2\2\u0445\u0119\3\2\2\2\u0446\u0447\7z\2\2\u0447\u0448\5\u0128\u0094"+ + "\2\u0448\u0449\5\u0128\u0094\2\u0449\u011b\3\2\2\2\u044a\u044b\7w\2\2"+ + "\u044b\u044c\5\u0128\u0094\2\u044c\u044d\5\u0128\u0094\2\u044d\u044e\5"+ + "\u0128\u0094\2\u044e\u044f\5\u0128\u0094\2\u044f\u011d\3\2\2\2\u0450\u0451"+ + "\7w\2\2\u0451\u0453\7}\2\2\u0452\u0454\5\u0128\u0094\2\u0453\u0452\3\2"+ + "\2\2\u0454\u0455\3\2\2\2\u0455\u0453\3\2\2\2\u0455\u0456\3\2\2\2\u0456"+ + "\u0457\3\2\2\2\u0457\u0458\7\177\2\2\u0458\u011f\3\2\2\2\u0459\u045a\t"+ + "\r\2\2\u045a\u0121\3\2\2\2\u045b\u045c\n\16\2\2\u045c\u0123\3\2\2\2\u045d"+ + "\u0460\5\u0120\u0090\2\u045e\u0460\t\17\2\2\u045f\u045d\3\2\2\2\u045f"+ + "\u045e\3\2\2\2\u0460\u0125\3\2\2\2\u0461\u0462\7^\2\2\u0462\u0463\t\2"+ + "\2\2\u0463\u0127\3\2\2\2\u0464\u0465\t\20\2\2\u0465\u0129\3\2\2\2\u0466"+ + "\u046f\7\62\2\2\u0467\u046b\t\21\2\2\u0468\u046a\t\3\2\2\u0469\u0468\3"+ + "\2\2\2\u046a\u046d\3\2\2\2\u046b\u0469\3\2\2\2\u046b\u046c\3\2\2\2\u046c"+ + "\u046f\3\2\2\2\u046d\u046b\3\2\2\2\u046e\u0466\3\2\2\2\u046e\u0467\3\2"+ + "\2\2\u046f\u012b\3\2\2\2\u0470\u0472\t\22\2\2\u0471\u0473\t\23\2\2\u0472"+ + "\u0471\3\2\2\2\u0472\u0473\3\2\2\2\u0473\u0475\3\2\2\2\u0474\u0476\t\3"+ + "\2\2\u0475\u0474\3\2\2\2\u0476\u0477\3\2\2\2\u0477\u0475\3\2\2\2\u0477"+ + "\u0478\3\2\2\2\u0478\u012d\3\2\2\2\u0479\u047c\5\u0130\u0098\2\u047a\u047c"+ + "\t\24\2\2\u047b\u0479\3\2\2\2\u047b\u047a\3\2\2\2\u047c\u012f\3\2\2\2"+ + "\u047d\u0481\t\25\2\2\u047e\u047f\7^\2\2\u047f\u0481\5\u011c\u008e\2\u0480"+ + "\u047d\3\2\2\2\u0480\u047e\3\2\2\2\u0481\u0131\3\2\2\2\u0482\u048d\n\26"+ + "\2\2\u0483\u048d\5\u0138\u009c\2\u0484\u0488\7]\2\2\u0485\u0487\5\u0136"+ + "\u009b\2\u0486\u0485\3\2\2\2\u0487\u048a\3\2\2\2\u0488\u0486\3\2\2\2\u0488"+ + "\u0489\3\2\2\2\u0489\u048b\3\2\2\2\u048a\u0488\3\2\2\2\u048b\u048d\7_"+ + "\2\2\u048c\u0482\3\2\2\2\u048c\u0483\3\2\2\2\u048c\u0484\3\2\2\2\u048d"+ + "\u0133\3\2\2\2\u048e\u0499\n\27\2\2\u048f\u0499\5\u0138\u009c\2\u0490"+ + "\u0494\7]\2\2\u0491\u0493\5\u0136\u009b\2\u0492\u0491\3\2\2\2\u0493\u0496"+ + "\3\2\2\2\u0494\u0492\3\2\2\2\u0494\u0495\3\2\2\2\u0495\u0497\3\2\2\2\u0496"+ + "\u0494\3\2\2\2\u0497\u0499\7_\2\2\u0498\u048e\3\2\2\2\u0498\u048f\3\2"+ + "\2\2\u0498\u0490\3\2\2\2\u0499\u0135\3\2\2\2\u049a\u049d\n\30\2\2\u049b"+ + "\u049d\5\u0138\u009c\2\u049c\u049a\3\2\2\2\u049c\u049b\3\2\2\2\u049d\u0137"+ + "\3\2\2\2\u049e\u049f\7^\2\2\u049f\u04a0\n\2\2\2\u04a0\u0139\3\2\2\2+\2"+ + "\3\u0140\u014e\u0158\u0160\u01fe\u0205\u0209\u020f\u0212\u0216\u0218\u021f"+ + "\u0225\u022e\u0235\u03cb\u03d2\u03da\u03de\u03ea\u03fa\u0410\u0433\u0439"+ + "\u0440\u0444\u0455\u045f\u046b\u046e\u0472\u0477\u047b\u0480\u0488\u048c"+ + "\u0494\u0498\u049c\16\2\3\2\3\t\2\6\2\2\3\13\3\3~\4\3\177\5\7\3\2\2\4"+ + "\2\3\u0086\6\t\u0080\2\3\u0087\7\7\2\2"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/src/main/java/grammar/TypeScriptLexer.tokens b/src/main/java/grammar/TypeScriptLexer.tokens new file mode 100644 index 00000000..86796371 --- /dev/null +++ b/src/main/java/grammar/TypeScriptLexer.tokens @@ -0,0 +1,247 @@ +MultiLineComment=1 +SingleLineComment=2 +RegularExpressionLiteral=3 +OpenBracket=4 +CloseBracket=5 +OpenParen=6 +CloseParen=7 +OpenBrace=8 +TemplateCloseBrace=9 +CloseBrace=10 +SemiColon=11 +Comma=12 +Assign=13 +QuestionMark=14 +Colon=15 +Ellipsis=16 +Dot=17 +PlusPlus=18 +MinusMinus=19 +Plus=20 +Minus=21 +BitNot=22 +Not=23 +Multiply=24 +Divide=25 +Modulus=26 +RightShiftArithmetic=27 +LeftShiftArithmetic=28 +RightShiftLogical=29 +LessThan=30 +MoreThan=31 +LessThanEquals=32 +GreaterThanEquals=33 +Equals_=34 +NotEquals=35 +IdentityEquals=36 +IdentityNotEquals=37 +BitAnd=38 +BitXOr=39 +BitOr=40 +And=41 +Or=42 +MultiplyAssign=43 +DivideAssign=44 +ModulusAssign=45 +PlusAssign=46 +MinusAssign=47 +LeftShiftArithmeticAssign=48 +RightShiftArithmeticAssign=49 +RightShiftLogicalAssign=50 +BitAndAssign=51 +BitXorAssign=52 +BitOrAssign=53 +ARROW=54 +NullLiteral=55 +BooleanLiteral=56 +DecimalLiteral=57 +HexIntegerLiteral=58 +OctalIntegerLiteral=59 +OctalIntegerLiteral2=60 +BinaryIntegerLiteral=61 +Break=62 +Do=63 +Instanceof=64 +Typeof=65 +Case=66 +Else=67 +New=68 +Var=69 +Catch=70 +Finally=71 +Return=72 +Void=73 +Continue=74 +For=75 +Switch=76 +While=77 +Debugger=78 +Function_=79 +This=80 +With=81 +Default=82 +If=83 +Throw=84 +Delete=85 +In=86 +Try=87 +As=88 +From=89 +ReadOnly=90 +Async=91 +Class=92 +Enum=93 +Extends=94 +Super=95 +Const=96 +Export=97 +Import=98 +Implements=99 +Let=100 +Private=101 +Public=102 +Interface=103 +Package=104 +Protected=105 +Static=106 +Yield=107 +Any=108 +Number=109 +Boolean=110 +String=111 +Symbol=112 +TypeAlias=113 +Get=114 +Set=115 +Constructor=116 +Namespace=117 +Require=118 +Module=119 +Declare=120 +Abstract=121 +Is=122 +At=123 +Identifier=124 +StringLiteral=125 +BackTick=126 +WhiteSpaces=127 +LineTerminator=128 +HtmlComment=129 +CDataComment=130 +UnexpectedCharacter=131 +TemplateStringEscapeAtom=132 +TemplateStringStartExpression=133 +TemplateStringAtom=134 +'['=4 +']'=5 +'('=6 +')'=7 +'{'=8 +'}'=10 +';'=11 +','=12 +'='=13 +'?'=14 +':'=15 +'...'=16 +'.'=17 +'++'=18 +'--'=19 +'+'=20 +'-'=21 +'~'=22 +'!'=23 +'*'=24 +'/'=25 +'%'=26 +'>>'=27 +'<<'=28 +'>>>'=29 +'<'=30 +'>'=31 +'<='=32 +'>='=33 +'=='=34 +'!='=35 +'==='=36 +'!=='=37 +'&'=38 +'^'=39 +'|'=40 +'&&'=41 +'||'=42 +'*='=43 +'/='=44 +'%='=45 +'+='=46 +'-='=47 +'<<='=48 +'>>='=49 +'>>>='=50 +'&='=51 +'^='=52 +'|='=53 +'=>'=54 +'null'=55 +'break'=62 +'do'=63 +'instanceof'=64 +'typeof'=65 +'case'=66 +'else'=67 +'new'=68 +'var'=69 +'catch'=70 +'finally'=71 +'return'=72 +'void'=73 +'continue'=74 +'for'=75 +'switch'=76 +'while'=77 +'debugger'=78 +'function'=79 +'this'=80 +'with'=81 +'default'=82 +'if'=83 +'throw'=84 +'delete'=85 +'in'=86 +'try'=87 +'as'=88 +'from'=89 +'readonly'=90 +'async'=91 +'class'=92 +'enum'=93 +'extends'=94 +'super'=95 +'const'=96 +'export'=97 +'import'=98 +'implements'=99 +'let'=100 +'private'=101 +'public'=102 +'interface'=103 +'package'=104 +'protected'=105 +'static'=106 +'yield'=107 +'any'=108 +'number'=109 +'boolean'=110 +'string'=111 +'symbol'=112 +'type'=113 +'get'=114 +'set'=115 +'constructor'=116 +'namespace'=117 +'require'=118 +'module'=119 +'declare'=120 +'abstract'=121 +'is'=122 +'@'=123 diff --git a/src/main/java/grammar/TypeScriptLexerBase.java b/src/main/java/grammar/TypeScriptLexerBase.java new file mode 100644 index 00000000..9de2150a --- /dev/null +++ b/src/main/java/grammar/TypeScriptLexerBase.java @@ -0,0 +1,165 @@ +package grammar; + +import org.antlr.v4.runtime.*; + +import java.util.ArrayDeque; +import java.util.Deque; + +/** + * All lexer methods that used in grammar (IsStrictMode) + * should start with Upper Case Char similar to Lexer rules. + */ +public abstract class TypeScriptLexerBase extends Lexer +{ + /** + * Stores values of nested modes. By default mode is strict or + * defined externally (useStrictDefault) + */ + private final Deque scopeStrictModes = new ArrayDeque<>(); + + private Token lastToken = null; + /** + * Default value of strict mode + * Can be defined externally by setUseStrictDefault + */ + private boolean useStrictDefault = false; + /** + * Current value of strict mode + * Can be defined during parsing, see StringFunctions.js and StringGlobal.js samples + */ + private boolean useStrictCurrent = false; + /** + * Keeps track of the current depth of nested template string backticks. + * E.g. after the X in: + * + * `${a ? `${X + * + * templateDepth will be 2. This variable is needed to determine if a `}` is a + * plain CloseBrace, or one that closes an expression inside a template string. + */ + private int templateDepth = 0; + + /** + * Keeps track of the depth of open- and close-braces. Used for expressions like: + * + * `${[1, 2, 3].map(x => { return x * 2;}).join("")}` + * + * where the '}' from `return x * 2;}` should not become a `TemplateCloseBrace` + * token but rather a `CloseBrace` token. + */ + private int bracesDepth = 0; + + public TypeScriptLexerBase(CharStream input) { + super(input); + } + + public boolean getStrictDefault() { + return useStrictDefault; + } + + public void setUseStrictDefault(boolean value) { + useStrictDefault = value; + useStrictCurrent = value; + } + + public boolean IsStrictMode() { + return useStrictCurrent; + } + + public void StartTemplateString() { + this.bracesDepth = 0; + } + + public boolean IsInTemplateString() { + return this.templateDepth > 0 && this.bracesDepth == 0; + } + + /** + * Return the next token from the character stream and records this last + * token in case it resides on the default channel. This recorded token + * is used to determine when the lexer could possibly match a regex + * literal. Also changes scopeStrictModes stack if tokenize special + * string 'use strict'; + * + * @return the next token from the character stream. + */ + @Override + public Token nextToken() { + Token next = super.nextToken(); + + if (next.getChannel() == Token.DEFAULT_CHANNEL) { + // Keep track of the last token on the default channel. + this.lastToken = next; + } + + return next; + } + + protected void ProcessOpenBrace() + { + bracesDepth++; + useStrictCurrent = scopeStrictModes.size() > 0 && scopeStrictModes.peek() ? true : useStrictDefault; + scopeStrictModes.push(useStrictCurrent); + } + + protected void ProcessCloseBrace() + { + bracesDepth--; + useStrictCurrent = scopeStrictModes.size() > 0 ? scopeStrictModes.pop() : useStrictDefault; + } + + protected void ProcessStringLiteral() + { + if (lastToken == null || lastToken.getType() == TypeScriptLexer.OpenBrace) + { + String text = getText(); + if (text.equals("\"use strict\"") || text.equals("'use strict'")) + { + if (scopeStrictModes.size() > 0) + scopeStrictModes.pop(); + useStrictCurrent = true; + scopeStrictModes.push(useStrictCurrent); + } + } + } + + protected void IncreaseTemplateDepth() { + this.templateDepth++; + } + + protected void DecreaseTemplateDepth() { + this.templateDepth--; + } + + /** + * Returns {@code true} if the lexer can match a regex literal. + */ + protected boolean IsRegexPossible() { + + if (this.lastToken == null) { + // No token has been produced yet: at the start of the input, + // no division is possible, so a regex literal _is_ possible. + return true; + } + + switch (this.lastToken.getType()) { + case TypeScriptLexer.Identifier: + case TypeScriptLexer.NullLiteral: + case TypeScriptLexer.BooleanLiteral: + case TypeScriptLexer.This: + case TypeScriptLexer.CloseBracket: + case TypeScriptLexer.CloseParen: + case TypeScriptLexer.OctalIntegerLiteral: + case TypeScriptLexer.DecimalLiteral: + case TypeScriptLexer.HexIntegerLiteral: + case TypeScriptLexer.StringLiteral: + case TypeScriptLexer.PlusPlus: + case TypeScriptLexer.MinusMinus: + // After any of the tokens above, no regex literal can follow. + return false; + default: + // In all other cases, a regex literal _is_ possible. + return true; + } + } +} \ No newline at end of file diff --git a/src/main/java/grammar/TypeScriptParser.java b/src/main/java/grammar/TypeScriptParser.java new file mode 100644 index 00000000..8bd6b536 --- /dev/null +++ b/src/main/java/grammar/TypeScriptParser.java @@ -0,0 +1,12988 @@ +// Generated from TypeScriptParser.g4 by ANTLR 4.5 +package grammar; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.misc.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; +import java.util.Iterator; +import java.util.ArrayList; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class TypeScriptParser extends TypeScriptParserBase { + static { RuntimeMetaData.checkVersion("4.5", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + MultiLineComment=1, SingleLineComment=2, RegularExpressionLiteral=3, OpenBracket=4, + CloseBracket=5, OpenParen=6, CloseParen=7, OpenBrace=8, TemplateCloseBrace=9, + CloseBrace=10, SemiColon=11, Comma=12, Assign=13, QuestionMark=14, Colon=15, + Ellipsis=16, Dot=17, PlusPlus=18, MinusMinus=19, Plus=20, Minus=21, BitNot=22, + Not=23, Multiply=24, Divide=25, Modulus=26, RightShiftArithmetic=27, LeftShiftArithmetic=28, + RightShiftLogical=29, LessThan=30, MoreThan=31, LessThanEquals=32, GreaterThanEquals=33, + Equals_=34, NotEquals=35, IdentityEquals=36, IdentityNotEquals=37, BitAnd=38, + BitXOr=39, BitOr=40, And=41, Or=42, MultiplyAssign=43, DivideAssign=44, + ModulusAssign=45, PlusAssign=46, MinusAssign=47, LeftShiftArithmeticAssign=48, + RightShiftArithmeticAssign=49, RightShiftLogicalAssign=50, BitAndAssign=51, + BitXorAssign=52, BitOrAssign=53, ARROW=54, NullLiteral=55, BooleanLiteral=56, + DecimalLiteral=57, HexIntegerLiteral=58, OctalIntegerLiteral=59, OctalIntegerLiteral2=60, + BinaryIntegerLiteral=61, Break=62, Do=63, Instanceof=64, Typeof=65, Case=66, + Else=67, New=68, Var=69, Catch=70, Finally=71, Return=72, Void=73, Continue=74, + For=75, Switch=76, While=77, Debugger=78, Function_=79, This=80, With=81, + Default=82, If=83, Throw=84, Delete=85, In=86, Try=87, As=88, From=89, + ReadOnly=90, Async=91, Class=92, Enum=93, Extends=94, Super=95, Const=96, + Export=97, Import=98, Implements=99, Let=100, Private=101, Public=102, + Interface=103, Package=104, Protected=105, Static=106, Yield=107, Any=108, + Number=109, Boolean=110, String=111, Symbol=112, TypeAlias=113, Get=114, + Set=115, Constructor=116, Namespace=117, Require=118, Module=119, Declare=120, + Abstract=121, Is=122, At=123, Identifier=124, StringLiteral=125, BackTick=126, + WhiteSpaces=127, LineTerminator=128, HtmlComment=129, CDataComment=130, + UnexpectedCharacter=131, TemplateStringEscapeAtom=132, TemplateStringStartExpression=133, + TemplateStringAtom=134; + public static final int + RULE_initializer = 0, RULE_bindingPattern = 1, RULE_typeParameters = 2, + RULE_typeParameterList = 3, RULE_typeParameter = 4, RULE_constraint = 5, + RULE_typeArguments = 6, RULE_typeArgumentList = 7, RULE_typeArgument = 8, + RULE_type_ = 9, RULE_unionOrIntersectionOrPrimaryType = 10, RULE_primaryType = 11, + RULE_predefinedType = 12, RULE_typeReference = 13, RULE_nestedTypeGeneric = 14, + RULE_typeGeneric = 15, RULE_typeIncludeGeneric = 16, RULE_typeName = 17, + RULE_objectType = 18, RULE_typeBody = 19, RULE_typeMemberList = 20, RULE_typeMember = 21, + RULE_arrayType = 22, RULE_tupleType = 23, RULE_tupleElementTypes = 24, + RULE_functionType = 25, RULE_constructorType = 26, RULE_typeQuery = 27, + RULE_typeQueryExpression = 28, RULE_propertySignatur = 29, RULE_typeAnnotation = 30, + RULE_callSignature = 31, RULE_parameterList = 32, RULE_requiredParameterList = 33, + RULE_parameter = 34, RULE_optionalParameter = 35, RULE_restParameter = 36, + RULE_requiredParameter = 37, RULE_accessibilityModifier = 38, RULE_identifierOrPattern = 39, + RULE_constructSignature = 40, RULE_indexSignature = 41, RULE_methodSignature = 42, + RULE_typeAliasDeclaration = 43, RULE_constructorDeclaration = 44, RULE_interfaceDeclaration = 45, + RULE_interfaceExtendsClause = 46, RULE_classOrInterfaceTypeList = 47, + RULE_enumDeclaration = 48, RULE_enumBody = 49, RULE_enumMemberList = 50, + RULE_enumMember = 51, RULE_namespaceDeclaration = 52, RULE_namespaceName = 53, + RULE_importAliasDeclaration = 54, RULE_decoratorList = 55, RULE_decorator = 56, + RULE_decoratorMemberExpression = 57, RULE_decoratorCallExpression = 58, + RULE_program = 59, RULE_sourceElement = 60, RULE_statement = 61, RULE_block = 62, + RULE_statementList = 63, RULE_abstractDeclaration = 64, RULE_importStatement = 65, + RULE_fromBlock = 66, RULE_multipleImportStatement = 67, RULE_exportStatement = 68, + RULE_variableStatement = 69, RULE_variableDeclarationList = 70, RULE_variableDeclaration = 71, + RULE_emptyStatement_ = 72, RULE_expressionStatement = 73, RULE_ifStatement = 74, + RULE_iterationStatement = 75, RULE_varModifier = 76, RULE_continueStatement = 77, + RULE_breakStatement = 78, RULE_returnStatement = 79, RULE_yieldStatement = 80, + RULE_withStatement = 81, RULE_switchStatement = 82, RULE_caseBlock = 83, + RULE_caseClauses = 84, RULE_caseClause = 85, RULE_defaultClause = 86, + RULE_labelledStatement = 87, RULE_throwStatement = 88, RULE_tryStatement = 89, + RULE_catchProduction = 90, RULE_finallyProduction = 91, RULE_debuggerStatement = 92, + RULE_functionDeclaration = 93, RULE_classDeclaration = 94, RULE_classHeritage = 95, + RULE_classTail = 96, RULE_classExtendsClause = 97, RULE_implementsClause = 98, + RULE_classElement = 99, RULE_propertyMemberDeclaration = 100, RULE_propertyMemberBase = 101, + RULE_indexMemberDeclaration = 102, RULE_generatorMethod = 103, RULE_generatorFunctionDeclaration = 104, + RULE_generatorBlock = 105, RULE_generatorDefinition = 106, RULE_iteratorBlock = 107, + RULE_iteratorDefinition = 108, RULE_formalParameterList = 109, RULE_formalParameterArg = 110, + RULE_lastFormalParameterArg = 111, RULE_functionBody = 112, RULE_sourceElements = 113, + RULE_arrayLiteral = 114, RULE_elementList = 115, RULE_arrayElement = 116, + RULE_objectLiteral = 117, RULE_propertyAssignment = 118, RULE_getAccessor = 119, + RULE_setAccessor = 120, RULE_propertyName = 121, RULE_arguments = 122, + RULE_argumentList = 123, RULE_argument = 124, RULE_expressionSequence = 125, + RULE_functionExpressionDeclaration = 126, RULE_singleExpression = 127, + RULE_asExpression = 128, RULE_arrowFunctionDeclaration = 129, RULE_arrowFunctionParameters = 130, + RULE_arrowFunctionBody = 131, RULE_assignmentOperator = 132, RULE_literal = 133, + RULE_templateStringLiteral = 134, RULE_templateStringAtom = 135, RULE_numericLiteral = 136, + RULE_identifierName = 137, RULE_identifierOrKeyWord = 138, RULE_reservedWord = 139, + RULE_keyword = 140, RULE_getter = 141, RULE_setter = 142, RULE_eos = 143; + public static final String[] ruleNames = { + "initializer", "bindingPattern", "typeParameters", "typeParameterList", + "typeParameter", "constraint", "typeArguments", "typeArgumentList", "typeArgument", + "type_", "unionOrIntersectionOrPrimaryType", "primaryType", "predefinedType", + "typeReference", "nestedTypeGeneric", "typeGeneric", "typeIncludeGeneric", + "typeName", "objectType", "typeBody", "typeMemberList", "typeMember", + "arrayType", "tupleType", "tupleElementTypes", "functionType", "constructorType", + "typeQuery", "typeQueryExpression", "propertySignatur", "typeAnnotation", + "callSignature", "parameterList", "requiredParameterList", "parameter", + "optionalParameter", "restParameter", "requiredParameter", "accessibilityModifier", + "identifierOrPattern", "constructSignature", "indexSignature", "methodSignature", + "typeAliasDeclaration", "constructorDeclaration", "interfaceDeclaration", + "interfaceExtendsClause", "classOrInterfaceTypeList", "enumDeclaration", + "enumBody", "enumMemberList", "enumMember", "namespaceDeclaration", "namespaceName", + "importAliasDeclaration", "decoratorList", "decorator", "decoratorMemberExpression", + "decoratorCallExpression", "program", "sourceElement", "statement", "block", + "statementList", "abstractDeclaration", "importStatement", "fromBlock", + "multipleImportStatement", "exportStatement", "variableStatement", "variableDeclarationList", + "variableDeclaration", "emptyStatement_", "expressionStatement", "ifStatement", + "iterationStatement", "varModifier", "continueStatement", "breakStatement", + "returnStatement", "yieldStatement", "withStatement", "switchStatement", + "caseBlock", "caseClauses", "caseClause", "defaultClause", "labelledStatement", + "throwStatement", "tryStatement", "catchProduction", "finallyProduction", + "debuggerStatement", "functionDeclaration", "classDeclaration", "classHeritage", + "classTail", "classExtendsClause", "implementsClause", "classElement", + "propertyMemberDeclaration", "propertyMemberBase", "indexMemberDeclaration", + "generatorMethod", "generatorFunctionDeclaration", "generatorBlock", "generatorDefinition", + "iteratorBlock", "iteratorDefinition", "formalParameterList", "formalParameterArg", + "lastFormalParameterArg", "functionBody", "sourceElements", "arrayLiteral", + "elementList", "arrayElement", "objectLiteral", "propertyAssignment", + "getAccessor", "setAccessor", "propertyName", "arguments", "argumentList", + "argument", "expressionSequence", "functionExpressionDeclaration", "singleExpression", + "asExpression", "arrowFunctionDeclaration", "arrowFunctionParameters", + "arrowFunctionBody", "assignmentOperator", "literal", "templateStringLiteral", + "templateStringAtom", "numericLiteral", "identifierName", "identifierOrKeyWord", + "reservedWord", "keyword", "getter", "setter", "eos" + }; + + private static final String[] _LITERAL_NAMES = { + null, null, null, null, "'['", "']'", "'('", "')'", "'{'", null, "'}'", + "';'", "','", "'='", "'?'", "':'", "'...'", "'.'", "'++'", "'--'", "'+'", + "'-'", "'~'", "'!'", "'*'", "'/'", "'%'", "'>>'", "'<<'", "'>>>'", "'<'", + "'>'", "'<='", "'>='", "'=='", "'!='", "'==='", "'!=='", "'&'", "'^'", + "'|'", "'&&'", "'||'", "'*='", "'/='", "'%='", "'+='", "'-='", "'<<='", + "'>>='", "'>>>='", "'&='", "'^='", "'|='", "'=>'", "'null'", null, null, + null, null, null, null, "'break'", "'do'", "'instanceof'", "'typeof'", + "'case'", "'else'", "'new'", "'var'", "'catch'", "'finally'", "'return'", + "'void'", "'continue'", "'for'", "'switch'", "'while'", "'debugger'", + "'function'", "'this'", "'with'", "'default'", "'if'", "'throw'", "'delete'", + "'in'", "'try'", "'as'", "'from'", "'readonly'", "'async'", "'class'", + "'enum'", "'extends'", "'super'", "'const'", "'export'", "'import'", "'implements'", + "'let'", "'private'", "'public'", "'interface'", "'package'", "'protected'", + "'static'", "'yield'", "'any'", "'number'", "'boolean'", "'string'", "'symbol'", + "'type'", "'get'", "'set'", "'constructor'", "'namespace'", "'require'", + "'module'", "'declare'", "'abstract'", "'is'", "'@'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, "MultiLineComment", "SingleLineComment", "RegularExpressionLiteral", + "OpenBracket", "CloseBracket", "OpenParen", "CloseParen", "OpenBrace", + "TemplateCloseBrace", "CloseBrace", "SemiColon", "Comma", "Assign", "QuestionMark", + "Colon", "Ellipsis", "Dot", "PlusPlus", "MinusMinus", "Plus", "Minus", + "BitNot", "Not", "Multiply", "Divide", "Modulus", "RightShiftArithmetic", + "LeftShiftArithmetic", "RightShiftLogical", "LessThan", "MoreThan", "LessThanEquals", + "GreaterThanEquals", "Equals_", "NotEquals", "IdentityEquals", "IdentityNotEquals", + "BitAnd", "BitXOr", "BitOr", "And", "Or", "MultiplyAssign", "DivideAssign", + "ModulusAssign", "PlusAssign", "MinusAssign", "LeftShiftArithmeticAssign", + "RightShiftArithmeticAssign", "RightShiftLogicalAssign", "BitAndAssign", + "BitXorAssign", "BitOrAssign", "ARROW", "NullLiteral", "BooleanLiteral", + "DecimalLiteral", "HexIntegerLiteral", "OctalIntegerLiteral", "OctalIntegerLiteral2", + "BinaryIntegerLiteral", "Break", "Do", "Instanceof", "Typeof", "Case", + "Else", "New", "Var", "Catch", "Finally", "Return", "Void", "Continue", + "For", "Switch", "While", "Debugger", "Function_", "This", "With", "Default", + "If", "Throw", "Delete", "In", "Try", "As", "From", "ReadOnly", "Async", + "Class", "Enum", "Extends", "Super", "Const", "Export", "Import", "Implements", + "Let", "Private", "Public", "Interface", "Package", "Protected", "Static", + "Yield", "Any", "Number", "Boolean", "String", "Symbol", "TypeAlias", + "Get", "Set", "Constructor", "Namespace", "Require", "Module", "Declare", + "Abstract", "Is", "At", "Identifier", "StringLiteral", "BackTick", "WhiteSpaces", + "LineTerminator", "HtmlComment", "CDataComment", "UnexpectedCharacter", + "TemplateStringEscapeAtom", "TemplateStringStartExpression", "TemplateStringAtom" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + @Override + public String getGrammarFileName() { return "TypeScriptParser.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public TypeScriptParser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + public static class InitializerContext extends ParserRuleContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public InitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_initializer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterInitializer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitInitializer(this); + } + } + + public final InitializerContext initializer() throws RecognitionException { + InitializerContext _localctx = new InitializerContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_initializer); + try { + enterOuterAlt(_localctx, 1); + { + setState(288); + match(Assign); + setState(289); + singleExpression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BindingPatternContext extends ParserRuleContext { + public ArrayLiteralContext arrayLiteral() { + return getRuleContext(ArrayLiteralContext.class,0); + } + public ObjectLiteralContext objectLiteral() { + return getRuleContext(ObjectLiteralContext.class,0); + } + public BindingPatternContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_bindingPattern; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterBindingPattern(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitBindingPattern(this); + } + } + + public final BindingPatternContext bindingPattern() throws RecognitionException { + BindingPatternContext _localctx = new BindingPatternContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_bindingPattern); + try { + enterOuterAlt(_localctx, 1); + { + setState(293); + switch (_input.LA(1)) { + case OpenBracket: + { + setState(291); + arrayLiteral(); + } + break; + case OpenBrace: + { + setState(292); + objectLiteral(); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParametersContext extends ParserRuleContext { + public TypeParameterListContext typeParameterList() { + return getRuleContext(TypeParameterListContext.class,0); + } + public TypeParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeParameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeParameters(this); + } + } + + public final TypeParametersContext typeParameters() throws RecognitionException { + TypeParametersContext _localctx = new TypeParametersContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_typeParameters); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(295); + match(LessThan); + setState(297); + _la = _input.LA(1); + if (_la==LessThan || _la==Identifier) { + { + setState(296); + typeParameterList(); + } + } + + setState(299); + match(MoreThan); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParameterListContext extends ParserRuleContext { + public List typeParameter() { + return getRuleContexts(TypeParameterContext.class); + } + public TypeParameterContext typeParameter(int i) { + return getRuleContext(TypeParameterContext.class,i); + } + public TypeParameterListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameterList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeParameterList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeParameterList(this); + } + } + + public final TypeParameterListContext typeParameterList() throws RecognitionException { + TypeParameterListContext _localctx = new TypeParameterListContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_typeParameterList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(301); + typeParameter(); + setState(306); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==Comma) { + { + { + setState(302); + match(Comma); + setState(303); + typeParameter(); + } + } + setState(308); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParameterContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public ConstraintContext constraint() { + return getRuleContext(ConstraintContext.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public TypeParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeParameter(this); + } + } + + public final TypeParameterContext typeParameter() throws RecognitionException { + TypeParameterContext _localctx = new TypeParameterContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_typeParameter); + int _la; + try { + setState(314); + switch (_input.LA(1)) { + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(309); + match(Identifier); + setState(311); + _la = _input.LA(1); + if (_la==Extends) { + { + setState(310); + constraint(); + } + } + + } + break; + case LessThan: + enterOuterAlt(_localctx, 2); + { + setState(313); + typeParameters(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstraintContext extends ParserRuleContext { + public Type_Context type_() { + return getRuleContext(Type_Context.class,0); + } + public ConstraintContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constraint; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterConstraint(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitConstraint(this); + } + } + + public final ConstraintContext constraint() throws RecognitionException { + ConstraintContext _localctx = new ConstraintContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_constraint); + try { + enterOuterAlt(_localctx, 1); + { + setState(316); + match(Extends); + setState(317); + type_(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentsContext extends ParserRuleContext { + public TypeArgumentListContext typeArgumentList() { + return getRuleContext(TypeArgumentListContext.class,0); + } + public TypeArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeArguments(this); + } + } + + public final TypeArgumentsContext typeArguments() throws RecognitionException { + TypeArgumentsContext _localctx = new TypeArgumentsContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_typeArguments); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(319); + match(LessThan); + setState(321); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenParen) | (1L << OpenBrace) | (1L << LessThan))) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (Typeof - 65)) | (1L << (New - 65)) | (1L << (Void - 65)) | (1L << (This - 65)) | (1L << (Any - 65)) | (1L << (Number - 65)) | (1L << (Boolean - 65)) | (1L << (String - 65)) | (1L << (Symbol - 65)) | (1L << (Identifier - 65)) | (1L << (StringLiteral - 65)))) != 0)) { + { + setState(320); + typeArgumentList(); + } + } + + setState(323); + match(MoreThan); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentListContext extends ParserRuleContext { + public List typeArgument() { + return getRuleContexts(TypeArgumentContext.class); + } + public TypeArgumentContext typeArgument(int i) { + return getRuleContext(TypeArgumentContext.class,i); + } + public TypeArgumentListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArgumentList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeArgumentList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeArgumentList(this); + } + } + + public final TypeArgumentListContext typeArgumentList() throws RecognitionException { + TypeArgumentListContext _localctx = new TypeArgumentListContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_typeArgumentList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(325); + typeArgument(); + setState(330); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==Comma) { + { + { + setState(326); + match(Comma); + setState(327); + typeArgument(); + } + } + setState(332); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentContext extends ParserRuleContext { + public Type_Context type_() { + return getRuleContext(Type_Context.class,0); + } + public TypeArgumentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArgument; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeArgument(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeArgument(this); + } + } + + public final TypeArgumentContext typeArgument() throws RecognitionException { + TypeArgumentContext _localctx = new TypeArgumentContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_typeArgument); + try { + enterOuterAlt(_localctx, 1); + { + setState(333); + type_(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Type_Context extends ParserRuleContext { + public UnionOrIntersectionOrPrimaryTypeContext unionOrIntersectionOrPrimaryType() { + return getRuleContext(UnionOrIntersectionOrPrimaryTypeContext.class,0); + } + public FunctionTypeContext functionType() { + return getRuleContext(FunctionTypeContext.class,0); + } + public ConstructorTypeContext constructorType() { + return getRuleContext(ConstructorTypeContext.class,0); + } + public TypeGenericContext typeGeneric() { + return getRuleContext(TypeGenericContext.class,0); + } + public TerminalNode StringLiteral() { return getToken(TypeScriptParser.StringLiteral, 0); } + public Type_Context(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_type_; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterType_(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitType_(this); + } + } + + public final Type_Context type_() throws RecognitionException { + Type_Context _localctx = new Type_Context(_ctx, getState()); + enterRule(_localctx, 18, RULE_type_); + try { + setState(340); + switch ( getInterpreter().adaptivePredict(_input,7,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(335); + unionOrIntersectionOrPrimaryType(0); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(336); + functionType(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(337); + constructorType(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(338); + typeGeneric(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(339); + match(StringLiteral); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class UnionOrIntersectionOrPrimaryTypeContext extends ParserRuleContext { + public UnionOrIntersectionOrPrimaryTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_unionOrIntersectionOrPrimaryType; } + + public UnionOrIntersectionOrPrimaryTypeContext() { } + public void copyFrom(UnionOrIntersectionOrPrimaryTypeContext ctx) { + super.copyFrom(ctx); + } + } + public static class IntersectionContext extends UnionOrIntersectionOrPrimaryTypeContext { + public List unionOrIntersectionOrPrimaryType() { + return getRuleContexts(UnionOrIntersectionOrPrimaryTypeContext.class); + } + public UnionOrIntersectionOrPrimaryTypeContext unionOrIntersectionOrPrimaryType(int i) { + return getRuleContext(UnionOrIntersectionOrPrimaryTypeContext.class,i); + } + public IntersectionContext(UnionOrIntersectionOrPrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIntersection(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIntersection(this); + } + } + public static class PrimaryContext extends UnionOrIntersectionOrPrimaryTypeContext { + public PrimaryTypeContext primaryType() { + return getRuleContext(PrimaryTypeContext.class,0); + } + public PrimaryContext(UnionOrIntersectionOrPrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPrimary(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPrimary(this); + } + } + public static class UnionContext extends UnionOrIntersectionOrPrimaryTypeContext { + public List unionOrIntersectionOrPrimaryType() { + return getRuleContexts(UnionOrIntersectionOrPrimaryTypeContext.class); + } + public UnionOrIntersectionOrPrimaryTypeContext unionOrIntersectionOrPrimaryType(int i) { + return getRuleContext(UnionOrIntersectionOrPrimaryTypeContext.class,i); + } + public UnionContext(UnionOrIntersectionOrPrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterUnion(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitUnion(this); + } + } + + public final UnionOrIntersectionOrPrimaryTypeContext unionOrIntersectionOrPrimaryType() throws RecognitionException { + return unionOrIntersectionOrPrimaryType(0); + } + + private UnionOrIntersectionOrPrimaryTypeContext unionOrIntersectionOrPrimaryType(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + UnionOrIntersectionOrPrimaryTypeContext _localctx = new UnionOrIntersectionOrPrimaryTypeContext(_ctx, _parentState); + UnionOrIntersectionOrPrimaryTypeContext _prevctx = _localctx; + int _startState = 20; + enterRecursionRule(_localctx, 20, RULE_unionOrIntersectionOrPrimaryType, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + _localctx = new PrimaryContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + + setState(343); + primaryType(0); + } + _ctx.stop = _input.LT(-1); + setState(353); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,9,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(351); + switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) { + case 1: + { + _localctx = new UnionContext(new UnionOrIntersectionOrPrimaryTypeContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_unionOrIntersectionOrPrimaryType); + setState(345); + if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); + setState(346); + match(BitOr); + setState(347); + unionOrIntersectionOrPrimaryType(4); + } + break; + case 2: + { + _localctx = new IntersectionContext(new UnionOrIntersectionOrPrimaryTypeContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_unionOrIntersectionOrPrimaryType); + setState(348); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(349); + match(BitAnd); + setState(350); + unionOrIntersectionOrPrimaryType(3); + } + break; + } + } + } + setState(355); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,9,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class PrimaryTypeContext extends ParserRuleContext { + public PrimaryTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_primaryType; } + + public PrimaryTypeContext() { } + public void copyFrom(PrimaryTypeContext ctx) { + super.copyFrom(ctx); + } + } + public static class RedefinitionOfTypeContext extends PrimaryTypeContext { + public TypeReferenceContext typeReference() { + return getRuleContext(TypeReferenceContext.class,0); + } + public TerminalNode Is() { return getToken(TypeScriptParser.Is, 0); } + public PrimaryTypeContext primaryType() { + return getRuleContext(PrimaryTypeContext.class,0); + } + public RedefinitionOfTypeContext(PrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterRedefinitionOfType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitRedefinitionOfType(this); + } + } + public static class PredefinedPrimTypeContext extends PrimaryTypeContext { + public PredefinedTypeContext predefinedType() { + return getRuleContext(PredefinedTypeContext.class,0); + } + public PredefinedPrimTypeContext(PrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPredefinedPrimType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPredefinedPrimType(this); + } + } + public static class ArrayPrimTypeContext extends PrimaryTypeContext { + public PrimaryTypeContext primaryType() { + return getRuleContext(PrimaryTypeContext.class,0); + } + public ArrayPrimTypeContext(PrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArrayPrimType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArrayPrimType(this); + } + } + public static class ParenthesizedPrimTypeContext extends PrimaryTypeContext { + public Type_Context type_() { + return getRuleContext(Type_Context.class,0); + } + public ParenthesizedPrimTypeContext(PrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterParenthesizedPrimType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitParenthesizedPrimType(this); + } + } + public static class ThisPrimTypeContext extends PrimaryTypeContext { + public TerminalNode This() { return getToken(TypeScriptParser.This, 0); } + public ThisPrimTypeContext(PrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterThisPrimType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitThisPrimType(this); + } + } + public static class TuplePrimTypeContext extends PrimaryTypeContext { + public TupleElementTypesContext tupleElementTypes() { + return getRuleContext(TupleElementTypesContext.class,0); + } + public TuplePrimTypeContext(PrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTuplePrimType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTuplePrimType(this); + } + } + public static class ObjectPrimTypeContext extends PrimaryTypeContext { + public ObjectTypeContext objectType() { + return getRuleContext(ObjectTypeContext.class,0); + } + public ObjectPrimTypeContext(PrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterObjectPrimType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitObjectPrimType(this); + } + } + public static class ReferencePrimTypeContext extends PrimaryTypeContext { + public TypeReferenceContext typeReference() { + return getRuleContext(TypeReferenceContext.class,0); + } + public ReferencePrimTypeContext(PrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterReferencePrimType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitReferencePrimType(this); + } + } + public static class QueryPrimTypeContext extends PrimaryTypeContext { + public TypeQueryContext typeQuery() { + return getRuleContext(TypeQueryContext.class,0); + } + public QueryPrimTypeContext(PrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterQueryPrimType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitQueryPrimType(this); + } + } + + public final PrimaryTypeContext primaryType() throws RecognitionException { + return primaryType(0); + } + + private PrimaryTypeContext primaryType(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + PrimaryTypeContext _localctx = new PrimaryTypeContext(_ctx, _parentState); + PrimaryTypeContext _prevctx = _localctx; + int _startState = 22; + enterRecursionRule(_localctx, 22, RULE_primaryType, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(374); + switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) { + case 1: + { + _localctx = new RedefinitionOfTypeContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + + setState(357); + typeReference(); + setState(358); + match(Is); + setState(359); + primaryType(1); + } + break; + case 2: + { + _localctx = new ParenthesizedPrimTypeContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(361); + match(OpenParen); + setState(362); + type_(); + setState(363); + match(CloseParen); + } + break; + case 3: + { + _localctx = new PredefinedPrimTypeContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(365); + predefinedType(); + } + break; + case 4: + { + _localctx = new ReferencePrimTypeContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(366); + typeReference(); + } + break; + case 5: + { + _localctx = new ObjectPrimTypeContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(367); + objectType(); + } + break; + case 6: + { + _localctx = new TuplePrimTypeContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(368); + match(OpenBracket); + setState(369); + tupleElementTypes(); + setState(370); + match(CloseBracket); + } + break; + case 7: + { + _localctx = new QueryPrimTypeContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(372); + typeQuery(); + } + break; + case 8: + { + _localctx = new ThisPrimTypeContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(373); + match(This); + } + break; + } + _ctx.stop = _input.LT(-1); + setState(382); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,11,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new ArrayPrimTypeContext(new PrimaryTypeContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_primaryType); + setState(376); + if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); + setState(377); + if (!(notLineTerminator())) throw new FailedPredicateException(this, "notLineTerminator()"); + setState(378); + match(OpenBracket); + setState(379); + match(CloseBracket); + } + } + } + setState(384); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,11,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class PredefinedTypeContext extends ParserRuleContext { + public TerminalNode Any() { return getToken(TypeScriptParser.Any, 0); } + public TerminalNode Number() { return getToken(TypeScriptParser.Number, 0); } + public TerminalNode Boolean() { return getToken(TypeScriptParser.Boolean, 0); } + public TerminalNode String() { return getToken(TypeScriptParser.String, 0); } + public TerminalNode Symbol() { return getToken(TypeScriptParser.Symbol, 0); } + public TerminalNode Void() { return getToken(TypeScriptParser.Void, 0); } + public PredefinedTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_predefinedType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPredefinedType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPredefinedType(this); + } + } + + public final PredefinedTypeContext predefinedType() throws RecognitionException { + PredefinedTypeContext _localctx = new PredefinedTypeContext(_ctx, getState()); + enterRule(_localctx, 24, RULE_predefinedType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(385); + _la = _input.LA(1); + if ( !(((((_la - 73)) & ~0x3f) == 0 && ((1L << (_la - 73)) & ((1L << (Void - 73)) | (1L << (Any - 73)) | (1L << (Number - 73)) | (1L << (Boolean - 73)) | (1L << (String - 73)) | (1L << (Symbol - 73)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeReferenceContext extends ParserRuleContext { + public TypeNameContext typeName() { + return getRuleContext(TypeNameContext.class,0); + } + public NestedTypeGenericContext nestedTypeGeneric() { + return getRuleContext(NestedTypeGenericContext.class,0); + } + public TypeReferenceContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeReference; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeReference(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeReference(this); + } + } + + public final TypeReferenceContext typeReference() throws RecognitionException { + TypeReferenceContext _localctx = new TypeReferenceContext(_ctx, getState()); + enterRule(_localctx, 26, RULE_typeReference); + try { + enterOuterAlt(_localctx, 1); + { + setState(387); + typeName(); + setState(389); + switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) { + case 1: + { + setState(388); + nestedTypeGeneric(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NestedTypeGenericContext extends ParserRuleContext { + public TypeIncludeGenericContext typeIncludeGeneric() { + return getRuleContext(TypeIncludeGenericContext.class,0); + } + public TypeGenericContext typeGeneric() { + return getRuleContext(TypeGenericContext.class,0); + } + public NestedTypeGenericContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_nestedTypeGeneric; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterNestedTypeGeneric(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitNestedTypeGeneric(this); + } + } + + public final NestedTypeGenericContext nestedTypeGeneric() throws RecognitionException { + NestedTypeGenericContext _localctx = new NestedTypeGenericContext(_ctx, getState()); + enterRule(_localctx, 28, RULE_nestedTypeGeneric); + try { + setState(393); + switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(391); + typeIncludeGeneric(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(392); + typeGeneric(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeGenericContext extends ParserRuleContext { + public TypeArgumentListContext typeArgumentList() { + return getRuleContext(TypeArgumentListContext.class,0); + } + public TypeGenericContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeGeneric; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeGeneric(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeGeneric(this); + } + } + + public final TypeGenericContext typeGeneric() throws RecognitionException { + TypeGenericContext _localctx = new TypeGenericContext(_ctx, getState()); + enterRule(_localctx, 30, RULE_typeGeneric); + try { + enterOuterAlt(_localctx, 1); + { + setState(395); + match(LessThan); + setState(396); + typeArgumentList(); + setState(397); + match(MoreThan); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeIncludeGenericContext extends ParserRuleContext { + public List typeArgumentList() { + return getRuleContexts(TypeArgumentListContext.class); + } + public TypeArgumentListContext typeArgumentList(int i) { + return getRuleContext(TypeArgumentListContext.class,i); + } + public BindingPatternContext bindingPattern() { + return getRuleContext(BindingPatternContext.class,0); + } + public TypeIncludeGenericContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeIncludeGeneric; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeIncludeGeneric(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeIncludeGeneric(this); + } + } + + public final TypeIncludeGenericContext typeIncludeGeneric() throws RecognitionException { + TypeIncludeGenericContext _localctx = new TypeIncludeGenericContext(_ctx, getState()); + enterRule(_localctx, 32, RULE_typeIncludeGeneric); + try { + enterOuterAlt(_localctx, 1); + { + setState(399); + match(LessThan); + setState(400); + typeArgumentList(); + setState(401); + match(LessThan); + setState(402); + typeArgumentList(); + setState(408); + switch (_input.LA(1)) { + case MoreThan: + { + setState(403); + match(MoreThan); + setState(404); + bindingPattern(); + setState(405); + match(MoreThan); + } + break; + case RightShiftArithmetic: + { + setState(407); + match(RightShiftArithmetic); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeNameContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public NamespaceNameContext namespaceName() { + return getRuleContext(NamespaceNameContext.class,0); + } + public TypeNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeName(this); + } + } + + public final TypeNameContext typeName() throws RecognitionException { + TypeNameContext _localctx = new TypeNameContext(_ctx, getState()); + enterRule(_localctx, 34, RULE_typeName); + try { + setState(412); + switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(410); + match(Identifier); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(411); + namespaceName(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ObjectTypeContext extends ParserRuleContext { + public TypeBodyContext typeBody() { + return getRuleContext(TypeBodyContext.class,0); + } + public ObjectTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_objectType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterObjectType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitObjectType(this); + } + } + + public final ObjectTypeContext objectType() throws RecognitionException { + ObjectTypeContext _localctx = new ObjectTypeContext(_ctx, getState()); + enterRule(_localctx, 36, RULE_objectType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(414); + match(OpenBrace); + setState(416); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenParen) | (1L << LessThan) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << DecimalLiteral) | (1L << HexIntegerLiteral) | (1L << OctalIntegerLiteral) | (1L << OctalIntegerLiteral2) | (1L << BinaryIntegerLiteral) | (1L << Break) | (1L << Do))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function_ - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)) | (1L << (Number - 64)) | (1L << (Boolean - 64)) | (1L << (String - 64)) | (1L << (TypeAlias - 64)) | (1L << (Get - 64)) | (1L << (Set - 64)) | (1L << (Require - 64)) | (1L << (Module - 64)) | (1L << (Identifier - 64)) | (1L << (StringLiteral - 64)))) != 0)) { + { + setState(415); + typeBody(); + } + } + + setState(418); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeBodyContext extends ParserRuleContext { + public TypeMemberListContext typeMemberList() { + return getRuleContext(TypeMemberListContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public TypeBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeBody(this); + } + } + + public final TypeBodyContext typeBody() throws RecognitionException { + TypeBodyContext _localctx = new TypeBodyContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_typeBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(420); + typeMemberList(); + setState(422); + _la = _input.LA(1); + if (_la==SemiColon || _la==Comma) { + { + setState(421); + _la = _input.LA(1); + if ( !(_la==SemiColon || _la==Comma) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeMemberListContext extends ParserRuleContext { + public List typeMember() { + return getRuleContexts(TypeMemberContext.class); + } + public TypeMemberContext typeMember(int i) { + return getRuleContext(TypeMemberContext.class,i); + } + public List SemiColon() { return getTokens(TypeScriptParser.SemiColon); } + public TerminalNode SemiColon(int i) { + return getToken(TypeScriptParser.SemiColon, i); + } + public TypeMemberListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeMemberList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeMemberList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeMemberList(this); + } + } + + public final TypeMemberListContext typeMemberList() throws RecognitionException { + TypeMemberListContext _localctx = new TypeMemberListContext(_ctx, getState()); + enterRule(_localctx, 40, RULE_typeMemberList); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(424); + typeMember(); + setState(429); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,18,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(425); + _la = _input.LA(1); + if ( !(_la==SemiColon || _la==Comma) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(426); + typeMember(); + } + } + } + setState(431); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,18,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeMemberContext extends ParserRuleContext { + public PropertySignaturContext propertySignatur() { + return getRuleContext(PropertySignaturContext.class,0); + } + public CallSignatureContext callSignature() { + return getRuleContext(CallSignatureContext.class,0); + } + public ConstructSignatureContext constructSignature() { + return getRuleContext(ConstructSignatureContext.class,0); + } + public IndexSignatureContext indexSignature() { + return getRuleContext(IndexSignatureContext.class,0); + } + public MethodSignatureContext methodSignature() { + return getRuleContext(MethodSignatureContext.class,0); + } + public Type_Context type_() { + return getRuleContext(Type_Context.class,0); + } + public TypeMemberContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeMember; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeMember(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeMember(this); + } + } + + public final TypeMemberContext typeMember() throws RecognitionException { + TypeMemberContext _localctx = new TypeMemberContext(_ctx, getState()); + enterRule(_localctx, 42, RULE_typeMember); + int _la; + try { + setState(441); + switch ( getInterpreter().adaptivePredict(_input,20,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(432); + propertySignatur(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(433); + callSignature(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(434); + constructSignature(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(435); + indexSignature(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(436); + methodSignature(); + setState(439); + _la = _input.LA(1); + if (_la==ARROW) { + { + setState(437); + match(ARROW); + setState(438); + type_(); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayTypeContext extends ParserRuleContext { + public PrimaryTypeContext primaryType() { + return getRuleContext(PrimaryTypeContext.class,0); + } + public ArrayTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArrayType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArrayType(this); + } + } + + public final ArrayTypeContext arrayType() throws RecognitionException { + ArrayTypeContext _localctx = new ArrayTypeContext(_ctx, getState()); + enterRule(_localctx, 44, RULE_arrayType); + try { + enterOuterAlt(_localctx, 1); + { + setState(443); + primaryType(0); + setState(444); + if (!(notLineTerminator())) throw new FailedPredicateException(this, "notLineTerminator()"); + setState(445); + match(OpenBracket); + setState(446); + match(CloseBracket); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TupleTypeContext extends ParserRuleContext { + public TupleElementTypesContext tupleElementTypes() { + return getRuleContext(TupleElementTypesContext.class,0); + } + public TupleTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_tupleType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTupleType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTupleType(this); + } + } + + public final TupleTypeContext tupleType() throws RecognitionException { + TupleTypeContext _localctx = new TupleTypeContext(_ctx, getState()); + enterRule(_localctx, 46, RULE_tupleType); + try { + enterOuterAlt(_localctx, 1); + { + setState(448); + match(OpenBracket); + setState(449); + tupleElementTypes(); + setState(450); + match(CloseBracket); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TupleElementTypesContext extends ParserRuleContext { + public List type_() { + return getRuleContexts(Type_Context.class); + } + public Type_Context type_(int i) { + return getRuleContext(Type_Context.class,i); + } + public TupleElementTypesContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_tupleElementTypes; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTupleElementTypes(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTupleElementTypes(this); + } + } + + public final TupleElementTypesContext tupleElementTypes() throws RecognitionException { + TupleElementTypesContext _localctx = new TupleElementTypesContext(_ctx, getState()); + enterRule(_localctx, 48, RULE_tupleElementTypes); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(452); + type_(); + setState(457); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==Comma) { + { + { + setState(453); + match(Comma); + setState(454); + type_(); + } + } + setState(459); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionTypeContext extends ParserRuleContext { + public Type_Context type_() { + return getRuleContext(Type_Context.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public ParameterListContext parameterList() { + return getRuleContext(ParameterListContext.class,0); + } + public FunctionTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterFunctionType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitFunctionType(this); + } + } + + public final FunctionTypeContext functionType() throws RecognitionException { + FunctionTypeContext _localctx = new FunctionTypeContext(_ctx, getState()); + enterRule(_localctx, 50, RULE_functionType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(461); + _la = _input.LA(1); + if (_la==LessThan) { + { + setState(460); + typeParameters(); + } + } + + setState(463); + match(OpenParen); + setState(465); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << Break) | (1L << Do))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function_ - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)) | (1L << (Number - 64)) | (1L << (Boolean - 64)) | (1L << (String - 64)) | (1L << (TypeAlias - 64)) | (1L << (Get - 64)) | (1L << (Set - 64)) | (1L << (Require - 64)) | (1L << (Module - 64)) | (1L << (At - 64)) | (1L << (Identifier - 64)))) != 0)) { + { + setState(464); + parameterList(); + } + } + + setState(467); + match(CloseParen); + setState(468); + match(ARROW); + setState(469); + type_(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstructorTypeContext extends ParserRuleContext { + public Type_Context type_() { + return getRuleContext(Type_Context.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public ParameterListContext parameterList() { + return getRuleContext(ParameterListContext.class,0); + } + public ConstructorTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constructorType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterConstructorType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitConstructorType(this); + } + } + + public final ConstructorTypeContext constructorType() throws RecognitionException { + ConstructorTypeContext _localctx = new ConstructorTypeContext(_ctx, getState()); + enterRule(_localctx, 52, RULE_constructorType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(471); + match(New); + setState(473); + _la = _input.LA(1); + if (_la==LessThan) { + { + setState(472); + typeParameters(); + } + } + + setState(475); + match(OpenParen); + setState(477); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << Break) | (1L << Do))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function_ - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)) | (1L << (Number - 64)) | (1L << (Boolean - 64)) | (1L << (String - 64)) | (1L << (TypeAlias - 64)) | (1L << (Get - 64)) | (1L << (Set - 64)) | (1L << (Require - 64)) | (1L << (Module - 64)) | (1L << (At - 64)) | (1L << (Identifier - 64)))) != 0)) { + { + setState(476); + parameterList(); + } + } + + setState(479); + match(CloseParen); + setState(480); + match(ARROW); + setState(481); + type_(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeQueryContext extends ParserRuleContext { + public TypeQueryExpressionContext typeQueryExpression() { + return getRuleContext(TypeQueryExpressionContext.class,0); + } + public TypeQueryContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeQuery; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeQuery(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeQuery(this); + } + } + + public final TypeQueryContext typeQuery() throws RecognitionException { + TypeQueryContext _localctx = new TypeQueryContext(_ctx, getState()); + enterRule(_localctx, 54, RULE_typeQuery); + try { + enterOuterAlt(_localctx, 1); + { + setState(483); + match(Typeof); + setState(484); + typeQueryExpression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeQueryExpressionContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public List identifierName() { + return getRuleContexts(IdentifierNameContext.class); + } + public IdentifierNameContext identifierName(int i) { + return getRuleContext(IdentifierNameContext.class,i); + } + public TypeQueryExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeQueryExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeQueryExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeQueryExpression(this); + } + } + + public final TypeQueryExpressionContext typeQueryExpression() throws RecognitionException { + TypeQueryExpressionContext _localctx = new TypeQueryExpressionContext(_ctx, getState()); + enterRule(_localctx, 56, RULE_typeQueryExpression); + try { + int _alt; + setState(496); + switch ( getInterpreter().adaptivePredict(_input,27,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(486); + match(Identifier); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(490); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(487); + identifierName(); + setState(488); + match(Dot); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(492); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,26,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + setState(494); + identifierName(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PropertySignaturContext extends ParserRuleContext { + public PropertyNameContext propertyName() { + return getRuleContext(PropertyNameContext.class,0); + } + public TerminalNode ReadOnly() { return getToken(TypeScriptParser.ReadOnly, 0); } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public Type_Context type_() { + return getRuleContext(Type_Context.class,0); + } + public PropertySignaturContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_propertySignatur; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPropertySignatur(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPropertySignatur(this); + } + } + + public final PropertySignaturContext propertySignatur() throws RecognitionException { + PropertySignaturContext _localctx = new PropertySignaturContext(_ctx, getState()); + enterRule(_localctx, 58, RULE_propertySignatur); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(499); + switch ( getInterpreter().adaptivePredict(_input,28,_ctx) ) { + case 1: + { + setState(498); + match(ReadOnly); + } + break; + } + setState(501); + propertyName(); + setState(503); + _la = _input.LA(1); + if (_la==QuestionMark) { + { + setState(502); + match(QuestionMark); + } + } + + setState(506); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(505); + typeAnnotation(); + } + } + + setState(510); + _la = _input.LA(1); + if (_la==ARROW) { + { + setState(508); + match(ARROW); + setState(509); + type_(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeAnnotationContext extends ParserRuleContext { + public Type_Context type_() { + return getRuleContext(Type_Context.class,0); + } + public TypeAnnotationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeAnnotation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeAnnotation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeAnnotation(this); + } + } + + public final TypeAnnotationContext typeAnnotation() throws RecognitionException { + TypeAnnotationContext _localctx = new TypeAnnotationContext(_ctx, getState()); + enterRule(_localctx, 60, RULE_typeAnnotation); + try { + enterOuterAlt(_localctx, 1); + { + setState(512); + match(Colon); + setState(513); + type_(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CallSignatureContext extends ParserRuleContext { + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public ParameterListContext parameterList() { + return getRuleContext(ParameterListContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public CallSignatureContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_callSignature; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterCallSignature(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitCallSignature(this); + } + } + + public final CallSignatureContext callSignature() throws RecognitionException { + CallSignatureContext _localctx = new CallSignatureContext(_ctx, getState()); + enterRule(_localctx, 62, RULE_callSignature); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(516); + _la = _input.LA(1); + if (_la==LessThan) { + { + setState(515); + typeParameters(); + } + } + + setState(518); + match(OpenParen); + setState(520); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << Break) | (1L << Do))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function_ - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)) | (1L << (Number - 64)) | (1L << (Boolean - 64)) | (1L << (String - 64)) | (1L << (TypeAlias - 64)) | (1L << (Get - 64)) | (1L << (Set - 64)) | (1L << (Require - 64)) | (1L << (Module - 64)) | (1L << (At - 64)) | (1L << (Identifier - 64)))) != 0)) { + { + setState(519); + parameterList(); + } + } + + setState(522); + match(CloseParen); + setState(524); + switch ( getInterpreter().adaptivePredict(_input,34,_ctx) ) { + case 1: + { + setState(523); + typeAnnotation(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ParameterListContext extends ParserRuleContext { + public RestParameterContext restParameter() { + return getRuleContext(RestParameterContext.class,0); + } + public List parameter() { + return getRuleContexts(ParameterContext.class); + } + public ParameterContext parameter(int i) { + return getRuleContext(ParameterContext.class,i); + } + public ParameterListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_parameterList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterParameterList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitParameterList(this); + } + } + + public final ParameterListContext parameterList() throws RecognitionException { + ParameterListContext _localctx = new ParameterListContext(_ctx, getState()); + enterRule(_localctx, 64, RULE_parameterList); + int _la; + try { + int _alt; + setState(539); + switch (_input.LA(1)) { + case Ellipsis: + enterOuterAlt(_localctx, 1); + { + setState(526); + restParameter(); + } + break; + case OpenBracket: + case OpenBrace: + case NullLiteral: + case BooleanLiteral: + case Break: + case Do: + case Instanceof: + case Typeof: + case Case: + case Else: + case New: + case Var: + case Catch: + case Finally: + case Return: + case Void: + case Continue: + case For: + case Switch: + case While: + case Debugger: + case Function_: + case This: + case With: + case Default: + case If: + case Throw: + case Delete: + case In: + case Try: + case From: + case ReadOnly: + case Async: + case Class: + case Enum: + case Extends: + case Super: + case Const: + case Export: + case Import: + case Implements: + case Let: + case Private: + case Public: + case Interface: + case Package: + case Protected: + case Static: + case Yield: + case Number: + case Boolean: + case String: + case TypeAlias: + case Get: + case Set: + case Require: + case Module: + case At: + case Identifier: + enterOuterAlt(_localctx, 2); + { + setState(527); + parameter(); + setState(532); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(528); + match(Comma); + setState(529); + parameter(); + } + } + } + setState(534); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); + } + setState(537); + _la = _input.LA(1); + if (_la==Comma) { + { + setState(535); + match(Comma); + setState(536); + restParameter(); + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RequiredParameterListContext extends ParserRuleContext { + public List requiredParameter() { + return getRuleContexts(RequiredParameterContext.class); + } + public RequiredParameterContext requiredParameter(int i) { + return getRuleContext(RequiredParameterContext.class,i); + } + public RequiredParameterListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_requiredParameterList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterRequiredParameterList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitRequiredParameterList(this); + } + } + + public final RequiredParameterListContext requiredParameterList() throws RecognitionException { + RequiredParameterListContext _localctx = new RequiredParameterListContext(_ctx, getState()); + enterRule(_localctx, 66, RULE_requiredParameterList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(541); + requiredParameter(); + setState(546); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==Comma) { + { + { + setState(542); + match(Comma); + setState(543); + requiredParameter(); + } + } + setState(548); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ParameterContext extends ParserRuleContext { + public RequiredParameterContext requiredParameter() { + return getRuleContext(RequiredParameterContext.class,0); + } + public OptionalParameterContext optionalParameter() { + return getRuleContext(OptionalParameterContext.class,0); + } + public ParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_parameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitParameter(this); + } + } + + public final ParameterContext parameter() throws RecognitionException { + ParameterContext _localctx = new ParameterContext(_ctx, getState()); + enterRule(_localctx, 68, RULE_parameter); + try { + setState(551); + switch ( getInterpreter().adaptivePredict(_input,39,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(549); + requiredParameter(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(550); + optionalParameter(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class OptionalParameterContext extends ParserRuleContext { + public IdentifierOrPatternContext identifierOrPattern() { + return getRuleContext(IdentifierOrPatternContext.class,0); + } + public DecoratorListContext decoratorList() { + return getRuleContext(DecoratorListContext.class,0); + } + public InitializerContext initializer() { + return getRuleContext(InitializerContext.class,0); + } + public AccessibilityModifierContext accessibilityModifier() { + return getRuleContext(AccessibilityModifierContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public OptionalParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_optionalParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterOptionalParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitOptionalParameter(this); + } + } + + public final OptionalParameterContext optionalParameter() throws RecognitionException { + OptionalParameterContext _localctx = new OptionalParameterContext(_ctx, getState()); + enterRule(_localctx, 70, RULE_optionalParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(554); + _la = _input.LA(1); + if (_la==At) { + { + setState(553); + decoratorList(); + } + } + + { + setState(557); + switch ( getInterpreter().adaptivePredict(_input,41,_ctx) ) { + case 1: + { + setState(556); + accessibilityModifier(); + } + break; + } + setState(559); + identifierOrPattern(); + setState(568); + switch (_input.LA(1)) { + case QuestionMark: + { + setState(560); + match(QuestionMark); + setState(562); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(561); + typeAnnotation(); + } + } + + } + break; + case Assign: + case Colon: + { + setState(565); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(564); + typeAnnotation(); + } + } + + setState(567); + initializer(); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RestParameterContext extends ParserRuleContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public RestParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_restParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterRestParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitRestParameter(this); + } + } + + public final RestParameterContext restParameter() throws RecognitionException { + RestParameterContext _localctx = new RestParameterContext(_ctx, getState()); + enterRule(_localctx, 72, RULE_restParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(570); + match(Ellipsis); + setState(571); + singleExpression(0); + setState(573); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(572); + typeAnnotation(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RequiredParameterContext extends ParserRuleContext { + public IdentifierOrPatternContext identifierOrPattern() { + return getRuleContext(IdentifierOrPatternContext.class,0); + } + public DecoratorListContext decoratorList() { + return getRuleContext(DecoratorListContext.class,0); + } + public AccessibilityModifierContext accessibilityModifier() { + return getRuleContext(AccessibilityModifierContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public RequiredParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_requiredParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterRequiredParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitRequiredParameter(this); + } + } + + public final RequiredParameterContext requiredParameter() throws RecognitionException { + RequiredParameterContext _localctx = new RequiredParameterContext(_ctx, getState()); + enterRule(_localctx, 74, RULE_requiredParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(576); + _la = _input.LA(1); + if (_la==At) { + { + setState(575); + decoratorList(); + } + } + + setState(579); + switch ( getInterpreter().adaptivePredict(_input,47,_ctx) ) { + case 1: + { + setState(578); + accessibilityModifier(); + } + break; + } + setState(581); + identifierOrPattern(); + setState(583); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(582); + typeAnnotation(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AccessibilityModifierContext extends ParserRuleContext { + public TerminalNode Public() { return getToken(TypeScriptParser.Public, 0); } + public TerminalNode Private() { return getToken(TypeScriptParser.Private, 0); } + public TerminalNode Protected() { return getToken(TypeScriptParser.Protected, 0); } + public AccessibilityModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_accessibilityModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterAccessibilityModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitAccessibilityModifier(this); + } + } + + public final AccessibilityModifierContext accessibilityModifier() throws RecognitionException { + AccessibilityModifierContext _localctx = new AccessibilityModifierContext(_ctx, getState()); + enterRule(_localctx, 76, RULE_accessibilityModifier); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(585); + _la = _input.LA(1); + if ( !(((((_la - 101)) & ~0x3f) == 0 && ((1L << (_la - 101)) & ((1L << (Private - 101)) | (1L << (Public - 101)) | (1L << (Protected - 101)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IdentifierOrPatternContext extends ParserRuleContext { + public IdentifierNameContext identifierName() { + return getRuleContext(IdentifierNameContext.class,0); + } + public BindingPatternContext bindingPattern() { + return getRuleContext(BindingPatternContext.class,0); + } + public IdentifierOrPatternContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_identifierOrPattern; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIdentifierOrPattern(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIdentifierOrPattern(this); + } + } + + public final IdentifierOrPatternContext identifierOrPattern() throws RecognitionException { + IdentifierOrPatternContext _localctx = new IdentifierOrPatternContext(_ctx, getState()); + enterRule(_localctx, 78, RULE_identifierOrPattern); + try { + setState(589); + switch (_input.LA(1)) { + case NullLiteral: + case BooleanLiteral: + case Break: + case Do: + case Instanceof: + case Typeof: + case Case: + case Else: + case New: + case Var: + case Catch: + case Finally: + case Return: + case Void: + case Continue: + case For: + case Switch: + case While: + case Debugger: + case Function_: + case This: + case With: + case Default: + case If: + case Throw: + case Delete: + case In: + case Try: + case From: + case ReadOnly: + case Async: + case Class: + case Enum: + case Extends: + case Super: + case Const: + case Export: + case Import: + case Implements: + case Let: + case Private: + case Public: + case Interface: + case Package: + case Protected: + case Static: + case Yield: + case Number: + case Boolean: + case String: + case TypeAlias: + case Get: + case Set: + case Require: + case Module: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(587); + identifierName(); + } + break; + case OpenBracket: + case OpenBrace: + enterOuterAlt(_localctx, 2); + { + setState(588); + bindingPattern(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstructSignatureContext extends ParserRuleContext { + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public ParameterListContext parameterList() { + return getRuleContext(ParameterListContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public ConstructSignatureContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constructSignature; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterConstructSignature(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitConstructSignature(this); + } + } + + public final ConstructSignatureContext constructSignature() throws RecognitionException { + ConstructSignatureContext _localctx = new ConstructSignatureContext(_ctx, getState()); + enterRule(_localctx, 80, RULE_constructSignature); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(591); + match(New); + setState(593); + _la = _input.LA(1); + if (_la==LessThan) { + { + setState(592); + typeParameters(); + } + } + + setState(595); + match(OpenParen); + setState(597); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << Break) | (1L << Do))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function_ - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)) | (1L << (Number - 64)) | (1L << (Boolean - 64)) | (1L << (String - 64)) | (1L << (TypeAlias - 64)) | (1L << (Get - 64)) | (1L << (Set - 64)) | (1L << (Require - 64)) | (1L << (Module - 64)) | (1L << (At - 64)) | (1L << (Identifier - 64)))) != 0)) { + { + setState(596); + parameterList(); + } + } + + setState(599); + match(CloseParen); + setState(601); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(600); + typeAnnotation(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IndexSignatureContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public TerminalNode Number() { return getToken(TypeScriptParser.Number, 0); } + public TerminalNode String() { return getToken(TypeScriptParser.String, 0); } + public IndexSignatureContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_indexSignature; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIndexSignature(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIndexSignature(this); + } + } + + public final IndexSignatureContext indexSignature() throws RecognitionException { + IndexSignatureContext _localctx = new IndexSignatureContext(_ctx, getState()); + enterRule(_localctx, 82, RULE_indexSignature); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(603); + match(OpenBracket); + setState(604); + match(Identifier); + setState(605); + match(Colon); + setState(606); + _la = _input.LA(1); + if ( !(_la==Number || _la==String) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(607); + match(CloseBracket); + setState(608); + typeAnnotation(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MethodSignatureContext extends ParserRuleContext { + public PropertyNameContext propertyName() { + return getRuleContext(PropertyNameContext.class,0); + } + public CallSignatureContext callSignature() { + return getRuleContext(CallSignatureContext.class,0); + } + public MethodSignatureContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_methodSignature; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterMethodSignature(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitMethodSignature(this); + } + } + + public final MethodSignatureContext methodSignature() throws RecognitionException { + MethodSignatureContext _localctx = new MethodSignatureContext(_ctx, getState()); + enterRule(_localctx, 84, RULE_methodSignature); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(610); + propertyName(); + setState(612); + _la = _input.LA(1); + if (_la==QuestionMark) { + { + setState(611); + match(QuestionMark); + } + } + + setState(614); + callSignature(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeAliasDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public Type_Context type_() { + return getRuleContext(Type_Context.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public TypeAliasDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeAliasDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeAliasDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeAliasDeclaration(this); + } + } + + public final TypeAliasDeclarationContext typeAliasDeclaration() throws RecognitionException { + TypeAliasDeclarationContext _localctx = new TypeAliasDeclarationContext(_ctx, getState()); + enterRule(_localctx, 86, RULE_typeAliasDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(616); + match(TypeAlias); + setState(617); + match(Identifier); + setState(619); + _la = _input.LA(1); + if (_la==LessThan) { + { + setState(618); + typeParameters(); + } + } + + setState(621); + match(Assign); + setState(622); + type_(); + setState(623); + match(SemiColon); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstructorDeclarationContext extends ParserRuleContext { + public TerminalNode Constructor() { return getToken(TypeScriptParser.Constructor, 0); } + public AccessibilityModifierContext accessibilityModifier() { + return getRuleContext(AccessibilityModifierContext.class,0); + } + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public ConstructorDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constructorDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterConstructorDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitConstructorDeclaration(this); + } + } + + public final ConstructorDeclarationContext constructorDeclaration() throws RecognitionException { + ConstructorDeclarationContext _localctx = new ConstructorDeclarationContext(_ctx, getState()); + enterRule(_localctx, 88, RULE_constructorDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(626); + _la = _input.LA(1); + if (((((_la - 101)) & ~0x3f) == 0 && ((1L << (_la - 101)) & ((1L << (Private - 101)) | (1L << (Public - 101)) | (1L << (Protected - 101)))) != 0)) { + { + setState(625); + accessibilityModifier(); + } + } + + setState(628); + match(Constructor); + setState(629); + match(OpenParen); + setState(631); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis))) != 0) || ((((_la - 101)) & ~0x3f) == 0 && ((1L << (_la - 101)) & ((1L << (Private - 101)) | (1L << (Public - 101)) | (1L << (Protected - 101)) | (1L << (TypeAlias - 101)) | (1L << (Require - 101)) | (1L << (At - 101)) | (1L << (Identifier - 101)))) != 0)) { + { + setState(630); + formalParameterList(); + } + } + + setState(633); + match(CloseParen); + setState(639); + switch ( getInterpreter().adaptivePredict(_input,57,_ctx) ) { + case 1: + { + { + setState(634); + match(OpenBrace); + setState(635); + functionBody(); + setState(636); + match(CloseBrace); + } + } + break; + case 2: + { + setState(638); + match(SemiColon); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceDeclarationContext extends ParserRuleContext { + public TerminalNode Interface() { return getToken(TypeScriptParser.Interface, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public ObjectTypeContext objectType() { + return getRuleContext(ObjectTypeContext.class,0); + } + public TerminalNode Export() { return getToken(TypeScriptParser.Export, 0); } + public TerminalNode Declare() { return getToken(TypeScriptParser.Declare, 0); } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public InterfaceExtendsClauseContext interfaceExtendsClause() { + return getRuleContext(InterfaceExtendsClauseContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public InterfaceDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterInterfaceDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitInterfaceDeclaration(this); + } + } + + public final InterfaceDeclarationContext interfaceDeclaration() throws RecognitionException { + InterfaceDeclarationContext _localctx = new InterfaceDeclarationContext(_ctx, getState()); + enterRule(_localctx, 90, RULE_interfaceDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(642); + _la = _input.LA(1); + if (_la==Export) { + { + setState(641); + match(Export); + } + } + + setState(645); + _la = _input.LA(1); + if (_la==Declare) { + { + setState(644); + match(Declare); + } + } + + setState(647); + match(Interface); + setState(648); + match(Identifier); + setState(650); + _la = _input.LA(1); + if (_la==LessThan) { + { + setState(649); + typeParameters(); + } + } + + setState(653); + _la = _input.LA(1); + if (_la==Extends) { + { + setState(652); + interfaceExtendsClause(); + } + } + + setState(655); + objectType(); + setState(657); + switch ( getInterpreter().adaptivePredict(_input,62,_ctx) ) { + case 1: + { + setState(656); + match(SemiColon); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceExtendsClauseContext extends ParserRuleContext { + public TerminalNode Extends() { return getToken(TypeScriptParser.Extends, 0); } + public ClassOrInterfaceTypeListContext classOrInterfaceTypeList() { + return getRuleContext(ClassOrInterfaceTypeListContext.class,0); + } + public InterfaceExtendsClauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceExtendsClause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterInterfaceExtendsClause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitInterfaceExtendsClause(this); + } + } + + public final InterfaceExtendsClauseContext interfaceExtendsClause() throws RecognitionException { + InterfaceExtendsClauseContext _localctx = new InterfaceExtendsClauseContext(_ctx, getState()); + enterRule(_localctx, 92, RULE_interfaceExtendsClause); + try { + enterOuterAlt(_localctx, 1); + { + setState(659); + match(Extends); + setState(660); + classOrInterfaceTypeList(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassOrInterfaceTypeListContext extends ParserRuleContext { + public List typeReference() { + return getRuleContexts(TypeReferenceContext.class); + } + public TypeReferenceContext typeReference(int i) { + return getRuleContext(TypeReferenceContext.class,i); + } + public ClassOrInterfaceTypeListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classOrInterfaceTypeList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterClassOrInterfaceTypeList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitClassOrInterfaceTypeList(this); + } + } + + public final ClassOrInterfaceTypeListContext classOrInterfaceTypeList() throws RecognitionException { + ClassOrInterfaceTypeListContext _localctx = new ClassOrInterfaceTypeListContext(_ctx, getState()); + enterRule(_localctx, 94, RULE_classOrInterfaceTypeList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(662); + typeReference(); + setState(667); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==Comma) { + { + { + setState(663); + match(Comma); + setState(664); + typeReference(); + } + } + setState(669); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumDeclarationContext extends ParserRuleContext { + public TerminalNode Enum() { return getToken(TypeScriptParser.Enum, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public TerminalNode Const() { return getToken(TypeScriptParser.Const, 0); } + public EnumBodyContext enumBody() { + return getRuleContext(EnumBodyContext.class,0); + } + public EnumDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterEnumDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitEnumDeclaration(this); + } + } + + public final EnumDeclarationContext enumDeclaration() throws RecognitionException { + EnumDeclarationContext _localctx = new EnumDeclarationContext(_ctx, getState()); + enterRule(_localctx, 96, RULE_enumDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(671); + _la = _input.LA(1); + if (_la==Const) { + { + setState(670); + match(Const); + } + } + + setState(673); + match(Enum); + setState(674); + match(Identifier); + setState(675); + match(OpenBrace); + setState(677); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NullLiteral) | (1L << BooleanLiteral) | (1L << DecimalLiteral) | (1L << HexIntegerLiteral) | (1L << OctalIntegerLiteral) | (1L << OctalIntegerLiteral2) | (1L << BinaryIntegerLiteral) | (1L << Break) | (1L << Do))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function_ - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)) | (1L << (Number - 64)) | (1L << (Boolean - 64)) | (1L << (String - 64)) | (1L << (TypeAlias - 64)) | (1L << (Get - 64)) | (1L << (Set - 64)) | (1L << (Require - 64)) | (1L << (Module - 64)) | (1L << (Identifier - 64)) | (1L << (StringLiteral - 64)))) != 0)) { + { + setState(676); + enumBody(); + } + } + + setState(679); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumBodyContext extends ParserRuleContext { + public EnumMemberListContext enumMemberList() { + return getRuleContext(EnumMemberListContext.class,0); + } + public EnumBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterEnumBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitEnumBody(this); + } + } + + public final EnumBodyContext enumBody() throws RecognitionException { + EnumBodyContext _localctx = new EnumBodyContext(_ctx, getState()); + enterRule(_localctx, 98, RULE_enumBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(681); + enumMemberList(); + setState(683); + _la = _input.LA(1); + if (_la==Comma) { + { + setState(682); + match(Comma); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumMemberListContext extends ParserRuleContext { + public List enumMember() { + return getRuleContexts(EnumMemberContext.class); + } + public EnumMemberContext enumMember(int i) { + return getRuleContext(EnumMemberContext.class,i); + } + public EnumMemberListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumMemberList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterEnumMemberList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitEnumMemberList(this); + } + } + + public final EnumMemberListContext enumMemberList() throws RecognitionException { + EnumMemberListContext _localctx = new EnumMemberListContext(_ctx, getState()); + enterRule(_localctx, 100, RULE_enumMemberList); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(685); + enumMember(); + setState(690); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,67,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(686); + match(Comma); + setState(687); + enumMember(); + } + } + } + setState(692); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,67,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumMemberContext extends ParserRuleContext { + public PropertyNameContext propertyName() { + return getRuleContext(PropertyNameContext.class,0); + } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public EnumMemberContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumMember; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterEnumMember(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitEnumMember(this); + } + } + + public final EnumMemberContext enumMember() throws RecognitionException { + EnumMemberContext _localctx = new EnumMemberContext(_ctx, getState()); + enterRule(_localctx, 102, RULE_enumMember); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(693); + propertyName(); + setState(696); + _la = _input.LA(1); + if (_la==Assign) { + { + setState(694); + match(Assign); + setState(695); + singleExpression(0); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NamespaceDeclarationContext extends ParserRuleContext { + public TerminalNode Namespace() { return getToken(TypeScriptParser.Namespace, 0); } + public NamespaceNameContext namespaceName() { + return getRuleContext(NamespaceNameContext.class,0); + } + public StatementListContext statementList() { + return getRuleContext(StatementListContext.class,0); + } + public NamespaceDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_namespaceDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterNamespaceDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitNamespaceDeclaration(this); + } + } + + public final NamespaceDeclarationContext namespaceDeclaration() throws RecognitionException { + NamespaceDeclarationContext _localctx = new NamespaceDeclarationContext(_ctx, getState()); + enterRule(_localctx, 104, RULE_namespaceDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(698); + match(Namespace); + setState(699); + namespaceName(); + setState(700); + match(OpenBrace); + setState(702); + switch ( getInterpreter().adaptivePredict(_input,69,_ctx) ) { + case 1: + { + setState(701); + statementList(); + } + break; + } + setState(704); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NamespaceNameContext extends ParserRuleContext { + public List Identifier() { return getTokens(TypeScriptParser.Identifier); } + public TerminalNode Identifier(int i) { + return getToken(TypeScriptParser.Identifier, i); + } + public NamespaceNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_namespaceName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterNamespaceName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitNamespaceName(this); + } + } + + public final NamespaceNameContext namespaceName() throws RecognitionException { + NamespaceNameContext _localctx = new NamespaceNameContext(_ctx, getState()); + enterRule(_localctx, 106, RULE_namespaceName); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(706); + match(Identifier); + setState(715); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,71,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(708); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(707); + match(Dot); + } + } + setState(710); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==Dot ); + setState(712); + match(Identifier); + } + } + } + setState(717); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,71,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImportAliasDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public NamespaceNameContext namespaceName() { + return getRuleContext(NamespaceNameContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public ImportAliasDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_importAliasDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterImportAliasDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitImportAliasDeclaration(this); + } + } + + public final ImportAliasDeclarationContext importAliasDeclaration() throws RecognitionException { + ImportAliasDeclarationContext _localctx = new ImportAliasDeclarationContext(_ctx, getState()); + enterRule(_localctx, 108, RULE_importAliasDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(718); + match(Identifier); + setState(719); + match(Assign); + setState(720); + namespaceName(); + setState(721); + match(SemiColon); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DecoratorListContext extends ParserRuleContext { + public List decorator() { + return getRuleContexts(DecoratorContext.class); + } + public DecoratorContext decorator(int i) { + return getRuleContext(DecoratorContext.class,i); + } + public DecoratorListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_decoratorList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterDecoratorList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitDecoratorList(this); + } + } + + public final DecoratorListContext decoratorList() throws RecognitionException { + DecoratorListContext _localctx = new DecoratorListContext(_ctx, getState()); + enterRule(_localctx, 110, RULE_decoratorList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(724); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(723); + decorator(); + } + } + setState(726); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==At ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DecoratorContext extends ParserRuleContext { + public DecoratorMemberExpressionContext decoratorMemberExpression() { + return getRuleContext(DecoratorMemberExpressionContext.class,0); + } + public DecoratorCallExpressionContext decoratorCallExpression() { + return getRuleContext(DecoratorCallExpressionContext.class,0); + } + public DecoratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_decorator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterDecorator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitDecorator(this); + } + } + + public final DecoratorContext decorator() throws RecognitionException { + DecoratorContext _localctx = new DecoratorContext(_ctx, getState()); + enterRule(_localctx, 112, RULE_decorator); + try { + enterOuterAlt(_localctx, 1); + { + setState(728); + match(At); + setState(731); + switch ( getInterpreter().adaptivePredict(_input,73,_ctx) ) { + case 1: + { + setState(729); + decoratorMemberExpression(0); + } + break; + case 2: + { + setState(730); + decoratorCallExpression(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DecoratorMemberExpressionContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public DecoratorMemberExpressionContext decoratorMemberExpression() { + return getRuleContext(DecoratorMemberExpressionContext.class,0); + } + public IdentifierNameContext identifierName() { + return getRuleContext(IdentifierNameContext.class,0); + } + public DecoratorMemberExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_decoratorMemberExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterDecoratorMemberExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitDecoratorMemberExpression(this); + } + } + + public final DecoratorMemberExpressionContext decoratorMemberExpression() throws RecognitionException { + return decoratorMemberExpression(0); + } + + private DecoratorMemberExpressionContext decoratorMemberExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + DecoratorMemberExpressionContext _localctx = new DecoratorMemberExpressionContext(_ctx, _parentState); + DecoratorMemberExpressionContext _prevctx = _localctx; + int _startState = 114; + enterRecursionRule(_localctx, 114, RULE_decoratorMemberExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(739); + switch (_input.LA(1)) { + case Identifier: + { + setState(734); + match(Identifier); + } + break; + case OpenParen: + { + setState(735); + match(OpenParen); + setState(736); + singleExpression(0); + setState(737); + match(CloseParen); + } + break; + default: + throw new NoViableAltException(this); + } + _ctx.stop = _input.LT(-1); + setState(746); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,75,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new DecoratorMemberExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_decoratorMemberExpression); + setState(741); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(742); + match(Dot); + setState(743); + identifierName(); + } + } + } + setState(748); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,75,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class DecoratorCallExpressionContext extends ParserRuleContext { + public DecoratorMemberExpressionContext decoratorMemberExpression() { + return getRuleContext(DecoratorMemberExpressionContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public DecoratorCallExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_decoratorCallExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterDecoratorCallExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitDecoratorCallExpression(this); + } + } + + public final DecoratorCallExpressionContext decoratorCallExpression() throws RecognitionException { + DecoratorCallExpressionContext _localctx = new DecoratorCallExpressionContext(_ctx, getState()); + enterRule(_localctx, 116, RULE_decoratorCallExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(749); + decoratorMemberExpression(0); + setState(750); + arguments(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ProgramContext extends ParserRuleContext { + public TerminalNode EOF() { return getToken(TypeScriptParser.EOF, 0); } + public SourceElementsContext sourceElements() { + return getRuleContext(SourceElementsContext.class,0); + } + public ProgramContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_program; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterProgram(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitProgram(this); + } + } + + public final ProgramContext program() throws RecognitionException { + ProgramContext _localctx = new ProgramContext(_ctx, getState()); + enterRule(_localctx, 118, RULE_program); + try { + enterOuterAlt(_localctx, 1); + { + setState(753); + switch ( getInterpreter().adaptivePredict(_input,76,_ctx) ) { + case 1: + { + setState(752); + sourceElements(); + } + break; + } + setState(755); + match(EOF); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SourceElementContext extends ParserRuleContext { + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public TerminalNode Export() { return getToken(TypeScriptParser.Export, 0); } + public SourceElementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_sourceElement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterSourceElement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitSourceElement(this); + } + } + + public final SourceElementContext sourceElement() throws RecognitionException { + SourceElementContext _localctx = new SourceElementContext(_ctx, getState()); + enterRule(_localctx, 120, RULE_sourceElement); + try { + enterOuterAlt(_localctx, 1); + { + setState(758); + switch ( getInterpreter().adaptivePredict(_input,77,_ctx) ) { + case 1: + { + setState(757); + match(Export); + } + break; + } + setState(760); + statement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StatementContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public ImportStatementContext importStatement() { + return getRuleContext(ImportStatementContext.class,0); + } + public ExportStatementContext exportStatement() { + return getRuleContext(ExportStatementContext.class,0); + } + public EmptyStatement_Context emptyStatement_() { + return getRuleContext(EmptyStatement_Context.class,0); + } + public AbstractDeclarationContext abstractDeclaration() { + return getRuleContext(AbstractDeclarationContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public NamespaceDeclarationContext namespaceDeclaration() { + return getRuleContext(NamespaceDeclarationContext.class,0); + } + public IfStatementContext ifStatement() { + return getRuleContext(IfStatementContext.class,0); + } + public IterationStatementContext iterationStatement() { + return getRuleContext(IterationStatementContext.class,0); + } + public ContinueStatementContext continueStatement() { + return getRuleContext(ContinueStatementContext.class,0); + } + public BreakStatementContext breakStatement() { + return getRuleContext(BreakStatementContext.class,0); + } + public ReturnStatementContext returnStatement() { + return getRuleContext(ReturnStatementContext.class,0); + } + public YieldStatementContext yieldStatement() { + return getRuleContext(YieldStatementContext.class,0); + } + public WithStatementContext withStatement() { + return getRuleContext(WithStatementContext.class,0); + } + public LabelledStatementContext labelledStatement() { + return getRuleContext(LabelledStatementContext.class,0); + } + public SwitchStatementContext switchStatement() { + return getRuleContext(SwitchStatementContext.class,0); + } + public ThrowStatementContext throwStatement() { + return getRuleContext(ThrowStatementContext.class,0); + } + public TryStatementContext tryStatement() { + return getRuleContext(TryStatementContext.class,0); + } + public DebuggerStatementContext debuggerStatement() { + return getRuleContext(DebuggerStatementContext.class,0); + } + public FunctionDeclarationContext functionDeclaration() { + return getRuleContext(FunctionDeclarationContext.class,0); + } + public ArrowFunctionDeclarationContext arrowFunctionDeclaration() { + return getRuleContext(ArrowFunctionDeclarationContext.class,0); + } + public GeneratorFunctionDeclarationContext generatorFunctionDeclaration() { + return getRuleContext(GeneratorFunctionDeclarationContext.class,0); + } + public VariableStatementContext variableStatement() { + return getRuleContext(VariableStatementContext.class,0); + } + public TypeAliasDeclarationContext typeAliasDeclaration() { + return getRuleContext(TypeAliasDeclarationContext.class,0); + } + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public ExpressionStatementContext expressionStatement() { + return getRuleContext(ExpressionStatementContext.class,0); + } + public TerminalNode Export() { return getToken(TypeScriptParser.Export, 0); } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public StatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitStatement(this); + } + } + + public final StatementContext statement() throws RecognitionException { + StatementContext _localctx = new StatementContext(_ctx, getState()); + enterRule(_localctx, 122, RULE_statement); + try { + setState(791); + switch ( getInterpreter().adaptivePredict(_input,78,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(762); + block(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(763); + importStatement(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(764); + exportStatement(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(765); + emptyStatement_(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(766); + abstractDeclaration(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(767); + classDeclaration(); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(768); + interfaceDeclaration(); + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(769); + namespaceDeclaration(); + } + break; + case 9: + enterOuterAlt(_localctx, 9); + { + setState(770); + ifStatement(); + } + break; + case 10: + enterOuterAlt(_localctx, 10); + { + setState(771); + iterationStatement(); + } + break; + case 11: + enterOuterAlt(_localctx, 11); + { + setState(772); + continueStatement(); + } + break; + case 12: + enterOuterAlt(_localctx, 12); + { + setState(773); + breakStatement(); + } + break; + case 13: + enterOuterAlt(_localctx, 13); + { + setState(774); + returnStatement(); + } + break; + case 14: + enterOuterAlt(_localctx, 14); + { + setState(775); + yieldStatement(); + } + break; + case 15: + enterOuterAlt(_localctx, 15); + { + setState(776); + withStatement(); + } + break; + case 16: + enterOuterAlt(_localctx, 16); + { + setState(777); + labelledStatement(); + } + break; + case 17: + enterOuterAlt(_localctx, 17); + { + setState(778); + switchStatement(); + } + break; + case 18: + enterOuterAlt(_localctx, 18); + { + setState(779); + throwStatement(); + } + break; + case 19: + enterOuterAlt(_localctx, 19); + { + setState(780); + tryStatement(); + } + break; + case 20: + enterOuterAlt(_localctx, 20); + { + setState(781); + debuggerStatement(); + } + break; + case 21: + enterOuterAlt(_localctx, 21); + { + setState(782); + functionDeclaration(); + } + break; + case 22: + enterOuterAlt(_localctx, 22); + { + setState(783); + arrowFunctionDeclaration(); + } + break; + case 23: + enterOuterAlt(_localctx, 23); + { + setState(784); + generatorFunctionDeclaration(); + } + break; + case 24: + enterOuterAlt(_localctx, 24); + { + setState(785); + variableStatement(); + } + break; + case 25: + enterOuterAlt(_localctx, 25); + { + setState(786); + typeAliasDeclaration(); + } + break; + case 26: + enterOuterAlt(_localctx, 26); + { + setState(787); + enumDeclaration(); + } + break; + case 27: + enterOuterAlt(_localctx, 27); + { + setState(788); + expressionStatement(); + } + break; + case 28: + enterOuterAlt(_localctx, 28); + { + setState(789); + match(Export); + setState(790); + statement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BlockContext extends ParserRuleContext { + public StatementListContext statementList() { + return getRuleContext(StatementListContext.class,0); + } + public BlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_block; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitBlock(this); + } + } + + public final BlockContext block() throws RecognitionException { + BlockContext _localctx = new BlockContext(_ctx, getState()); + enterRule(_localctx, 124, RULE_block); + try { + enterOuterAlt(_localctx, 1); + { + setState(793); + match(OpenBrace); + setState(795); + switch ( getInterpreter().adaptivePredict(_input,79,_ctx) ) { + case 1: + { + setState(794); + statementList(); + } + break; + } + setState(797); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StatementListContext extends ParserRuleContext { + public List statement() { + return getRuleContexts(StatementContext.class); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public StatementListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statementList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterStatementList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitStatementList(this); + } + } + + public final StatementListContext statementList() throws RecognitionException { + StatementListContext _localctx = new StatementListContext(_ctx, getState()); + enterRule(_localctx, 126, RULE_statementList); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(800); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(799); + statement(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(802); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,80,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AbstractDeclarationContext extends ParserRuleContext { + public TerminalNode Abstract() { return getToken(TypeScriptParser.Abstract, 0); } + public EosContext eos() { + return getRuleContext(EosContext.class,0); + } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public CallSignatureContext callSignature() { + return getRuleContext(CallSignatureContext.class,0); + } + public VariableStatementContext variableStatement() { + return getRuleContext(VariableStatementContext.class,0); + } + public AbstractDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_abstractDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterAbstractDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitAbstractDeclaration(this); + } + } + + public final AbstractDeclarationContext abstractDeclaration() throws RecognitionException { + AbstractDeclarationContext _localctx = new AbstractDeclarationContext(_ctx, getState()); + enterRule(_localctx, 128, RULE_abstractDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(804); + match(Abstract); + setState(808); + switch ( getInterpreter().adaptivePredict(_input,81,_ctx) ) { + case 1: + { + setState(805); + match(Identifier); + setState(806); + callSignature(); + } + break; + case 2: + { + setState(807); + variableStatement(); + } + break; + } + setState(810); + eos(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImportStatementContext extends ParserRuleContext { + public TerminalNode Import() { return getToken(TypeScriptParser.Import, 0); } + public FromBlockContext fromBlock() { + return getRuleContext(FromBlockContext.class,0); + } + public ImportAliasDeclarationContext importAliasDeclaration() { + return getRuleContext(ImportAliasDeclarationContext.class,0); + } + public ImportStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_importStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterImportStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitImportStatement(this); + } + } + + public final ImportStatementContext importStatement() throws RecognitionException { + ImportStatementContext _localctx = new ImportStatementContext(_ctx, getState()); + enterRule(_localctx, 130, RULE_importStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(812); + match(Import); + setState(815); + switch ( getInterpreter().adaptivePredict(_input,82,_ctx) ) { + case 1: + { + setState(813); + fromBlock(); + } + break; + case 2: + { + setState(814); + importAliasDeclaration(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FromBlockContext extends ParserRuleContext { + public TerminalNode From() { return getToken(TypeScriptParser.From, 0); } + public TerminalNode StringLiteral() { return getToken(TypeScriptParser.StringLiteral, 0); } + public EosContext eos() { + return getRuleContext(EosContext.class,0); + } + public TerminalNode Multiply() { return getToken(TypeScriptParser.Multiply, 0); } + public MultipleImportStatementContext multipleImportStatement() { + return getRuleContext(MultipleImportStatementContext.class,0); + } + public TerminalNode As() { return getToken(TypeScriptParser.As, 0); } + public IdentifierNameContext identifierName() { + return getRuleContext(IdentifierNameContext.class,0); + } + public FromBlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_fromBlock; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterFromBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitFromBlock(this); + } + } + + public final FromBlockContext fromBlock() throws RecognitionException { + FromBlockContext _localctx = new FromBlockContext(_ctx, getState()); + enterRule(_localctx, 132, RULE_fromBlock); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(819); + switch (_input.LA(1)) { + case Multiply: + { + setState(817); + match(Multiply); + } + break; + case OpenBrace: + case NullLiteral: + case BooleanLiteral: + case Break: + case Do: + case Instanceof: + case Typeof: + case Case: + case Else: + case New: + case Var: + case Catch: + case Finally: + case Return: + case Void: + case Continue: + case For: + case Switch: + case While: + case Debugger: + case Function_: + case This: + case With: + case Default: + case If: + case Throw: + case Delete: + case In: + case Try: + case From: + case ReadOnly: + case Async: + case Class: + case Enum: + case Extends: + case Super: + case Const: + case Export: + case Import: + case Implements: + case Let: + case Private: + case Public: + case Interface: + case Package: + case Protected: + case Static: + case Yield: + case Number: + case Boolean: + case String: + case TypeAlias: + case Get: + case Set: + case Require: + case Module: + case Identifier: + { + setState(818); + multipleImportStatement(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(823); + _la = _input.LA(1); + if (_la==As) { + { + setState(821); + match(As); + setState(822); + identifierName(); + } + } + + setState(825); + match(From); + setState(826); + match(StringLiteral); + setState(827); + eos(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MultipleImportStatementContext extends ParserRuleContext { + public List identifierName() { + return getRuleContexts(IdentifierNameContext.class); + } + public IdentifierNameContext identifierName(int i) { + return getRuleContext(IdentifierNameContext.class,i); + } + public MultipleImportStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_multipleImportStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterMultipleImportStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitMultipleImportStatement(this); + } + } + + public final MultipleImportStatementContext multipleImportStatement() throws RecognitionException { + MultipleImportStatementContext _localctx = new MultipleImportStatementContext(_ctx, getState()); + enterRule(_localctx, 134, RULE_multipleImportStatement); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(832); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NullLiteral) | (1L << BooleanLiteral) | (1L << Break) | (1L << Do))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function_ - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)) | (1L << (Number - 64)) | (1L << (Boolean - 64)) | (1L << (String - 64)) | (1L << (TypeAlias - 64)) | (1L << (Get - 64)) | (1L << (Set - 64)) | (1L << (Require - 64)) | (1L << (Module - 64)) | (1L << (Identifier - 64)))) != 0)) { + { + setState(829); + identifierName(); + setState(830); + match(Comma); + } + } + + setState(834); + match(OpenBrace); + setState(835); + identifierName(); + setState(840); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==Comma) { + { + { + setState(836); + match(Comma); + setState(837); + identifierName(); + } + } + setState(842); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(843); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExportStatementContext extends ParserRuleContext { + public TerminalNode Export() { return getToken(TypeScriptParser.Export, 0); } + public FromBlockContext fromBlock() { + return getRuleContext(FromBlockContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public TerminalNode Default() { return getToken(TypeScriptParser.Default, 0); } + public ExportStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_exportStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterExportStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitExportStatement(this); + } + } + + public final ExportStatementContext exportStatement() throws RecognitionException { + ExportStatementContext _localctx = new ExportStatementContext(_ctx, getState()); + enterRule(_localctx, 136, RULE_exportStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(845); + match(Export); + setState(847); + switch ( getInterpreter().adaptivePredict(_input,87,_ctx) ) { + case 1: + { + setState(846); + match(Default); + } + break; + } + setState(851); + switch ( getInterpreter().adaptivePredict(_input,88,_ctx) ) { + case 1: + { + setState(849); + fromBlock(); + } + break; + case 2: + { + setState(850); + statement(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableStatementContext extends ParserRuleContext { + public BindingPatternContext bindingPattern() { + return getRuleContext(BindingPatternContext.class,0); + } + public InitializerContext initializer() { + return getRuleContext(InitializerContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public VariableDeclarationListContext variableDeclarationList() { + return getRuleContext(VariableDeclarationListContext.class,0); + } + public AccessibilityModifierContext accessibilityModifier() { + return getRuleContext(AccessibilityModifierContext.class,0); + } + public VarModifierContext varModifier() { + return getRuleContext(VarModifierContext.class,0); + } + public TerminalNode ReadOnly() { return getToken(TypeScriptParser.ReadOnly, 0); } + public TerminalNode Declare() { return getToken(TypeScriptParser.Declare, 0); } + public VariableStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterVariableStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitVariableStatement(this); + } + } + + public final VariableStatementContext variableStatement() throws RecognitionException { + VariableStatementContext _localctx = new VariableStatementContext(_ctx, getState()); + enterRule(_localctx, 138, RULE_variableStatement); + int _la; + try { + setState(882); + switch ( getInterpreter().adaptivePredict(_input,97,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(853); + bindingPattern(); + setState(855); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(854); + typeAnnotation(); + } + } + + setState(857); + initializer(); + setState(859); + switch ( getInterpreter().adaptivePredict(_input,90,_ctx) ) { + case 1: + { + setState(858); + match(SemiColon); + } + break; + } + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(862); + _la = _input.LA(1); + if (((((_la - 101)) & ~0x3f) == 0 && ((1L << (_la - 101)) & ((1L << (Private - 101)) | (1L << (Public - 101)) | (1L << (Protected - 101)))) != 0)) { + { + setState(861); + accessibilityModifier(); + } + } + + setState(865); + _la = _input.LA(1); + if (((((_la - 69)) & ~0x3f) == 0 && ((1L << (_la - 69)) & ((1L << (Var - 69)) | (1L << (Const - 69)) | (1L << (Let - 69)))) != 0)) { + { + setState(864); + varModifier(); + } + } + + setState(868); + _la = _input.LA(1); + if (_la==ReadOnly) { + { + setState(867); + match(ReadOnly); + } + } + + setState(870); + variableDeclarationList(); + setState(872); + switch ( getInterpreter().adaptivePredict(_input,94,_ctx) ) { + case 1: + { + setState(871); + match(SemiColon); + } + break; + } + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(874); + match(Declare); + setState(876); + _la = _input.LA(1); + if (((((_la - 69)) & ~0x3f) == 0 && ((1L << (_la - 69)) & ((1L << (Var - 69)) | (1L << (Const - 69)) | (1L << (Let - 69)))) != 0)) { + { + setState(875); + varModifier(); + } + } + + setState(878); + variableDeclarationList(); + setState(880); + switch ( getInterpreter().adaptivePredict(_input,96,_ctx) ) { + case 1: + { + setState(879); + match(SemiColon); + } + break; + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclarationListContext extends ParserRuleContext { + public List variableDeclaration() { + return getRuleContexts(VariableDeclarationContext.class); + } + public VariableDeclarationContext variableDeclaration(int i) { + return getRuleContext(VariableDeclarationContext.class,i); + } + public VariableDeclarationListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclarationList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterVariableDeclarationList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitVariableDeclarationList(this); + } + } + + public final VariableDeclarationListContext variableDeclarationList() throws RecognitionException { + VariableDeclarationListContext _localctx = new VariableDeclarationListContext(_ctx, getState()); + enterRule(_localctx, 140, RULE_variableDeclarationList); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(884); + variableDeclaration(); + setState(889); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,98,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(885); + match(Comma); + setState(886); + variableDeclaration(); + } + } + } + setState(891); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,98,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclarationContext extends ParserRuleContext { + public IdentifierOrKeyWordContext identifierOrKeyWord() { + return getRuleContext(IdentifierOrKeyWordContext.class,0); + } + public ArrayLiteralContext arrayLiteral() { + return getRuleContext(ArrayLiteralContext.class,0); + } + public ObjectLiteralContext objectLiteral() { + return getRuleContext(ObjectLiteralContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public VariableDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterVariableDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitVariableDeclaration(this); + } + } + + public final VariableDeclarationContext variableDeclaration() throws RecognitionException { + VariableDeclarationContext _localctx = new VariableDeclarationContext(_ctx, getState()); + enterRule(_localctx, 142, RULE_variableDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(895); + switch (_input.LA(1)) { + case TypeAlias: + case Require: + case Identifier: + { + setState(892); + identifierOrKeyWord(); + } + break; + case OpenBracket: + { + setState(893); + arrayLiteral(); + } + break; + case OpenBrace: + { + setState(894); + objectLiteral(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(898); + switch ( getInterpreter().adaptivePredict(_input,100,_ctx) ) { + case 1: + { + setState(897); + typeAnnotation(); + } + break; + } + setState(901); + switch ( getInterpreter().adaptivePredict(_input,101,_ctx) ) { + case 1: + { + setState(900); + singleExpression(0); + } + break; + } + setState(908); + switch ( getInterpreter().adaptivePredict(_input,103,_ctx) ) { + case 1: + { + setState(903); + match(Assign); + setState(905); + switch ( getInterpreter().adaptivePredict(_input,102,_ctx) ) { + case 1: + { + setState(904); + typeParameters(); + } + break; + } + setState(907); + singleExpression(0); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EmptyStatement_Context extends ParserRuleContext { + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public EmptyStatement_Context(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_emptyStatement_; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterEmptyStatement_(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitEmptyStatement_(this); + } + } + + public final EmptyStatement_Context emptyStatement_() throws RecognitionException { + EmptyStatement_Context _localctx = new EmptyStatement_Context(_ctx, getState()); + enterRule(_localctx, 144, RULE_emptyStatement_); + try { + enterOuterAlt(_localctx, 1); + { + setState(910); + match(SemiColon); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionStatementContext extends ParserRuleContext { + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public ExpressionStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expressionStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterExpressionStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitExpressionStatement(this); + } + } + + public final ExpressionStatementContext expressionStatement() throws RecognitionException { + ExpressionStatementContext _localctx = new ExpressionStatementContext(_ctx, getState()); + enterRule(_localctx, 146, RULE_expressionStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(912); + if (!(this.notOpenBraceAndNotFunction())) throw new FailedPredicateException(this, "this.notOpenBraceAndNotFunction()"); + setState(913); + expressionSequence(); + setState(915); + switch ( getInterpreter().adaptivePredict(_input,104,_ctx) ) { + case 1: + { + setState(914); + match(SemiColon); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IfStatementContext extends ParserRuleContext { + public TerminalNode If() { return getToken(TypeScriptParser.If, 0); } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public List statement() { + return getRuleContexts(StatementContext.class); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public TerminalNode Else() { return getToken(TypeScriptParser.Else, 0); } + public IfStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_ifStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIfStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIfStatement(this); + } + } + + public final IfStatementContext ifStatement() throws RecognitionException { + IfStatementContext _localctx = new IfStatementContext(_ctx, getState()); + enterRule(_localctx, 148, RULE_ifStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(917); + match(If); + setState(918); + match(OpenParen); + setState(919); + expressionSequence(); + setState(920); + match(CloseParen); + setState(921); + statement(); + setState(924); + switch ( getInterpreter().adaptivePredict(_input,105,_ctx) ) { + case 1: + { + setState(922); + match(Else); + setState(923); + statement(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IterationStatementContext extends ParserRuleContext { + public IterationStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_iterationStatement; } + + public IterationStatementContext() { } + public void copyFrom(IterationStatementContext ctx) { + super.copyFrom(ctx); + } + } + public static class DoStatementContext extends IterationStatementContext { + public TerminalNode Do() { return getToken(TypeScriptParser.Do, 0); } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public TerminalNode While() { return getToken(TypeScriptParser.While, 0); } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public EosContext eos() { + return getRuleContext(EosContext.class,0); + } + public DoStatementContext(IterationStatementContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterDoStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitDoStatement(this); + } + } + public static class ForVarStatementContext extends IterationStatementContext { + public TerminalNode For() { return getToken(TypeScriptParser.For, 0); } + public VarModifierContext varModifier() { + return getRuleContext(VarModifierContext.class,0); + } + public VariableDeclarationListContext variableDeclarationList() { + return getRuleContext(VariableDeclarationListContext.class,0); + } + public List SemiColon() { return getTokens(TypeScriptParser.SemiColon); } + public TerminalNode SemiColon(int i) { + return getToken(TypeScriptParser.SemiColon, i); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public List expressionSequence() { + return getRuleContexts(ExpressionSequenceContext.class); + } + public ExpressionSequenceContext expressionSequence(int i) { + return getRuleContext(ExpressionSequenceContext.class,i); + } + public ForVarStatementContext(IterationStatementContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterForVarStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitForVarStatement(this); + } + } + public static class ForVarInStatementContext extends IterationStatementContext { + public TerminalNode For() { return getToken(TypeScriptParser.For, 0); } + public VarModifierContext varModifier() { + return getRuleContext(VarModifierContext.class,0); + } + public VariableDeclarationContext variableDeclaration() { + return getRuleContext(VariableDeclarationContext.class,0); + } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public TerminalNode In() { return getToken(TypeScriptParser.In, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public ForVarInStatementContext(IterationStatementContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterForVarInStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitForVarInStatement(this); + } + } + public static class WhileStatementContext extends IterationStatementContext { + public TerminalNode While() { return getToken(TypeScriptParser.While, 0); } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public WhileStatementContext(IterationStatementContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterWhileStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitWhileStatement(this); + } + } + public static class ForStatementContext extends IterationStatementContext { + public TerminalNode For() { return getToken(TypeScriptParser.For, 0); } + public List SemiColon() { return getTokens(TypeScriptParser.SemiColon); } + public TerminalNode SemiColon(int i) { + return getToken(TypeScriptParser.SemiColon, i); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public List expressionSequence() { + return getRuleContexts(ExpressionSequenceContext.class); + } + public ExpressionSequenceContext expressionSequence(int i) { + return getRuleContext(ExpressionSequenceContext.class,i); + } + public ForStatementContext(IterationStatementContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterForStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitForStatement(this); + } + } + public static class ForInStatementContext extends IterationStatementContext { + public TerminalNode For() { return getToken(TypeScriptParser.For, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public TerminalNode In() { return getToken(TypeScriptParser.In, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public ForInStatementContext(IterationStatementContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterForInStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitForInStatement(this); + } + } + + public final IterationStatementContext iterationStatement() throws RecognitionException { + IterationStatementContext _localctx = new IterationStatementContext(_ctx, getState()); + enterRule(_localctx, 150, RULE_iterationStatement); + int _la; + try { + setState(995); + switch ( getInterpreter().adaptivePredict(_input,113,_ctx) ) { + case 1: + _localctx = new DoStatementContext(_localctx); + enterOuterAlt(_localctx, 1); + { + setState(926); + match(Do); + setState(927); + statement(); + setState(928); + match(While); + setState(929); + match(OpenParen); + setState(930); + expressionSequence(); + setState(931); + match(CloseParen); + setState(932); + eos(); + } + break; + case 2: + _localctx = new WhileStatementContext(_localctx); + enterOuterAlt(_localctx, 2); + { + setState(934); + match(While); + setState(935); + match(OpenParen); + setState(936); + expressionSequence(); + setState(937); + match(CloseParen); + setState(938); + statement(); + } + break; + case 3: + _localctx = new ForStatementContext(_localctx); + enterOuterAlt(_localctx, 3); + { + setState(940); + match(For); + setState(941); + match(OpenParen); + setState(943); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << RegularExpressionLiteral) | (1L << OpenBracket) | (1L << OpenParen) | (1L << OpenBrace) | (1L << PlusPlus) | (1L << MinusMinus) | (1L << Plus) | (1L << Minus) | (1L << BitNot) | (1L << Not) | (1L << LessThan) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << DecimalLiteral) | (1L << HexIntegerLiteral) | (1L << OctalIntegerLiteral) | (1L << OctalIntegerLiteral2) | (1L << BinaryIntegerLiteral) | (1L << Break) | (1L << Do))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function_ - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)) | (1L << (Number - 64)) | (1L << (Boolean - 64)) | (1L << (String - 64)) | (1L << (TypeAlias - 64)) | (1L << (Get - 64)) | (1L << (Set - 64)) | (1L << (Require - 64)) | (1L << (Module - 64)) | (1L << (Identifier - 64)) | (1L << (StringLiteral - 64)) | (1L << (BackTick - 64)))) != 0)) { + { + setState(942); + expressionSequence(); + } + } + + setState(945); + match(SemiColon); + setState(947); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << RegularExpressionLiteral) | (1L << OpenBracket) | (1L << OpenParen) | (1L << OpenBrace) | (1L << PlusPlus) | (1L << MinusMinus) | (1L << Plus) | (1L << Minus) | (1L << BitNot) | (1L << Not) | (1L << LessThan) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << DecimalLiteral) | (1L << HexIntegerLiteral) | (1L << OctalIntegerLiteral) | (1L << OctalIntegerLiteral2) | (1L << BinaryIntegerLiteral) | (1L << Break) | (1L << Do))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function_ - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)) | (1L << (Number - 64)) | (1L << (Boolean - 64)) | (1L << (String - 64)) | (1L << (TypeAlias - 64)) | (1L << (Get - 64)) | (1L << (Set - 64)) | (1L << (Require - 64)) | (1L << (Module - 64)) | (1L << (Identifier - 64)) | (1L << (StringLiteral - 64)) | (1L << (BackTick - 64)))) != 0)) { + { + setState(946); + expressionSequence(); + } + } + + setState(949); + match(SemiColon); + setState(951); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << RegularExpressionLiteral) | (1L << OpenBracket) | (1L << OpenParen) | (1L << OpenBrace) | (1L << PlusPlus) | (1L << MinusMinus) | (1L << Plus) | (1L << Minus) | (1L << BitNot) | (1L << Not) | (1L << LessThan) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << DecimalLiteral) | (1L << HexIntegerLiteral) | (1L << OctalIntegerLiteral) | (1L << OctalIntegerLiteral2) | (1L << BinaryIntegerLiteral) | (1L << Break) | (1L << Do))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function_ - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)) | (1L << (Number - 64)) | (1L << (Boolean - 64)) | (1L << (String - 64)) | (1L << (TypeAlias - 64)) | (1L << (Get - 64)) | (1L << (Set - 64)) | (1L << (Require - 64)) | (1L << (Module - 64)) | (1L << (Identifier - 64)) | (1L << (StringLiteral - 64)) | (1L << (BackTick - 64)))) != 0)) { + { + setState(950); + expressionSequence(); + } + } + + setState(953); + match(CloseParen); + setState(954); + statement(); + } + break; + case 4: + _localctx = new ForVarStatementContext(_localctx); + enterOuterAlt(_localctx, 4); + { + setState(955); + match(For); + setState(956); + match(OpenParen); + setState(957); + varModifier(); + setState(958); + variableDeclarationList(); + setState(959); + match(SemiColon); + setState(961); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << RegularExpressionLiteral) | (1L << OpenBracket) | (1L << OpenParen) | (1L << OpenBrace) | (1L << PlusPlus) | (1L << MinusMinus) | (1L << Plus) | (1L << Minus) | (1L << BitNot) | (1L << Not) | (1L << LessThan) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << DecimalLiteral) | (1L << HexIntegerLiteral) | (1L << OctalIntegerLiteral) | (1L << OctalIntegerLiteral2) | (1L << BinaryIntegerLiteral) | (1L << Break) | (1L << Do))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function_ - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)) | (1L << (Number - 64)) | (1L << (Boolean - 64)) | (1L << (String - 64)) | (1L << (TypeAlias - 64)) | (1L << (Get - 64)) | (1L << (Set - 64)) | (1L << (Require - 64)) | (1L << (Module - 64)) | (1L << (Identifier - 64)) | (1L << (StringLiteral - 64)) | (1L << (BackTick - 64)))) != 0)) { + { + setState(960); + expressionSequence(); + } + } + + setState(963); + match(SemiColon); + setState(965); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << RegularExpressionLiteral) | (1L << OpenBracket) | (1L << OpenParen) | (1L << OpenBrace) | (1L << PlusPlus) | (1L << MinusMinus) | (1L << Plus) | (1L << Minus) | (1L << BitNot) | (1L << Not) | (1L << LessThan) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << DecimalLiteral) | (1L << HexIntegerLiteral) | (1L << OctalIntegerLiteral) | (1L << OctalIntegerLiteral2) | (1L << BinaryIntegerLiteral) | (1L << Break) | (1L << Do))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function_ - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)) | (1L << (Number - 64)) | (1L << (Boolean - 64)) | (1L << (String - 64)) | (1L << (TypeAlias - 64)) | (1L << (Get - 64)) | (1L << (Set - 64)) | (1L << (Require - 64)) | (1L << (Module - 64)) | (1L << (Identifier - 64)) | (1L << (StringLiteral - 64)) | (1L << (BackTick - 64)))) != 0)) { + { + setState(964); + expressionSequence(); + } + } + + setState(967); + match(CloseParen); + setState(968); + statement(); + } + break; + case 5: + _localctx = new ForInStatementContext(_localctx); + enterOuterAlt(_localctx, 5); + { + setState(970); + match(For); + setState(971); + match(OpenParen); + setState(972); + singleExpression(0); + setState(976); + switch (_input.LA(1)) { + case In: + { + setState(973); + match(In); + } + break; + case Identifier: + { + setState(974); + match(Identifier); + setState(975); + if (!(this.p("of"))) throw new FailedPredicateException(this, "this.p(\"of\")"); + } + break; + default: + throw new NoViableAltException(this); + } + setState(978); + expressionSequence(); + setState(979); + match(CloseParen); + setState(980); + statement(); + } + break; + case 6: + _localctx = new ForVarInStatementContext(_localctx); + enterOuterAlt(_localctx, 6); + { + setState(982); + match(For); + setState(983); + match(OpenParen); + setState(984); + varModifier(); + setState(985); + variableDeclaration(); + setState(989); + switch (_input.LA(1)) { + case In: + { + setState(986); + match(In); + } + break; + case Identifier: + { + setState(987); + match(Identifier); + setState(988); + if (!(this.p("of"))) throw new FailedPredicateException(this, "this.p(\"of\")"); + } + break; + default: + throw new NoViableAltException(this); + } + setState(991); + expressionSequence(); + setState(992); + match(CloseParen); + setState(993); + statement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VarModifierContext extends ParserRuleContext { + public TerminalNode Var() { return getToken(TypeScriptParser.Var, 0); } + public TerminalNode Let() { return getToken(TypeScriptParser.Let, 0); } + public TerminalNode Const() { return getToken(TypeScriptParser.Const, 0); } + public VarModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_varModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterVarModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitVarModifier(this); + } + } + + public final VarModifierContext varModifier() throws RecognitionException { + VarModifierContext _localctx = new VarModifierContext(_ctx, getState()); + enterRule(_localctx, 152, RULE_varModifier); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(997); + _la = _input.LA(1); + if ( !(((((_la - 69)) & ~0x3f) == 0 && ((1L << (_la - 69)) & ((1L << (Var - 69)) | (1L << (Const - 69)) | (1L << (Let - 69)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ContinueStatementContext extends ParserRuleContext { + public TerminalNode Continue() { return getToken(TypeScriptParser.Continue, 0); } + public EosContext eos() { + return getRuleContext(EosContext.class,0); + } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public ContinueStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_continueStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterContinueStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitContinueStatement(this); + } + } + + public final ContinueStatementContext continueStatement() throws RecognitionException { + ContinueStatementContext _localctx = new ContinueStatementContext(_ctx, getState()); + enterRule(_localctx, 154, RULE_continueStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(999); + match(Continue); + setState(1002); + switch ( getInterpreter().adaptivePredict(_input,114,_ctx) ) { + case 1: + { + setState(1000); + if (!(this.notLineTerminator())) throw new FailedPredicateException(this, "this.notLineTerminator()"); + setState(1001); + match(Identifier); + } + break; + } + setState(1004); + eos(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BreakStatementContext extends ParserRuleContext { + public TerminalNode Break() { return getToken(TypeScriptParser.Break, 0); } + public EosContext eos() { + return getRuleContext(EosContext.class,0); + } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public BreakStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_breakStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterBreakStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitBreakStatement(this); + } + } + + public final BreakStatementContext breakStatement() throws RecognitionException { + BreakStatementContext _localctx = new BreakStatementContext(_ctx, getState()); + enterRule(_localctx, 156, RULE_breakStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1006); + match(Break); + setState(1009); + switch ( getInterpreter().adaptivePredict(_input,115,_ctx) ) { + case 1: + { + setState(1007); + if (!(this.notLineTerminator())) throw new FailedPredicateException(this, "this.notLineTerminator()"); + setState(1008); + match(Identifier); + } + break; + } + setState(1011); + eos(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ReturnStatementContext extends ParserRuleContext { + public TerminalNode Return() { return getToken(TypeScriptParser.Return, 0); } + public EosContext eos() { + return getRuleContext(EosContext.class,0); + } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public ReturnStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_returnStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterReturnStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitReturnStatement(this); + } + } + + public final ReturnStatementContext returnStatement() throws RecognitionException { + ReturnStatementContext _localctx = new ReturnStatementContext(_ctx, getState()); + enterRule(_localctx, 158, RULE_returnStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1013); + match(Return); + setState(1016); + switch ( getInterpreter().adaptivePredict(_input,116,_ctx) ) { + case 1: + { + setState(1014); + if (!(this.notLineTerminator())) throw new FailedPredicateException(this, "this.notLineTerminator()"); + setState(1015); + expressionSequence(); + } + break; + } + setState(1018); + eos(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class YieldStatementContext extends ParserRuleContext { + public TerminalNode Yield() { return getToken(TypeScriptParser.Yield, 0); } + public EosContext eos() { + return getRuleContext(EosContext.class,0); + } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public YieldStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_yieldStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterYieldStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitYieldStatement(this); + } + } + + public final YieldStatementContext yieldStatement() throws RecognitionException { + YieldStatementContext _localctx = new YieldStatementContext(_ctx, getState()); + enterRule(_localctx, 160, RULE_yieldStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1020); + match(Yield); + setState(1023); + switch ( getInterpreter().adaptivePredict(_input,117,_ctx) ) { + case 1: + { + setState(1021); + if (!(this.notLineTerminator())) throw new FailedPredicateException(this, "this.notLineTerminator()"); + setState(1022); + expressionSequence(); + } + break; + } + setState(1025); + eos(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class WithStatementContext extends ParserRuleContext { + public TerminalNode With() { return getToken(TypeScriptParser.With, 0); } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public WithStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_withStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterWithStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitWithStatement(this); + } + } + + public final WithStatementContext withStatement() throws RecognitionException { + WithStatementContext _localctx = new WithStatementContext(_ctx, getState()); + enterRule(_localctx, 162, RULE_withStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1027); + match(With); + setState(1028); + match(OpenParen); + setState(1029); + expressionSequence(); + setState(1030); + match(CloseParen); + setState(1031); + statement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SwitchStatementContext extends ParserRuleContext { + public TerminalNode Switch() { return getToken(TypeScriptParser.Switch, 0); } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public CaseBlockContext caseBlock() { + return getRuleContext(CaseBlockContext.class,0); + } + public SwitchStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_switchStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterSwitchStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitSwitchStatement(this); + } + } + + public final SwitchStatementContext switchStatement() throws RecognitionException { + SwitchStatementContext _localctx = new SwitchStatementContext(_ctx, getState()); + enterRule(_localctx, 164, RULE_switchStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1033); + match(Switch); + setState(1034); + match(OpenParen); + setState(1035); + expressionSequence(); + setState(1036); + match(CloseParen); + setState(1037); + caseBlock(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CaseBlockContext extends ParserRuleContext { + public List caseClauses() { + return getRuleContexts(CaseClausesContext.class); + } + public CaseClausesContext caseClauses(int i) { + return getRuleContext(CaseClausesContext.class,i); + } + public DefaultClauseContext defaultClause() { + return getRuleContext(DefaultClauseContext.class,0); + } + public CaseBlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_caseBlock; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterCaseBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitCaseBlock(this); + } + } + + public final CaseBlockContext caseBlock() throws RecognitionException { + CaseBlockContext _localctx = new CaseBlockContext(_ctx, getState()); + enterRule(_localctx, 166, RULE_caseBlock); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1039); + match(OpenBrace); + setState(1041); + _la = _input.LA(1); + if (_la==Case) { + { + setState(1040); + caseClauses(); + } + } + + setState(1047); + _la = _input.LA(1); + if (_la==Default) { + { + setState(1043); + defaultClause(); + setState(1045); + _la = _input.LA(1); + if (_la==Case) { + { + setState(1044); + caseClauses(); + } + } + + } + } + + setState(1049); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CaseClausesContext extends ParserRuleContext { + public List caseClause() { + return getRuleContexts(CaseClauseContext.class); + } + public CaseClauseContext caseClause(int i) { + return getRuleContext(CaseClauseContext.class,i); + } + public CaseClausesContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_caseClauses; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterCaseClauses(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitCaseClauses(this); + } + } + + public final CaseClausesContext caseClauses() throws RecognitionException { + CaseClausesContext _localctx = new CaseClausesContext(_ctx, getState()); + enterRule(_localctx, 168, RULE_caseClauses); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1052); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(1051); + caseClause(); + } + } + setState(1054); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==Case ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CaseClauseContext extends ParserRuleContext { + public TerminalNode Case() { return getToken(TypeScriptParser.Case, 0); } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public StatementListContext statementList() { + return getRuleContext(StatementListContext.class,0); + } + public CaseClauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_caseClause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterCaseClause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitCaseClause(this); + } + } + + public final CaseClauseContext caseClause() throws RecognitionException { + CaseClauseContext _localctx = new CaseClauseContext(_ctx, getState()); + enterRule(_localctx, 170, RULE_caseClause); + try { + enterOuterAlt(_localctx, 1); + { + setState(1056); + match(Case); + setState(1057); + expressionSequence(); + setState(1058); + match(Colon); + setState(1060); + switch ( getInterpreter().adaptivePredict(_input,122,_ctx) ) { + case 1: + { + setState(1059); + statementList(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DefaultClauseContext extends ParserRuleContext { + public TerminalNode Default() { return getToken(TypeScriptParser.Default, 0); } + public StatementListContext statementList() { + return getRuleContext(StatementListContext.class,0); + } + public DefaultClauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_defaultClause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterDefaultClause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitDefaultClause(this); + } + } + + public final DefaultClauseContext defaultClause() throws RecognitionException { + DefaultClauseContext _localctx = new DefaultClauseContext(_ctx, getState()); + enterRule(_localctx, 172, RULE_defaultClause); + try { + enterOuterAlt(_localctx, 1); + { + setState(1062); + match(Default); + setState(1063); + match(Colon); + setState(1065); + switch ( getInterpreter().adaptivePredict(_input,123,_ctx) ) { + case 1: + { + setState(1064); + statementList(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LabelledStatementContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public LabelledStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_labelledStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterLabelledStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitLabelledStatement(this); + } + } + + public final LabelledStatementContext labelledStatement() throws RecognitionException { + LabelledStatementContext _localctx = new LabelledStatementContext(_ctx, getState()); + enterRule(_localctx, 174, RULE_labelledStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1067); + match(Identifier); + setState(1068); + match(Colon); + setState(1069); + statement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ThrowStatementContext extends ParserRuleContext { + public TerminalNode Throw() { return getToken(TypeScriptParser.Throw, 0); } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public EosContext eos() { + return getRuleContext(EosContext.class,0); + } + public ThrowStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_throwStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterThrowStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitThrowStatement(this); + } + } + + public final ThrowStatementContext throwStatement() throws RecognitionException { + ThrowStatementContext _localctx = new ThrowStatementContext(_ctx, getState()); + enterRule(_localctx, 176, RULE_throwStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1071); + match(Throw); + setState(1072); + if (!(this.notLineTerminator())) throw new FailedPredicateException(this, "this.notLineTerminator()"); + setState(1073); + expressionSequence(); + setState(1074); + eos(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TryStatementContext extends ParserRuleContext { + public TerminalNode Try() { return getToken(TypeScriptParser.Try, 0); } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public CatchProductionContext catchProduction() { + return getRuleContext(CatchProductionContext.class,0); + } + public FinallyProductionContext finallyProduction() { + return getRuleContext(FinallyProductionContext.class,0); + } + public TryStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_tryStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTryStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTryStatement(this); + } + } + + public final TryStatementContext tryStatement() throws RecognitionException { + TryStatementContext _localctx = new TryStatementContext(_ctx, getState()); + enterRule(_localctx, 178, RULE_tryStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1076); + match(Try); + setState(1077); + block(); + setState(1083); + switch (_input.LA(1)) { + case Catch: + { + setState(1078); + catchProduction(); + setState(1080); + switch ( getInterpreter().adaptivePredict(_input,124,_ctx) ) { + case 1: + { + setState(1079); + finallyProduction(); + } + break; + } + } + break; + case Finally: + { + setState(1082); + finallyProduction(); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CatchProductionContext extends ParserRuleContext { + public TerminalNode Catch() { return getToken(TypeScriptParser.Catch, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public CatchProductionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_catchProduction; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterCatchProduction(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitCatchProduction(this); + } + } + + public final CatchProductionContext catchProduction() throws RecognitionException { + CatchProductionContext _localctx = new CatchProductionContext(_ctx, getState()); + enterRule(_localctx, 180, RULE_catchProduction); + try { + enterOuterAlt(_localctx, 1); + { + setState(1085); + match(Catch); + setState(1086); + match(OpenParen); + setState(1087); + match(Identifier); + setState(1088); + match(CloseParen); + setState(1089); + block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FinallyProductionContext extends ParserRuleContext { + public TerminalNode Finally() { return getToken(TypeScriptParser.Finally, 0); } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public FinallyProductionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_finallyProduction; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterFinallyProduction(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitFinallyProduction(this); + } + } + + public final FinallyProductionContext finallyProduction() throws RecognitionException { + FinallyProductionContext _localctx = new FinallyProductionContext(_ctx, getState()); + enterRule(_localctx, 182, RULE_finallyProduction); + try { + enterOuterAlt(_localctx, 1); + { + setState(1091); + match(Finally); + setState(1092); + block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DebuggerStatementContext extends ParserRuleContext { + public TerminalNode Debugger() { return getToken(TypeScriptParser.Debugger, 0); } + public EosContext eos() { + return getRuleContext(EosContext.class,0); + } + public DebuggerStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_debuggerStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterDebuggerStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitDebuggerStatement(this); + } + } + + public final DebuggerStatementContext debuggerStatement() throws RecognitionException { + DebuggerStatementContext _localctx = new DebuggerStatementContext(_ctx, getState()); + enterRule(_localctx, 184, RULE_debuggerStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1094); + match(Debugger); + setState(1095); + eos(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionDeclarationContext extends ParserRuleContext { + public TerminalNode Function_() { return getToken(TypeScriptParser.Function_, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public CallSignatureContext callSignature() { + return getRuleContext(CallSignatureContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public FunctionDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterFunctionDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitFunctionDeclaration(this); + } + } + + public final FunctionDeclarationContext functionDeclaration() throws RecognitionException { + FunctionDeclarationContext _localctx = new FunctionDeclarationContext(_ctx, getState()); + enterRule(_localctx, 186, RULE_functionDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(1097); + match(Function_); + setState(1098); + match(Identifier); + setState(1099); + callSignature(); + setState(1105); + switch (_input.LA(1)) { + case OpenBrace: + { + { + setState(1100); + match(OpenBrace); + setState(1101); + functionBody(); + setState(1102); + match(CloseBrace); + } + } + break; + case SemiColon: + { + setState(1104); + match(SemiColon); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassDeclarationContext extends ParserRuleContext { + public TerminalNode Class() { return getToken(TypeScriptParser.Class, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public ClassHeritageContext classHeritage() { + return getRuleContext(ClassHeritageContext.class,0); + } + public ClassTailContext classTail() { + return getRuleContext(ClassTailContext.class,0); + } + public DecoratorListContext decoratorList() { + return getRuleContext(DecoratorListContext.class,0); + } + public TerminalNode Export() { return getToken(TypeScriptParser.Export, 0); } + public TerminalNode Abstract() { return getToken(TypeScriptParser.Abstract, 0); } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public TerminalNode Default() { return getToken(TypeScriptParser.Default, 0); } + public ClassDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterClassDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitClassDeclaration(this); + } + } + + public final ClassDeclarationContext classDeclaration() throws RecognitionException { + ClassDeclarationContext _localctx = new ClassDeclarationContext(_ctx, getState()); + enterRule(_localctx, 188, RULE_classDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1108); + _la = _input.LA(1); + if (_la==At) { + { + setState(1107); + decoratorList(); + } + } + + setState(1114); + _la = _input.LA(1); + if (_la==Export) { + { + setState(1110); + match(Export); + setState(1112); + _la = _input.LA(1); + if (_la==Default) { + { + setState(1111); + match(Default); + } + } + + } + } + + setState(1117); + _la = _input.LA(1); + if (_la==Abstract) { + { + setState(1116); + match(Abstract); + } + } + + setState(1119); + match(Class); + setState(1120); + match(Identifier); + setState(1122); + _la = _input.LA(1); + if (_la==LessThan) { + { + setState(1121); + typeParameters(); + } + } + + setState(1124); + classHeritage(); + setState(1125); + classTail(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassHeritageContext extends ParserRuleContext { + public ClassExtendsClauseContext classExtendsClause() { + return getRuleContext(ClassExtendsClauseContext.class,0); + } + public ImplementsClauseContext implementsClause() { + return getRuleContext(ImplementsClauseContext.class,0); + } + public ClassHeritageContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classHeritage; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterClassHeritage(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitClassHeritage(this); + } + } + + public final ClassHeritageContext classHeritage() throws RecognitionException { + ClassHeritageContext _localctx = new ClassHeritageContext(_ctx, getState()); + enterRule(_localctx, 190, RULE_classHeritage); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1128); + _la = _input.LA(1); + if (_la==Extends) { + { + setState(1127); + classExtendsClause(); + } + } + + setState(1131); + _la = _input.LA(1); + if (_la==Implements) { + { + setState(1130); + implementsClause(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassTailContext extends ParserRuleContext { + public List classElement() { + return getRuleContexts(ClassElementContext.class); + } + public ClassElementContext classElement(int i) { + return getRuleContext(ClassElementContext.class,i); + } + public ClassTailContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classTail; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterClassTail(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitClassTail(this); + } + } + + public final ClassTailContext classTail() throws RecognitionException { + ClassTailContext _localctx = new ClassTailContext(_ctx, getState()); + enterRule(_localctx, 192, RULE_classTail); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1133); + match(OpenBrace); + setState(1137); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,134,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1134); + classElement(); + } + } + } + setState(1139); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,134,_ctx); + } + setState(1140); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassExtendsClauseContext extends ParserRuleContext { + public TerminalNode Extends() { return getToken(TypeScriptParser.Extends, 0); } + public TypeReferenceContext typeReference() { + return getRuleContext(TypeReferenceContext.class,0); + } + public ClassExtendsClauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classExtendsClause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterClassExtendsClause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitClassExtendsClause(this); + } + } + + public final ClassExtendsClauseContext classExtendsClause() throws RecognitionException { + ClassExtendsClauseContext _localctx = new ClassExtendsClauseContext(_ctx, getState()); + enterRule(_localctx, 194, RULE_classExtendsClause); + try { + enterOuterAlt(_localctx, 1); + { + setState(1142); + match(Extends); + setState(1143); + typeReference(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImplementsClauseContext extends ParserRuleContext { + public TerminalNode Implements() { return getToken(TypeScriptParser.Implements, 0); } + public ClassOrInterfaceTypeListContext classOrInterfaceTypeList() { + return getRuleContext(ClassOrInterfaceTypeListContext.class,0); + } + public ImplementsClauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_implementsClause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterImplementsClause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitImplementsClause(this); + } + } + + public final ImplementsClauseContext implementsClause() throws RecognitionException { + ImplementsClauseContext _localctx = new ImplementsClauseContext(_ctx, getState()); + enterRule(_localctx, 196, RULE_implementsClause); + try { + enterOuterAlt(_localctx, 1); + { + setState(1145); + match(Implements); + setState(1146); + classOrInterfaceTypeList(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassElementContext extends ParserRuleContext { + public ConstructorDeclarationContext constructorDeclaration() { + return getRuleContext(ConstructorDeclarationContext.class,0); + } + public PropertyMemberDeclarationContext propertyMemberDeclaration() { + return getRuleContext(PropertyMemberDeclarationContext.class,0); + } + public DecoratorListContext decoratorList() { + return getRuleContext(DecoratorListContext.class,0); + } + public IndexMemberDeclarationContext indexMemberDeclaration() { + return getRuleContext(IndexMemberDeclarationContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public ClassElementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classElement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterClassElement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitClassElement(this); + } + } + + public final ClassElementContext classElement() throws RecognitionException { + ClassElementContext _localctx = new ClassElementContext(_ctx, getState()); + enterRule(_localctx, 198, RULE_classElement); + int _la; + try { + setState(1155); + switch ( getInterpreter().adaptivePredict(_input,136,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1148); + constructorDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1150); + _la = _input.LA(1); + if (_la==At) { + { + setState(1149); + decoratorList(); + } + } + + setState(1152); + propertyMemberDeclaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1153); + indexMemberDeclaration(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(1154); + statement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PropertyMemberDeclarationContext extends ParserRuleContext { + public PropertyMemberDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_propertyMemberDeclaration; } + + public PropertyMemberDeclarationContext() { } + public void copyFrom(PropertyMemberDeclarationContext ctx) { + super.copyFrom(ctx); + } + } + public static class PropertyDeclarationExpressionContext extends PropertyMemberDeclarationContext { + public PropertyMemberBaseContext propertyMemberBase() { + return getRuleContext(PropertyMemberBaseContext.class,0); + } + public PropertyNameContext propertyName() { + return getRuleContext(PropertyNameContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public InitializerContext initializer() { + return getRuleContext(InitializerContext.class,0); + } + public PropertyDeclarationExpressionContext(PropertyMemberDeclarationContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPropertyDeclarationExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPropertyDeclarationExpression(this); + } + } + public static class MethodDeclarationExpressionContext extends PropertyMemberDeclarationContext { + public PropertyMemberBaseContext propertyMemberBase() { + return getRuleContext(PropertyMemberBaseContext.class,0); + } + public PropertyNameContext propertyName() { + return getRuleContext(PropertyNameContext.class,0); + } + public CallSignatureContext callSignature() { + return getRuleContext(CallSignatureContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public MethodDeclarationExpressionContext(PropertyMemberDeclarationContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterMethodDeclarationExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitMethodDeclarationExpression(this); + } + } + public static class GetterSetterDeclarationExpressionContext extends PropertyMemberDeclarationContext { + public PropertyMemberBaseContext propertyMemberBase() { + return getRuleContext(PropertyMemberBaseContext.class,0); + } + public GetAccessorContext getAccessor() { + return getRuleContext(GetAccessorContext.class,0); + } + public SetAccessorContext setAccessor() { + return getRuleContext(SetAccessorContext.class,0); + } + public GetterSetterDeclarationExpressionContext(PropertyMemberDeclarationContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGetterSetterDeclarationExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGetterSetterDeclarationExpression(this); + } + } + public static class AbstractMemberDeclarationContext extends PropertyMemberDeclarationContext { + public AbstractDeclarationContext abstractDeclaration() { + return getRuleContext(AbstractDeclarationContext.class,0); + } + public AbstractMemberDeclarationContext(PropertyMemberDeclarationContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterAbstractMemberDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitAbstractMemberDeclaration(this); + } + } + + public final PropertyMemberDeclarationContext propertyMemberDeclaration() throws RecognitionException { + PropertyMemberDeclarationContext _localctx = new PropertyMemberDeclarationContext(_ctx, getState()); + enterRule(_localctx, 200, RULE_propertyMemberDeclaration); + int _la; + try { + setState(1186); + switch ( getInterpreter().adaptivePredict(_input,142,_ctx) ) { + case 1: + _localctx = new PropertyDeclarationExpressionContext(_localctx); + enterOuterAlt(_localctx, 1); + { + setState(1157); + propertyMemberBase(); + setState(1158); + propertyName(); + setState(1160); + _la = _input.LA(1); + if (_la==QuestionMark) { + { + setState(1159); + match(QuestionMark); + } + } + + setState(1163); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(1162); + typeAnnotation(); + } + } + + setState(1166); + _la = _input.LA(1); + if (_la==Assign) { + { + setState(1165); + initializer(); + } + } + + setState(1168); + match(SemiColon); + } + break; + case 2: + _localctx = new MethodDeclarationExpressionContext(_localctx); + enterOuterAlt(_localctx, 2); + { + setState(1170); + propertyMemberBase(); + setState(1171); + propertyName(); + setState(1172); + callSignature(); + setState(1178); + switch (_input.LA(1)) { + case OpenBrace: + { + { + setState(1173); + match(OpenBrace); + setState(1174); + functionBody(); + setState(1175); + match(CloseBrace); + } + } + break; + case SemiColon: + { + setState(1177); + match(SemiColon); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + case 3: + _localctx = new GetterSetterDeclarationExpressionContext(_localctx); + enterOuterAlt(_localctx, 3); + { + setState(1180); + propertyMemberBase(); + setState(1183); + switch (_input.LA(1)) { + case Get: + { + setState(1181); + getAccessor(); + } + break; + case Set: + { + setState(1182); + setAccessor(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + case 4: + _localctx = new AbstractMemberDeclarationContext(_localctx); + enterOuterAlt(_localctx, 4); + { + setState(1185); + abstractDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PropertyMemberBaseContext extends ParserRuleContext { + public AccessibilityModifierContext accessibilityModifier() { + return getRuleContext(AccessibilityModifierContext.class,0); + } + public TerminalNode Async() { return getToken(TypeScriptParser.Async, 0); } + public TerminalNode Static() { return getToken(TypeScriptParser.Static, 0); } + public TerminalNode ReadOnly() { return getToken(TypeScriptParser.ReadOnly, 0); } + public PropertyMemberBaseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_propertyMemberBase; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPropertyMemberBase(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPropertyMemberBase(this); + } + } + + public final PropertyMemberBaseContext propertyMemberBase() throws RecognitionException { + PropertyMemberBaseContext _localctx = new PropertyMemberBaseContext(_ctx, getState()); + enterRule(_localctx, 202, RULE_propertyMemberBase); + try { + enterOuterAlt(_localctx, 1); + { + setState(1189); + switch ( getInterpreter().adaptivePredict(_input,143,_ctx) ) { + case 1: + { + setState(1188); + accessibilityModifier(); + } + break; + } + setState(1192); + switch ( getInterpreter().adaptivePredict(_input,144,_ctx) ) { + case 1: + { + setState(1191); + match(Async); + } + break; + } + setState(1195); + switch ( getInterpreter().adaptivePredict(_input,145,_ctx) ) { + case 1: + { + setState(1194); + match(Static); + } + break; + } + setState(1198); + switch ( getInterpreter().adaptivePredict(_input,146,_ctx) ) { + case 1: + { + setState(1197); + match(ReadOnly); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IndexMemberDeclarationContext extends ParserRuleContext { + public IndexSignatureContext indexSignature() { + return getRuleContext(IndexSignatureContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public IndexMemberDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_indexMemberDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIndexMemberDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIndexMemberDeclaration(this); + } + } + + public final IndexMemberDeclarationContext indexMemberDeclaration() throws RecognitionException { + IndexMemberDeclarationContext _localctx = new IndexMemberDeclarationContext(_ctx, getState()); + enterRule(_localctx, 204, RULE_indexMemberDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(1200); + indexSignature(); + setState(1201); + match(SemiColon); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GeneratorMethodContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public GeneratorMethodContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_generatorMethod; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGeneratorMethod(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGeneratorMethod(this); + } + } + + public final GeneratorMethodContext generatorMethod() throws RecognitionException { + GeneratorMethodContext _localctx = new GeneratorMethodContext(_ctx, getState()); + enterRule(_localctx, 206, RULE_generatorMethod); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1204); + _la = _input.LA(1); + if (_la==Multiply) { + { + setState(1203); + match(Multiply); + } + } + + setState(1206); + match(Identifier); + setState(1207); + match(OpenParen); + setState(1209); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis))) != 0) || ((((_la - 101)) & ~0x3f) == 0 && ((1L << (_la - 101)) & ((1L << (Private - 101)) | (1L << (Public - 101)) | (1L << (Protected - 101)) | (1L << (TypeAlias - 101)) | (1L << (Require - 101)) | (1L << (At - 101)) | (1L << (Identifier - 101)))) != 0)) { + { + setState(1208); + formalParameterList(); + } + } + + setState(1211); + match(CloseParen); + setState(1212); + match(OpenBrace); + setState(1213); + functionBody(); + setState(1214); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GeneratorFunctionDeclarationContext extends ParserRuleContext { + public TerminalNode Function_() { return getToken(TypeScriptParser.Function_, 0); } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public GeneratorFunctionDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_generatorFunctionDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGeneratorFunctionDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGeneratorFunctionDeclaration(this); + } + } + + public final GeneratorFunctionDeclarationContext generatorFunctionDeclaration() throws RecognitionException { + GeneratorFunctionDeclarationContext _localctx = new GeneratorFunctionDeclarationContext(_ctx, getState()); + enterRule(_localctx, 208, RULE_generatorFunctionDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1216); + match(Function_); + setState(1217); + match(Multiply); + setState(1219); + _la = _input.LA(1); + if (_la==Identifier) { + { + setState(1218); + match(Identifier); + } + } + + setState(1221); + match(OpenParen); + setState(1223); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis))) != 0) || ((((_la - 101)) & ~0x3f) == 0 && ((1L << (_la - 101)) & ((1L << (Private - 101)) | (1L << (Public - 101)) | (1L << (Protected - 101)) | (1L << (TypeAlias - 101)) | (1L << (Require - 101)) | (1L << (At - 101)) | (1L << (Identifier - 101)))) != 0)) { + { + setState(1222); + formalParameterList(); + } + } + + setState(1225); + match(CloseParen); + setState(1226); + match(OpenBrace); + setState(1227); + functionBody(); + setState(1228); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GeneratorBlockContext extends ParserRuleContext { + public List generatorDefinition() { + return getRuleContexts(GeneratorDefinitionContext.class); + } + public GeneratorDefinitionContext generatorDefinition(int i) { + return getRuleContext(GeneratorDefinitionContext.class,i); + } + public GeneratorBlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_generatorBlock; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGeneratorBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGeneratorBlock(this); + } + } + + public final GeneratorBlockContext generatorBlock() throws RecognitionException { + GeneratorBlockContext _localctx = new GeneratorBlockContext(_ctx, getState()); + enterRule(_localctx, 210, RULE_generatorBlock); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1230); + match(OpenBrace); + setState(1231); + generatorDefinition(); + setState(1236); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,151,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1232); + match(Comma); + setState(1233); + generatorDefinition(); + } + } + } + setState(1238); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,151,_ctx); + } + setState(1240); + _la = _input.LA(1); + if (_la==Comma) { + { + setState(1239); + match(Comma); + } + } + + setState(1242); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GeneratorDefinitionContext extends ParserRuleContext { + public IteratorDefinitionContext iteratorDefinition() { + return getRuleContext(IteratorDefinitionContext.class,0); + } + public GeneratorDefinitionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_generatorDefinition; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGeneratorDefinition(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGeneratorDefinition(this); + } + } + + public final GeneratorDefinitionContext generatorDefinition() throws RecognitionException { + GeneratorDefinitionContext _localctx = new GeneratorDefinitionContext(_ctx, getState()); + enterRule(_localctx, 212, RULE_generatorDefinition); + try { + enterOuterAlt(_localctx, 1); + { + setState(1244); + match(Multiply); + setState(1245); + iteratorDefinition(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IteratorBlockContext extends ParserRuleContext { + public List iteratorDefinition() { + return getRuleContexts(IteratorDefinitionContext.class); + } + public IteratorDefinitionContext iteratorDefinition(int i) { + return getRuleContext(IteratorDefinitionContext.class,i); + } + public IteratorBlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_iteratorBlock; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIteratorBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIteratorBlock(this); + } + } + + public final IteratorBlockContext iteratorBlock() throws RecognitionException { + IteratorBlockContext _localctx = new IteratorBlockContext(_ctx, getState()); + enterRule(_localctx, 214, RULE_iteratorBlock); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1247); + match(OpenBrace); + setState(1248); + iteratorDefinition(); + setState(1253); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,153,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1249); + match(Comma); + setState(1250); + iteratorDefinition(); + } + } + } + setState(1255); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,153,_ctx); + } + setState(1257); + _la = _input.LA(1); + if (_la==Comma) { + { + setState(1256); + match(Comma); + } + } + + setState(1259); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IteratorDefinitionContext extends ParserRuleContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public IteratorDefinitionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_iteratorDefinition; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIteratorDefinition(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIteratorDefinition(this); + } + } + + public final IteratorDefinitionContext iteratorDefinition() throws RecognitionException { + IteratorDefinitionContext _localctx = new IteratorDefinitionContext(_ctx, getState()); + enterRule(_localctx, 216, RULE_iteratorDefinition); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1261); + match(OpenBracket); + setState(1262); + singleExpression(0); + setState(1263); + match(CloseBracket); + setState(1264); + match(OpenParen); + setState(1266); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis))) != 0) || ((((_la - 101)) & ~0x3f) == 0 && ((1L << (_la - 101)) & ((1L << (Private - 101)) | (1L << (Public - 101)) | (1L << (Protected - 101)) | (1L << (TypeAlias - 101)) | (1L << (Require - 101)) | (1L << (At - 101)) | (1L << (Identifier - 101)))) != 0)) { + { + setState(1265); + formalParameterList(); + } + } + + setState(1268); + match(CloseParen); + setState(1269); + match(OpenBrace); + setState(1270); + functionBody(); + setState(1271); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParameterListContext extends ParserRuleContext { + public List formalParameterArg() { + return getRuleContexts(FormalParameterArgContext.class); + } + public FormalParameterArgContext formalParameterArg(int i) { + return getRuleContext(FormalParameterArgContext.class,i); + } + public LastFormalParameterArgContext lastFormalParameterArg() { + return getRuleContext(LastFormalParameterArgContext.class,0); + } + public ArrayLiteralContext arrayLiteral() { + return getRuleContext(ArrayLiteralContext.class,0); + } + public ObjectLiteralContext objectLiteral() { + return getRuleContext(ObjectLiteralContext.class,0); + } + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public FormalParameterListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameterList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterFormalParameterList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitFormalParameterList(this); + } + } + + public final FormalParameterListContext formalParameterList() throws RecognitionException { + FormalParameterListContext _localctx = new FormalParameterListContext(_ctx, getState()); + enterRule(_localctx, 218, RULE_formalParameterList); + int _la; + try { + int _alt; + setState(1292); + switch (_input.LA(1)) { + case Private: + case Public: + case Protected: + case TypeAlias: + case Require: + case At: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(1273); + formalParameterArg(); + setState(1278); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,156,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1274); + match(Comma); + setState(1275); + formalParameterArg(); + } + } + } + setState(1280); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,156,_ctx); + } + setState(1283); + _la = _input.LA(1); + if (_la==Comma) { + { + setState(1281); + match(Comma); + setState(1282); + lastFormalParameterArg(); + } + } + + } + break; + case Ellipsis: + enterOuterAlt(_localctx, 2); + { + setState(1285); + lastFormalParameterArg(); + } + break; + case OpenBracket: + enterOuterAlt(_localctx, 3); + { + setState(1286); + arrayLiteral(); + } + break; + case OpenBrace: + enterOuterAlt(_localctx, 4); + { + setState(1287); + objectLiteral(); + setState(1290); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(1288); + match(Colon); + setState(1289); + formalParameterList(); + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParameterArgContext extends ParserRuleContext { + public IdentifierOrKeyWordContext identifierOrKeyWord() { + return getRuleContext(IdentifierOrKeyWordContext.class,0); + } + public DecoratorContext decorator() { + return getRuleContext(DecoratorContext.class,0); + } + public AccessibilityModifierContext accessibilityModifier() { + return getRuleContext(AccessibilityModifierContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public FormalParameterArgContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameterArg; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterFormalParameterArg(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitFormalParameterArg(this); + } + } + + public final FormalParameterArgContext formalParameterArg() throws RecognitionException { + FormalParameterArgContext _localctx = new FormalParameterArgContext(_ctx, getState()); + enterRule(_localctx, 220, RULE_formalParameterArg); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1295); + _la = _input.LA(1); + if (_la==At) { + { + setState(1294); + decorator(); + } + } + + setState(1298); + _la = _input.LA(1); + if (((((_la - 101)) & ~0x3f) == 0 && ((1L << (_la - 101)) & ((1L << (Private - 101)) | (1L << (Public - 101)) | (1L << (Protected - 101)))) != 0)) { + { + setState(1297); + accessibilityModifier(); + } + } + + setState(1300); + identifierOrKeyWord(); + setState(1302); + _la = _input.LA(1); + if (_la==QuestionMark) { + { + setState(1301); + match(QuestionMark); + } + } + + setState(1305); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(1304); + typeAnnotation(); + } + } + + setState(1309); + _la = _input.LA(1); + if (_la==Assign) { + { + setState(1307); + match(Assign); + setState(1308); + singleExpression(0); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LastFormalParameterArgContext extends ParserRuleContext { + public TerminalNode Ellipsis() { return getToken(TypeScriptParser.Ellipsis, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public LastFormalParameterArgContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lastFormalParameterArg; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterLastFormalParameterArg(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitLastFormalParameterArg(this); + } + } + + public final LastFormalParameterArgContext lastFormalParameterArg() throws RecognitionException { + LastFormalParameterArgContext _localctx = new LastFormalParameterArgContext(_ctx, getState()); + enterRule(_localctx, 222, RULE_lastFormalParameterArg); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1311); + match(Ellipsis); + setState(1312); + match(Identifier); + setState(1314); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(1313); + typeAnnotation(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionBodyContext extends ParserRuleContext { + public SourceElementsContext sourceElements() { + return getRuleContext(SourceElementsContext.class,0); + } + public FunctionBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterFunctionBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitFunctionBody(this); + } + } + + public final FunctionBodyContext functionBody() throws RecognitionException { + FunctionBodyContext _localctx = new FunctionBodyContext(_ctx, getState()); + enterRule(_localctx, 224, RULE_functionBody); + try { + enterOuterAlt(_localctx, 1); + { + setState(1317); + switch ( getInterpreter().adaptivePredict(_input,166,_ctx) ) { + case 1: + { + setState(1316); + sourceElements(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SourceElementsContext extends ParserRuleContext { + public List sourceElement() { + return getRuleContexts(SourceElementContext.class); + } + public SourceElementContext sourceElement(int i) { + return getRuleContext(SourceElementContext.class,i); + } + public SourceElementsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_sourceElements; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterSourceElements(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitSourceElements(this); + } + } + + public final SourceElementsContext sourceElements() throws RecognitionException { + SourceElementsContext _localctx = new SourceElementsContext(_ctx, getState()); + enterRule(_localctx, 226, RULE_sourceElements); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1320); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(1319); + sourceElement(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(1322); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,167,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayLiteralContext extends ParserRuleContext { + public ElementListContext elementList() { + return getRuleContext(ElementListContext.class,0); + } + public ArrayLiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayLiteral; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArrayLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArrayLiteral(this); + } + } + + public final ArrayLiteralContext arrayLiteral() throws RecognitionException { + ArrayLiteralContext _localctx = new ArrayLiteralContext(_ctx, getState()); + enterRule(_localctx, 228, RULE_arrayLiteral); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + { + setState(1324); + match(OpenBracket); + setState(1326); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << RegularExpressionLiteral) | (1L << OpenBracket) | (1L << OpenParen) | (1L << OpenBrace) | (1L << Ellipsis) | (1L << PlusPlus) | (1L << MinusMinus) | (1L << Plus) | (1L << Minus) | (1L << BitNot) | (1L << Not) | (1L << LessThan) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << DecimalLiteral) | (1L << HexIntegerLiteral) | (1L << OctalIntegerLiteral) | (1L << OctalIntegerLiteral2) | (1L << BinaryIntegerLiteral) | (1L << Break) | (1L << Do))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function_ - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)) | (1L << (Number - 64)) | (1L << (Boolean - 64)) | (1L << (String - 64)) | (1L << (TypeAlias - 64)) | (1L << (Get - 64)) | (1L << (Set - 64)) | (1L << (Require - 64)) | (1L << (Module - 64)) | (1L << (Identifier - 64)) | (1L << (StringLiteral - 64)) | (1L << (BackTick - 64)))) != 0)) { + { + setState(1325); + elementList(); + } + } + + setState(1328); + match(CloseBracket); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementListContext extends ParserRuleContext { + public List arrayElement() { + return getRuleContexts(ArrayElementContext.class); + } + public ArrayElementContext arrayElement(int i) { + return getRuleContext(ArrayElementContext.class,i); + } + public ElementListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterElementList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitElementList(this); + } + } + + public final ElementListContext elementList() throws RecognitionException { + ElementListContext _localctx = new ElementListContext(_ctx, getState()); + enterRule(_localctx, 230, RULE_elementList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1330); + arrayElement(); + setState(1339); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==Comma) { + { + { + setState(1332); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(1331); + match(Comma); + } + } + setState(1334); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==Comma ); + setState(1336); + arrayElement(); + } + } + setState(1341); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayElementContext extends ParserRuleContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public TerminalNode Ellipsis() { return getToken(TypeScriptParser.Ellipsis, 0); } + public ArrayElementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayElement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArrayElement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArrayElement(this); + } + } + + public final ArrayElementContext arrayElement() throws RecognitionException { + ArrayElementContext _localctx = new ArrayElementContext(_ctx, getState()); + enterRule(_localctx, 232, RULE_arrayElement); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1343); + _la = _input.LA(1); + if (_la==Ellipsis) { + { + setState(1342); + match(Ellipsis); + } + } + + setState(1347); + switch ( getInterpreter().adaptivePredict(_input,172,_ctx) ) { + case 1: + { + setState(1345); + singleExpression(0); + } + break; + case 2: + { + setState(1346); + match(Identifier); + } + break; + } + setState(1350); + switch ( getInterpreter().adaptivePredict(_input,173,_ctx) ) { + case 1: + { + setState(1349); + match(Comma); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ObjectLiteralContext extends ParserRuleContext { + public List propertyAssignment() { + return getRuleContexts(PropertyAssignmentContext.class); + } + public PropertyAssignmentContext propertyAssignment(int i) { + return getRuleContext(PropertyAssignmentContext.class,i); + } + public ObjectLiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_objectLiteral; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterObjectLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitObjectLiteral(this); + } + } + + public final ObjectLiteralContext objectLiteral() throws RecognitionException { + ObjectLiteralContext _localctx = new ObjectLiteralContext(_ctx, getState()); + enterRule(_localctx, 234, RULE_objectLiteral); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1352); + match(OpenBrace); + setState(1364); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << Ellipsis) | (1L << Multiply) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << DecimalLiteral) | (1L << HexIntegerLiteral) | (1L << OctalIntegerLiteral) | (1L << OctalIntegerLiteral2) | (1L << BinaryIntegerLiteral) | (1L << Break) | (1L << Do))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function_ - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)) | (1L << (Number - 64)) | (1L << (Boolean - 64)) | (1L << (String - 64)) | (1L << (TypeAlias - 64)) | (1L << (Get - 64)) | (1L << (Set - 64)) | (1L << (Require - 64)) | (1L << (Module - 64)) | (1L << (Identifier - 64)) | (1L << (StringLiteral - 64)))) != 0)) { + { + setState(1353); + propertyAssignment(); + setState(1358); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,174,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1354); + match(Comma); + setState(1355); + propertyAssignment(); + } + } + } + setState(1360); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,174,_ctx); + } + setState(1362); + _la = _input.LA(1); + if (_la==Comma) { + { + setState(1361); + match(Comma); + } + } + + } + } + + setState(1366); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PropertyAssignmentContext extends ParserRuleContext { + public PropertyAssignmentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_propertyAssignment; } + + public PropertyAssignmentContext() { } + public void copyFrom(PropertyAssignmentContext ctx) { + super.copyFrom(ctx); + } + } + public static class PropertyExpressionAssignmentContext extends PropertyAssignmentContext { + public PropertyNameContext propertyName() { + return getRuleContext(PropertyNameContext.class,0); + } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public PropertyExpressionAssignmentContext(PropertyAssignmentContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPropertyExpressionAssignment(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPropertyExpressionAssignment(this); + } + } + public static class ComputedPropertyExpressionAssignmentContext extends PropertyAssignmentContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public ComputedPropertyExpressionAssignmentContext(PropertyAssignmentContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterComputedPropertyExpressionAssignment(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitComputedPropertyExpressionAssignment(this); + } + } + public static class PropertyShorthandContext extends PropertyAssignmentContext { + public IdentifierOrKeyWordContext identifierOrKeyWord() { + return getRuleContext(IdentifierOrKeyWordContext.class,0); + } + public PropertyShorthandContext(PropertyAssignmentContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPropertyShorthand(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPropertyShorthand(this); + } + } + public static class PropertySetterContext extends PropertyAssignmentContext { + public SetAccessorContext setAccessor() { + return getRuleContext(SetAccessorContext.class,0); + } + public PropertySetterContext(PropertyAssignmentContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPropertySetter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPropertySetter(this); + } + } + public static class PropertyGetterContext extends PropertyAssignmentContext { + public GetAccessorContext getAccessor() { + return getRuleContext(GetAccessorContext.class,0); + } + public PropertyGetterContext(PropertyAssignmentContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPropertyGetter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPropertyGetter(this); + } + } + public static class RestParameterInObjectContext extends PropertyAssignmentContext { + public RestParameterContext restParameter() { + return getRuleContext(RestParameterContext.class,0); + } + public RestParameterInObjectContext(PropertyAssignmentContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterRestParameterInObject(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitRestParameterInObject(this); + } + } + public static class MethodPropertyContext extends PropertyAssignmentContext { + public GeneratorMethodContext generatorMethod() { + return getRuleContext(GeneratorMethodContext.class,0); + } + public MethodPropertyContext(PropertyAssignmentContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterMethodProperty(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitMethodProperty(this); + } + } + + public final PropertyAssignmentContext propertyAssignment() throws RecognitionException { + PropertyAssignmentContext _localctx = new PropertyAssignmentContext(_ctx, getState()); + enterRule(_localctx, 236, RULE_propertyAssignment); + int _la; + try { + setState(1383); + switch ( getInterpreter().adaptivePredict(_input,177,_ctx) ) { + case 1: + _localctx = new PropertyExpressionAssignmentContext(_localctx); + enterOuterAlt(_localctx, 1); + { + setState(1368); + propertyName(); + setState(1369); + _la = _input.LA(1); + if ( !(_la==Assign || _la==Colon) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(1370); + singleExpression(0); + } + break; + case 2: + _localctx = new ComputedPropertyExpressionAssignmentContext(_localctx); + enterOuterAlt(_localctx, 2); + { + setState(1372); + match(OpenBracket); + setState(1373); + singleExpression(0); + setState(1374); + match(CloseBracket); + setState(1375); + match(Colon); + setState(1376); + singleExpression(0); + } + break; + case 3: + _localctx = new PropertyGetterContext(_localctx); + enterOuterAlt(_localctx, 3); + { + setState(1378); + getAccessor(); + } + break; + case 4: + _localctx = new PropertySetterContext(_localctx); + enterOuterAlt(_localctx, 4); + { + setState(1379); + setAccessor(); + } + break; + case 5: + _localctx = new MethodPropertyContext(_localctx); + enterOuterAlt(_localctx, 5); + { + setState(1380); + generatorMethod(); + } + break; + case 6: + _localctx = new PropertyShorthandContext(_localctx); + enterOuterAlt(_localctx, 6); + { + setState(1381); + identifierOrKeyWord(); + } + break; + case 7: + _localctx = new RestParameterInObjectContext(_localctx); + enterOuterAlt(_localctx, 7); + { + setState(1382); + restParameter(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GetAccessorContext extends ParserRuleContext { + public GetterContext getter() { + return getRuleContext(GetterContext.class,0); + } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public GetAccessorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_getAccessor; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGetAccessor(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGetAccessor(this); + } + } + + public final GetAccessorContext getAccessor() throws RecognitionException { + GetAccessorContext _localctx = new GetAccessorContext(_ctx, getState()); + enterRule(_localctx, 238, RULE_getAccessor); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1385); + getter(); + setState(1386); + match(OpenParen); + setState(1387); + match(CloseParen); + setState(1389); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(1388); + typeAnnotation(); + } + } + + setState(1391); + match(OpenBrace); + setState(1392); + functionBody(); + setState(1393); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SetAccessorContext extends ParserRuleContext { + public SetterContext setter() { + return getRuleContext(SetterContext.class,0); + } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public BindingPatternContext bindingPattern() { + return getRuleContext(BindingPatternContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public SetAccessorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_setAccessor; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterSetAccessor(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitSetAccessor(this); + } + } + + public final SetAccessorContext setAccessor() throws RecognitionException { + SetAccessorContext _localctx = new SetAccessorContext(_ctx, getState()); + enterRule(_localctx, 240, RULE_setAccessor); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1395); + setter(); + setState(1396); + match(OpenParen); + setState(1399); + switch (_input.LA(1)) { + case Identifier: + { + setState(1397); + match(Identifier); + } + break; + case OpenBracket: + case OpenBrace: + { + setState(1398); + bindingPattern(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(1402); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(1401); + typeAnnotation(); + } + } + + setState(1404); + match(CloseParen); + setState(1405); + match(OpenBrace); + setState(1406); + functionBody(); + setState(1407); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PropertyNameContext extends ParserRuleContext { + public IdentifierNameContext identifierName() { + return getRuleContext(IdentifierNameContext.class,0); + } + public TerminalNode StringLiteral() { return getToken(TypeScriptParser.StringLiteral, 0); } + public NumericLiteralContext numericLiteral() { + return getRuleContext(NumericLiteralContext.class,0); + } + public PropertyNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_propertyName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPropertyName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPropertyName(this); + } + } + + public final PropertyNameContext propertyName() throws RecognitionException { + PropertyNameContext _localctx = new PropertyNameContext(_ctx, getState()); + enterRule(_localctx, 242, RULE_propertyName); + try { + setState(1412); + switch (_input.LA(1)) { + case NullLiteral: + case BooleanLiteral: + case Break: + case Do: + case Instanceof: + case Typeof: + case Case: + case Else: + case New: + case Var: + case Catch: + case Finally: + case Return: + case Void: + case Continue: + case For: + case Switch: + case While: + case Debugger: + case Function_: + case This: + case With: + case Default: + case If: + case Throw: + case Delete: + case In: + case Try: + case From: + case ReadOnly: + case Async: + case Class: + case Enum: + case Extends: + case Super: + case Const: + case Export: + case Import: + case Implements: + case Let: + case Private: + case Public: + case Interface: + case Package: + case Protected: + case Static: + case Yield: + case Number: + case Boolean: + case String: + case TypeAlias: + case Get: + case Set: + case Require: + case Module: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(1409); + identifierName(); + } + break; + case StringLiteral: + enterOuterAlt(_localctx, 2); + { + setState(1410); + match(StringLiteral); + } + break; + case DecimalLiteral: + case HexIntegerLiteral: + case OctalIntegerLiteral: + case OctalIntegerLiteral2: + case BinaryIntegerLiteral: + enterOuterAlt(_localctx, 3); + { + setState(1411); + numericLiteral(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArgumentsContext extends ParserRuleContext { + public ArgumentListContext argumentList() { + return getRuleContext(ArgumentListContext.class,0); + } + public ArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArguments(this); + } + } + + public final ArgumentsContext arguments() throws RecognitionException { + ArgumentsContext _localctx = new ArgumentsContext(_ctx, getState()); + enterRule(_localctx, 244, RULE_arguments); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1414); + match(OpenParen); + setState(1419); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << RegularExpressionLiteral) | (1L << OpenBracket) | (1L << OpenParen) | (1L << OpenBrace) | (1L << Ellipsis) | (1L << PlusPlus) | (1L << MinusMinus) | (1L << Plus) | (1L << Minus) | (1L << BitNot) | (1L << Not) | (1L << LessThan) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << DecimalLiteral) | (1L << HexIntegerLiteral) | (1L << OctalIntegerLiteral) | (1L << OctalIntegerLiteral2) | (1L << BinaryIntegerLiteral) | (1L << Break) | (1L << Do))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function_ - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)) | (1L << (Number - 64)) | (1L << (Boolean - 64)) | (1L << (String - 64)) | (1L << (TypeAlias - 64)) | (1L << (Get - 64)) | (1L << (Set - 64)) | (1L << (Require - 64)) | (1L << (Module - 64)) | (1L << (Identifier - 64)) | (1L << (StringLiteral - 64)) | (1L << (BackTick - 64)))) != 0)) { + { + setState(1415); + argumentList(); + setState(1417); + _la = _input.LA(1); + if (_la==Comma) { + { + setState(1416); + match(Comma); + } + } + + } + } + + setState(1421); + match(CloseParen); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArgumentListContext extends ParserRuleContext { + public List argument() { + return getRuleContexts(ArgumentContext.class); + } + public ArgumentContext argument(int i) { + return getRuleContext(ArgumentContext.class,i); + } + public ArgumentListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_argumentList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArgumentList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArgumentList(this); + } + } + + public final ArgumentListContext argumentList() throws RecognitionException { + ArgumentListContext _localctx = new ArgumentListContext(_ctx, getState()); + enterRule(_localctx, 246, RULE_argumentList); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1423); + argument(); + setState(1428); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,184,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1424); + match(Comma); + setState(1425); + argument(); + } + } + } + setState(1430); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,184,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArgumentContext extends ParserRuleContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public TerminalNode Ellipsis() { return getToken(TypeScriptParser.Ellipsis, 0); } + public ArgumentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_argument; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArgument(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArgument(this); + } + } + + public final ArgumentContext argument() throws RecognitionException { + ArgumentContext _localctx = new ArgumentContext(_ctx, getState()); + enterRule(_localctx, 248, RULE_argument); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1432); + _la = _input.LA(1); + if (_la==Ellipsis) { + { + setState(1431); + match(Ellipsis); + } + } + + setState(1436); + switch ( getInterpreter().adaptivePredict(_input,186,_ctx) ) { + case 1: + { + setState(1434); + singleExpression(0); + } + break; + case 2: + { + setState(1435); + match(Identifier); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionSequenceContext extends ParserRuleContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public ExpressionSequenceContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expressionSequence; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterExpressionSequence(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitExpressionSequence(this); + } + } + + public final ExpressionSequenceContext expressionSequence() throws RecognitionException { + ExpressionSequenceContext _localctx = new ExpressionSequenceContext(_ctx, getState()); + enterRule(_localctx, 250, RULE_expressionSequence); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1438); + singleExpression(0); + setState(1443); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,187,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1439); + match(Comma); + setState(1440); + singleExpression(0); + } + } + } + setState(1445); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,187,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionExpressionDeclarationContext extends ParserRuleContext { + public TerminalNode Function_() { return getToken(TypeScriptParser.Function_, 0); } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public FunctionExpressionDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionExpressionDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterFunctionExpressionDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitFunctionExpressionDeclaration(this); + } + } + + public final FunctionExpressionDeclarationContext functionExpressionDeclaration() throws RecognitionException { + FunctionExpressionDeclarationContext _localctx = new FunctionExpressionDeclarationContext(_ctx, getState()); + enterRule(_localctx, 252, RULE_functionExpressionDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1446); + match(Function_); + setState(1448); + _la = _input.LA(1); + if (_la==Identifier) { + { + setState(1447); + match(Identifier); + } + } + + setState(1450); + match(OpenParen); + setState(1452); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis))) != 0) || ((((_la - 101)) & ~0x3f) == 0 && ((1L << (_la - 101)) & ((1L << (Private - 101)) | (1L << (Public - 101)) | (1L << (Protected - 101)) | (1L << (TypeAlias - 101)) | (1L << (Require - 101)) | (1L << (At - 101)) | (1L << (Identifier - 101)))) != 0)) { + { + setState(1451); + formalParameterList(); + } + } + + setState(1454); + match(CloseParen); + setState(1456); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(1455); + typeAnnotation(); + } + } + + setState(1458); + match(OpenBrace); + setState(1459); + functionBody(); + setState(1460); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SingleExpressionContext extends ParserRuleContext { + public SingleExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_singleExpression; } + + public SingleExpressionContext() { } + public void copyFrom(SingleExpressionContext ctx) { + super.copyFrom(ctx); + } + } + public static class TemplateStringExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TemplateStringLiteralContext templateStringLiteral() { + return getRuleContext(TemplateStringLiteralContext.class,0); + } + public TemplateStringExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTemplateStringExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTemplateStringExpression(this); + } + } + public static class TernaryExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TernaryExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTernaryExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTernaryExpression(this); + } + } + public static class LogicalAndExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public LogicalAndExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterLogicalAndExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitLogicalAndExpression(this); + } + } + public static class GeneratorsExpressionContext extends SingleExpressionContext { + public GeneratorBlockContext generatorBlock() { + return getRuleContext(GeneratorBlockContext.class,0); + } + public GeneratorsExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGeneratorsExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGeneratorsExpression(this); + } + } + public static class PreIncrementExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public PreIncrementExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPreIncrementExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPreIncrementExpression(this); + } + } + public static class ObjectLiteralExpressionContext extends SingleExpressionContext { + public ObjectLiteralContext objectLiteral() { + return getRuleContext(ObjectLiteralContext.class,0); + } + public ObjectLiteralExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterObjectLiteralExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitObjectLiteralExpression(this); + } + } + public static class InExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode In() { return getToken(TypeScriptParser.In, 0); } + public InExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterInExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitInExpression(this); + } + } + public static class LogicalOrExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public LogicalOrExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterLogicalOrExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitLogicalOrExpression(this); + } + } + public static class GenericTypesContext extends SingleExpressionContext { + public TypeArgumentsContext typeArguments() { + return getRuleContext(TypeArgumentsContext.class,0); + } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public GenericTypesContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGenericTypes(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGenericTypes(this); + } + } + public static class NotExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public NotExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterNotExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitNotExpression(this); + } + } + public static class PreDecreaseExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public PreDecreaseExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPreDecreaseExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPreDecreaseExpression(this); + } + } + public static class ArgumentsExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public ArgumentsExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArgumentsExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArgumentsExpression(this); + } + } + public static class ThisExpressionContext extends SingleExpressionContext { + public TerminalNode This() { return getToken(TypeScriptParser.This, 0); } + public ThisExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterThisExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitThisExpression(this); + } + } + public static class FunctionExpressionContext extends SingleExpressionContext { + public FunctionExpressionDeclarationContext functionExpressionDeclaration() { + return getRuleContext(FunctionExpressionDeclarationContext.class,0); + } + public FunctionExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterFunctionExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitFunctionExpression(this); + } + } + public static class UnaryMinusExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public UnaryMinusExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterUnaryMinusExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitUnaryMinusExpression(this); + } + } + public static class AssignmentExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public AssignmentExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterAssignmentExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitAssignmentExpression(this); + } + } + public static class PostDecreaseExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public PostDecreaseExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPostDecreaseExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPostDecreaseExpression(this); + } + } + public static class TypeofExpressionContext extends SingleExpressionContext { + public TerminalNode Typeof() { return getToken(TypeScriptParser.Typeof, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TypeofExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeofExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeofExpression(this); + } + } + public static class InstanceofExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode Instanceof() { return getToken(TypeScriptParser.Instanceof, 0); } + public InstanceofExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterInstanceofExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitInstanceofExpression(this); + } + } + public static class UnaryPlusExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public UnaryPlusExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterUnaryPlusExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitUnaryPlusExpression(this); + } + } + public static class DeleteExpressionContext extends SingleExpressionContext { + public TerminalNode Delete() { return getToken(TypeScriptParser.Delete, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public DeleteExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterDeleteExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitDeleteExpression(this); + } + } + public static class GeneratorsFunctionExpressionContext extends SingleExpressionContext { + public GeneratorFunctionDeclarationContext generatorFunctionDeclaration() { + return getRuleContext(GeneratorFunctionDeclarationContext.class,0); + } + public GeneratorsFunctionExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGeneratorsFunctionExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGeneratorsFunctionExpression(this); + } + } + public static class ArrowFunctionExpressionContext extends SingleExpressionContext { + public ArrowFunctionDeclarationContext arrowFunctionDeclaration() { + return getRuleContext(ArrowFunctionDeclarationContext.class,0); + } + public ArrowFunctionExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArrowFunctionExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArrowFunctionExpression(this); + } + } + public static class IteratorsExpressionContext extends SingleExpressionContext { + public IteratorBlockContext iteratorBlock() { + return getRuleContext(IteratorBlockContext.class,0); + } + public IteratorsExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIteratorsExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIteratorsExpression(this); + } + } + public static class EqualityExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public EqualityExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterEqualityExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitEqualityExpression(this); + } + } + public static class BitXOrExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public BitXOrExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterBitXOrExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitBitXOrExpression(this); + } + } + public static class CastAsExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TerminalNode As() { return getToken(TypeScriptParser.As, 0); } + public AsExpressionContext asExpression() { + return getRuleContext(AsExpressionContext.class,0); + } + public CastAsExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterCastAsExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitCastAsExpression(this); + } + } + public static class SuperExpressionContext extends SingleExpressionContext { + public TerminalNode Super() { return getToken(TypeScriptParser.Super, 0); } + public SuperExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterSuperExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitSuperExpression(this); + } + } + public static class MultiplicativeExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public MultiplicativeExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterMultiplicativeExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitMultiplicativeExpression(this); + } + } + public static class BitShiftExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public BitShiftExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterBitShiftExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitBitShiftExpression(this); + } + } + public static class ParenthesizedExpressionContext extends SingleExpressionContext { + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public ParenthesizedExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterParenthesizedExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitParenthesizedExpression(this); + } + } + public static class AdditiveExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public AdditiveExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterAdditiveExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitAdditiveExpression(this); + } + } + public static class RelationalExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public RelationalExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterRelationalExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitRelationalExpression(this); + } + } + public static class PostIncrementExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public PostIncrementExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPostIncrementExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPostIncrementExpression(this); + } + } + public static class YieldExpressionContext extends SingleExpressionContext { + public YieldStatementContext yieldStatement() { + return getRuleContext(YieldStatementContext.class,0); + } + public YieldExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterYieldExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitYieldExpression(this); + } + } + public static class BitNotExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public BitNotExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterBitNotExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitBitNotExpression(this); + } + } + public static class NewExpressionContext extends SingleExpressionContext { + public TerminalNode New() { return getToken(TypeScriptParser.New, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public TypeArgumentsContext typeArguments() { + return getRuleContext(TypeArgumentsContext.class,0); + } + public NewExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterNewExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitNewExpression(this); + } + } + public static class LiteralExpressionContext extends SingleExpressionContext { + public LiteralContext literal() { + return getRuleContext(LiteralContext.class,0); + } + public LiteralExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterLiteralExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitLiteralExpression(this); + } + } + public static class ArrayLiteralExpressionContext extends SingleExpressionContext { + public ArrayLiteralContext arrayLiteral() { + return getRuleContext(ArrayLiteralContext.class,0); + } + public ArrayLiteralExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArrayLiteralExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArrayLiteralExpression(this); + } + } + public static class MemberDotExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public IdentifierNameContext identifierName() { + return getRuleContext(IdentifierNameContext.class,0); + } + public NestedTypeGenericContext nestedTypeGeneric() { + return getRuleContext(NestedTypeGenericContext.class,0); + } + public MemberDotExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterMemberDotExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitMemberDotExpression(this); + } + } + public static class MemberIndexExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public MemberIndexExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterMemberIndexExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitMemberIndexExpression(this); + } + } + public static class IdentifierExpressionContext extends SingleExpressionContext { + public IdentifierNameContext identifierName() { + return getRuleContext(IdentifierNameContext.class,0); + } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public IdentifierExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIdentifierExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIdentifierExpression(this); + } + } + public static class BitAndExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public BitAndExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterBitAndExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitBitAndExpression(this); + } + } + public static class BitOrExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public BitOrExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterBitOrExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitBitOrExpression(this); + } + } + public static class AssignmentOperatorExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public AssignmentOperatorContext assignmentOperator() { + return getRuleContext(AssignmentOperatorContext.class,0); + } + public AssignmentOperatorExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterAssignmentOperatorExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitAssignmentOperatorExpression(this); + } + } + public static class VoidExpressionContext extends SingleExpressionContext { + public TerminalNode Void() { return getToken(TypeScriptParser.Void, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public VoidExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterVoidExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitVoidExpression(this); + } + } + + public final SingleExpressionContext singleExpression() throws RecognitionException { + return singleExpression(0); + } + + private SingleExpressionContext singleExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + SingleExpressionContext _localctx = new SingleExpressionContext(_ctx, _parentState); + SingleExpressionContext _prevctx = _localctx; + int _startState = 254; + enterRecursionRule(_localctx, 254, RULE_singleExpression, _p); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1516); + switch ( getInterpreter().adaptivePredict(_input,195,_ctx) ) { + case 1: + { + _localctx = new DeleteExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + + setState(1463); + match(Delete); + setState(1464); + singleExpression(38); + } + break; + case 2: + { + _localctx = new VoidExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1465); + match(Void); + setState(1466); + singleExpression(37); + } + break; + case 3: + { + _localctx = new TypeofExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1467); + match(Typeof); + setState(1468); + singleExpression(36); + } + break; + case 4: + { + _localctx = new PreIncrementExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1469); + match(PlusPlus); + setState(1470); + singleExpression(35); + } + break; + case 5: + { + _localctx = new PreDecreaseExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1471); + match(MinusMinus); + setState(1472); + singleExpression(34); + } + break; + case 6: + { + _localctx = new UnaryPlusExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1473); + match(Plus); + setState(1474); + singleExpression(33); + } + break; + case 7: + { + _localctx = new UnaryMinusExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1475); + match(Minus); + setState(1476); + singleExpression(32); + } + break; + case 8: + { + _localctx = new BitNotExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1477); + match(BitNot); + setState(1478); + singleExpression(31); + } + break; + case 9: + { + _localctx = new NotExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1479); + match(Not); + setState(1480); + singleExpression(30); + } + break; + case 10: + { + _localctx = new FunctionExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1481); + functionExpressionDeclaration(); + } + break; + case 11: + { + _localctx = new ArrowFunctionExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1482); + arrowFunctionDeclaration(); + } + break; + case 12: + { + _localctx = new NewExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1483); + match(New); + setState(1484); + singleExpression(0); + setState(1486); + _la = _input.LA(1); + if (_la==LessThan) { + { + setState(1485); + typeArguments(); + } + } + + setState(1488); + arguments(); + } + break; + case 13: + { + _localctx = new NewExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1490); + match(New); + setState(1491); + singleExpression(0); + setState(1493); + switch ( getInterpreter().adaptivePredict(_input,192,_ctx) ) { + case 1: + { + setState(1492); + typeArguments(); + } + break; + } + } + break; + case 14: + { + _localctx = new IteratorsExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1495); + iteratorBlock(); + } + break; + case 15: + { + _localctx = new GeneratorsExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1496); + generatorBlock(); + } + break; + case 16: + { + _localctx = new GeneratorsFunctionExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1497); + generatorFunctionDeclaration(); + } + break; + case 17: + { + _localctx = new YieldExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1498); + yieldStatement(); + } + break; + case 18: + { + _localctx = new ThisExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1499); + match(This); + } + break; + case 19: + { + _localctx = new IdentifierExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1500); + identifierName(); + setState(1502); + switch ( getInterpreter().adaptivePredict(_input,193,_ctx) ) { + case 1: + { + setState(1501); + singleExpression(0); + } + break; + } + } + break; + case 20: + { + _localctx = new SuperExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1504); + match(Super); + } + break; + case 21: + { + _localctx = new LiteralExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1505); + literal(); + } + break; + case 22: + { + _localctx = new ArrayLiteralExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1506); + arrayLiteral(); + } + break; + case 23: + { + _localctx = new ObjectLiteralExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1507); + objectLiteral(); + } + break; + case 24: + { + _localctx = new ParenthesizedExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1508); + match(OpenParen); + setState(1509); + expressionSequence(); + setState(1510); + match(CloseParen); + } + break; + case 25: + { + _localctx = new GenericTypesContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1512); + typeArguments(); + setState(1514); + switch ( getInterpreter().adaptivePredict(_input,194,_ctx) ) { + case 1: + { + setState(1513); + expressionSequence(); + } + break; + } + } + break; + } + _ctx.stop = _input.LT(-1); + setState(1596); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,199,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(1594); + switch ( getInterpreter().adaptivePredict(_input,198,_ctx) ) { + case 1: + { + _localctx = new MultiplicativeExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1518); + if (!(precpred(_ctx, 29))) throw new FailedPredicateException(this, "precpred(_ctx, 29)"); + setState(1519); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Multiply) | (1L << Divide) | (1L << Modulus))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(1520); + singleExpression(30); + } + break; + case 2: + { + _localctx = new AdditiveExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1521); + if (!(precpred(_ctx, 28))) throw new FailedPredicateException(this, "precpred(_ctx, 28)"); + setState(1522); + _la = _input.LA(1); + if ( !(_la==Plus || _la==Minus) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(1523); + singleExpression(29); + } + break; + case 3: + { + _localctx = new BitShiftExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1524); + if (!(precpred(_ctx, 27))) throw new FailedPredicateException(this, "precpred(_ctx, 27)"); + setState(1525); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << RightShiftArithmetic) | (1L << LeftShiftArithmetic) | (1L << RightShiftLogical))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(1526); + singleExpression(28); + } + break; + case 4: + { + _localctx = new RelationalExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1527); + if (!(precpred(_ctx, 26))) throw new FailedPredicateException(this, "precpred(_ctx, 26)"); + setState(1528); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LessThan) | (1L << MoreThan) | (1L << LessThanEquals) | (1L << GreaterThanEquals))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(1529); + singleExpression(27); + } + break; + case 5: + { + _localctx = new InstanceofExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1530); + if (!(precpred(_ctx, 25))) throw new FailedPredicateException(this, "precpred(_ctx, 25)"); + setState(1531); + match(Instanceof); + setState(1532); + singleExpression(26); + } + break; + case 6: + { + _localctx = new InExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1533); + if (!(precpred(_ctx, 24))) throw new FailedPredicateException(this, "precpred(_ctx, 24)"); + setState(1534); + match(In); + setState(1535); + singleExpression(25); + } + break; + case 7: + { + _localctx = new EqualityExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1536); + if (!(precpred(_ctx, 23))) throw new FailedPredicateException(this, "precpred(_ctx, 23)"); + setState(1537); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Equals_) | (1L << NotEquals) | (1L << IdentityEquals) | (1L << IdentityNotEquals))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(1538); + singleExpression(24); + } + break; + case 8: + { + _localctx = new BitAndExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1539); + if (!(precpred(_ctx, 22))) throw new FailedPredicateException(this, "precpred(_ctx, 22)"); + setState(1540); + match(BitAnd); + setState(1541); + singleExpression(23); + } + break; + case 9: + { + _localctx = new BitXOrExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1542); + if (!(precpred(_ctx, 21))) throw new FailedPredicateException(this, "precpred(_ctx, 21)"); + setState(1543); + match(BitXOr); + setState(1544); + singleExpression(22); + } + break; + case 10: + { + _localctx = new BitOrExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1545); + if (!(precpred(_ctx, 20))) throw new FailedPredicateException(this, "precpred(_ctx, 20)"); + setState(1546); + match(BitOr); + setState(1547); + singleExpression(21); + } + break; + case 11: + { + _localctx = new LogicalAndExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1548); + if (!(precpred(_ctx, 19))) throw new FailedPredicateException(this, "precpred(_ctx, 19)"); + setState(1549); + match(And); + setState(1550); + singleExpression(20); + } + break; + case 12: + { + _localctx = new LogicalOrExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1551); + if (!(precpred(_ctx, 18))) throw new FailedPredicateException(this, "precpred(_ctx, 18)"); + setState(1552); + match(Or); + setState(1553); + singleExpression(19); + } + break; + case 13: + { + _localctx = new TernaryExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1554); + if (!(precpred(_ctx, 17))) throw new FailedPredicateException(this, "precpred(_ctx, 17)"); + setState(1555); + match(QuestionMark); + setState(1556); + singleExpression(0); + setState(1557); + match(Colon); + setState(1558); + singleExpression(18); + } + break; + case 14: + { + _localctx = new AssignmentExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1560); + if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)"); + setState(1561); + match(Assign); + setState(1562); + singleExpression(17); + } + break; + case 15: + { + _localctx = new AssignmentOperatorExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1563); + if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)"); + setState(1564); + assignmentOperator(); + setState(1565); + singleExpression(16); + } + break; + case 16: + { + _localctx = new MemberIndexExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1567); + if (!(precpred(_ctx, 45))) throw new FailedPredicateException(this, "precpred(_ctx, 45)"); + setState(1568); + match(OpenBracket); + setState(1569); + expressionSequence(); + setState(1570); + match(CloseBracket); + } + break; + case 17: + { + _localctx = new MemberDotExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1572); + if (!(precpred(_ctx, 44))) throw new FailedPredicateException(this, "precpred(_ctx, 44)"); + setState(1574); + _la = _input.LA(1); + if (_la==Not) { + { + setState(1573); + match(Not); + } + } + + setState(1576); + match(Dot); + setState(1577); + identifierName(); + setState(1579); + switch ( getInterpreter().adaptivePredict(_input,197,_ctx) ) { + case 1: + { + setState(1578); + nestedTypeGeneric(); + } + break; + } + } + break; + case 18: + { + _localctx = new ArgumentsExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1581); + if (!(precpred(_ctx, 41))) throw new FailedPredicateException(this, "precpred(_ctx, 41)"); + setState(1582); + arguments(); + } + break; + case 19: + { + _localctx = new PostIncrementExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1583); + if (!(precpred(_ctx, 40))) throw new FailedPredicateException(this, "precpred(_ctx, 40)"); + setState(1584); + if (!(this.notLineTerminator())) throw new FailedPredicateException(this, "this.notLineTerminator()"); + setState(1585); + match(PlusPlus); + } + break; + case 20: + { + _localctx = new PostDecreaseExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1586); + if (!(precpred(_ctx, 39))) throw new FailedPredicateException(this, "precpred(_ctx, 39)"); + setState(1587); + if (!(this.notLineTerminator())) throw new FailedPredicateException(this, "this.notLineTerminator()"); + setState(1588); + match(MinusMinus); + } + break; + case 21: + { + _localctx = new TemplateStringExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1589); + if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)"); + setState(1590); + templateStringLiteral(); + } + break; + case 22: + { + _localctx = new CastAsExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1591); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(1592); + match(As); + setState(1593); + asExpression(); + } + break; + } + } + } + setState(1598); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,199,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class AsExpressionContext extends ParserRuleContext { + public PredefinedTypeContext predefinedType() { + return getRuleContext(PredefinedTypeContext.class,0); + } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public AsExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_asExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterAsExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitAsExpression(this); + } + } + + public final AsExpressionContext asExpression() throws RecognitionException { + AsExpressionContext _localctx = new AsExpressionContext(_ctx, getState()); + enterRule(_localctx, 256, RULE_asExpression); + try { + setState(1605); + switch ( getInterpreter().adaptivePredict(_input,201,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1599); + predefinedType(); + setState(1602); + switch ( getInterpreter().adaptivePredict(_input,200,_ctx) ) { + case 1: + { + setState(1600); + match(OpenBracket); + setState(1601); + match(CloseBracket); + } + break; + } + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1604); + singleExpression(0); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrowFunctionDeclarationContext extends ParserRuleContext { + public ArrowFunctionParametersContext arrowFunctionParameters() { + return getRuleContext(ArrowFunctionParametersContext.class,0); + } + public ArrowFunctionBodyContext arrowFunctionBody() { + return getRuleContext(ArrowFunctionBodyContext.class,0); + } + public TerminalNode Async() { return getToken(TypeScriptParser.Async, 0); } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public ArrowFunctionDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrowFunctionDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArrowFunctionDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArrowFunctionDeclaration(this); + } + } + + public final ArrowFunctionDeclarationContext arrowFunctionDeclaration() throws RecognitionException { + ArrowFunctionDeclarationContext _localctx = new ArrowFunctionDeclarationContext(_ctx, getState()); + enterRule(_localctx, 258, RULE_arrowFunctionDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1608); + _la = _input.LA(1); + if (_la==Async) { + { + setState(1607); + match(Async); + } + } + + setState(1610); + arrowFunctionParameters(); + setState(1612); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(1611); + typeAnnotation(); + } + } + + setState(1614); + match(ARROW); + setState(1615); + arrowFunctionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrowFunctionParametersContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public ArrowFunctionParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrowFunctionParameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArrowFunctionParameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArrowFunctionParameters(this); + } + } + + public final ArrowFunctionParametersContext arrowFunctionParameters() throws RecognitionException { + ArrowFunctionParametersContext _localctx = new ArrowFunctionParametersContext(_ctx, getState()); + enterRule(_localctx, 260, RULE_arrowFunctionParameters); + int _la; + try { + setState(1623); + switch (_input.LA(1)) { + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(1617); + match(Identifier); + } + break; + case OpenParen: + enterOuterAlt(_localctx, 2); + { + setState(1618); + match(OpenParen); + setState(1620); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis))) != 0) || ((((_la - 101)) & ~0x3f) == 0 && ((1L << (_la - 101)) & ((1L << (Private - 101)) | (1L << (Public - 101)) | (1L << (Protected - 101)) | (1L << (TypeAlias - 101)) | (1L << (Require - 101)) | (1L << (At - 101)) | (1L << (Identifier - 101)))) != 0)) { + { + setState(1619); + formalParameterList(); + } + } + + setState(1622); + match(CloseParen); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrowFunctionBodyContext extends ParserRuleContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public ArrowFunctionBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrowFunctionBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArrowFunctionBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArrowFunctionBody(this); + } + } + + public final ArrowFunctionBodyContext arrowFunctionBody() throws RecognitionException { + ArrowFunctionBodyContext _localctx = new ArrowFunctionBodyContext(_ctx, getState()); + enterRule(_localctx, 262, RULE_arrowFunctionBody); + try { + setState(1630); + switch ( getInterpreter().adaptivePredict(_input,206,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1625); + singleExpression(0); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1626); + match(OpenBrace); + setState(1627); + functionBody(); + setState(1628); + match(CloseBrace); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AssignmentOperatorContext extends ParserRuleContext { + public AssignmentOperatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_assignmentOperator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterAssignmentOperator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitAssignmentOperator(this); + } + } + + public final AssignmentOperatorContext assignmentOperator() throws RecognitionException { + AssignmentOperatorContext _localctx = new AssignmentOperatorContext(_ctx, getState()); + enterRule(_localctx, 264, RULE_assignmentOperator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1632); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << MultiplyAssign) | (1L << DivideAssign) | (1L << ModulusAssign) | (1L << PlusAssign) | (1L << MinusAssign) | (1L << LeftShiftArithmeticAssign) | (1L << RightShiftArithmeticAssign) | (1L << RightShiftLogicalAssign) | (1L << BitAndAssign) | (1L << BitXorAssign) | (1L << BitOrAssign))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LiteralContext extends ParserRuleContext { + public TerminalNode NullLiteral() { return getToken(TypeScriptParser.NullLiteral, 0); } + public TerminalNode BooleanLiteral() { return getToken(TypeScriptParser.BooleanLiteral, 0); } + public TerminalNode StringLiteral() { return getToken(TypeScriptParser.StringLiteral, 0); } + public TemplateStringLiteralContext templateStringLiteral() { + return getRuleContext(TemplateStringLiteralContext.class,0); + } + public TerminalNode RegularExpressionLiteral() { return getToken(TypeScriptParser.RegularExpressionLiteral, 0); } + public NumericLiteralContext numericLiteral() { + return getRuleContext(NumericLiteralContext.class,0); + } + public LiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_literal; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitLiteral(this); + } + } + + public final LiteralContext literal() throws RecognitionException { + LiteralContext _localctx = new LiteralContext(_ctx, getState()); + enterRule(_localctx, 266, RULE_literal); + try { + setState(1640); + switch (_input.LA(1)) { + case NullLiteral: + enterOuterAlt(_localctx, 1); + { + setState(1634); + match(NullLiteral); + } + break; + case BooleanLiteral: + enterOuterAlt(_localctx, 2); + { + setState(1635); + match(BooleanLiteral); + } + break; + case StringLiteral: + enterOuterAlt(_localctx, 3); + { + setState(1636); + match(StringLiteral); + } + break; + case BackTick: + enterOuterAlt(_localctx, 4); + { + setState(1637); + templateStringLiteral(); + } + break; + case RegularExpressionLiteral: + enterOuterAlt(_localctx, 5); + { + setState(1638); + match(RegularExpressionLiteral); + } + break; + case DecimalLiteral: + case HexIntegerLiteral: + case OctalIntegerLiteral: + case OctalIntegerLiteral2: + case BinaryIntegerLiteral: + enterOuterAlt(_localctx, 6); + { + setState(1639); + numericLiteral(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TemplateStringLiteralContext extends ParserRuleContext { + public List BackTick() { return getTokens(TypeScriptParser.BackTick); } + public TerminalNode BackTick(int i) { + return getToken(TypeScriptParser.BackTick, i); + } + public List templateStringAtom() { + return getRuleContexts(TemplateStringAtomContext.class); + } + public TemplateStringAtomContext templateStringAtom(int i) { + return getRuleContext(TemplateStringAtomContext.class,i); + } + public TemplateStringLiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_templateStringLiteral; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTemplateStringLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTemplateStringLiteral(this); + } + } + + public final TemplateStringLiteralContext templateStringLiteral() throws RecognitionException { + TemplateStringLiteralContext _localctx = new TemplateStringLiteralContext(_ctx, getState()); + enterRule(_localctx, 268, RULE_templateStringLiteral); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1642); + match(BackTick); + setState(1646); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 132)) & ~0x3f) == 0 && ((1L << (_la - 132)) & ((1L << (TemplateStringEscapeAtom - 132)) | (1L << (TemplateStringStartExpression - 132)) | (1L << (TemplateStringAtom - 132)))) != 0)) { + { + { + setState(1643); + templateStringAtom(); + } + } + setState(1648); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1649); + match(BackTick); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TemplateStringAtomContext extends ParserRuleContext { + public TerminalNode TemplateStringAtom() { return getToken(TypeScriptParser.TemplateStringAtom, 0); } + public TerminalNode TemplateStringStartExpression() { return getToken(TypeScriptParser.TemplateStringStartExpression, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TerminalNode TemplateCloseBrace() { return getToken(TypeScriptParser.TemplateCloseBrace, 0); } + public TerminalNode TemplateStringEscapeAtom() { return getToken(TypeScriptParser.TemplateStringEscapeAtom, 0); } + public TemplateStringAtomContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_templateStringAtom; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTemplateStringAtom(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTemplateStringAtom(this); + } + } + + public final TemplateStringAtomContext templateStringAtom() throws RecognitionException { + TemplateStringAtomContext _localctx = new TemplateStringAtomContext(_ctx, getState()); + enterRule(_localctx, 270, RULE_templateStringAtom); + try { + setState(1657); + switch (_input.LA(1)) { + case TemplateStringAtom: + enterOuterAlt(_localctx, 1); + { + setState(1651); + match(TemplateStringAtom); + } + break; + case TemplateStringStartExpression: + enterOuterAlt(_localctx, 2); + { + setState(1652); + match(TemplateStringStartExpression); + setState(1653); + singleExpression(0); + setState(1654); + match(TemplateCloseBrace); + } + break; + case TemplateStringEscapeAtom: + enterOuterAlt(_localctx, 3); + { + setState(1656); + match(TemplateStringEscapeAtom); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NumericLiteralContext extends ParserRuleContext { + public TerminalNode DecimalLiteral() { return getToken(TypeScriptParser.DecimalLiteral, 0); } + public TerminalNode HexIntegerLiteral() { return getToken(TypeScriptParser.HexIntegerLiteral, 0); } + public TerminalNode OctalIntegerLiteral() { return getToken(TypeScriptParser.OctalIntegerLiteral, 0); } + public TerminalNode OctalIntegerLiteral2() { return getToken(TypeScriptParser.OctalIntegerLiteral2, 0); } + public TerminalNode BinaryIntegerLiteral() { return getToken(TypeScriptParser.BinaryIntegerLiteral, 0); } + public NumericLiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_numericLiteral; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterNumericLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitNumericLiteral(this); + } + } + + public final NumericLiteralContext numericLiteral() throws RecognitionException { + NumericLiteralContext _localctx = new NumericLiteralContext(_ctx, getState()); + enterRule(_localctx, 272, RULE_numericLiteral); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1659); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << DecimalLiteral) | (1L << HexIntegerLiteral) | (1L << OctalIntegerLiteral) | (1L << OctalIntegerLiteral2) | (1L << BinaryIntegerLiteral))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IdentifierNameContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public ReservedWordContext reservedWord() { + return getRuleContext(ReservedWordContext.class,0); + } + public IdentifierNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_identifierName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIdentifierName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIdentifierName(this); + } + } + + public final IdentifierNameContext identifierName() throws RecognitionException { + IdentifierNameContext _localctx = new IdentifierNameContext(_ctx, getState()); + enterRule(_localctx, 274, RULE_identifierName); + try { + setState(1663); + switch (_input.LA(1)) { + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(1661); + match(Identifier); + } + break; + case NullLiteral: + case BooleanLiteral: + case Break: + case Do: + case Instanceof: + case Typeof: + case Case: + case Else: + case New: + case Var: + case Catch: + case Finally: + case Return: + case Void: + case Continue: + case For: + case Switch: + case While: + case Debugger: + case Function_: + case This: + case With: + case Default: + case If: + case Throw: + case Delete: + case In: + case Try: + case From: + case ReadOnly: + case Async: + case Class: + case Enum: + case Extends: + case Super: + case Const: + case Export: + case Import: + case Implements: + case Let: + case Private: + case Public: + case Interface: + case Package: + case Protected: + case Static: + case Yield: + case Number: + case Boolean: + case String: + case TypeAlias: + case Get: + case Set: + case Require: + case Module: + enterOuterAlt(_localctx, 2); + { + setState(1662); + reservedWord(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IdentifierOrKeyWordContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public TerminalNode TypeAlias() { return getToken(TypeScriptParser.TypeAlias, 0); } + public TerminalNode Require() { return getToken(TypeScriptParser.Require, 0); } + public IdentifierOrKeyWordContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_identifierOrKeyWord; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIdentifierOrKeyWord(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIdentifierOrKeyWord(this); + } + } + + public final IdentifierOrKeyWordContext identifierOrKeyWord() throws RecognitionException { + IdentifierOrKeyWordContext _localctx = new IdentifierOrKeyWordContext(_ctx, getState()); + enterRule(_localctx, 276, RULE_identifierOrKeyWord); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1665); + _la = _input.LA(1); + if ( !(((((_la - 113)) & ~0x3f) == 0 && ((1L << (_la - 113)) & ((1L << (TypeAlias - 113)) | (1L << (Require - 113)) | (1L << (Identifier - 113)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ReservedWordContext extends ParserRuleContext { + public KeywordContext keyword() { + return getRuleContext(KeywordContext.class,0); + } + public TerminalNode NullLiteral() { return getToken(TypeScriptParser.NullLiteral, 0); } + public TerminalNode BooleanLiteral() { return getToken(TypeScriptParser.BooleanLiteral, 0); } + public ReservedWordContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_reservedWord; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterReservedWord(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitReservedWord(this); + } + } + + public final ReservedWordContext reservedWord() throws RecognitionException { + ReservedWordContext _localctx = new ReservedWordContext(_ctx, getState()); + enterRule(_localctx, 278, RULE_reservedWord); + try { + setState(1670); + switch (_input.LA(1)) { + case Break: + case Do: + case Instanceof: + case Typeof: + case Case: + case Else: + case New: + case Var: + case Catch: + case Finally: + case Return: + case Void: + case Continue: + case For: + case Switch: + case While: + case Debugger: + case Function_: + case This: + case With: + case Default: + case If: + case Throw: + case Delete: + case In: + case Try: + case From: + case ReadOnly: + case Async: + case Class: + case Enum: + case Extends: + case Super: + case Const: + case Export: + case Import: + case Implements: + case Let: + case Private: + case Public: + case Interface: + case Package: + case Protected: + case Static: + case Yield: + case Number: + case Boolean: + case String: + case TypeAlias: + case Get: + case Set: + case Require: + case Module: + enterOuterAlt(_localctx, 1); + { + setState(1667); + keyword(); + } + break; + case NullLiteral: + enterOuterAlt(_localctx, 2); + { + setState(1668); + match(NullLiteral); + } + break; + case BooleanLiteral: + enterOuterAlt(_localctx, 3); + { + setState(1669); + match(BooleanLiteral); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class KeywordContext extends ParserRuleContext { + public TerminalNode Break() { return getToken(TypeScriptParser.Break, 0); } + public TerminalNode Do() { return getToken(TypeScriptParser.Do, 0); } + public TerminalNode Instanceof() { return getToken(TypeScriptParser.Instanceof, 0); } + public TerminalNode Typeof() { return getToken(TypeScriptParser.Typeof, 0); } + public TerminalNode Case() { return getToken(TypeScriptParser.Case, 0); } + public TerminalNode Else() { return getToken(TypeScriptParser.Else, 0); } + public TerminalNode New() { return getToken(TypeScriptParser.New, 0); } + public TerminalNode Var() { return getToken(TypeScriptParser.Var, 0); } + public TerminalNode Catch() { return getToken(TypeScriptParser.Catch, 0); } + public TerminalNode Finally() { return getToken(TypeScriptParser.Finally, 0); } + public TerminalNode Return() { return getToken(TypeScriptParser.Return, 0); } + public TerminalNode Void() { return getToken(TypeScriptParser.Void, 0); } + public TerminalNode Continue() { return getToken(TypeScriptParser.Continue, 0); } + public TerminalNode For() { return getToken(TypeScriptParser.For, 0); } + public TerminalNode Switch() { return getToken(TypeScriptParser.Switch, 0); } + public TerminalNode While() { return getToken(TypeScriptParser.While, 0); } + public TerminalNode Debugger() { return getToken(TypeScriptParser.Debugger, 0); } + public TerminalNode Function_() { return getToken(TypeScriptParser.Function_, 0); } + public TerminalNode This() { return getToken(TypeScriptParser.This, 0); } + public TerminalNode With() { return getToken(TypeScriptParser.With, 0); } + public TerminalNode Default() { return getToken(TypeScriptParser.Default, 0); } + public TerminalNode If() { return getToken(TypeScriptParser.If, 0); } + public TerminalNode Throw() { return getToken(TypeScriptParser.Throw, 0); } + public TerminalNode Delete() { return getToken(TypeScriptParser.Delete, 0); } + public TerminalNode In() { return getToken(TypeScriptParser.In, 0); } + public TerminalNode Try() { return getToken(TypeScriptParser.Try, 0); } + public TerminalNode ReadOnly() { return getToken(TypeScriptParser.ReadOnly, 0); } + public TerminalNode Async() { return getToken(TypeScriptParser.Async, 0); } + public TerminalNode From() { return getToken(TypeScriptParser.From, 0); } + public TerminalNode Class() { return getToken(TypeScriptParser.Class, 0); } + public TerminalNode Enum() { return getToken(TypeScriptParser.Enum, 0); } + public TerminalNode Extends() { return getToken(TypeScriptParser.Extends, 0); } + public TerminalNode Super() { return getToken(TypeScriptParser.Super, 0); } + public TerminalNode Const() { return getToken(TypeScriptParser.Const, 0); } + public TerminalNode Export() { return getToken(TypeScriptParser.Export, 0); } + public TerminalNode Import() { return getToken(TypeScriptParser.Import, 0); } + public TerminalNode Implements() { return getToken(TypeScriptParser.Implements, 0); } + public TerminalNode Let() { return getToken(TypeScriptParser.Let, 0); } + public TerminalNode Private() { return getToken(TypeScriptParser.Private, 0); } + public TerminalNode Public() { return getToken(TypeScriptParser.Public, 0); } + public TerminalNode Interface() { return getToken(TypeScriptParser.Interface, 0); } + public TerminalNode Package() { return getToken(TypeScriptParser.Package, 0); } + public TerminalNode Protected() { return getToken(TypeScriptParser.Protected, 0); } + public TerminalNode Static() { return getToken(TypeScriptParser.Static, 0); } + public TerminalNode Yield() { return getToken(TypeScriptParser.Yield, 0); } + public TerminalNode Get() { return getToken(TypeScriptParser.Get, 0); } + public TerminalNode Set() { return getToken(TypeScriptParser.Set, 0); } + public TerminalNode Require() { return getToken(TypeScriptParser.Require, 0); } + public TerminalNode TypeAlias() { return getToken(TypeScriptParser.TypeAlias, 0); } + public TerminalNode String() { return getToken(TypeScriptParser.String, 0); } + public TerminalNode Boolean() { return getToken(TypeScriptParser.Boolean, 0); } + public TerminalNode Number() { return getToken(TypeScriptParser.Number, 0); } + public TerminalNode Module() { return getToken(TypeScriptParser.Module, 0); } + public KeywordContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_keyword; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterKeyword(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitKeyword(this); + } + } + + public final KeywordContext keyword() throws RecognitionException { + KeywordContext _localctx = new KeywordContext(_ctx, getState()); + enterRule(_localctx, 280, RULE_keyword); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1672); + _la = _input.LA(1); + if ( !(((((_la - 62)) & ~0x3f) == 0 && ((1L << (_la - 62)) & ((1L << (Break - 62)) | (1L << (Do - 62)) | (1L << (Instanceof - 62)) | (1L << (Typeof - 62)) | (1L << (Case - 62)) | (1L << (Else - 62)) | (1L << (New - 62)) | (1L << (Var - 62)) | (1L << (Catch - 62)) | (1L << (Finally - 62)) | (1L << (Return - 62)) | (1L << (Void - 62)) | (1L << (Continue - 62)) | (1L << (For - 62)) | (1L << (Switch - 62)) | (1L << (While - 62)) | (1L << (Debugger - 62)) | (1L << (Function_ - 62)) | (1L << (This - 62)) | (1L << (With - 62)) | (1L << (Default - 62)) | (1L << (If - 62)) | (1L << (Throw - 62)) | (1L << (Delete - 62)) | (1L << (In - 62)) | (1L << (Try - 62)) | (1L << (From - 62)) | (1L << (ReadOnly - 62)) | (1L << (Async - 62)) | (1L << (Class - 62)) | (1L << (Enum - 62)) | (1L << (Extends - 62)) | (1L << (Super - 62)) | (1L << (Const - 62)) | (1L << (Export - 62)) | (1L << (Import - 62)) | (1L << (Implements - 62)) | (1L << (Let - 62)) | (1L << (Private - 62)) | (1L << (Public - 62)) | (1L << (Interface - 62)) | (1L << (Package - 62)) | (1L << (Protected - 62)) | (1L << (Static - 62)) | (1L << (Yield - 62)) | (1L << (Number - 62)) | (1L << (Boolean - 62)) | (1L << (String - 62)) | (1L << (TypeAlias - 62)) | (1L << (Get - 62)) | (1L << (Set - 62)) | (1L << (Require - 62)) | (1L << (Module - 62)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GetterContext extends ParserRuleContext { + public TerminalNode Get() { return getToken(TypeScriptParser.Get, 0); } + public PropertyNameContext propertyName() { + return getRuleContext(PropertyNameContext.class,0); + } + public GetterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_getter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGetter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGetter(this); + } + } + + public final GetterContext getter() throws RecognitionException { + GetterContext _localctx = new GetterContext(_ctx, getState()); + enterRule(_localctx, 282, RULE_getter); + try { + enterOuterAlt(_localctx, 1); + { + setState(1674); + match(Get); + setState(1675); + propertyName(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SetterContext extends ParserRuleContext { + public TerminalNode Set() { return getToken(TypeScriptParser.Set, 0); } + public PropertyNameContext propertyName() { + return getRuleContext(PropertyNameContext.class,0); + } + public SetterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_setter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterSetter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitSetter(this); + } + } + + public final SetterContext setter() throws RecognitionException { + SetterContext _localctx = new SetterContext(_ctx, getState()); + enterRule(_localctx, 284, RULE_setter); + try { + enterOuterAlt(_localctx, 1); + { + setState(1677); + match(Set); + setState(1678); + propertyName(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EosContext extends ParserRuleContext { + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public TerminalNode EOF() { return getToken(TypeScriptParser.EOF, 0); } + public EosContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_eos; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterEos(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitEos(this); + } + } + + public final EosContext eos() throws RecognitionException { + EosContext _localctx = new EosContext(_ctx, getState()); + enterRule(_localctx, 286, RULE_eos); + try { + setState(1684); + switch ( getInterpreter().adaptivePredict(_input,212,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1680); + match(SemiColon); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1681); + match(EOF); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1682); + if (!(this.lineTerminatorAhead())) throw new FailedPredicateException(this, "this.lineTerminatorAhead()"); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(1683); + if (!(this.closeBrace())) throw new FailedPredicateException(this, "this.closeBrace()"); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 10: + return unionOrIntersectionOrPrimaryType_sempred((UnionOrIntersectionOrPrimaryTypeContext)_localctx, predIndex); + case 11: + return primaryType_sempred((PrimaryTypeContext)_localctx, predIndex); + case 22: + return arrayType_sempred((ArrayTypeContext)_localctx, predIndex); + case 57: + return decoratorMemberExpression_sempred((DecoratorMemberExpressionContext)_localctx, predIndex); + case 73: + return expressionStatement_sempred((ExpressionStatementContext)_localctx, predIndex); + case 75: + return iterationStatement_sempred((IterationStatementContext)_localctx, predIndex); + case 77: + return continueStatement_sempred((ContinueStatementContext)_localctx, predIndex); + case 78: + return breakStatement_sempred((BreakStatementContext)_localctx, predIndex); + case 79: + return returnStatement_sempred((ReturnStatementContext)_localctx, predIndex); + case 80: + return yieldStatement_sempred((YieldStatementContext)_localctx, predIndex); + case 88: + return throwStatement_sempred((ThrowStatementContext)_localctx, predIndex); + case 127: + return singleExpression_sempred((SingleExpressionContext)_localctx, predIndex); + case 143: + return eos_sempred((EosContext)_localctx, predIndex); + } + return true; + } + private boolean unionOrIntersectionOrPrimaryType_sempred(UnionOrIntersectionOrPrimaryTypeContext _localctx, int predIndex) { + switch (predIndex) { + case 0: + return precpred(_ctx, 3); + case 1: + return precpred(_ctx, 2); + } + return true; + } + private boolean primaryType_sempred(PrimaryTypeContext _localctx, int predIndex) { + switch (predIndex) { + case 2: + return precpred(_ctx, 5); + case 3: + return notLineTerminator(); + } + return true; + } + private boolean arrayType_sempred(ArrayTypeContext _localctx, int predIndex) { + switch (predIndex) { + case 4: + return notLineTerminator(); + } + return true; + } + private boolean decoratorMemberExpression_sempred(DecoratorMemberExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 5: + return precpred(_ctx, 2); + } + return true; + } + private boolean expressionStatement_sempred(ExpressionStatementContext _localctx, int predIndex) { + switch (predIndex) { + case 6: + return this.notOpenBraceAndNotFunction(); + } + return true; + } + private boolean iterationStatement_sempred(IterationStatementContext _localctx, int predIndex) { + switch (predIndex) { + case 7: + return this.p("of"); + case 8: + return this.p("of"); + } + return true; + } + private boolean continueStatement_sempred(ContinueStatementContext _localctx, int predIndex) { + switch (predIndex) { + case 9: + return this.notLineTerminator(); + } + return true; + } + private boolean breakStatement_sempred(BreakStatementContext _localctx, int predIndex) { + switch (predIndex) { + case 10: + return this.notLineTerminator(); + } + return true; + } + private boolean returnStatement_sempred(ReturnStatementContext _localctx, int predIndex) { + switch (predIndex) { + case 11: + return this.notLineTerminator(); + } + return true; + } + private boolean yieldStatement_sempred(YieldStatementContext _localctx, int predIndex) { + switch (predIndex) { + case 12: + return this.notLineTerminator(); + } + return true; + } + private boolean throwStatement_sempred(ThrowStatementContext _localctx, int predIndex) { + switch (predIndex) { + case 13: + return this.notLineTerminator(); + } + return true; + } + private boolean singleExpression_sempred(SingleExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 14: + return precpred(_ctx, 29); + case 15: + return precpred(_ctx, 28); + case 16: + return precpred(_ctx, 27); + case 17: + return precpred(_ctx, 26); + case 18: + return precpred(_ctx, 25); + case 19: + return precpred(_ctx, 24); + case 20: + return precpred(_ctx, 23); + case 21: + return precpred(_ctx, 22); + case 22: + return precpred(_ctx, 21); + case 23: + return precpred(_ctx, 20); + case 24: + return precpred(_ctx, 19); + case 25: + return precpred(_ctx, 18); + case 26: + return precpred(_ctx, 17); + case 27: + return precpred(_ctx, 16); + case 28: + return precpred(_ctx, 15); + case 29: + return precpred(_ctx, 45); + case 30: + return precpred(_ctx, 44); + case 31: + return precpred(_ctx, 41); + case 32: + return precpred(_ctx, 40); + case 33: + return this.notLineTerminator(); + case 34: + return precpred(_ctx, 39); + case 35: + return this.notLineTerminator(); + case 36: + return precpred(_ctx, 14); + case 37: + return precpred(_ctx, 1); + } + return true; + } + private boolean eos_sempred(EosContext _localctx, int predIndex) { + switch (predIndex) { + case 38: + return this.lineTerminatorAhead(); + case 39: + return this.closeBrace(); + } + return true; + } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\u0088\u0699\4\2\t"+ + "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ + "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ + "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ + "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ + "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+ + "k\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4"+ + "w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t\u0080"+ + "\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083\4\u0084\t\u0084\4\u0085"+ + "\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087\4\u0088\t\u0088\4\u0089\t\u0089"+ + "\4\u008a\t\u008a\4\u008b\t\u008b\4\u008c\t\u008c\4\u008d\t\u008d\4\u008e"+ + "\t\u008e\4\u008f\t\u008f\4\u0090\t\u0090\4\u0091\t\u0091\3\2\3\2\3\2\3"+ + "\3\3\3\5\3\u0128\n\3\3\4\3\4\5\4\u012c\n\4\3\4\3\4\3\5\3\5\3\5\7\5\u0133"+ + "\n\5\f\5\16\5\u0136\13\5\3\6\3\6\5\6\u013a\n\6\3\6\5\6\u013d\n\6\3\7\3"+ + "\7\3\7\3\b\3\b\5\b\u0144\n\b\3\b\3\b\3\t\3\t\3\t\7\t\u014b\n\t\f\t\16"+ + "\t\u014e\13\t\3\n\3\n\3\13\3\13\3\13\3\13\3\13\5\13\u0157\n\13\3\f\3\f"+ + "\3\f\3\f\3\f\3\f\3\f\3\f\3\f\7\f\u0162\n\f\f\f\16\f\u0165\13\f\3\r\3\r"+ + "\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\5\r\u0179"+ + "\n\r\3\r\3\r\3\r\3\r\7\r\u017f\n\r\f\r\16\r\u0182\13\r\3\16\3\16\3\17"+ + "\3\17\5\17\u0188\n\17\3\20\3\20\5\20\u018c\n\20\3\21\3\21\3\21\3\21\3"+ + "\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\5\22\u019b\n\22\3\23\3\23"+ + "\5\23\u019f\n\23\3\24\3\24\5\24\u01a3\n\24\3\24\3\24\3\25\3\25\5\25\u01a9"+ + "\n\25\3\26\3\26\3\26\7\26\u01ae\n\26\f\26\16\26\u01b1\13\26\3\27\3\27"+ + "\3\27\3\27\3\27\3\27\3\27\5\27\u01ba\n\27\5\27\u01bc\n\27\3\30\3\30\3"+ + "\30\3\30\3\30\3\31\3\31\3\31\3\31\3\32\3\32\3\32\7\32\u01ca\n\32\f\32"+ + "\16\32\u01cd\13\32\3\33\5\33\u01d0\n\33\3\33\3\33\5\33\u01d4\n\33\3\33"+ + "\3\33\3\33\3\33\3\34\3\34\5\34\u01dc\n\34\3\34\3\34\5\34\u01e0\n\34\3"+ + "\34\3\34\3\34\3\34\3\35\3\35\3\35\3\36\3\36\3\36\3\36\6\36\u01ed\n\36"+ + "\r\36\16\36\u01ee\3\36\3\36\5\36\u01f3\n\36\3\37\5\37\u01f6\n\37\3\37"+ + "\3\37\5\37\u01fa\n\37\3\37\5\37\u01fd\n\37\3\37\3\37\5\37\u0201\n\37\3"+ + " \3 \3 \3!\5!\u0207\n!\3!\3!\5!\u020b\n!\3!\3!\5!\u020f\n!\3\"\3\"\3\""+ + "\3\"\7\"\u0215\n\"\f\"\16\"\u0218\13\"\3\"\3\"\5\"\u021c\n\"\5\"\u021e"+ + "\n\"\3#\3#\3#\7#\u0223\n#\f#\16#\u0226\13#\3$\3$\5$\u022a\n$\3%\5%\u022d"+ + "\n%\3%\5%\u0230\n%\3%\3%\3%\5%\u0235\n%\3%\5%\u0238\n%\3%\5%\u023b\n%"+ + "\3&\3&\3&\5&\u0240\n&\3\'\5\'\u0243\n\'\3\'\5\'\u0246\n\'\3\'\3\'\5\'"+ + "\u024a\n\'\3(\3(\3)\3)\5)\u0250\n)\3*\3*\5*\u0254\n*\3*\3*\5*\u0258\n"+ + "*\3*\3*\5*\u025c\n*\3+\3+\3+\3+\3+\3+\3+\3,\3,\5,\u0267\n,\3,\3,\3-\3"+ + "-\3-\5-\u026e\n-\3-\3-\3-\3-\3.\5.\u0275\n.\3.\3.\3.\5.\u027a\n.\3.\3"+ + ".\3.\3.\3.\3.\5.\u0282\n.\3/\5/\u0285\n/\3/\5/\u0288\n/\3/\3/\3/\5/\u028d"+ + "\n/\3/\5/\u0290\n/\3/\3/\5/\u0294\n/\3\60\3\60\3\60\3\61\3\61\3\61\7\61"+ + "\u029c\n\61\f\61\16\61\u029f\13\61\3\62\5\62\u02a2\n\62\3\62\3\62\3\62"+ + "\3\62\5\62\u02a8\n\62\3\62\3\62\3\63\3\63\5\63\u02ae\n\63\3\64\3\64\3"+ + "\64\7\64\u02b3\n\64\f\64\16\64\u02b6\13\64\3\65\3\65\3\65\5\65\u02bb\n"+ + "\65\3\66\3\66\3\66\3\66\5\66\u02c1\n\66\3\66\3\66\3\67\3\67\6\67\u02c7"+ + "\n\67\r\67\16\67\u02c8\3\67\7\67\u02cc\n\67\f\67\16\67\u02cf\13\67\38"+ + "\38\38\38\38\39\69\u02d7\n9\r9\169\u02d8\3:\3:\3:\5:\u02de\n:\3;\3;\3"+ + ";\3;\3;\3;\5;\u02e6\n;\3;\3;\3;\7;\u02eb\n;\f;\16;\u02ee\13;\3<\3<\3<"+ + "\3=\5=\u02f4\n=\3=\3=\3>\5>\u02f9\n>\3>\3>\3?\3?\3?\3?\3?\3?\3?\3?\3?"+ + "\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\5?\u031a"+ + "\n?\3@\3@\5@\u031e\n@\3@\3@\3A\6A\u0323\nA\rA\16A\u0324\3B\3B\3B\3B\5"+ + "B\u032b\nB\3B\3B\3C\3C\3C\5C\u0332\nC\3D\3D\5D\u0336\nD\3D\3D\5D\u033a"+ + "\nD\3D\3D\3D\3D\3E\3E\3E\5E\u0343\nE\3E\3E\3E\3E\7E\u0349\nE\fE\16E\u034c"+ + "\13E\3E\3E\3F\3F\5F\u0352\nF\3F\3F\5F\u0356\nF\3G\3G\5G\u035a\nG\3G\3"+ + "G\5G\u035e\nG\3G\5G\u0361\nG\3G\5G\u0364\nG\3G\5G\u0367\nG\3G\3G\5G\u036b"+ + "\nG\3G\3G\5G\u036f\nG\3G\3G\5G\u0373\nG\5G\u0375\nG\3H\3H\3H\7H\u037a"+ + "\nH\fH\16H\u037d\13H\3I\3I\3I\5I\u0382\nI\3I\5I\u0385\nI\3I\5I\u0388\n"+ + "I\3I\3I\5I\u038c\nI\3I\5I\u038f\nI\3J\3J\3K\3K\3K\5K\u0396\nK\3L\3L\3"+ + "L\3L\3L\3L\3L\5L\u039f\nL\3M\3M\3M\3M\3M\3M\3M\3M\3M\3M\3M\3M\3M\3M\3"+ + "M\3M\3M\5M\u03b2\nM\3M\3M\5M\u03b6\nM\3M\3M\5M\u03ba\nM\3M\3M\3M\3M\3"+ + "M\3M\3M\3M\5M\u03c4\nM\3M\3M\5M\u03c8\nM\3M\3M\3M\3M\3M\3M\3M\3M\3M\5"+ + "M\u03d3\nM\3M\3M\3M\3M\3M\3M\3M\3M\3M\3M\3M\5M\u03e0\nM\3M\3M\3M\3M\5"+ + "M\u03e6\nM\3N\3N\3O\3O\3O\5O\u03ed\nO\3O\3O\3P\3P\3P\5P\u03f4\nP\3P\3"+ + "P\3Q\3Q\3Q\5Q\u03fb\nQ\3Q\3Q\3R\3R\3R\5R\u0402\nR\3R\3R\3S\3S\3S\3S\3"+ + "S\3S\3T\3T\3T\3T\3T\3T\3U\3U\5U\u0414\nU\3U\3U\5U\u0418\nU\5U\u041a\n"+ + "U\3U\3U\3V\6V\u041f\nV\rV\16V\u0420\3W\3W\3W\3W\5W\u0427\nW\3X\3X\3X\5"+ + "X\u042c\nX\3Y\3Y\3Y\3Y\3Z\3Z\3Z\3Z\3Z\3[\3[\3[\3[\5[\u043b\n[\3[\5[\u043e"+ + "\n[\3\\\3\\\3\\\3\\\3\\\3\\\3]\3]\3]\3^\3^\3^\3_\3_\3_\3_\3_\3_\3_\3_"+ + "\5_\u0454\n_\3`\5`\u0457\n`\3`\3`\5`\u045b\n`\5`\u045d\n`\3`\5`\u0460"+ + "\n`\3`\3`\3`\5`\u0465\n`\3`\3`\3`\3a\5a\u046b\na\3a\5a\u046e\na\3b\3b"+ + "\7b\u0472\nb\fb\16b\u0475\13b\3b\3b\3c\3c\3c\3d\3d\3d\3e\3e\5e\u0481\n"+ + "e\3e\3e\3e\5e\u0486\ne\3f\3f\3f\5f\u048b\nf\3f\5f\u048e\nf\3f\5f\u0491"+ + "\nf\3f\3f\3f\3f\3f\3f\3f\3f\3f\3f\5f\u049d\nf\3f\3f\3f\5f\u04a2\nf\3f"+ + "\5f\u04a5\nf\3g\5g\u04a8\ng\3g\5g\u04ab\ng\3g\5g\u04ae\ng\3g\5g\u04b1"+ + "\ng\3h\3h\3h\3i\5i\u04b7\ni\3i\3i\3i\5i\u04bc\ni\3i\3i\3i\3i\3i\3j\3j"+ + "\3j\5j\u04c6\nj\3j\3j\5j\u04ca\nj\3j\3j\3j\3j\3j\3k\3k\3k\3k\7k\u04d5"+ + "\nk\fk\16k\u04d8\13k\3k\5k\u04db\nk\3k\3k\3l\3l\3l\3m\3m\3m\3m\7m\u04e6"+ + "\nm\fm\16m\u04e9\13m\3m\5m\u04ec\nm\3m\3m\3n\3n\3n\3n\3n\5n\u04f5\nn\3"+ + "n\3n\3n\3n\3n\3o\3o\3o\7o\u04ff\no\fo\16o\u0502\13o\3o\3o\5o\u0506\no"+ + "\3o\3o\3o\3o\3o\5o\u050d\no\5o\u050f\no\3p\5p\u0512\np\3p\5p\u0515\np"+ + "\3p\3p\5p\u0519\np\3p\5p\u051c\np\3p\3p\5p\u0520\np\3q\3q\3q\5q\u0525"+ + "\nq\3r\5r\u0528\nr\3s\6s\u052b\ns\rs\16s\u052c\3t\3t\5t\u0531\nt\3t\3"+ + "t\3u\3u\6u\u0537\nu\ru\16u\u0538\3u\7u\u053c\nu\fu\16u\u053f\13u\3v\5"+ + "v\u0542\nv\3v\3v\5v\u0546\nv\3v\5v\u0549\nv\3w\3w\3w\3w\7w\u054f\nw\f"+ + "w\16w\u0552\13w\3w\5w\u0555\nw\5w\u0557\nw\3w\3w\3x\3x\3x\3x\3x\3x\3x"+ + "\3x\3x\3x\3x\3x\3x\3x\3x\5x\u056a\nx\3y\3y\3y\3y\5y\u0570\ny\3y\3y\3y"+ + "\3y\3z\3z\3z\3z\5z\u057a\nz\3z\5z\u057d\nz\3z\3z\3z\3z\3z\3{\3{\3{\5{"+ + "\u0587\n{\3|\3|\3|\5|\u058c\n|\5|\u058e\n|\3|\3|\3}\3}\3}\7}\u0595\n}"+ + "\f}\16}\u0598\13}\3~\5~\u059b\n~\3~\3~\5~\u059f\n~\3\177\3\177\3\177\7"+ + "\177\u05a4\n\177\f\177\16\177\u05a7\13\177\3\u0080\3\u0080\5\u0080\u05ab"+ + "\n\u0080\3\u0080\3\u0080\5\u0080\u05af\n\u0080\3\u0080\3\u0080\5\u0080"+ + "\u05b3\n\u0080\3\u0080\3\u0080\3\u0080\3\u0080\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\5\u0081\u05d1\n\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\5\u0081\u05d8\n\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\5\u0081\u05e1\n\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\5\u0081\u05ed"+ + "\n\u0081\5\u0081\u05ef\n\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\5\u0081\u0629\n\u0081"+ + "\3\u0081\3\u0081\3\u0081\5\u0081\u062e\n\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\7\u0081\u063d\n\u0081\f\u0081\16\u0081\u0640\13\u0081\3\u0082"+ + "\3\u0082\3\u0082\5\u0082\u0645\n\u0082\3\u0082\5\u0082\u0648\n\u0082\3"+ + "\u0083\5\u0083\u064b\n\u0083\3\u0083\3\u0083\5\u0083\u064f\n\u0083\3\u0083"+ + "\3\u0083\3\u0083\3\u0084\3\u0084\3\u0084\5\u0084\u0657\n\u0084\3\u0084"+ + "\5\u0084\u065a\n\u0084\3\u0085\3\u0085\3\u0085\3\u0085\3\u0085\5\u0085"+ + "\u0661\n\u0085\3\u0086\3\u0086\3\u0087\3\u0087\3\u0087\3\u0087\3\u0087"+ + "\3\u0087\5\u0087\u066b\n\u0087\3\u0088\3\u0088\7\u0088\u066f\n\u0088\f"+ + "\u0088\16\u0088\u0672\13\u0088\3\u0088\3\u0088\3\u0089\3\u0089\3\u0089"+ + "\3\u0089\3\u0089\3\u0089\5\u0089\u067c\n\u0089\3\u008a\3\u008a\3\u008b"+ + "\3\u008b\5\u008b\u0682\n\u008b\3\u008c\3\u008c\3\u008d\3\u008d\3\u008d"+ + "\5\u008d\u0689\n\u008d\3\u008e\3\u008e\3\u008f\3\u008f\3\u008f\3\u0090"+ + "\3\u0090\3\u0090\3\u0091\3\u0091\3\u0091\3\u0091\5\u0091\u0697\n\u0091"+ + "\3\u0091\2\6\26\30t\u0100\u0092\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36"+ + " \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~\u0080\u0082"+ + "\u0084\u0086\u0088\u008a\u008c\u008e\u0090\u0092\u0094\u0096\u0098\u009a"+ + "\u009c\u009e\u00a0\u00a2\u00a4\u00a6\u00a8\u00aa\u00ac\u00ae\u00b0\u00b2"+ + "\u00b4\u00b6\u00b8\u00ba\u00bc\u00be\u00c0\u00c2\u00c4\u00c6\u00c8\u00ca"+ + "\u00cc\u00ce\u00d0\u00d2\u00d4\u00d6\u00d8\u00da\u00dc\u00de\u00e0\u00e2"+ + "\u00e4\u00e6\u00e8\u00ea\u00ec\u00ee\u00f0\u00f2\u00f4\u00f6\u00f8\u00fa"+ + "\u00fc\u00fe\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112"+ + "\u0114\u0116\u0118\u011a\u011c\u011e\u0120\2\21\4\2KKnr\3\2\r\16\4\2g"+ + "hkk\4\2ooqq\5\2GGbbff\4\2\17\17\21\21\3\2\32\34\3\2\26\27\3\2\35\37\3"+ + "\2 #\3\2$\'\3\2-\67\3\2;?\5\2ssxx~~\7\2@Y[moqsuxy\u0749\2\u0122\3\2\2"+ + "\2\4\u0127\3\2\2\2\6\u0129\3\2\2\2\b\u012f\3\2\2\2\n\u013c\3\2\2\2\f\u013e"+ + "\3\2\2\2\16\u0141\3\2\2\2\20\u0147\3\2\2\2\22\u014f\3\2\2\2\24\u0156\3"+ + "\2\2\2\26\u0158\3\2\2\2\30\u0178\3\2\2\2\32\u0183\3\2\2\2\34\u0185\3\2"+ + "\2\2\36\u018b\3\2\2\2 \u018d\3\2\2\2\"\u0191\3\2\2\2$\u019e\3\2\2\2&\u01a0"+ + "\3\2\2\2(\u01a6\3\2\2\2*\u01aa\3\2\2\2,\u01bb\3\2\2\2.\u01bd\3\2\2\2\60"+ + "\u01c2\3\2\2\2\62\u01c6\3\2\2\2\64\u01cf\3\2\2\2\66\u01d9\3\2\2\28\u01e5"+ + "\3\2\2\2:\u01f2\3\2\2\2<\u01f5\3\2\2\2>\u0202\3\2\2\2@\u0206\3\2\2\2B"+ + "\u021d\3\2\2\2D\u021f\3\2\2\2F\u0229\3\2\2\2H\u022c\3\2\2\2J\u023c\3\2"+ + "\2\2L\u0242\3\2\2\2N\u024b\3\2\2\2P\u024f\3\2\2\2R\u0251\3\2\2\2T\u025d"+ + "\3\2\2\2V\u0264\3\2\2\2X\u026a\3\2\2\2Z\u0274\3\2\2\2\\\u0284\3\2\2\2"+ + "^\u0295\3\2\2\2`\u0298\3\2\2\2b\u02a1\3\2\2\2d\u02ab\3\2\2\2f\u02af\3"+ + "\2\2\2h\u02b7\3\2\2\2j\u02bc\3\2\2\2l\u02c4\3\2\2\2n\u02d0\3\2\2\2p\u02d6"+ + "\3\2\2\2r\u02da\3\2\2\2t\u02e5\3\2\2\2v\u02ef\3\2\2\2x\u02f3\3\2\2\2z"+ + "\u02f8\3\2\2\2|\u0319\3\2\2\2~\u031b\3\2\2\2\u0080\u0322\3\2\2\2\u0082"+ + "\u0326\3\2\2\2\u0084\u032e\3\2\2\2\u0086\u0335\3\2\2\2\u0088\u0342\3\2"+ + "\2\2\u008a\u034f\3\2\2\2\u008c\u0374\3\2\2\2\u008e\u0376\3\2\2\2\u0090"+ + "\u0381\3\2\2\2\u0092\u0390\3\2\2\2\u0094\u0392\3\2\2\2\u0096\u0397\3\2"+ + "\2\2\u0098\u03e5\3\2\2\2\u009a\u03e7\3\2\2\2\u009c\u03e9\3\2\2\2\u009e"+ + "\u03f0\3\2\2\2\u00a0\u03f7\3\2\2\2\u00a2\u03fe\3\2\2\2\u00a4\u0405\3\2"+ + "\2\2\u00a6\u040b\3\2\2\2\u00a8\u0411\3\2\2\2\u00aa\u041e\3\2\2\2\u00ac"+ + "\u0422\3\2\2\2\u00ae\u0428\3\2\2\2\u00b0\u042d\3\2\2\2\u00b2\u0431\3\2"+ + "\2\2\u00b4\u0436\3\2\2\2\u00b6\u043f\3\2\2\2\u00b8\u0445\3\2\2\2\u00ba"+ + "\u0448\3\2\2\2\u00bc\u044b\3\2\2\2\u00be\u0456\3\2\2\2\u00c0\u046a\3\2"+ + "\2\2\u00c2\u046f\3\2\2\2\u00c4\u0478\3\2\2\2\u00c6\u047b\3\2\2\2\u00c8"+ + "\u0485\3\2\2\2\u00ca\u04a4\3\2\2\2\u00cc\u04a7\3\2\2\2\u00ce\u04b2\3\2"+ + "\2\2\u00d0\u04b6\3\2\2\2\u00d2\u04c2\3\2\2\2\u00d4\u04d0\3\2\2\2\u00d6"+ + "\u04de\3\2\2\2\u00d8\u04e1\3\2\2\2\u00da\u04ef\3\2\2\2\u00dc\u050e\3\2"+ + "\2\2\u00de\u0511\3\2\2\2\u00e0\u0521\3\2\2\2\u00e2\u0527\3\2\2\2\u00e4"+ + "\u052a\3\2\2\2\u00e6\u052e\3\2\2\2\u00e8\u0534\3\2\2\2\u00ea\u0541\3\2"+ + "\2\2\u00ec\u054a\3\2\2\2\u00ee\u0569\3\2\2\2\u00f0\u056b\3\2\2\2\u00f2"+ + "\u0575\3\2\2\2\u00f4\u0586\3\2\2\2\u00f6\u0588\3\2\2\2\u00f8\u0591\3\2"+ + "\2\2\u00fa\u059a\3\2\2\2\u00fc\u05a0\3\2\2\2\u00fe\u05a8\3\2\2\2\u0100"+ + "\u05ee\3\2\2\2\u0102\u0647\3\2\2\2\u0104\u064a\3\2\2\2\u0106\u0659\3\2"+ + "\2\2\u0108\u0660\3\2\2\2\u010a\u0662\3\2\2\2\u010c\u066a\3\2\2\2\u010e"+ + "\u066c\3\2\2\2\u0110\u067b\3\2\2\2\u0112\u067d\3\2\2\2\u0114\u0681\3\2"+ + "\2\2\u0116\u0683\3\2\2\2\u0118\u0688\3\2\2\2\u011a\u068a\3\2\2\2\u011c"+ + "\u068c\3\2\2\2\u011e\u068f\3\2\2\2\u0120\u0696\3\2\2\2\u0122\u0123\7\17"+ + "\2\2\u0123\u0124\5\u0100\u0081\2\u0124\3\3\2\2\2\u0125\u0128\5\u00e6t"+ + "\2\u0126\u0128\5\u00ecw\2\u0127\u0125\3\2\2\2\u0127\u0126\3\2\2\2\u0128"+ + "\5\3\2\2\2\u0129\u012b\7 \2\2\u012a\u012c\5\b\5\2\u012b\u012a\3\2\2\2"+ + "\u012b\u012c\3\2\2\2\u012c\u012d\3\2\2\2\u012d\u012e\7!\2\2\u012e\7\3"+ + "\2\2\2\u012f\u0134\5\n\6\2\u0130\u0131\7\16\2\2\u0131\u0133\5\n\6\2\u0132"+ + "\u0130\3\2\2\2\u0133\u0136\3\2\2\2\u0134\u0132\3\2\2\2\u0134\u0135\3\2"+ + "\2\2\u0135\t\3\2\2\2\u0136\u0134\3\2\2\2\u0137\u0139\7~\2\2\u0138\u013a"+ + "\5\f\7\2\u0139\u0138\3\2\2\2\u0139\u013a\3\2\2\2\u013a\u013d\3\2\2\2\u013b"+ + "\u013d\5\6\4\2\u013c\u0137\3\2\2\2\u013c\u013b\3\2\2\2\u013d\13\3\2\2"+ + "\2\u013e\u013f\7`\2\2\u013f\u0140\5\24\13\2\u0140\r\3\2\2\2\u0141\u0143"+ + "\7 \2\2\u0142\u0144\5\20\t\2\u0143\u0142\3\2\2\2\u0143\u0144\3\2\2\2\u0144"+ + "\u0145\3\2\2\2\u0145\u0146\7!\2\2\u0146\17\3\2\2\2\u0147\u014c\5\22\n"+ + "\2\u0148\u0149\7\16\2\2\u0149\u014b\5\22\n\2\u014a\u0148\3\2\2\2\u014b"+ + "\u014e\3\2\2\2\u014c\u014a\3\2\2\2\u014c\u014d\3\2\2\2\u014d\21\3\2\2"+ + "\2\u014e\u014c\3\2\2\2\u014f\u0150\5\24\13\2\u0150\23\3\2\2\2\u0151\u0157"+ + "\5\26\f\2\u0152\u0157\5\64\33\2\u0153\u0157\5\66\34\2\u0154\u0157\5 \21"+ + "\2\u0155\u0157\7\177\2\2\u0156\u0151\3\2\2\2\u0156\u0152\3\2\2\2\u0156"+ + "\u0153\3\2\2\2\u0156\u0154\3\2\2\2\u0156\u0155\3\2\2\2\u0157\25\3\2\2"+ + "\2\u0158\u0159\b\f\1\2\u0159\u015a\5\30\r\2\u015a\u0163\3\2\2\2\u015b"+ + "\u015c\f\5\2\2\u015c\u015d\7*\2\2\u015d\u0162\5\26\f\6\u015e\u015f\f\4"+ + "\2\2\u015f\u0160\7(\2\2\u0160\u0162\5\26\f\5\u0161\u015b\3\2\2\2\u0161"+ + "\u015e\3\2\2\2\u0162\u0165\3\2\2\2\u0163\u0161\3\2\2\2\u0163\u0164\3\2"+ + "\2\2\u0164\27\3\2\2\2\u0165\u0163\3\2\2\2\u0166\u0167\b\r\1\2\u0167\u0168"+ + "\5\34\17\2\u0168\u0169\7|\2\2\u0169\u016a\5\30\r\3\u016a\u0179\3\2\2\2"+ + "\u016b\u016c\7\b\2\2\u016c\u016d\5\24\13\2\u016d\u016e\7\t\2\2\u016e\u0179"+ + "\3\2\2\2\u016f\u0179\5\32\16\2\u0170\u0179\5\34\17\2\u0171\u0179\5&\24"+ + "\2\u0172\u0173\7\6\2\2\u0173\u0174\5\62\32\2\u0174\u0175\7\7\2\2\u0175"+ + "\u0179\3\2\2\2\u0176\u0179\58\35\2\u0177\u0179\7R\2\2\u0178\u0166\3\2"+ + "\2\2\u0178\u016b\3\2\2\2\u0178\u016f\3\2\2\2\u0178\u0170\3\2\2\2\u0178"+ + "\u0171\3\2\2\2\u0178\u0172\3\2\2\2\u0178\u0176\3\2\2\2\u0178\u0177\3\2"+ + "\2\2\u0179\u0180\3\2\2\2\u017a\u017b\f\7\2\2\u017b\u017c\6\r\5\2\u017c"+ + "\u017d\7\6\2\2\u017d\u017f\7\7\2\2\u017e\u017a\3\2\2\2\u017f\u0182\3\2"+ + "\2\2\u0180\u017e\3\2\2\2\u0180\u0181\3\2\2\2\u0181\31\3\2\2\2\u0182\u0180"+ + "\3\2\2\2\u0183\u0184\t\2\2\2\u0184\33\3\2\2\2\u0185\u0187\5$\23\2\u0186"+ + "\u0188\5\36\20\2\u0187\u0186\3\2\2\2\u0187\u0188\3\2\2\2\u0188\35\3\2"+ + "\2\2\u0189\u018c\5\"\22\2\u018a\u018c\5 \21\2\u018b\u0189\3\2\2\2\u018b"+ + "\u018a\3\2\2\2\u018c\37\3\2\2\2\u018d\u018e\7 \2\2\u018e\u018f\5\20\t"+ + "\2\u018f\u0190\7!\2\2\u0190!\3\2\2\2\u0191\u0192\7 \2\2\u0192\u0193\5"+ + "\20\t\2\u0193\u0194\7 \2\2\u0194\u019a\5\20\t\2\u0195\u0196\7!\2\2\u0196"+ + "\u0197\5\4\3\2\u0197\u0198\7!\2\2\u0198\u019b\3\2\2\2\u0199\u019b\7\35"+ + "\2\2\u019a\u0195\3\2\2\2\u019a\u0199\3\2\2\2\u019b#\3\2\2\2\u019c\u019f"+ + "\7~\2\2\u019d\u019f\5l\67\2\u019e\u019c\3\2\2\2\u019e\u019d\3\2\2\2\u019f"+ + "%\3\2\2\2\u01a0\u01a2\7\n\2\2\u01a1\u01a3\5(\25\2\u01a2\u01a1\3\2\2\2"+ + "\u01a2\u01a3\3\2\2\2\u01a3\u01a4\3\2\2\2\u01a4\u01a5\7\f\2\2\u01a5\'\3"+ + "\2\2\2\u01a6\u01a8\5*\26\2\u01a7\u01a9\t\3\2\2\u01a8\u01a7\3\2\2\2\u01a8"+ + "\u01a9\3\2\2\2\u01a9)\3\2\2\2\u01aa\u01af\5,\27\2\u01ab\u01ac\t\3\2\2"+ + "\u01ac\u01ae\5,\27\2\u01ad\u01ab\3\2\2\2\u01ae\u01b1\3\2\2\2\u01af\u01ad"+ + "\3\2\2\2\u01af\u01b0\3\2\2\2\u01b0+\3\2\2\2\u01b1\u01af\3\2\2\2\u01b2"+ + "\u01bc\5<\37\2\u01b3\u01bc\5@!\2\u01b4\u01bc\5R*\2\u01b5\u01bc\5T+\2\u01b6"+ + "\u01b9\5V,\2\u01b7\u01b8\78\2\2\u01b8\u01ba\5\24\13\2\u01b9\u01b7\3\2"+ + "\2\2\u01b9\u01ba\3\2\2\2\u01ba\u01bc\3\2\2\2\u01bb\u01b2\3\2\2\2\u01bb"+ + "\u01b3\3\2\2\2\u01bb\u01b4\3\2\2\2\u01bb\u01b5\3\2\2\2\u01bb\u01b6\3\2"+ + "\2\2\u01bc-\3\2\2\2\u01bd\u01be\5\30\r\2\u01be\u01bf\6\30\6\2\u01bf\u01c0"+ + "\7\6\2\2\u01c0\u01c1\7\7\2\2\u01c1/\3\2\2\2\u01c2\u01c3\7\6\2\2\u01c3"+ + "\u01c4\5\62\32\2\u01c4\u01c5\7\7\2\2\u01c5\61\3\2\2\2\u01c6\u01cb\5\24"+ + "\13\2\u01c7\u01c8\7\16\2\2\u01c8\u01ca\5\24\13\2\u01c9\u01c7\3\2\2\2\u01ca"+ + "\u01cd\3\2\2\2\u01cb\u01c9\3\2\2\2\u01cb\u01cc\3\2\2\2\u01cc\63\3\2\2"+ + "\2\u01cd\u01cb\3\2\2\2\u01ce\u01d0\5\6\4\2\u01cf\u01ce\3\2\2\2\u01cf\u01d0"+ + "\3\2\2\2\u01d0\u01d1\3\2\2\2\u01d1\u01d3\7\b\2\2\u01d2\u01d4\5B\"\2\u01d3"+ + "\u01d2\3\2\2\2\u01d3\u01d4\3\2\2\2\u01d4\u01d5\3\2\2\2\u01d5\u01d6\7\t"+ + "\2\2\u01d6\u01d7\78\2\2\u01d7\u01d8\5\24\13\2\u01d8\65\3\2\2\2\u01d9\u01db"+ + "\7F\2\2\u01da\u01dc\5\6\4\2\u01db\u01da\3\2\2\2\u01db\u01dc\3\2\2\2\u01dc"+ + "\u01dd\3\2\2\2\u01dd\u01df\7\b\2\2\u01de\u01e0\5B\"\2\u01df\u01de\3\2"+ + "\2\2\u01df\u01e0\3\2\2\2\u01e0\u01e1\3\2\2\2\u01e1\u01e2\7\t\2\2\u01e2"+ + "\u01e3\78\2\2\u01e3\u01e4\5\24\13\2\u01e4\67\3\2\2\2\u01e5\u01e6\7C\2"+ + "\2\u01e6\u01e7\5:\36\2\u01e79\3\2\2\2\u01e8\u01f3\7~\2\2\u01e9\u01ea\5"+ + "\u0114\u008b\2\u01ea\u01eb\7\23\2\2\u01eb\u01ed\3\2\2\2\u01ec\u01e9\3"+ + "\2\2\2\u01ed\u01ee\3\2\2\2\u01ee\u01ec\3\2\2\2\u01ee\u01ef\3\2\2\2\u01ef"+ + "\u01f0\3\2\2\2\u01f0\u01f1\5\u0114\u008b\2\u01f1\u01f3\3\2\2\2\u01f2\u01e8"+ + "\3\2\2\2\u01f2\u01ec\3\2\2\2\u01f3;\3\2\2\2\u01f4\u01f6\7\\\2\2\u01f5"+ + "\u01f4\3\2\2\2\u01f5\u01f6\3\2\2\2\u01f6\u01f7\3\2\2\2\u01f7\u01f9\5\u00f4"+ + "{\2\u01f8\u01fa\7\20\2\2\u01f9\u01f8\3\2\2\2\u01f9\u01fa\3\2\2\2\u01fa"+ + "\u01fc\3\2\2\2\u01fb\u01fd\5> \2\u01fc\u01fb\3\2\2\2\u01fc\u01fd\3\2\2"+ + "\2\u01fd\u0200\3\2\2\2\u01fe\u01ff\78\2\2\u01ff\u0201\5\24\13\2\u0200"+ + "\u01fe\3\2\2\2\u0200\u0201\3\2\2\2\u0201=\3\2\2\2\u0202\u0203\7\21\2\2"+ + "\u0203\u0204\5\24\13\2\u0204?\3\2\2\2\u0205\u0207\5\6\4\2\u0206\u0205"+ + "\3\2\2\2\u0206\u0207\3\2\2\2\u0207\u0208\3\2\2\2\u0208\u020a\7\b\2\2\u0209"+ + "\u020b\5B\"\2\u020a\u0209\3\2\2\2\u020a\u020b\3\2\2\2\u020b\u020c\3\2"+ + "\2\2\u020c\u020e\7\t\2\2\u020d\u020f\5> \2\u020e\u020d\3\2\2\2\u020e\u020f"+ + "\3\2\2\2\u020fA\3\2\2\2\u0210\u021e\5J&\2\u0211\u0216\5F$\2\u0212\u0213"+ + "\7\16\2\2\u0213\u0215\5F$\2\u0214\u0212\3\2\2\2\u0215\u0218\3\2\2\2\u0216"+ + "\u0214\3\2\2\2\u0216\u0217\3\2\2\2\u0217\u021b\3\2\2\2\u0218\u0216\3\2"+ + "\2\2\u0219\u021a\7\16\2\2\u021a\u021c\5J&\2\u021b\u0219\3\2\2\2\u021b"+ + "\u021c\3\2\2\2\u021c\u021e\3\2\2\2\u021d\u0210\3\2\2\2\u021d\u0211\3\2"+ + "\2\2\u021eC\3\2\2\2\u021f\u0224\5L\'\2\u0220\u0221\7\16\2\2\u0221\u0223"+ + "\5L\'\2\u0222\u0220\3\2\2\2\u0223\u0226\3\2\2\2\u0224\u0222\3\2\2\2\u0224"+ + "\u0225\3\2\2\2\u0225E\3\2\2\2\u0226\u0224\3\2\2\2\u0227\u022a\5L\'\2\u0228"+ + "\u022a\5H%\2\u0229\u0227\3\2\2\2\u0229\u0228\3\2\2\2\u022aG\3\2\2\2\u022b"+ + "\u022d\5p9\2\u022c\u022b\3\2\2\2\u022c\u022d\3\2\2\2\u022d\u022f\3\2\2"+ + "\2\u022e\u0230\5N(\2\u022f\u022e\3\2\2\2\u022f\u0230\3\2\2\2\u0230\u0231"+ + "\3\2\2\2\u0231\u023a\5P)\2\u0232\u0234\7\20\2\2\u0233\u0235\5> \2\u0234"+ + "\u0233\3\2\2\2\u0234\u0235\3\2\2\2\u0235\u023b\3\2\2\2\u0236\u0238\5>"+ + " \2\u0237\u0236\3\2\2\2\u0237\u0238\3\2\2\2\u0238\u0239\3\2\2\2\u0239"+ + "\u023b\5\2\2\2\u023a\u0232\3\2\2\2\u023a\u0237\3\2\2\2\u023bI\3\2\2\2"+ + "\u023c\u023d\7\22\2\2\u023d\u023f\5\u0100\u0081\2\u023e\u0240\5> \2\u023f"+ + "\u023e\3\2\2\2\u023f\u0240\3\2\2\2\u0240K\3\2\2\2\u0241\u0243\5p9\2\u0242"+ + "\u0241\3\2\2\2\u0242\u0243\3\2\2\2\u0243\u0245\3\2\2\2\u0244\u0246\5N"+ + "(\2\u0245\u0244\3\2\2\2\u0245\u0246\3\2\2\2\u0246\u0247\3\2\2\2\u0247"+ + "\u0249\5P)\2\u0248\u024a\5> \2\u0249\u0248\3\2\2\2\u0249\u024a\3\2\2\2"+ + "\u024aM\3\2\2\2\u024b\u024c\t\4\2\2\u024cO\3\2\2\2\u024d\u0250\5\u0114"+ + "\u008b\2\u024e\u0250\5\4\3\2\u024f\u024d\3\2\2\2\u024f\u024e\3\2\2\2\u0250"+ + "Q\3\2\2\2\u0251\u0253\7F\2\2\u0252\u0254\5\6\4\2\u0253\u0252\3\2\2\2\u0253"+ + "\u0254\3\2\2\2\u0254\u0255\3\2\2\2\u0255\u0257\7\b\2\2\u0256\u0258\5B"+ + "\"\2\u0257\u0256\3\2\2\2\u0257\u0258\3\2\2\2\u0258\u0259\3\2\2\2\u0259"+ + "\u025b\7\t\2\2\u025a\u025c\5> \2\u025b\u025a\3\2\2\2\u025b\u025c\3\2\2"+ + "\2\u025cS\3\2\2\2\u025d\u025e\7\6\2\2\u025e\u025f\7~\2\2\u025f\u0260\7"+ + "\21\2\2\u0260\u0261\t\5\2\2\u0261\u0262\7\7\2\2\u0262\u0263\5> \2\u0263"+ + "U\3\2\2\2\u0264\u0266\5\u00f4{\2\u0265\u0267\7\20\2\2\u0266\u0265\3\2"+ + "\2\2\u0266\u0267\3\2\2\2\u0267\u0268\3\2\2\2\u0268\u0269\5@!\2\u0269W"+ + "\3\2\2\2\u026a\u026b\7s\2\2\u026b\u026d\7~\2\2\u026c\u026e\5\6\4\2\u026d"+ + "\u026c\3\2\2\2\u026d\u026e\3\2\2\2\u026e\u026f\3\2\2\2\u026f\u0270\7\17"+ + "\2\2\u0270\u0271\5\24\13\2\u0271\u0272\7\r\2\2\u0272Y\3\2\2\2\u0273\u0275"+ + "\5N(\2\u0274\u0273\3\2\2\2\u0274\u0275\3\2\2\2\u0275\u0276\3\2\2\2\u0276"+ + "\u0277\7v\2\2\u0277\u0279\7\b\2\2\u0278\u027a\5\u00dco\2\u0279\u0278\3"+ + "\2\2\2\u0279\u027a\3\2\2\2\u027a\u027b\3\2\2\2\u027b\u0281\7\t\2\2\u027c"+ + "\u027d\7\n\2\2\u027d\u027e\5\u00e2r\2\u027e\u027f\7\f\2\2\u027f\u0282"+ + "\3\2\2\2\u0280\u0282\7\r\2\2\u0281\u027c\3\2\2\2\u0281\u0280\3\2\2\2\u0281"+ + "\u0282\3\2\2\2\u0282[\3\2\2\2\u0283\u0285\7c\2\2\u0284\u0283\3\2\2\2\u0284"+ + "\u0285\3\2\2\2\u0285\u0287\3\2\2\2\u0286\u0288\7z\2\2\u0287\u0286\3\2"+ + "\2\2\u0287\u0288\3\2\2\2\u0288\u0289\3\2\2\2\u0289\u028a\7i\2\2\u028a"+ + "\u028c\7~\2\2\u028b\u028d\5\6\4\2\u028c\u028b\3\2\2\2\u028c\u028d\3\2"+ + "\2\2\u028d\u028f\3\2\2\2\u028e\u0290\5^\60\2\u028f\u028e\3\2\2\2\u028f"+ + "\u0290\3\2\2\2\u0290\u0291\3\2\2\2\u0291\u0293\5&\24\2\u0292\u0294\7\r"+ + "\2\2\u0293\u0292\3\2\2\2\u0293\u0294\3\2\2\2\u0294]\3\2\2\2\u0295\u0296"+ + "\7`\2\2\u0296\u0297\5`\61\2\u0297_\3\2\2\2\u0298\u029d\5\34\17\2\u0299"+ + "\u029a\7\16\2\2\u029a\u029c\5\34\17\2\u029b\u0299\3\2\2\2\u029c\u029f"+ + "\3\2\2\2\u029d\u029b\3\2\2\2\u029d\u029e\3\2\2\2\u029ea\3\2\2\2\u029f"+ + "\u029d\3\2\2\2\u02a0\u02a2\7b\2\2\u02a1\u02a0\3\2\2\2\u02a1\u02a2\3\2"+ + "\2\2\u02a2\u02a3\3\2\2\2\u02a3\u02a4\7_\2\2\u02a4\u02a5\7~\2\2\u02a5\u02a7"+ + "\7\n\2\2\u02a6\u02a8\5d\63\2\u02a7\u02a6\3\2\2\2\u02a7\u02a8\3\2\2\2\u02a8"+ + "\u02a9\3\2\2\2\u02a9\u02aa\7\f\2\2\u02aac\3\2\2\2\u02ab\u02ad\5f\64\2"+ + "\u02ac\u02ae\7\16\2\2\u02ad\u02ac\3\2\2\2\u02ad\u02ae\3\2\2\2\u02aee\3"+ + "\2\2\2\u02af\u02b4\5h\65\2\u02b0\u02b1\7\16\2\2\u02b1\u02b3\5h\65\2\u02b2"+ + "\u02b0\3\2\2\2\u02b3\u02b6\3\2\2\2\u02b4\u02b2\3\2\2\2\u02b4\u02b5\3\2"+ + "\2\2\u02b5g\3\2\2\2\u02b6\u02b4\3\2\2\2\u02b7\u02ba\5\u00f4{\2\u02b8\u02b9"+ + "\7\17\2\2\u02b9\u02bb\5\u0100\u0081\2\u02ba\u02b8\3\2\2\2\u02ba\u02bb"+ + "\3\2\2\2\u02bbi\3\2\2\2\u02bc\u02bd\7w\2\2\u02bd\u02be\5l\67\2\u02be\u02c0"+ + "\7\n\2\2\u02bf\u02c1\5\u0080A\2\u02c0\u02bf\3\2\2\2\u02c0\u02c1\3\2\2"+ + "\2\u02c1\u02c2\3\2\2\2\u02c2\u02c3\7\f\2\2\u02c3k\3\2\2\2\u02c4\u02cd"+ + "\7~\2\2\u02c5\u02c7\7\23\2\2\u02c6\u02c5\3\2\2\2\u02c7\u02c8\3\2\2\2\u02c8"+ + "\u02c6\3\2\2\2\u02c8\u02c9\3\2\2\2\u02c9\u02ca\3\2\2\2\u02ca\u02cc\7~"+ + "\2\2\u02cb\u02c6\3\2\2\2\u02cc\u02cf\3\2\2\2\u02cd\u02cb\3\2\2\2\u02cd"+ + "\u02ce\3\2\2\2\u02cem\3\2\2\2\u02cf\u02cd\3\2\2\2\u02d0\u02d1\7~\2\2\u02d1"+ + "\u02d2\7\17\2\2\u02d2\u02d3\5l\67\2\u02d3\u02d4\7\r\2\2\u02d4o\3\2\2\2"+ + "\u02d5\u02d7\5r:\2\u02d6\u02d5\3\2\2\2\u02d7\u02d8\3\2\2\2\u02d8\u02d6"+ + "\3\2\2\2\u02d8\u02d9\3\2\2\2\u02d9q\3\2\2\2\u02da\u02dd\7}\2\2\u02db\u02de"+ + "\5t;\2\u02dc\u02de\5v<\2\u02dd\u02db\3\2\2\2\u02dd\u02dc\3\2\2\2\u02de"+ + "s\3\2\2\2\u02df\u02e0\b;\1\2\u02e0\u02e6\7~\2\2\u02e1\u02e2\7\b\2\2\u02e2"+ + "\u02e3\5\u0100\u0081\2\u02e3\u02e4\7\t\2\2\u02e4\u02e6\3\2\2\2\u02e5\u02df"+ + "\3\2\2\2\u02e5\u02e1\3\2\2\2\u02e6\u02ec\3\2\2\2\u02e7\u02e8\f\4\2\2\u02e8"+ + "\u02e9\7\23\2\2\u02e9\u02eb\5\u0114\u008b\2\u02ea\u02e7\3\2\2\2\u02eb"+ + "\u02ee\3\2\2\2\u02ec\u02ea\3\2\2\2\u02ec\u02ed\3\2\2\2\u02edu\3\2\2\2"+ + "\u02ee\u02ec\3\2\2\2\u02ef\u02f0\5t;\2\u02f0\u02f1\5\u00f6|\2\u02f1w\3"+ + "\2\2\2\u02f2\u02f4\5\u00e4s\2\u02f3\u02f2\3\2\2\2\u02f3\u02f4\3\2\2\2"+ + "\u02f4\u02f5\3\2\2\2\u02f5\u02f6\7\2\2\3\u02f6y\3\2\2\2\u02f7\u02f9\7"+ + "c\2\2\u02f8\u02f7\3\2\2\2\u02f8\u02f9\3\2\2\2\u02f9\u02fa\3\2\2\2\u02fa"+ + "\u02fb\5|?\2\u02fb{\3\2\2\2\u02fc\u031a\5~@\2\u02fd\u031a\5\u0084C\2\u02fe"+ + "\u031a\5\u008aF\2\u02ff\u031a\5\u0092J\2\u0300\u031a\5\u0082B\2\u0301"+ + "\u031a\5\u00be`\2\u0302\u031a\5\\/\2\u0303\u031a\5j\66\2\u0304\u031a\5"+ + "\u0096L\2\u0305\u031a\5\u0098M\2\u0306\u031a\5\u009cO\2\u0307\u031a\5"+ + "\u009eP\2\u0308\u031a\5\u00a0Q\2\u0309\u031a\5\u00a2R\2\u030a\u031a\5"+ + "\u00a4S\2\u030b\u031a\5\u00b0Y\2\u030c\u031a\5\u00a6T\2\u030d\u031a\5"+ + "\u00b2Z\2\u030e\u031a\5\u00b4[\2\u030f\u031a\5\u00ba^\2\u0310\u031a\5"+ + "\u00bc_\2\u0311\u031a\5\u0104\u0083\2\u0312\u031a\5\u00d2j\2\u0313\u031a"+ + "\5\u008cG\2\u0314\u031a\5X-\2\u0315\u031a\5b\62\2\u0316\u031a\5\u0094"+ + "K\2\u0317\u0318\7c\2\2\u0318\u031a\5|?\2\u0319\u02fc\3\2\2\2\u0319\u02fd"+ + "\3\2\2\2\u0319\u02fe\3\2\2\2\u0319\u02ff\3\2\2\2\u0319\u0300\3\2\2\2\u0319"+ + "\u0301\3\2\2\2\u0319\u0302\3\2\2\2\u0319\u0303\3\2\2\2\u0319\u0304\3\2"+ + "\2\2\u0319\u0305\3\2\2\2\u0319\u0306\3\2\2\2\u0319\u0307\3\2\2\2\u0319"+ + "\u0308\3\2\2\2\u0319\u0309\3\2\2\2\u0319\u030a\3\2\2\2\u0319\u030b\3\2"+ + "\2\2\u0319\u030c\3\2\2\2\u0319\u030d\3\2\2\2\u0319\u030e\3\2\2\2\u0319"+ + "\u030f\3\2\2\2\u0319\u0310\3\2\2\2\u0319\u0311\3\2\2\2\u0319\u0312\3\2"+ + "\2\2\u0319\u0313\3\2\2\2\u0319\u0314\3\2\2\2\u0319\u0315\3\2\2\2\u0319"+ + "\u0316\3\2\2\2\u0319\u0317\3\2\2\2\u031a}\3\2\2\2\u031b\u031d\7\n\2\2"+ + "\u031c\u031e\5\u0080A\2\u031d\u031c\3\2\2\2\u031d\u031e\3\2\2\2\u031e"+ + "\u031f\3\2\2\2\u031f\u0320\7\f\2\2\u0320\177\3\2\2\2\u0321\u0323\5|?\2"+ + "\u0322\u0321\3\2\2\2\u0323\u0324\3\2\2\2\u0324\u0322\3\2\2\2\u0324\u0325"+ + "\3\2\2\2\u0325\u0081\3\2\2\2\u0326\u032a\7{\2\2\u0327\u0328\7~\2\2\u0328"+ + "\u032b\5@!\2\u0329\u032b\5\u008cG\2\u032a\u0327\3\2\2\2\u032a\u0329\3"+ + "\2\2\2\u032b\u032c\3\2\2\2\u032c\u032d\5\u0120\u0091\2\u032d\u0083\3\2"+ + "\2\2\u032e\u0331\7d\2\2\u032f\u0332\5\u0086D\2\u0330\u0332\5n8\2\u0331"+ + "\u032f\3\2\2\2\u0331\u0330\3\2\2\2\u0332\u0085\3\2\2\2\u0333\u0336\7\32"+ + "\2\2\u0334\u0336\5\u0088E\2\u0335\u0333\3\2\2\2\u0335\u0334\3\2\2\2\u0336"+ + "\u0339\3\2\2\2\u0337\u0338\7Z\2\2\u0338\u033a\5\u0114\u008b\2\u0339\u0337"+ + "\3\2\2\2\u0339\u033a\3\2\2\2\u033a\u033b\3\2\2\2\u033b\u033c\7[\2\2\u033c"+ + "\u033d\7\177\2\2\u033d\u033e\5\u0120\u0091\2\u033e\u0087\3\2\2\2\u033f"+ + "\u0340\5\u0114\u008b\2\u0340\u0341\7\16\2\2\u0341\u0343\3\2\2\2\u0342"+ + "\u033f\3\2\2\2\u0342\u0343\3\2\2\2\u0343\u0344\3\2\2\2\u0344\u0345\7\n"+ + "\2\2\u0345\u034a\5\u0114\u008b\2\u0346\u0347\7\16\2\2\u0347\u0349\5\u0114"+ + "\u008b\2\u0348\u0346\3\2\2\2\u0349\u034c\3\2\2\2\u034a\u0348\3\2\2\2\u034a"+ + "\u034b\3\2\2\2\u034b\u034d\3\2\2\2\u034c\u034a\3\2\2\2\u034d\u034e\7\f"+ + "\2\2\u034e\u0089\3\2\2\2\u034f\u0351\7c\2\2\u0350\u0352\7T\2\2\u0351\u0350"+ + "\3\2\2\2\u0351\u0352\3\2\2\2\u0352\u0355\3\2\2\2\u0353\u0356\5\u0086D"+ + "\2\u0354\u0356\5|?\2\u0355\u0353\3\2\2\2\u0355\u0354\3\2\2\2\u0356\u008b"+ + "\3\2\2\2\u0357\u0359\5\4\3\2\u0358\u035a\5> \2\u0359\u0358\3\2\2\2\u0359"+ + "\u035a\3\2\2\2\u035a\u035b\3\2\2\2\u035b\u035d\5\2\2\2\u035c\u035e\7\r"+ + "\2\2\u035d\u035c\3\2\2\2\u035d\u035e\3\2\2\2\u035e\u0375\3\2\2\2\u035f"+ + "\u0361\5N(\2\u0360\u035f\3\2\2\2\u0360\u0361\3\2\2\2\u0361\u0363\3\2\2"+ + "\2\u0362\u0364\5\u009aN\2\u0363\u0362\3\2\2\2\u0363\u0364\3\2\2\2\u0364"+ + "\u0366\3\2\2\2\u0365\u0367\7\\\2\2\u0366\u0365\3\2\2\2\u0366\u0367\3\2"+ + "\2\2\u0367\u0368\3\2\2\2\u0368\u036a\5\u008eH\2\u0369\u036b\7\r\2\2\u036a"+ + "\u0369\3\2\2\2\u036a\u036b\3\2\2\2\u036b\u0375\3\2\2\2\u036c\u036e\7z"+ + "\2\2\u036d\u036f\5\u009aN\2\u036e\u036d\3\2\2\2\u036e\u036f\3\2\2\2\u036f"+ + "\u0370\3\2\2\2\u0370\u0372\5\u008eH\2\u0371\u0373\7\r\2\2\u0372\u0371"+ + "\3\2\2\2\u0372\u0373\3\2\2\2\u0373\u0375\3\2\2\2\u0374\u0357\3\2\2\2\u0374"+ + "\u0360\3\2\2\2\u0374\u036c\3\2\2\2\u0375\u008d\3\2\2\2\u0376\u037b\5\u0090"+ + "I\2\u0377\u0378\7\16\2\2\u0378\u037a\5\u0090I\2\u0379\u0377\3\2\2\2\u037a"+ + "\u037d\3\2\2\2\u037b\u0379\3\2\2\2\u037b\u037c\3\2\2\2\u037c\u008f\3\2"+ + "\2\2\u037d\u037b\3\2\2\2\u037e\u0382\5\u0116\u008c\2\u037f\u0382\5\u00e6"+ + "t\2\u0380\u0382\5\u00ecw\2\u0381\u037e\3\2\2\2\u0381\u037f\3\2\2\2\u0381"+ + "\u0380\3\2\2\2\u0382\u0384\3\2\2\2\u0383\u0385\5> \2\u0384\u0383\3\2\2"+ + "\2\u0384\u0385\3\2\2\2\u0385\u0387\3\2\2\2\u0386\u0388\5\u0100\u0081\2"+ + "\u0387\u0386\3\2\2\2\u0387\u0388\3\2\2\2\u0388\u038e\3\2\2\2\u0389\u038b"+ + "\7\17\2\2\u038a\u038c\5\6\4\2\u038b\u038a\3\2\2\2\u038b\u038c\3\2\2\2"+ + "\u038c\u038d\3\2\2\2\u038d\u038f\5\u0100\u0081\2\u038e\u0389\3\2\2\2\u038e"+ + "\u038f\3\2\2\2\u038f\u0091\3\2\2\2\u0390\u0391\7\r\2\2\u0391\u0093\3\2"+ + "\2\2\u0392\u0393\6K\b\2\u0393\u0395\5\u00fc\177\2\u0394\u0396\7\r\2\2"+ + "\u0395\u0394\3\2\2\2\u0395\u0396\3\2\2\2\u0396\u0095\3\2\2\2\u0397\u0398"+ + "\7U\2\2\u0398\u0399\7\b\2\2\u0399\u039a\5\u00fc\177\2\u039a\u039b\7\t"+ + "\2\2\u039b\u039e\5|?\2\u039c\u039d\7E\2\2\u039d\u039f\5|?\2\u039e\u039c"+ + "\3\2\2\2\u039e\u039f\3\2\2\2\u039f\u0097\3\2\2\2\u03a0\u03a1\7A\2\2\u03a1"+ + "\u03a2\5|?\2\u03a2\u03a3\7O\2\2\u03a3\u03a4\7\b\2\2\u03a4\u03a5\5\u00fc"+ + "\177\2\u03a5\u03a6\7\t\2\2\u03a6\u03a7\5\u0120\u0091\2\u03a7\u03e6\3\2"+ + "\2\2\u03a8\u03a9\7O\2\2\u03a9\u03aa\7\b\2\2\u03aa\u03ab\5\u00fc\177\2"+ + "\u03ab\u03ac\7\t\2\2\u03ac\u03ad\5|?\2\u03ad\u03e6\3\2\2\2\u03ae\u03af"+ + "\7M\2\2\u03af\u03b1\7\b\2\2\u03b0\u03b2\5\u00fc\177\2\u03b1\u03b0\3\2"+ + "\2\2\u03b1\u03b2\3\2\2\2\u03b2\u03b3\3\2\2\2\u03b3\u03b5\7\r\2\2\u03b4"+ + "\u03b6\5\u00fc\177\2\u03b5\u03b4\3\2\2\2\u03b5\u03b6\3\2\2\2\u03b6\u03b7"+ + "\3\2\2\2\u03b7\u03b9\7\r\2\2\u03b8\u03ba\5\u00fc\177\2\u03b9\u03b8\3\2"+ + "\2\2\u03b9\u03ba\3\2\2\2\u03ba\u03bb\3\2\2\2\u03bb\u03bc\7\t\2\2\u03bc"+ + "\u03e6\5|?\2\u03bd\u03be\7M\2\2\u03be\u03bf\7\b\2\2\u03bf\u03c0\5\u009a"+ + "N\2\u03c0\u03c1\5\u008eH\2\u03c1\u03c3\7\r\2\2\u03c2\u03c4\5\u00fc\177"+ + "\2\u03c3\u03c2\3\2\2\2\u03c3\u03c4\3\2\2\2\u03c4\u03c5\3\2\2\2\u03c5\u03c7"+ + "\7\r\2\2\u03c6\u03c8\5\u00fc\177\2\u03c7\u03c6\3\2\2\2\u03c7\u03c8\3\2"+ + "\2\2\u03c8\u03c9\3\2\2\2\u03c9\u03ca\7\t\2\2\u03ca\u03cb\5|?\2\u03cb\u03e6"+ + "\3\2\2\2\u03cc\u03cd\7M\2\2\u03cd\u03ce\7\b\2\2\u03ce\u03d2\5\u0100\u0081"+ + "\2\u03cf\u03d3\7X\2\2\u03d0\u03d1\7~\2\2\u03d1\u03d3\6M\t\2\u03d2\u03cf"+ + "\3\2\2\2\u03d2\u03d0\3\2\2\2\u03d3\u03d4\3\2\2\2\u03d4\u03d5\5\u00fc\177"+ + "\2\u03d5\u03d6\7\t\2\2\u03d6\u03d7\5|?\2\u03d7\u03e6\3\2\2\2\u03d8\u03d9"+ + "\7M\2\2\u03d9\u03da\7\b\2\2\u03da\u03db\5\u009aN\2\u03db\u03df\5\u0090"+ + "I\2\u03dc\u03e0\7X\2\2\u03dd\u03de\7~\2\2\u03de\u03e0\6M\n\2\u03df\u03dc"+ + "\3\2\2\2\u03df\u03dd\3\2\2\2\u03e0\u03e1\3\2\2\2\u03e1\u03e2\5\u00fc\177"+ + "\2\u03e2\u03e3\7\t\2\2\u03e3\u03e4\5|?\2\u03e4\u03e6\3\2\2\2\u03e5\u03a0"+ + "\3\2\2\2\u03e5\u03a8\3\2\2\2\u03e5\u03ae\3\2\2\2\u03e5\u03bd\3\2\2\2\u03e5"+ + "\u03cc\3\2\2\2\u03e5\u03d8\3\2\2\2\u03e6\u0099\3\2\2\2\u03e7\u03e8\t\6"+ + "\2\2\u03e8\u009b\3\2\2\2\u03e9\u03ec\7L\2\2\u03ea\u03eb\6O\13\2\u03eb"+ + "\u03ed\7~\2\2\u03ec\u03ea\3\2\2\2\u03ec\u03ed\3\2\2\2\u03ed\u03ee\3\2"+ + "\2\2\u03ee\u03ef\5\u0120\u0091\2\u03ef\u009d\3\2\2\2\u03f0\u03f3\7@\2"+ + "\2\u03f1\u03f2\6P\f\2\u03f2\u03f4\7~\2\2\u03f3\u03f1\3\2\2\2\u03f3\u03f4"+ + "\3\2\2\2\u03f4\u03f5\3\2\2\2\u03f5\u03f6\5\u0120\u0091\2\u03f6\u009f\3"+ + "\2\2\2\u03f7\u03fa\7J\2\2\u03f8\u03f9\6Q\r\2\u03f9\u03fb\5\u00fc\177\2"+ + "\u03fa\u03f8\3\2\2\2\u03fa\u03fb\3\2\2\2\u03fb\u03fc\3\2\2\2\u03fc\u03fd"+ + "\5\u0120\u0091\2\u03fd\u00a1\3\2\2\2\u03fe\u0401\7m\2\2\u03ff\u0400\6"+ + "R\16\2\u0400\u0402\5\u00fc\177\2\u0401\u03ff\3\2\2\2\u0401\u0402\3\2\2"+ + "\2\u0402\u0403\3\2\2\2\u0403\u0404\5\u0120\u0091\2\u0404\u00a3\3\2\2\2"+ + "\u0405\u0406\7S\2\2\u0406\u0407\7\b\2\2\u0407\u0408\5\u00fc\177\2\u0408"+ + "\u0409\7\t\2\2\u0409\u040a\5|?\2\u040a\u00a5\3\2\2\2\u040b\u040c\7N\2"+ + "\2\u040c\u040d\7\b\2\2\u040d\u040e\5\u00fc\177\2\u040e\u040f\7\t\2\2\u040f"+ + "\u0410\5\u00a8U\2\u0410\u00a7\3\2\2\2\u0411\u0413\7\n\2\2\u0412\u0414"+ + "\5\u00aaV\2\u0413\u0412\3\2\2\2\u0413\u0414\3\2\2\2\u0414\u0419\3\2\2"+ + "\2\u0415\u0417\5\u00aeX\2\u0416\u0418\5\u00aaV\2\u0417\u0416\3\2\2\2\u0417"+ + "\u0418\3\2\2\2\u0418\u041a\3\2\2\2\u0419\u0415\3\2\2\2\u0419\u041a\3\2"+ + "\2\2\u041a\u041b\3\2\2\2\u041b\u041c\7\f\2\2\u041c\u00a9\3\2\2\2\u041d"+ + "\u041f\5\u00acW\2\u041e\u041d\3\2\2\2\u041f\u0420\3\2\2\2\u0420\u041e"+ + "\3\2\2\2\u0420\u0421\3\2\2\2\u0421\u00ab\3\2\2\2\u0422\u0423\7D\2\2\u0423"+ + "\u0424\5\u00fc\177\2\u0424\u0426\7\21\2\2\u0425\u0427\5\u0080A\2\u0426"+ + "\u0425\3\2\2\2\u0426\u0427\3\2\2\2\u0427\u00ad\3\2\2\2\u0428\u0429\7T"+ + "\2\2\u0429\u042b\7\21\2\2\u042a\u042c\5\u0080A\2\u042b\u042a\3\2\2\2\u042b"+ + "\u042c\3\2\2\2\u042c\u00af\3\2\2\2\u042d\u042e\7~\2\2\u042e\u042f\7\21"+ + "\2\2\u042f\u0430\5|?\2\u0430\u00b1\3\2\2\2\u0431\u0432\7V\2\2\u0432\u0433"+ + "\6Z\17\2\u0433\u0434\5\u00fc\177\2\u0434\u0435\5\u0120\u0091\2\u0435\u00b3"+ + "\3\2\2\2\u0436\u0437\7Y\2\2\u0437\u043d\5~@\2\u0438\u043a\5\u00b6\\\2"+ + "\u0439\u043b\5\u00b8]\2\u043a\u0439\3\2\2\2\u043a\u043b\3\2\2\2\u043b"+ + "\u043e\3\2\2\2\u043c\u043e\5\u00b8]\2\u043d\u0438\3\2\2\2\u043d\u043c"+ + "\3\2\2\2\u043e\u00b5\3\2\2\2\u043f\u0440\7H\2\2\u0440\u0441\7\b\2\2\u0441"+ + "\u0442\7~\2\2\u0442\u0443\7\t\2\2\u0443\u0444\5~@\2\u0444\u00b7\3\2\2"+ + "\2\u0445\u0446\7I\2\2\u0446\u0447\5~@\2\u0447\u00b9\3\2\2\2\u0448\u0449"+ + "\7P\2\2\u0449\u044a\5\u0120\u0091\2\u044a\u00bb\3\2\2\2\u044b\u044c\7"+ + "Q\2\2\u044c\u044d\7~\2\2\u044d\u0453\5@!\2\u044e\u044f\7\n\2\2\u044f\u0450"+ + "\5\u00e2r\2\u0450\u0451\7\f\2\2\u0451\u0454\3\2\2\2\u0452\u0454\7\r\2"+ + "\2\u0453\u044e\3\2\2\2\u0453\u0452\3\2\2\2\u0454\u00bd\3\2\2\2\u0455\u0457"+ + "\5p9\2\u0456\u0455\3\2\2\2\u0456\u0457\3\2\2\2\u0457\u045c\3\2\2\2\u0458"+ + "\u045a\7c\2\2\u0459\u045b\7T\2\2\u045a\u0459\3\2\2\2\u045a\u045b\3\2\2"+ + "\2\u045b\u045d\3\2\2\2\u045c\u0458\3\2\2\2\u045c\u045d\3\2\2\2\u045d\u045f"+ + "\3\2\2\2\u045e\u0460\7{\2\2\u045f\u045e\3\2\2\2\u045f\u0460\3\2\2\2\u0460"+ + "\u0461\3\2\2\2\u0461\u0462\7^\2\2\u0462\u0464\7~\2\2\u0463\u0465\5\6\4"+ + "\2\u0464\u0463\3\2\2\2\u0464\u0465\3\2\2\2\u0465\u0466\3\2\2\2\u0466\u0467"+ + "\5\u00c0a\2\u0467\u0468\5\u00c2b\2\u0468\u00bf\3\2\2\2\u0469\u046b\5\u00c4"+ + "c\2\u046a\u0469\3\2\2\2\u046a\u046b\3\2\2\2\u046b\u046d\3\2\2\2\u046c"+ + "\u046e\5\u00c6d\2\u046d\u046c\3\2\2\2\u046d\u046e\3\2\2\2\u046e\u00c1"+ + "\3\2\2\2\u046f\u0473\7\n\2\2\u0470\u0472\5\u00c8e\2\u0471\u0470\3\2\2"+ + "\2\u0472\u0475\3\2\2\2\u0473\u0471\3\2\2\2\u0473\u0474\3\2\2\2\u0474\u0476"+ + "\3\2\2\2\u0475\u0473\3\2\2\2\u0476\u0477\7\f\2\2\u0477\u00c3\3\2\2\2\u0478"+ + "\u0479\7`\2\2\u0479\u047a\5\34\17\2\u047a\u00c5\3\2\2\2\u047b\u047c\7"+ + "e\2\2\u047c\u047d\5`\61\2\u047d\u00c7\3\2\2\2\u047e\u0486\5Z.\2\u047f"+ + "\u0481\5p9\2\u0480\u047f\3\2\2\2\u0480\u0481\3\2\2\2\u0481\u0482\3\2\2"+ + "\2\u0482\u0486\5\u00caf\2\u0483\u0486\5\u00ceh\2\u0484\u0486\5|?\2\u0485"+ + "\u047e\3\2\2\2\u0485\u0480\3\2\2\2\u0485\u0483\3\2\2\2\u0485\u0484\3\2"+ + "\2\2\u0486\u00c9\3\2\2\2\u0487\u0488\5\u00ccg\2\u0488\u048a\5\u00f4{\2"+ + "\u0489\u048b\7\20\2\2\u048a\u0489\3\2\2\2\u048a\u048b\3\2\2\2\u048b\u048d"+ + "\3\2\2\2\u048c\u048e\5> \2\u048d\u048c\3\2\2\2\u048d\u048e\3\2\2\2\u048e"+ + "\u0490\3\2\2\2\u048f\u0491\5\2\2\2\u0490\u048f\3\2\2\2\u0490\u0491\3\2"+ + "\2\2\u0491\u0492\3\2\2\2\u0492\u0493\7\r\2\2\u0493\u04a5\3\2\2\2\u0494"+ + "\u0495\5\u00ccg\2\u0495\u0496\5\u00f4{\2\u0496\u049c\5@!\2\u0497\u0498"+ + "\7\n\2\2\u0498\u0499\5\u00e2r\2\u0499\u049a\7\f\2\2\u049a\u049d\3\2\2"+ + "\2\u049b\u049d\7\r\2\2\u049c\u0497\3\2\2\2\u049c\u049b\3\2\2\2\u049d\u04a5"+ + "\3\2\2\2\u049e\u04a1\5\u00ccg\2\u049f\u04a2\5\u00f0y\2\u04a0\u04a2\5\u00f2"+ + "z\2\u04a1\u049f\3\2\2\2\u04a1\u04a0\3\2\2\2\u04a2\u04a5\3\2\2\2\u04a3"+ + "\u04a5\5\u0082B\2\u04a4\u0487\3\2\2\2\u04a4\u0494\3\2\2\2\u04a4\u049e"+ + "\3\2\2\2\u04a4\u04a3\3\2\2\2\u04a5\u00cb\3\2\2\2\u04a6\u04a8\5N(\2\u04a7"+ + "\u04a6\3\2\2\2\u04a7\u04a8\3\2\2\2\u04a8\u04aa\3\2\2\2\u04a9\u04ab\7]"+ + "\2\2\u04aa\u04a9\3\2\2\2\u04aa\u04ab\3\2\2\2\u04ab\u04ad\3\2\2\2\u04ac"+ + "\u04ae\7l\2\2\u04ad\u04ac\3\2\2\2\u04ad\u04ae\3\2\2\2\u04ae\u04b0\3\2"+ + "\2\2\u04af\u04b1\7\\\2\2\u04b0\u04af\3\2\2\2\u04b0\u04b1\3\2\2\2\u04b1"+ + "\u00cd\3\2\2\2\u04b2\u04b3\5T+\2\u04b3\u04b4\7\r\2\2\u04b4\u00cf\3\2\2"+ + "\2\u04b5\u04b7\7\32\2\2\u04b6\u04b5\3\2\2\2\u04b6\u04b7\3\2\2\2\u04b7"+ + "\u04b8\3\2\2\2\u04b8\u04b9\7~\2\2\u04b9\u04bb\7\b\2\2\u04ba\u04bc\5\u00dc"+ + "o\2\u04bb\u04ba\3\2\2\2\u04bb\u04bc\3\2\2\2\u04bc\u04bd\3\2\2\2\u04bd"+ + "\u04be\7\t\2\2\u04be\u04bf\7\n\2\2\u04bf\u04c0\5\u00e2r\2\u04c0\u04c1"+ + "\7\f\2\2\u04c1\u00d1\3\2\2\2\u04c2\u04c3\7Q\2\2\u04c3\u04c5\7\32\2\2\u04c4"+ + "\u04c6\7~\2\2\u04c5\u04c4\3\2\2\2\u04c5\u04c6\3\2\2\2\u04c6\u04c7\3\2"+ + "\2\2\u04c7\u04c9\7\b\2\2\u04c8\u04ca\5\u00dco\2\u04c9\u04c8\3\2\2\2\u04c9"+ + "\u04ca\3\2\2\2\u04ca\u04cb\3\2\2\2\u04cb\u04cc\7\t\2\2\u04cc\u04cd\7\n"+ + "\2\2\u04cd\u04ce\5\u00e2r\2\u04ce\u04cf\7\f\2\2\u04cf\u00d3\3\2\2\2\u04d0"+ + "\u04d1\7\n\2\2\u04d1\u04d6\5\u00d6l\2\u04d2\u04d3\7\16\2\2\u04d3\u04d5"+ + "\5\u00d6l\2\u04d4\u04d2\3\2\2\2\u04d5\u04d8\3\2\2\2\u04d6\u04d4\3\2\2"+ + "\2\u04d6\u04d7\3\2\2\2\u04d7\u04da\3\2\2\2\u04d8\u04d6\3\2\2\2\u04d9\u04db"+ + "\7\16\2\2\u04da\u04d9\3\2\2\2\u04da\u04db\3\2\2\2\u04db\u04dc\3\2\2\2"+ + "\u04dc\u04dd\7\f\2\2\u04dd\u00d5\3\2\2\2\u04de\u04df\7\32\2\2\u04df\u04e0"+ + "\5\u00dan\2\u04e0\u00d7\3\2\2\2\u04e1\u04e2\7\n\2\2\u04e2\u04e7\5\u00da"+ + "n\2\u04e3\u04e4\7\16\2\2\u04e4\u04e6\5\u00dan\2\u04e5\u04e3\3\2\2\2\u04e6"+ + "\u04e9\3\2\2\2\u04e7\u04e5\3\2\2\2\u04e7\u04e8\3\2\2\2\u04e8\u04eb\3\2"+ + "\2\2\u04e9\u04e7\3\2\2\2\u04ea\u04ec\7\16\2\2\u04eb\u04ea\3\2\2\2\u04eb"+ + "\u04ec\3\2\2\2\u04ec\u04ed\3\2\2\2\u04ed\u04ee\7\f\2\2\u04ee\u00d9\3\2"+ + "\2\2\u04ef\u04f0\7\6\2\2\u04f0\u04f1\5\u0100\u0081\2\u04f1\u04f2\7\7\2"+ + "\2\u04f2\u04f4\7\b\2\2\u04f3\u04f5\5\u00dco\2\u04f4\u04f3\3\2\2\2\u04f4"+ + "\u04f5\3\2\2\2\u04f5\u04f6\3\2\2\2\u04f6\u04f7\7\t\2\2\u04f7\u04f8\7\n"+ + "\2\2\u04f8\u04f9\5\u00e2r\2\u04f9\u04fa\7\f\2\2\u04fa\u00db\3\2\2\2\u04fb"+ + "\u0500\5\u00dep\2\u04fc\u04fd\7\16\2\2\u04fd\u04ff\5\u00dep\2\u04fe\u04fc"+ + "\3\2\2\2\u04ff\u0502\3\2\2\2\u0500\u04fe\3\2\2\2\u0500\u0501\3\2\2\2\u0501"+ + "\u0505\3\2\2\2\u0502\u0500\3\2\2\2\u0503\u0504\7\16\2\2\u0504\u0506\5"+ + "\u00e0q\2\u0505\u0503\3\2\2\2\u0505\u0506\3\2\2\2\u0506\u050f\3\2\2\2"+ + "\u0507\u050f\5\u00e0q\2\u0508\u050f\5\u00e6t\2\u0509\u050c\5\u00ecw\2"+ + "\u050a\u050b\7\21\2\2\u050b\u050d\5\u00dco\2\u050c\u050a\3\2\2\2\u050c"+ + "\u050d\3\2\2\2\u050d\u050f\3\2\2\2\u050e\u04fb\3\2\2\2\u050e\u0507\3\2"+ + "\2\2\u050e\u0508\3\2\2\2\u050e\u0509\3\2\2\2\u050f\u00dd\3\2\2\2\u0510"+ + "\u0512\5r:\2\u0511\u0510\3\2\2\2\u0511\u0512\3\2\2\2\u0512\u0514\3\2\2"+ + "\2\u0513\u0515\5N(\2\u0514\u0513\3\2\2\2\u0514\u0515\3\2\2\2\u0515\u0516"+ + "\3\2\2\2\u0516\u0518\5\u0116\u008c\2\u0517\u0519\7\20\2\2\u0518\u0517"+ + "\3\2\2\2\u0518\u0519\3\2\2\2\u0519\u051b\3\2\2\2\u051a\u051c\5> \2\u051b"+ + "\u051a\3\2\2\2\u051b\u051c\3\2\2\2\u051c\u051f\3\2\2\2\u051d\u051e\7\17"+ + "\2\2\u051e\u0520\5\u0100\u0081\2\u051f\u051d\3\2\2\2\u051f\u0520\3\2\2"+ + "\2\u0520\u00df\3\2\2\2\u0521\u0522\7\22\2\2\u0522\u0524\7~\2\2\u0523\u0525"+ + "\5> \2\u0524\u0523\3\2\2\2\u0524\u0525\3\2\2\2\u0525\u00e1\3\2\2\2\u0526"+ + "\u0528\5\u00e4s\2\u0527\u0526\3\2\2\2\u0527\u0528\3\2\2\2\u0528\u00e3"+ + "\3\2\2\2\u0529\u052b\5z>\2\u052a\u0529\3\2\2\2\u052b\u052c\3\2\2\2\u052c"+ + "\u052a\3\2\2\2\u052c\u052d\3\2\2\2\u052d\u00e5\3\2\2\2\u052e\u0530\7\6"+ + "\2\2\u052f\u0531\5\u00e8u\2\u0530\u052f\3\2\2\2\u0530\u0531\3\2\2\2\u0531"+ + "\u0532\3\2\2\2\u0532\u0533\7\7\2\2\u0533\u00e7\3\2\2\2\u0534\u053d\5\u00ea"+ + "v\2\u0535\u0537\7\16\2\2\u0536\u0535\3\2\2\2\u0537\u0538\3\2\2\2\u0538"+ + "\u0536\3\2\2\2\u0538\u0539\3\2\2\2\u0539\u053a\3\2\2\2\u053a\u053c\5\u00ea"+ + "v\2\u053b\u0536\3\2\2\2\u053c\u053f\3\2\2\2\u053d\u053b\3\2\2\2\u053d"+ + "\u053e\3\2\2\2\u053e\u00e9\3\2\2\2\u053f\u053d\3\2\2\2\u0540\u0542\7\22"+ + "\2\2\u0541\u0540\3\2\2\2\u0541\u0542\3\2\2\2\u0542\u0545\3\2\2\2\u0543"+ + "\u0546\5\u0100\u0081\2\u0544\u0546\7~\2\2\u0545\u0543\3\2\2\2\u0545\u0544"+ + "\3\2\2\2\u0546\u0548\3\2\2\2\u0547\u0549\7\16\2\2\u0548\u0547\3\2\2\2"+ + "\u0548\u0549\3\2\2\2\u0549\u00eb\3\2\2\2\u054a\u0556\7\n\2\2\u054b\u0550"+ + "\5\u00eex\2\u054c\u054d\7\16\2\2\u054d\u054f\5\u00eex\2\u054e\u054c\3"+ + "\2\2\2\u054f\u0552\3\2\2\2\u0550\u054e\3\2\2\2\u0550\u0551\3\2\2\2\u0551"+ + "\u0554\3\2\2\2\u0552\u0550\3\2\2\2\u0553\u0555\7\16\2\2\u0554\u0553\3"+ + "\2\2\2\u0554\u0555\3\2\2\2\u0555\u0557\3\2\2\2\u0556\u054b\3\2\2\2\u0556"+ + "\u0557\3\2\2\2\u0557\u0558\3\2\2\2\u0558\u0559\7\f\2\2\u0559\u00ed\3\2"+ + "\2\2\u055a\u055b\5\u00f4{\2\u055b\u055c\t\7\2\2\u055c\u055d\5\u0100\u0081"+ + "\2\u055d\u056a\3\2\2\2\u055e\u055f\7\6\2\2\u055f\u0560\5\u0100\u0081\2"+ + "\u0560\u0561\7\7\2\2\u0561\u0562\7\21\2\2\u0562\u0563\5\u0100\u0081\2"+ + "\u0563\u056a\3\2\2\2\u0564\u056a\5\u00f0y\2\u0565\u056a\5\u00f2z\2\u0566"+ + "\u056a\5\u00d0i\2\u0567\u056a\5\u0116\u008c\2\u0568\u056a\5J&\2\u0569"+ + "\u055a\3\2\2\2\u0569\u055e\3\2\2\2\u0569\u0564\3\2\2\2\u0569\u0565\3\2"+ + "\2\2\u0569\u0566\3\2\2\2\u0569\u0567\3\2\2\2\u0569\u0568\3\2\2\2\u056a"+ + "\u00ef\3\2\2\2\u056b\u056c\5\u011c\u008f\2\u056c\u056d\7\b\2\2\u056d\u056f"+ + "\7\t\2\2\u056e\u0570\5> \2\u056f\u056e\3\2\2\2\u056f\u0570\3\2\2\2\u0570"+ + "\u0571\3\2\2\2\u0571\u0572\7\n\2\2\u0572\u0573\5\u00e2r\2\u0573\u0574"+ + "\7\f\2\2\u0574\u00f1\3\2\2\2\u0575\u0576\5\u011e\u0090\2\u0576\u0579\7"+ + "\b\2\2\u0577\u057a\7~\2\2\u0578\u057a\5\4\3\2\u0579\u0577\3\2\2\2\u0579"+ + "\u0578\3\2\2\2\u057a\u057c\3\2\2\2\u057b\u057d\5> \2\u057c\u057b\3\2\2"+ + "\2\u057c\u057d\3\2\2\2\u057d\u057e\3\2\2\2\u057e\u057f\7\t\2\2\u057f\u0580"+ + "\7\n\2\2\u0580\u0581\5\u00e2r\2\u0581\u0582\7\f\2\2\u0582\u00f3\3\2\2"+ + "\2\u0583\u0587\5\u0114\u008b\2\u0584\u0587\7\177\2\2\u0585\u0587\5\u0112"+ + "\u008a\2\u0586\u0583\3\2\2\2\u0586\u0584\3\2\2\2\u0586\u0585\3\2\2\2\u0587"+ + "\u00f5\3\2\2\2\u0588\u058d\7\b\2\2\u0589\u058b\5\u00f8}\2\u058a\u058c"+ + "\7\16\2\2\u058b\u058a\3\2\2\2\u058b\u058c\3\2\2\2\u058c\u058e\3\2\2\2"+ + "\u058d\u0589\3\2\2\2\u058d\u058e\3\2\2\2\u058e\u058f\3\2\2\2\u058f\u0590"+ + "\7\t\2\2\u0590\u00f7\3\2\2\2\u0591\u0596\5\u00fa~\2\u0592\u0593\7\16\2"+ + "\2\u0593\u0595\5\u00fa~\2\u0594\u0592\3\2\2\2\u0595\u0598\3\2\2\2\u0596"+ + "\u0594\3\2\2\2\u0596\u0597\3\2\2\2\u0597\u00f9\3\2\2\2\u0598\u0596\3\2"+ + "\2\2\u0599\u059b\7\22\2\2\u059a\u0599\3\2\2\2\u059a\u059b\3\2\2\2\u059b"+ + "\u059e\3\2\2\2\u059c\u059f\5\u0100\u0081\2\u059d\u059f\7~\2\2\u059e\u059c"+ + "\3\2\2\2\u059e\u059d\3\2\2\2\u059f\u00fb\3\2\2\2\u05a0\u05a5\5\u0100\u0081"+ + "\2\u05a1\u05a2\7\16\2\2\u05a2\u05a4\5\u0100\u0081\2\u05a3\u05a1\3\2\2"+ + "\2\u05a4\u05a7\3\2\2\2\u05a5\u05a3\3\2\2\2\u05a5\u05a6\3\2\2\2\u05a6\u00fd"+ + "\3\2\2\2\u05a7\u05a5\3\2\2\2\u05a8\u05aa\7Q\2\2\u05a9\u05ab\7~\2\2\u05aa"+ + "\u05a9\3\2\2\2\u05aa\u05ab\3\2\2\2\u05ab\u05ac\3\2\2\2\u05ac\u05ae\7\b"+ + "\2\2\u05ad\u05af\5\u00dco\2\u05ae\u05ad\3\2\2\2\u05ae\u05af\3\2\2\2\u05af"+ + "\u05b0\3\2\2\2\u05b0\u05b2\7\t\2\2\u05b1\u05b3\5> \2\u05b2\u05b1\3\2\2"+ + "\2\u05b2\u05b3\3\2\2\2\u05b3\u05b4\3\2\2\2\u05b4\u05b5\7\n\2\2\u05b5\u05b6"+ + "\5\u00e2r\2\u05b6\u05b7\7\f\2\2\u05b7\u00ff\3\2\2\2\u05b8\u05b9\b\u0081"+ + "\1\2\u05b9\u05ba\7W\2\2\u05ba\u05ef\5\u0100\u0081(\u05bb\u05bc\7K\2\2"+ + "\u05bc\u05ef\5\u0100\u0081\'\u05bd\u05be\7C\2\2\u05be\u05ef\5\u0100\u0081"+ + "&\u05bf\u05c0\7\24\2\2\u05c0\u05ef\5\u0100\u0081%\u05c1\u05c2\7\25\2\2"+ + "\u05c2\u05ef\5\u0100\u0081$\u05c3\u05c4\7\26\2\2\u05c4\u05ef\5\u0100\u0081"+ + "#\u05c5\u05c6\7\27\2\2\u05c6\u05ef\5\u0100\u0081\"\u05c7\u05c8\7\30\2"+ + "\2\u05c8\u05ef\5\u0100\u0081!\u05c9\u05ca\7\31\2\2\u05ca\u05ef\5\u0100"+ + "\u0081 \u05cb\u05ef\5\u00fe\u0080\2\u05cc\u05ef\5\u0104\u0083\2\u05cd"+ + "\u05ce\7F\2\2\u05ce\u05d0\5\u0100\u0081\2\u05cf\u05d1\5\16\b\2\u05d0\u05cf"+ + "\3\2\2\2\u05d0\u05d1\3\2\2\2\u05d1\u05d2\3\2\2\2\u05d2\u05d3\5\u00f6|"+ + "\2\u05d3\u05ef\3\2\2\2\u05d4\u05d5\7F\2\2\u05d5\u05d7\5\u0100\u0081\2"+ + "\u05d6\u05d8\5\16\b\2\u05d7\u05d6\3\2\2\2\u05d7\u05d8\3\2\2\2\u05d8\u05ef"+ + "\3\2\2\2\u05d9\u05ef\5\u00d8m\2\u05da\u05ef\5\u00d4k\2\u05db\u05ef\5\u00d2"+ + "j\2\u05dc\u05ef\5\u00a2R\2\u05dd\u05ef\7R\2\2\u05de\u05e0\5\u0114\u008b"+ + "\2\u05df\u05e1\5\u0100\u0081\2\u05e0\u05df\3\2\2\2\u05e0\u05e1\3\2\2\2"+ + "\u05e1\u05ef\3\2\2\2\u05e2\u05ef\7a\2\2\u05e3\u05ef\5\u010c\u0087\2\u05e4"+ + "\u05ef\5\u00e6t\2\u05e5\u05ef\5\u00ecw\2\u05e6\u05e7\7\b\2\2\u05e7\u05e8"+ + "\5\u00fc\177\2\u05e8\u05e9\7\t\2\2\u05e9\u05ef\3\2\2\2\u05ea\u05ec\5\16"+ + "\b\2\u05eb\u05ed\5\u00fc\177\2\u05ec\u05eb\3\2\2\2\u05ec\u05ed\3\2\2\2"+ + "\u05ed\u05ef\3\2\2\2\u05ee\u05b8\3\2\2\2\u05ee\u05bb\3\2\2\2\u05ee\u05bd"+ + "\3\2\2\2\u05ee\u05bf\3\2\2\2\u05ee\u05c1\3\2\2\2\u05ee\u05c3\3\2\2\2\u05ee"+ + "\u05c5\3\2\2\2\u05ee\u05c7\3\2\2\2\u05ee\u05c9\3\2\2\2\u05ee\u05cb\3\2"+ + "\2\2\u05ee\u05cc\3\2\2\2\u05ee\u05cd\3\2\2\2\u05ee\u05d4\3\2\2\2\u05ee"+ + "\u05d9\3\2\2\2\u05ee\u05da\3\2\2\2\u05ee\u05db\3\2\2\2\u05ee\u05dc\3\2"+ + "\2\2\u05ee\u05dd\3\2\2\2\u05ee\u05de\3\2\2\2\u05ee\u05e2\3\2\2\2\u05ee"+ + "\u05e3\3\2\2\2\u05ee\u05e4\3\2\2\2\u05ee\u05e5\3\2\2\2\u05ee\u05e6\3\2"+ + "\2\2\u05ee\u05ea\3\2\2\2\u05ef\u063e\3\2\2\2\u05f0\u05f1\f\37\2\2\u05f1"+ + "\u05f2\t\b\2\2\u05f2\u063d\5\u0100\u0081 \u05f3\u05f4\f\36\2\2\u05f4\u05f5"+ + "\t\t\2\2\u05f5\u063d\5\u0100\u0081\37\u05f6\u05f7\f\35\2\2\u05f7\u05f8"+ + "\t\n\2\2\u05f8\u063d\5\u0100\u0081\36\u05f9\u05fa\f\34\2\2\u05fa\u05fb"+ + "\t\13\2\2\u05fb\u063d\5\u0100\u0081\35\u05fc\u05fd\f\33\2\2\u05fd\u05fe"+ + "\7B\2\2\u05fe\u063d\5\u0100\u0081\34\u05ff\u0600\f\32\2\2\u0600\u0601"+ + "\7X\2\2\u0601\u063d\5\u0100\u0081\33\u0602\u0603\f\31\2\2\u0603\u0604"+ + "\t\f\2\2\u0604\u063d\5\u0100\u0081\32\u0605\u0606\f\30\2\2\u0606\u0607"+ + "\7(\2\2\u0607\u063d\5\u0100\u0081\31\u0608\u0609\f\27\2\2\u0609\u060a"+ + "\7)\2\2\u060a\u063d\5\u0100\u0081\30\u060b\u060c\f\26\2\2\u060c\u060d"+ + "\7*\2\2\u060d\u063d\5\u0100\u0081\27\u060e\u060f\f\25\2\2\u060f\u0610"+ + "\7+\2\2\u0610\u063d\5\u0100\u0081\26\u0611\u0612\f\24\2\2\u0612\u0613"+ + "\7,\2\2\u0613\u063d\5\u0100\u0081\25\u0614\u0615\f\23\2\2\u0615\u0616"+ + "\7\20\2\2\u0616\u0617\5\u0100\u0081\2\u0617\u0618\7\21\2\2\u0618\u0619"+ + "\5\u0100\u0081\24\u0619\u063d\3\2\2\2\u061a\u061b\f\22\2\2\u061b\u061c"+ + "\7\17\2\2\u061c\u063d\5\u0100\u0081\23\u061d\u061e\f\21\2\2\u061e\u061f"+ + "\5\u010a\u0086\2\u061f\u0620\5\u0100\u0081\22\u0620\u063d\3\2\2\2\u0621"+ + "\u0622\f/\2\2\u0622\u0623\7\6\2\2\u0623\u0624\5\u00fc\177\2\u0624\u0625"+ + "\7\7\2\2\u0625\u063d\3\2\2\2\u0626\u0628\f.\2\2\u0627\u0629\7\31\2\2\u0628"+ + "\u0627\3\2\2\2\u0628\u0629\3\2\2\2\u0629\u062a\3\2\2\2\u062a\u062b\7\23"+ + "\2\2\u062b\u062d\5\u0114\u008b\2\u062c\u062e\5\36\20\2\u062d\u062c\3\2"+ + "\2\2\u062d\u062e\3\2\2\2\u062e\u063d\3\2\2\2\u062f\u0630\f+\2\2\u0630"+ + "\u063d\5\u00f6|\2\u0631\u0632\f*\2\2\u0632\u0633\6\u0081#\2\u0633\u063d"+ + "\7\24\2\2\u0634\u0635\f)\2\2\u0635\u0636\6\u0081%\2\u0636\u063d\7\25\2"+ + "\2\u0637\u0638\f\20\2\2\u0638\u063d\5\u010e\u0088\2\u0639\u063a\f\3\2"+ + "\2\u063a\u063b\7Z\2\2\u063b\u063d\5\u0102\u0082\2\u063c\u05f0\3\2\2\2"+ + "\u063c\u05f3\3\2\2\2\u063c\u05f6\3\2\2\2\u063c\u05f9\3\2\2\2\u063c\u05fc"+ + "\3\2\2\2\u063c\u05ff\3\2\2\2\u063c\u0602\3\2\2\2\u063c\u0605\3\2\2\2\u063c"+ + "\u0608\3\2\2\2\u063c\u060b\3\2\2\2\u063c\u060e\3\2\2\2\u063c\u0611\3\2"+ + "\2\2\u063c\u0614\3\2\2\2\u063c\u061a\3\2\2\2\u063c\u061d\3\2\2\2\u063c"+ + "\u0621\3\2\2\2\u063c\u0626\3\2\2\2\u063c\u062f\3\2\2\2\u063c\u0631\3\2"+ + "\2\2\u063c\u0634\3\2\2\2\u063c\u0637\3\2\2\2\u063c\u0639\3\2\2\2\u063d"+ + "\u0640\3\2\2\2\u063e\u063c\3\2\2\2\u063e\u063f\3\2\2\2\u063f\u0101\3\2"+ + "\2\2\u0640\u063e\3\2\2\2\u0641\u0644\5\32\16\2\u0642\u0643\7\6\2\2\u0643"+ + "\u0645\7\7\2\2\u0644\u0642\3\2\2\2\u0644\u0645\3\2\2\2\u0645\u0648\3\2"+ + "\2\2\u0646\u0648\5\u0100\u0081\2\u0647\u0641\3\2\2\2\u0647\u0646\3\2\2"+ + "\2\u0648\u0103\3\2\2\2\u0649\u064b\7]\2\2\u064a\u0649\3\2\2\2\u064a\u064b"+ + "\3\2\2\2\u064b\u064c\3\2\2\2\u064c\u064e\5\u0106\u0084\2\u064d\u064f\5"+ + "> \2\u064e\u064d\3\2\2\2\u064e\u064f\3\2\2\2\u064f\u0650\3\2\2\2\u0650"+ + "\u0651\78\2\2\u0651\u0652\5\u0108\u0085\2\u0652\u0105\3\2\2\2\u0653\u065a"+ + "\7~\2\2\u0654\u0656\7\b\2\2\u0655\u0657\5\u00dco\2\u0656\u0655\3\2\2\2"+ + "\u0656\u0657\3\2\2\2\u0657\u0658\3\2\2\2\u0658\u065a\7\t\2\2\u0659\u0653"+ + "\3\2\2\2\u0659\u0654\3\2\2\2\u065a\u0107\3\2\2\2\u065b\u0661\5\u0100\u0081"+ + "\2\u065c\u065d\7\n\2\2\u065d\u065e\5\u00e2r\2\u065e\u065f\7\f\2\2\u065f"+ + "\u0661\3\2\2\2\u0660\u065b\3\2\2\2\u0660\u065c\3\2\2\2\u0661\u0109\3\2"+ + "\2\2\u0662\u0663\t\r\2\2\u0663\u010b\3\2\2\2\u0664\u066b\79\2\2\u0665"+ + "\u066b\7:\2\2\u0666\u066b\7\177\2\2\u0667\u066b\5\u010e\u0088\2\u0668"+ + "\u066b\7\5\2\2\u0669\u066b\5\u0112\u008a\2\u066a\u0664\3\2\2\2\u066a\u0665"+ + "\3\2\2\2\u066a\u0666\3\2\2\2\u066a\u0667\3\2\2\2\u066a\u0668\3\2\2\2\u066a"+ + "\u0669\3\2\2\2\u066b\u010d\3\2\2\2\u066c\u0670\7\u0080\2\2\u066d\u066f"+ + "\5\u0110\u0089\2\u066e\u066d\3\2\2\2\u066f\u0672\3\2\2\2\u0670\u066e\3"+ + "\2\2\2\u0670\u0671\3\2\2\2\u0671\u0673\3\2\2\2\u0672\u0670\3\2\2\2\u0673"+ + "\u0674\7\u0080\2\2\u0674\u010f\3\2\2\2\u0675\u067c\7\u0088\2\2\u0676\u0677"+ + "\7\u0087\2\2\u0677\u0678\5\u0100\u0081\2\u0678\u0679\7\13\2\2\u0679\u067c"+ + "\3\2\2\2\u067a\u067c\7\u0086\2\2\u067b\u0675\3\2\2\2\u067b\u0676\3\2\2"+ + "\2\u067b\u067a\3\2\2\2\u067c\u0111\3\2\2\2\u067d\u067e\t\16\2\2\u067e"+ + "\u0113\3\2\2\2\u067f\u0682\7~\2\2\u0680\u0682\5\u0118\u008d\2\u0681\u067f"+ + "\3\2\2\2\u0681\u0680\3\2\2\2\u0682\u0115\3\2\2\2\u0683\u0684\t\17\2\2"+ + "\u0684\u0117\3\2\2\2\u0685\u0689\5\u011a\u008e\2\u0686\u0689\79\2\2\u0687"+ + "\u0689\7:\2\2\u0688\u0685\3\2\2\2\u0688\u0686\3\2\2\2\u0688\u0687\3\2"+ + "\2\2\u0689\u0119\3\2\2\2\u068a\u068b\t\20\2\2\u068b\u011b\3\2\2\2\u068c"+ + "\u068d\7t\2\2\u068d\u068e\5\u00f4{\2\u068e\u011d\3\2\2\2\u068f\u0690\7"+ + "u\2\2\u0690\u0691\5\u00f4{\2\u0691\u011f\3\2\2\2\u0692\u0697\7\r\2\2\u0693"+ + "\u0697\7\2\2\3\u0694\u0697\6\u0091(\2\u0695\u0697\6\u0091)\2\u0696\u0692"+ + "\3\2\2\2\u0696\u0693\3\2\2\2\u0696\u0694\3\2\2\2\u0696\u0695\3\2\2\2\u0697"+ + "\u0121\3\2\2\2\u00d7\u0127\u012b\u0134\u0139\u013c\u0143\u014c\u0156\u0161"+ + "\u0163\u0178\u0180\u0187\u018b\u019a\u019e\u01a2\u01a8\u01af\u01b9\u01bb"+ + "\u01cb\u01cf\u01d3\u01db\u01df\u01ee\u01f2\u01f5\u01f9\u01fc\u0200\u0206"+ + "\u020a\u020e\u0216\u021b\u021d\u0224\u0229\u022c\u022f\u0234\u0237\u023a"+ + "\u023f\u0242\u0245\u0249\u024f\u0253\u0257\u025b\u0266\u026d\u0274\u0279"+ + "\u0281\u0284\u0287\u028c\u028f\u0293\u029d\u02a1\u02a7\u02ad\u02b4\u02ba"+ + "\u02c0\u02c8\u02cd\u02d8\u02dd\u02e5\u02ec\u02f3\u02f8\u0319\u031d\u0324"+ + "\u032a\u0331\u0335\u0339\u0342\u034a\u0351\u0355\u0359\u035d\u0360\u0363"+ + "\u0366\u036a\u036e\u0372\u0374\u037b\u0381\u0384\u0387\u038b\u038e\u0395"+ + "\u039e\u03b1\u03b5\u03b9\u03c3\u03c7\u03d2\u03df\u03e5\u03ec\u03f3\u03fa"+ + "\u0401\u0413\u0417\u0419\u0420\u0426\u042b\u043a\u043d\u0453\u0456\u045a"+ + "\u045c\u045f\u0464\u046a\u046d\u0473\u0480\u0485\u048a\u048d\u0490\u049c"+ + "\u04a1\u04a4\u04a7\u04aa\u04ad\u04b0\u04b6\u04bb\u04c5\u04c9\u04d6\u04da"+ + "\u04e7\u04eb\u04f4\u0500\u0505\u050c\u050e\u0511\u0514\u0518\u051b\u051f"+ + "\u0524\u0527\u052c\u0530\u0538\u053d\u0541\u0545\u0548\u0550\u0554\u0556"+ + "\u0569\u056f\u0579\u057c\u0586\u058b\u058d\u0596\u059a\u059e\u05a5\u05aa"+ + "\u05ae\u05b2\u05d0\u05d7\u05e0\u05ec\u05ee\u0628\u062d\u063c\u063e\u0644"+ + "\u0647\u064a\u064e\u0656\u0659\u0660\u066a\u0670\u067b\u0681\u0688\u0696"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/src/main/java/grammar/TypeScriptParser.tokens b/src/main/java/grammar/TypeScriptParser.tokens new file mode 100644 index 00000000..86796371 --- /dev/null +++ b/src/main/java/grammar/TypeScriptParser.tokens @@ -0,0 +1,247 @@ +MultiLineComment=1 +SingleLineComment=2 +RegularExpressionLiteral=3 +OpenBracket=4 +CloseBracket=5 +OpenParen=6 +CloseParen=7 +OpenBrace=8 +TemplateCloseBrace=9 +CloseBrace=10 +SemiColon=11 +Comma=12 +Assign=13 +QuestionMark=14 +Colon=15 +Ellipsis=16 +Dot=17 +PlusPlus=18 +MinusMinus=19 +Plus=20 +Minus=21 +BitNot=22 +Not=23 +Multiply=24 +Divide=25 +Modulus=26 +RightShiftArithmetic=27 +LeftShiftArithmetic=28 +RightShiftLogical=29 +LessThan=30 +MoreThan=31 +LessThanEquals=32 +GreaterThanEquals=33 +Equals_=34 +NotEquals=35 +IdentityEquals=36 +IdentityNotEquals=37 +BitAnd=38 +BitXOr=39 +BitOr=40 +And=41 +Or=42 +MultiplyAssign=43 +DivideAssign=44 +ModulusAssign=45 +PlusAssign=46 +MinusAssign=47 +LeftShiftArithmeticAssign=48 +RightShiftArithmeticAssign=49 +RightShiftLogicalAssign=50 +BitAndAssign=51 +BitXorAssign=52 +BitOrAssign=53 +ARROW=54 +NullLiteral=55 +BooleanLiteral=56 +DecimalLiteral=57 +HexIntegerLiteral=58 +OctalIntegerLiteral=59 +OctalIntegerLiteral2=60 +BinaryIntegerLiteral=61 +Break=62 +Do=63 +Instanceof=64 +Typeof=65 +Case=66 +Else=67 +New=68 +Var=69 +Catch=70 +Finally=71 +Return=72 +Void=73 +Continue=74 +For=75 +Switch=76 +While=77 +Debugger=78 +Function_=79 +This=80 +With=81 +Default=82 +If=83 +Throw=84 +Delete=85 +In=86 +Try=87 +As=88 +From=89 +ReadOnly=90 +Async=91 +Class=92 +Enum=93 +Extends=94 +Super=95 +Const=96 +Export=97 +Import=98 +Implements=99 +Let=100 +Private=101 +Public=102 +Interface=103 +Package=104 +Protected=105 +Static=106 +Yield=107 +Any=108 +Number=109 +Boolean=110 +String=111 +Symbol=112 +TypeAlias=113 +Get=114 +Set=115 +Constructor=116 +Namespace=117 +Require=118 +Module=119 +Declare=120 +Abstract=121 +Is=122 +At=123 +Identifier=124 +StringLiteral=125 +BackTick=126 +WhiteSpaces=127 +LineTerminator=128 +HtmlComment=129 +CDataComment=130 +UnexpectedCharacter=131 +TemplateStringEscapeAtom=132 +TemplateStringStartExpression=133 +TemplateStringAtom=134 +'['=4 +']'=5 +'('=6 +')'=7 +'{'=8 +'}'=10 +';'=11 +','=12 +'='=13 +'?'=14 +':'=15 +'...'=16 +'.'=17 +'++'=18 +'--'=19 +'+'=20 +'-'=21 +'~'=22 +'!'=23 +'*'=24 +'/'=25 +'%'=26 +'>>'=27 +'<<'=28 +'>>>'=29 +'<'=30 +'>'=31 +'<='=32 +'>='=33 +'=='=34 +'!='=35 +'==='=36 +'!=='=37 +'&'=38 +'^'=39 +'|'=40 +'&&'=41 +'||'=42 +'*='=43 +'/='=44 +'%='=45 +'+='=46 +'-='=47 +'<<='=48 +'>>='=49 +'>>>='=50 +'&='=51 +'^='=52 +'|='=53 +'=>'=54 +'null'=55 +'break'=62 +'do'=63 +'instanceof'=64 +'typeof'=65 +'case'=66 +'else'=67 +'new'=68 +'var'=69 +'catch'=70 +'finally'=71 +'return'=72 +'void'=73 +'continue'=74 +'for'=75 +'switch'=76 +'while'=77 +'debugger'=78 +'function'=79 +'this'=80 +'with'=81 +'default'=82 +'if'=83 +'throw'=84 +'delete'=85 +'in'=86 +'try'=87 +'as'=88 +'from'=89 +'readonly'=90 +'async'=91 +'class'=92 +'enum'=93 +'extends'=94 +'super'=95 +'const'=96 +'export'=97 +'import'=98 +'implements'=99 +'let'=100 +'private'=101 +'public'=102 +'interface'=103 +'package'=104 +'protected'=105 +'static'=106 +'yield'=107 +'any'=108 +'number'=109 +'boolean'=110 +'string'=111 +'symbol'=112 +'type'=113 +'get'=114 +'set'=115 +'constructor'=116 +'namespace'=117 +'require'=118 +'module'=119 +'declare'=120 +'abstract'=121 +'is'=122 +'@'=123 diff --git a/src/main/java/grammar/TypeScriptParserBase.java b/src/main/java/grammar/TypeScriptParserBase.java new file mode 100644 index 00000000..7905c8f3 --- /dev/null +++ b/src/main/java/grammar/TypeScriptParserBase.java @@ -0,0 +1,121 @@ +package grammar; + +import org.antlr.v4.runtime.*; + +/** + * All parser methods that used in grammar (p, prev, notLineTerminator, etc.) + * should start with lower case char similar to parser rules. + */ +public abstract class TypeScriptParserBase extends Parser +{ + public TypeScriptParserBase(TokenStream input) { + super(input); + } + + /** + * Short form for prev(String str) + */ + protected boolean p(String str) { + return prev(str); + } + + /** + * Whether the previous token value equals to @param str + */ + protected boolean prev(String str) { + return _input.LT(-1).getText().equals(str); + } + + /** + * Short form for next(String str) + */ + protected boolean n(String str) { + return next(str); + } + + /** + * Whether the next token value equals to @param str + */ + protected boolean next(String str) { + return _input.LT(1).getText().equals(str); + } + + protected boolean notLineTerminator() { + return !here(TypeScriptParser.LineTerminator); + } + + protected boolean notOpenBraceAndNotFunction() { + int nextTokenType = _input.LT(1).getType(); + return nextTokenType != TypeScriptParser.OpenBrace && nextTokenType != TypeScriptParser.Function_; + } + + protected boolean closeBrace() { + return _input.LT(1).getType() == TypeScriptParser.CloseBrace; + } + + /** + * Returns {@code true} iff on the current index of the parser's + * token stream a token of the given {@code type} exists on the + * {@code HIDDEN} channel. + * + * @param type + * the type of the token on the {@code HIDDEN} channel + * to check. + * + * @return {@code true} iff on the current index of the parser's + * token stream a token of the given {@code type} exists on the + * {@code HIDDEN} channel. + */ + private boolean here(final int type) { + + // Get the token ahead of the current index. + int possibleIndexEosToken = this.getCurrentToken().getTokenIndex() - 1; + Token ahead = _input.get(possibleIndexEosToken); + + // Check if the token resides on the HIDDEN channel and if it's of the + // provided type. + return (ahead.getChannel() == Lexer.HIDDEN) && (ahead.getType() == type); + } + + /** + * Returns {@code true} iff on the current index of the parser's + * token stream a token exists on the {@code HIDDEN} channel which + * either is a line terminator, or is a multi line comment that + * contains a line terminator. + * + * @return {@code true} iff on the current index of the parser's + * token stream a token exists on the {@code HIDDEN} channel which + * either is a line terminator, or is a multi line comment that + * contains a line terminator. + */ + protected boolean lineTerminatorAhead() { + + // Get the token ahead of the current index. + int possibleIndexEosToken = this.getCurrentToken().getTokenIndex() - 1; + Token ahead = _input.get(possibleIndexEosToken); + + if (ahead.getChannel() != Lexer.HIDDEN) { + // We're only interested in tokens on the HIDDEN channel. + return false; + } + + if (ahead.getType() == TypeScriptParser.LineTerminator) { + // There is definitely a line terminator ahead. + return true; + } + + if (ahead.getType() == TypeScriptParser.WhiteSpaces) { + // Get the token ahead of the current whitespaces. + possibleIndexEosToken = this.getCurrentToken().getTokenIndex() - 2; + ahead = _input.get(possibleIndexEosToken); + } + + // Get the token's text and type. + String text = ahead.getText(); + int type = ahead.getType(); + + // Check if the token is, or contains a line terminator. + return (type == TypeScriptParser.MultiLineComment && (text.contains("\r") || text.contains("\n"))) || + (type == TypeScriptParser.LineTerminator); + } +} \ No newline at end of file diff --git a/src/main/java/grammar/TypeScriptParserBaseListener.java b/src/main/java/grammar/TypeScriptParserBaseListener.java new file mode 100644 index 00000000..846d3d84 --- /dev/null +++ b/src/main/java/grammar/TypeScriptParserBaseListener.java @@ -0,0 +1,2596 @@ +// Generated from TypeScriptParser.g4 by ANTLR 4.5 +package grammar; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ErrorNode; +import org.antlr.v4.runtime.tree.TerminalNode; + +/** + * This class provides an empty implementation of {@link TypeScriptParserListener}, + * which can be extended to create a listener which only needs to handle a subset + * of the available methods. + */ +public class TypeScriptParserBaseListener implements TypeScriptParserListener { + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterInitializer(TypeScriptParser.InitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitInitializer(TypeScriptParser.InitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterBindingPattern(TypeScriptParser.BindingPatternContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitBindingPattern(TypeScriptParser.BindingPatternContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeParameters(TypeScriptParser.TypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeParameters(TypeScriptParser.TypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeParameterList(TypeScriptParser.TypeParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeParameterList(TypeScriptParser.TypeParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeParameter(TypeScriptParser.TypeParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeParameter(TypeScriptParser.TypeParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterConstraint(TypeScriptParser.ConstraintContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitConstraint(TypeScriptParser.ConstraintContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeArguments(TypeScriptParser.TypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeArguments(TypeScriptParser.TypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeArgumentList(TypeScriptParser.TypeArgumentListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeArgumentList(TypeScriptParser.TypeArgumentListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeArgument(TypeScriptParser.TypeArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeArgument(TypeScriptParser.TypeArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterType_(TypeScriptParser.Type_Context ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitType_(TypeScriptParser.Type_Context ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterIntersection(TypeScriptParser.IntersectionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitIntersection(TypeScriptParser.IntersectionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPrimary(TypeScriptParser.PrimaryContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPrimary(TypeScriptParser.PrimaryContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterUnion(TypeScriptParser.UnionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitUnion(TypeScriptParser.UnionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterRedefinitionOfType(TypeScriptParser.RedefinitionOfTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitRedefinitionOfType(TypeScriptParser.RedefinitionOfTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPredefinedPrimType(TypeScriptParser.PredefinedPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPredefinedPrimType(TypeScriptParser.PredefinedPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArrayPrimType(TypeScriptParser.ArrayPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArrayPrimType(TypeScriptParser.ArrayPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterParenthesizedPrimType(TypeScriptParser.ParenthesizedPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitParenthesizedPrimType(TypeScriptParser.ParenthesizedPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterThisPrimType(TypeScriptParser.ThisPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitThisPrimType(TypeScriptParser.ThisPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTuplePrimType(TypeScriptParser.TuplePrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTuplePrimType(TypeScriptParser.TuplePrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterObjectPrimType(TypeScriptParser.ObjectPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitObjectPrimType(TypeScriptParser.ObjectPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterReferencePrimType(TypeScriptParser.ReferencePrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitReferencePrimType(TypeScriptParser.ReferencePrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterQueryPrimType(TypeScriptParser.QueryPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitQueryPrimType(TypeScriptParser.QueryPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPredefinedType(TypeScriptParser.PredefinedTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPredefinedType(TypeScriptParser.PredefinedTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeReference(TypeScriptParser.TypeReferenceContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeReference(TypeScriptParser.TypeReferenceContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterNestedTypeGeneric(TypeScriptParser.NestedTypeGenericContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitNestedTypeGeneric(TypeScriptParser.NestedTypeGenericContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeGeneric(TypeScriptParser.TypeGenericContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeGeneric(TypeScriptParser.TypeGenericContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeIncludeGeneric(TypeScriptParser.TypeIncludeGenericContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeIncludeGeneric(TypeScriptParser.TypeIncludeGenericContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeName(TypeScriptParser.TypeNameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeName(TypeScriptParser.TypeNameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterObjectType(TypeScriptParser.ObjectTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitObjectType(TypeScriptParser.ObjectTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeBody(TypeScriptParser.TypeBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeBody(TypeScriptParser.TypeBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeMemberList(TypeScriptParser.TypeMemberListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeMemberList(TypeScriptParser.TypeMemberListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeMember(TypeScriptParser.TypeMemberContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeMember(TypeScriptParser.TypeMemberContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArrayType(TypeScriptParser.ArrayTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArrayType(TypeScriptParser.ArrayTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTupleType(TypeScriptParser.TupleTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTupleType(TypeScriptParser.TupleTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTupleElementTypes(TypeScriptParser.TupleElementTypesContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTupleElementTypes(TypeScriptParser.TupleElementTypesContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFunctionType(TypeScriptParser.FunctionTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFunctionType(TypeScriptParser.FunctionTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterConstructorType(TypeScriptParser.ConstructorTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitConstructorType(TypeScriptParser.ConstructorTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeQuery(TypeScriptParser.TypeQueryContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeQuery(TypeScriptParser.TypeQueryContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeQueryExpression(TypeScriptParser.TypeQueryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeQueryExpression(TypeScriptParser.TypeQueryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPropertySignatur(TypeScriptParser.PropertySignaturContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPropertySignatur(TypeScriptParser.PropertySignaturContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeAnnotation(TypeScriptParser.TypeAnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeAnnotation(TypeScriptParser.TypeAnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterCallSignature(TypeScriptParser.CallSignatureContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitCallSignature(TypeScriptParser.CallSignatureContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterParameterList(TypeScriptParser.ParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitParameterList(TypeScriptParser.ParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterRequiredParameterList(TypeScriptParser.RequiredParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitRequiredParameterList(TypeScriptParser.RequiredParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterParameter(TypeScriptParser.ParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitParameter(TypeScriptParser.ParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterOptionalParameter(TypeScriptParser.OptionalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitOptionalParameter(TypeScriptParser.OptionalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterRestParameter(TypeScriptParser.RestParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitRestParameter(TypeScriptParser.RestParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterRequiredParameter(TypeScriptParser.RequiredParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitRequiredParameter(TypeScriptParser.RequiredParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAccessibilityModifier(TypeScriptParser.AccessibilityModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAccessibilityModifier(TypeScriptParser.AccessibilityModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterIdentifierOrPattern(TypeScriptParser.IdentifierOrPatternContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitIdentifierOrPattern(TypeScriptParser.IdentifierOrPatternContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterConstructSignature(TypeScriptParser.ConstructSignatureContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitConstructSignature(TypeScriptParser.ConstructSignatureContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterIndexSignature(TypeScriptParser.IndexSignatureContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitIndexSignature(TypeScriptParser.IndexSignatureContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMethodSignature(TypeScriptParser.MethodSignatureContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMethodSignature(TypeScriptParser.MethodSignatureContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeAliasDeclaration(TypeScriptParser.TypeAliasDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeAliasDeclaration(TypeScriptParser.TypeAliasDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterConstructorDeclaration(TypeScriptParser.ConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitConstructorDeclaration(TypeScriptParser.ConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterInterfaceDeclaration(TypeScriptParser.InterfaceDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitInterfaceDeclaration(TypeScriptParser.InterfaceDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterInterfaceExtendsClause(TypeScriptParser.InterfaceExtendsClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitInterfaceExtendsClause(TypeScriptParser.InterfaceExtendsClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassOrInterfaceTypeList(TypeScriptParser.ClassOrInterfaceTypeListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassOrInterfaceTypeList(TypeScriptParser.ClassOrInterfaceTypeListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEnumDeclaration(TypeScriptParser.EnumDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEnumDeclaration(TypeScriptParser.EnumDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEnumBody(TypeScriptParser.EnumBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEnumBody(TypeScriptParser.EnumBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEnumMemberList(TypeScriptParser.EnumMemberListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEnumMemberList(TypeScriptParser.EnumMemberListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEnumMember(TypeScriptParser.EnumMemberContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEnumMember(TypeScriptParser.EnumMemberContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterNamespaceDeclaration(TypeScriptParser.NamespaceDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitNamespaceDeclaration(TypeScriptParser.NamespaceDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterNamespaceName(TypeScriptParser.NamespaceNameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitNamespaceName(TypeScriptParser.NamespaceNameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterImportAliasDeclaration(TypeScriptParser.ImportAliasDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitImportAliasDeclaration(TypeScriptParser.ImportAliasDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDecoratorList(TypeScriptParser.DecoratorListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDecoratorList(TypeScriptParser.DecoratorListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDecorator(TypeScriptParser.DecoratorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDecorator(TypeScriptParser.DecoratorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDecoratorMemberExpression(TypeScriptParser.DecoratorMemberExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDecoratorMemberExpression(TypeScriptParser.DecoratorMemberExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDecoratorCallExpression(TypeScriptParser.DecoratorCallExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDecoratorCallExpression(TypeScriptParser.DecoratorCallExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterProgram(TypeScriptParser.ProgramContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitProgram(TypeScriptParser.ProgramContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSourceElement(TypeScriptParser.SourceElementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSourceElement(TypeScriptParser.SourceElementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterStatement(TypeScriptParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitStatement(TypeScriptParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterBlock(TypeScriptParser.BlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitBlock(TypeScriptParser.BlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterStatementList(TypeScriptParser.StatementListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitStatementList(TypeScriptParser.StatementListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAbstractDeclaration(TypeScriptParser.AbstractDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAbstractDeclaration(TypeScriptParser.AbstractDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterImportStatement(TypeScriptParser.ImportStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitImportStatement(TypeScriptParser.ImportStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFromBlock(TypeScriptParser.FromBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFromBlock(TypeScriptParser.FromBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMultipleImportStatement(TypeScriptParser.MultipleImportStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMultipleImportStatement(TypeScriptParser.MultipleImportStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterExportStatement(TypeScriptParser.ExportStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitExportStatement(TypeScriptParser.ExportStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterVariableStatement(TypeScriptParser.VariableStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitVariableStatement(TypeScriptParser.VariableStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterVariableDeclarationList(TypeScriptParser.VariableDeclarationListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitVariableDeclarationList(TypeScriptParser.VariableDeclarationListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterVariableDeclaration(TypeScriptParser.VariableDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitVariableDeclaration(TypeScriptParser.VariableDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEmptyStatement_(TypeScriptParser.EmptyStatement_Context ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEmptyStatement_(TypeScriptParser.EmptyStatement_Context ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterExpressionStatement(TypeScriptParser.ExpressionStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitExpressionStatement(TypeScriptParser.ExpressionStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterIfStatement(TypeScriptParser.IfStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitIfStatement(TypeScriptParser.IfStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDoStatement(TypeScriptParser.DoStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDoStatement(TypeScriptParser.DoStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterWhileStatement(TypeScriptParser.WhileStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitWhileStatement(TypeScriptParser.WhileStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterForStatement(TypeScriptParser.ForStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitForStatement(TypeScriptParser.ForStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterForVarStatement(TypeScriptParser.ForVarStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitForVarStatement(TypeScriptParser.ForVarStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterForInStatement(TypeScriptParser.ForInStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitForInStatement(TypeScriptParser.ForInStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterForVarInStatement(TypeScriptParser.ForVarInStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitForVarInStatement(TypeScriptParser.ForVarInStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterVarModifier(TypeScriptParser.VarModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitVarModifier(TypeScriptParser.VarModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterContinueStatement(TypeScriptParser.ContinueStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitContinueStatement(TypeScriptParser.ContinueStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterBreakStatement(TypeScriptParser.BreakStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitBreakStatement(TypeScriptParser.BreakStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterReturnStatement(TypeScriptParser.ReturnStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitReturnStatement(TypeScriptParser.ReturnStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterYieldStatement(TypeScriptParser.YieldStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitYieldStatement(TypeScriptParser.YieldStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterWithStatement(TypeScriptParser.WithStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitWithStatement(TypeScriptParser.WithStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSwitchStatement(TypeScriptParser.SwitchStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSwitchStatement(TypeScriptParser.SwitchStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterCaseBlock(TypeScriptParser.CaseBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitCaseBlock(TypeScriptParser.CaseBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterCaseClauses(TypeScriptParser.CaseClausesContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitCaseClauses(TypeScriptParser.CaseClausesContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterCaseClause(TypeScriptParser.CaseClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitCaseClause(TypeScriptParser.CaseClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDefaultClause(TypeScriptParser.DefaultClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDefaultClause(TypeScriptParser.DefaultClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLabelledStatement(TypeScriptParser.LabelledStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLabelledStatement(TypeScriptParser.LabelledStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterThrowStatement(TypeScriptParser.ThrowStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitThrowStatement(TypeScriptParser.ThrowStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTryStatement(TypeScriptParser.TryStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTryStatement(TypeScriptParser.TryStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterCatchProduction(TypeScriptParser.CatchProductionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitCatchProduction(TypeScriptParser.CatchProductionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFinallyProduction(TypeScriptParser.FinallyProductionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFinallyProduction(TypeScriptParser.FinallyProductionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDebuggerStatement(TypeScriptParser.DebuggerStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDebuggerStatement(TypeScriptParser.DebuggerStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFunctionDeclaration(TypeScriptParser.FunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFunctionDeclaration(TypeScriptParser.FunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassDeclaration(TypeScriptParser.ClassDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassDeclaration(TypeScriptParser.ClassDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassHeritage(TypeScriptParser.ClassHeritageContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassHeritage(TypeScriptParser.ClassHeritageContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassTail(TypeScriptParser.ClassTailContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassTail(TypeScriptParser.ClassTailContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassExtendsClause(TypeScriptParser.ClassExtendsClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassExtendsClause(TypeScriptParser.ClassExtendsClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterImplementsClause(TypeScriptParser.ImplementsClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitImplementsClause(TypeScriptParser.ImplementsClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterClassElement(TypeScriptParser.ClassElementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitClassElement(TypeScriptParser.ClassElementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPropertyDeclarationExpression(TypeScriptParser.PropertyDeclarationExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPropertyDeclarationExpression(TypeScriptParser.PropertyDeclarationExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMethodDeclarationExpression(TypeScriptParser.MethodDeclarationExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMethodDeclarationExpression(TypeScriptParser.MethodDeclarationExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterGetterSetterDeclarationExpression(TypeScriptParser.GetterSetterDeclarationExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitGetterSetterDeclarationExpression(TypeScriptParser.GetterSetterDeclarationExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAbstractMemberDeclaration(TypeScriptParser.AbstractMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAbstractMemberDeclaration(TypeScriptParser.AbstractMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPropertyMemberBase(TypeScriptParser.PropertyMemberBaseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPropertyMemberBase(TypeScriptParser.PropertyMemberBaseContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterIndexMemberDeclaration(TypeScriptParser.IndexMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitIndexMemberDeclaration(TypeScriptParser.IndexMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterGeneratorMethod(TypeScriptParser.GeneratorMethodContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitGeneratorMethod(TypeScriptParser.GeneratorMethodContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterGeneratorFunctionDeclaration(TypeScriptParser.GeneratorFunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitGeneratorFunctionDeclaration(TypeScriptParser.GeneratorFunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterGeneratorBlock(TypeScriptParser.GeneratorBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitGeneratorBlock(TypeScriptParser.GeneratorBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterGeneratorDefinition(TypeScriptParser.GeneratorDefinitionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitGeneratorDefinition(TypeScriptParser.GeneratorDefinitionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterIteratorBlock(TypeScriptParser.IteratorBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitIteratorBlock(TypeScriptParser.IteratorBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterIteratorDefinition(TypeScriptParser.IteratorDefinitionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitIteratorDefinition(TypeScriptParser.IteratorDefinitionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFormalParameterList(TypeScriptParser.FormalParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFormalParameterList(TypeScriptParser.FormalParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFormalParameterArg(TypeScriptParser.FormalParameterArgContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFormalParameterArg(TypeScriptParser.FormalParameterArgContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLastFormalParameterArg(TypeScriptParser.LastFormalParameterArgContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLastFormalParameterArg(TypeScriptParser.LastFormalParameterArgContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFunctionBody(TypeScriptParser.FunctionBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFunctionBody(TypeScriptParser.FunctionBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSourceElements(TypeScriptParser.SourceElementsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSourceElements(TypeScriptParser.SourceElementsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArrayLiteral(TypeScriptParser.ArrayLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArrayLiteral(TypeScriptParser.ArrayLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterElementList(TypeScriptParser.ElementListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitElementList(TypeScriptParser.ElementListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArrayElement(TypeScriptParser.ArrayElementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArrayElement(TypeScriptParser.ArrayElementContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterObjectLiteral(TypeScriptParser.ObjectLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitObjectLiteral(TypeScriptParser.ObjectLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPropertyExpressionAssignment(TypeScriptParser.PropertyExpressionAssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPropertyExpressionAssignment(TypeScriptParser.PropertyExpressionAssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterComputedPropertyExpressionAssignment(TypeScriptParser.ComputedPropertyExpressionAssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitComputedPropertyExpressionAssignment(TypeScriptParser.ComputedPropertyExpressionAssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPropertyGetter(TypeScriptParser.PropertyGetterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPropertyGetter(TypeScriptParser.PropertyGetterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPropertySetter(TypeScriptParser.PropertySetterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPropertySetter(TypeScriptParser.PropertySetterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMethodProperty(TypeScriptParser.MethodPropertyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMethodProperty(TypeScriptParser.MethodPropertyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPropertyShorthand(TypeScriptParser.PropertyShorthandContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPropertyShorthand(TypeScriptParser.PropertyShorthandContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterRestParameterInObject(TypeScriptParser.RestParameterInObjectContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitRestParameterInObject(TypeScriptParser.RestParameterInObjectContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterGetAccessor(TypeScriptParser.GetAccessorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitGetAccessor(TypeScriptParser.GetAccessorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSetAccessor(TypeScriptParser.SetAccessorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSetAccessor(TypeScriptParser.SetAccessorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPropertyName(TypeScriptParser.PropertyNameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPropertyName(TypeScriptParser.PropertyNameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArguments(TypeScriptParser.ArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArguments(TypeScriptParser.ArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArgumentList(TypeScriptParser.ArgumentListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArgumentList(TypeScriptParser.ArgumentListContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArgument(TypeScriptParser.ArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArgument(TypeScriptParser.ArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterExpressionSequence(TypeScriptParser.ExpressionSequenceContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitExpressionSequence(TypeScriptParser.ExpressionSequenceContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFunctionExpressionDeclaration(TypeScriptParser.FunctionExpressionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFunctionExpressionDeclaration(TypeScriptParser.FunctionExpressionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTemplateStringExpression(TypeScriptParser.TemplateStringExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTemplateStringExpression(TypeScriptParser.TemplateStringExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTernaryExpression(TypeScriptParser.TernaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTernaryExpression(TypeScriptParser.TernaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLogicalAndExpression(TypeScriptParser.LogicalAndExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLogicalAndExpression(TypeScriptParser.LogicalAndExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterGeneratorsExpression(TypeScriptParser.GeneratorsExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitGeneratorsExpression(TypeScriptParser.GeneratorsExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPreIncrementExpression(TypeScriptParser.PreIncrementExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPreIncrementExpression(TypeScriptParser.PreIncrementExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterObjectLiteralExpression(TypeScriptParser.ObjectLiteralExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitObjectLiteralExpression(TypeScriptParser.ObjectLiteralExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterInExpression(TypeScriptParser.InExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitInExpression(TypeScriptParser.InExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLogicalOrExpression(TypeScriptParser.LogicalOrExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLogicalOrExpression(TypeScriptParser.LogicalOrExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterGenericTypes(TypeScriptParser.GenericTypesContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitGenericTypes(TypeScriptParser.GenericTypesContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterNotExpression(TypeScriptParser.NotExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitNotExpression(TypeScriptParser.NotExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPreDecreaseExpression(TypeScriptParser.PreDecreaseExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPreDecreaseExpression(TypeScriptParser.PreDecreaseExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArgumentsExpression(TypeScriptParser.ArgumentsExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArgumentsExpression(TypeScriptParser.ArgumentsExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterThisExpression(TypeScriptParser.ThisExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitThisExpression(TypeScriptParser.ThisExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterFunctionExpression(TypeScriptParser.FunctionExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitFunctionExpression(TypeScriptParser.FunctionExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterUnaryMinusExpression(TypeScriptParser.UnaryMinusExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitUnaryMinusExpression(TypeScriptParser.UnaryMinusExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAssignmentExpression(TypeScriptParser.AssignmentExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAssignmentExpression(TypeScriptParser.AssignmentExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPostDecreaseExpression(TypeScriptParser.PostDecreaseExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPostDecreaseExpression(TypeScriptParser.PostDecreaseExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTypeofExpression(TypeScriptParser.TypeofExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTypeofExpression(TypeScriptParser.TypeofExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterInstanceofExpression(TypeScriptParser.InstanceofExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitInstanceofExpression(TypeScriptParser.InstanceofExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterUnaryPlusExpression(TypeScriptParser.UnaryPlusExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitUnaryPlusExpression(TypeScriptParser.UnaryPlusExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterDeleteExpression(TypeScriptParser.DeleteExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitDeleteExpression(TypeScriptParser.DeleteExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterGeneratorsFunctionExpression(TypeScriptParser.GeneratorsFunctionExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitGeneratorsFunctionExpression(TypeScriptParser.GeneratorsFunctionExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArrowFunctionExpression(TypeScriptParser.ArrowFunctionExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArrowFunctionExpression(TypeScriptParser.ArrowFunctionExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterIteratorsExpression(TypeScriptParser.IteratorsExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitIteratorsExpression(TypeScriptParser.IteratorsExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEqualityExpression(TypeScriptParser.EqualityExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEqualityExpression(TypeScriptParser.EqualityExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterBitXOrExpression(TypeScriptParser.BitXOrExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitBitXOrExpression(TypeScriptParser.BitXOrExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterCastAsExpression(TypeScriptParser.CastAsExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitCastAsExpression(TypeScriptParser.CastAsExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSuperExpression(TypeScriptParser.SuperExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSuperExpression(TypeScriptParser.SuperExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMultiplicativeExpression(TypeScriptParser.MultiplicativeExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMultiplicativeExpression(TypeScriptParser.MultiplicativeExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterBitShiftExpression(TypeScriptParser.BitShiftExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitBitShiftExpression(TypeScriptParser.BitShiftExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterParenthesizedExpression(TypeScriptParser.ParenthesizedExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitParenthesizedExpression(TypeScriptParser.ParenthesizedExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAdditiveExpression(TypeScriptParser.AdditiveExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAdditiveExpression(TypeScriptParser.AdditiveExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterRelationalExpression(TypeScriptParser.RelationalExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitRelationalExpression(TypeScriptParser.RelationalExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterPostIncrementExpression(TypeScriptParser.PostIncrementExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitPostIncrementExpression(TypeScriptParser.PostIncrementExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterYieldExpression(TypeScriptParser.YieldExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitYieldExpression(TypeScriptParser.YieldExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterBitNotExpression(TypeScriptParser.BitNotExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitBitNotExpression(TypeScriptParser.BitNotExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterNewExpression(TypeScriptParser.NewExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitNewExpression(TypeScriptParser.NewExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLiteralExpression(TypeScriptParser.LiteralExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLiteralExpression(TypeScriptParser.LiteralExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArrayLiteralExpression(TypeScriptParser.ArrayLiteralExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArrayLiteralExpression(TypeScriptParser.ArrayLiteralExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMemberDotExpression(TypeScriptParser.MemberDotExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMemberDotExpression(TypeScriptParser.MemberDotExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterMemberIndexExpression(TypeScriptParser.MemberIndexExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitMemberIndexExpression(TypeScriptParser.MemberIndexExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterIdentifierExpression(TypeScriptParser.IdentifierExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitIdentifierExpression(TypeScriptParser.IdentifierExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterBitAndExpression(TypeScriptParser.BitAndExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitBitAndExpression(TypeScriptParser.BitAndExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterBitOrExpression(TypeScriptParser.BitOrExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitBitOrExpression(TypeScriptParser.BitOrExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAssignmentOperatorExpression(TypeScriptParser.AssignmentOperatorExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAssignmentOperatorExpression(TypeScriptParser.AssignmentOperatorExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterVoidExpression(TypeScriptParser.VoidExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitVoidExpression(TypeScriptParser.VoidExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAsExpression(TypeScriptParser.AsExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAsExpression(TypeScriptParser.AsExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArrowFunctionDeclaration(TypeScriptParser.ArrowFunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArrowFunctionDeclaration(TypeScriptParser.ArrowFunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArrowFunctionParameters(TypeScriptParser.ArrowFunctionParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArrowFunctionParameters(TypeScriptParser.ArrowFunctionParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterArrowFunctionBody(TypeScriptParser.ArrowFunctionBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitArrowFunctionBody(TypeScriptParser.ArrowFunctionBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterAssignmentOperator(TypeScriptParser.AssignmentOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitAssignmentOperator(TypeScriptParser.AssignmentOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterLiteral(TypeScriptParser.LiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitLiteral(TypeScriptParser.LiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTemplateStringLiteral(TypeScriptParser.TemplateStringLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTemplateStringLiteral(TypeScriptParser.TemplateStringLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterTemplateStringAtom(TypeScriptParser.TemplateStringAtomContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitTemplateStringAtom(TypeScriptParser.TemplateStringAtomContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterNumericLiteral(TypeScriptParser.NumericLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitNumericLiteral(TypeScriptParser.NumericLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterIdentifierName(TypeScriptParser.IdentifierNameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitIdentifierName(TypeScriptParser.IdentifierNameContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterIdentifierOrKeyWord(TypeScriptParser.IdentifierOrKeyWordContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitIdentifierOrKeyWord(TypeScriptParser.IdentifierOrKeyWordContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterReservedWord(TypeScriptParser.ReservedWordContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitReservedWord(TypeScriptParser.ReservedWordContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterKeyword(TypeScriptParser.KeywordContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitKeyword(TypeScriptParser.KeywordContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterGetter(TypeScriptParser.GetterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitGetter(TypeScriptParser.GetterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterSetter(TypeScriptParser.SetterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitSetter(TypeScriptParser.SetterContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEos(TypeScriptParser.EosContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEos(TypeScriptParser.EosContext ctx) { } + + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void enterEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void exitEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void visitTerminal(TerminalNode node) { } + /** + * {@inheritDoc} + * + *

      The default implementation does nothing.

      + */ + @Override public void visitErrorNode(ErrorNode node) { } +} \ No newline at end of file diff --git a/src/main/java/grammar/TypeScriptParserListener.java b/src/main/java/grammar/TypeScriptParserListener.java new file mode 100644 index 00000000..967f51c2 --- /dev/null +++ b/src/main/java/grammar/TypeScriptParserListener.java @@ -0,0 +1,2291 @@ +// Generated from TypeScriptParser.g4 by ANTLR 4.5 +package grammar; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link TypeScriptParser}. + */ +public interface TypeScriptParserListener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link TypeScriptParser#initializer}. + * @param ctx the parse tree + */ + void enterInitializer(TypeScriptParser.InitializerContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#initializer}. + * @param ctx the parse tree + */ + void exitInitializer(TypeScriptParser.InitializerContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#bindingPattern}. + * @param ctx the parse tree + */ + void enterBindingPattern(TypeScriptParser.BindingPatternContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#bindingPattern}. + * @param ctx the parse tree + */ + void exitBindingPattern(TypeScriptParser.BindingPatternContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeParameters}. + * @param ctx the parse tree + */ + void enterTypeParameters(TypeScriptParser.TypeParametersContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeParameters}. + * @param ctx the parse tree + */ + void exitTypeParameters(TypeScriptParser.TypeParametersContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeParameterList}. + * @param ctx the parse tree + */ + void enterTypeParameterList(TypeScriptParser.TypeParameterListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeParameterList}. + * @param ctx the parse tree + */ + void exitTypeParameterList(TypeScriptParser.TypeParameterListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeParameter}. + * @param ctx the parse tree + */ + void enterTypeParameter(TypeScriptParser.TypeParameterContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeParameter}. + * @param ctx the parse tree + */ + void exitTypeParameter(TypeScriptParser.TypeParameterContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#constraint}. + * @param ctx the parse tree + */ + void enterConstraint(TypeScriptParser.ConstraintContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#constraint}. + * @param ctx the parse tree + */ + void exitConstraint(TypeScriptParser.ConstraintContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeArguments}. + * @param ctx the parse tree + */ + void enterTypeArguments(TypeScriptParser.TypeArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeArguments}. + * @param ctx the parse tree + */ + void exitTypeArguments(TypeScriptParser.TypeArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeArgumentList}. + * @param ctx the parse tree + */ + void enterTypeArgumentList(TypeScriptParser.TypeArgumentListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeArgumentList}. + * @param ctx the parse tree + */ + void exitTypeArgumentList(TypeScriptParser.TypeArgumentListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeArgument}. + * @param ctx the parse tree + */ + void enterTypeArgument(TypeScriptParser.TypeArgumentContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeArgument}. + * @param ctx the parse tree + */ + void exitTypeArgument(TypeScriptParser.TypeArgumentContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#type_}. + * @param ctx the parse tree + */ + void enterType_(TypeScriptParser.Type_Context ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#type_}. + * @param ctx the parse tree + */ + void exitType_(TypeScriptParser.Type_Context ctx); + /** + * Enter a parse tree produced by the {@code Intersection} + * labeled alternative in {@link TypeScriptParser#unionOrIntersectionOrPrimaryType}. + * @param ctx the parse tree + */ + void enterIntersection(TypeScriptParser.IntersectionContext ctx); + /** + * Exit a parse tree produced by the {@code Intersection} + * labeled alternative in {@link TypeScriptParser#unionOrIntersectionOrPrimaryType}. + * @param ctx the parse tree + */ + void exitIntersection(TypeScriptParser.IntersectionContext ctx); + /** + * Enter a parse tree produced by the {@code Primary} + * labeled alternative in {@link TypeScriptParser#unionOrIntersectionOrPrimaryType}. + * @param ctx the parse tree + */ + void enterPrimary(TypeScriptParser.PrimaryContext ctx); + /** + * Exit a parse tree produced by the {@code Primary} + * labeled alternative in {@link TypeScriptParser#unionOrIntersectionOrPrimaryType}. + * @param ctx the parse tree + */ + void exitPrimary(TypeScriptParser.PrimaryContext ctx); + /** + * Enter a parse tree produced by the {@code Union} + * labeled alternative in {@link TypeScriptParser#unionOrIntersectionOrPrimaryType}. + * @param ctx the parse tree + */ + void enterUnion(TypeScriptParser.UnionContext ctx); + /** + * Exit a parse tree produced by the {@code Union} + * labeled alternative in {@link TypeScriptParser#unionOrIntersectionOrPrimaryType}. + * @param ctx the parse tree + */ + void exitUnion(TypeScriptParser.UnionContext ctx); + /** + * Enter a parse tree produced by the {@code RedefinitionOfType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void enterRedefinitionOfType(TypeScriptParser.RedefinitionOfTypeContext ctx); + /** + * Exit a parse tree produced by the {@code RedefinitionOfType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void exitRedefinitionOfType(TypeScriptParser.RedefinitionOfTypeContext ctx); + /** + * Enter a parse tree produced by the {@code PredefinedPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void enterPredefinedPrimType(TypeScriptParser.PredefinedPrimTypeContext ctx); + /** + * Exit a parse tree produced by the {@code PredefinedPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void exitPredefinedPrimType(TypeScriptParser.PredefinedPrimTypeContext ctx); + /** + * Enter a parse tree produced by the {@code ArrayPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void enterArrayPrimType(TypeScriptParser.ArrayPrimTypeContext ctx); + /** + * Exit a parse tree produced by the {@code ArrayPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void exitArrayPrimType(TypeScriptParser.ArrayPrimTypeContext ctx); + /** + * Enter a parse tree produced by the {@code ParenthesizedPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void enterParenthesizedPrimType(TypeScriptParser.ParenthesizedPrimTypeContext ctx); + /** + * Exit a parse tree produced by the {@code ParenthesizedPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void exitParenthesizedPrimType(TypeScriptParser.ParenthesizedPrimTypeContext ctx); + /** + * Enter a parse tree produced by the {@code ThisPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void enterThisPrimType(TypeScriptParser.ThisPrimTypeContext ctx); + /** + * Exit a parse tree produced by the {@code ThisPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void exitThisPrimType(TypeScriptParser.ThisPrimTypeContext ctx); + /** + * Enter a parse tree produced by the {@code TuplePrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void enterTuplePrimType(TypeScriptParser.TuplePrimTypeContext ctx); + /** + * Exit a parse tree produced by the {@code TuplePrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void exitTuplePrimType(TypeScriptParser.TuplePrimTypeContext ctx); + /** + * Enter a parse tree produced by the {@code ObjectPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void enterObjectPrimType(TypeScriptParser.ObjectPrimTypeContext ctx); + /** + * Exit a parse tree produced by the {@code ObjectPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void exitObjectPrimType(TypeScriptParser.ObjectPrimTypeContext ctx); + /** + * Enter a parse tree produced by the {@code ReferencePrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void enterReferencePrimType(TypeScriptParser.ReferencePrimTypeContext ctx); + /** + * Exit a parse tree produced by the {@code ReferencePrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void exitReferencePrimType(TypeScriptParser.ReferencePrimTypeContext ctx); + /** + * Enter a parse tree produced by the {@code QueryPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void enterQueryPrimType(TypeScriptParser.QueryPrimTypeContext ctx); + /** + * Exit a parse tree produced by the {@code QueryPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void exitQueryPrimType(TypeScriptParser.QueryPrimTypeContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#predefinedType}. + * @param ctx the parse tree + */ + void enterPredefinedType(TypeScriptParser.PredefinedTypeContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#predefinedType}. + * @param ctx the parse tree + */ + void exitPredefinedType(TypeScriptParser.PredefinedTypeContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeReference}. + * @param ctx the parse tree + */ + void enterTypeReference(TypeScriptParser.TypeReferenceContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeReference}. + * @param ctx the parse tree + */ + void exitTypeReference(TypeScriptParser.TypeReferenceContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#nestedTypeGeneric}. + * @param ctx the parse tree + */ + void enterNestedTypeGeneric(TypeScriptParser.NestedTypeGenericContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#nestedTypeGeneric}. + * @param ctx the parse tree + */ + void exitNestedTypeGeneric(TypeScriptParser.NestedTypeGenericContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeGeneric}. + * @param ctx the parse tree + */ + void enterTypeGeneric(TypeScriptParser.TypeGenericContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeGeneric}. + * @param ctx the parse tree + */ + void exitTypeGeneric(TypeScriptParser.TypeGenericContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeIncludeGeneric}. + * @param ctx the parse tree + */ + void enterTypeIncludeGeneric(TypeScriptParser.TypeIncludeGenericContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeIncludeGeneric}. + * @param ctx the parse tree + */ + void exitTypeIncludeGeneric(TypeScriptParser.TypeIncludeGenericContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeName}. + * @param ctx the parse tree + */ + void enterTypeName(TypeScriptParser.TypeNameContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeName}. + * @param ctx the parse tree + */ + void exitTypeName(TypeScriptParser.TypeNameContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#objectType}. + * @param ctx the parse tree + */ + void enterObjectType(TypeScriptParser.ObjectTypeContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#objectType}. + * @param ctx the parse tree + */ + void exitObjectType(TypeScriptParser.ObjectTypeContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeBody}. + * @param ctx the parse tree + */ + void enterTypeBody(TypeScriptParser.TypeBodyContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeBody}. + * @param ctx the parse tree + */ + void exitTypeBody(TypeScriptParser.TypeBodyContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeMemberList}. + * @param ctx the parse tree + */ + void enterTypeMemberList(TypeScriptParser.TypeMemberListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeMemberList}. + * @param ctx the parse tree + */ + void exitTypeMemberList(TypeScriptParser.TypeMemberListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeMember}. + * @param ctx the parse tree + */ + void enterTypeMember(TypeScriptParser.TypeMemberContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeMember}. + * @param ctx the parse tree + */ + void exitTypeMember(TypeScriptParser.TypeMemberContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#arrayType}. + * @param ctx the parse tree + */ + void enterArrayType(TypeScriptParser.ArrayTypeContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#arrayType}. + * @param ctx the parse tree + */ + void exitArrayType(TypeScriptParser.ArrayTypeContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#tupleType}. + * @param ctx the parse tree + */ + void enterTupleType(TypeScriptParser.TupleTypeContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#tupleType}. + * @param ctx the parse tree + */ + void exitTupleType(TypeScriptParser.TupleTypeContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#tupleElementTypes}. + * @param ctx the parse tree + */ + void enterTupleElementTypes(TypeScriptParser.TupleElementTypesContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#tupleElementTypes}. + * @param ctx the parse tree + */ + void exitTupleElementTypes(TypeScriptParser.TupleElementTypesContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#functionType}. + * @param ctx the parse tree + */ + void enterFunctionType(TypeScriptParser.FunctionTypeContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#functionType}. + * @param ctx the parse tree + */ + void exitFunctionType(TypeScriptParser.FunctionTypeContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#constructorType}. + * @param ctx the parse tree + */ + void enterConstructorType(TypeScriptParser.ConstructorTypeContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#constructorType}. + * @param ctx the parse tree + */ + void exitConstructorType(TypeScriptParser.ConstructorTypeContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeQuery}. + * @param ctx the parse tree + */ + void enterTypeQuery(TypeScriptParser.TypeQueryContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeQuery}. + * @param ctx the parse tree + */ + void exitTypeQuery(TypeScriptParser.TypeQueryContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeQueryExpression}. + * @param ctx the parse tree + */ + void enterTypeQueryExpression(TypeScriptParser.TypeQueryExpressionContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeQueryExpression}. + * @param ctx the parse tree + */ + void exitTypeQueryExpression(TypeScriptParser.TypeQueryExpressionContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#propertySignatur}. + * @param ctx the parse tree + */ + void enterPropertySignatur(TypeScriptParser.PropertySignaturContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#propertySignatur}. + * @param ctx the parse tree + */ + void exitPropertySignatur(TypeScriptParser.PropertySignaturContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeAnnotation}. + * @param ctx the parse tree + */ + void enterTypeAnnotation(TypeScriptParser.TypeAnnotationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeAnnotation}. + * @param ctx the parse tree + */ + void exitTypeAnnotation(TypeScriptParser.TypeAnnotationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#callSignature}. + * @param ctx the parse tree + */ + void enterCallSignature(TypeScriptParser.CallSignatureContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#callSignature}. + * @param ctx the parse tree + */ + void exitCallSignature(TypeScriptParser.CallSignatureContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#parameterList}. + * @param ctx the parse tree + */ + void enterParameterList(TypeScriptParser.ParameterListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#parameterList}. + * @param ctx the parse tree + */ + void exitParameterList(TypeScriptParser.ParameterListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#requiredParameterList}. + * @param ctx the parse tree + */ + void enterRequiredParameterList(TypeScriptParser.RequiredParameterListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#requiredParameterList}. + * @param ctx the parse tree + */ + void exitRequiredParameterList(TypeScriptParser.RequiredParameterListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#parameter}. + * @param ctx the parse tree + */ + void enterParameter(TypeScriptParser.ParameterContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#parameter}. + * @param ctx the parse tree + */ + void exitParameter(TypeScriptParser.ParameterContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#optionalParameter}. + * @param ctx the parse tree + */ + void enterOptionalParameter(TypeScriptParser.OptionalParameterContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#optionalParameter}. + * @param ctx the parse tree + */ + void exitOptionalParameter(TypeScriptParser.OptionalParameterContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#restParameter}. + * @param ctx the parse tree + */ + void enterRestParameter(TypeScriptParser.RestParameterContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#restParameter}. + * @param ctx the parse tree + */ + void exitRestParameter(TypeScriptParser.RestParameterContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#requiredParameter}. + * @param ctx the parse tree + */ + void enterRequiredParameter(TypeScriptParser.RequiredParameterContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#requiredParameter}. + * @param ctx the parse tree + */ + void exitRequiredParameter(TypeScriptParser.RequiredParameterContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#accessibilityModifier}. + * @param ctx the parse tree + */ + void enterAccessibilityModifier(TypeScriptParser.AccessibilityModifierContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#accessibilityModifier}. + * @param ctx the parse tree + */ + void exitAccessibilityModifier(TypeScriptParser.AccessibilityModifierContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#identifierOrPattern}. + * @param ctx the parse tree + */ + void enterIdentifierOrPattern(TypeScriptParser.IdentifierOrPatternContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#identifierOrPattern}. + * @param ctx the parse tree + */ + void exitIdentifierOrPattern(TypeScriptParser.IdentifierOrPatternContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#constructSignature}. + * @param ctx the parse tree + */ + void enterConstructSignature(TypeScriptParser.ConstructSignatureContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#constructSignature}. + * @param ctx the parse tree + */ + void exitConstructSignature(TypeScriptParser.ConstructSignatureContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#indexSignature}. + * @param ctx the parse tree + */ + void enterIndexSignature(TypeScriptParser.IndexSignatureContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#indexSignature}. + * @param ctx the parse tree + */ + void exitIndexSignature(TypeScriptParser.IndexSignatureContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#methodSignature}. + * @param ctx the parse tree + */ + void enterMethodSignature(TypeScriptParser.MethodSignatureContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#methodSignature}. + * @param ctx the parse tree + */ + void exitMethodSignature(TypeScriptParser.MethodSignatureContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeAliasDeclaration}. + * @param ctx the parse tree + */ + void enterTypeAliasDeclaration(TypeScriptParser.TypeAliasDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeAliasDeclaration}. + * @param ctx the parse tree + */ + void exitTypeAliasDeclaration(TypeScriptParser.TypeAliasDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#constructorDeclaration}. + * @param ctx the parse tree + */ + void enterConstructorDeclaration(TypeScriptParser.ConstructorDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#constructorDeclaration}. + * @param ctx the parse tree + */ + void exitConstructorDeclaration(TypeScriptParser.ConstructorDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#interfaceDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceDeclaration(TypeScriptParser.InterfaceDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#interfaceDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceDeclaration(TypeScriptParser.InterfaceDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#interfaceExtendsClause}. + * @param ctx the parse tree + */ + void enterInterfaceExtendsClause(TypeScriptParser.InterfaceExtendsClauseContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#interfaceExtendsClause}. + * @param ctx the parse tree + */ + void exitInterfaceExtendsClause(TypeScriptParser.InterfaceExtendsClauseContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#classOrInterfaceTypeList}. + * @param ctx the parse tree + */ + void enterClassOrInterfaceTypeList(TypeScriptParser.ClassOrInterfaceTypeListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#classOrInterfaceTypeList}. + * @param ctx the parse tree + */ + void exitClassOrInterfaceTypeList(TypeScriptParser.ClassOrInterfaceTypeListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#enumDeclaration}. + * @param ctx the parse tree + */ + void enterEnumDeclaration(TypeScriptParser.EnumDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#enumDeclaration}. + * @param ctx the parse tree + */ + void exitEnumDeclaration(TypeScriptParser.EnumDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#enumBody}. + * @param ctx the parse tree + */ + void enterEnumBody(TypeScriptParser.EnumBodyContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#enumBody}. + * @param ctx the parse tree + */ + void exitEnumBody(TypeScriptParser.EnumBodyContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#enumMemberList}. + * @param ctx the parse tree + */ + void enterEnumMemberList(TypeScriptParser.EnumMemberListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#enumMemberList}. + * @param ctx the parse tree + */ + void exitEnumMemberList(TypeScriptParser.EnumMemberListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#enumMember}. + * @param ctx the parse tree + */ + void enterEnumMember(TypeScriptParser.EnumMemberContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#enumMember}. + * @param ctx the parse tree + */ + void exitEnumMember(TypeScriptParser.EnumMemberContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#namespaceDeclaration}. + * @param ctx the parse tree + */ + void enterNamespaceDeclaration(TypeScriptParser.NamespaceDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#namespaceDeclaration}. + * @param ctx the parse tree + */ + void exitNamespaceDeclaration(TypeScriptParser.NamespaceDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#namespaceName}. + * @param ctx the parse tree + */ + void enterNamespaceName(TypeScriptParser.NamespaceNameContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#namespaceName}. + * @param ctx the parse tree + */ + void exitNamespaceName(TypeScriptParser.NamespaceNameContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#importAliasDeclaration}. + * @param ctx the parse tree + */ + void enterImportAliasDeclaration(TypeScriptParser.ImportAliasDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#importAliasDeclaration}. + * @param ctx the parse tree + */ + void exitImportAliasDeclaration(TypeScriptParser.ImportAliasDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#decoratorList}. + * @param ctx the parse tree + */ + void enterDecoratorList(TypeScriptParser.DecoratorListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#decoratorList}. + * @param ctx the parse tree + */ + void exitDecoratorList(TypeScriptParser.DecoratorListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#decorator}. + * @param ctx the parse tree + */ + void enterDecorator(TypeScriptParser.DecoratorContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#decorator}. + * @param ctx the parse tree + */ + void exitDecorator(TypeScriptParser.DecoratorContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#decoratorMemberExpression}. + * @param ctx the parse tree + */ + void enterDecoratorMemberExpression(TypeScriptParser.DecoratorMemberExpressionContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#decoratorMemberExpression}. + * @param ctx the parse tree + */ + void exitDecoratorMemberExpression(TypeScriptParser.DecoratorMemberExpressionContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#decoratorCallExpression}. + * @param ctx the parse tree + */ + void enterDecoratorCallExpression(TypeScriptParser.DecoratorCallExpressionContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#decoratorCallExpression}. + * @param ctx the parse tree + */ + void exitDecoratorCallExpression(TypeScriptParser.DecoratorCallExpressionContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#program}. + * @param ctx the parse tree + */ + void enterProgram(TypeScriptParser.ProgramContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#program}. + * @param ctx the parse tree + */ + void exitProgram(TypeScriptParser.ProgramContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#sourceElement}. + * @param ctx the parse tree + */ + void enterSourceElement(TypeScriptParser.SourceElementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#sourceElement}. + * @param ctx the parse tree + */ + void exitSourceElement(TypeScriptParser.SourceElementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#statement}. + * @param ctx the parse tree + */ + void enterStatement(TypeScriptParser.StatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#statement}. + * @param ctx the parse tree + */ + void exitStatement(TypeScriptParser.StatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#block}. + * @param ctx the parse tree + */ + void enterBlock(TypeScriptParser.BlockContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#block}. + * @param ctx the parse tree + */ + void exitBlock(TypeScriptParser.BlockContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#statementList}. + * @param ctx the parse tree + */ + void enterStatementList(TypeScriptParser.StatementListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#statementList}. + * @param ctx the parse tree + */ + void exitStatementList(TypeScriptParser.StatementListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#abstractDeclaration}. + * @param ctx the parse tree + */ + void enterAbstractDeclaration(TypeScriptParser.AbstractDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#abstractDeclaration}. + * @param ctx the parse tree + */ + void exitAbstractDeclaration(TypeScriptParser.AbstractDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#importStatement}. + * @param ctx the parse tree + */ + void enterImportStatement(TypeScriptParser.ImportStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#importStatement}. + * @param ctx the parse tree + */ + void exitImportStatement(TypeScriptParser.ImportStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#fromBlock}. + * @param ctx the parse tree + */ + void enterFromBlock(TypeScriptParser.FromBlockContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#fromBlock}. + * @param ctx the parse tree + */ + void exitFromBlock(TypeScriptParser.FromBlockContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#multipleImportStatement}. + * @param ctx the parse tree + */ + void enterMultipleImportStatement(TypeScriptParser.MultipleImportStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#multipleImportStatement}. + * @param ctx the parse tree + */ + void exitMultipleImportStatement(TypeScriptParser.MultipleImportStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#exportStatement}. + * @param ctx the parse tree + */ + void enterExportStatement(TypeScriptParser.ExportStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#exportStatement}. + * @param ctx the parse tree + */ + void exitExportStatement(TypeScriptParser.ExportStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#variableStatement}. + * @param ctx the parse tree + */ + void enterVariableStatement(TypeScriptParser.VariableStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#variableStatement}. + * @param ctx the parse tree + */ + void exitVariableStatement(TypeScriptParser.VariableStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#variableDeclarationList}. + * @param ctx the parse tree + */ + void enterVariableDeclarationList(TypeScriptParser.VariableDeclarationListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#variableDeclarationList}. + * @param ctx the parse tree + */ + void exitVariableDeclarationList(TypeScriptParser.VariableDeclarationListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#variableDeclaration}. + * @param ctx the parse tree + */ + void enterVariableDeclaration(TypeScriptParser.VariableDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#variableDeclaration}. + * @param ctx the parse tree + */ + void exitVariableDeclaration(TypeScriptParser.VariableDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#emptyStatement_}. + * @param ctx the parse tree + */ + void enterEmptyStatement_(TypeScriptParser.EmptyStatement_Context ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#emptyStatement_}. + * @param ctx the parse tree + */ + void exitEmptyStatement_(TypeScriptParser.EmptyStatement_Context ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#expressionStatement}. + * @param ctx the parse tree + */ + void enterExpressionStatement(TypeScriptParser.ExpressionStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#expressionStatement}. + * @param ctx the parse tree + */ + void exitExpressionStatement(TypeScriptParser.ExpressionStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#ifStatement}. + * @param ctx the parse tree + */ + void enterIfStatement(TypeScriptParser.IfStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#ifStatement}. + * @param ctx the parse tree + */ + void exitIfStatement(TypeScriptParser.IfStatementContext ctx); + /** + * Enter a parse tree produced by the {@code DoStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void enterDoStatement(TypeScriptParser.DoStatementContext ctx); + /** + * Exit a parse tree produced by the {@code DoStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void exitDoStatement(TypeScriptParser.DoStatementContext ctx); + /** + * Enter a parse tree produced by the {@code WhileStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void enterWhileStatement(TypeScriptParser.WhileStatementContext ctx); + /** + * Exit a parse tree produced by the {@code WhileStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void exitWhileStatement(TypeScriptParser.WhileStatementContext ctx); + /** + * Enter a parse tree produced by the {@code ForStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void enterForStatement(TypeScriptParser.ForStatementContext ctx); + /** + * Exit a parse tree produced by the {@code ForStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void exitForStatement(TypeScriptParser.ForStatementContext ctx); + /** + * Enter a parse tree produced by the {@code ForVarStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void enterForVarStatement(TypeScriptParser.ForVarStatementContext ctx); + /** + * Exit a parse tree produced by the {@code ForVarStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void exitForVarStatement(TypeScriptParser.ForVarStatementContext ctx); + /** + * Enter a parse tree produced by the {@code ForInStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void enterForInStatement(TypeScriptParser.ForInStatementContext ctx); + /** + * Exit a parse tree produced by the {@code ForInStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void exitForInStatement(TypeScriptParser.ForInStatementContext ctx); + /** + * Enter a parse tree produced by the {@code ForVarInStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void enterForVarInStatement(TypeScriptParser.ForVarInStatementContext ctx); + /** + * Exit a parse tree produced by the {@code ForVarInStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void exitForVarInStatement(TypeScriptParser.ForVarInStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#varModifier}. + * @param ctx the parse tree + */ + void enterVarModifier(TypeScriptParser.VarModifierContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#varModifier}. + * @param ctx the parse tree + */ + void exitVarModifier(TypeScriptParser.VarModifierContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#continueStatement}. + * @param ctx the parse tree + */ + void enterContinueStatement(TypeScriptParser.ContinueStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#continueStatement}. + * @param ctx the parse tree + */ + void exitContinueStatement(TypeScriptParser.ContinueStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#breakStatement}. + * @param ctx the parse tree + */ + void enterBreakStatement(TypeScriptParser.BreakStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#breakStatement}. + * @param ctx the parse tree + */ + void exitBreakStatement(TypeScriptParser.BreakStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#returnStatement}. + * @param ctx the parse tree + */ + void enterReturnStatement(TypeScriptParser.ReturnStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#returnStatement}. + * @param ctx the parse tree + */ + void exitReturnStatement(TypeScriptParser.ReturnStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#yieldStatement}. + * @param ctx the parse tree + */ + void enterYieldStatement(TypeScriptParser.YieldStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#yieldStatement}. + * @param ctx the parse tree + */ + void exitYieldStatement(TypeScriptParser.YieldStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#withStatement}. + * @param ctx the parse tree + */ + void enterWithStatement(TypeScriptParser.WithStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#withStatement}. + * @param ctx the parse tree + */ + void exitWithStatement(TypeScriptParser.WithStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#switchStatement}. + * @param ctx the parse tree + */ + void enterSwitchStatement(TypeScriptParser.SwitchStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#switchStatement}. + * @param ctx the parse tree + */ + void exitSwitchStatement(TypeScriptParser.SwitchStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#caseBlock}. + * @param ctx the parse tree + */ + void enterCaseBlock(TypeScriptParser.CaseBlockContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#caseBlock}. + * @param ctx the parse tree + */ + void exitCaseBlock(TypeScriptParser.CaseBlockContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#caseClauses}. + * @param ctx the parse tree + */ + void enterCaseClauses(TypeScriptParser.CaseClausesContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#caseClauses}. + * @param ctx the parse tree + */ + void exitCaseClauses(TypeScriptParser.CaseClausesContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#caseClause}. + * @param ctx the parse tree + */ + void enterCaseClause(TypeScriptParser.CaseClauseContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#caseClause}. + * @param ctx the parse tree + */ + void exitCaseClause(TypeScriptParser.CaseClauseContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#defaultClause}. + * @param ctx the parse tree + */ + void enterDefaultClause(TypeScriptParser.DefaultClauseContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#defaultClause}. + * @param ctx the parse tree + */ + void exitDefaultClause(TypeScriptParser.DefaultClauseContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#labelledStatement}. + * @param ctx the parse tree + */ + void enterLabelledStatement(TypeScriptParser.LabelledStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#labelledStatement}. + * @param ctx the parse tree + */ + void exitLabelledStatement(TypeScriptParser.LabelledStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#throwStatement}. + * @param ctx the parse tree + */ + void enterThrowStatement(TypeScriptParser.ThrowStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#throwStatement}. + * @param ctx the parse tree + */ + void exitThrowStatement(TypeScriptParser.ThrowStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#tryStatement}. + * @param ctx the parse tree + */ + void enterTryStatement(TypeScriptParser.TryStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#tryStatement}. + * @param ctx the parse tree + */ + void exitTryStatement(TypeScriptParser.TryStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#catchProduction}. + * @param ctx the parse tree + */ + void enterCatchProduction(TypeScriptParser.CatchProductionContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#catchProduction}. + * @param ctx the parse tree + */ + void exitCatchProduction(TypeScriptParser.CatchProductionContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#finallyProduction}. + * @param ctx the parse tree + */ + void enterFinallyProduction(TypeScriptParser.FinallyProductionContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#finallyProduction}. + * @param ctx the parse tree + */ + void exitFinallyProduction(TypeScriptParser.FinallyProductionContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#debuggerStatement}. + * @param ctx the parse tree + */ + void enterDebuggerStatement(TypeScriptParser.DebuggerStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#debuggerStatement}. + * @param ctx the parse tree + */ + void exitDebuggerStatement(TypeScriptParser.DebuggerStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#functionDeclaration}. + * @param ctx the parse tree + */ + void enterFunctionDeclaration(TypeScriptParser.FunctionDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#functionDeclaration}. + * @param ctx the parse tree + */ + void exitFunctionDeclaration(TypeScriptParser.FunctionDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#classDeclaration}. + * @param ctx the parse tree + */ + void enterClassDeclaration(TypeScriptParser.ClassDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#classDeclaration}. + * @param ctx the parse tree + */ + void exitClassDeclaration(TypeScriptParser.ClassDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#classHeritage}. + * @param ctx the parse tree + */ + void enterClassHeritage(TypeScriptParser.ClassHeritageContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#classHeritage}. + * @param ctx the parse tree + */ + void exitClassHeritage(TypeScriptParser.ClassHeritageContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#classTail}. + * @param ctx the parse tree + */ + void enterClassTail(TypeScriptParser.ClassTailContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#classTail}. + * @param ctx the parse tree + */ + void exitClassTail(TypeScriptParser.ClassTailContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#classExtendsClause}. + * @param ctx the parse tree + */ + void enterClassExtendsClause(TypeScriptParser.ClassExtendsClauseContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#classExtendsClause}. + * @param ctx the parse tree + */ + void exitClassExtendsClause(TypeScriptParser.ClassExtendsClauseContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#implementsClause}. + * @param ctx the parse tree + */ + void enterImplementsClause(TypeScriptParser.ImplementsClauseContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#implementsClause}. + * @param ctx the parse tree + */ + void exitImplementsClause(TypeScriptParser.ImplementsClauseContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#classElement}. + * @param ctx the parse tree + */ + void enterClassElement(TypeScriptParser.ClassElementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#classElement}. + * @param ctx the parse tree + */ + void exitClassElement(TypeScriptParser.ClassElementContext ctx); + /** + * Enter a parse tree produced by the {@code PropertyDeclarationExpression} + * labeled alternative in {@link TypeScriptParser#propertyMemberDeclaration}. + * @param ctx the parse tree + */ + void enterPropertyDeclarationExpression(TypeScriptParser.PropertyDeclarationExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code PropertyDeclarationExpression} + * labeled alternative in {@link TypeScriptParser#propertyMemberDeclaration}. + * @param ctx the parse tree + */ + void exitPropertyDeclarationExpression(TypeScriptParser.PropertyDeclarationExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code MethodDeclarationExpression} + * labeled alternative in {@link TypeScriptParser#propertyMemberDeclaration}. + * @param ctx the parse tree + */ + void enterMethodDeclarationExpression(TypeScriptParser.MethodDeclarationExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code MethodDeclarationExpression} + * labeled alternative in {@link TypeScriptParser#propertyMemberDeclaration}. + * @param ctx the parse tree + */ + void exitMethodDeclarationExpression(TypeScriptParser.MethodDeclarationExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code GetterSetterDeclarationExpression} + * labeled alternative in {@link TypeScriptParser#propertyMemberDeclaration}. + * @param ctx the parse tree + */ + void enterGetterSetterDeclarationExpression(TypeScriptParser.GetterSetterDeclarationExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code GetterSetterDeclarationExpression} + * labeled alternative in {@link TypeScriptParser#propertyMemberDeclaration}. + * @param ctx the parse tree + */ + void exitGetterSetterDeclarationExpression(TypeScriptParser.GetterSetterDeclarationExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code AbstractMemberDeclaration} + * labeled alternative in {@link TypeScriptParser#propertyMemberDeclaration}. + * @param ctx the parse tree + */ + void enterAbstractMemberDeclaration(TypeScriptParser.AbstractMemberDeclarationContext ctx); + /** + * Exit a parse tree produced by the {@code AbstractMemberDeclaration} + * labeled alternative in {@link TypeScriptParser#propertyMemberDeclaration}. + * @param ctx the parse tree + */ + void exitAbstractMemberDeclaration(TypeScriptParser.AbstractMemberDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#propertyMemberBase}. + * @param ctx the parse tree + */ + void enterPropertyMemberBase(TypeScriptParser.PropertyMemberBaseContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#propertyMemberBase}. + * @param ctx the parse tree + */ + void exitPropertyMemberBase(TypeScriptParser.PropertyMemberBaseContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#indexMemberDeclaration}. + * @param ctx the parse tree + */ + void enterIndexMemberDeclaration(TypeScriptParser.IndexMemberDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#indexMemberDeclaration}. + * @param ctx the parse tree + */ + void exitIndexMemberDeclaration(TypeScriptParser.IndexMemberDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#generatorMethod}. + * @param ctx the parse tree + */ + void enterGeneratorMethod(TypeScriptParser.GeneratorMethodContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#generatorMethod}. + * @param ctx the parse tree + */ + void exitGeneratorMethod(TypeScriptParser.GeneratorMethodContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#generatorFunctionDeclaration}. + * @param ctx the parse tree + */ + void enterGeneratorFunctionDeclaration(TypeScriptParser.GeneratorFunctionDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#generatorFunctionDeclaration}. + * @param ctx the parse tree + */ + void exitGeneratorFunctionDeclaration(TypeScriptParser.GeneratorFunctionDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#generatorBlock}. + * @param ctx the parse tree + */ + void enterGeneratorBlock(TypeScriptParser.GeneratorBlockContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#generatorBlock}. + * @param ctx the parse tree + */ + void exitGeneratorBlock(TypeScriptParser.GeneratorBlockContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#generatorDefinition}. + * @param ctx the parse tree + */ + void enterGeneratorDefinition(TypeScriptParser.GeneratorDefinitionContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#generatorDefinition}. + * @param ctx the parse tree + */ + void exitGeneratorDefinition(TypeScriptParser.GeneratorDefinitionContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#iteratorBlock}. + * @param ctx the parse tree + */ + void enterIteratorBlock(TypeScriptParser.IteratorBlockContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#iteratorBlock}. + * @param ctx the parse tree + */ + void exitIteratorBlock(TypeScriptParser.IteratorBlockContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#iteratorDefinition}. + * @param ctx the parse tree + */ + void enterIteratorDefinition(TypeScriptParser.IteratorDefinitionContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#iteratorDefinition}. + * @param ctx the parse tree + */ + void exitIteratorDefinition(TypeScriptParser.IteratorDefinitionContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#formalParameterList}. + * @param ctx the parse tree + */ + void enterFormalParameterList(TypeScriptParser.FormalParameterListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#formalParameterList}. + * @param ctx the parse tree + */ + void exitFormalParameterList(TypeScriptParser.FormalParameterListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#formalParameterArg}. + * @param ctx the parse tree + */ + void enterFormalParameterArg(TypeScriptParser.FormalParameterArgContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#formalParameterArg}. + * @param ctx the parse tree + */ + void exitFormalParameterArg(TypeScriptParser.FormalParameterArgContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#lastFormalParameterArg}. + * @param ctx the parse tree + */ + void enterLastFormalParameterArg(TypeScriptParser.LastFormalParameterArgContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#lastFormalParameterArg}. + * @param ctx the parse tree + */ + void exitLastFormalParameterArg(TypeScriptParser.LastFormalParameterArgContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#functionBody}. + * @param ctx the parse tree + */ + void enterFunctionBody(TypeScriptParser.FunctionBodyContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#functionBody}. + * @param ctx the parse tree + */ + void exitFunctionBody(TypeScriptParser.FunctionBodyContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#sourceElements}. + * @param ctx the parse tree + */ + void enterSourceElements(TypeScriptParser.SourceElementsContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#sourceElements}. + * @param ctx the parse tree + */ + void exitSourceElements(TypeScriptParser.SourceElementsContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#arrayLiteral}. + * @param ctx the parse tree + */ + void enterArrayLiteral(TypeScriptParser.ArrayLiteralContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#arrayLiteral}. + * @param ctx the parse tree + */ + void exitArrayLiteral(TypeScriptParser.ArrayLiteralContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#elementList}. + * @param ctx the parse tree + */ + void enterElementList(TypeScriptParser.ElementListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#elementList}. + * @param ctx the parse tree + */ + void exitElementList(TypeScriptParser.ElementListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#arrayElement}. + * @param ctx the parse tree + */ + void enterArrayElement(TypeScriptParser.ArrayElementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#arrayElement}. + * @param ctx the parse tree + */ + void exitArrayElement(TypeScriptParser.ArrayElementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#objectLiteral}. + * @param ctx the parse tree + */ + void enterObjectLiteral(TypeScriptParser.ObjectLiteralContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#objectLiteral}. + * @param ctx the parse tree + */ + void exitObjectLiteral(TypeScriptParser.ObjectLiteralContext ctx); + /** + * Enter a parse tree produced by the {@code PropertyExpressionAssignment} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void enterPropertyExpressionAssignment(TypeScriptParser.PropertyExpressionAssignmentContext ctx); + /** + * Exit a parse tree produced by the {@code PropertyExpressionAssignment} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void exitPropertyExpressionAssignment(TypeScriptParser.PropertyExpressionAssignmentContext ctx); + /** + * Enter a parse tree produced by the {@code ComputedPropertyExpressionAssignment} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void enterComputedPropertyExpressionAssignment(TypeScriptParser.ComputedPropertyExpressionAssignmentContext ctx); + /** + * Exit a parse tree produced by the {@code ComputedPropertyExpressionAssignment} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void exitComputedPropertyExpressionAssignment(TypeScriptParser.ComputedPropertyExpressionAssignmentContext ctx); + /** + * Enter a parse tree produced by the {@code PropertyGetter} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void enterPropertyGetter(TypeScriptParser.PropertyGetterContext ctx); + /** + * Exit a parse tree produced by the {@code PropertyGetter} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void exitPropertyGetter(TypeScriptParser.PropertyGetterContext ctx); + /** + * Enter a parse tree produced by the {@code PropertySetter} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void enterPropertySetter(TypeScriptParser.PropertySetterContext ctx); + /** + * Exit a parse tree produced by the {@code PropertySetter} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void exitPropertySetter(TypeScriptParser.PropertySetterContext ctx); + /** + * Enter a parse tree produced by the {@code MethodProperty} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void enterMethodProperty(TypeScriptParser.MethodPropertyContext ctx); + /** + * Exit a parse tree produced by the {@code MethodProperty} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void exitMethodProperty(TypeScriptParser.MethodPropertyContext ctx); + /** + * Enter a parse tree produced by the {@code PropertyShorthand} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void enterPropertyShorthand(TypeScriptParser.PropertyShorthandContext ctx); + /** + * Exit a parse tree produced by the {@code PropertyShorthand} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void exitPropertyShorthand(TypeScriptParser.PropertyShorthandContext ctx); + /** + * Enter a parse tree produced by the {@code RestParameterInObject} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void enterRestParameterInObject(TypeScriptParser.RestParameterInObjectContext ctx); + /** + * Exit a parse tree produced by the {@code RestParameterInObject} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void exitRestParameterInObject(TypeScriptParser.RestParameterInObjectContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#getAccessor}. + * @param ctx the parse tree + */ + void enterGetAccessor(TypeScriptParser.GetAccessorContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#getAccessor}. + * @param ctx the parse tree + */ + void exitGetAccessor(TypeScriptParser.GetAccessorContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#setAccessor}. + * @param ctx the parse tree + */ + void enterSetAccessor(TypeScriptParser.SetAccessorContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#setAccessor}. + * @param ctx the parse tree + */ + void exitSetAccessor(TypeScriptParser.SetAccessorContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#propertyName}. + * @param ctx the parse tree + */ + void enterPropertyName(TypeScriptParser.PropertyNameContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#propertyName}. + * @param ctx the parse tree + */ + void exitPropertyName(TypeScriptParser.PropertyNameContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#arguments}. + * @param ctx the parse tree + */ + void enterArguments(TypeScriptParser.ArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#arguments}. + * @param ctx the parse tree + */ + void exitArguments(TypeScriptParser.ArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#argumentList}. + * @param ctx the parse tree + */ + void enterArgumentList(TypeScriptParser.ArgumentListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#argumentList}. + * @param ctx the parse tree + */ + void exitArgumentList(TypeScriptParser.ArgumentListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#argument}. + * @param ctx the parse tree + */ + void enterArgument(TypeScriptParser.ArgumentContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#argument}. + * @param ctx the parse tree + */ + void exitArgument(TypeScriptParser.ArgumentContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#expressionSequence}. + * @param ctx the parse tree + */ + void enterExpressionSequence(TypeScriptParser.ExpressionSequenceContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#expressionSequence}. + * @param ctx the parse tree + */ + void exitExpressionSequence(TypeScriptParser.ExpressionSequenceContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#functionExpressionDeclaration}. + * @param ctx the parse tree + */ + void enterFunctionExpressionDeclaration(TypeScriptParser.FunctionExpressionDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#functionExpressionDeclaration}. + * @param ctx the parse tree + */ + void exitFunctionExpressionDeclaration(TypeScriptParser.FunctionExpressionDeclarationContext ctx); + /** + * Enter a parse tree produced by the {@code TemplateStringExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterTemplateStringExpression(TypeScriptParser.TemplateStringExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code TemplateStringExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitTemplateStringExpression(TypeScriptParser.TemplateStringExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code TernaryExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterTernaryExpression(TypeScriptParser.TernaryExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code TernaryExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitTernaryExpression(TypeScriptParser.TernaryExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code LogicalAndExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterLogicalAndExpression(TypeScriptParser.LogicalAndExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code LogicalAndExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitLogicalAndExpression(TypeScriptParser.LogicalAndExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code GeneratorsExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterGeneratorsExpression(TypeScriptParser.GeneratorsExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code GeneratorsExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitGeneratorsExpression(TypeScriptParser.GeneratorsExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code PreIncrementExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterPreIncrementExpression(TypeScriptParser.PreIncrementExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code PreIncrementExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitPreIncrementExpression(TypeScriptParser.PreIncrementExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code ObjectLiteralExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterObjectLiteralExpression(TypeScriptParser.ObjectLiteralExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code ObjectLiteralExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitObjectLiteralExpression(TypeScriptParser.ObjectLiteralExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code InExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterInExpression(TypeScriptParser.InExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code InExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitInExpression(TypeScriptParser.InExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code LogicalOrExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterLogicalOrExpression(TypeScriptParser.LogicalOrExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code LogicalOrExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitLogicalOrExpression(TypeScriptParser.LogicalOrExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code GenericTypes} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterGenericTypes(TypeScriptParser.GenericTypesContext ctx); + /** + * Exit a parse tree produced by the {@code GenericTypes} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitGenericTypes(TypeScriptParser.GenericTypesContext ctx); + /** + * Enter a parse tree produced by the {@code NotExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterNotExpression(TypeScriptParser.NotExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code NotExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitNotExpression(TypeScriptParser.NotExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code PreDecreaseExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterPreDecreaseExpression(TypeScriptParser.PreDecreaseExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code PreDecreaseExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitPreDecreaseExpression(TypeScriptParser.PreDecreaseExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code ArgumentsExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterArgumentsExpression(TypeScriptParser.ArgumentsExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code ArgumentsExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitArgumentsExpression(TypeScriptParser.ArgumentsExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code ThisExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterThisExpression(TypeScriptParser.ThisExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code ThisExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitThisExpression(TypeScriptParser.ThisExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code FunctionExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterFunctionExpression(TypeScriptParser.FunctionExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code FunctionExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitFunctionExpression(TypeScriptParser.FunctionExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code UnaryMinusExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterUnaryMinusExpression(TypeScriptParser.UnaryMinusExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code UnaryMinusExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitUnaryMinusExpression(TypeScriptParser.UnaryMinusExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code AssignmentExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterAssignmentExpression(TypeScriptParser.AssignmentExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code AssignmentExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitAssignmentExpression(TypeScriptParser.AssignmentExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code PostDecreaseExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterPostDecreaseExpression(TypeScriptParser.PostDecreaseExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code PostDecreaseExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitPostDecreaseExpression(TypeScriptParser.PostDecreaseExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code TypeofExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterTypeofExpression(TypeScriptParser.TypeofExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code TypeofExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitTypeofExpression(TypeScriptParser.TypeofExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code InstanceofExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterInstanceofExpression(TypeScriptParser.InstanceofExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code InstanceofExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitInstanceofExpression(TypeScriptParser.InstanceofExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code UnaryPlusExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterUnaryPlusExpression(TypeScriptParser.UnaryPlusExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code UnaryPlusExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitUnaryPlusExpression(TypeScriptParser.UnaryPlusExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code DeleteExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterDeleteExpression(TypeScriptParser.DeleteExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code DeleteExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitDeleteExpression(TypeScriptParser.DeleteExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code GeneratorsFunctionExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterGeneratorsFunctionExpression(TypeScriptParser.GeneratorsFunctionExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code GeneratorsFunctionExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitGeneratorsFunctionExpression(TypeScriptParser.GeneratorsFunctionExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code ArrowFunctionExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterArrowFunctionExpression(TypeScriptParser.ArrowFunctionExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code ArrowFunctionExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitArrowFunctionExpression(TypeScriptParser.ArrowFunctionExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code IteratorsExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterIteratorsExpression(TypeScriptParser.IteratorsExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code IteratorsExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitIteratorsExpression(TypeScriptParser.IteratorsExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code EqualityExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterEqualityExpression(TypeScriptParser.EqualityExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code EqualityExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitEqualityExpression(TypeScriptParser.EqualityExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code BitXOrExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterBitXOrExpression(TypeScriptParser.BitXOrExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code BitXOrExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitBitXOrExpression(TypeScriptParser.BitXOrExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code CastAsExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterCastAsExpression(TypeScriptParser.CastAsExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code CastAsExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitCastAsExpression(TypeScriptParser.CastAsExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code SuperExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterSuperExpression(TypeScriptParser.SuperExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code SuperExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitSuperExpression(TypeScriptParser.SuperExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code MultiplicativeExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterMultiplicativeExpression(TypeScriptParser.MultiplicativeExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code MultiplicativeExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitMultiplicativeExpression(TypeScriptParser.MultiplicativeExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code BitShiftExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterBitShiftExpression(TypeScriptParser.BitShiftExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code BitShiftExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitBitShiftExpression(TypeScriptParser.BitShiftExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code ParenthesizedExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterParenthesizedExpression(TypeScriptParser.ParenthesizedExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code ParenthesizedExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitParenthesizedExpression(TypeScriptParser.ParenthesizedExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code AdditiveExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterAdditiveExpression(TypeScriptParser.AdditiveExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code AdditiveExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitAdditiveExpression(TypeScriptParser.AdditiveExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code RelationalExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterRelationalExpression(TypeScriptParser.RelationalExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code RelationalExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitRelationalExpression(TypeScriptParser.RelationalExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code PostIncrementExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterPostIncrementExpression(TypeScriptParser.PostIncrementExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code PostIncrementExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitPostIncrementExpression(TypeScriptParser.PostIncrementExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code YieldExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterYieldExpression(TypeScriptParser.YieldExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code YieldExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitYieldExpression(TypeScriptParser.YieldExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code BitNotExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterBitNotExpression(TypeScriptParser.BitNotExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code BitNotExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitBitNotExpression(TypeScriptParser.BitNotExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code NewExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterNewExpression(TypeScriptParser.NewExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code NewExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitNewExpression(TypeScriptParser.NewExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code LiteralExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterLiteralExpression(TypeScriptParser.LiteralExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code LiteralExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitLiteralExpression(TypeScriptParser.LiteralExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code ArrayLiteralExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterArrayLiteralExpression(TypeScriptParser.ArrayLiteralExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code ArrayLiteralExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitArrayLiteralExpression(TypeScriptParser.ArrayLiteralExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code MemberDotExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterMemberDotExpression(TypeScriptParser.MemberDotExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code MemberDotExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitMemberDotExpression(TypeScriptParser.MemberDotExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code MemberIndexExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterMemberIndexExpression(TypeScriptParser.MemberIndexExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code MemberIndexExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitMemberIndexExpression(TypeScriptParser.MemberIndexExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code IdentifierExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterIdentifierExpression(TypeScriptParser.IdentifierExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code IdentifierExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitIdentifierExpression(TypeScriptParser.IdentifierExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code BitAndExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterBitAndExpression(TypeScriptParser.BitAndExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code BitAndExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitBitAndExpression(TypeScriptParser.BitAndExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code BitOrExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterBitOrExpression(TypeScriptParser.BitOrExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code BitOrExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitBitOrExpression(TypeScriptParser.BitOrExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code AssignmentOperatorExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterAssignmentOperatorExpression(TypeScriptParser.AssignmentOperatorExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code AssignmentOperatorExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitAssignmentOperatorExpression(TypeScriptParser.AssignmentOperatorExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code VoidExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterVoidExpression(TypeScriptParser.VoidExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code VoidExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitVoidExpression(TypeScriptParser.VoidExpressionContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#asExpression}. + * @param ctx the parse tree + */ + void enterAsExpression(TypeScriptParser.AsExpressionContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#asExpression}. + * @param ctx the parse tree + */ + void exitAsExpression(TypeScriptParser.AsExpressionContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#arrowFunctionDeclaration}. + * @param ctx the parse tree + */ + void enterArrowFunctionDeclaration(TypeScriptParser.ArrowFunctionDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#arrowFunctionDeclaration}. + * @param ctx the parse tree + */ + void exitArrowFunctionDeclaration(TypeScriptParser.ArrowFunctionDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#arrowFunctionParameters}. + * @param ctx the parse tree + */ + void enterArrowFunctionParameters(TypeScriptParser.ArrowFunctionParametersContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#arrowFunctionParameters}. + * @param ctx the parse tree + */ + void exitArrowFunctionParameters(TypeScriptParser.ArrowFunctionParametersContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#arrowFunctionBody}. + * @param ctx the parse tree + */ + void enterArrowFunctionBody(TypeScriptParser.ArrowFunctionBodyContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#arrowFunctionBody}. + * @param ctx the parse tree + */ + void exitArrowFunctionBody(TypeScriptParser.ArrowFunctionBodyContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#assignmentOperator}. + * @param ctx the parse tree + */ + void enterAssignmentOperator(TypeScriptParser.AssignmentOperatorContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#assignmentOperator}. + * @param ctx the parse tree + */ + void exitAssignmentOperator(TypeScriptParser.AssignmentOperatorContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#literal}. + * @param ctx the parse tree + */ + void enterLiteral(TypeScriptParser.LiteralContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#literal}. + * @param ctx the parse tree + */ + void exitLiteral(TypeScriptParser.LiteralContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#templateStringLiteral}. + * @param ctx the parse tree + */ + void enterTemplateStringLiteral(TypeScriptParser.TemplateStringLiteralContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#templateStringLiteral}. + * @param ctx the parse tree + */ + void exitTemplateStringLiteral(TypeScriptParser.TemplateStringLiteralContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#templateStringAtom}. + * @param ctx the parse tree + */ + void enterTemplateStringAtom(TypeScriptParser.TemplateStringAtomContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#templateStringAtom}. + * @param ctx the parse tree + */ + void exitTemplateStringAtom(TypeScriptParser.TemplateStringAtomContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#numericLiteral}. + * @param ctx the parse tree + */ + void enterNumericLiteral(TypeScriptParser.NumericLiteralContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#numericLiteral}. + * @param ctx the parse tree + */ + void exitNumericLiteral(TypeScriptParser.NumericLiteralContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#identifierName}. + * @param ctx the parse tree + */ + void enterIdentifierName(TypeScriptParser.IdentifierNameContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#identifierName}. + * @param ctx the parse tree + */ + void exitIdentifierName(TypeScriptParser.IdentifierNameContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#identifierOrKeyWord}. + * @param ctx the parse tree + */ + void enterIdentifierOrKeyWord(TypeScriptParser.IdentifierOrKeyWordContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#identifierOrKeyWord}. + * @param ctx the parse tree + */ + void exitIdentifierOrKeyWord(TypeScriptParser.IdentifierOrKeyWordContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#reservedWord}. + * @param ctx the parse tree + */ + void enterReservedWord(TypeScriptParser.ReservedWordContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#reservedWord}. + * @param ctx the parse tree + */ + void exitReservedWord(TypeScriptParser.ReservedWordContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#keyword}. + * @param ctx the parse tree + */ + void enterKeyword(TypeScriptParser.KeywordContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#keyword}. + * @param ctx the parse tree + */ + void exitKeyword(TypeScriptParser.KeywordContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#getter}. + * @param ctx the parse tree + */ + void enterGetter(TypeScriptParser.GetterContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#getter}. + * @param ctx the parse tree + */ + void exitGetter(TypeScriptParser.GetterContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#setter}. + * @param ctx the parse tree + */ + void enterSetter(TypeScriptParser.SetterContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#setter}. + * @param ctx the parse tree + */ + void exitSetter(TypeScriptParser.SetterContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#eos}. + * @param ctx the parse tree + */ + void enterEos(TypeScriptParser.EosContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#eos}. + * @param ctx the parse tree + */ + void exitEos(TypeScriptParser.EosContext ctx); +} \ No newline at end of file diff --git a/src/main/java/grammar/UnicodeClasses.java b/src/main/java/grammar/UnicodeClasses.java new file mode 100644 index 00000000..5aa1eddc --- /dev/null +++ b/src/main/java/grammar/UnicodeClasses.java @@ -0,0 +1,368 @@ +// Generated from UnicodeClasses.g4 by ANTLR 4.5 +package grammar; +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class UnicodeClasses extends Lexer { + static { RuntimeMetaData.checkVersion("4.5", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + UNICODE_CLASS_LL=1, UNICODE_CLASS_LM=2, UNICODE_CLASS_LO=3, UNICODE_CLASS_LT=4, + UNICODE_CLASS_LU=5, UNICODE_CLASS_ND=6, UNICODE_CLASS_NL=7; + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + public static final String[] ruleNames = { + "UNICODE_CLASS_LL", "UNICODE_CLASS_LM", "UNICODE_CLASS_LO", "UNICODE_CLASS_LT", + "UNICODE_CLASS_LU", "UNICODE_CLASS_ND", "UNICODE_CLASS_NL" + }; + + private static final String[] _LITERAL_NAMES = { + }; + private static final String[] _SYMBOLIC_NAMES = { + null, "UNICODE_CLASS_LL", "UNICODE_CLASS_LM", "UNICODE_CLASS_LO", "UNICODE_CLASS_LT", + "UNICODE_CLASS_LU", "UNICODE_CLASS_ND", "UNICODE_CLASS_NL" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + + public UnicodeClasses(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "UnicodeClasses.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\t\37\b\1\4\2\t\2"+ + "\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\3\2\3\2\3\3\3\3\3\4\3"+ + "\4\3\5\3\5\3\6\3\6\3\7\3\7\3\b\3\b\2\2\t\3\3\5\4\7\5\t\6\13\7\r\b\17\t"+ + "\3\2\t\u0248\2c|\u00b7\u00b7\u00e1\u00f8\u00fa\u0101\u0103\u0103\u0105"+ + "\u0105\u0107\u0107\u0109\u0109\u010b\u010b\u010d\u010d\u010f\u010f\u0111"+ + "\u0111\u0113\u0113\u0115\u0115\u0117\u0117\u0119\u0119\u011b\u011b\u011d"+ + "\u011d\u011f\u011f\u0121\u0121\u0123\u0123\u0125\u0125\u0127\u0127\u0129"+ + "\u0129\u012b\u012b\u012d\u012d\u012f\u012f\u0131\u0131\u0133\u0133\u0135"+ + "\u0135\u0137\u0137\u0139\u013a\u013c\u013c\u013e\u013e\u0140\u0140\u0142"+ + "\u0142\u0144\u0144\u0146\u0146\u0148\u0148\u014a\u014b\u014d\u014d\u014f"+ + "\u014f\u0151\u0151\u0153\u0153\u0155\u0155\u0157\u0157\u0159\u0159\u015b"+ + "\u015b\u015d\u015d\u015f\u015f\u0161\u0161\u0163\u0163\u0165\u0165\u0167"+ + "\u0167\u0169\u0169\u016b\u016b\u016d\u016d\u016f\u016f\u0171\u0171\u0173"+ + "\u0173\u0175\u0175\u0177\u0177\u0179\u0179\u017c\u017c\u017e\u017e\u0180"+ + "\u0182\u0185\u0185\u0187\u0187\u018a\u018a\u018e\u018f\u0194\u0194\u0197"+ + "\u0197\u019b\u019d\u01a0\u01a0\u01a3\u01a3\u01a5\u01a5\u01a7\u01a7\u01aa"+ + "\u01aa\u01ac\u01ad\u01af\u01af\u01b2\u01b2\u01b6\u01b6\u01b8\u01b8\u01bb"+ + "\u01bc\u01bf\u01c1\u01c8\u01c8\u01cb\u01cb\u01ce\u01ce\u01d0\u01d0\u01d2"+ + "\u01d2\u01d4\u01d4\u01d6\u01d6\u01d8\u01d8\u01da\u01da\u01dc\u01dc\u01de"+ + "\u01df\u01e1\u01e1\u01e3\u01e3\u01e5\u01e5\u01e7\u01e7\u01e9\u01e9\u01eb"+ + "\u01eb\u01ed\u01ed\u01ef\u01ef\u01f1\u01f2\u01f5\u01f5\u01f7\u01f7\u01fb"+ + "\u01fb\u01fd\u01fd\u01ff\u01ff\u0201\u0201\u0203\u0203\u0205\u0205\u0207"+ + "\u0207\u0209\u0209\u020b\u020b\u020d\u020d\u020f\u020f\u0211\u0211\u0213"+ + "\u0213\u0215\u0215\u0217\u0217\u0219\u0219\u021b\u021b\u021d\u021d\u021f"+ + "\u021f\u0221\u0221\u0223\u0223\u0225\u0225\u0227\u0227\u0229\u0229\u022b"+ + "\u022b\u022d\u022d\u022f\u022f\u0231\u0231\u0233\u0233\u0235\u023b\u023e"+ + "\u023e\u0241\u0242\u0244\u0244\u0249\u0249\u024b\u024b\u024d\u024d\u024f"+ + "\u024f\u0251\u0295\u0297\u02b1\u0373\u0373\u0375\u0375\u0379\u0379\u037d"+ + "\u037f\u0392\u0392\u03ae\u03d0\u03d2\u03d3\u03d7\u03d9\u03db\u03db\u03dd"+ + "\u03dd\u03df\u03df\u03e1\u03e1\u03e3\u03e3\u03e5\u03e5\u03e7\u03e7\u03e9"+ + "\u03e9\u03eb\u03eb\u03ed\u03ed\u03ef\u03ef\u03f1\u03f5\u03f7\u03f7\u03fa"+ + "\u03fa\u03fd\u03fe\u0432\u0461\u0463\u0463\u0465\u0465\u0467\u0467\u0469"+ + "\u0469\u046b\u046b\u046d\u046d\u046f\u046f\u0471\u0471\u0473\u0473\u0475"+ + "\u0475\u0477\u0477\u0479\u0479\u047b\u047b\u047d\u047d\u047f\u047f\u0481"+ + "\u0481\u0483\u0483\u048d\u048d\u048f\u048f\u0491\u0491\u0493\u0493\u0495"+ + "\u0495\u0497\u0497\u0499\u0499\u049b\u049b\u049d\u049d\u049f\u049f\u04a1"+ + "\u04a1\u04a3\u04a3\u04a5\u04a5\u04a7\u04a7\u04a9\u04a9\u04ab\u04ab\u04ad"+ + "\u04ad\u04af\u04af\u04b1\u04b1\u04b3\u04b3\u04b5\u04b5\u04b7\u04b7\u04b9"+ + "\u04b9\u04bb\u04bb\u04bd\u04bd\u04bf\u04bf\u04c1\u04c1\u04c4\u04c4\u04c6"+ + "\u04c6\u04c8\u04c8\u04ca\u04ca\u04cc\u04cc\u04ce\u04ce\u04d0\u04d1\u04d3"+ + "\u04d3\u04d5\u04d5\u04d7\u04d7\u04d9\u04d9\u04db\u04db\u04dd\u04dd\u04df"+ + "\u04df\u04e1\u04e1\u04e3\u04e3\u04e5\u04e5\u04e7\u04e7\u04e9\u04e9\u04eb"+ + "\u04eb\u04ed\u04ed\u04ef\u04ef\u04f1\u04f1\u04f3\u04f3\u04f5\u04f5\u04f7"+ + "\u04f7\u04f9\u04f9\u04fb\u04fb\u04fd\u04fd\u04ff\u04ff\u0501\u0501\u0503"+ + "\u0503\u0505\u0505\u0507\u0507\u0509\u0509\u050b\u050b\u050d\u050d\u050f"+ + "\u050f\u0511\u0511\u0513\u0513\u0515\u0515\u0517\u0517\u0519\u0519\u051b"+ + "\u051b\u051d\u051d\u051f\u051f\u0521\u0521\u0523\u0523\u0525\u0525\u0527"+ + "\u0527\u0529\u0529\u0563\u0589\u1d02\u1d2d\u1d6d\u1d79\u1d7b\u1d9c\u1e03"+ + "\u1e03\u1e05\u1e05\u1e07\u1e07\u1e09\u1e09\u1e0b\u1e0b\u1e0d\u1e0d\u1e0f"+ + "\u1e0f\u1e11\u1e11\u1e13\u1e13\u1e15\u1e15\u1e17\u1e17\u1e19\u1e19\u1e1b"+ + "\u1e1b\u1e1d\u1e1d\u1e1f\u1e1f\u1e21\u1e21\u1e23\u1e23\u1e25\u1e25\u1e27"+ + "\u1e27\u1e29\u1e29\u1e2b\u1e2b\u1e2d\u1e2d\u1e2f\u1e2f\u1e31\u1e31\u1e33"+ + "\u1e33\u1e35\u1e35\u1e37\u1e37\u1e39\u1e39\u1e3b\u1e3b\u1e3d\u1e3d\u1e3f"+ + "\u1e3f\u1e41\u1e41\u1e43\u1e43\u1e45\u1e45\u1e47\u1e47\u1e49\u1e49\u1e4b"+ + "\u1e4b\u1e4d\u1e4d\u1e4f\u1e4f\u1e51\u1e51\u1e53\u1e53\u1e55\u1e55\u1e57"+ + "\u1e57\u1e59\u1e59\u1e5b\u1e5b\u1e5d\u1e5d\u1e5f\u1e5f\u1e61\u1e61\u1e63"+ + "\u1e63\u1e65\u1e65\u1e67\u1e67\u1e69\u1e69\u1e6b\u1e6b\u1e6d\u1e6d\u1e6f"+ + "\u1e6f\u1e71\u1e71\u1e73\u1e73\u1e75\u1e75\u1e77\u1e77\u1e79\u1e79\u1e7b"+ + "\u1e7b\u1e7d\u1e7d\u1e7f\u1e7f\u1e81\u1e81\u1e83\u1e83\u1e85\u1e85\u1e87"+ + "\u1e87\u1e89\u1e89\u1e8b\u1e8b\u1e8d\u1e8d\u1e8f\u1e8f\u1e91\u1e91\u1e93"+ + "\u1e93\u1e95\u1e95\u1e97\u1e9f\u1ea1\u1ea1\u1ea3\u1ea3\u1ea5\u1ea5\u1ea7"+ + "\u1ea7\u1ea9\u1ea9\u1eab\u1eab\u1ead\u1ead\u1eaf\u1eaf\u1eb1\u1eb1\u1eb3"+ + "\u1eb3\u1eb5\u1eb5\u1eb7\u1eb7\u1eb9\u1eb9\u1ebb\u1ebb\u1ebd\u1ebd\u1ebf"+ + "\u1ebf\u1ec1\u1ec1\u1ec3\u1ec3\u1ec5\u1ec5\u1ec7\u1ec7\u1ec9\u1ec9\u1ecb"+ + "\u1ecb\u1ecd\u1ecd\u1ecf\u1ecf\u1ed1\u1ed1\u1ed3\u1ed3\u1ed5\u1ed5\u1ed7"+ + "\u1ed7\u1ed9\u1ed9\u1edb\u1edb\u1edd\u1edd\u1edf\u1edf\u1ee1\u1ee1\u1ee3"+ + "\u1ee3\u1ee5\u1ee5\u1ee7\u1ee7\u1ee9\u1ee9\u1eeb\u1eeb\u1eed\u1eed\u1eef"+ + "\u1eef\u1ef1\u1ef1\u1ef3\u1ef3\u1ef5\u1ef5\u1ef7\u1ef7\u1ef9\u1ef9\u1efb"+ + "\u1efb\u1efd\u1efd\u1eff\u1eff\u1f01\u1f09\u1f12\u1f17\u1f22\u1f29\u1f32"+ + "\u1f39\u1f42\u1f47\u1f52\u1f59\u1f62\u1f69\u1f72\u1f7f\u1f82\u1f89\u1f92"+ + "\u1f99\u1fa2\u1fa9\u1fb2\u1fb6\u1fb8\u1fb9\u1fc0\u1fc0\u1fc4\u1fc6\u1fc8"+ + "\u1fc9\u1fd2\u1fd5\u1fd8\u1fd9\u1fe2\u1fe9\u1ff4\u1ff6\u1ff8\u1ff9\u210c"+ + "\u210c\u2110\u2111\u2115\u2115\u2131\u2131\u2136\u2136\u213b\u213b\u213e"+ + "\u213f\u2148\u214b\u2150\u2150\u2186\u2186\u2c32\u2c60\u2c63\u2c63\u2c67"+ + "\u2c68\u2c6a\u2c6a\u2c6c\u2c6c\u2c6e\u2c6e\u2c73\u2c73\u2c75\u2c76\u2c78"+ + "\u2c7d\u2c83\u2c83\u2c85\u2c85\u2c87\u2c87\u2c89\u2c89\u2c8b\u2c8b\u2c8d"+ + "\u2c8d\u2c8f\u2c8f\u2c91\u2c91\u2c93\u2c93\u2c95\u2c95\u2c97\u2c97\u2c99"+ + "\u2c99\u2c9b\u2c9b\u2c9d\u2c9d\u2c9f\u2c9f\u2ca1\u2ca1\u2ca3\u2ca3\u2ca5"+ + "\u2ca5\u2ca7\u2ca7\u2ca9\u2ca9\u2cab\u2cab\u2cad\u2cad\u2caf\u2caf\u2cb1"+ + "\u2cb1\u2cb3\u2cb3\u2cb5\u2cb5\u2cb7\u2cb7\u2cb9\u2cb9\u2cbb\u2cbb\u2cbd"+ + "\u2cbd\u2cbf\u2cbf\u2cc1\u2cc1\u2cc3\u2cc3\u2cc5\u2cc5\u2cc7\u2cc7\u2cc9"+ + "\u2cc9\u2ccb\u2ccb\u2ccd\u2ccd\u2ccf\u2ccf\u2cd1\u2cd1\u2cd3\u2cd3\u2cd5"+ + "\u2cd5\u2cd7\u2cd7\u2cd9\u2cd9\u2cdb\u2cdb\u2cdd\u2cdd\u2cdf\u2cdf\u2ce1"+ + "\u2ce1\u2ce3\u2ce3\u2ce5\u2ce6\u2cee\u2cee\u2cf0\u2cf0\u2cf5\u2cf5\u2d02"+ + "\u2d27\u2d29\u2d29\u2d2f\u2d2f\ua643\ua643\ua645\ua645\ua647\ua647\ua649"+ + "\ua649\ua64b\ua64b\ua64d\ua64d\ua64f\ua64f\ua651\ua651\ua653\ua653\ua655"+ + "\ua655\ua657\ua657\ua659\ua659\ua65b\ua65b\ua65d\ua65d\ua65f\ua65f\ua661"+ + "\ua661\ua663\ua663\ua665\ua665\ua667\ua667\ua669\ua669\ua66b\ua66b\ua66d"+ + "\ua66d\ua66f\ua66f\ua683\ua683\ua685\ua685\ua687\ua687\ua689\ua689\ua68b"+ + "\ua68b\ua68d\ua68d\ua68f\ua68f\ua691\ua691\ua693\ua693\ua695\ua695\ua697"+ + "\ua697\ua699\ua699\ua725\ua725\ua727\ua727\ua729\ua729\ua72b\ua72b\ua72d"+ + "\ua72d\ua72f\ua72f\ua731\ua733\ua735\ua735\ua737\ua737\ua739\ua739\ua73b"+ + "\ua73b\ua73d\ua73d\ua73f\ua73f\ua741\ua741\ua743\ua743\ua745\ua745\ua747"+ + "\ua747\ua749\ua749\ua74b\ua74b\ua74d\ua74d\ua74f\ua74f\ua751\ua751\ua753"+ + "\ua753\ua755\ua755\ua757\ua757\ua759\ua759\ua75b\ua75b\ua75d\ua75d\ua75f"+ + "\ua75f\ua761\ua761\ua763\ua763\ua765\ua765\ua767\ua767\ua769\ua769\ua76b"+ + "\ua76b\ua76d\ua76d\ua76f\ua76f\ua771\ua771\ua773\ua77a\ua77c\ua77c\ua77e"+ + "\ua77e\ua781\ua781\ua783\ua783\ua785\ua785\ua787\ua787\ua789\ua789\ua78e"+ + "\ua78e\ua790\ua790\ua793\ua793\ua795\ua795\ua7a3\ua7a3\ua7a5\ua7a5\ua7a7"+ + "\ua7a7\ua7a9\ua7a9\ua7ab\ua7ab\ua7fc\ua7fc\ufb02\ufb08\ufb15\ufb19\uff43"+ + "\uff5c\65\2\u02b2\u02c3\u02c8\u02d3\u02e2\u02e6\u02ee\u02ee\u02f0\u02f0"+ + "\u0376\u0376\u037c\u037c\u055b\u055b\u0642\u0642\u06e7\u06e8\u07f6\u07f7"+ + "\u07fc\u07fc\u081c\u081c\u0826\u0826\u082a\u082a\u0973\u0973\u0e48\u0e48"+ + "\u0ec8\u0ec8\u10fe\u10fe\u17d9\u17d9\u1845\u1845\u1aa9\u1aa9\u1c7a\u1c7f"+ + "\u1d2e\u1d6c\u1d7a\u1d7a\u1d9d\u1dc1\u2073\u2073\u2081\u2081\u2092\u209e"+ + "\u2c7e\u2c7f\u2d71\u2d71\u2e31\u2e31\u3007\u3007\u3033\u3037\u303d\u303d"+ + "\u309f\u30a0\u30fe\u3100\ua017\ua017\ua4fa\ua4ff\ua60e\ua60e\ua681\ua681"+ + "\ua719\ua721\ua772\ua772\ua78a\ua78a\ua7fa\ua7fb\ua9d1\ua9d1\uaa72\uaa72"+ + "\uaadf\uaadf\uaaf5\uaaf6\uff72\uff72\uffa0\uffa1\u0123\2\u00ac\u00ac\u00bc"+ + "\u00bc\u01bd\u01bd\u01c2\u01c5\u0296\u0296\u05d2\u05ec\u05f2\u05f4\u0622"+ + "\u0641\u0643\u064c\u0670\u0671\u0673\u06d5\u06d7\u06d7\u06f0\u06f1\u06fc"+ + "\u06fe\u0701\u0701\u0712\u0712\u0714\u0731\u074f\u07a7\u07b3\u07b3\u07cc"+ + "\u07ec\u0802\u0817\u0842\u085a\u08a2\u08a2\u08a4\u08ae\u0906\u093b\u093f"+ + "\u093f\u0952\u0952\u095a\u0963\u0974\u0979\u097b\u0981\u0987\u098e\u0991"+ + "\u0992\u0995\u09aa\u09ac\u09b2\u09b4\u09b4\u09b8\u09bb\u09bf\u09bf\u09d0"+ + "\u09d0\u09de\u09df\u09e1\u09e3\u09f2\u09f3\u0a07\u0a0c\u0a11\u0a12\u0a15"+ + "\u0a2a\u0a2c\u0a32\u0a34\u0a35\u0a37\u0a38\u0a3a\u0a3b\u0a5b\u0a5e\u0a60"+ + "\u0a60\u0a74\u0a76\u0a87\u0a8f\u0a91\u0a93\u0a95\u0aaa\u0aac\u0ab2\u0ab4"+ + "\u0ab5\u0ab7\u0abb\u0abf\u0abf\u0ad2\u0ad2\u0ae2\u0ae3\u0b07\u0b0e\u0b11"+ + "\u0b12\u0b15\u0b2a\u0b2c\u0b32\u0b34\u0b35\u0b37\u0b3b\u0b3f\u0b3f\u0b5e"+ + "\u0b5f\u0b61\u0b63\u0b73\u0b73\u0b85\u0b85\u0b87\u0b8c\u0b90\u0b92\u0b94"+ + "\u0b97\u0b9b\u0b9c\u0b9e\u0b9e\u0ba0\u0ba1\u0ba5\u0ba6\u0baa\u0bac\u0bb0"+ + "\u0bbb\u0bd2\u0bd2\u0c07\u0c0e\u0c10\u0c12\u0c14\u0c2a\u0c2c\u0c35\u0c37"+ + "\u0c3b\u0c3f\u0c3f\u0c5a\u0c5b\u0c62\u0c63\u0c87\u0c8e\u0c90\u0c92\u0c94"+ + "\u0caa\u0cac\u0cb5\u0cb7\u0cbb\u0cbf\u0cbf\u0ce0\u0ce0\u0ce2\u0ce3\u0cf3"+ + "\u0cf4\u0d07\u0d0e\u0d10\u0d12\u0d14\u0d3c\u0d3f\u0d3f\u0d50\u0d50\u0d62"+ + "\u0d63\u0d7c\u0d81\u0d87\u0d98\u0d9c\u0db3\u0db5\u0dbd\u0dbf\u0dbf\u0dc2"+ + "\u0dc8\u0e03\u0e32\u0e34\u0e35\u0e42\u0e47\u0e83\u0e84\u0e86\u0e86\u0e89"+ + "\u0e8a\u0e8c\u0e8c\u0e8f\u0e8f\u0e96\u0e99\u0e9b\u0ea1\u0ea3\u0ea5\u0ea7"+ + "\u0ea7\u0ea9\u0ea9\u0eac\u0ead\u0eaf\u0eb2\u0eb4\u0eb5\u0ebf\u0ebf\u0ec2"+ + "\u0ec6\u0ede\u0ee1\u0f02\u0f02\u0f42\u0f49\u0f4b\u0f6e\u0f8a\u0f8e\u1002"+ + "\u102c\u1041\u1041\u1052\u1057\u105c\u105f\u1063\u1063\u1067\u1068\u1070"+ + "\u1072\u1077\u1083\u1090\u1090\u10d2\u10fc\u10ff\u124a\u124c\u124f\u1252"+ + "\u1258\u125a\u125a\u125c\u125f\u1262\u128a\u128c\u128f\u1292\u12b2\u12b4"+ + "\u12b7\u12ba\u12c0\u12c2\u12c2\u12c4\u12c7\u12ca\u12d8\u12da\u1312\u1314"+ + "\u1317\u131a\u135c\u1382\u1391\u13a2\u13f6\u1403\u166e\u1671\u1681\u1683"+ + "\u169c\u16a2\u16ec\u1702\u170e\u1710\u1713\u1722\u1733\u1742\u1753\u1762"+ + "\u176e\u1770\u1772\u1782\u17b5\u17de\u17de\u1822\u1844\u1846\u1879\u1882"+ + "\u18aa\u18ac\u18ac\u18b2\u18f7\u1902\u191e\u1952\u196f\u1972\u1976\u1982"+ + "\u19ad\u19c3\u19c9\u1a02\u1a18\u1a22\u1a56\u1b07\u1b35\u1b47\u1b4d\u1b85"+ + "\u1ba2\u1bb0\u1bb1\u1bbc\u1be7\u1c02\u1c25\u1c4f\u1c51\u1c5c\u1c79\u1ceb"+ + "\u1cee\u1cf0\u1cf3\u1cf7\u1cf8\u2137\u213a\u2d32\u2d69\u2d82\u2d98\u2da2"+ + "\u2da8\u2daa\u2db0\u2db2\u2db8\u2dba\u2dc0\u2dc2\u2dc8\u2dca\u2dd0\u2dd2"+ + "\u2dd8\u2dda\u2de0\u3008\u3008\u303e\u303e\u3043\u3098\u30a1\u30a1\u30a3"+ + "\u30fc\u3101\u3101\u3107\u312f\u3133\u3190\u31a2\u31bc\u31f2\u3201\u3402"+ + "\u3402\u4db7\u4db7\u4e02\u4e02\u9fce\u9fce\ua002\ua016\ua018\ua48e\ua4d2"+ + "\ua4f9\ua502\ua60d\ua612\ua621\ua62c\ua62d\ua670\ua670\ua6a2\ua6e7\ua7fd"+ + "\ua803\ua805\ua807\ua809\ua80c\ua80e\ua824\ua842\ua875\ua884\ua8b5\ua8f4"+ + "\ua8f9\ua8fd\ua8fd\ua90c\ua927\ua932\ua948\ua962\ua97e\ua986\ua9b4\uaa02"+ + "\uaa2a\uaa42\uaa44\uaa46\uaa4d\uaa62\uaa71\uaa73\uaa78\uaa7c\uaa7c\uaa82"+ + "\uaab1\uaab3\uaab3\uaab7\uaab8\uaabb\uaabf\uaac2\uaac2\uaac4\uaac4\uaadd"+ + "\uaade\uaae2\uaaec\uaaf4\uaaf4\uab03\uab08\uab0b\uab10\uab13\uab18\uab22"+ + "\uab28\uab2a\uab30\uabc2\uabe4\uac02\uac02\ud7a5\ud7a5\ud7b2\ud7c8\ud7cd"+ + "\ud7fd\uf902\ufa6f\ufa72\ufadb\ufb1f\ufb1f\ufb21\ufb2a\ufb2c\ufb38\ufb3a"+ + "\ufb3e\ufb40\ufb40\ufb42\ufb43\ufb45\ufb46\ufb48\ufbb3\ufbd5\ufd3f\ufd52"+ + "\ufd91\ufd94\ufdc9\ufdf2\ufdfd\ufe72\ufe76\ufe78\ufefe\uff68\uff71\uff73"+ + "\uff9f\uffa2\uffc0\uffc4\uffc9\uffcc\uffd1\uffd4\uffd9\uffdc\uffde\f\2"+ + "\u01c7\u01c7\u01ca\u01ca\u01cd\u01cd\u01f4\u01f4\u1f8a\u1f91\u1f9a\u1fa1"+ + "\u1faa\u1fb1\u1fbe\u1fbe\u1fce\u1fce\u1ffe\u1ffe\u0242\2C\\\u00c2\u00d8"+ + "\u00da\u00e0\u0102\u0102\u0104\u0104\u0106\u0106\u0108\u0108\u010a\u010a"+ + "\u010c\u010c\u010e\u010e\u0110\u0110\u0112\u0112\u0114\u0114\u0116\u0116"+ + "\u0118\u0118\u011a\u011a\u011c\u011c\u011e\u011e\u0120\u0120\u0122\u0122"+ + "\u0124\u0124\u0126\u0126\u0128\u0128\u012a\u012a\u012c\u012c\u012e\u012e"+ + "\u0130\u0130\u0132\u0132\u0134\u0134\u0136\u0136\u0138\u0138\u013b\u013b"+ + "\u013d\u013d\u013f\u013f\u0141\u0141\u0143\u0143\u0145\u0145\u0147\u0147"+ + "\u0149\u0149\u014c\u014c\u014e\u014e\u0150\u0150\u0152\u0152\u0154\u0154"+ + "\u0156\u0156\u0158\u0158\u015a\u015a\u015c\u015c\u015e\u015e\u0160\u0160"+ + "\u0162\u0162\u0164\u0164\u0166\u0166\u0168\u0168\u016a\u016a\u016c\u016c"+ + "\u016e\u016e\u0170\u0170\u0172\u0172\u0174\u0174\u0176\u0176\u0178\u0178"+ + "\u017a\u017b\u017d\u017d\u017f\u017f\u0183\u0184\u0186\u0186\u0188\u0189"+ + "\u018b\u018d\u0190\u0193\u0195\u0196\u0198\u019a\u019e\u019f\u01a1\u01a2"+ + "\u01a4\u01a4\u01a6\u01a6\u01a8\u01a9\u01ab\u01ab\u01ae\u01ae\u01b0\u01b1"+ + "\u01b3\u01b5\u01b7\u01b7\u01b9\u01ba\u01be\u01be\u01c6\u01c6\u01c9\u01c9"+ + "\u01cc\u01cc\u01cf\u01cf\u01d1\u01d1\u01d3\u01d3\u01d5\u01d5\u01d7\u01d7"+ + "\u01d9\u01d9\u01db\u01db\u01dd\u01dd\u01e0\u01e0\u01e2\u01e2\u01e4\u01e4"+ + "\u01e6\u01e6\u01e8\u01e8\u01ea\u01ea\u01ec\u01ec\u01ee\u01ee\u01f0\u01f0"+ + "\u01f3\u01f3\u01f6\u01f6\u01f8\u01fa\u01fc\u01fc\u01fe\u01fe\u0200\u0200"+ + "\u0202\u0202\u0204\u0204\u0206\u0206\u0208\u0208\u020a\u020a\u020c\u020c"+ + "\u020e\u020e\u0210\u0210\u0212\u0212\u0214\u0214\u0216\u0216\u0218\u0218"+ + "\u021a\u021a\u021c\u021c\u021e\u021e\u0220\u0220\u0222\u0222\u0224\u0224"+ + "\u0226\u0226\u0228\u0228\u022a\u022a\u022c\u022c\u022e\u022e\u0230\u0230"+ + "\u0232\u0232\u0234\u0234\u023c\u023d\u023f\u0240\u0243\u0243\u0245\u0248"+ + "\u024a\u024a\u024c\u024c\u024e\u024e\u0250\u0250\u0372\u0372\u0374\u0374"+ + "\u0378\u0378\u0388\u0388\u038a\u038c\u038e\u038e\u0390\u0391\u0393\u03a3"+ + "\u03a5\u03ad\u03d1\u03d1\u03d4\u03d6\u03da\u03da\u03dc\u03dc\u03de\u03de"+ + "\u03e0\u03e0\u03e2\u03e2\u03e4\u03e4\u03e6\u03e6\u03e8\u03e8\u03ea\u03ea"+ + "\u03ec\u03ec\u03ee\u03ee\u03f0\u03f0\u03f6\u03f6\u03f9\u03f9\u03fb\u03fc"+ + "\u03ff\u0431\u0462\u0462\u0464\u0464\u0466\u0466\u0468\u0468\u046a\u046a"+ + "\u046c\u046c\u046e\u046e\u0470\u0470\u0472\u0472\u0474\u0474\u0476\u0476"+ + "\u0478\u0478\u047a\u047a\u047c\u047c\u047e\u047e\u0480\u0480\u0482\u0482"+ + "\u048c\u048c\u048e\u048e\u0490\u0490\u0492\u0492\u0494\u0494\u0496\u0496"+ + "\u0498\u0498\u049a\u049a\u049c\u049c\u049e\u049e\u04a0\u04a0\u04a2\u04a2"+ + "\u04a4\u04a4\u04a6\u04a6\u04a8\u04a8\u04aa\u04aa\u04ac\u04ac\u04ae\u04ae"+ + "\u04b0\u04b0\u04b2\u04b2\u04b4\u04b4\u04b6\u04b6\u04b8\u04b8\u04ba\u04ba"+ + "\u04bc\u04bc\u04be\u04be\u04c0\u04c0\u04c2\u04c3\u04c5\u04c5\u04c7\u04c7"+ + "\u04c9\u04c9\u04cb\u04cb\u04cd\u04cd\u04cf\u04cf\u04d2\u04d2\u04d4\u04d4"+ + "\u04d6\u04d6\u04d8\u04d8\u04da\u04da\u04dc\u04dc\u04de\u04de\u04e0\u04e0"+ + "\u04e2\u04e2\u04e4\u04e4\u04e6\u04e6\u04e8\u04e8\u04ea\u04ea\u04ec\u04ec"+ + "\u04ee\u04ee\u04f0\u04f0\u04f2\u04f2\u04f4\u04f4\u04f6\u04f6\u04f8\u04f8"+ + "\u04fa\u04fa\u04fc\u04fc\u04fe\u04fe\u0500\u0500\u0502\u0502\u0504\u0504"+ + "\u0506\u0506\u0508\u0508\u050a\u050a\u050c\u050c\u050e\u050e\u0510\u0510"+ + "\u0512\u0512\u0514\u0514\u0516\u0516\u0518\u0518\u051a\u051a\u051c\u051c"+ + "\u051e\u051e\u0520\u0520\u0522\u0522\u0524\u0524\u0526\u0526\u0528\u0528"+ + "\u0533\u0558\u10a2\u10c7\u10c9\u10c9\u10cf\u10cf\u1e02\u1e02\u1e04\u1e04"+ + "\u1e06\u1e06\u1e08\u1e08\u1e0a\u1e0a\u1e0c\u1e0c\u1e0e\u1e0e\u1e10\u1e10"+ + "\u1e12\u1e12\u1e14\u1e14\u1e16\u1e16\u1e18\u1e18\u1e1a\u1e1a\u1e1c\u1e1c"+ + "\u1e1e\u1e1e\u1e20\u1e20\u1e22\u1e22\u1e24\u1e24\u1e26\u1e26\u1e28\u1e28"+ + "\u1e2a\u1e2a\u1e2c\u1e2c\u1e2e\u1e2e\u1e30\u1e30\u1e32\u1e32\u1e34\u1e34"+ + "\u1e36\u1e36\u1e38\u1e38\u1e3a\u1e3a\u1e3c\u1e3c\u1e3e\u1e3e\u1e40\u1e40"+ + "\u1e42\u1e42\u1e44\u1e44\u1e46\u1e46\u1e48\u1e48\u1e4a\u1e4a\u1e4c\u1e4c"+ + "\u1e4e\u1e4e\u1e50\u1e50\u1e52\u1e52\u1e54\u1e54\u1e56\u1e56\u1e58\u1e58"+ + "\u1e5a\u1e5a\u1e5c\u1e5c\u1e5e\u1e5e\u1e60\u1e60\u1e62\u1e62\u1e64\u1e64"+ + "\u1e66\u1e66\u1e68\u1e68\u1e6a\u1e6a\u1e6c\u1e6c\u1e6e\u1e6e\u1e70\u1e70"+ + "\u1e72\u1e72\u1e74\u1e74\u1e76\u1e76\u1e78\u1e78\u1e7a\u1e7a\u1e7c\u1e7c"+ + "\u1e7e\u1e7e\u1e80\u1e80\u1e82\u1e82\u1e84\u1e84\u1e86\u1e86\u1e88\u1e88"+ + "\u1e8a\u1e8a\u1e8c\u1e8c\u1e8e\u1e8e\u1e90\u1e90\u1e92\u1e92\u1e94\u1e94"+ + "\u1e96\u1e96\u1ea0\u1ea0\u1ea2\u1ea2\u1ea4\u1ea4\u1ea6\u1ea6\u1ea8\u1ea8"+ + "\u1eaa\u1eaa\u1eac\u1eac\u1eae\u1eae\u1eb0\u1eb0\u1eb2\u1eb2\u1eb4\u1eb4"+ + "\u1eb6\u1eb6\u1eb8\u1eb8\u1eba\u1eba\u1ebc\u1ebc\u1ebe\u1ebe\u1ec0\u1ec0"+ + "\u1ec2\u1ec2\u1ec4\u1ec4\u1ec6\u1ec6\u1ec8\u1ec8\u1eca\u1eca\u1ecc\u1ecc"+ + "\u1ece\u1ece\u1ed0\u1ed0\u1ed2\u1ed2\u1ed4\u1ed4\u1ed6\u1ed6\u1ed8\u1ed8"+ + "\u1eda\u1eda\u1edc\u1edc\u1ede\u1ede\u1ee0\u1ee0\u1ee2\u1ee2\u1ee4\u1ee4"+ + "\u1ee6\u1ee6\u1ee8\u1ee8\u1eea\u1eea\u1eec\u1eec\u1eee\u1eee\u1ef0\u1ef0"+ + "\u1ef2\u1ef2\u1ef4\u1ef4\u1ef6\u1ef6\u1ef8\u1ef8\u1efa\u1efa\u1efc\u1efc"+ + "\u1efe\u1efe\u1f00\u1f00\u1f0a\u1f11\u1f1a\u1f1f\u1f2a\u1f31\u1f3a\u1f41"+ + "\u1f4a\u1f4f\u1f5b\u1f5b\u1f5d\u1f5d\u1f5f\u1f5f\u1f61\u1f61\u1f6a\u1f71"+ + "\u1fba\u1fbd\u1fca\u1fcd\u1fda\u1fdd\u1fea\u1fee\u1ffa\u1ffd\u2104\u2104"+ + "\u2109\u2109\u210d\u210f\u2112\u2114\u2117\u2117\u211b\u211f\u2126\u2126"+ + "\u2128\u2128\u212a\u212a\u212c\u212f\u2132\u2135\u2140\u2141\u2147\u2147"+ + "\u2185\u2185\u2c02\u2c30\u2c62\u2c62\u2c64\u2c66\u2c69\u2c69\u2c6b\u2c6b"+ + "\u2c6d\u2c6d\u2c6f\u2c72\u2c74\u2c74\u2c77\u2c77\u2c80\u2c82\u2c84\u2c84"+ + "\u2c86\u2c86\u2c88\u2c88\u2c8a\u2c8a\u2c8c\u2c8c\u2c8e\u2c8e\u2c90\u2c90"+ + "\u2c92\u2c92\u2c94\u2c94\u2c96\u2c96\u2c98\u2c98\u2c9a\u2c9a\u2c9c\u2c9c"+ + "\u2c9e\u2c9e\u2ca0\u2ca0\u2ca2\u2ca2\u2ca4\u2ca4\u2ca6\u2ca6\u2ca8\u2ca8"+ + "\u2caa\u2caa\u2cac\u2cac\u2cae\u2cae\u2cb0\u2cb0\u2cb2\u2cb2\u2cb4\u2cb4"+ + "\u2cb6\u2cb6\u2cb8\u2cb8\u2cba\u2cba\u2cbc\u2cbc\u2cbe\u2cbe\u2cc0\u2cc0"+ + "\u2cc2\u2cc2\u2cc4\u2cc4\u2cc6\u2cc6\u2cc8\u2cc8\u2cca\u2cca\u2ccc\u2ccc"+ + "\u2cce\u2cce\u2cd0\u2cd0\u2cd2\u2cd2\u2cd4\u2cd4\u2cd6\u2cd6\u2cd8\u2cd8"+ + "\u2cda\u2cda\u2cdc\u2cdc\u2cde\u2cde\u2ce0\u2ce0\u2ce2\u2ce2\u2ce4\u2ce4"+ + "\u2ced\u2ced\u2cef\u2cef\u2cf4\u2cf4\ua642\ua642\ua644\ua644\ua646\ua646"+ + "\ua648\ua648\ua64a\ua64a\ua64c\ua64c\ua64e\ua64e\ua650\ua650\ua652\ua652"+ + "\ua654\ua654\ua656\ua656\ua658\ua658\ua65a\ua65a\ua65c\ua65c\ua65e\ua65e"+ + "\ua660\ua660\ua662\ua662\ua664\ua664\ua666\ua666\ua668\ua668\ua66a\ua66a"+ + "\ua66c\ua66c\ua66e\ua66e\ua682\ua682\ua684\ua684\ua686\ua686\ua688\ua688"+ + "\ua68a\ua68a\ua68c\ua68c\ua68e\ua68e\ua690\ua690\ua692\ua692\ua694\ua694"+ + "\ua696\ua696\ua698\ua698\ua724\ua724\ua726\ua726\ua728\ua728\ua72a\ua72a"+ + "\ua72c\ua72c\ua72e\ua72e\ua730\ua730\ua734\ua734\ua736\ua736\ua738\ua738"+ + "\ua73a\ua73a\ua73c\ua73c\ua73e\ua73e\ua740\ua740\ua742\ua742\ua744\ua744"+ + "\ua746\ua746\ua748\ua748\ua74a\ua74a\ua74c\ua74c\ua74e\ua74e\ua750\ua750"+ + "\ua752\ua752\ua754\ua754\ua756\ua756\ua758\ua758\ua75a\ua75a\ua75c\ua75c"+ + "\ua75e\ua75e\ua760\ua760\ua762\ua762\ua764\ua764\ua766\ua766\ua768\ua768"+ + "\ua76a\ua76a\ua76c\ua76c\ua76e\ua76e\ua770\ua770\ua77b\ua77b\ua77d\ua77d"+ + "\ua77f\ua780\ua782\ua782\ua784\ua784\ua786\ua786\ua788\ua788\ua78d\ua78d"+ + "\ua78f\ua78f\ua792\ua792\ua794\ua794\ua7a2\ua7a2\ua7a4\ua7a4\ua7a6\ua7a6"+ + "\ua7a8\ua7a8\ua7aa\ua7aa\ua7ac\ua7ac\uff23\uff3c%\2\62;\u0662\u066b\u06f2"+ + "\u06fb\u07c2\u07cb\u0968\u0971\u09e8\u09f1\u0a68\u0a71\u0ae8\u0af1\u0b68"+ + "\u0b71\u0be8\u0bf1\u0c68\u0c71\u0ce8\u0cf1\u0d68\u0d71\u0e52\u0e5b\u0ed2"+ + "\u0edb\u0f22\u0f2b\u1042\u104b\u1092\u109b\u17e2\u17eb\u1812\u181b\u1948"+ + "\u1951\u19d2\u19db\u1a82\u1a8b\u1a92\u1a9b\u1b52\u1b5b\u1bb2\u1bbb\u1c42"+ + "\u1c4b\u1c52\u1c5b\ua622\ua62b\ua8d2\ua8db\ua902\ua90b\ua9d2\ua9db\uaa52"+ + "\uaa5b\uabf2\uabfb\uff12\uff1b\t\2\u16f0\u16f2\u2162\u2184\u2187\u218a"+ + "\u3009\u3009\u3023\u302b\u303a\u303c\ua6e8\ua6f1\36\2\3\3\2\2\2\2\5\3"+ + "\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\3"+ + "\21\3\2\2\2\5\23\3\2\2\2\7\25\3\2\2\2\t\27\3\2\2\2\13\31\3\2\2\2\r\33"+ + "\3\2\2\2\17\35\3\2\2\2\21\22\t\2\2\2\22\4\3\2\2\2\23\24\t\3\2\2\24\6\3"+ + "\2\2\2\25\26\t\4\2\2\26\b\3\2\2\2\27\30\t\5\2\2\30\n\3\2\2\2\31\32\t\6"+ + "\2\2\32\f\3\2\2\2\33\34\t\7\2\2\34\16\3\2\2\2\35\36\t\b\2\2\36\20\3\2"+ + "\2\2\3\2\2"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/src/main/java/grammar/UnicodeClasses.tokens b/src/main/java/grammar/UnicodeClasses.tokens new file mode 100644 index 00000000..bd91da7e --- /dev/null +++ b/src/main/java/grammar/UnicodeClasses.tokens @@ -0,0 +1,7 @@ +UNICODE_CLASS_LL=1 +UNICODE_CLASS_LM=2 +UNICODE_CLASS_LO=3 +UNICODE_CLASS_LT=4 +UNICODE_CLASS_LU=5 +UNICODE_CLASS_ND=6 +UNICODE_CLASS_NL=7 diff --git a/src/main/java/icons/Icons.java b/src/main/java/icons/Icons.java deleted file mode 100644 index 61490eac..00000000 --- a/src/main/java/icons/Icons.java +++ /dev/null @@ -1,25 +0,0 @@ -package icons; - -import com.intellij.openapi.util.IconLoader; -import com.intellij.util.ui.UIUtil; -import ee.carlrobert.codegpt.util.FileUtils; -import java.util.Objects; -import javax.swing.Icon; -import javax.swing.ImageIcon; - -public class Icons { - - public static final Icon DefaultIcon = IconLoader.getIcon("/icons/codegpt-icon.svg", Icons.class); - public static final Icon ToolWindowIcon = IconLoader.getIcon("/icons/toolwindow-icon.svg", Icons.class); - public static final ImageIcon DefaultImageIcon = getImageIcon("/icons/chatgpt-icon.png"); - public static final ImageIcon SendImageIcon = getImageIcon("/icons/send-icon.png"); - public static final ImageIcon SunImageIcon = getImageIcon("/icons/sun-icon.png"); - - public static String getHtmlSvgIcon(String iconName) { - return FileUtils.getResource(String.format(UIUtil.isUnderDarcula() ? "/html/icons/%s_dark.svg" : "/html/icons/%s.svg", iconName)); - } - - private static ImageIcon getImageIcon(String path) { - return new ImageIcon(Objects.requireNonNull(Icons.class.getResource(path))); - } -} diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index a8baaf72..b535c9bb 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -2,92 +2,34 @@ ee.carlrobert.chatgpt CodeGPT Carl-Robert Linnupuu - ChatGPT as your copilot to level up your developer experience.

      -

      - This is the perfect assistant for any programmer who wants to improve their coding skills - and make more efficient use of the time. -

      -

      Getting Started

      -

      Prerequisites

      -

      In order to use the extension, you need to have the API key configured. You can find the API key in your User Settings.

      -

      API Key Configuration

      -

      After the plugin has been successfully installed, the API key needs to be configured. -

      You can configure the key by going to the plugin's settings via the File | Settings/Preferences | Tools | CodeGPT. On the settings panel simply click - on the API key field, paste the key obtained from the OpenAI website and click Apply/OK.

      -

      Features

      -
        -
      • Ask ChatGPT - Ask anything
      • -
      • Concurrent conversations - Chat with the AI in multiple tabs simultaneously
      • -
      • Seamless conversations - Chat with the AI regardless of the maximum token limitations
      • -
      • Replace Selection - Instantly replace a selected code block in the editor with suggested code generated by ChatGPT
      • -
      • Conversation History - View recent conversation history and restore previous sessions, making it easy to pick up where you left off
      • -
      • Predefined Actions - Create your own code actions or override the existing ones, saving time rewriting the same prompt repeatedly
      • -
      • Custom Prompt - Create a custom prompt for your selected code. The previous prompt will be remembered for subsequent questions
      • -
      • Stop/Regenerate response - Stop the response generation or re-generate a new response from the existing query
      • -
      -

      Available Models:

      -
        -
      • - Chat Completion -
          -
        • GPT - 3.5 Turbo (Default)
        • -
        • GPT - 4.0 (Requires access which is behind the waitlist approval process)
        • -
        -
      • -
      • - Text Completion -
          -
        • - Davinci - Most powerful (Default) -
        • -
        • - Curie - Fast and efficient -
        • -
        • - Babbage - Powerful -
        • -
        • - Ada - Fastest -
        • -
        -
      • -
      - ]]>
      - - - -
    • Support custom server/model configuration, allowing easy integration with LocalAI and Langchain
    • -
    • Support API Key retrieval from environment variable
    • -
    - ]]> - - com.intellij.modules.platform + instance="ee.carlrobert.codegpt.settings.SettingsConfigurable"/> + instance="ee.carlrobert.codegpt.settings.configuration.ConfigurationConfigurable"/> - - - - - - + + + + + + - messages.BasicActionsBundle + messages.codegpt - + diff --git a/src/main/resources/fileExtensionLanguageMappings.json b/src/main/resources/fileExtensionLanguageMappings.json new file mode 100644 index 00000000..8f2683f6 --- /dev/null +++ b/src/main/resources/fileExtensionLanguageMappings.json @@ -0,0 +1,3606 @@ +[ + { + "extension": "1", + "value": "Groff" + }, + { + "extension": "2", + "value": "Groff" + }, + { + "extension": "3", + "value": "Groff" + }, + { + "extension": "4", + "value": "Groff" + }, + { + "extension": "5", + "value": "Groff" + }, + { + "extension": "6", + "value": "Groff" + }, + { + "extension": "7", + "value": "Groff" + }, + { + "extension": "8", + "value": "Groff" + }, + { + "extension": "9", + "value": "Groff" + }, + { + "extension": "abap", + "value": "ABAP" + }, + { + "extension": "asc", + "value": "Public Key" + }, + { + "extension": "ash", + "value": "AGS Script" + }, + { + "extension": "ampl", + "value": "AMPL" + }, + { + "extension": "mod", + "value": "XML" + }, + { + "extension": "g4", + "value": "ANTLR" + }, + { + "extension": "apib", + "value": "API Blueprint" + }, + { + "extension": "apl", + "value": "APL" + }, + { + "extension": "dyalog", + "value": "APL" + }, + { + "extension": "asp", + "value": "ASP" + }, + { + "extension": "asax", + "value": "ASP" + }, + { + "extension": "ascx", + "value": "ASP" + }, + { + "extension": "ashx", + "value": "ASP" + }, + { + "extension": "asmx", + "value": "ASP" + }, + { + "extension": "aspx", + "value": "ASP" + }, + { + "extension": "axd", + "value": "ASP" + }, + { + "extension": "dats", + "value": "ATS" + }, + { + "extension": "hats", + "value": "ATS" + }, + { + "extension": "sats", + "value": "ATS" + }, + { + "extension": "as", + "value": "ActionScript" + }, + { + "extension": "adb", + "value": "Ada" + }, + { + "extension": "ada", + "value": "Ada" + }, + { + "extension": "ads", + "value": "Ada" + }, + { + "extension": "agda", + "value": "Agda" + }, + { + "extension": "als", + "value": "Alloy" + }, + { + "extension": "apacheconf", + "value": "ApacheConf" + }, + { + "extension": "vhost", + "value": "Nginx" + }, + { + "extension": "cls", + "value": "Visual Basic" + }, + { + "extension": "applescript", + "value": "AppleScript" + }, + { + "extension": "scpt", + "value": "AppleScript" + }, + { + "extension": "arc", + "value": "Arc" + }, + { + "extension": "ino", + "value": "Arduino" + }, + { + "extension": "asciidoc", + "value": "AsciiDoc" + }, + { + "extension": "adoc", + "value": "AsciiDoc" + }, + { + "extension": "aj", + "value": "AspectJ" + }, + { + "extension": "asm", + "value": "Assembly" + }, + { + "extension": "a51", + "value": "Assembly" + }, + { + "extension": "inc", + "value": "SourcePawn" + }, + { + "extension": "nasm", + "value": "Assembly" + }, + { + "extension": "aug", + "value": "Augeas" + }, + { + "extension": "ahk", + "value": "AutoHotkey" + }, + { + "extension": "ahkl", + "value": "AutoHotkey" + }, + { + "extension": "au3", + "value": "AutoIt" + }, + { + "extension": "awk", + "value": "Awk" + }, + { + "extension": "auk", + "value": "Awk" + }, + { + "extension": "gawk", + "value": "Awk" + }, + { + "extension": "mawk", + "value": "Awk" + }, + { + "extension": "nawk", + "value": "Awk" + }, + { + "extension": "bat", + "value": "Batchfile" + }, + { + "extension": "cmd", + "value": "Batchfile" + }, + { + "extension": "befunge", + "value": "Befunge" + }, + { + "extension": "bison", + "value": "Bison" + }, + { + "extension": "bb", + "value": "BlitzBasic" + }, + { + "extension": "decls", + "value": "BlitzBasic" + }, + { + "extension": "bmx", + "value": "BlitzMax" + }, + { + "extension": "bsv", + "value": "Bluespec" + }, + { + "extension": "boo", + "value": "Boo" + }, + { + "extension": "b", + "value": "Limbo" + }, + { + "extension": "bf", + "value": "HyPhy" + }, + { + "extension": "brs", + "value": "Brightscript" + }, + { + "extension": "bro", + "value": "Bro" + }, + { + "extension": "c", + "value": "C" + }, + { + "extension": "cats", + "value": "C" + }, + { + "extension": "h", + "value": "Objective-C" + }, + { + "extension": "idc", + "value": "C" + }, + { + "extension": "w", + "value": "C" + }, + { + "extension": "cs", + "value": "Smalltalk" + }, + { + "extension": "cake", + "value": "CoffeeScript" + }, + { + "extension": "csharp", + "value": "C#" + }, + { + "extension": "cshtml", + "value": "C#" + }, + { + "extension": "csx", + "value": "C#" + }, + { + "extension": "cpp", + "value": "C++" + }, + { + "extension": "c++", + "value": "C++" + }, + { + "extension": "cc", + "value": "C++" + }, + { + "extension": "cp", + "value": "Component Pascal" + }, + { + "extension": "cxx", + "value": "C++" + }, + { + "extension": "h++", + "value": "C++" + }, + { + "extension": "hh", + "value": "Hack" + }, + { + "extension": "hpp", + "value": "C++" + }, + { + "extension": "hxx", + "value": "C++" + }, + { + "extension": "inl", + "value": "C++" + }, + { + "extension": "ipp", + "value": "C++" + }, + { + "extension": "tcc", + "value": "C++" + }, + { + "extension": "tpp", + "value": "C++" + }, + { + "extension": "c-objdump", + "value": "C-ObjDump" + }, + { + "extension": "chs", + "value": "C2hs Haskell" + }, + { + "extension": "clp", + "value": "CLIPS" + }, + { + "extension": "cmake", + "value": "CMake" + }, + { + "extension": "cmake.in", + "value": "CMake" + }, + { + "extension": "cob", + "value": "COBOL" + }, + { + "extension": "cbl", + "value": "COBOL" + }, + { + "extension": "ccp", + "value": "COBOL" + }, + { + "extension": "cobol", + "value": "COBOL" + }, + { + "extension": "cpy", + "value": "COBOL" + }, + { + "extension": "css", + "value": "CSS" + }, + { + "extension": "csv", + "value": "CSV" + }, + { + "extension": "capnp", + "value": "Cap'n Proto" + }, + { + "extension": "mss", + "value": "CartoCSS" + }, + { + "extension": "ceylon", + "value": "Ceylon" + }, + { + "extension": "chpl", + "value": "Chapel" + }, + { + "extension": "ch", + "value": "xBase" + }, + { + "extension": "ck", + "value": "ChucK" + }, + { + "extension": "cirru", + "value": "Cirru" + }, + { + "extension": "clw", + "value": "Clarion" + }, + { + "extension": "icl", + "value": "Clean" + }, + { + "extension": "dcl", + "value": "Clean" + }, + { + "extension": "click", + "value": "Click" + }, + { + "extension": "clj", + "value": "Clojure" + }, + { + "extension": "boot", + "value": "Clojure" + }, + { + "extension": "cl2", + "value": "Clojure" + }, + { + "extension": "cljc", + "value": "Clojure" + }, + { + "extension": "cljs", + "value": "Clojure" + }, + { + "extension": "cljs.hl", + "value": "Clojure" + }, + { + "extension": "cljscm", + "value": "Clojure" + }, + { + "extension": "cljx", + "value": "Clojure" + }, + { + "extension": "hic", + "value": "Clojure" + }, + { + "extension": "coffee", + "value": "CoffeeScript" + }, + { + "extension": "_coffee", + "value": "CoffeeScript" + }, + { + "extension": "cjsx", + "value": "CoffeeScript" + }, + { + "extension": "cson", + "value": "CoffeeScript" + }, + { + "extension": "iced", + "value": "CoffeeScript" + }, + { + "extension": "cfm", + "value": "ColdFusion" + }, + { + "extension": "cfml", + "value": "ColdFusion" + }, + { + "extension": "cfc", + "value": "ColdFusion CFC" + }, + { + "extension": "lisp", + "value": "NewLisp" + }, + { + "extension": "asd", + "value": "Common Lisp" + }, + { + "extension": "cl", + "value": "OpenCL" + }, + { + "extension": "l", + "value": "PicoLisp" + }, + { + "extension": "lsp", + "value": "NewLisp" + }, + { + "extension": "ny", + "value": "Common Lisp" + }, + { + "extension": "podsl", + "value": "Common Lisp" + }, + { + "extension": "sexp", + "value": "Common Lisp" + }, + { + "extension": "cps", + "value": "Component Pascal" + }, + { + "extension": "coq", + "value": "Coq" + }, + { + "extension": "v", + "value": "Verilog" + }, + { + "extension": "cppobjdump", + "value": "Cpp-ObjDump" + }, + { + "extension": "c++-objdump", + "value": "Cpp-ObjDump" + }, + { + "extension": "c++objdump", + "value": "Cpp-ObjDump" + }, + { + "extension": "cpp-objdump", + "value": "Cpp-ObjDump" + }, + { + "extension": "cxx-objdump", + "value": "Cpp-ObjDump" + }, + { + "extension": "creole", + "value": "Creole" + }, + { + "extension": "cr", + "value": "Crystal" + }, + { + "extension": "feature", + "value": "Cucumber" + }, + { + "extension": "cu", + "value": "Cuda" + }, + { + "extension": "cuh", + "value": "Cuda" + }, + { + "extension": "cy", + "value": "Cycript" + }, + { + "extension": "pyx", + "value": "Cython" + }, + { + "extension": "pxd", + "value": "Cython" + }, + { + "extension": "pxi", + "value": "Cython" + }, + { + "extension": "d", + "value": "Makefile" + }, + { + "extension": "di", + "value": "D" + }, + { + "extension": "d-objdump", + "value": "D-ObjDump" + }, + { + "extension": "com", + "value": "DIGITAL Command Language" + }, + { + "extension": "dm", + "value": "DM" + }, + { + "extension": "zone", + "value": "DNS Zone" + }, + { + "extension": "arpa", + "value": "DNS Zone" + }, + { + "extension": "darcspatch", + "value": "Darcs Patch" + }, + { + "extension": "dpatch", + "value": "Darcs Patch" + }, + { + "extension": "dart", + "value": "Dart" + }, + { + "extension": "diff", + "value": "Diff" + }, + { + "extension": "patch", + "value": "Diff" + }, + { + "extension": "dockerfile", + "value": "Dockerfile" + }, + { + "extension": "djs", + "value": "Dogescript" + }, + { + "extension": "dylan", + "value": "Dylan" + }, + { + "extension": "dyl", + "value": "Dylan" + }, + { + "extension": "intr", + "value": "Dylan" + }, + { + "extension": "lid", + "value": "Dylan" + }, + { + "extension": "E", + "value": "E" + }, + { + "extension": "ecl", + "value": "ECLiPSe" + }, + { + "extension": "eclxml", + "value": "ECL" + }, + { + "extension": "sch", + "value": "KiCad" + }, + { + "extension": "brd", + "value": "KiCad" + }, + { + "extension": "epj", + "value": "Ecere Projects" + }, + { + "extension": "e", + "value": "Eiffel" + }, + { + "extension": "ex", + "value": "Elixir" + }, + { + "extension": "exs", + "value": "Elixir" + }, + { + "extension": "elm", + "value": "Elm" + }, + { + "extension": "el", + "value": "Emacs Lisp" + }, + { + "extension": "emacs", + "value": "Emacs Lisp" + }, + { + "extension": "emacs.desktop", + "value": "Emacs Lisp" + }, + { + "extension": "em", + "value": "EmberScript" + }, + { + "extension": "emberscript", + "value": "EmberScript" + }, + { + "extension": "erl", + "value": "Erlang" + }, + { + "extension": "es", + "value": "JavaScript" + }, + { + "extension": "escript", + "value": "Erlang" + }, + { + "extension": "hrl", + "value": "Erlang" + }, + { + "extension": "xrl", + "value": "Erlang" + }, + { + "extension": "yrl", + "value": "Erlang" + }, + { + "extension": "fs", + "value": "GLSL" + }, + { + "extension": "fsi", + "value": "F#" + }, + { + "extension": "fsx", + "value": "F#" + }, + { + "extension": "fx", + "value": "HLSL" + }, + { + "extension": "flux", + "value": "FLUX" + }, + { + "extension": "f90", + "value": "FORTRAN" + }, + { + "extension": "f", + "value": "Forth" + }, + { + "extension": "f03", + "value": "FORTRAN" + }, + { + "extension": "f08", + "value": "FORTRAN" + }, + { + "extension": "f77", + "value": "FORTRAN" + }, + { + "extension": "f95", + "value": "FORTRAN" + }, + { + "extension": "for", + "value": "Forth" + }, + { + "extension": "fpp", + "value": "FORTRAN" + }, + { + "extension": "factor", + "value": "Factor" + }, + { + "extension": "fy", + "value": "Fancy" + }, + { + "extension": "fancypack", + "value": "Fancy" + }, + { + "extension": "fan", + "value": "Fantom" + }, + { + "extension": "eam.fs", + "value": "Formatted" + }, + { + "extension": "fth", + "value": "Forth" + }, + { + "extension": "4th", + "value": "Forth" + }, + { + "extension": "forth", + "value": "Forth" + }, + { + "extension": "fr", + "value": "Text" + }, + { + "extension": "frt", + "value": "Forth" + }, + { + "extension": "ftl", + "value": "FreeMarker" + }, + { + "extension": "g", + "value": "GAP" + }, + { + "extension": "gco", + "value": "G-code" + }, + { + "extension": "gcode", + "value": "G-code" + }, + { + "extension": "gms", + "value": "GAMS" + }, + { + "extension": "gap", + "value": "GAP" + }, + { + "extension": "gd", + "value": "GDScript" + }, + { + "extension": "gi", + "value": "GAP" + }, + { + "extension": "tst", + "value": "Scilab" + }, + { + "extension": "s", + "value": "GAS" + }, + { + "extension": "ms", + "value": "MAXScript" + }, + { + "extension": "glsl", + "value": "GLSL" + }, + { + "extension": "fp", + "value": "GLSL" + }, + { + "extension": "frag", + "value": "JavaScript" + }, + { + "extension": "frg", + "value": "GLSL" + }, + { + "extension": "fsh", + "value": "GLSL" + }, + { + "extension": "fshader", + "value": "GLSL" + }, + { + "extension": "geo", + "value": "GLSL" + }, + { + "extension": "geom", + "value": "GLSL" + }, + { + "extension": "glslv", + "value": "GLSL" + }, + { + "extension": "gshader", + "value": "GLSL" + }, + { + "extension": "shader", + "value": "GLSL" + }, + { + "extension": "vert", + "value": "GLSL" + }, + { + "extension": "vrx", + "value": "GLSL" + }, + { + "extension": "vsh", + "value": "GLSL" + }, + { + "extension": "vshader", + "value": "GLSL" + }, + { + "extension": "gml", + "value": "XML" + }, + { + "extension": "kid", + "value": "Genshi" + }, + { + "extension": "ebuild", + "value": "Gentoo Ebuild" + }, + { + "extension": "eclass", + "value": "Gentoo Eclass" + }, + { + "extension": "po", + "value": "Gettext Catalog" + }, + { + "extension": "pot", + "value": "Gettext Catalog" + }, + { + "extension": "glf", + "value": "Glyph" + }, + { + "extension": "gp", + "value": "Gnuplot" + }, + { + "extension": "gnu", + "value": "Gnuplot" + }, + { + "extension": "gnuplot", + "value": "Gnuplot" + }, + { + "extension": "plot", + "value": "Gnuplot" + }, + { + "extension": "plt", + "value": "Gnuplot" + }, + { + "extension": "go", + "value": "Go" + }, + { + "extension": "golo", + "value": "Golo" + }, + { + "extension": "gs", + "value": "JavaScript" + }, + { + "extension": "gst", + "value": "Gosu" + }, + { + "extension": "gsx", + "value": "Gosu" + }, + { + "extension": "vark", + "value": "Gosu" + }, + { + "extension": "grace", + "value": "Grace" + }, + { + "extension": "gradle", + "value": "Gradle" + }, + { + "extension": "gf", + "value": "Grammatical Framework" + }, + { + "extension": "graphql", + "value": "GraphQL" + }, + { + "extension": "dot", + "value": "Graphviz (DOT)" + }, + { + "extension": "gv", + "value": "Graphviz (DOT)" + }, + { + "extension": "man", + "value": "Groff" + }, + { + "extension": "1in", + "value": "Groff" + }, + { + "extension": "1m", + "value": "Groff" + }, + { + "extension": "1x", + "value": "Groff" + }, + { + "extension": "3in", + "value": "Groff" + }, + { + "extension": "3m", + "value": "Groff" + }, + { + "extension": "3qt", + "value": "Groff" + }, + { + "extension": "3x", + "value": "Groff" + }, + { + "extension": "me", + "value": "Groff" + }, + { + "extension": "n", + "value": "Nemerle" + }, + { + "extension": "rno", + "value": "Groff" + }, + { + "extension": "roff", + "value": "Groff" + }, + { + "extension": "groovy", + "value": "Groovy" + }, + { + "extension": "grt", + "value": "Groovy" + }, + { + "extension": "gtpl", + "value": "Groovy" + }, + { + "extension": "gvy", + "value": "Groovy" + }, + { + "extension": "gsp", + "value": "Groovy Server Pages" + }, + { + "extension": "hcl", + "value": "HCL" + }, + { + "extension": "tf", + "value": "HCL" + }, + { + "extension": "hlsl", + "value": "HLSL" + }, + { + "extension": "fxh", + "value": "HLSL" + }, + { + "extension": "hlsli", + "value": "HLSL" + }, + { + "extension": "html", + "value": "HTML" + }, + { + "extension": "htm", + "value": "HTML" + }, + { + "extension": "html.hl", + "value": "HTML" + }, + { + "extension": "st", + "value": "Smalltalk" + }, + { + "extension": "xht", + "value": "HTML" + }, + { + "extension": "xhtml", + "value": "HTML" + }, + { + "extension": "mustache", + "value": "HTML+Django" + }, + { + "extension": "jinja", + "value": "HTML+Django" + }, + { + "extension": "eex", + "value": "HTML+EEX" + }, + { + "extension": "erb", + "value": "HTML+ERB" + }, + { + "extension": "erb.deface", + "value": "HTML+ERB" + }, + { + "extension": "phtml", + "value": "HTML+PHP" + }, + { + "extension": "http", + "value": "HTTP" + }, + { + "extension": "php", + "value": "PHP" + }, + { + "extension": "haml", + "value": "Haml" + }, + { + "extension": "haml.deface", + "value": "Haml" + }, + { + "extension": "handlebars", + "value": "Handlebars" + }, + { + "extension": "hbs", + "value": "Handlebars" + }, + { + "extension": "hb", + "value": "Harbour" + }, + { + "extension": "hs", + "value": "Haskell" + }, + { + "extension": "hsc", + "value": "Haskell" + }, + { + "extension": "hx", + "value": "Haxe" + }, + { + "extension": "hxsl", + "value": "Haxe" + }, + { + "extension": "hy", + "value": "Hy" + }, + { + "extension": "pro", + "value": "QMake" + }, + { + "extension": "dlm", + "value": "IDL" + }, + { + "extension": "ipf", + "value": "IGOR Pro" + }, + { + "extension": "ini", + "value": "INI" + }, + { + "extension": "cfg", + "value": "INI" + }, + { + "extension": "prefs", + "value": "INI" + }, + { + "extension": "properties", + "value": "INI" + }, + { + "extension": "irclog", + "value": "IRC log" + }, + { + "extension": "weechatlog", + "value": "IRC log" + }, + { + "extension": "idr", + "value": "Idris" + }, + { + "extension": "lidr", + "value": "Idris" + }, + { + "extension": "ni", + "value": "Inform 7" + }, + { + "extension": "i7x", + "value": "Inform 7" + }, + { + "extension": "iss", + "value": "Inno Setup" + }, + { + "extension": "io", + "value": "Io" + }, + { + "extension": "ik", + "value": "Ioke" + }, + { + "extension": "thy", + "value": "Isabelle" + }, + { + "extension": "ijs", + "value": "J" + }, + { + "extension": "flex", + "value": "JFlex" + }, + { + "extension": "jflex", + "value": "JFlex" + }, + { + "extension": "json", + "value": "JSON" + }, + { + "extension": "geojson", + "value": "JSON" + }, + { + "extension": "lock", + "value": "JSON" + }, + { + "extension": "topojson", + "value": "JSON" + }, + { + "extension": "json5", + "value": "JSON5" + }, + { + "extension": "jsonld", + "value": "JSONLD" + }, + { + "extension": "jq", + "value": "JSONiq" + }, + { + "extension": "jsx", + "value": "JSX" + }, + { + "extension": "jade", + "value": "Jade" + }, + { + "extension": "j", + "value": "Objective-J" + }, + { + "extension": "java", + "value": "Java" + }, + { + "extension": "jsp", + "value": "Java Server Pages" + }, + { + "extension": "js", + "value": "JavaScript" + }, + { + "extension": "_js", + "value": "JavaScript" + }, + { + "extension": "bones", + "value": "JavaScript" + }, + { + "extension": "es6", + "value": "JavaScript" + }, + { + "extension": "jake", + "value": "JavaScript" + }, + { + "extension": "jsb", + "value": "JavaScript" + }, + { + "extension": "jscad", + "value": "JavaScript" + }, + { + "extension": "jsfl", + "value": "JavaScript" + }, + { + "extension": "jsm", + "value": "JavaScript" + }, + { + "extension": "jss", + "value": "JavaScript" + }, + { + "extension": "njs", + "value": "JavaScript" + }, + { + "extension": "pac", + "value": "JavaScript" + }, + { + "extension": "sjs", + "value": "JavaScript" + }, + { + "extension": "ssjs", + "value": "JavaScript" + }, + { + "extension": "sublime-build", + "value": "JavaScript" + }, + { + "extension": "sublime-commands", + "value": "JavaScript" + }, + { + "extension": "sublime-completions", + "value": "JavaScript" + }, + { + "extension": "sublime-keymap", + "value": "JavaScript" + }, + { + "extension": "sublime-macro", + "value": "JavaScript" + }, + { + "extension": "sublime-menu", + "value": "JavaScript" + }, + { + "extension": "sublime-mousemap", + "value": "JavaScript" + }, + { + "extension": "sublime-project", + "value": "JavaScript" + }, + { + "extension": "sublime-settings", + "value": "JavaScript" + }, + { + "extension": "sublime-theme", + "value": "JavaScript" + }, + { + "extension": "sublime-workspace", + "value": "JavaScript" + }, + { + "extension": "sublime_metrics", + "value": "JavaScript" + }, + { + "extension": "sublime_session", + "value": "JavaScript" + }, + { + "extension": "xsjs", + "value": "JavaScript" + }, + { + "extension": "xsjslib", + "value": "JavaScript" + }, + { + "extension": "jl", + "value": "Julia" + }, + { + "extension": "ipynb", + "value": "Jupyter Notebook" + }, + { + "extension": "krl", + "value": "KRL" + }, + { + "extension": "kicad_pcb", + "value": "KiCad" + }, + { + "extension": "kit", + "value": "Kit" + }, + { + "extension": "kt", + "value": "Kotlin" + }, + { + "extension": "ktm", + "value": "Kotlin" + }, + { + "extension": "kts", + "value": "Kotlin" + }, + { + "extension": "lfe", + "value": "LFE" + }, + { + "extension": "ll", + "value": "LLVM" + }, + { + "extension": "lol", + "value": "LOLCODE" + }, + { + "extension": "lsl", + "value": "LSL" + }, + { + "extension": "lslp", + "value": "LSL" + }, + { + "extension": "lvproj", + "value": "LabVIEW" + }, + { + "extension": "lasso", + "value": "Lasso" + }, + { + "extension": "las", + "value": "Lasso" + }, + { + "extension": "lasso8", + "value": "Lasso" + }, + { + "extension": "lasso9", + "value": "Lasso" + }, + { + "extension": "ldml", + "value": "Lasso" + }, + { + "extension": "latte", + "value": "Latte" + }, + { + "extension": "lean", + "value": "Lean" + }, + { + "extension": "hlean", + "value": "Lean" + }, + { + "extension": "less", + "value": "Less" + }, + { + "extension": "lex", + "value": "Lex" + }, + { + "extension": "ly", + "value": "LilyPond" + }, + { + "extension": "ily", + "value": "LilyPond" + }, + { + "extension": "m", + "value": "Objective-C" + }, + { + "extension": "ld", + "value": "Linker Script" + }, + { + "extension": "lds", + "value": "Linker Script" + }, + { + "extension": "liquid", + "value": "Liquid" + }, + { + "extension": "lagda", + "value": "Literate Agda" + }, + { + "extension": "litcoffee", + "value": "Literate CoffeeScript" + }, + { + "extension": "lhs", + "value": "Literate Haskell" + }, + { + "extension": "ls", + "value": "LoomScript" + }, + { + "extension": "_ls", + "value": "LiveScript" + }, + { + "extension": "xm", + "value": "Logos" + }, + { + "extension": "x", + "value": "Logos" + }, + { + "extension": "xi", + "value": "Logos" + }, + { + "extension": "lgt", + "value": "Logtalk" + }, + { + "extension": "logtalk", + "value": "Logtalk" + }, + { + "extension": "lookml", + "value": "LookML" + }, + { + "extension": "lua", + "value": "Lua" + }, + { + "extension": "fcgi", + "value": "Shell" + }, + { + "extension": "nse", + "value": "Lua" + }, + { + "extension": "pd_lua", + "value": "Lua" + }, + { + "extension": "rbxs", + "value": "Lua" + }, + { + "extension": "wlua", + "value": "Lua" + }, + { + "extension": "mumps", + "value": "M" + }, + { + "extension": "m4", + "value": "M4Sugar" + }, + { + "extension": "mcr", + "value": "MAXScript" + }, + { + "extension": "mtml", + "value": "MTML" + }, + { + "extension": "muf", + "value": "MUF" + }, + { + "extension": "mak", + "value": "Makefile" + }, + { + "extension": "mk", + "value": "Makefile" + }, + { + "extension": "mkfile", + "value": "Makefile" + }, + { + "extension": "mako", + "value": "Mako" + }, + { + "extension": "mao", + "value": "Mako" + }, + { + "extension": "md", + "value": "Markdown" + }, + { + "extension": "markdown", + "value": "Markdown" + }, + { + "extension": "mkd", + "value": "Markdown" + }, + { + "extension": "mkdn", + "value": "Markdown" + }, + { + "extension": "mkdown", + "value": "Markdown" + }, + { + "extension": "ron", + "value": "Markdown" + }, + { + "extension": "mask", + "value": "Mask" + }, + { + "extension": "mathematica", + "value": "Mathematica" + }, + { + "extension": "cdf", + "value": "Mathematica" + }, + { + "extension": "ma", + "value": "Mathematica" + }, + { + "extension": "mt", + "value": "Mathematica" + }, + { + "extension": "nb", + "value": "Text" + }, + { + "extension": "nbp", + "value": "Mathematica" + }, + { + "extension": "wl", + "value": "Mathematica" + }, + { + "extension": "wlt", + "value": "Mathematica" + }, + { + "extension": "matlab", + "value": "Matlab" + }, + { + "extension": "maxpat", + "value": "Max" + }, + { + "extension": "maxhelp", + "value": "Max" + }, + { + "extension": "maxproj", + "value": "Max" + }, + { + "extension": "mxt", + "value": "Max" + }, + { + "extension": "pat", + "value": "Max" + }, + { + "extension": "mediawiki", + "value": "MediaWiki" + }, + { + "extension": "wiki", + "value": "MediaWiki" + }, + { + "extension": "moo", + "value": "Moocode" + }, + { + "extension": "metal", + "value": "Metal" + }, + { + "extension": "minid", + "value": "MiniD" + }, + { + "extension": "druby", + "value": "Mirah" + }, + { + "extension": "duby", + "value": "Mirah" + }, + { + "extension": "mir", + "value": "Mirah" + }, + { + "extension": "mirah", + "value": "Mirah" + }, + { + "extension": "mo", + "value": "Modelica" + }, + { + "extension": "mms", + "value": "Module Management System" + }, + { + "extension": "mmk", + "value": "Module Management System" + }, + { + "extension": "monkey", + "value": "Monkey" + }, + { + "extension": "moon", + "value": "MoonScript" + }, + { + "extension": "myt", + "value": "Myghty" + }, + { + "extension": "ncl", + "value": "Text" + }, + { + "extension": "nl", + "value": "NewLisp" + }, + { + "extension": "nsi", + "value": "NSIS" + }, + { + "extension": "nsh", + "value": "NSIS" + }, + { + "extension": "axs", + "value": "NetLinx" + }, + { + "extension": "axi", + "value": "NetLinx" + }, + { + "extension": "axs.erb", + "value": "NetLinx+ERB" + }, + { + "extension": "axi.erb", + "value": "NetLinx+ERB" + }, + { + "extension": "nlogo", + "value": "NetLogo" + }, + { + "extension": "nginxconf", + "value": "Nginx" + }, + { + "extension": "nim", + "value": "Nimrod" + }, + { + "extension": "nimrod", + "value": "Nimrod" + }, + { + "extension": "ninja", + "value": "Ninja" + }, + { + "extension": "nit", + "value": "Nit" + }, + { + "extension": "nix", + "value": "Nix" + }, + { + "extension": "nu", + "value": "Nu" + }, + { + "extension": "numpy", + "value": "NumPy" + }, + { + "extension": "numpyw", + "value": "NumPy" + }, + { + "extension": "numsc", + "value": "NumPy" + }, + { + "extension": "ml", + "value": "OCaml" + }, + { + "extension": "eliom", + "value": "OCaml" + }, + { + "extension": "eliomi", + "value": "OCaml" + }, + { + "extension": "ml4", + "value": "OCaml" + }, + { + "extension": "mli", + "value": "OCaml" + }, + { + "extension": "mll", + "value": "OCaml" + }, + { + "extension": "mly", + "value": "OCaml" + }, + { + "extension": "objdump", + "value": "ObjDump" + }, + { + "extension": "mm", + "value": "XML" + }, + { + "extension": "sj", + "value": "Objective-J" + }, + { + "extension": "omgrofl", + "value": "Omgrofl" + }, + { + "extension": "opa", + "value": "Opa" + }, + { + "extension": "opal", + "value": "Opal" + }, + { + "extension": "opencl", + "value": "OpenCL" + }, + { + "extension": "p", + "value": "OpenEdge ABL" + }, + { + "extension": "scad", + "value": "OpenSCAD" + }, + { + "extension": "org", + "value": "Org" + }, + { + "extension": "ox", + "value": "Ox" + }, + { + "extension": "oxh", + "value": "Ox" + }, + { + "extension": "oxo", + "value": "Ox" + }, + { + "extension": "oxygene", + "value": "Oxygene" + }, + { + "extension": "oz", + "value": "Oz" + }, + { + "extension": "pwn", + "value": "PAWN" + }, + { + "extension": "aw", + "value": "PHP" + }, + { + "extension": "ctp", + "value": "PHP" + }, + { + "extension": "php3", + "value": "PHP" + }, + { + "extension": "php4", + "value": "PHP" + }, + { + "extension": "php5", + "value": "PHP" + }, + { + "extension": "phps", + "value": "PHP" + }, + { + "extension": "phpt", + "value": "PHP" + }, + { + "extension": "pls", + "value": "PLSQL" + }, + { + "extension": "pck", + "value": "PLSQL" + }, + { + "extension": "pkb", + "value": "PLSQL" + }, + { + "extension": "pks", + "value": "PLSQL" + }, + { + "extension": "plb", + "value": "PLSQL" + }, + { + "extension": "plsql", + "value": "PLSQL" + }, + { + "extension": "sql", + "value": "SQLPL" + }, + { + "extension": "pov", + "value": "POV-Ray SDL" + }, + { + "extension": "pan", + "value": "Pan" + }, + { + "extension": "psc", + "value": "Papyrus" + }, + { + "extension": "parrot", + "value": "Parrot" + }, + { + "extension": "pasm", + "value": "Parrot Assembly" + }, + { + "extension": "pir", + "value": "Parrot Internal Representation" + }, + { + "extension": "pas", + "value": "Pascal" + }, + { + "extension": "dfm", + "value": "Pascal" + }, + { + "extension": "dpr", + "value": "Pascal" + }, + { + "extension": "lpr", + "value": "Pascal" + }, + { + "extension": "pp", + "value": "Puppet" + }, + { + "extension": "pl", + "value": "Prolog" + }, + { + "extension": "al", + "value": "Perl" + }, + { + "extension": "cgi", + "value": "Shell" + }, + { + "extension": "perl", + "value": "Perl" + }, + { + "extension": "ph", + "value": "Perl" + }, + { + "extension": "plx", + "value": "Perl" + }, + { + "extension": "pm", + "value": "Perl6" + }, + { + "extension": "pod", + "value": "Pod" + }, + { + "extension": "psgi", + "value": "Perl" + }, + { + "extension": "t", + "value": "Turing" + }, + { + "extension": "6pl", + "value": "Perl6" + }, + { + "extension": "6pm", + "value": "Perl6" + }, + { + "extension": "nqp", + "value": "Perl6" + }, + { + "extension": "p6", + "value": "Perl6" + }, + { + "extension": "p6l", + "value": "Perl6" + }, + { + "extension": "p6m", + "value": "Perl6" + }, + { + "extension": "pl6", + "value": "Perl6" + }, + { + "extension": "pm6", + "value": "Perl6" + }, + { + "extension": "pkl", + "value": "Pickle" + }, + { + "extension": "pig", + "value": "PigLatin" + }, + { + "extension": "pike", + "value": "Pike" + }, + { + "extension": "pmod", + "value": "Pike" + }, + { + "extension": "pogo", + "value": "PogoScript" + }, + { + "extension": "pony", + "value": "Pony" + }, + { + "extension": "ps", + "value": "PostScript" + }, + { + "extension": "eps", + "value": "PostScript" + }, + { + "extension": "ps1", + "value": "PowerShell" + }, + { + "extension": "psd1", + "value": "PowerShell" + }, + { + "extension": "psm1", + "value": "PowerShell" + }, + { + "extension": "pde", + "value": "Processing" + }, + { + "extension": "prolog", + "value": "Prolog" + }, + { + "extension": "yap", + "value": "Prolog" + }, + { + "extension": "spin", + "value": "Propeller Spin" + }, + { + "extension": "proto", + "value": "Protocol Buffer" + }, + { + "extension": "pub", + "value": "Public Key" + }, + { + "extension": "pd", + "value": "Pure Data" + }, + { + "extension": "pb", + "value": "PureBasic" + }, + { + "extension": "pbi", + "value": "PureBasic" + }, + { + "extension": "purs", + "value": "PureScript" + }, + { + "extension": "py", + "value": "Python" + }, + { + "extension": "bzl", + "value": "Python" + }, + { + "extension": "gyp", + "value": "Python" + }, + { + "extension": "lmi", + "value": "Python" + }, + { + "extension": "pyde", + "value": "Python" + }, + { + "extension": "pyp", + "value": "Python" + }, + { + "extension": "pyt", + "value": "Python" + }, + { + "extension": "pyw", + "value": "Python" + }, + { + "extension": "rpy", + "value": "Ren'Py" + }, + { + "extension": "tac", + "value": "Python" + }, + { + "extension": "wsgi", + "value": "Python" + }, + { + "extension": "xpy", + "value": "Python" + }, + { + "extension": "pytb", + "value": "Python traceback" + }, + { + "extension": "qml", + "value": "QML" + }, + { + "extension": "qbs", + "value": "QML" + }, + { + "extension": "pri", + "value": "QMake" + }, + { + "extension": "r", + "value": "Rebol" + }, + { + "extension": "rd", + "value": "R" + }, + { + "extension": "rsx", + "value": "R" + }, + { + "extension": "raml", + "value": "RAML" + }, + { + "extension": "rdoc", + "value": "RDoc" + }, + { + "extension": "rbbas", + "value": "REALbasic" + }, + { + "extension": "rbfrm", + "value": "REALbasic" + }, + { + "extension": "rbmnu", + "value": "REALbasic" + }, + { + "extension": "rbres", + "value": "REALbasic" + }, + { + "extension": "rbtbar", + "value": "REALbasic" + }, + { + "extension": "rbuistate", + "value": "REALbasic" + }, + { + "extension": "rhtml", + "value": "RHTML" + }, + { + "extension": "rmd", + "value": "RMarkdown" + }, + { + "extension": "rkt", + "value": "Racket" + }, + { + "extension": "rktd", + "value": "Racket" + }, + { + "extension": "rktl", + "value": "Racket" + }, + { + "extension": "scrbl", + "value": "Racket" + }, + { + "extension": "rl", + "value": "Ragel in Ruby Host" + }, + { + "extension": "raw", + "value": "Raw token data" + }, + { + "extension": "reb", + "value": "Rebol" + }, + { + "extension": "r2", + "value": "Rebol" + }, + { + "extension": "r3", + "value": "Rebol" + }, + { + "extension": "rebol", + "value": "Rebol" + }, + { + "extension": "red", + "value": "Red" + }, + { + "extension": "reds", + "value": "Red" + }, + { + "extension": "cw", + "value": "Redcode" + }, + { + "extension": "rs", + "value": "Rust" + }, + { + "extension": "rsh", + "value": "RenderScript" + }, + { + "extension": "robot", + "value": "RobotFramework" + }, + { + "extension": "rg", + "value": "Rouge" + }, + { + "extension": "rb", + "value": "Ruby" + }, + { + "extension": "builder", + "value": "Ruby" + }, + { + "extension": "gemspec", + "value": "Ruby" + }, + { + "extension": "god", + "value": "Ruby" + }, + { + "extension": "irbrc", + "value": "Ruby" + }, + { + "extension": "jbuilder", + "value": "Ruby" + }, + { + "extension": "mspec", + "value": "Ruby" + }, + { + "extension": "pluginspec", + "value": "XML" + }, + { + "extension": "podspec", + "value": "Ruby" + }, + { + "extension": "rabl", + "value": "Ruby" + }, + { + "extension": "rake", + "value": "Ruby" + }, + { + "extension": "rbuild", + "value": "Ruby" + }, + { + "extension": "rbw", + "value": "Ruby" + }, + { + "extension": "rbx", + "value": "Ruby" + }, + { + "extension": "ru", + "value": "Ruby" + }, + { + "extension": "ruby", + "value": "Ruby" + }, + { + "extension": "thor", + "value": "Ruby" + }, + { + "extension": "watchr", + "value": "Ruby" + }, + { + "extension": "rs.in", + "value": "Rust" + }, + { + "extension": "sas", + "value": "SAS" + }, + { + "extension": "scss", + "value": "SCSS" + }, + { + "extension": "smt2", + "value": "SMT" + }, + { + "extension": "smt", + "value": "SMT" + }, + { + "extension": "sparql", + "value": "SPARQL" + }, + { + "extension": "rq", + "value": "SPARQL" + }, + { + "extension": "sqf", + "value": "SQF" + }, + { + "extension": "hqf", + "value": "SQF" + }, + { + "extension": "cql", + "value": "SQL" + }, + { + "extension": "ddl", + "value": "SQL" + }, + { + "extension": "prc", + "value": "SQL" + }, + { + "extension": "tab", + "value": "SQL" + }, + { + "extension": "udf", + "value": "SQL" + }, + { + "extension": "viw", + "value": "SQL" + }, + { + "extension": "db2", + "value": "SQLPL" + }, + { + "extension": "ston", + "value": "STON" + }, + { + "extension": "svg", + "value": "SVG" + }, + { + "extension": "sage", + "value": "Sage" + }, + { + "extension": "sagews", + "value": "Sage" + }, + { + "extension": "sls", + "value": "Scheme" + }, + { + "extension": "sass", + "value": "Sass" + }, + { + "extension": "scala", + "value": "Scala" + }, + { + "extension": "sbt", + "value": "Scala" + }, + { + "extension": "sc", + "value": "SuperCollider" + }, + { + "extension": "scaml", + "value": "Scaml" + }, + { + "extension": "scm", + "value": "Scheme" + }, + { + "extension": "sld", + "value": "Scheme" + }, + { + "extension": "sps", + "value": "Scheme" + }, + { + "extension": "ss", + "value": "Scheme" + }, + { + "extension": "sci", + "value": "Scilab" + }, + { + "extension": "sce", + "value": "Scilab" + }, + { + "extension": "self", + "value": "Self" + }, + { + "extension": "sh", + "value": "Shell" + }, + { + "extension": "bash", + "value": "Shell" + }, + { + "extension": "bats", + "value": "Shell" + }, + { + "extension": "command", + "value": "Shell" + }, + { + "extension": "ksh", + "value": "Shell" + }, + { + "extension": "sh.in", + "value": "Shell" + }, + { + "extension": "tmux", + "value": "Shell" + }, + { + "extension": "tool", + "value": "Shell" + }, + { + "extension": "zsh", + "value": "Shell" + }, + { + "extension": "sh-session", + "value": "ShellSession" + }, + { + "extension": "shen", + "value": "Shen" + }, + { + "extension": "sl", + "value": "Slash" + }, + { + "extension": "slim", + "value": "Slim" + }, + { + "extension": "smali", + "value": "Smali" + }, + { + "extension": "tpl", + "value": "Smarty" + }, + { + "extension": "sp", + "value": "SourcePawn" + }, + { + "extension": "sma", + "value": "SourcePawn" + }, + { + "extension": "nut", + "value": "Squirrel" + }, + { + "extension": "stan", + "value": "Stan" + }, + { + "extension": "ML", + "value": "Standard ML" + }, + { + "extension": "fun", + "value": "Standard ML" + }, + { + "extension": "sig", + "value": "Standard ML" + }, + { + "extension": "sml", + "value": "Standard ML" + }, + { + "extension": "do", + "value": "Stata" + }, + { + "extension": "ado", + "value": "Stata" + }, + { + "extension": "doh", + "value": "Stata" + }, + { + "extension": "ihlp", + "value": "Stata" + }, + { + "extension": "mata", + "value": "Stata" + }, + { + "extension": "matah", + "value": "Stata" + }, + { + "extension": "sthlp", + "value": "Stata" + }, + { + "extension": "styl", + "value": "Stylus" + }, + { + "extension": "scd", + "value": "SuperCollider" + }, + { + "extension": "swift", + "value": "Swift" + }, + { + "extension": "sv", + "value": "SystemVerilog" + }, + { + "extension": "svh", + "value": "SystemVerilog" + }, + { + "extension": "vh", + "value": "SystemVerilog" + }, + { + "extension": "toml", + "value": "TOML" + }, + { + "extension": "txl", + "value": "TXL" + }, + { + "extension": "tcl", + "value": "Tcl" + }, + { + "extension": "adp", + "value": "Tcl" + }, + { + "extension": "tm", + "value": "Tcl" + }, + { + "extension": "tcsh", + "value": "Tcsh" + }, + { + "extension": "csh", + "value": "Tcsh" + }, + { + "extension": "tex", + "value": "TeX" + }, + { + "extension": "aux", + "value": "TeX" + }, + { + "extension": "bbx", + "value": "TeX" + }, + { + "extension": "bib", + "value": "TeX" + }, + { + "extension": "cbx", + "value": "TeX" + }, + { + "extension": "dtx", + "value": "TeX" + }, + { + "extension": "ins", + "value": "TeX" + }, + { + "extension": "lbx", + "value": "TeX" + }, + { + "extension": "ltx", + "value": "TeX" + }, + { + "extension": "mkii", + "value": "TeX" + }, + { + "extension": "mkiv", + "value": "TeX" + }, + { + "extension": "mkvi", + "value": "TeX" + }, + { + "extension": "sty", + "value": "TeX" + }, + { + "extension": "toc", + "value": "TeX" + }, + { + "extension": "tea", + "value": "Tea" + }, + { + "extension": "txt", + "value": "Text" + }, + { + "extension": "no", + "value": "Text" + }, + { + "extension": "textile", + "value": "Textile" + }, + { + "extension": "thrift", + "value": "Thrift" + }, + { + "extension": "tu", + "value": "Turing" + }, + { + "extension": "ttl", + "value": "Turtle" + }, + { + "extension": "twig", + "value": "Twig" + }, + { + "extension": "ts", + "value": "TypeScript" + }, + { + "extension": "tsx", + "value": "TypeScript" + }, + { + "extension": "upc", + "value": "Unified Parallel C" + }, + { + "extension": "anim", + "value": "Unity3D Asset" + }, + { + "extension": "asset", + "value": "Unity3D Asset" + }, + { + "extension": "mat", + "value": "Unity3D Asset" + }, + { + "extension": "meta", + "value": "Unity3D Asset" + }, + { + "extension": "prefab", + "value": "Unity3D Asset" + }, + { + "extension": "unity", + "value": "Unity3D Asset" + }, + { + "extension": "uno", + "value": "Uno" + }, + { + "extension": "uc", + "value": "UnrealScript" + }, + { + "extension": "ur", + "value": "UrWeb" + }, + { + "extension": "urs", + "value": "UrWeb" + }, + { + "extension": "vcl", + "value": "VCL" + }, + { + "extension": "vhdl", + "value": "VHDL" + }, + { + "extension": "vhd", + "value": "VHDL" + }, + { + "extension": "vhf", + "value": "VHDL" + }, + { + "extension": "vhi", + "value": "VHDL" + }, + { + "extension": "vho", + "value": "VHDL" + }, + { + "extension": "vhs", + "value": "VHDL" + }, + { + "extension": "vht", + "value": "VHDL" + }, + { + "extension": "vhw", + "value": "VHDL" + }, + { + "extension": "vala", + "value": "Vala" + }, + { + "extension": "vapi", + "value": "Vala" + }, + { + "extension": "veo", + "value": "Verilog" + }, + { + "extension": "vim", + "value": "VimL" + }, + { + "extension": "vb", + "value": "Visual Basic" + }, + { + "extension": "bas", + "value": "Visual Basic" + }, + { + "extension": "frm", + "value": "Visual Basic" + }, + { + "extension": "frx", + "value": "Visual Basic" + }, + { + "extension": "vba", + "value": "Visual Basic" + }, + { + "extension": "vbhtml", + "value": "Visual Basic" + }, + { + "extension": "vbs", + "value": "Visual Basic" + }, + { + "extension": "volt", + "value": "Volt" + }, + { + "extension": "vue", + "value": "Vue" + }, + { + "extension": "owl", + "value": "Web Ontology Language" + }, + { + "extension": "webidl", + "value": "WebIDL" + }, + { + "extension": "x10", + "value": "X10" + }, + { + "extension": "xc", + "value": "XC" + }, + { + "extension": "xml", + "value": "XML" + }, + { + "extension": "ant", + "value": "XML" + }, + { + "extension": "axml", + "value": "XML" + }, + { + "extension": "ccxml", + "value": "XML" + }, + { + "extension": "clixml", + "value": "XML" + }, + { + "extension": "cproject", + "value": "XML" + }, + { + "extension": "csl", + "value": "XML" + }, + { + "extension": "csproj", + "value": "XML" + }, + { + "extension": "ct", + "value": "XML" + }, + { + "extension": "dita", + "value": "XML" + }, + { + "extension": "ditamap", + "value": "XML" + }, + { + "extension": "ditaval", + "value": "XML" + }, + { + "extension": "dll.config", + "value": "XML" + }, + { + "extension": "dotsettings", + "value": "XML" + }, + { + "extension": "filters", + "value": "XML" + }, + { + "extension": "fsproj", + "value": "XML" + }, + { + "extension": "fxml", + "value": "XML" + }, + { + "extension": "glade", + "value": "XML" + }, + { + "extension": "grxml", + "value": "XML" + }, + { + "extension": "iml", + "value": "XML" + }, + { + "extension": "ivy", + "value": "XML" + }, + { + "extension": "jelly", + "value": "XML" + }, + { + "extension": "jsproj", + "value": "XML" + }, + { + "extension": "kml", + "value": "XML" + }, + { + "extension": "launch", + "value": "XML" + }, + { + "extension": "mdpolicy", + "value": "XML" + }, + { + "extension": "mxml", + "value": "XML" + }, + { + "extension": "nproj", + "value": "XML" + }, + { + "extension": "nuspec", + "value": "XML" + }, + { + "extension": "odd", + "value": "XML" + }, + { + "extension": "osm", + "value": "XML" + }, + { + "extension": "plist", + "value": "XML" + }, + { + "extension": "props", + "value": "XML" + }, + { + "extension": "ps1xml", + "value": "XML" + }, + { + "extension": "psc1", + "value": "XML" + }, + { + "extension": "pt", + "value": "XML" + }, + { + "extension": "rdf", + "value": "XML" + }, + { + "extension": "rss", + "value": "XML" + }, + { + "extension": "scxml", + "value": "XML" + }, + { + "extension": "srdf", + "value": "XML" + }, + { + "extension": "storyboard", + "value": "XML" + }, + { + "extension": "stTheme", + "value": "XML" + }, + { + "extension": "sublime-snippet", + "value": "XML" + }, + { + "extension": "targets", + "value": "XML" + }, + { + "extension": "tmCommand", + "value": "XML" + }, + { + "extension": "tml", + "value": "XML" + }, + { + "extension": "tmLanguage", + "value": "XML" + }, + { + "extension": "tmPreferences", + "value": "XML" + }, + { + "extension": "tmSnippet", + "value": "XML" + }, + { + "extension": "tmTheme", + "value": "XML" + }, + { + "extension": "ui", + "value": "XML" + }, + { + "extension": "urdf", + "value": "XML" + }, + { + "extension": "ux", + "value": "XML" + }, + { + "extension": "vbproj", + "value": "XML" + }, + { + "extension": "vcxproj", + "value": "XML" + }, + { + "extension": "vssettings", + "value": "XML" + }, + { + "extension": "vxml", + "value": "XML" + }, + { + "extension": "wsdl", + "value": "XML" + }, + { + "extension": "wsf", + "value": "XML" + }, + { + "extension": "wxi", + "value": "XML" + }, + { + "extension": "wxl", + "value": "XML" + }, + { + "extension": "wxs", + "value": "XML" + }, + { + "extension": "x3d", + "value": "XML" + }, + { + "extension": "xacro", + "value": "XML" + }, + { + "extension": "xaml", + "value": "XML" + }, + { + "extension": "xib", + "value": "XML" + }, + { + "extension": "xlf", + "value": "XML" + }, + { + "extension": "xliff", + "value": "XML" + }, + { + "extension": "xmi", + "value": "XML" + }, + { + "extension": "xml.dist", + "value": "XML" + }, + { + "extension": "xproj", + "value": "XML" + }, + { + "extension": "xsd", + "value": "XML" + }, + { + "extension": "xul", + "value": "XML" + }, + { + "extension": "zcml", + "value": "XML" + }, + { + "extension": "xsp-config", + "value": "XPages" + }, + { + "extension": "xsp.metadata", + "value": "XPages" + }, + { + "extension": "xpl", + "value": "XProc" + }, + { + "extension": "xproc", + "value": "XProc" + }, + { + "extension": "xquery", + "value": "XQuery" + }, + { + "extension": "xq", + "value": "XQuery" + }, + { + "extension": "xql", + "value": "XQuery" + }, + { + "extension": "xqm", + "value": "XQuery" + }, + { + "extension": "xqy", + "value": "XQuery" + }, + { + "extension": "xs", + "value": "XS" + }, + { + "extension": "xslt", + "value": "XSLT" + }, + { + "extension": "xsl", + "value": "XSLT" + }, + { + "extension": "xojo_code", + "value": "Xojo" + }, + { + "extension": "xojo_menu", + "value": "Xojo" + }, + { + "extension": "xojo_report", + "value": "Xojo" + }, + { + "extension": "xojo_script", + "value": "Xojo" + }, + { + "extension": "xojo_toolbar", + "value": "Xojo" + }, + { + "extension": "xojo_window", + "value": "Xojo" + }, + { + "extension": "xtend", + "value": "Xtend" + }, + { + "extension": "yml", + "value": "YAML" + }, + { + "extension": "reek", + "value": "YAML" + }, + { + "extension": "rviz", + "value": "YAML" + }, + { + "extension": "sublime-syntax", + "value": "YAML" + }, + { + "extension": "syntax", + "value": "YAML" + }, + { + "extension": "yaml", + "value": "YAML" + }, + { + "extension": "yaml-tmlanguage", + "value": "YAML" + }, + { + "extension": "yang", + "value": "YANG" + }, + { + "extension": "y", + "value": "Yacc" + }, + { + "extension": "yacc", + "value": "Yacc" + }, + { + "extension": "yy", + "value": "Yacc" + }, + { + "extension": "zep", + "value": "Zephir" + }, + { + "extension": "zimpl", + "value": "Zimpl" + }, + { + "extension": "zmpl", + "value": "Zimpl" + }, + { + "extension": "zpl", + "value": "Zimpl" + }, + { + "extension": "desktop", + "value": "desktop" + }, + { + "extension": "desktop.in", + "value": "desktop" + }, + { + "extension": "ec", + "value": "eC" + }, + { + "extension": "eh", + "value": "eC" + }, + { + "extension": "edn", + "value": "edn" + }, + { + "extension": "fish", + "value": "fish" + }, + { + "extension": "mu", + "value": "mupad" + }, + { + "extension": "nc", + "value": "nesC" + }, + { + "extension": "ooc", + "value": "ooc" + }, + { + "extension": "rst", + "value": "reStructuredText" + }, + { + "extension": "rest", + "value": "reStructuredText" + }, + { + "extension": "rest.txt", + "value": "reStructuredText" + }, + { + "extension": "rst.txt", + "value": "reStructuredText" + }, + { + "extension": "wisp", + "value": "wisp" + }, + { + "extension": "prg", + "value": "xBase" + }, + { + "extension": "prw", + "value": "xBase" + } +] \ No newline at end of file diff --git a/src/main/resources/html/icons/delete-icon.svg b/src/main/resources/html/icons/delete-icon.svg deleted file mode 100644 index be034894..00000000 --- a/src/main/resources/html/icons/delete-icon.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/main/resources/html/icons/delete-icon_dark.svg b/src/main/resources/html/icons/delete-icon_dark.svg deleted file mode 100644 index 7bd46d8a..00000000 --- a/src/main/resources/html/icons/delete-icon_dark.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/main/resources/html/index.html b/src/main/resources/html/index.html deleted file mode 100644 index 6752198e..00000000 --- a/src/main/resources/html/index.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - - - - - diff --git a/src/main/resources/html/js/main.js b/src/main/resources/html/js/main.js deleted file mode 100644 index 36cfbea4..00000000 --- a/src/main/resources/html/js/main.js +++ /dev/null @@ -1,124 +0,0 @@ -function scrollToBottom() { - window.scrollTo({ - top: document.body.scrollHeight, - behavior: 'smooth' - }); -} - -window.CodeGPTBridge = { - displayLandingView: function () { - const wrapper = document.createElement('div'); - wrapper.setAttribute('id', 'landing-view'); - wrapper.appendChild(createElement({ - tagName: 'div', innerHTML: "

    Examples

    " + - "\"How do I make an HTTP request in Javascript?\"" + - "\"What is the difference between px, dip, dp, and sp?\"" + - "\"How do I undo the most recent local commits in Git?\"" + - "\"What is the difference between stack and heap?\"" - })); - document.body.appendChild(wrapper); - }, - prepareMessage: function (messageId) { - const wrapper = createElement({tagName: 'div', className: 'message'}); - wrapper.setAttribute("id", messageId); - document.body.appendChild(wrapper); - }, - displayUserMessage: function (messageId, accountName, htmlMessage, deleteSvgIcon) { - document.getElementById("landing-view")?.remove(); - - const deleteButton = createElement({tagName: 'button', className: 'delete-button', innerHTML: deleteSvgIcon}); - deleteButton.addEventListener("click", function () { - window.JavaPanelBridge.deleteMessage(messageId) - }); - - const nameWrapper = createElement({tagName: 'p', className: 'user-message-name-wrapper'}); - nameWrapper.appendChild(createElement({tagName: 'span', textContent: accountName})); - nameWrapper.appendChild(deleteButton); - - const wrapper = createElement({tagName: 'div', className: 'user-message'}); - wrapper.appendChild(nameWrapper); - wrapper.appendChild(createElement({tagName: 'div', className: 'user-prompt', innerHTML: htmlMessage})); - - document.getElementById(messageId)?.appendChild(wrapper); - scrollToBottom(); - Prism.highlightAll(); - }, - displayErrorMessage: function (responseId, errorMsgHtml) { - document.getElementById("empty-response")?.remove(); - document.getElementById(responseId).appendChild(createElement({tagName: 'p', innerHTML: errorMsgHtml})); - }, - displayMissingCredential: function (responseId) { - const responseWrapper = document.getElementById(responseId); - // TODO: Add anchor link for opening the settings panel - responseWrapper.innerHTML = "

    API key not provided.

    "; - }, - displayResponse: function (messageId, responseId, animate, svgIcon) { - const wrapper = createElement({tagName: 'div', className: 'response'}) - - const iconLabelContainer = document.createElement('p'); - - const svgWrapper = createElement({tagName: 'span', className: 'icon-wrapper', innerHTML: svgIcon}); - if (animate) { - svgWrapper.style.animation = 'roll 2.4s infinite linear'; - } - iconLabelContainer.appendChild(svgWrapper); - const label = document.createElement('strong'); - label.textContent = 'CodeGPT'; - iconLabelContainer.appendChild(label); - wrapper.appendChild(iconLabelContainer); - - const responseWrapper = createElement({tagName: 'div', innerHTML: "

    "}) - responseWrapper.setAttribute('id', responseId); - wrapper.appendChild(responseWrapper); - document.getElementById(messageId)?.appendChild(wrapper); - scrollToBottom(); - }, - clearResponse: function (responseId) { - const responseWrapper = document.getElementById(responseId); - responseWrapper.innerHTML = "

    " - }, - replaceResponseContent: function (responseId, htmlContent) { - const responseWrapper = document.getElementById(responseId); - responseWrapper.innerHTML = htmlContent; - scrollToBottom(); - Prism.highlightAll(); - }, - updateRegenerateButton: function (title, isDisabled) { - const buttons = document.getElementsByClassName('replace-button'); - for (let i = 0; i < buttons.length; i++) { - buttons[i].disabled = isDisabled; - buttons[i].title = title; - } - }, - animateCodeGPTSvg: function (responseId) { - const response = document.getElementById(responseId); - const svg = response.parentElement.getElementsByClassName('icon-wrapper')[0]; - svg.style.animation = 'roll 2.4s infinite linear'; - }, - stopTyping: function () { - const icons = Array.from(document.getElementsByClassName('icon-wrapper')); - for (const icon of icons) { - icon.style = null; - } - }, - deleteMessage: function (messageId) { - document.getElementById(messageId)?.remove(); - if (document.getElementsByClassName('message').length === 0) { - this.displayLandingView(); - } - } -} - -const createElement = (props) => { - const element = document.createElement(props.tagName); - if (props.className) { - element.classList.add(props.className); - } - if (props.innerHTML) { - element.innerHTML = props.innerHTML; - } - if (props.textContent) { - element.textContent = props.textContent; - } - return element; -} diff --git a/src/main/resources/icons/chatgpt-icon.png b/src/main/resources/icons/chatgpt.png similarity index 100% rename from src/main/resources/icons/chatgpt-icon.png rename to src/main/resources/icons/chatgpt.png diff --git a/src/main/resources/icons/codegpt-icon.svg b/src/main/resources/icons/codegpt-icon.svg deleted file mode 100644 index add6fe9d..00000000 --- a/src/main/resources/icons/codegpt-icon.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/main/resources/icons/codegpt-icon_dark.svg b/src/main/resources/icons/codegpt-icon_dark.svg deleted file mode 100644 index fa4d21e6..00000000 --- a/src/main/resources/icons/codegpt-icon_dark.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/main/resources/icons/toolwindow-icon.svg b/src/main/resources/icons/codegpt-small.svg similarity index 100% rename from src/main/resources/icons/toolwindow-icon.svg rename to src/main/resources/icons/codegpt-small.svg diff --git a/src/main/resources/icons/toolwindow-icon_dark.svg b/src/main/resources/icons/codegpt-small_dark.svg similarity index 100% rename from src/main/resources/icons/toolwindow-icon_dark.svg rename to src/main/resources/icons/codegpt-small_dark.svg diff --git a/src/main/resources/html/icons/codegpt-icon.svg b/src/main/resources/icons/codegpt.svg similarity index 100% rename from src/main/resources/html/icons/codegpt-icon.svg rename to src/main/resources/icons/codegpt.svg diff --git a/src/main/resources/html/icons/codegpt-icon_dark.svg b/src/main/resources/icons/codegpt_dark.svg similarity index 100% rename from src/main/resources/html/icons/codegpt-icon_dark.svg rename to src/main/resources/icons/codegpt_dark.svg diff --git a/src/main/resources/icons/send-icon.png b/src/main/resources/icons/send-icon.png deleted file mode 100644 index c604bbae..00000000 Binary files a/src/main/resources/icons/send-icon.png and /dev/null differ diff --git a/src/main/resources/icons/send.svg b/src/main/resources/icons/send.svg new file mode 100644 index 00000000..89cf3907 --- /dev/null +++ b/src/main/resources/icons/send.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/resources/icons/send_dark.svg b/src/main/resources/icons/send_dark.svg new file mode 100644 index 00000000..5dd4ba3b --- /dev/null +++ b/src/main/resources/icons/send_dark.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/resources/icons/sun-icon.png b/src/main/resources/icons/sun-icon.png deleted file mode 100644 index d8a44b77..00000000 Binary files a/src/main/resources/icons/sun-icon.png and /dev/null differ diff --git a/src/main/resources/languageFileExtensionMappings.json b/src/main/resources/languageFileExtensionMappings.json new file mode 100644 index 00000000..cf0ec584 --- /dev/null +++ b/src/main/resources/languageFileExtensionMappings.json @@ -0,0 +1,3377 @@ +[ + { + "name": "ABAP", + "type": "programming", + "extensions": [ + ".abap" + ] + }, + { + "name": "AGS Script", + "type": "programming", + "extensions": [ + ".asc", + ".ash" + ] + }, + { + "name": "AMPL", + "type": "programming", + "extensions": [ + ".ampl", + ".mod" + ] + }, + { + "name": "ANTLR", + "type": "programming", + "extensions": [ + ".g4" + ] + }, + { + "name": "API Blueprint", + "type": "markup", + "extensions": [ + ".apib" + ] + }, + { + "name": "APL", + "type": "programming", + "extensions": [ + ".apl", + ".dyalog" + ] + }, + { + "name": "ASP", + "type": "programming", + "extensions": [ + ".asp", + ".asax", + ".ascx", + ".ashx", + ".asmx", + ".aspx", + ".axd" + ] + }, + { + "name": "ATS", + "type": "programming", + "extensions": [ + ".dats", + ".hats", + ".sats" + ] + }, + { + "name": "ActionScript", + "type": "programming", + "extensions": [ + ".as" + ] + }, + { + "name": "Ada", + "type": "programming", + "extensions": [ + ".adb", + ".ada", + ".ads" + ] + }, + { + "name": "Agda", + "type": "programming", + "extensions": [ + ".agda" + ] + }, + { + "name": "Alloy", + "type": "programming", + "extensions": [ + ".als" + ] + }, + { + "name": "Ant Build System", + "type": "data" + }, + { + "name": "ApacheConf", + "type": "markup", + "extensions": [ + ".apacheconf", + ".vhost" + ] + }, + { + "name": "Apex", + "type": "programming", + "extensions": [ + ".cls" + ] + }, + { + "name": "AppleScript", + "type": "programming", + "extensions": [ + ".applescript", + ".scpt" + ] + }, + { + "name": "Arc", + "type": "programming", + "extensions": [ + ".arc" + ] + }, + { + "name": "Arduino", + "type": "programming", + "extensions": [ + ".ino" + ] + }, + { + "name": "AsciiDoc", + "type": "prose", + "extensions": [ + ".asciidoc", + ".adoc", + ".asc" + ] + }, + { + "name": "AspectJ", + "type": "programming", + "extensions": [ + ".aj" + ] + }, + { + "name": "Assembly", + "type": "programming", + "extensions": [ + ".asm", + ".a51", + ".inc", + ".nasm" + ] + }, + { + "name": "Augeas", + "type": "programming", + "extensions": [ + ".aug" + ] + }, + { + "name": "AutoHotkey", + "type": "programming", + "extensions": [ + ".ahk", + ".ahkl" + ] + }, + { + "name": "AutoIt", + "type": "programming", + "extensions": [ + ".au3" + ] + }, + { + "name": "Awk", + "type": "programming", + "extensions": [ + ".awk", + ".auk", + ".gawk", + ".mawk", + ".nawk" + ] + }, + { + "name": "Batchfile", + "type": "programming", + "extensions": [ + ".bat", + ".cmd" + ] + }, + { + "name": "Befunge", + "type": "programming", + "extensions": [ + ".befunge" + ] + }, + { + "name": "Bison", + "type": "programming", + "extensions": [ + ".bison" + ] + }, + { + "name": "BitBake", + "type": "programming", + "extensions": [ + ".bb" + ] + }, + { + "name": "BlitzBasic", + "type": "programming", + "extensions": [ + ".bb", + ".decls" + ] + }, + { + "name": "BlitzMax", + "type": "programming", + "extensions": [ + ".bmx" + ] + }, + { + "name": "Bluespec", + "type": "programming", + "extensions": [ + ".bsv" + ] + }, + { + "name": "Boo", + "type": "programming", + "extensions": [ + ".boo" + ] + }, + { + "name": "Brainfuck", + "type": "programming", + "extensions": [ + ".b", + ".bf" + ] + }, + { + "name": "Brightscript", + "type": "programming", + "extensions": [ + ".brs" + ] + }, + { + "name": "Bro", + "type": "programming", + "extensions": [ + ".bro" + ] + }, + { + "name": "C", + "type": "programming", + "extensions": [ + ".c", + ".cats", + ".h", + ".idc", + ".w" + ] + }, + { + "name": "C#", + "type": "programming", + "extensions": [ + ".cs", + ".cake", + ".cshtml", + ".csx" + ] + }, + { + "name": "C++", + "type": "programming", + "extensions": [ + ".cpp", + ".c++", + ".cc", + ".cp", + ".cxx", + ".h", + ".h++", + ".hh", + ".hpp", + ".hxx", + ".inc", + ".inl", + ".ipp", + ".tcc", + ".tpp" + ] + }, + { + "name": "C-ObjDump", + "type": "data", + "extensions": [ + ".c-objdump" + ] + }, + { + "name": "C2hs Haskell", + "type": "programming", + "extensions": [ + ".chs" + ] + }, + { + "name": "CLIPS", + "type": "programming", + "extensions": [ + ".clp" + ] + }, + { + "name": "CMake", + "type": "programming", + "extensions": [ + ".cmake", + ".cmake.in" + ] + }, + { + "name": "COBOL", + "type": "programming", + "extensions": [ + ".cob", + ".cbl", + ".ccp", + ".cobol", + ".cpy" + ] + }, + { + "name": "CSS", + "type": "markup", + "extensions": [ + ".css" + ] + }, + { + "name": "CSV", + "type": "data", + "extensions": [ + ".csv" + ] + }, + { + "name": "Cap'n Proto", + "type": "programming", + "extensions": [ + ".capnp" + ] + }, + { + "name": "CartoCSS", + "type": "programming", + "extensions": [ + ".mss" + ] + }, + { + "name": "Ceylon", + "type": "programming", + "extensions": [ + ".ceylon" + ] + }, + { + "name": "Chapel", + "type": "programming", + "extensions": [ + ".chpl" + ] + }, + { + "name": "Charity", + "type": "programming", + "extensions": [ + ".ch" + ] + }, + { + "name": "ChucK", + "type": "programming", + "extensions": [ + ".ck" + ] + }, + { + "name": "Cirru", + "type": "programming", + "extensions": [ + ".cirru" + ] + }, + { + "name": "Clarion", + "type": "programming", + "extensions": [ + ".clw" + ] + }, + { + "name": "Clean", + "type": "programming", + "extensions": [ + ".icl", + ".dcl" + ] + }, + { + "name": "Click", + "type": "programming", + "extensions": [ + ".click" + ] + }, + { + "name": "Clojure", + "type": "programming", + "extensions": [ + ".clj", + ".boot", + ".cl2", + ".cljc", + ".cljs", + ".cljs.hl", + ".cljscm", + ".cljx", + ".hic" + ] + }, + { + "name": "CoffeeScript", + "type": "programming", + "extensions": [ + ".coffee", + "._coffee", + ".cake", + ".cjsx", + ".cson", + ".iced" + ] + }, + { + "name": "ColdFusion", + "type": "programming", + "extensions": [ + ".cfm", + ".cfml" + ] + }, + { + "name": "ColdFusion CFC", + "type": "programming", + "extensions": [ + ".cfc" + ] + }, + { + "name": "Common Lisp", + "type": "programming", + "extensions": [ + ".lisp", + ".asd", + ".cl", + ".l", + ".lsp", + ".ny", + ".podsl", + ".sexp" + ] + }, + { + "name": "Component Pascal", + "type": "programming", + "extensions": [ + ".cp", + ".cps" + ] + }, + { + "name": "Cool", + "type": "programming", + "extensions": [ + ".cl" + ] + }, + { + "name": "Coq", + "type": "programming", + "extensions": [ + ".coq", + ".v" + ] + }, + { + "name": "Cpp-ObjDump", + "type": "data", + "extensions": [ + ".cppobjdump", + ".c++-objdump", + ".c++objdump", + ".cpp-objdump", + ".cxx-objdump" + ] + }, + { + "name": "Creole", + "type": "prose", + "extensions": [ + ".creole" + ] + }, + { + "name": "Crystal", + "type": "programming", + "extensions": [ + ".cr" + ] + }, + { + "name": "Cucumber", + "type": "programming", + "extensions": [ + ".feature" + ] + }, + { + "name": "Cuda", + "type": "programming", + "extensions": [ + ".cu", + ".cuh" + ] + }, + { + "name": "Cycript", + "type": "programming", + "extensions": [ + ".cy" + ] + }, + { + "name": "Cython", + "type": "programming", + "extensions": [ + ".pyx", + ".pxd", + ".pxi" + ] + }, + { + "name": "D", + "type": "programming", + "extensions": [ + ".d", + ".di" + ] + }, + { + "name": "D-ObjDump", + "type": "data", + "extensions": [ + ".d-objdump" + ] + }, + { + "name": "DIGITAL Command Language", + "type": "programming", + "extensions": [ + ".com" + ] + }, + { + "name": "DM", + "type": "programming", + "extensions": [ + ".dm" + ] + }, + { + "name": "DNS Zone", + "type": "data", + "extensions": [ + ".zone", + ".arpa" + ] + }, + { + "name": "DTrace", + "type": "programming", + "extensions": [ + ".d" + ] + }, + { + "name": "Darcs Patch", + "type": "data", + "extensions": [ + ".darcspatch", + ".dpatch" + ] + }, + { + "name": "Dart", + "type": "programming", + "extensions": [ + ".dart" + ] + }, + { + "name": "Diff", + "type": "data", + "extensions": [ + ".diff", + ".patch" + ] + }, + { + "name": "Dockerfile", + "type": "data", + "extensions": [ + ".dockerfile" + ] + }, + { + "name": "Dogescript", + "type": "programming", + "extensions": [ + ".djs" + ] + }, + { + "name": "Dylan", + "type": "programming", + "extensions": [ + ".dylan", + ".dyl", + ".intr", + ".lid" + ] + }, + { + "name": "E", + "type": "programming", + "extensions": [ + ".E" + ] + }, + { + "name": "ECL", + "type": "programming", + "extensions": [ + ".ecl", + ".eclxml" + ] + }, + { + "name": "ECLiPSe", + "type": "programming", + "extensions": [ + ".ecl" + ] + }, + { + "name": "Eagle", + "type": "markup", + "extensions": [ + ".sch", + ".brd" + ] + }, + { + "name": "Ecere Projects", + "type": "data", + "extensions": [ + ".epj" + ] + }, + { + "name": "Eiffel", + "type": "programming", + "extensions": [ + ".e" + ] + }, + { + "name": "Elixir", + "type": "programming", + "extensions": [ + ".ex", + ".exs" + ] + }, + { + "name": "Elm", + "type": "programming", + "extensions": [ + ".elm" + ] + }, + { + "name": "Emacs Lisp", + "type": "programming", + "extensions": [ + ".el", + ".emacs", + ".emacs.desktop" + ] + }, + { + "name": "EmberScript", + "type": "programming", + "extensions": [ + ".em", + ".emberscript" + ] + }, + { + "name": "Erlang", + "type": "programming", + "extensions": [ + ".erl", + ".es", + ".escript", + ".hrl", + ".xrl", + ".yrl" + ] + }, + { + "name": "F#", + "type": "programming", + "extensions": [ + ".fs", + ".fsi", + ".fsx" + ] + }, + { + "name": "FLUX", + "type": "programming", + "extensions": [ + ".fx", + ".flux" + ] + }, + { + "name": "FORTRAN", + "type": "programming", + "extensions": [ + ".f90", + ".f", + ".f03", + ".f08", + ".f77", + ".f95", + ".for", + ".fpp" + ] + }, + { + "name": "Factor", + "type": "programming", + "extensions": [ + ".factor" + ] + }, + { + "name": "Fancy", + "type": "programming", + "extensions": [ + ".fy", + ".fancypack" + ] + }, + { + "name": "Fantom", + "type": "programming", + "extensions": [ + ".fan" + ] + }, + { + "name": "Filterscript", + "type": "programming", + "extensions": [ + ".fs" + ] + }, + { + "name": "Formatted", + "type": "data", + "extensions": [ + ".for", + ".eam.fs" + ] + }, + { + "name": "Forth", + "type": "programming", + "extensions": [ + ".fth", + ".4th", + ".f", + ".for", + ".forth", + ".fr", + ".frt", + ".fs" + ] + }, + { + "name": "FreeMarker", + "type": "programming", + "extensions": [ + ".ftl" + ] + }, + { + "name": "Frege", + "type": "programming", + "extensions": [ + ".fr" + ] + }, + { + "name": "G-code", + "type": "data", + "extensions": [ + ".g", + ".gco", + ".gcode" + ] + }, + { + "name": "GAMS", + "type": "programming", + "extensions": [ + ".gms" + ] + }, + { + "name": "GAP", + "type": "programming", + "extensions": [ + ".g", + ".gap", + ".gd", + ".gi", + ".tst" + ] + }, + { + "name": "GAS", + "type": "programming", + "extensions": [ + ".s", + ".ms" + ] + }, + { + "name": "GDScript", + "type": "programming", + "extensions": [ + ".gd" + ] + }, + { + "name": "GLSL", + "type": "programming", + "extensions": [ + ".glsl", + ".fp", + ".frag", + ".frg", + ".fs", + ".fsh", + ".fshader", + ".geo", + ".geom", + ".glslv", + ".gshader", + ".shader", + ".vert", + ".vrx", + ".vsh", + ".vshader" + ] + }, + { + "name": "Game Maker Language", + "type": "programming", + "extensions": [ + ".gml" + ] + }, + { + "name": "Genshi", + "type": "programming", + "extensions": [ + ".kid" + ] + }, + { + "name": "Gentoo Ebuild", + "type": "programming", + "extensions": [ + ".ebuild" + ] + }, + { + "name": "Gentoo Eclass", + "type": "programming", + "extensions": [ + ".eclass" + ] + }, + { + "name": "Gettext Catalog", + "type": "prose", + "extensions": [ + ".po", + ".pot" + ] + }, + { + "name": "Glyph", + "type": "programming", + "extensions": [ + ".glf" + ] + }, + { + "name": "Gnuplot", + "type": "programming", + "extensions": [ + ".gp", + ".gnu", + ".gnuplot", + ".plot", + ".plt" + ] + }, + { + "name": "Go", + "type": "programming", + "extensions": [ + ".go" + ] + }, + { + "name": "Golo", + "type": "programming", + "extensions": [ + ".golo" + ] + }, + { + "name": "Gosu", + "type": "programming", + "extensions": [ + ".gs", + ".gst", + ".gsx", + ".vark" + ] + }, + { + "name": "Grace", + "type": "programming", + "extensions": [ + ".grace" + ] + }, + { + "name": "Gradle", + "type": "data", + "extensions": [ + ".gradle" + ] + }, + { + "name": "Grammatical Framework", + "type": "programming", + "extensions": [ + ".gf" + ] + }, + { + "name": "Graph Modeling Language", + "type": "data", + "extensions": [ + ".gml" + ] + }, + { + "name": "GraphQL", + "type": "data", + "extensions": [ + ".graphql" + ] + }, + { + "name": "Graphviz (DOT)", + "type": "data", + "extensions": [ + ".dot", + ".gv" + ] + }, + { + "name": "Groff", + "type": "markup", + "extensions": [ + ".man", + ".1", + ".1in", + ".1m", + ".1x", + ".2", + ".3", + ".3in", + ".3m", + ".3qt", + ".3x", + ".4", + ".5", + ".6", + ".7", + ".8", + ".9", + ".l", + ".me", + ".ms", + ".n", + ".rno", + ".roff" + ] + }, + { + "name": "Groovy", + "type": "programming", + "extensions": [ + ".groovy", + ".grt", + ".gtpl", + ".gvy" + ] + }, + { + "name": "Groovy Server Pages", + "type": "programming", + "extensions": [ + ".gsp" + ] + }, + { + "name": "HCL", + "type": "programming", + "extensions": [ + ".hcl", + ".tf" + ] + }, + { + "name": "HLSL", + "type": "programming", + "extensions": [ + ".hlsl", + ".fx", + ".fxh", + ".hlsli" + ] + }, + { + "name": "HTML", + "type": "markup", + "extensions": [ + ".html", + ".htm", + ".html.hl", + ".inc", + ".st", + ".xht", + ".xhtml" + ] + }, + { + "name": "HTML+Django", + "type": "markup", + "extensions": [ + ".mustache", + ".jinja" + ] + }, + { + "name": "HTML+EEX", + "type": "markup", + "extensions": [ + ".eex" + ] + }, + { + "name": "HTML+ERB", + "type": "markup", + "extensions": [ + ".erb", + ".erb.deface" + ] + }, + { + "name": "HTML+PHP", + "type": "markup", + "extensions": [ + ".phtml" + ] + }, + { + "name": "HTTP", + "type": "data", + "extensions": [ + ".http" + ] + }, + { + "name": "Hack", + "type": "programming", + "extensions": [ + ".hh", + ".php" + ] + }, + { + "name": "Haml", + "type": "markup", + "extensions": [ + ".haml", + ".haml.deface" + ] + }, + { + "name": "Handlebars", + "type": "markup", + "extensions": [ + ".handlebars", + ".hbs" + ] + }, + { + "name": "Harbour", + "type": "programming", + "extensions": [ + ".hb" + ] + }, + { + "name": "Haskell", + "type": "programming", + "extensions": [ + ".hs", + ".hsc" + ] + }, + { + "name": "Haxe", + "type": "programming", + "extensions": [ + ".hx", + ".hxsl" + ] + }, + { + "name": "Hy", + "type": "programming", + "extensions": [ + ".hy" + ] + }, + { + "name": "HyPhy", + "type": "programming", + "extensions": [ + ".bf" + ] + }, + { + "name": "IDL", + "type": "programming", + "extensions": [ + ".pro", + ".dlm" + ] + }, + { + "name": "IGOR Pro", + "type": "programming", + "extensions": [ + ".ipf" + ] + }, + { + "name": "INI", + "type": "data", + "extensions": [ + ".ini", + ".cfg", + ".prefs", + ".pro", + ".properties" + ] + }, + { + "name": "IRC log", + "type": "data", + "extensions": [ + ".irclog", + ".weechatlog" + ] + }, + { + "name": "Idris", + "type": "programming", + "extensions": [ + ".idr", + ".lidr" + ] + }, + { + "name": "Inform 7", + "type": "programming", + "extensions": [ + ".ni", + ".i7x" + ] + }, + { + "name": "Inno Setup", + "type": "programming", + "extensions": [ + ".iss" + ] + }, + { + "name": "Io", + "type": "programming", + "extensions": [ + ".io" + ] + }, + { + "name": "Ioke", + "type": "programming", + "extensions": [ + ".ik" + ] + }, + { + "name": "Isabelle", + "type": "programming", + "extensions": [ + ".thy" + ] + }, + { + "name": "Isabelle ROOT", + "type": "programming" + }, + { + "name": "J", + "type": "programming", + "extensions": [ + ".ijs" + ] + }, + { + "name": "JFlex", + "type": "programming", + "extensions": [ + ".flex", + ".jflex" + ] + }, + { + "name": "JSON", + "type": "data", + "extensions": [ + ".json", + ".geojson", + ".lock", + ".topojson" + ] + }, + { + "name": "JSON5", + "type": "data", + "extensions": [ + ".json5" + ] + }, + { + "name": "JSONLD", + "type": "data", + "extensions": [ + ".jsonld" + ] + }, + { + "name": "JSONiq", + "type": "programming", + "extensions": [ + ".jq" + ] + }, + { + "name": "JSX", + "type": "programming", + "extensions": [ + ".jsx" + ] + }, + { + "name": "Jade", + "type": "markup", + "extensions": [ + ".jade" + ] + }, + { + "name": "Jasmin", + "type": "programming", + "extensions": [ + ".j" + ] + }, + { + "name": "Java", + "type": "programming", + "extensions": [ + ".java" + ] + }, + { + "name": "Java Server Pages", + "type": "programming", + "extensions": [ + ".jsp" + ] + }, + { + "name": "JavaScript", + "type": "programming", + "extensions": [ + ".js", + "._js", + ".bones", + ".es", + ".es6", + ".frag", + ".gs", + ".jake", + ".jsb", + ".jscad", + ".jsfl", + ".jsm", + ".jss", + ".njs", + ".pac", + ".sjs", + ".ssjs", + ".sublime-build", + ".sublime-commands", + ".sublime-completions", + ".sublime-keymap", + ".sublime-macro", + ".sublime-menu", + ".sublime-mousemap", + ".sublime-project", + ".sublime-settings", + ".sublime-theme", + ".sublime-workspace", + ".sublime_metrics", + ".sublime_session", + ".xsjs", + ".xsjslib" + ] + }, + { + "name": "Julia", + "type": "programming", + "extensions": [ + ".jl" + ] + }, + { + "name": "Jupyter Notebook", + "type": "markup", + "extensions": [ + ".ipynb" + ] + }, + { + "name": "KRL", + "type": "programming", + "extensions": [ + ".krl" + ] + }, + { + "name": "KiCad", + "type": "programming", + "extensions": [ + ".sch", + ".brd", + ".kicad_pcb" + ] + }, + { + "name": "Kit", + "type": "markup", + "extensions": [ + ".kit" + ] + }, + { + "name": "Kotlin", + "type": "programming", + "extensions": [ + ".kt", + ".ktm", + ".kts" + ] + }, + { + "name": "LFE", + "type": "programming", + "extensions": [ + ".lfe" + ] + }, + { + "name": "LLVM", + "type": "programming", + "extensions": [ + ".ll" + ] + }, + { + "name": "LOLCODE", + "type": "programming", + "extensions": [ + ".lol" + ] + }, + { + "name": "LSL", + "type": "programming", + "extensions": [ + ".lsl", + ".lslp" + ] + }, + { + "name": "LabVIEW", + "type": "programming", + "extensions": [ + ".lvproj" + ] + }, + { + "name": "Lasso", + "type": "programming", + "extensions": [ + ".lasso", + ".las", + ".lasso8", + ".lasso9", + ".ldml" + ] + }, + { + "name": "Latte", + "type": "markup", + "extensions": [ + ".latte" + ] + }, + { + "name": "Lean", + "type": "programming", + "extensions": [ + ".lean", + ".hlean" + ] + }, + { + "name": "Less", + "type": "markup", + "extensions": [ + ".less" + ] + }, + { + "name": "Lex", + "type": "programming", + "extensions": [ + ".l", + ".lex" + ] + }, + { + "name": "LilyPond", + "type": "programming", + "extensions": [ + ".ly", + ".ily" + ] + }, + { + "name": "Limbo", + "type": "programming", + "extensions": [ + ".b", + ".m" + ] + }, + { + "name": "Linker Script", + "type": "data", + "extensions": [ + ".ld", + ".lds" + ] + }, + { + "name": "Linux Kernel Module", + "type": "data", + "extensions": [ + ".mod" + ] + }, + { + "name": "Liquid", + "type": "markup", + "extensions": [ + ".liquid" + ] + }, + { + "name": "Literate Agda", + "type": "programming", + "extensions": [ + ".lagda" + ] + }, + { + "name": "Literate CoffeeScript", + "type": "programming", + "extensions": [ + ".litcoffee" + ] + }, + { + "name": "Literate Haskell", + "type": "programming", + "extensions": [ + ".lhs" + ] + }, + { + "name": "LiveScript", + "type": "programming", + "extensions": [ + ".ls", + "._ls" + ] + }, + { + "name": "Logos", + "type": "programming", + "extensions": [ + ".xm", + ".x", + ".xi" + ] + }, + { + "name": "Logtalk", + "type": "programming", + "extensions": [ + ".lgt", + ".logtalk" + ] + }, + { + "name": "LookML", + "type": "programming", + "extensions": [ + ".lookml" + ] + }, + { + "name": "LoomScript", + "type": "programming", + "extensions": [ + ".ls" + ] + }, + { + "name": "Lua", + "type": "programming", + "extensions": [ + ".lua", + ".fcgi", + ".nse", + ".pd_lua", + ".rbxs", + ".wlua" + ] + }, + { + "name": "M", + "type": "programming", + "extensions": [ + ".mumps", + ".m" + ] + }, + { + "name": "M4", + "type": "programming", + "extensions": [ + ".m4" + ] + }, + { + "name": "M4Sugar", + "type": "programming", + "extensions": [ + ".m4" + ] + }, + { + "name": "MAXScript", + "type": "programming", + "extensions": [ + ".ms", + ".mcr" + ] + }, + { + "name": "MTML", + "type": "markup", + "extensions": [ + ".mtml" + ] + }, + { + "name": "MUF", + "type": "programming", + "extensions": [ + ".muf", + ".m" + ] + }, + { + "name": "Makefile", + "type": "programming", + "extensions": [ + ".mak", + ".d", + ".mk", + ".mkfile" + ] + }, + { + "name": "Mako", + "type": "programming", + "extensions": [ + ".mako", + ".mao" + ] + }, + { + "name": "Markdown", + "type": "prose", + "extensions": [ + ".md", + ".markdown", + ".mkd", + ".mkdn", + ".mkdown", + ".ron" + ] + }, + { + "name": "Mask", + "type": "markup", + "extensions": [ + ".mask" + ] + }, + { + "name": "Mathematica", + "type": "programming", + "extensions": [ + ".mathematica", + ".cdf", + ".m", + ".ma", + ".mt", + ".nb", + ".nbp", + ".wl", + ".wlt" + ] + }, + { + "name": "Matlab", + "type": "programming", + "extensions": [ + ".matlab", + ".m" + ] + }, + { + "name": "Maven POM", + "type": "data" + }, + { + "name": "Max", + "type": "programming", + "extensions": [ + ".maxpat", + ".maxhelp", + ".maxproj", + ".mxt", + ".pat" + ] + }, + { + "name": "MediaWiki", + "type": "prose", + "extensions": [ + ".mediawiki", + ".wiki" + ] + }, + { + "name": "Mercury", + "type": "programming", + "extensions": [ + ".m", + ".moo" + ] + }, + { + "name": "Metal", + "type": "programming", + "extensions": [ + ".metal" + ] + }, + { + "name": "MiniD", + "type": "programming", + "extensions": [ + ".minid" + ] + }, + { + "name": "Mirah", + "type": "programming", + "extensions": [ + ".druby", + ".duby", + ".mir", + ".mirah" + ] + }, + { + "name": "Modelica", + "type": "programming", + "extensions": [ + ".mo" + ] + }, + { + "name": "Modula-2", + "type": "programming", + "extensions": [ + ".mod" + ] + }, + { + "name": "Module Management System", + "type": "programming", + "extensions": [ + ".mms", + ".mmk" + ] + }, + { + "name": "Monkey", + "type": "programming", + "extensions": [ + ".monkey" + ] + }, + { + "name": "Moocode", + "type": "programming", + "extensions": [ + ".moo" + ] + }, + { + "name": "MoonScript", + "type": "programming", + "extensions": [ + ".moon" + ] + }, + { + "name": "Myghty", + "type": "programming", + "extensions": [ + ".myt" + ] + }, + { + "name": "NCL", + "type": "programming", + "extensions": [ + ".ncl" + ] + }, + { + "name": "NL", + "type": "data", + "extensions": [ + ".nl" + ] + }, + { + "name": "NSIS", + "type": "programming", + "extensions": [ + ".nsi", + ".nsh" + ] + }, + { + "name": "Nemerle", + "type": "programming", + "extensions": [ + ".n" + ] + }, + { + "name": "NetLinx", + "type": "programming", + "extensions": [ + ".axs", + ".axi" + ] + }, + { + "name": "NetLinx+ERB", + "type": "programming", + "extensions": [ + ".axs.erb", + ".axi.erb" + ] + }, + { + "name": "NetLogo", + "type": "programming", + "extensions": [ + ".nlogo" + ] + }, + { + "name": "NewLisp", + "type": "programming", + "extensions": [ + ".nl", + ".lisp", + ".lsp" + ] + }, + { + "name": "Nginx", + "type": "markup", + "extensions": [ + ".nginxconf", + ".vhost" + ] + }, + { + "name": "Nimrod", + "type": "programming", + "extensions": [ + ".nim", + ".nimrod" + ] + }, + { + "name": "Ninja", + "type": "data", + "extensions": [ + ".ninja" + ] + }, + { + "name": "Nit", + "type": "programming", + "extensions": [ + ".nit" + ] + }, + { + "name": "Nix", + "type": "programming", + "extensions": [ + ".nix" + ] + }, + { + "name": "Nu", + "type": "programming", + "extensions": [ + ".nu" + ] + }, + { + "name": "NumPy", + "type": "programming", + "extensions": [ + ".numpy", + ".numpyw", + ".numsc" + ] + }, + { + "name": "OCaml", + "type": "programming", + "extensions": [ + ".ml", + ".eliom", + ".eliomi", + ".ml4", + ".mli", + ".mll", + ".mly" + ] + }, + { + "name": "ObjDump", + "type": "data", + "extensions": [ + ".objdump" + ] + }, + { + "name": "Objective-C", + "type": "programming", + "extensions": [ + ".m", + ".h" + ] + }, + { + "name": "Objective-C++", + "type": "programming", + "extensions": [ + ".mm" + ] + }, + { + "name": "Objective-J", + "type": "programming", + "extensions": [ + ".j", + ".sj" + ] + }, + { + "name": "Omgrofl", + "type": "programming", + "extensions": [ + ".omgrofl" + ] + }, + { + "name": "Opa", + "type": "programming", + "extensions": [ + ".opa" + ] + }, + { + "name": "Opal", + "type": "programming", + "extensions": [ + ".opal" + ] + }, + { + "name": "OpenCL", + "type": "programming", + "extensions": [ + ".cl", + ".opencl" + ] + }, + { + "name": "OpenEdge ABL", + "type": "programming", + "extensions": [ + ".p", + ".cls" + ] + }, + { + "name": "OpenSCAD", + "type": "programming", + "extensions": [ + ".scad" + ] + }, + { + "name": "Org", + "type": "prose", + "extensions": [ + ".org" + ] + }, + { + "name": "Ox", + "type": "programming", + "extensions": [ + ".ox", + ".oxh", + ".oxo" + ] + }, + { + "name": "Oxygene", + "type": "programming", + "extensions": [ + ".oxygene" + ] + }, + { + "name": "Oz", + "type": "programming", + "extensions": [ + ".oz" + ] + }, + { + "name": "PAWN", + "type": "programming", + "extensions": [ + ".pwn", + ".inc" + ] + }, + { + "name": "PHP", + "type": "programming", + "extensions": [ + ".php", + ".aw", + ".ctp", + ".fcgi", + ".inc", + ".php3", + ".php4", + ".php5", + ".phps", + ".phpt" + ] + }, + { + "name": "PLSQL", + "type": "programming", + "extensions": [ + ".pls", + ".pck", + ".pkb", + ".pks", + ".plb", + ".plsql", + ".sql" + ] + }, + { + "name": "PLpgSQL", + "type": "programming", + "extensions": [ + ".sql" + ] + }, + { + "name": "POV-Ray SDL", + "type": "programming", + "extensions": [ + ".pov", + ".inc" + ] + }, + { + "name": "Pan", + "type": "programming", + "extensions": [ + ".pan" + ] + }, + { + "name": "Papyrus", + "type": "programming", + "extensions": [ + ".psc" + ] + }, + { + "name": "Parrot", + "type": "programming", + "extensions": [ + ".parrot" + ] + }, + { + "name": "Parrot Assembly", + "type": "programming", + "extensions": [ + ".pasm" + ] + }, + { + "name": "Parrot Internal Representation", + "type": "programming", + "extensions": [ + ".pir" + ] + }, + { + "name": "Pascal", + "type": "programming", + "extensions": [ + ".pas", + ".dfm", + ".dpr", + ".inc", + ".lpr", + ".pp" + ] + }, + { + "name": "Perl", + "type": "programming", + "extensions": [ + ".pl", + ".al", + ".cgi", + ".fcgi", + ".perl", + ".ph", + ".plx", + ".pm", + ".pod", + ".psgi", + ".t" + ] + }, + { + "name": "Perl6", + "type": "programming", + "extensions": [ + ".6pl", + ".6pm", + ".nqp", + ".p6", + ".p6l", + ".p6m", + ".pl", + ".pl6", + ".pm", + ".pm6", + ".t" + ] + }, + { + "name": "Pickle", + "type": "data", + "extensions": [ + ".pkl" + ] + }, + { + "name": "PicoLisp", + "type": "programming", + "extensions": [ + ".l" + ] + }, + { + "name": "PigLatin", + "type": "programming", + "extensions": [ + ".pig" + ] + }, + { + "name": "Pike", + "type": "programming", + "extensions": [ + ".pike", + ".pmod" + ] + }, + { + "name": "Pod", + "type": "prose", + "extensions": [ + ".pod" + ] + }, + { + "name": "PogoScript", + "type": "programming", + "extensions": [ + ".pogo" + ] + }, + { + "name": "Pony", + "type": "programming", + "extensions": [ + ".pony" + ] + }, + { + "name": "PostScript", + "type": "markup", + "extensions": [ + ".ps", + ".eps" + ] + }, + { + "name": "PowerShell", + "type": "programming", + "extensions": [ + ".ps1", + ".psd1", + ".psm1" + ] + }, + { + "name": "Processing", + "type": "programming", + "extensions": [ + ".pde" + ] + }, + { + "name": "Prolog", + "type": "programming", + "extensions": [ + ".pl", + ".pro", + ".prolog", + ".yap" + ] + }, + { + "name": "Propeller Spin", + "type": "programming", + "extensions": [ + ".spin" + ] + }, + { + "name": "Protocol Buffer", + "type": "markup", + "extensions": [ + ".proto" + ] + }, + { + "name": "Public Key", + "type": "data", + "extensions": [ + ".asc", + ".pub" + ] + }, + { + "name": "Puppet", + "type": "programming", + "extensions": [ + ".pp" + ] + }, + { + "name": "Pure Data", + "type": "programming", + "extensions": [ + ".pd" + ] + }, + { + "name": "PureBasic", + "type": "programming", + "extensions": [ + ".pb", + ".pbi" + ] + }, + { + "name": "PureScript", + "type": "programming", + "extensions": [ + ".purs" + ] + }, + { + "name": "Python", + "type": "programming", + "extensions": [ + ".py", + ".bzl", + ".cgi", + ".fcgi", + ".gyp", + ".lmi", + ".pyde", + ".pyp", + ".pyt", + ".pyw", + ".rpy", + ".tac", + ".wsgi", + ".xpy" + ] + }, + { + "name": "Python traceback", + "type": "data", + "extensions": [ + ".pytb" + ] + }, + { + "name": "QML", + "type": "programming", + "extensions": [ + ".qml", + ".qbs" + ] + }, + { + "name": "QMake", + "type": "programming", + "extensions": [ + ".pro", + ".pri" + ] + }, + { + "name": "R", + "type": "programming", + "extensions": [ + ".r", + ".rd", + ".rsx" + ] + }, + { + "name": "RAML", + "type": "markup", + "extensions": [ + ".raml" + ] + }, + { + "name": "RDoc", + "type": "prose", + "extensions": [ + ".rdoc" + ] + }, + { + "name": "REALbasic", + "type": "programming", + "extensions": [ + ".rbbas", + ".rbfrm", + ".rbmnu", + ".rbres", + ".rbtbar", + ".rbuistate" + ] + }, + { + "name": "RHTML", + "type": "markup", + "extensions": [ + ".rhtml" + ] + }, + { + "name": "RMarkdown", + "type": "prose", + "extensions": [ + ".rmd" + ] + }, + { + "name": "Racket", + "type": "programming", + "extensions": [ + ".rkt", + ".rktd", + ".rktl", + ".scrbl" + ] + }, + { + "name": "Ragel in Ruby Host", + "type": "programming", + "extensions": [ + ".rl" + ] + }, + { + "name": "Raw token data", + "type": "data", + "extensions": [ + ".raw" + ] + }, + { + "name": "Rebol", + "type": "programming", + "extensions": [ + ".reb", + ".r", + ".r2", + ".r3", + ".rebol" + ] + }, + { + "name": "Red", + "type": "programming", + "extensions": [ + ".red", + ".reds" + ] + }, + { + "name": "Redcode", + "type": "programming", + "extensions": [ + ".cw" + ] + }, + { + "name": "Ren'Py", + "type": "programming", + "extensions": [ + ".rpy" + ] + }, + { + "name": "RenderScript", + "type": "programming", + "extensions": [ + ".rs", + ".rsh" + ] + }, + { + "name": "RobotFramework", + "type": "programming", + "extensions": [ + ".robot" + ] + }, + { + "name": "Rouge", + "type": "programming", + "extensions": [ + ".rg" + ] + }, + { + "name": "Ruby", + "type": "programming", + "extensions": [ + ".rb", + ".builder", + ".fcgi", + ".gemspec", + ".god", + ".irbrc", + ".jbuilder", + ".mspec", + ".pluginspec", + ".podspec", + ".rabl", + ".rake", + ".rbuild", + ".rbw", + ".rbx", + ".ru", + ".ruby", + ".thor", + ".watchr" + ] + }, + { + "name": "Rust", + "type": "programming", + "extensions": [ + ".rs", + ".rs.in" + ] + }, + { + "name": "SAS", + "type": "programming", + "extensions": [ + ".sas" + ] + }, + { + "name": "SCSS", + "type": "markup", + "extensions": [ + ".scss" + ] + }, + { + "name": "SMT", + "type": "programming", + "extensions": [ + ".smt2", + ".smt" + ] + }, + { + "name": "SPARQL", + "type": "data", + "extensions": [ + ".sparql", + ".rq" + ] + }, + { + "name": "SQF", + "type": "programming", + "extensions": [ + ".sqf", + ".hqf" + ] + }, + { + "name": "SQL", + "type": "data", + "extensions": [ + ".sql", + ".cql", + ".ddl", + ".inc", + ".prc", + ".tab", + ".udf", + ".viw" + ] + }, + { + "name": "SQLPL", + "type": "programming", + "extensions": [ + ".sql", + ".db2" + ] + }, + { + "name": "STON", + "type": "data", + "extensions": [ + ".ston" + ] + }, + { + "name": "SVG", + "type": "data", + "extensions": [ + ".svg" + ] + }, + { + "name": "Sage", + "type": "programming", + "extensions": [ + ".sage", + ".sagews" + ] + }, + { + "name": "SaltStack", + "type": "programming", + "extensions": [ + ".sls" + ] + }, + { + "name": "Sass", + "type": "markup", + "extensions": [ + ".sass" + ] + }, + { + "name": "Scala", + "type": "programming", + "extensions": [ + ".scala", + ".sbt", + ".sc" + ] + }, + { + "name": "Scaml", + "type": "markup", + "extensions": [ + ".scaml" + ] + }, + { + "name": "Scheme", + "type": "programming", + "extensions": [ + ".scm", + ".sld", + ".sls", + ".sps", + ".ss" + ] + }, + { + "name": "Scilab", + "type": "programming", + "extensions": [ + ".sci", + ".sce", + ".tst" + ] + }, + { + "name": "Self", + "type": "programming", + "extensions": [ + ".self" + ] + }, + { + "name": "Shell", + "type": "programming", + "extensions": [ + ".sh", + ".bash", + ".bats", + ".cgi", + ".command", + ".fcgi", + ".ksh", + ".sh.in", + ".tmux", + ".tool", + ".zsh" + ] + }, + { + "name": "ShellSession", + "type": "programming", + "extensions": [ + ".sh-session" + ] + }, + { + "name": "Shen", + "type": "programming", + "extensions": [ + ".shen" + ] + }, + { + "name": "Slash", + "type": "programming", + "extensions": [ + ".sl" + ] + }, + { + "name": "Slim", + "type": "markup", + "extensions": [ + ".slim" + ] + }, + { + "name": "Smali", + "type": "programming", + "extensions": [ + ".smali" + ] + }, + { + "name": "Smalltalk", + "type": "programming", + "extensions": [ + ".st", + ".cs" + ] + }, + { + "name": "Smarty", + "type": "programming", + "extensions": [ + ".tpl" + ] + }, + { + "name": "SourcePawn", + "type": "programming", + "extensions": [ + ".sp", + ".inc", + ".sma" + ] + }, + { + "name": "Squirrel", + "type": "programming", + "extensions": [ + ".nut" + ] + }, + { + "name": "Stan", + "type": "programming", + "extensions": [ + ".stan" + ] + }, + { + "name": "Standard ML", + "type": "programming", + "extensions": [ + ".ML", + ".fun", + ".sig", + ".sml" + ] + }, + { + "name": "Stata", + "type": "programming", + "extensions": [ + ".do", + ".ado", + ".doh", + ".ihlp", + ".mata", + ".matah", + ".sthlp" + ] + }, + { + "name": "Stylus", + "type": "markup", + "extensions": [ + ".styl" + ] + }, + { + "name": "SuperCollider", + "type": "programming", + "extensions": [ + ".sc", + ".scd" + ] + }, + { + "name": "Swift", + "type": "programming", + "extensions": [ + ".swift" + ] + }, + { + "name": "SystemVerilog", + "type": "programming", + "extensions": [ + ".sv", + ".svh", + ".vh" + ] + }, + { + "name": "TOML", + "type": "data", + "extensions": [ + ".toml" + ] + }, + { + "name": "TXL", + "type": "programming", + "extensions": [ + ".txl" + ] + }, + { + "name": "Tcl", + "type": "programming", + "extensions": [ + ".tcl", + ".adp", + ".tm" + ] + }, + { + "name": "Tcsh", + "type": "programming", + "extensions": [ + ".tcsh", + ".csh" + ] + }, + { + "name": "TeX", + "type": "markup", + "extensions": [ + ".tex", + ".aux", + ".bbx", + ".bib", + ".cbx", + ".cls", + ".dtx", + ".ins", + ".lbx", + ".ltx", + ".mkii", + ".mkiv", + ".mkvi", + ".sty", + ".toc" + ] + }, + { + "name": "Tea", + "type": "markup", + "extensions": [ + ".tea" + ] + }, + { + "name": "Terra", + "type": "programming", + "extensions": [ + ".t" + ] + }, + { + "name": "Text", + "type": "prose", + "extensions": [ + ".txt", + ".fr", + ".nb", + ".ncl", + ".no" + ] + }, + { + "name": "Textile", + "type": "prose", + "extensions": [ + ".textile" + ] + }, + { + "name": "Thrift", + "type": "programming", + "extensions": [ + ".thrift" + ] + }, + { + "name": "Turing", + "type": "programming", + "extensions": [ + ".t", + ".tu" + ] + }, + { + "name": "Turtle", + "type": "data", + "extensions": [ + ".ttl" + ] + }, + { + "name": "Twig", + "type": "markup", + "extensions": [ + ".twig" + ] + }, + { + "name": "TypeScript", + "type": "programming", + "extensions": [ + ".ts", + ".tsx" + ] + }, + { + "name": "Unified Parallel C", + "type": "programming", + "extensions": [ + ".upc" + ] + }, + { + "name": "Unity3D Asset", + "type": "data", + "extensions": [ + ".anim", + ".asset", + ".mat", + ".meta", + ".prefab", + ".unity" + ] + }, + { + "name": "Uno", + "type": "programming", + "extensions": [ + ".uno" + ] + }, + { + "name": "UnrealScript", + "type": "programming", + "extensions": [ + ".uc" + ] + }, + { + "name": "UrWeb", + "type": "programming", + "extensions": [ + ".ur", + ".urs" + ] + }, + { + "name": "VCL", + "type": "programming", + "extensions": [ + ".vcl" + ] + }, + { + "name": "VHDL", + "type": "programming", + "extensions": [ + ".vhdl", + ".vhd", + ".vhf", + ".vhi", + ".vho", + ".vhs", + ".vht", + ".vhw" + ] + }, + { + "name": "Vala", + "type": "programming", + "extensions": [ + ".vala", + ".vapi" + ] + }, + { + "name": "Verilog", + "type": "programming", + "extensions": [ + ".v", + ".veo" + ] + }, + { + "name": "VimL", + "type": "programming", + "extensions": [ + ".vim" + ] + }, + { + "name": "Visual Basic", + "type": "programming", + "extensions": [ + ".vb", + ".bas", + ".cls", + ".frm", + ".frx", + ".vba", + ".vbhtml", + ".vbs" + ] + }, + { + "name": "Volt", + "type": "programming", + "extensions": [ + ".volt" + ] + }, + { + "name": "Vue", + "type": "markup", + "extensions": [ + ".vue" + ] + }, + { + "name": "Web Ontology Language", + "type": "markup", + "extensions": [ + ".owl" + ] + }, + { + "name": "WebIDL", + "type": "programming", + "extensions": [ + ".webidl" + ] + }, + { + "name": "X10", + "type": "programming", + "extensions": [ + ".x10" + ] + }, + { + "name": "XC", + "type": "programming", + "extensions": [ + ".xc" + ] + }, + { + "name": "XML", + "type": "data", + "extensions": [ + ".xml", + ".ant", + ".axml", + ".ccxml", + ".clixml", + ".cproject", + ".csl", + ".csproj", + ".ct", + ".dita", + ".ditamap", + ".ditaval", + ".dll.config", + ".dotsettings", + ".filters", + ".fsproj", + ".fxml", + ".glade", + ".gml", + ".grxml", + ".iml", + ".ivy", + ".jelly", + ".jsproj", + ".kml", + ".launch", + ".mdpolicy", + ".mm", + ".mod", + ".mxml", + ".nproj", + ".nuspec", + ".odd", + ".osm", + ".plist", + ".pluginspec", + ".props", + ".ps1xml", + ".psc1", + ".pt", + ".rdf", + ".rss", + ".scxml", + ".srdf", + ".storyboard", + ".stTheme", + ".sublime-snippet", + ".targets", + ".tmCommand", + ".tml", + ".tmLanguage", + ".tmPreferences", + ".tmSnippet", + ".tmTheme", + ".ts", + ".tsx", + ".ui", + ".urdf", + ".ux", + ".vbproj", + ".vcxproj", + ".vssettings", + ".vxml", + ".wsdl", + ".wsf", + ".wxi", + ".wxl", + ".wxs", + ".x3d", + ".xacro", + ".xaml", + ".xib", + ".xlf", + ".xliff", + ".xmi", + ".xml.dist", + ".xproj", + ".xsd", + ".xul", + ".zcml" + ] + }, + { + "name": "XPages", + "type": "programming", + "extensions": [ + ".xsp-config", + ".xsp.metadata" + ] + }, + { + "name": "XProc", + "type": "programming", + "extensions": [ + ".xpl", + ".xproc" + ] + }, + { + "name": "XQuery", + "type": "programming", + "extensions": [ + ".xquery", + ".xq", + ".xql", + ".xqm", + ".xqy" + ] + }, + { + "name": "XS", + "type": "programming", + "extensions": [ + ".xs" + ] + }, + { + "name": "XSLT", + "type": "programming", + "extensions": [ + ".xslt", + ".xsl" + ] + }, + { + "name": "Xojo", + "type": "programming", + "extensions": [ + ".xojo_code", + ".xojo_menu", + ".xojo_report", + ".xojo_script", + ".xojo_toolbar", + ".xojo_window" + ] + }, + { + "name": "Xtend", + "type": "programming", + "extensions": [ + ".xtend" + ] + }, + { + "name": "YAML", + "type": "data", + "extensions": [ + ".yml", + ".reek", + ".rviz", + ".sublime-syntax", + ".syntax", + ".yaml", + ".yaml-tmlanguage" + ] + }, + { + "name": "YANG", + "type": "data", + "extensions": [ + ".yang" + ] + }, + { + "name": "Yacc", + "type": "programming", + "extensions": [ + ".y", + ".yacc", + ".yy" + ] + }, + { + "name": "Zephir", + "type": "programming", + "extensions": [ + ".zep" + ] + }, + { + "name": "Zimpl", + "type": "programming", + "extensions": [ + ".zimpl", + ".zmpl", + ".zpl" + ] + }, + { + "name": "desktop", + "type": "data", + "extensions": [ + ".desktop", + ".desktop.in" + ] + }, + { + "name": "eC", + "type": "programming", + "extensions": [ + ".ec", + ".eh" + ] + }, + { + "name": "edn", + "type": "data", + "extensions": [ + ".edn" + ] + }, + { + "name": "fish", + "type": "programming", + "extensions": [ + ".fish" + ] + }, + { + "name": "mupad", + "type": "programming", + "extensions": [ + ".mu" + ] + }, + { + "name": "nesC", + "type": "programming", + "extensions": [ + ".nc" + ] + }, + { + "name": "ooc", + "type": "programming", + "extensions": [ + ".ooc" + ] + }, + { + "name": "reStructuredText", + "type": "prose", + "extensions": [ + ".rst", + ".rest", + ".rest.txt", + ".rst.txt" + ] + }, + { + "name": "wisp", + "type": "programming", + "extensions": [ + ".wisp" + ] + }, + { + "name": "xBase", + "type": "programming", + "extensions": [ + ".prg", + ".ch", + ".prw" + ] + } +] \ No newline at end of file diff --git a/src/main/resources/messages/BasicActionsBundle.properties b/src/main/resources/messages/BasicActionsBundle.properties deleted file mode 100644 index 1d2dc9be..00000000 --- a/src/main/resources/messages/BasicActionsBundle.properties +++ /dev/null @@ -1 +0,0 @@ -group.codegpt.EditorActionGroup.text=CodeGPT \ No newline at end of file diff --git a/src/main/resources/messages/codegpt.properties b/src/main/resources/messages/codegpt.properties new file mode 100644 index 00000000..edb5bf4d --- /dev/null +++ b/src/main/resources/messages/codegpt.properties @@ -0,0 +1,61 @@ +action.editor.group.EditorActionGroup=CodeGPT +notification.group.name=CodeGPT notification group +settings.displayName=CodeGPT: Settings +settingsConfigurable.section.userAuthentication.title=User Authentication +settingsConfigurable.section.userAuthentication.signIn.label=Sign In +settingsConfigurable.section.userInformation.title=User Information +settingsConfigurable.section.integration.apiKeyField.label=API key: +settingsConfigurable.section.integration.apiKeyField.comment=You can find your Secret API key in your User settings. +settingsConfigurable.section.integration.displayNameFieldLabel=Display name: +settingsConfigurable.section.service.title=Service Preference +settingsConfigurable.section.service.useOpenAIServiceRadioButtonLabel=Use OpenAI API +settingsConfigurable.section.service.useAzureServiceRadioButtonLabel=Use Azure OpenAI API +settingsConfigurable.section.service.useCustomServiceRadioButtonLabel=Use custom service +settingsConfigurable.section.service.useActiveDirectoryAuthenticationCheckBoxLabel=Use Azure active directory authentication +settingsConfigurable.section.service.openai.organizationField.label=Organization: +settingsConfigurable.section.service.openai.organizationField.comment=Useful when you are part of multiple organizations optional +settingsConfigurable.section.service.azure.resourceNameField.label=Resource name: +settingsConfigurable.section.service.azure.resourceNameField.comment=The name of your Azure OpenAI Resource. +settingsConfigurable.section.service.azure.deploymentIdField.label=Deployment ID: +settingsConfigurable.section.service.azure.deploymentIdField.comment=The name of your model deployment. You're required to first deploy a model before you can make calls. +settingsConfigurable.section.service.azure.apiVersionField.label=API version: +settingsConfigurable.section.service.azure.apiVersionField.comment=The API version to use for this operation. This follows the YYYY-MM-DD format. +settingsConfigurable.section.service.custom.hostField.label=Custom host: +settingsConfigurable.section.service.custom.hostField.comment=Example: http://localhost:8080 +settingsConfigurable.section.model.title=Model Preference +settingsConfigurable.section.model.selectionFieldLabel=Model: +settingsConfigurable.section.model.useChatCompletionRadioButtonLabel=Use chat completion +settingsConfigurable.section.model.useTextCompletionRadioButtonLabel=Use text completion +codebaseIndexing.task.title=Indexing codebase +codebaseIndexing.task.completed.title=Indexing completed +codebaseIndexing.task.completed.description=Creating embeddings completed +codebaseIndexing.task.failed.title=Unable to create embeddings +configurationConfigurable.displayName=CodeGPT: Configuration +configurationConfigurable.table.title=Editor Actions +configurationConfigurable.table.emptyText=No actions configured +configurationConfigurable.table.header.actionColumnLabel=Action +configurationConfigurable.table.header.promptColumnLabel=Prompt +configurationConfigurable.table.action.revertToDefaults.text=Revert to Defaults +configurationConfigurable.table.action.addKeymap.text=Add Shortcut +configurationConfigurable.openNewTabCheckBox.label=Open new tab on each action +configurationConfigurable.section.assistant.title=Assistant Configuration +configurationConfigurable.section.assistant.systemPromptField.label=System prompt: +configurationConfigurable.section.assistant.systemPromptField.comment=The system message helps to set the behaviour of the assistant +configurationConfigurable.section.assistant.temperatureField.label=Temperature: +configurationConfigurable.section.assistant.temperatureField.comment=The value of randomness. Must be between 0 and 1 +configurationConfigurable.section.assistant.maxTokensField.label=Max completion tokens: +configurationConfigurable.section.assistant.maxTokensField.comment=The maximum capacity for completion. Must be between 100 and 2000 +advancedSettingsConfigurable.displayName=CodeGPT: Advanced Settings +advancedSettingsConfigurable.section.proxy.title=HTTP/SOCKS Proxy +advancedSettingsConfigurable.section.proxy.typeComboBoxField.label=Proxy: +advancedSettingsConfigurable.section.proxy.hostField.label=Host name: +advancedSettingsConfigurable.section.proxy.portField.label=Port: +advancedSettingsConfigurable.section.proxy.authCheckBoxField.label=Proxy authentication +advancedSettingsConfigurable.section.proxy.usernameField.label=Username: +advancedSettingsConfigurable.section.proxy.passwordField.label=Password: +dialog.deleteConversation.title=Delete Conversation +dialog.deleteConversation.description=Are you sure you want to delete this conversation? +dialog.tokenLimitExceeded.title=Token Limit Exceeded +dialog.tokenLimitExceeded.description=The maximum default token limit has been reached. Do you want to proceed with the conversation despite the higher messaging cost? +dialog.tokenLimitExceeded.continue=Continue +dialog.tokenLimitExceeded.cancel=Cancel diff --git a/src/main/resources/prompts/retrieval-prompt.txt b/src/main/resources/prompts/retrieval-prompt.txt new file mode 100644 index 00000000..b0090787 --- /dev/null +++ b/src/main/resources/prompts/retrieval-prompt.txt @@ -0,0 +1,10 @@ +Use the following pieces of context to answer the question at the end. +If you don't know the answer, just say that you don't know, don't try to make up an answer. + +Context: + +{context} + +Question: {prompt} + +Helpful answer in Markdown format: \ No newline at end of file diff --git a/src/main/resources/prompts/text-generator.txt b/src/main/resources/prompts/text-generator.txt new file mode 100644 index 00000000..827c1eea --- /dev/null +++ b/src/main/resources/prompts/text-generator.txt @@ -0,0 +1,10 @@ +You are Text Generator, a helpful expert of generating natural language into semantically comparable search query. + +Text: List all the dependencies that the project uses +AI: project dependencies, development dependencies, versions, libraries, frameworks, packages + +Text: Are there any scheduled tasks or background jobs running in our codebase, and if so, what are they responsible for? +AI: scheduled tasks, background jobs, cron jobs, task schedules, codebase tasks + +Text: {prompt} +AI: \ No newline at end of file diff --git a/src/test/java/ee/carlrobert/codegpt/client/CompletionRequestProviderTest.java b/src/test/java/ee/carlrobert/codegpt/client/CompletionRequestProviderTest.java deleted file mode 100644 index 64bba99e..00000000 --- a/src/test/java/ee/carlrobert/codegpt/client/CompletionRequestProviderTest.java +++ /dev/null @@ -1,107 +0,0 @@ -package ee.carlrobert.codegpt.client; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.groups.Tuple.tuple; - -import com.intellij.testFramework.fixtures.BasePlatformTestCase; -import ee.carlrobert.codegpt.state.conversations.ConversationsState; -import ee.carlrobert.codegpt.state.conversations.message.Message; -import ee.carlrobert.codegpt.state.settings.SettingsState; -import ee.carlrobert.openai.client.ClientCode; -import ee.carlrobert.openai.client.completion.chat.ChatCompletionModel; -import ee.carlrobert.openai.client.completion.text.TextCompletionModel; -import ee.carlrobert.openai.http.LocalCallbackServer; - -public class CompletionRequestProviderTest extends BasePlatformTestCase { - - @Override - protected void setUp() throws Exception { - super.setUp(); - } - - public void testTextCompletionRequest() { - var conversation = ConversationsState.getInstance() - .createConversation(ClientCode.TEXT_COMPLETION); - conversation.addMessage(new Message("TEST_PROMPT", "TEST_RESPONSE")); - conversation.addMessage(new Message("TEST_PROMPT_2", "TEST_RESPONSE_2")); - - var request = new CompletionRequestProvider("TEST_TEXT_COMPLETION_PROMPT", conversation) - .buildTextCompletionRequest(TextCompletionModel.DAVINCI.getCode()); - - assertThat(request.getPrompt()) - .isEqualTo("You are ChatGPT, a large language model trained by OpenAI.\n" - + "Answer in a markdown language, code blocks should contain language whenever possible.\n" - + "Human: TEST_PROMPT\n" - + "AI: TEST_RESPONSE\n" - + "Human: TEST_PROMPT_2\n" - + "AI: TEST_RESPONSE_2\n" - + "Human: TEST_TEXT_COMPLETION_PROMPT\n" - + "AI: \n"); - } - - public void testChatCompletionRequest() { - var conversation = ConversationsState.getInstance().startConversation(); - var firstMessage = createMessage(500); - var secondMessage = createMessage(250); - conversation.addMessage(firstMessage); - conversation.addMessage(secondMessage); - - var request = new CompletionRequestProvider("TEST_CHAT_COMPLETION_PROMPT", conversation) - .buildChatCompletionRequest(ChatCompletionModel.GPT_3_5.getCode()); - - assertThat(request.getMessages()) - .extracting("role", "content") - .containsExactly( - tuple("system", - "You are ChatGPT, a large language model trained by OpenAI. Answer as concisely as possible. Include code language in markdown snippets whenever possible."), - tuple("user", "TEST_PROMPT"), - tuple("assistant", firstMessage.getResponse()), - tuple("user", "TEST_PROMPT"), - tuple("assistant", secondMessage.getResponse()), - tuple("user", "TEST_CHAT_COMPLETION_PROMPT")); - } - - public void testReducedChatCompletionRequest() { - var conversation = ConversationsState.getInstance().startConversation(); - conversation.addMessage(createMessage(50)); - conversation.addMessage(createMessage(100)); - conversation.addMessage(createMessage(150)); - var firstRemainingMessage = createMessage(1000); - var secondRemainingMessage = createMessage(2000); - conversation.addMessage(firstRemainingMessage); - conversation.addMessage(secondRemainingMessage); - conversation.discardTokenLimits(); - - var request = new CompletionRequestProvider("TEST_CHAT_COMPLETION_PROMPT", conversation) - .buildChatCompletionRequest(ChatCompletionModel.GPT_3_5.getCode()); - - assertThat(request.getMessages()) - .extracting("role", "content") - .containsExactly( - tuple("system", - "You are ChatGPT, a large language model trained by OpenAI. Answer as concisely as possible. Include code language in markdown snippets whenever possible."), - tuple("user", "TEST_PROMPT"), - tuple("assistant", firstRemainingMessage.getResponse()), - tuple("user", "TEST_PROMPT"), - tuple("assistant", secondRemainingMessage.getResponse()), - tuple("user", "TEST_CHAT_COMPLETION_PROMPT")); - } - - public void testTotalUsageExceededException() { - var conversation = ConversationsState.getInstance().startConversation(); - conversation.addMessage(createMessage(1500)); - conversation.addMessage(createMessage(1500)); - conversation.addMessage(createMessage(1500)); - - assertThrows(TotalUsageExceededException.class, - () -> new CompletionRequestProvider("TEST_MESSAGE", conversation) - .buildChatCompletionRequest(ChatCompletionModel.GPT_3_5.getCode())); - } - - private Message createMessage(int tokenSize) { - var message = new Message("TEST_PROMPT"); - // 'zz' = 1 token, prompt = 6 tokens, 7 tokens per message (GPT-3), - message.setResponse("zz".repeat((tokenSize) - 6 - 7)); - return message; - } -} diff --git a/src/test/java/ee/carlrobert/codegpt/completions/CompletionRequestProviderTest.java b/src/test/java/ee/carlrobert/codegpt/completions/CompletionRequestProviderTest.java new file mode 100644 index 00000000..5d881c4a --- /dev/null +++ b/src/test/java/ee/carlrobert/codegpt/completions/CompletionRequestProviderTest.java @@ -0,0 +1,271 @@ +package ee.carlrobert.codegpt.completions; + +import static ee.carlrobert.codegpt.completions.CompletionRequestProvider.COMPLETION_SYSTEM_PROMPT; +import static ee.carlrobert.openai.util.JSONUtil.e; +import static ee.carlrobert.openai.util.JSONUtil.jsonArray; +import static ee.carlrobert.openai.util.JSONUtil.jsonMap; +import static ee.carlrobert.openai.util.JSONUtil.jsonMapResponse; +import static org.apache.http.HttpHeaders.AUTHORIZATION; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.groups.Tuple.tuple; + +import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import ee.carlrobert.codegpt.conversations.Conversation; +import ee.carlrobert.codegpt.conversations.ConversationService; +import ee.carlrobert.codegpt.conversations.message.Message; +import ee.carlrobert.codegpt.credentials.OpenAICredentialsManager; +import ee.carlrobert.codegpt.settings.SettingsState; +import ee.carlrobert.codegpt.settings.configuration.ConfigurationState; +import ee.carlrobert.openai.client.ClientCode; +import ee.carlrobert.openai.client.completion.chat.ChatCompletionModel; +import ee.carlrobert.openai.client.completion.text.TextCompletionModel; +import ee.carlrobert.openai.http.LocalCallbackServer; +import ee.carlrobert.openai.http.ResponseEntity; +import ee.carlrobert.openai.http.exchange.BasicHttpExchange; +import ee.carlrobert.openai.http.expectation.BasicExpectation; +import java.time.LocalDateTime; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +public class CompletionRequestProviderTest extends BasePlatformTestCase { + + private LocalCallbackServer server; + + @Override + protected void setUp() throws Exception { + super.setUp(); + server = new LocalCallbackServer(8000); + SettingsState.getInstance().openAIBaseHost = "http://127.0.0.1:8000"; + OpenAICredentialsManager.getInstance().setApiKey("TEST_API_KEY"); + ConfigurationState.getInstance().systemPrompt = ""; + } + + @Override + protected void tearDown() throws Exception { + server.stop(); + super.tearDown(); + } + + public void testTextCompletionRequestWithSystemPromptOverride() { + ConfigurationState.getInstance().systemPrompt = "TEST_SYSTEM_PROMPT"; + var conversation = createConversation(ClientCode.TEXT_COMPLETION); + var firstMsg = new Message("TEST_PROMPT", "TEST_RESPONSE"); + conversation.addMessage(firstMsg); + conversation.addMessage(new Message("TEST_PROMPT_2", "TEST_RESPONSE_2")); + + var request = new CompletionRequestProvider(getProject(), conversation) + .buildTextCompletionRequest(TextCompletionModel.DAVINCI.getCode(), new Message("TEST_TEXT_COMPLETION_PROMPT"), false); + + assertThat(request.getPrompt()) + .isEqualTo("TEST_SYSTEM_PROMPT\n" + + "Human: TEST_PROMPT\n" + + "AI: TEST_RESPONSE\n" + + "Human: TEST_PROMPT_2\n" + + "AI: TEST_RESPONSE_2\n" + + "Human: TEST_TEXT_COMPLETION_PROMPT\n" + + "AI: \n"); + } + + public void testTextCompletionRequestWithoutSystemPromptOverride() { + var conversation = createConversation(ClientCode.TEXT_COMPLETION); + var firstMsg = new Message("TEST_PROMPT", "TEST_RESPONSE"); + conversation.addMessage(firstMsg); + conversation.addMessage(new Message("TEST_PROMPT_2", "TEST_RESPONSE_2")); + + var request = new CompletionRequestProvider(getProject(), conversation) + .buildTextCompletionRequest(TextCompletionModel.DAVINCI.getCode(), new Message("TEST_TEXT_COMPLETION_PROMPT"), false); + + assertThat(request.getPrompt()) + .isEqualTo("You are ChatGPT, a large language model trained by OpenAI.\n" + + "Answer in a markdown language, code blocks should contain language whenever possible.\n" + + "Human: TEST_PROMPT\n" + + "AI: TEST_RESPONSE\n" + + "Human: TEST_PROMPT_2\n" + + "AI: TEST_RESPONSE_2\n" + + "Human: TEST_TEXT_COMPLETION_PROMPT\n" + + "AI: \n"); + } + + public void testChatCompletionRequestWithSystemPromptOverride() { + ConfigurationState.getInstance().systemPrompt = "TEST_SYSTEM_PROMPT"; + var conversation = ConversationService.getInstance().startConversation(); + var firstMessage = createDummyMessage(500); + var secondMessage = createDummyMessage(250); + conversation.addMessage(firstMessage); + conversation.addMessage(secondMessage); + + var request = new CompletionRequestProvider(getProject(), conversation) + .buildChatCompletionRequest(ChatCompletionModel.GPT_3_5.getCode(), new Message("TEST_CHAT_COMPLETION_PROMPT"), false, false); + + assertThat(request.getMessages()) + .extracting("role", "content") + .containsExactly( + tuple("system", "TEST_SYSTEM_PROMPT"), + tuple("user", "TEST_PROMPT"), + tuple("assistant", firstMessage.getResponse()), + tuple("user", "TEST_PROMPT"), + tuple("assistant", secondMessage.getResponse()), + tuple("user", "TEST_CHAT_COMPLETION_PROMPT")); + } + + public void testChatCompletionRequestWithoutSystemPromptOverride() { + var conversation = ConversationService.getInstance().startConversation(); + var firstMessage = createDummyMessage(500); + var secondMessage = createDummyMessage(250); + conversation.addMessage(firstMessage); + conversation.addMessage(secondMessage); + + var request = new CompletionRequestProvider(getProject(), conversation) + .buildChatCompletionRequest(ChatCompletionModel.GPT_3_5.getCode(), new Message("TEST_CHAT_COMPLETION_PROMPT"), false); + + assertThat(request.getMessages()) + .extracting("role", "content") + .containsExactly( + tuple("system", COMPLETION_SYSTEM_PROMPT), + tuple("user", "TEST_PROMPT"), + tuple("assistant", firstMessage.getResponse()), + tuple("user", "TEST_PROMPT"), + tuple("assistant", secondMessage.getResponse()), + tuple("user", "TEST_CHAT_COMPLETION_PROMPT")); + } + + public void testChatCompletionRequestRetry() { + var conversation = ConversationService.getInstance().startConversation(); + var firstMessage = createDummyMessage("FIRST_TEST_PROMPT", 500); + var secondMessage = createDummyMessage("SECOND_TEST_PROMPT", 250); + conversation.addMessage(firstMessage); + conversation.addMessage(secondMessage); + + var request = new CompletionRequestProvider(getProject(), conversation) + .buildChatCompletionRequest(ChatCompletionModel.GPT_3_5.getCode(), secondMessage, true); + + assertThat(request.getMessages()) + .extracting("role", "content") + .containsExactly( + tuple("system", COMPLETION_SYSTEM_PROMPT), + tuple("user", "FIRST_TEST_PROMPT"), + tuple("assistant", firstMessage.getResponse()), + tuple("user", "SECOND_TEST_PROMPT")); + } + + public void testReducedChatCompletionRequest() { + var conversation = ConversationService.getInstance().startConversation(); + conversation.addMessage(createDummyMessage(50)); + conversation.addMessage(createDummyMessage(100)); + conversation.addMessage(createDummyMessage(150)); + conversation.addMessage(createDummyMessage(1000)); + var remainingMessage = createDummyMessage(2000); + conversation.addMessage(remainingMessage); + conversation.discardTokenLimits(); + + var request = new CompletionRequestProvider(getProject(), conversation) + .buildChatCompletionRequest(ChatCompletionModel.GPT_3_5.getCode(), new Message("TEST_CHAT_COMPLETION_PROMPT"), false); + + assertThat(request.getMessages()) + .extracting("role", "content") + .containsExactly( + tuple("system", COMPLETION_SYSTEM_PROMPT), + tuple("user", "TEST_PROMPT"), + tuple("assistant", remainingMessage.getResponse()), + tuple("user", "TEST_CHAT_COMPLETION_PROMPT")); + } + + public void testTotalUsageExceededException() { + var conversation = ConversationService.getInstance().startConversation(); + conversation.addMessage(createDummyMessage(1500)); + conversation.addMessage(createDummyMessage(1500)); + conversation.addMessage(createDummyMessage(1500)); + + assertThrows(TotalUsageExceededException.class, + () -> new CompletionRequestProvider(getProject(), conversation) + .buildChatCompletionRequest(ChatCompletionModel.GPT_3_5.getCode(), createDummyMessage(100), false)); + } + + public void testContextualSearch() { + var conversation = ConversationService.getInstance().startConversation(); + var settings = SettingsState.getInstance(); + settings.isTextCompletionOptionSelected = false; + settings.isChatCompletionOptionSelected = true; + settings.useOpenAIService = true; + settings.useAzureService = false; + expectRequest("/v1/chat/completions", request -> { + assertThat(request.getMethod()).isEqualTo("POST"); + assertThat(request.getHeaders().get(AUTHORIZATION).get(0)).isEqualTo("Bearer TEST_API_KEY"); + assertThat(request.getBody()) + .extracting("model", "messages") + .containsExactly("gpt-4", + List.of(Map.of( + "role", + "user", + "content", + "You are Text Generator, a helpful expert of generating natural language into semantically comparable search query.\n" + + "\n" + + "Text: List all the dependencies that the project uses\n" + + "AI: project dependencies, development dependencies, versions, libraries, frameworks, packages\n" + + "\n" + + "Text: Are there any scheduled tasks or background jobs running in our codebase, and if so, what are they responsible for?\n" + + "AI: scheduled tasks, background jobs, cron jobs, task schedules, codebase tasks\n" + + "\n" + + "Text: TEST_CHAT_COMPLETION_PROMPT\n" + + "AI:"))); + + return new ResponseEntity(200, + jsonMapResponse("choices", jsonArray(jsonMap("message", jsonMap(e("role", "assistant"), e("content", "TEST_CHAT_COMPLETION_RESPONSE")))))); + }); + expectRequest("/v1/embeddings", request -> { + var headers = request.getHeaders(); + assertThat(headers.get("Authorization").get(0)).isEqualTo("Bearer TEST_API_KEY"); + assertThat(request.getBody()) + .extracting("model", "input") + .containsExactly("text-embedding-ada-002", List.of("TEST_CHAT_COMPLETION_RESPONSE")); + return new ResponseEntity(200, jsonMapResponse("data", jsonArray(jsonMap("embedding", List.of(-0.00692, -0.0053, -4.5471, -0.0240))))); + }); + + var request = new CompletionRequestProvider(getProject(), conversation) + .buildChatCompletionRequest(ChatCompletionModel.GPT_3_5.getCode(), new Message("TEST_CHAT_COMPLETION_PROMPT"), false, true); + + assertThat(request.getModel()).isEqualTo("gpt-3.5-turbo"); + assertThat(request.getMessages().size()).isEqualTo(1); + assertThat(request.getMessages().get(0)) + .extracting("role", "content") + .containsExactly("user", "Use the following pieces of context to answer the question at the end.\n" + + "If you don't know the answer, just say that you don't know, don't try to make up an answer.\n" + + "\n" + + "Context:\n" + + "\n" + + "TEST_CONTEXT\n" + + "\n" + + "Question: TEST_CHAT_COMPLETION_PROMPT\n" + + "\n" + + "Helpful answer in Markdown format:"); + } + + private Conversation createConversation(ClientCode clientCode) { + var settings = SettingsState.getInstance(); + var conversation = new Conversation(); + conversation.setId(UUID.randomUUID()); + conversation.setClientCode(clientCode); + conversation.setModel(settings.isChatCompletionOptionSelected ? + settings.getChatCompletionModel() : + settings.getTextCompletionModel()); + conversation.setCreatedOn(LocalDateTime.now()); + conversation.setUpdatedOn(LocalDateTime.now()); + return conversation; + } + + private Message createDummyMessage(int tokenSize) { + return createDummyMessage("TEST_PROMPT", tokenSize); + } + + private Message createDummyMessage(String prompt, int tokenSize) { + var message = new Message(prompt); + // 'zz' = 1 token, prompt = 6 tokens, 7 tokens per message (GPT-3), + message.setResponse("zz".repeat((tokenSize) - 6 - 7)); + return message; + } + + private void expectRequest(String path, BasicHttpExchange exchange) { + server.addExpectation(new BasicExpectation(path, exchange)); + } +} diff --git a/src/test/java/ee/carlrobert/codegpt/client/RequestHandlerTest.java b/src/test/java/ee/carlrobert/codegpt/completions/DefaultCompletionRequestHandlerTest.java similarity index 65% rename from src/test/java/ee/carlrobert/codegpt/client/RequestHandlerTest.java rename to src/test/java/ee/carlrobert/codegpt/completions/DefaultCompletionRequestHandlerTest.java index 2c667c5f..ec4469fe 100644 --- a/src/test/java/ee/carlrobert/codegpt/client/RequestHandlerTest.java +++ b/src/test/java/ee/carlrobert/codegpt/completions/DefaultCompletionRequestHandlerTest.java @@ -1,18 +1,21 @@ -package ee.carlrobert.codegpt.client; +package ee.carlrobert.codegpt.completions; +import static ee.carlrobert.codegpt.completions.CompletionRequestProvider.COMPLETION_SYSTEM_PROMPT; import static ee.carlrobert.openai.util.JSONUtil.jsonArray; import static ee.carlrobert.openai.util.JSONUtil.jsonMap; import static ee.carlrobert.openai.util.JSONUtil.jsonMapResponse; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.http.HttpHeaders.AUTHORIZATION; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.tuple; import static org.awaitility.Awaitility.await; import com.intellij.testFramework.fixtures.BasePlatformTestCase; -import ee.carlrobert.codegpt.state.conversations.ConversationsState; -import ee.carlrobert.codegpt.state.conversations.message.Message; -import ee.carlrobert.codegpt.state.settings.SettingsState; +import ee.carlrobert.codegpt.conversations.ConversationService; +import ee.carlrobert.codegpt.conversations.message.Message; +import ee.carlrobert.codegpt.credentials.AzureCredentialsManager; +import ee.carlrobert.codegpt.credentials.OpenAICredentialsManager; +import ee.carlrobert.codegpt.settings.SettingsState; +import ee.carlrobert.codegpt.settings.configuration.ConfigurationState; import ee.carlrobert.openai.client.completion.chat.ChatCompletionModel; import ee.carlrobert.openai.client.completion.text.TextCompletionModel; import ee.carlrobert.openai.http.LocalCallbackServer; @@ -21,18 +24,19 @@ import ee.carlrobert.openai.http.expectation.StreamExpectation; import java.util.List; import java.util.Map; -public class RequestHandlerTest extends BasePlatformTestCase { +public class DefaultCompletionRequestHandlerTest extends BasePlatformTestCase { private LocalCallbackServer server; @Override protected void setUp() throws Exception { super.setUp(); - var settings = SettingsState.getInstance(); - settings.useApiKeyFromEnvVar = false; - settings.apiKey = "TEST_API_KEY"; - settings.customHost = "http://localhost:8000"; - server = new LocalCallbackServer(); + AzureCredentialsManager.getInstance().setApiKey("TEST_API_KEY"); + OpenAICredentialsManager.getInstance().setApiKey("TEST_API_KEY"); + SettingsState.getInstance().openAIBaseHost = "http://127.0.0.1:8000"; + SettingsState.getInstance().azureBaseHost = "http://127.0.0.1:8000"; + ConfigurationState.getInstance().systemPrompt = ""; + server = new LocalCallbackServer(8000); } @Override @@ -42,7 +46,10 @@ public class RequestHandlerTest extends BasePlatformTestCase { } public void testChatCompletionCall() { - var conversation = ConversationsState.getInstance().startConversation(); + var message = new Message("TEST_PROMPT"); + var conversation = ConversationService.getInstance().startConversation(); + var requestHandler = new CompletionRequestHandler(getProject()); + requestHandler.addRequestCompletedListener(message::setResponse); var settings = SettingsState.getInstance(); settings.isTextCompletionOptionSelected = false; settings.isChatCompletionOptionSelected = true; @@ -58,8 +65,7 @@ public class RequestHandlerTest extends BasePlatformTestCase { .containsExactly( "gpt-3.5-turbo", List.of( - Map.of("role", "system", "content", - "You are ChatGPT, a large language model trained by OpenAI. Answer as concisely as possible. Include code language in markdown snippets whenever possible."), + Map.of("role", "system", "content", COMPLETION_SYSTEM_PROMPT), Map.of("role", "user", "content", "TEST_PROMPT"))); return List.of( @@ -69,23 +75,23 @@ public class RequestHandlerTest extends BasePlatformTestCase { jsonMapResponse("choices", jsonArray(jsonMap("delta", jsonMap("content", "!"))))); }); - new RequestHandler(conversation).call(new Message("TEST_PROMPT"), false); + requestHandler.call(conversation, message, false); - await().atMost(5, SECONDS).until(() -> { - var messages = conversation.getMessages(); - return !messages.isEmpty() && "Hello!".contentEquals(messages.get(0).getResponse()); - }); + await().atMost(5, SECONDS).until(() -> "Hello!".equals(message.getResponse())); } public void testTextCompletionCall() { - var conversation = ConversationsState.getInstance().startConversation(); + var message = new Message("TEST_PROMPT"); + var conversation = ConversationService.getInstance().startConversation(); + var requestHandler = new CompletionRequestHandler(getProject()); + requestHandler.addRequestCompletedListener(message::setResponse); var settings = SettingsState.getInstance(); settings.isTextCompletionOptionSelected = true; settings.isChatCompletionOptionSelected = false; settings.useOpenAIService = true; settings.useAzureService = false; settings.textCompletionBaseModel = TextCompletionModel.CURIE.getCode(); - settings.organization = "TEST_ORGANIZATION"; + settings.openAIOrganization = "TEST_ORGANIZATION"; expectStreamRequest("/v1/completions", request -> { var headers = request.getHeaders(); assertThat(headers.get("Authorization").get(0)).isEqualTo("Bearer TEST_API_KEY"); @@ -106,30 +112,30 @@ public class RequestHandlerTest extends BasePlatformTestCase { jsonMapResponse("choices", jsonArray(jsonMap("text", "!")))); }); - new RequestHandler(conversation).call(new Message("TEST_PROMPT"), false); + requestHandler.call(conversation, message, false); - await().atMost(5, SECONDS).until(() -> { - var messages = conversation.getMessages(); - return !messages.isEmpty() && "Hello!".contentEquals(messages.get(0).getResponse()); - }); + await().atMost(5, SECONDS).until(() -> "Hello!".equals(message.getResponse())); } public void testAzureChatCompletionCall() { + var message = new Message("TEST_PROMPT"); var settings = SettingsState.getInstance(); settings.isTextCompletionOptionSelected = false; settings.isChatCompletionOptionSelected = true; settings.useOpenAIService = false; settings.useAzureService = true; - settings.resourceName = "TEST_RESOURCE_NAME"; - settings.apiVersion = "TEST_API_VERSION"; - settings.deploymentId = "TEST_DEPLOYMENT_ID"; // TODO: Add support for asserting the host + settings.azureResourceName = "TEST_RESOURCE_NAME"; + settings.azureApiVersion = "TEST_API_VERSION"; + settings.azureDeploymentId = "TEST_DEPLOYMENT_ID"; // TODO: Add support for asserting the host settings.chatCompletionBaseModel = ChatCompletionModel.GPT_3_5.getCode(); - var conversationState = ConversationsState.getInstance(); - var conversation = conversationState.startConversation(); + var conversationService = ConversationService.getInstance(); + var conversation = conversationService.startConversation(); + var requestHandler = new CompletionRequestHandler(getProject()); + requestHandler.addRequestCompletedListener(message::setResponse); var prevMessage = new Message("TEST_PREV_PROMPT"); prevMessage.setResponse("TEST_PREV_RESPONSE"); conversation.addMessage(prevMessage); - conversationState.saveConversation(conversation); + conversationService.saveConversation(conversation); expectStreamRequest("/openai/deployments/TEST_DEPLOYMENT_ID/chat/completions", request -> { assertThat(request.getUri().getQuery()).isEqualTo("api-version=TEST_API_VERSION"); assertThat(request.getHeaders().get("Api-key").get(0)).isEqualTo("TEST_API_KEY"); @@ -140,8 +146,7 @@ public class RequestHandlerTest extends BasePlatformTestCase { .containsExactly( "gpt-3.5-turbo", List.of( - Map.of("role", "system", "content", - "You are ChatGPT, a large language model trained by OpenAI. Answer as concisely as possible. Include code language in markdown snippets whenever possible."), + Map.of("role", "system", "content", COMPLETION_SYSTEM_PROMPT), Map.of("role", "user", "content", "TEST_PREV_PROMPT"), Map.of("role", "assistant", "content", "TEST_PREV_RESPONSE"), Map.of("role", "user", "content", "TEST_PROMPT"))); @@ -152,16 +157,9 @@ public class RequestHandlerTest extends BasePlatformTestCase { jsonMapResponse("choices", jsonArray(jsonMap("delta", jsonMap("content", "!"))))); }); - new RequestHandler(conversation).call(new Message("TEST_PROMPT"), false); + requestHandler.call(conversation, message, false); - var messages = conversation.getMessages(); - await().atMost(5, SECONDS) - .until(() -> messages.size() == 2 && messages.get(1).getResponse() != null); - assertThat(messages) - .extracting("prompt", "response") - .containsExactly( - tuple("TEST_PREV_PROMPT", "TEST_PREV_RESPONSE"), - tuple("TEST_PROMPT", "Hello!")); + await().atMost(5, SECONDS).until(() -> "Hello!".equals(message.getResponse())); } private void expectStreamRequest(String path, StreamHttpExchange exchange) { diff --git a/src/test/java/ee/carlrobert/codegpt/state/conversations/ConversationsStateTest.java b/src/test/java/ee/carlrobert/codegpt/conversations/ConversationsStateTest.java similarity index 57% rename from src/test/java/ee/carlrobert/codegpt/state/conversations/ConversationsStateTest.java rename to src/test/java/ee/carlrobert/codegpt/conversations/ConversationsStateTest.java index 766ccfd2..ba77969b 100644 --- a/src/test/java/ee/carlrobert/codegpt/state/conversations/ConversationsStateTest.java +++ b/src/test/java/ee/carlrobert/codegpt/conversations/ConversationsStateTest.java @@ -1,11 +1,10 @@ -package ee.carlrobert.codegpt.state.conversations; - +package ee.carlrobert.codegpt.conversations; import static org.assertj.core.api.Assertions.assertThat; import com.intellij.testFramework.fixtures.BasePlatformTestCase; -import ee.carlrobert.codegpt.state.conversations.message.Message; -import ee.carlrobert.codegpt.state.settings.SettingsState; +import ee.carlrobert.codegpt.conversations.message.Message; +import ee.carlrobert.codegpt.settings.SettingsState; import ee.carlrobert.openai.client.ClientCode; import ee.carlrobert.openai.client.completion.chat.ChatCompletionModel; @@ -17,7 +16,7 @@ public class ConversationsStateTest extends BasePlatformTestCase { settings.isTextCompletionOptionSelected = false; settings.chatCompletionBaseModel = ChatCompletionModel.GPT_3_5.getCode(); - var conversation = ConversationsState.getInstance().startConversation(); + var conversation = ConversationService.getInstance().startConversation(); assertThat(conversation).isEqualTo(ConversationsState.getCurrentConversation()); assertThat(conversation) @@ -26,14 +25,14 @@ public class ConversationsStateTest extends BasePlatformTestCase { } public void testSaveConversation() { - var instance = ConversationsState.getInstance(); - var conversation = instance.createConversation(ClientCode.CHAT_COMPLETION); - instance.addConversation(conversation); + var service = ConversationService.getInstance(); + var conversation = service.createConversation(ClientCode.CHAT_COMPLETION); + service.addConversation(conversation); var message = new Message("TEST_PROMPT"); message.setResponse("TEST_RESPONSE"); conversation.addMessage(message); - instance.saveConversation(conversation); + service.saveConversation(conversation); var currentConversation = ConversationsState.getCurrentConversation(); assertThat(currentConversation).isNotNull(); @@ -43,50 +42,50 @@ public class ConversationsStateTest extends BasePlatformTestCase { } public void testGetPreviousConversation() { - var instance = ConversationsState.getInstance(); - var firstConversation = instance.startConversation(); - instance.startConversation(); + var service = ConversationService.getInstance(); + var firstConversation = service.startConversation(); + service.startConversation(); - var previousConversation = instance.getPreviousConversation(); + var previousConversation = service.getPreviousConversation(); assertThat(previousConversation.isPresent()).isTrue(); assertThat(previousConversation.get()).isEqualTo(firstConversation); } public void testGetNextConversation() { - var instance = ConversationsState.getInstance(); - var firstConversation = instance.startConversation(); - var secondConversation = instance.startConversation(); - instance.setCurrentConversation(firstConversation); + var service = ConversationService.getInstance(); + var firstConversation = service.startConversation(); + var secondConversation = service.startConversation(); + ConversationsState.getInstance().setCurrentConversation(firstConversation); - var nextConversation = instance.getNextConversation(); + var nextConversation = service.getNextConversation(); assertThat(nextConversation.isPresent()).isTrue(); assertThat(nextConversation.get()).isEqualTo(secondConversation); } public void testDeleteSelectedConversation() { - var instance = ConversationsState.getInstance(); - var firstConversation = instance.startConversation(); - instance.startConversation(); + var service = ConversationService.getInstance(); + var firstConversation = service.startConversation(); + service.startConversation(); - instance.deleteSelectedConversation(); + service.deleteSelectedConversation(); assertThat(ConversationsState.getCurrentConversation()).isEqualTo(firstConversation); - assertThat(instance.getSortedConversations().size()).isEqualTo(1); - assertThat(instance.getSortedConversations()) + assertThat(service.getSortedConversations().size()).isEqualTo(1); + assertThat(service.getSortedConversations()) .extracting("id") .containsExactly(firstConversation.getId()); } public void testClearAllConversations() { - var instance = ConversationsState.getInstance(); - instance.startConversation(); - instance.startConversation(); + var service = ConversationService.getInstance(); + service.startConversation(); + service.startConversation(); - instance.clearAll(); + service.clearAll(); assertThat(ConversationsState.getCurrentConversation()).isNull(); - assertThat(instance.getSortedConversations().size()).isEqualTo(0); + assertThat(service.getSortedConversations().size()).isEqualTo(0); } } diff --git a/src/test/java/ee/carlrobert/codegpt/toolwindow/chat/StandardChatToolWindowTabbedPaneTest.java b/src/test/java/ee/carlrobert/codegpt/toolwindow/chat/StandardChatToolWindowTabbedPaneTest.java new file mode 100644 index 00000000..543fec3c --- /dev/null +++ b/src/test/java/ee/carlrobert/codegpt/toolwindow/chat/StandardChatToolWindowTabbedPaneTest.java @@ -0,0 +1,50 @@ +package ee.carlrobert.codegpt.toolwindow.chat; + +import static org.assertj.core.api.Assertions.assertThat; + +import com.intellij.openapi.util.Disposer; +import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import ee.carlrobert.codegpt.conversations.Conversation; +import ee.carlrobert.codegpt.conversations.message.Message; +import ee.carlrobert.codegpt.toolwindow.chat.standard.StandardChatToolWindowTabPanel; +import ee.carlrobert.codegpt.toolwindow.chat.standard.StandardChatToolWindowTabbedPane; + +public class StandardChatToolWindowTabbedPaneTest extends BasePlatformTestCase { + + public void testClearAllTabs() { + var tabbedPane = new StandardChatToolWindowTabbedPane(Disposer.newDisposable()); + tabbedPane.addNewTab(new StandardChatToolWindowTabPanel(getProject())); + + tabbedPane.clearAll(); + + assertThat(tabbedPane.getActiveTabMapping()).isEmpty(); + } + + public void testAddingNewTabs() { + var tabbedPane = new StandardChatToolWindowTabbedPane(Disposer.newDisposable()); + + tabbedPane.addNewTab(new StandardChatToolWindowTabPanel(getProject())); + tabbedPane.addNewTab(new StandardChatToolWindowTabPanel(getProject())); + tabbedPane.addNewTab(new StandardChatToolWindowTabPanel(getProject())); + + var tabMapping = tabbedPane.getActiveTabMapping(); + assertThat(tabMapping.keySet()).containsExactly("Chat 1", "Chat 2", "Chat 3"); + assertThat(tabMapping.values().stream().allMatch(item -> item.getConversation() == null)).isTrue(); + } + + public void testResetCurrentlyActiveTabPanel() { + var tabbedPane = new StandardChatToolWindowTabbedPane(Disposer.newDisposable()); + var tabPanel = new StandardChatToolWindowTabPanel(getProject()); + var message = new Message("TEST_PROMPT"); + message.setResponse("TEST_RESPONSE"); + var conversation = new Conversation(); + conversation.addMessage(message); + tabPanel.setConversation(conversation); + tabbedPane.addNewTab(tabPanel); + + tabbedPane.resetCurrentlyActiveTabPanel(); + + var tabMapping = tabbedPane.getActiveTabMapping().get("Chat 1"); + assertThat(tabMapping.getConversation()).isNull(); + } +} diff --git a/src/test/java/ee/carlrobert/codegpt/util/MarkdownUtilsTest.java b/src/test/java/ee/carlrobert/codegpt/util/MarkdownUtilsTest.java new file mode 100644 index 00000000..a171c86b --- /dev/null +++ b/src/test/java/ee/carlrobert/codegpt/util/MarkdownUtilsTest.java @@ -0,0 +1,106 @@ +package ee.carlrobert.codegpt.util; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.Test; + +public class MarkdownUtilsTest { + + @Test + public void shouldExtractMarkdownCodeBlocks() { + String testInput = "**C++ Code Block**\n" + + "```cpp\n" + + "#include \n" + + "\n" + + "int main() {\n" + + " return 0;\n" + + "}\n" + + "```\n" + + "1. We include the **iostream** header file.\n" + + "2. We define the main function.\n" + + "\n" + + "**Java Code Block**\n" + + "```java\n" + + "public class Main {\n" + + " public static void main(String[] args) {\n" + + " }\n" + + "}\n" + + "```\n" + + "1. We define a **public class** called **Main**.\n" + + "2. We define the **main** method which is the entry point of the program.\n"; + + var result = MarkdownUtils.splitCodeBlocks(testInput); + + assertThat(result).containsExactly( + "**C++ Code Block**\n", + "```cpp\n" + + "#include \n" + + "\n" + + "int main() {\n" + + " return 0;\n" + + "}\n" + + "```", + "\n1. We include the **iostream** header file.\n" + + "2. We define the main function.\n" + + "\n" + + "**Java Code Block**\n", + "```java\n" + + "public class Main {\n" + + " public static void main(String[] args) {\n" + + " }\n" + + "}\n" + + "```", + "\n1. We define a **public class** called **Main**.\n" + + "2. We define the **main** method which is the entry point of the program.\n"); + } + + @Test + public void shouldExtractMarkdownWithoutCode() { + String testInput = "**C++ Code Block**\n" + + "1. We include the **iostream** header file.\n" + + "2. We define the main function.\n" + + "\n"; + + var result = MarkdownUtils.splitCodeBlocks(testInput); + + assertThat(result).containsExactly( + "**C++ Code Block**\n" + + "1. We include the **iostream** header file.\n" + + "2. We define the main function.\n" + + "\n"); + } + + @Test + public void shouldExtractMarkdownCodeOnly() { + String testInput = "```cpp\n" + + "#include \n" + + "\n" + + "int main() {\n" + + " return 0;\n" + + "}\n" + + "```\n" + + "```java\n" + + "public class Main {\n" + + " public static void main(String[] args) {\n" + + " }\n" + + "}\n" + + "```\n"; + + var result = MarkdownUtils.splitCodeBlocks(testInput); + + assertThat(result).containsExactly( + "```cpp\n" + + "#include \n" + + "\n" + + "int main() {\n" + + " return 0;\n" + + "}\n" + + "```", + "```java\n" + + "public class Main {\n" + + " public static void main(String[] args) {\n" + + " }\n" + + "}\n" + + "```"); + } +} diff --git a/src/test/resources/indexes/hnsw.index b/src/test/resources/indexes/hnsw.index new file mode 100644 index 00000000..ef622134 Binary files /dev/null and b/src/test/resources/indexes/hnsw.index differ