diff --git a/chapi-ast-comments/build.gradle.kts b/chapi-ast-comments/build.gradle.kts new file mode 100644 index 00000000..165f3a4e --- /dev/null +++ b/chapi-ast-comments/build.gradle.kts @@ -0,0 +1,46 @@ +plugins { + java + kotlin("jvm") +} + +group = "com.phodal" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() + mavenLocal() + jcenter() +} + +dependencies { + implementation(kotlin("stdlib-jdk8")) + implementation(kotlin("reflect")) + // Kotlin reflection. + implementation(kotlin("test")) + implementation(kotlin("test-junit")) + + // JUnit 5 + testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.0") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.6.0") + testRuntimeOnly("org.junit.platform:junit-platform-console:1.6.0") + + implementation("org.antlr:antlr4:4.8-1") + implementation("org.antlr:antlr4-runtime:4.8-1") +} + +configure { + sourceCompatibility = JavaVersion.VERSION_1_8 +} + +tasks { + compileKotlin { + kotlinOptions.jvmTarget = "1.8" + } + compileTestKotlin { + kotlinOptions.jvmTarget = "1.8" + } + + test { + useJUnitPlatform() + } +} diff --git a/chapi-ast-comments/src/main/java/chapi/ast/antlr/CommentLexer.interp b/chapi-ast-comments/src/main/java/chapi/ast/antlr/CommentLexer.interp new file mode 100644 index 00000000..8b07ff79 --- /dev/null +++ b/chapi-ast-comments/src/main/java/chapi/ast/antlr/CommentLexer.interp @@ -0,0 +1,213 @@ +token literal names: +null +null +null +null +null +null +null +null +null +null +null +null +null +'null' +'(' +')' +'{' +'}' +'[' +']' +';' +',' +'.' +'=' +'>' +'<' +'!' +'~' +'?' +':' +'==' +'<=' +'>=' +'!=' +'&&' +'||' +'++' +'--' +'+' +'-' +'*' +'/' +'&' +'|' +'^' +'%' +'+=' +'-=' +'*=' +'/=' +'&=' +'|=' +'^=' +'%=' +'<<=' +'>>=' +'>>>=' +null +'->' +'::' +'@' +'...' +null +null + +token symbolic names: +null +COMMENT +LINE_COMMENT +PYTHON_COMMENT +DECIMAL_LITERAL +HEX_LITERAL +OCT_LITERAL +BINARY_LITERAL +FLOAT_LITERAL +HEX_FLOAT_LITERAL +BOOL_LITERAL +CHAR_LITERAL +STRING_LITERAL +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 +TemplateStringLiteral +ARROW +COLONCOLON +AT +ELLIPSIS +WS +IDENTIFIER + +rule names: +COMMENT +LINE_COMMENT +PYTHON_COMMENT +DECIMAL_LITERAL +HEX_LITERAL +OCT_LITERAL +BINARY_LITERAL +FLOAT_LITERAL +HEX_FLOAT_LITERAL +BOOL_LITERAL +CHAR_LITERAL +STRING_LITERAL +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 +TemplateStringLiteral +ARROW +COLONCOLON +AT +ELLIPSIS +WS +IDENTIFIER +ExponentPart +EscapeSequence +HexDigits +HexDigit +Digits +LetterOrDigit +Letter + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 65, 532, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 148, 10, 2, 12, 2, 14, 2, 151, 11, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 162, 10, 3, 12, 3, 14, 3, 165, 11, 3, 3, 3, 3, 3, 3, 4, 3, 4, 7, 4, 171, 10, 4, 12, 4, 14, 4, 174, 11, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 5, 5, 181, 10, 5, 3, 5, 6, 5, 184, 10, 5, 13, 5, 14, 5, 185, 3, 5, 5, 5, 189, 10, 5, 5, 5, 191, 10, 5, 3, 5, 5, 5, 194, 10, 5, 3, 6, 3, 6, 3, 6, 3, 6, 7, 6, 200, 10, 6, 12, 6, 14, 6, 203, 11, 6, 3, 6, 5, 6, 206, 10, 6, 3, 6, 5, 6, 209, 10, 6, 3, 7, 3, 7, 7, 7, 213, 10, 7, 12, 7, 14, 7, 216, 11, 7, 3, 7, 3, 7, 7, 7, 220, 10, 7, 12, 7, 14, 7, 223, 11, 7, 3, 7, 5, 7, 226, 10, 7, 3, 7, 5, 7, 229, 10, 7, 3, 8, 3, 8, 3, 8, 3, 8, 7, 8, 235, 10, 8, 12, 8, 14, 8, 238, 11, 8, 3, 8, 5, 8, 241, 10, 8, 3, 8, 5, 8, 244, 10, 8, 3, 9, 3, 9, 3, 9, 5, 9, 249, 10, 9, 3, 9, 3, 9, 5, 9, 253, 10, 9, 3, 9, 5, 9, 256, 10, 9, 3, 9, 5, 9, 259, 10, 9, 3, 9, 3, 9, 3, 9, 5, 9, 264, 10, 9, 3, 9, 5, 9, 267, 10, 9, 5, 9, 269, 10, 9, 3, 10, 3, 10, 3, 10, 3, 10, 5, 10, 275, 10, 10, 3, 10, 5, 10, 278, 10, 10, 3, 10, 3, 10, 5, 10, 282, 10, 10, 3, 10, 3, 10, 5, 10, 286, 10, 10, 3, 10, 3, 10, 5, 10, 290, 10, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 5, 11, 301, 10, 11, 3, 12, 3, 12, 3, 12, 5, 12, 306, 10, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 7, 13, 313, 10, 13, 12, 13, 14, 13, 316, 11, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 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, 26, 3, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 40, 3, 40, 3, 41, 3, 41, 3, 42, 3, 42, 3, 43, 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 3, 56, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 58, 3, 58, 3, 58, 3, 58, 7, 58, 438, 10, 58, 12, 58, 14, 58, 441, 11, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 62, 3, 63, 6, 63, 458, 10, 63, 13, 63, 14, 63, 459, 3, 63, 3, 63, 3, 64, 3, 64, 7, 64, 466, 10, 64, 12, 64, 14, 64, 469, 11, 64, 3, 65, 3, 65, 5, 65, 473, 10, 65, 3, 65, 3, 65, 3, 66, 3, 66, 3, 66, 3, 66, 5, 66, 481, 10, 66, 3, 66, 5, 66, 484, 10, 66, 3, 66, 3, 66, 3, 66, 6, 66, 489, 10, 66, 13, 66, 14, 66, 490, 3, 66, 3, 66, 3, 66, 3, 66, 3, 66, 5, 66, 498, 10, 66, 3, 67, 3, 67, 3, 67, 7, 67, 503, 10, 67, 12, 67, 14, 67, 506, 11, 67, 3, 67, 5, 67, 509, 10, 67, 3, 68, 3, 68, 3, 69, 3, 69, 7, 69, 515, 10, 69, 12, 69, 14, 69, 518, 11, 69, 3, 69, 5, 69, 521, 10, 69, 3, 70, 3, 70, 5, 70, 525, 10, 70, 3, 71, 3, 71, 3, 71, 3, 71, 5, 71, 531, 10, 71, 3, 149, 2, 72, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 77, 40, 79, 41, 81, 42, 83, 43, 85, 44, 87, 45, 89, 46, 91, 47, 93, 48, 95, 49, 97, 50, 99, 51, 101, 52, 103, 53, 105, 54, 107, 55, 109, 56, 111, 57, 113, 58, 115, 59, 117, 60, 119, 61, 121, 62, 123, 63, 125, 64, 127, 65, 129, 2, 131, 2, 133, 2, 135, 2, 137, 2, 139, 2, 141, 2, 3, 2, 30, 5, 2, 12, 12, 15, 15, 8234, 8235, 4, 2, 12, 12, 14, 15, 3, 2, 51, 59, 4, 2, 78, 78, 110, 110, 4, 2, 90, 90, 122, 122, 5, 2, 50, 59, 67, 72, 99, 104, 6, 2, 50, 59, 67, 72, 97, 97, 99, 104, 3, 2, 50, 57, 4, 2, 50, 57, 97, 97, 4, 2, 68, 68, 100, 100, 3, 2, 50, 51, 4, 2, 50, 51, 97, 97, 6, 2, 70, 70, 72, 72, 102, 102, 104, 104, 4, 2, 82, 82, 114, 114, 4, 2, 45, 45, 47, 47, 6, 2, 12, 12, 15, 15, 41, 41, 94, 94, 6, 2, 12, 12, 15, 15, 36, 36, 94, 94, 3, 2, 98, 98, 5, 2, 11, 12, 14, 15, 34, 34, 4, 2, 71, 71, 103, 103, 10, 2, 36, 36, 41, 41, 94, 94, 100, 100, 104, 104, 112, 112, 116, 116, 118, 118, 3, 2, 50, 53, 3, 2, 50, 59, 4, 2, 50, 59, 97, 97, 6, 2, 38, 38, 67, 92, 97, 97, 99, 124, 4, 2, 2, 129, 55298, 56321, 3, 2, 55298, 56321, 3, 2, 56322, 57345, 2, 576, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 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, 29, 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, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 3, 143, 3, 2, 2, 2, 5, 157, 3, 2, 2, 2, 7, 168, 3, 2, 2, 2, 9, 190, 3, 2, 2, 2, 11, 195, 3, 2, 2, 2, 13, 210, 3, 2, 2, 2, 15, 230, 3, 2, 2, 2, 17, 268, 3, 2, 2, 2, 19, 270, 3, 2, 2, 2, 21, 300, 3, 2, 2, 2, 23, 302, 3, 2, 2, 2, 25, 309, 3, 2, 2, 2, 27, 319, 3, 2, 2, 2, 29, 324, 3, 2, 2, 2, 31, 326, 3, 2, 2, 2, 33, 328, 3, 2, 2, 2, 35, 330, 3, 2, 2, 2, 37, 332, 3, 2, 2, 2, 39, 334, 3, 2, 2, 2, 41, 336, 3, 2, 2, 2, 43, 338, 3, 2, 2, 2, 45, 340, 3, 2, 2, 2, 47, 342, 3, 2, 2, 2, 49, 344, 3, 2, 2, 2, 51, 346, 3, 2, 2, 2, 53, 348, 3, 2, 2, 2, 55, 350, 3, 2, 2, 2, 57, 352, 3, 2, 2, 2, 59, 354, 3, 2, 2, 2, 61, 356, 3, 2, 2, 2, 63, 359, 3, 2, 2, 2, 65, 362, 3, 2, 2, 2, 67, 365, 3, 2, 2, 2, 69, 368, 3, 2, 2, 2, 71, 371, 3, 2, 2, 2, 73, 374, 3, 2, 2, 2, 75, 377, 3, 2, 2, 2, 77, 380, 3, 2, 2, 2, 79, 382, 3, 2, 2, 2, 81, 384, 3, 2, 2, 2, 83, 386, 3, 2, 2, 2, 85, 388, 3, 2, 2, 2, 87, 390, 3, 2, 2, 2, 89, 392, 3, 2, 2, 2, 91, 394, 3, 2, 2, 2, 93, 396, 3, 2, 2, 2, 95, 399, 3, 2, 2, 2, 97, 402, 3, 2, 2, 2, 99, 405, 3, 2, 2, 2, 101, 408, 3, 2, 2, 2, 103, 411, 3, 2, 2, 2, 105, 414, 3, 2, 2, 2, 107, 417, 3, 2, 2, 2, 109, 420, 3, 2, 2, 2, 111, 424, 3, 2, 2, 2, 113, 428, 3, 2, 2, 2, 115, 433, 3, 2, 2, 2, 117, 444, 3, 2, 2, 2, 119, 447, 3, 2, 2, 2, 121, 450, 3, 2, 2, 2, 123, 452, 3, 2, 2, 2, 125, 457, 3, 2, 2, 2, 127, 463, 3, 2, 2, 2, 129, 470, 3, 2, 2, 2, 131, 497, 3, 2, 2, 2, 133, 499, 3, 2, 2, 2, 135, 510, 3, 2, 2, 2, 137, 512, 3, 2, 2, 2, 139, 524, 3, 2, 2, 2, 141, 530, 3, 2, 2, 2, 143, 144, 7, 49, 2, 2, 144, 145, 7, 44, 2, 2, 145, 149, 3, 2, 2, 2, 146, 148, 11, 2, 2, 2, 147, 146, 3, 2, 2, 2, 148, 151, 3, 2, 2, 2, 149, 150, 3, 2, 2, 2, 149, 147, 3, 2, 2, 2, 150, 152, 3, 2, 2, 2, 151, 149, 3, 2, 2, 2, 152, 153, 7, 44, 2, 2, 153, 154, 7, 49, 2, 2, 154, 155, 3, 2, 2, 2, 155, 156, 8, 2, 2, 2, 156, 4, 3, 2, 2, 2, 157, 158, 7, 49, 2, 2, 158, 159, 7, 49, 2, 2, 159, 163, 3, 2, 2, 2, 160, 162, 10, 2, 2, 2, 161, 160, 3, 2, 2, 2, 162, 165, 3, 2, 2, 2, 163, 161, 3, 2, 2, 2, 163, 164, 3, 2, 2, 2, 164, 166, 3, 2, 2, 2, 165, 163, 3, 2, 2, 2, 166, 167, 8, 3, 2, 2, 167, 6, 3, 2, 2, 2, 168, 172, 7, 37, 2, 2, 169, 171, 10, 3, 2, 2, 170, 169, 3, 2, 2, 2, 171, 174, 3, 2, 2, 2, 172, 170, 3, 2, 2, 2, 172, 173, 3, 2, 2, 2, 173, 175, 3, 2, 2, 2, 174, 172, 3, 2, 2, 2, 175, 176, 8, 4, 2, 2, 176, 8, 3, 2, 2, 2, 177, 191, 7, 50, 2, 2, 178, 188, 9, 4, 2, 2, 179, 181, 5, 137, 69, 2, 180, 179, 3, 2, 2, 2, 180, 181, 3, 2, 2, 2, 181, 189, 3, 2, 2, 2, 182, 184, 7, 97, 2, 2, 183, 182, 3, 2, 2, 2, 184, 185, 3, 2, 2, 2, 185, 183, 3, 2, 2, 2, 185, 186, 3, 2, 2, 2, 186, 187, 3, 2, 2, 2, 187, 189, 5, 137, 69, 2, 188, 180, 3, 2, 2, 2, 188, 183, 3, 2, 2, 2, 189, 191, 3, 2, 2, 2, 190, 177, 3, 2, 2, 2, 190, 178, 3, 2, 2, 2, 191, 193, 3, 2, 2, 2, 192, 194, 9, 5, 2, 2, 193, 192, 3, 2, 2, 2, 193, 194, 3, 2, 2, 2, 194, 10, 3, 2, 2, 2, 195, 196, 7, 50, 2, 2, 196, 197, 9, 6, 2, 2, 197, 205, 9, 7, 2, 2, 198, 200, 9, 8, 2, 2, 199, 198, 3, 2, 2, 2, 200, 203, 3, 2, 2, 2, 201, 199, 3, 2, 2, 2, 201, 202, 3, 2, 2, 2, 202, 204, 3, 2, 2, 2, 203, 201, 3, 2, 2, 2, 204, 206, 9, 7, 2, 2, 205, 201, 3, 2, 2, 2, 205, 206, 3, 2, 2, 2, 206, 208, 3, 2, 2, 2, 207, 209, 9, 5, 2, 2, 208, 207, 3, 2, 2, 2, 208, 209, 3, 2, 2, 2, 209, 12, 3, 2, 2, 2, 210, 214, 7, 50, 2, 2, 211, 213, 7, 97, 2, 2, 212, 211, 3, 2, 2, 2, 213, 216, 3, 2, 2, 2, 214, 212, 3, 2, 2, 2, 214, 215, 3, 2, 2, 2, 215, 217, 3, 2, 2, 2, 216, 214, 3, 2, 2, 2, 217, 225, 9, 9, 2, 2, 218, 220, 9, 10, 2, 2, 219, 218, 3, 2, 2, 2, 220, 223, 3, 2, 2, 2, 221, 219, 3, 2, 2, 2, 221, 222, 3, 2, 2, 2, 222, 224, 3, 2, 2, 2, 223, 221, 3, 2, 2, 2, 224, 226, 9, 9, 2, 2, 225, 221, 3, 2, 2, 2, 225, 226, 3, 2, 2, 2, 226, 228, 3, 2, 2, 2, 227, 229, 9, 5, 2, 2, 228, 227, 3, 2, 2, 2, 228, 229, 3, 2, 2, 2, 229, 14, 3, 2, 2, 2, 230, 231, 7, 50, 2, 2, 231, 232, 9, 11, 2, 2, 232, 240, 9, 12, 2, 2, 233, 235, 9, 13, 2, 2, 234, 233, 3, 2, 2, 2, 235, 238, 3, 2, 2, 2, 236, 234, 3, 2, 2, 2, 236, 237, 3, 2, 2, 2, 237, 239, 3, 2, 2, 2, 238, 236, 3, 2, 2, 2, 239, 241, 9, 12, 2, 2, 240, 236, 3, 2, 2, 2, 240, 241, 3, 2, 2, 2, 241, 243, 3, 2, 2, 2, 242, 244, 9, 5, 2, 2, 243, 242, 3, 2, 2, 2, 243, 244, 3, 2, 2, 2, 244, 16, 3, 2, 2, 2, 245, 246, 5, 137, 69, 2, 246, 248, 7, 48, 2, 2, 247, 249, 5, 137, 69, 2, 248, 247, 3, 2, 2, 2, 248, 249, 3, 2, 2, 2, 249, 253, 3, 2, 2, 2, 250, 251, 7, 48, 2, 2, 251, 253, 5, 137, 69, 2, 252, 245, 3, 2, 2, 2, 252, 250, 3, 2, 2, 2, 253, 255, 3, 2, 2, 2, 254, 256, 5, 129, 65, 2, 255, 254, 3, 2, 2, 2, 255, 256, 3, 2, 2, 2, 256, 258, 3, 2, 2, 2, 257, 259, 9, 14, 2, 2, 258, 257, 3, 2, 2, 2, 258, 259, 3, 2, 2, 2, 259, 269, 3, 2, 2, 2, 260, 266, 5, 137, 69, 2, 261, 263, 5, 129, 65, 2, 262, 264, 9, 14, 2, 2, 263, 262, 3, 2, 2, 2, 263, 264, 3, 2, 2, 2, 264, 267, 3, 2, 2, 2, 265, 267, 9, 14, 2, 2, 266, 261, 3, 2, 2, 2, 266, 265, 3, 2, 2, 2, 267, 269, 3, 2, 2, 2, 268, 252, 3, 2, 2, 2, 268, 260, 3, 2, 2, 2, 269, 18, 3, 2, 2, 2, 270, 271, 7, 50, 2, 2, 271, 281, 9, 6, 2, 2, 272, 274, 5, 133, 67, 2, 273, 275, 7, 48, 2, 2, 274, 273, 3, 2, 2, 2, 274, 275, 3, 2, 2, 2, 275, 282, 3, 2, 2, 2, 276, 278, 5, 133, 67, 2, 277, 276, 3, 2, 2, 2, 277, 278, 3, 2, 2, 2, 278, 279, 3, 2, 2, 2, 279, 280, 7, 48, 2, 2, 280, 282, 5, 133, 67, 2, 281, 272, 3, 2, 2, 2, 281, 277, 3, 2, 2, 2, 282, 283, 3, 2, 2, 2, 283, 285, 9, 15, 2, 2, 284, 286, 9, 16, 2, 2, 285, 284, 3, 2, 2, 2, 285, 286, 3, 2, 2, 2, 286, 287, 3, 2, 2, 2, 287, 289, 5, 137, 69, 2, 288, 290, 9, 14, 2, 2, 289, 288, 3, 2, 2, 2, 289, 290, 3, 2, 2, 2, 290, 20, 3, 2, 2, 2, 291, 292, 7, 118, 2, 2, 292, 293, 7, 116, 2, 2, 293, 294, 7, 119, 2, 2, 294, 301, 7, 103, 2, 2, 295, 296, 7, 104, 2, 2, 296, 297, 7, 99, 2, 2, 297, 298, 7, 110, 2, 2, 298, 299, 7, 117, 2, 2, 299, 301, 7, 103, 2, 2, 300, 291, 3, 2, 2, 2, 300, 295, 3, 2, 2, 2, 301, 22, 3, 2, 2, 2, 302, 305, 7, 41, 2, 2, 303, 306, 10, 17, 2, 2, 304, 306, 5, 131, 66, 2, 305, 303, 3, 2, 2, 2, 305, 304, 3, 2, 2, 2, 306, 307, 3, 2, 2, 2, 307, 308, 7, 41, 2, 2, 308, 24, 3, 2, 2, 2, 309, 314, 7, 36, 2, 2, 310, 313, 10, 18, 2, 2, 311, 313, 5, 131, 66, 2, 312, 310, 3, 2, 2, 2, 312, 311, 3, 2, 2, 2, 313, 316, 3, 2, 2, 2, 314, 312, 3, 2, 2, 2, 314, 315, 3, 2, 2, 2, 315, 317, 3, 2, 2, 2, 316, 314, 3, 2, 2, 2, 317, 318, 7, 36, 2, 2, 318, 26, 3, 2, 2, 2, 319, 320, 7, 112, 2, 2, 320, 321, 7, 119, 2, 2, 321, 322, 7, 110, 2, 2, 322, 323, 7, 110, 2, 2, 323, 28, 3, 2, 2, 2, 324, 325, 7, 42, 2, 2, 325, 30, 3, 2, 2, 2, 326, 327, 7, 43, 2, 2, 327, 32, 3, 2, 2, 2, 328, 329, 7, 125, 2, 2, 329, 34, 3, 2, 2, 2, 330, 331, 7, 127, 2, 2, 331, 36, 3, 2, 2, 2, 332, 333, 7, 93, 2, 2, 333, 38, 3, 2, 2, 2, 334, 335, 7, 95, 2, 2, 335, 40, 3, 2, 2, 2, 336, 337, 7, 61, 2, 2, 337, 42, 3, 2, 2, 2, 338, 339, 7, 46, 2, 2, 339, 44, 3, 2, 2, 2, 340, 341, 7, 48, 2, 2, 341, 46, 3, 2, 2, 2, 342, 343, 7, 63, 2, 2, 343, 48, 3, 2, 2, 2, 344, 345, 7, 64, 2, 2, 345, 50, 3, 2, 2, 2, 346, 347, 7, 62, 2, 2, 347, 52, 3, 2, 2, 2, 348, 349, 7, 35, 2, 2, 349, 54, 3, 2, 2, 2, 350, 351, 7, 128, 2, 2, 351, 56, 3, 2, 2, 2, 352, 353, 7, 65, 2, 2, 353, 58, 3, 2, 2, 2, 354, 355, 7, 60, 2, 2, 355, 60, 3, 2, 2, 2, 356, 357, 7, 63, 2, 2, 357, 358, 7, 63, 2, 2, 358, 62, 3, 2, 2, 2, 359, 360, 7, 62, 2, 2, 360, 361, 7, 63, 2, 2, 361, 64, 3, 2, 2, 2, 362, 363, 7, 64, 2, 2, 363, 364, 7, 63, 2, 2, 364, 66, 3, 2, 2, 2, 365, 366, 7, 35, 2, 2, 366, 367, 7, 63, 2, 2, 367, 68, 3, 2, 2, 2, 368, 369, 7, 40, 2, 2, 369, 370, 7, 40, 2, 2, 370, 70, 3, 2, 2, 2, 371, 372, 7, 126, 2, 2, 372, 373, 7, 126, 2, 2, 373, 72, 3, 2, 2, 2, 374, 375, 7, 45, 2, 2, 375, 376, 7, 45, 2, 2, 376, 74, 3, 2, 2, 2, 377, 378, 7, 47, 2, 2, 378, 379, 7, 47, 2, 2, 379, 76, 3, 2, 2, 2, 380, 381, 7, 45, 2, 2, 381, 78, 3, 2, 2, 2, 382, 383, 7, 47, 2, 2, 383, 80, 3, 2, 2, 2, 384, 385, 7, 44, 2, 2, 385, 82, 3, 2, 2, 2, 386, 387, 7, 49, 2, 2, 387, 84, 3, 2, 2, 2, 388, 389, 7, 40, 2, 2, 389, 86, 3, 2, 2, 2, 390, 391, 7, 126, 2, 2, 391, 88, 3, 2, 2, 2, 392, 393, 7, 96, 2, 2, 393, 90, 3, 2, 2, 2, 394, 395, 7, 39, 2, 2, 395, 92, 3, 2, 2, 2, 396, 397, 7, 45, 2, 2, 397, 398, 7, 63, 2, 2, 398, 94, 3, 2, 2, 2, 399, 400, 7, 47, 2, 2, 400, 401, 7, 63, 2, 2, 401, 96, 3, 2, 2, 2, 402, 403, 7, 44, 2, 2, 403, 404, 7, 63, 2, 2, 404, 98, 3, 2, 2, 2, 405, 406, 7, 49, 2, 2, 406, 407, 7, 63, 2, 2, 407, 100, 3, 2, 2, 2, 408, 409, 7, 40, 2, 2, 409, 410, 7, 63, 2, 2, 410, 102, 3, 2, 2, 2, 411, 412, 7, 126, 2, 2, 412, 413, 7, 63, 2, 2, 413, 104, 3, 2, 2, 2, 414, 415, 7, 96, 2, 2, 415, 416, 7, 63, 2, 2, 416, 106, 3, 2, 2, 2, 417, 418, 7, 39, 2, 2, 418, 419, 7, 63, 2, 2, 419, 108, 3, 2, 2, 2, 420, 421, 7, 62, 2, 2, 421, 422, 7, 62, 2, 2, 422, 423, 7, 63, 2, 2, 423, 110, 3, 2, 2, 2, 424, 425, 7, 64, 2, 2, 425, 426, 7, 64, 2, 2, 426, 427, 7, 63, 2, 2, 427, 112, 3, 2, 2, 2, 428, 429, 7, 64, 2, 2, 429, 430, 7, 64, 2, 2, 430, 431, 7, 64, 2, 2, 431, 432, 7, 63, 2, 2, 432, 114, 3, 2, 2, 2, 433, 439, 7, 98, 2, 2, 434, 435, 7, 94, 2, 2, 435, 438, 7, 98, 2, 2, 436, 438, 10, 19, 2, 2, 437, 434, 3, 2, 2, 2, 437, 436, 3, 2, 2, 2, 438, 441, 3, 2, 2, 2, 439, 437, 3, 2, 2, 2, 439, 440, 3, 2, 2, 2, 440, 442, 3, 2, 2, 2, 441, 439, 3, 2, 2, 2, 442, 443, 7, 98, 2, 2, 443, 116, 3, 2, 2, 2, 444, 445, 7, 47, 2, 2, 445, 446, 7, 64, 2, 2, 446, 118, 3, 2, 2, 2, 447, 448, 7, 60, 2, 2, 448, 449, 7, 60, 2, 2, 449, 120, 3, 2, 2, 2, 450, 451, 7, 66, 2, 2, 451, 122, 3, 2, 2, 2, 452, 453, 7, 48, 2, 2, 453, 454, 7, 48, 2, 2, 454, 455, 7, 48, 2, 2, 455, 124, 3, 2, 2, 2, 456, 458, 9, 20, 2, 2, 457, 456, 3, 2, 2, 2, 458, 459, 3, 2, 2, 2, 459, 457, 3, 2, 2, 2, 459, 460, 3, 2, 2, 2, 460, 461, 3, 2, 2, 2, 461, 462, 8, 63, 2, 2, 462, 126, 3, 2, 2, 2, 463, 467, 5, 141, 71, 2, 464, 466, 5, 139, 70, 2, 465, 464, 3, 2, 2, 2, 466, 469, 3, 2, 2, 2, 467, 465, 3, 2, 2, 2, 467, 468, 3, 2, 2, 2, 468, 128, 3, 2, 2, 2, 469, 467, 3, 2, 2, 2, 470, 472, 9, 21, 2, 2, 471, 473, 9, 16, 2, 2, 472, 471, 3, 2, 2, 2, 472, 473, 3, 2, 2, 2, 473, 474, 3, 2, 2, 2, 474, 475, 5, 137, 69, 2, 475, 130, 3, 2, 2, 2, 476, 477, 7, 94, 2, 2, 477, 498, 9, 22, 2, 2, 478, 483, 7, 94, 2, 2, 479, 481, 9, 23, 2, 2, 480, 479, 3, 2, 2, 2, 480, 481, 3, 2, 2, 2, 481, 482, 3, 2, 2, 2, 482, 484, 9, 9, 2, 2, 483, 480, 3, 2, 2, 2, 483, 484, 3, 2, 2, 2, 484, 485, 3, 2, 2, 2, 485, 498, 9, 9, 2, 2, 486, 488, 7, 94, 2, 2, 487, 489, 7, 119, 2, 2, 488, 487, 3, 2, 2, 2, 489, 490, 3, 2, 2, 2, 490, 488, 3, 2, 2, 2, 490, 491, 3, 2, 2, 2, 491, 492, 3, 2, 2, 2, 492, 493, 5, 135, 68, 2, 493, 494, 5, 135, 68, 2, 494, 495, 5, 135, 68, 2, 495, 496, 5, 135, 68, 2, 496, 498, 3, 2, 2, 2, 497, 476, 3, 2, 2, 2, 497, 478, 3, 2, 2, 2, 497, 486, 3, 2, 2, 2, 498, 132, 3, 2, 2, 2, 499, 508, 5, 135, 68, 2, 500, 503, 5, 135, 68, 2, 501, 503, 7, 97, 2, 2, 502, 500, 3, 2, 2, 2, 502, 501, 3, 2, 2, 2, 503, 506, 3, 2, 2, 2, 504, 502, 3, 2, 2, 2, 504, 505, 3, 2, 2, 2, 505, 507, 3, 2, 2, 2, 506, 504, 3, 2, 2, 2, 507, 509, 5, 135, 68, 2, 508, 504, 3, 2, 2, 2, 508, 509, 3, 2, 2, 2, 509, 134, 3, 2, 2, 2, 510, 511, 9, 7, 2, 2, 511, 136, 3, 2, 2, 2, 512, 520, 9, 24, 2, 2, 513, 515, 9, 25, 2, 2, 514, 513, 3, 2, 2, 2, 515, 518, 3, 2, 2, 2, 516, 514, 3, 2, 2, 2, 516, 517, 3, 2, 2, 2, 517, 519, 3, 2, 2, 2, 518, 516, 3, 2, 2, 2, 519, 521, 9, 24, 2, 2, 520, 516, 3, 2, 2, 2, 520, 521, 3, 2, 2, 2, 521, 138, 3, 2, 2, 2, 522, 525, 5, 141, 71, 2, 523, 525, 9, 24, 2, 2, 524, 522, 3, 2, 2, 2, 524, 523, 3, 2, 2, 2, 525, 140, 3, 2, 2, 2, 526, 531, 9, 26, 2, 2, 527, 531, 10, 27, 2, 2, 528, 529, 9, 28, 2, 2, 529, 531, 9, 29, 2, 2, 530, 526, 3, 2, 2, 2, 530, 527, 3, 2, 2, 2, 530, 528, 3, 2, 2, 2, 531, 142, 3, 2, 2, 2, 53, 2, 149, 163, 172, 180, 185, 188, 190, 193, 201, 205, 208, 214, 221, 225, 228, 236, 240, 243, 248, 252, 255, 258, 263, 266, 268, 274, 277, 281, 285, 289, 300, 305, 312, 314, 437, 439, 459, 467, 472, 480, 483, 490, 497, 502, 504, 508, 516, 520, 524, 530, 3, 2, 3, 2] \ No newline at end of file diff --git a/chapi-ast-comments/src/main/java/chapi/ast/antlr/CommentLexer.java b/chapi-ast-comments/src/main/java/chapi/ast/antlr/CommentLexer.java new file mode 100644 index 00000000..d7fb327a --- /dev/null +++ b/chapi-ast-comments/src/main/java/chapi/ast/antlr/CommentLexer.java @@ -0,0 +1,347 @@ +// Generated from CommentLexer.g4 by ANTLR 4.8 +package chapi.ast.antlr; +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 CommentLexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.8", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + COMMENT=1, LINE_COMMENT=2, PYTHON_COMMENT=3, DECIMAL_LITERAL=4, HEX_LITERAL=5, + OCT_LITERAL=6, BINARY_LITERAL=7, FLOAT_LITERAL=8, HEX_FLOAT_LITERAL=9, + BOOL_LITERAL=10, CHAR_LITERAL=11, STRING_LITERAL=12, NULL_LITERAL=13, + LPAREN=14, RPAREN=15, LBRACE=16, RBRACE=17, LBRACK=18, RBRACK=19, SEMI=20, + COMMA=21, DOT=22, ASSIGN=23, GT=24, LT=25, BANG=26, TILDE=27, QUESTION=28, + COLON=29, EQUAL=30, LE=31, GE=32, NOTEQUAL=33, AND=34, OR=35, INC=36, + DEC=37, ADD=38, SUB=39, MUL=40, DIV=41, BITAND=42, BITOR=43, CARET=44, + MOD=45, ADD_ASSIGN=46, SUB_ASSIGN=47, MUL_ASSIGN=48, DIV_ASSIGN=49, AND_ASSIGN=50, + OR_ASSIGN=51, XOR_ASSIGN=52, MOD_ASSIGN=53, LSHIFT_ASSIGN=54, RSHIFT_ASSIGN=55, + URSHIFT_ASSIGN=56, TemplateStringLiteral=57, ARROW=58, COLONCOLON=59, + AT=60, ELLIPSIS=61, WS=62, IDENTIFIER=63; + public static String[] channelNames = { + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + }; + + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + private static String[] makeRuleNames() { + return new String[] { + "COMMENT", "LINE_COMMENT", "PYTHON_COMMENT", "DECIMAL_LITERAL", "HEX_LITERAL", + "OCT_LITERAL", "BINARY_LITERAL", "FLOAT_LITERAL", "HEX_FLOAT_LITERAL", + "BOOL_LITERAL", "CHAR_LITERAL", "STRING_LITERAL", "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", "TemplateStringLiteral", + "ARROW", "COLONCOLON", "AT", "ELLIPSIS", "WS", "IDENTIFIER", "ExponentPart", + "EscapeSequence", "HexDigits", "HexDigit", "Digits", "LetterOrDigit", + "Letter" + }; + } + public static final String[] ruleNames = makeRuleNames(); + + private static String[] makeLiteralNames() { + return new String[] { + null, null, null, null, null, null, null, null, null, null, null, null, + null, "'null'", "'('", "')'", "'{'", "'}'", "'['", "']'", "';'", "','", + "'.'", "'='", "'>'", "'<'", "'!'", "'~'", "'?'", "':'", "'=='", "'<='", + "'>='", "'!='", "'&&'", "'||'", "'++'", "'--'", "'+'", "'-'", "'*'", + "'/'", "'&'", "'|'", "'^'", "'%'", "'+='", "'-='", "'*='", "'/='", "'&='", + "'|='", "'^='", "'%='", "'<<='", "'>>='", "'>>>='", null, "'->'", "'::'", + "'@'", "'...'" + }; + } + private static final String[] _LITERAL_NAMES = makeLiteralNames(); + private static String[] makeSymbolicNames() { + return new String[] { + null, "COMMENT", "LINE_COMMENT", "PYTHON_COMMENT", "DECIMAL_LITERAL", + "HEX_LITERAL", "OCT_LITERAL", "BINARY_LITERAL", "FLOAT_LITERAL", "HEX_FLOAT_LITERAL", + "BOOL_LITERAL", "CHAR_LITERAL", "STRING_LITERAL", "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", "TemplateStringLiteral", + "ARROW", "COLONCOLON", "AT", "ELLIPSIS", "WS", "IDENTIFIER" + }; + } + private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); + 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 CommentLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "CommentLexer.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getChannelNames() { return channelNames; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + public static final String _serializedATN = + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2A\u0214\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\3\2\3\2\3"+ + "\2\3\2\7\2\u0094\n\2\f\2\16\2\u0097\13\2\3\2\3\2\3\2\3\2\3\2\3\3\3\3\3"+ + "\3\3\3\7\3\u00a2\n\3\f\3\16\3\u00a5\13\3\3\3\3\3\3\4\3\4\7\4\u00ab\n\4"+ + "\f\4\16\4\u00ae\13\4\3\4\3\4\3\5\3\5\3\5\5\5\u00b5\n\5\3\5\6\5\u00b8\n"+ + "\5\r\5\16\5\u00b9\3\5\5\5\u00bd\n\5\5\5\u00bf\n\5\3\5\5\5\u00c2\n\5\3"+ + "\6\3\6\3\6\3\6\7\6\u00c8\n\6\f\6\16\6\u00cb\13\6\3\6\5\6\u00ce\n\6\3\6"+ + "\5\6\u00d1\n\6\3\7\3\7\7\7\u00d5\n\7\f\7\16\7\u00d8\13\7\3\7\3\7\7\7\u00dc"+ + "\n\7\f\7\16\7\u00df\13\7\3\7\5\7\u00e2\n\7\3\7\5\7\u00e5\n\7\3\b\3\b\3"+ + "\b\3\b\7\b\u00eb\n\b\f\b\16\b\u00ee\13\b\3\b\5\b\u00f1\n\b\3\b\5\b\u00f4"+ + "\n\b\3\t\3\t\3\t\5\t\u00f9\n\t\3\t\3\t\5\t\u00fd\n\t\3\t\5\t\u0100\n\t"+ + "\3\t\5\t\u0103\n\t\3\t\3\t\3\t\5\t\u0108\n\t\3\t\5\t\u010b\n\t\5\t\u010d"+ + "\n\t\3\n\3\n\3\n\3\n\5\n\u0113\n\n\3\n\5\n\u0116\n\n\3\n\3\n\5\n\u011a"+ + "\n\n\3\n\3\n\5\n\u011e\n\n\3\n\3\n\5\n\u0122\n\n\3\13\3\13\3\13\3\13\3"+ + "\13\3\13\3\13\3\13\3\13\5\13\u012d\n\13\3\f\3\f\3\f\5\f\u0132\n\f\3\f"+ + "\3\f\3\r\3\r\3\r\7\r\u0139\n\r\f\r\16\r\u013c\13\r\3\r\3\r\3\16\3\16\3"+ + "\16\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\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\35\3\35\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\60\3\60\3\60\3\61\3\61\3\61\3\62"+ + "\3\62\3\62\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\3\67\38\38\38\38\39\39\39\39\39\3:\3:\3:\3:\7:\u01b6\n"+ + ":\f:\16:\u01b9\13:\3:\3:\3;\3;\3;\3<\3<\3<\3=\3=\3>\3>\3>\3>\3?\6?\u01ca"+ + "\n?\r?\16?\u01cb\3?\3?\3@\3@\7@\u01d2\n@\f@\16@\u01d5\13@\3A\3A\5A\u01d9"+ + "\nA\3A\3A\3B\3B\3B\3B\5B\u01e1\nB\3B\5B\u01e4\nB\3B\3B\3B\6B\u01e9\nB"+ + "\rB\16B\u01ea\3B\3B\3B\3B\3B\5B\u01f2\nB\3C\3C\3C\7C\u01f7\nC\fC\16C\u01fa"+ + "\13C\3C\5C\u01fd\nC\3D\3D\3E\3E\7E\u0203\nE\fE\16E\u0206\13E\3E\5E\u0209"+ + "\nE\3F\3F\5F\u020d\nF\3G\3G\3G\3G\5G\u0213\nG\3\u0095\2H\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_\61a\62c\63e\64g\65i\66k\67m8o9q:s;u{"+ + "?}@\177A\u0081\2\u0083\2\u0085\2\u0087\2\u0089\2\u008b\2\u008d\2\3\2\36"+ + "\5\2\f\f\17\17\u202a\u202b\4\2\f\f\16\17\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$$^^\3\2bb\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"+ + "\2\u0240\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2"+ + "\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27"+ + "\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2"+ + "\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2"+ + "\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2"+ + "\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2"+ + "\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S"+ + "\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2"+ + "\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2\2k\3\2\2\2"+ + "\2m\3\2\2\2\2o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\2u\3\2\2\2\2w\3\2\2\2\2y"+ + "\3\2\2\2\2{\3\2\2\2\2}\3\2\2\2\2\177\3\2\2\2\3\u008f\3\2\2\2\5\u009d\3"+ + "\2\2\2\7\u00a8\3\2\2\2\t\u00be\3\2\2\2\13\u00c3\3\2\2\2\r\u00d2\3\2\2"+ + "\2\17\u00e6\3\2\2\2\21\u010c\3\2\2\2\23\u010e\3\2\2\2\25\u012c\3\2\2\2"+ + "\27\u012e\3\2\2\2\31\u0135\3\2\2\2\33\u013f\3\2\2\2\35\u0144\3\2\2\2\37"+ + "\u0146\3\2\2\2!\u0148\3\2\2\2#\u014a\3\2\2\2%\u014c\3\2\2\2\'\u014e\3"+ + "\2\2\2)\u0150\3\2\2\2+\u0152\3\2\2\2-\u0154\3\2\2\2/\u0156\3\2\2\2\61"+ + "\u0158\3\2\2\2\63\u015a\3\2\2\2\65\u015c\3\2\2\2\67\u015e\3\2\2\29\u0160"+ + "\3\2\2\2;\u0162\3\2\2\2=\u0164\3\2\2\2?\u0167\3\2\2\2A\u016a\3\2\2\2C"+ + "\u016d\3\2\2\2E\u0170\3\2\2\2G\u0173\3\2\2\2I\u0176\3\2\2\2K\u0179\3\2"+ + "\2\2M\u017c\3\2\2\2O\u017e\3\2\2\2Q\u0180\3\2\2\2S\u0182\3\2\2\2U\u0184"+ + "\3\2\2\2W\u0186\3\2\2\2Y\u0188\3\2\2\2[\u018a\3\2\2\2]\u018c\3\2\2\2_"+ + "\u018f\3\2\2\2a\u0192\3\2\2\2c\u0195\3\2\2\2e\u0198\3\2\2\2g\u019b\3\2"+ + "\2\2i\u019e\3\2\2\2k\u01a1\3\2\2\2m\u01a4\3\2\2\2o\u01a8\3\2\2\2q\u01ac"+ + "\3\2\2\2s\u01b1\3\2\2\2u\u01bc\3\2\2\2w\u01bf\3\2\2\2y\u01c2\3\2\2\2{"+ + "\u01c4\3\2\2\2}\u01c9\3\2\2\2\177\u01cf\3\2\2\2\u0081\u01d6\3\2\2\2\u0083"+ + "\u01f1\3\2\2\2\u0085\u01f3\3\2\2\2\u0087\u01fe\3\2\2\2\u0089\u0200\3\2"+ + "\2\2\u008b\u020c\3\2\2\2\u008d\u0212\3\2\2\2\u008f\u0090\7\61\2\2\u0090"+ + "\u0091\7,\2\2\u0091\u0095\3\2\2\2\u0092\u0094\13\2\2\2\u0093\u0092\3\2"+ + "\2\2\u0094\u0097\3\2\2\2\u0095\u0096\3\2\2\2\u0095\u0093\3\2\2\2\u0096"+ + "\u0098\3\2\2\2\u0097\u0095\3\2\2\2\u0098\u0099\7,\2\2\u0099\u009a\7\61"+ + "\2\2\u009a\u009b\3\2\2\2\u009b\u009c\b\2\2\2\u009c\4\3\2\2\2\u009d\u009e"+ + "\7\61\2\2\u009e\u009f\7\61\2\2\u009f\u00a3\3\2\2\2\u00a0\u00a2\n\2\2\2"+ + "\u00a1\u00a0\3\2\2\2\u00a2\u00a5\3\2\2\2\u00a3\u00a1\3\2\2\2\u00a3\u00a4"+ + "\3\2\2\2\u00a4\u00a6\3\2\2\2\u00a5\u00a3\3\2\2\2\u00a6\u00a7\b\3\2\2\u00a7"+ + "\6\3\2\2\2\u00a8\u00ac\7%\2\2\u00a9\u00ab\n\3\2\2\u00aa\u00a9\3\2\2\2"+ + "\u00ab\u00ae\3\2\2\2\u00ac\u00aa\3\2\2\2\u00ac\u00ad\3\2\2\2\u00ad\u00af"+ + "\3\2\2\2\u00ae\u00ac\3\2\2\2\u00af\u00b0\b\4\2\2\u00b0\b\3\2\2\2\u00b1"+ + "\u00bf\7\62\2\2\u00b2\u00bc\t\4\2\2\u00b3\u00b5\5\u0089E\2\u00b4\u00b3"+ + "\3\2\2\2\u00b4\u00b5\3\2\2\2\u00b5\u00bd\3\2\2\2\u00b6\u00b8\7a\2\2\u00b7"+ + "\u00b6\3\2\2\2\u00b8\u00b9\3\2\2\2\u00b9\u00b7\3\2\2\2\u00b9\u00ba\3\2"+ + "\2\2\u00ba\u00bb\3\2\2\2\u00bb\u00bd\5\u0089E\2\u00bc\u00b4\3\2\2\2\u00bc"+ + "\u00b7\3\2\2\2\u00bd\u00bf\3\2\2\2\u00be\u00b1\3\2\2\2\u00be\u00b2\3\2"+ + "\2\2\u00bf\u00c1\3\2\2\2\u00c0\u00c2\t\5\2\2\u00c1\u00c0\3\2\2\2\u00c1"+ + "\u00c2\3\2\2\2\u00c2\n\3\2\2\2\u00c3\u00c4\7\62\2\2\u00c4\u00c5\t\6\2"+ + "\2\u00c5\u00cd\t\7\2\2\u00c6\u00c8\t\b\2\2\u00c7\u00c6\3\2\2\2\u00c8\u00cb"+ + "\3\2\2\2\u00c9\u00c7\3\2\2\2\u00c9\u00ca\3\2\2\2\u00ca\u00cc\3\2\2\2\u00cb"+ + "\u00c9\3\2\2\2\u00cc\u00ce\t\7\2\2\u00cd\u00c9\3\2\2\2\u00cd\u00ce\3\2"+ + "\2\2\u00ce\u00d0\3\2\2\2\u00cf\u00d1\t\5\2\2\u00d0\u00cf\3\2\2\2\u00d0"+ + "\u00d1\3\2\2\2\u00d1\f\3\2\2\2\u00d2\u00d6\7\62\2\2\u00d3\u00d5\7a\2\2"+ + "\u00d4\u00d3\3\2\2\2\u00d5\u00d8\3\2\2\2\u00d6\u00d4\3\2\2\2\u00d6\u00d7"+ + "\3\2\2\2\u00d7\u00d9\3\2\2\2\u00d8\u00d6\3\2\2\2\u00d9\u00e1\t\t\2\2\u00da"+ + "\u00dc\t\n\2\2\u00db\u00da\3\2\2\2\u00dc\u00df\3\2\2\2\u00dd\u00db\3\2"+ + "\2\2\u00dd\u00de\3\2\2\2\u00de\u00e0\3\2\2\2\u00df\u00dd\3\2\2\2\u00e0"+ + "\u00e2\t\t\2\2\u00e1\u00dd\3\2\2\2\u00e1\u00e2\3\2\2\2\u00e2\u00e4\3\2"+ + "\2\2\u00e3\u00e5\t\5\2\2\u00e4\u00e3\3\2\2\2\u00e4\u00e5\3\2\2\2\u00e5"+ + "\16\3\2\2\2\u00e6\u00e7\7\62\2\2\u00e7\u00e8\t\13\2\2\u00e8\u00f0\t\f"+ + "\2\2\u00e9\u00eb\t\r\2\2\u00ea\u00e9\3\2\2\2\u00eb\u00ee\3\2\2\2\u00ec"+ + "\u00ea\3\2\2\2\u00ec\u00ed\3\2\2\2\u00ed\u00ef\3\2\2\2\u00ee\u00ec\3\2"+ + "\2\2\u00ef\u00f1\t\f\2\2\u00f0\u00ec\3\2\2\2\u00f0\u00f1\3\2\2\2\u00f1"+ + "\u00f3\3\2\2\2\u00f2\u00f4\t\5\2\2\u00f3\u00f2\3\2\2\2\u00f3\u00f4\3\2"+ + "\2\2\u00f4\20\3\2\2\2\u00f5\u00f6\5\u0089E\2\u00f6\u00f8\7\60\2\2\u00f7"+ + "\u00f9\5\u0089E\2\u00f8\u00f7\3\2\2\2\u00f8\u00f9\3\2\2\2\u00f9\u00fd"+ + "\3\2\2\2\u00fa\u00fb\7\60\2\2\u00fb\u00fd\5\u0089E\2\u00fc\u00f5\3\2\2"+ + "\2\u00fc\u00fa\3\2\2\2\u00fd\u00ff\3\2\2\2\u00fe\u0100\5\u0081A\2\u00ff"+ + "\u00fe\3\2\2\2\u00ff\u0100\3\2\2\2\u0100\u0102\3\2\2\2\u0101\u0103\t\16"+ + "\2\2\u0102\u0101\3\2\2\2\u0102\u0103\3\2\2\2\u0103\u010d\3\2\2\2\u0104"+ + "\u010a\5\u0089E\2\u0105\u0107\5\u0081A\2\u0106\u0108\t\16\2\2\u0107\u0106"+ + "\3\2\2\2\u0107\u0108\3\2\2\2\u0108\u010b\3\2\2\2\u0109\u010b\t\16\2\2"+ + "\u010a\u0105\3\2\2\2\u010a\u0109\3\2\2\2\u010b\u010d\3\2\2\2\u010c\u00fc"+ + "\3\2\2\2\u010c\u0104\3\2\2\2\u010d\22\3\2\2\2\u010e\u010f\7\62\2\2\u010f"+ + "\u0119\t\6\2\2\u0110\u0112\5\u0085C\2\u0111\u0113\7\60\2\2\u0112\u0111"+ + "\3\2\2\2\u0112\u0113\3\2\2\2\u0113\u011a\3\2\2\2\u0114\u0116\5\u0085C"+ + "\2\u0115\u0114\3\2\2\2\u0115\u0116\3\2\2\2\u0116\u0117\3\2\2\2\u0117\u0118"+ + "\7\60\2\2\u0118\u011a\5\u0085C\2\u0119\u0110\3\2\2\2\u0119\u0115\3\2\2"+ + "\2\u011a\u011b\3\2\2\2\u011b\u011d\t\17\2\2\u011c\u011e\t\20\2\2\u011d"+ + "\u011c\3\2\2\2\u011d\u011e\3\2\2\2\u011e\u011f\3\2\2\2\u011f\u0121\5\u0089"+ + "E\2\u0120\u0122\t\16\2\2\u0121\u0120\3\2\2\2\u0121\u0122\3\2\2\2\u0122"+ + "\24\3\2\2\2\u0123\u0124\7v\2\2\u0124\u0125\7t\2\2\u0125\u0126\7w\2\2\u0126"+ + "\u012d\7g\2\2\u0127\u0128\7h\2\2\u0128\u0129\7c\2\2\u0129\u012a\7n\2\2"+ + "\u012a\u012b\7u\2\2\u012b\u012d\7g\2\2\u012c\u0123\3\2\2\2\u012c\u0127"+ + "\3\2\2\2\u012d\26\3\2\2\2\u012e\u0131\7)\2\2\u012f\u0132\n\21\2\2\u0130"+ + "\u0132\5\u0083B\2\u0131\u012f\3\2\2\2\u0131\u0130\3\2\2\2\u0132\u0133"+ + "\3\2\2\2\u0133\u0134\7)\2\2\u0134\30\3\2\2\2\u0135\u013a\7$\2\2\u0136"+ + "\u0139\n\22\2\2\u0137\u0139\5\u0083B\2\u0138\u0136\3\2\2\2\u0138\u0137"+ + "\3\2\2\2\u0139\u013c\3\2\2\2\u013a\u0138\3\2\2\2\u013a\u013b\3\2\2\2\u013b"+ + "\u013d\3\2\2\2\u013c\u013a\3\2\2\2\u013d\u013e\7$\2\2\u013e\32\3\2\2\2"+ + "\u013f\u0140\7p\2\2\u0140\u0141\7w\2\2\u0141\u0142\7n\2\2\u0142\u0143"+ + "\7n\2\2\u0143\34\3\2\2\2\u0144\u0145\7*\2\2\u0145\36\3\2\2\2\u0146\u0147"+ + "\7+\2\2\u0147 \3\2\2\2\u0148\u0149\7}\2\2\u0149\"\3\2\2\2\u014a\u014b"+ + "\7\177\2\2\u014b$\3\2\2\2\u014c\u014d\7]\2\2\u014d&\3\2\2\2\u014e\u014f"+ + "\7_\2\2\u014f(\3\2\2\2\u0150\u0151\7=\2\2\u0151*\3\2\2\2\u0152\u0153\7"+ + ".\2\2\u0153,\3\2\2\2\u0154\u0155\7\60\2\2\u0155.\3\2\2\2\u0156\u0157\7"+ + "?\2\2\u0157\60\3\2\2\2\u0158\u0159\7@\2\2\u0159\62\3\2\2\2\u015a\u015b"+ + "\7>\2\2\u015b\64\3\2\2\2\u015c\u015d\7#\2\2\u015d\66\3\2\2\2\u015e\u015f"+ + "\7\u0080\2\2\u015f8\3\2\2\2\u0160\u0161\7A\2\2\u0161:\3\2\2\2\u0162\u0163"+ + "\7<\2\2\u0163<\3\2\2\2\u0164\u0165\7?\2\2\u0165\u0166\7?\2\2\u0166>\3"+ + "\2\2\2\u0167\u0168\7>\2\2\u0168\u0169\7?\2\2\u0169@\3\2\2\2\u016a\u016b"+ + "\7@\2\2\u016b\u016c\7?\2\2\u016cB\3\2\2\2\u016d\u016e\7#\2\2\u016e\u016f"+ + "\7?\2\2\u016fD\3\2\2\2\u0170\u0171\7(\2\2\u0171\u0172\7(\2\2\u0172F\3"+ + "\2\2\2\u0173\u0174\7~\2\2\u0174\u0175\7~\2\2\u0175H\3\2\2\2\u0176\u0177"+ + "\7-\2\2\u0177\u0178\7-\2\2\u0178J\3\2\2\2\u0179\u017a\7/\2\2\u017a\u017b"+ + "\7/\2\2\u017bL\3\2\2\2\u017c\u017d\7-\2\2\u017dN\3\2\2\2\u017e\u017f\7"+ + "/\2\2\u017fP\3\2\2\2\u0180\u0181\7,\2\2\u0181R\3\2\2\2\u0182\u0183\7\61"+ + "\2\2\u0183T\3\2\2\2\u0184\u0185\7(\2\2\u0185V\3\2\2\2\u0186\u0187\7~\2"+ + "\2\u0187X\3\2\2\2\u0188\u0189\7`\2\2\u0189Z\3\2\2\2\u018a\u018b\7\'\2"+ + "\2\u018b\\\3\2\2\2\u018c\u018d\7-\2\2\u018d\u018e\7?\2\2\u018e^\3\2\2"+ + "\2\u018f\u0190\7/\2\2\u0190\u0191\7?\2\2\u0191`\3\2\2\2\u0192\u0193\7"+ + ",\2\2\u0193\u0194\7?\2\2\u0194b\3\2\2\2\u0195\u0196\7\61\2\2\u0196\u0197"+ + "\7?\2\2\u0197d\3\2\2\2\u0198\u0199\7(\2\2\u0199\u019a\7?\2\2\u019af\3"+ + "\2\2\2\u019b\u019c\7~\2\2\u019c\u019d\7?\2\2\u019dh\3\2\2\2\u019e\u019f"+ + "\7`\2\2\u019f\u01a0\7?\2\2\u01a0j\3\2\2\2\u01a1\u01a2\7\'\2\2\u01a2\u01a3"+ + "\7?\2\2\u01a3l\3\2\2\2\u01a4\u01a5\7>\2\2\u01a5\u01a6\7>\2\2\u01a6\u01a7"+ + "\7?\2\2\u01a7n\3\2\2\2\u01a8\u01a9\7@\2\2\u01a9\u01aa\7@\2\2\u01aa\u01ab"+ + "\7?\2\2\u01abp\3\2\2\2\u01ac\u01ad\7@\2\2\u01ad\u01ae\7@\2\2\u01ae\u01af"+ + "\7@\2\2\u01af\u01b0\7?\2\2\u01b0r\3\2\2\2\u01b1\u01b7\7b\2\2\u01b2\u01b3"+ + "\7^\2\2\u01b3\u01b6\7b\2\2\u01b4\u01b6\n\23\2\2\u01b5\u01b2\3\2\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\u01bb\7b\2\2\u01bb"+ + "t\3\2\2\2\u01bc\u01bd\7/\2\2\u01bd\u01be\7@\2\2\u01bev\3\2\2\2\u01bf\u01c0"+ + "\7<\2\2\u01c0\u01c1\7<\2\2\u01c1x\3\2\2\2\u01c2\u01c3\7B\2\2\u01c3z\3"+ + "\2\2\2\u01c4\u01c5\7\60\2\2\u01c5\u01c6\7\60\2\2\u01c6\u01c7\7\60\2\2"+ + "\u01c7|\3\2\2\2\u01c8\u01ca\t\24\2\2\u01c9\u01c8\3\2\2\2\u01ca\u01cb\3"+ + "\2\2\2\u01cb\u01c9\3\2\2\2\u01cb\u01cc\3\2\2\2\u01cc\u01cd\3\2\2\2\u01cd"+ + "\u01ce\b?\2\2\u01ce~\3\2\2\2\u01cf\u01d3\5\u008dG\2\u01d0\u01d2\5\u008b"+ + "F\2\u01d1\u01d0\3\2\2\2\u01d2\u01d5\3\2\2\2\u01d3\u01d1\3\2\2\2\u01d3"+ + "\u01d4\3\2\2\2\u01d4\u0080\3\2\2\2\u01d5\u01d3\3\2\2\2\u01d6\u01d8\t\25"+ + "\2\2\u01d7\u01d9\t\20\2\2\u01d8\u01d7\3\2\2\2\u01d8\u01d9\3\2\2\2\u01d9"+ + "\u01da\3\2\2\2\u01da\u01db\5\u0089E\2\u01db\u0082\3\2\2\2\u01dc\u01dd"+ + "\7^\2\2\u01dd\u01f2\t\26\2\2\u01de\u01e3\7^\2\2\u01df\u01e1\t\27\2\2\u01e0"+ + "\u01df\3\2\2\2\u01e0\u01e1\3\2\2\2\u01e1\u01e2\3\2\2\2\u01e2\u01e4\t\t"+ + "\2\2\u01e3\u01e0\3\2\2\2\u01e3\u01e4\3\2\2\2\u01e4\u01e5\3\2\2\2\u01e5"+ + "\u01f2\t\t\2\2\u01e6\u01e8\7^\2\2\u01e7\u01e9\7w\2\2\u01e8\u01e7\3\2\2"+ + "\2\u01e9\u01ea\3\2\2\2\u01ea\u01e8\3\2\2\2\u01ea\u01eb\3\2\2\2\u01eb\u01ec"+ + "\3\2\2\2\u01ec\u01ed\5\u0087D\2\u01ed\u01ee\5\u0087D\2\u01ee\u01ef\5\u0087"+ + "D\2\u01ef\u01f0\5\u0087D\2\u01f0\u01f2\3\2\2\2\u01f1\u01dc\3\2\2\2\u01f1"+ + "\u01de\3\2\2\2\u01f1\u01e6\3\2\2\2\u01f2\u0084\3\2\2\2\u01f3\u01fc\5\u0087"+ + "D\2\u01f4\u01f7\5\u0087D\2\u01f5\u01f7\7a\2\2\u01f6\u01f4\3\2\2\2\u01f6"+ + "\u01f5\3\2\2\2\u01f7\u01fa\3\2\2\2\u01f8\u01f6\3\2\2\2\u01f8\u01f9\3\2"+ + "\2\2\u01f9\u01fb\3\2\2\2\u01fa\u01f8\3\2\2\2\u01fb\u01fd\5\u0087D\2\u01fc"+ + "\u01f8\3\2\2\2\u01fc\u01fd\3\2\2\2\u01fd\u0086\3\2\2\2\u01fe\u01ff\t\7"+ + "\2\2\u01ff\u0088\3\2\2\2\u0200\u0208\t\30\2\2\u0201\u0203\t\31\2\2\u0202"+ + "\u0201\3\2\2\2\u0203\u0206\3\2\2\2\u0204\u0202\3\2\2\2\u0204\u0205\3\2"+ + "\2\2\u0205\u0207\3\2\2\2\u0206\u0204\3\2\2\2\u0207\u0209\t\30\2\2\u0208"+ + "\u0204\3\2\2\2\u0208\u0209\3\2\2\2\u0209\u008a\3\2\2\2\u020a\u020d\5\u008d"+ + "G\2\u020b\u020d\t\30\2\2\u020c\u020a\3\2\2\2\u020c\u020b\3\2\2\2\u020d"+ + "\u008c\3\2\2\2\u020e\u0213\t\32\2\2\u020f\u0213\n\33\2\2\u0210\u0211\t"+ + "\34\2\2\u0211\u0213\t\35\2\2\u0212\u020e\3\2\2\2\u0212\u020f\3\2\2\2\u0212"+ + "\u0210\3\2\2\2\u0213\u008e\3\2\2\2\65\2\u0095\u00a3\u00ac\u00b4\u00b9"+ + "\u00bc\u00be\u00c1\u00c9\u00cd\u00d0\u00d6\u00dd\u00e1\u00e4\u00ec\u00f0"+ + "\u00f3\u00f8\u00fc\u00ff\u0102\u0107\u010a\u010c\u0112\u0115\u0119\u011d"+ + "\u0121\u012c\u0131\u0138\u013a\u01b5\u01b7\u01cb\u01d3\u01d8\u01e0\u01e3"+ + "\u01ea\u01f1\u01f6\u01f8\u01fc\u0204\u0208\u020c\u0212\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/chapi-ast-comments/src/main/java/chapi/ast/antlr/CommentLexer.tokens b/chapi-ast-comments/src/main/java/chapi/ast/antlr/CommentLexer.tokens new file mode 100644 index 00000000..6662b1e1 --- /dev/null +++ b/chapi-ast-comments/src/main/java/chapi/ast/antlr/CommentLexer.tokens @@ -0,0 +1,111 @@ +COMMENT=1 +LINE_COMMENT=2 +PYTHON_COMMENT=3 +DECIMAL_LITERAL=4 +HEX_LITERAL=5 +OCT_LITERAL=6 +BINARY_LITERAL=7 +FLOAT_LITERAL=8 +HEX_FLOAT_LITERAL=9 +BOOL_LITERAL=10 +CHAR_LITERAL=11 +STRING_LITERAL=12 +NULL_LITERAL=13 +LPAREN=14 +RPAREN=15 +LBRACE=16 +RBRACE=17 +LBRACK=18 +RBRACK=19 +SEMI=20 +COMMA=21 +DOT=22 +ASSIGN=23 +GT=24 +LT=25 +BANG=26 +TILDE=27 +QUESTION=28 +COLON=29 +EQUAL=30 +LE=31 +GE=32 +NOTEQUAL=33 +AND=34 +OR=35 +INC=36 +DEC=37 +ADD=38 +SUB=39 +MUL=40 +DIV=41 +BITAND=42 +BITOR=43 +CARET=44 +MOD=45 +ADD_ASSIGN=46 +SUB_ASSIGN=47 +MUL_ASSIGN=48 +DIV_ASSIGN=49 +AND_ASSIGN=50 +OR_ASSIGN=51 +XOR_ASSIGN=52 +MOD_ASSIGN=53 +LSHIFT_ASSIGN=54 +RSHIFT_ASSIGN=55 +URSHIFT_ASSIGN=56 +TemplateStringLiteral=57 +ARROW=58 +COLONCOLON=59 +AT=60 +ELLIPSIS=61 +WS=62 +IDENTIFIER=63 +'null'=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 +'>>='=55 +'>>>='=56 +'->'=58 +'::'=59 +'@'=60 +'...'=61 diff --git a/chapi-ast-comments/src/main/kotlin/chapi/ast/todo/Todo.kt b/chapi-ast-comments/src/main/kotlin/chapi/ast/todo/Todo.kt new file mode 100644 index 00000000..a09b6dc0 --- /dev/null +++ b/chapi-ast-comments/src/main/kotlin/chapi/ast/todo/Todo.kt @@ -0,0 +1,10 @@ +package chapi.ast.todo + +open class Todo( + var Assignee: String = "", + var Filename: String = "", + var Message: String = "", + var Line: Int = 0 +) { + +} diff --git a/chapi-ast-comments/src/main/kotlin/chapi/ast/todo/TodoIdentApp.kt b/chapi-ast-comments/src/main/kotlin/chapi/ast/todo/TodoIdentApp.kt new file mode 100644 index 00000000..f111fe51 --- /dev/null +++ b/chapi-ast-comments/src/main/kotlin/chapi/ast/todo/TodoIdentApp.kt @@ -0,0 +1,70 @@ +package chapi.ast.todo + +import chapi.ast.antlr.CommentLexer +import org.antlr.v4.runtime.CharStreams +import org.antlr.v4.runtime.Token + +private class TodoConstants { + companion object { + val TodoIdentifiers = arrayOf( + "TODO", + "FIXME" + ) + } +} + +open class TodoIdentApp { + open fun Analysis(Str: String): Array { + var todos = arrayOf() + val lexer = this.lexerText(Str) + + for (token in lexer.allTokens) { + val ONE_LINE_COMMENT = 1 + val LINE_COMMENT = 2 + val PYTHON_COMMENT = 3 + + if ( + token.type == ONE_LINE_COMMENT || + token.type == LINE_COMMENT || + token.type == PYTHON_COMMENT + ) { + val parsedComment = this.parseComment(token) + + if (parsedComment != null) { + todos += parsedComment + } + } + } + + return todos + } + + private fun parseComment(token: Token): Todo? { + val comment = token.text + var trimText = comment.trim { it <= ' ' } + if (trimText.startsWith("# ")) { + trimText = trimText.substring(2) + } + + if (isTodoIdentifier(trimText)) { + val todo = Todo(Line = token.line) + return todo + } + + return null + } + + private fun isTodoIdentifier(trimText: String): Boolean { + for (todoIdentifier in TodoConstants.TodoIdentifiers) { + if (trimText.toUpperCase().startsWith(todoIdentifier)) { + return true + } + } + + return false + } + + open fun lexerText(Str: String): CommentLexer { + return CommentLexer(CharStreams.fromString(Str)) + } +} diff --git a/chapi-ast-comments/src/test/kotlin/chapi/ast/todo/TodoIdentAppTest.kt b/chapi-ast-comments/src/test/kotlin/chapi/ast/todo/TodoIdentAppTest.kt new file mode 100644 index 00000000..8e8d1b5a --- /dev/null +++ b/chapi-ast-comments/src/test/kotlin/chapi/ast/todo/TodoIdentAppTest.kt @@ -0,0 +1,15 @@ +package chapi.ast.todo + +import org.junit.jupiter.api.Assertions.* +import org.junit.jupiter.api.Test + +internal class TodoIdentAppTest { + @Test + internal fun shouldIdentifyTodoMessage() { + var todoTxt = "# todo: should identify todo message" + val todos = TodoIdentApp().Analysis(todoTxt) + + assertEquals(todos.size, 1) + } +} + diff --git a/grammars/README.md b/grammars/README.md new file mode 100644 index 00000000..8737151b --- /dev/null +++ b/grammars/README.md @@ -0,0 +1,6 @@ +# Grammars + +Grammars based on [https://github.com/antlr/grammars-v4](https://github.com/antlr/grammars-v4) + +TODO: use submodule to [https://github.com/antlr/grammars-v4](https://github.com/antlr/grammars-v4) + diff --git a/grammars/RefactorMethodSignatureParser.g4 b/grammars/RefactorMethodSignatureParser.g4 deleted file mode 100644 index c1aff25e..00000000 --- a/grammars/RefactorMethodSignatureParser.g4 +++ /dev/null @@ -1,9 +0,0 @@ -parser grammar RefactorMethodSignatureParser; - -options { tokenVocab=AspectJLexer; } - -import JavaParser; - -classNameOrInterface - : (IDENTIFIER | '*' | '.' | '..')+ ('[' ']')* - ; diff --git a/scripts/compile-antlr.sh b/scripts/compile-antlr.sh index 791d1f27..61e9995a 100755 --- a/scripts/compile-antlr.sh +++ b/scripts/compile-antlr.sh @@ -31,3 +31,7 @@ cd ../.. cd grammars/c antlr -Dlanguage=Java -listener C.g4 -o ../../chapi-ast-c/src/main/java/chapi/ast/antlr -package chapi.ast.antlr + +cd .. + +antlr -Dlanguage=Java -listener CommentLexer.g4 -o ../chapi-ast-comments/src/main/java/chapi/ast/antlr -package chapi.ast.antlr diff --git a/settings.gradle.kts b/settings.gradle.kts index 5b010f76..6f74e337 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -5,3 +5,4 @@ include("chapi-ast-go") include("chapi-ast-python") include("chapi-ast-c") include("chapi-ast-kotlin") +include("chapi-ast-comments")