diff --git a/CHANGELOG.md b/CHANGELOG.md index 8999802..7897f73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,22 @@ ## [Unreleased] +## [0.0.14] - 2024-06-12 + +### Updated + +- 0.6.0 compatibility: Support new syntax for enums. + +## [0.0.13] - 2023-10-25 + +### Updated + +- Support `$feature`, `$is_const`, `$and`, `$or`. +- Support `asm` attributes. +- Support new `$defined`. +- Support `interface`. +- Remove support for `$checks`. + ## [0.0.12] - 2023-07-24 ### Updated diff --git a/build.gradle.kts b/build.gradle.kts index f25e784..ffacb43 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -72,19 +72,14 @@ changelog { repositoryUrl = properties("pluginRepositoryUrl") } -// Configure Gradle Qodana Plugin - read more: https://github.com/JetBrains/gradle-qodana-plugin -qodana { - cachePath = provider { file(".qodana").canonicalPath } - reportPath = provider { file("build/reports/inspections").canonicalPath } - saveReport = true - showReport = environment("QODANA_SHOW_REPORT").map { it.toBoolean() }.getOrElse(false) -} // Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration -koverReport { - defaults { - xml { - onCheck = true +kover { + reports { + total { + xml { + onCheck = true + } } } } diff --git a/gradle.properties b/gradle.properties index f3f0195..77f7d9f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,24 +4,24 @@ pluginGroup = com.github.c3lang.c3intellij pluginName = c3intellij pluginRepositoryUrl = https://github.com/c3lang/c3intellij # SemVer format -> https://semver.org -pluginVersion = 0.0.12 +pluginVersion = 0.0.14 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild = 222 -pluginUntilBuild = 241.* +pluginUntilBuild = 242.* # IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension platformType = IU -platformVersion = 2023.1.1 +platformVersion = 2023.2.6 # Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html # Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22 -ideaPlugins = com.intellij.java, com.intellij.nativeDebug:231.8109.91 +ideaPlugins = com.intellij.java, com.intellij.nativeDebug:232.9559.10 ideaCommunityPlugins = com.intellij.java clionPlugins = com.intellij.cidr.base, com.intellij.clion # Gradle Releases -> https://github.com/gradle/gradle/releases -gradleVersion = 8.1.1 +gradleVersion = 8.7 # Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 66be1c6..45b46e7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,12 +4,12 @@ annotations = "24.0.1" # plugins dokka = "1.8.10" -kotlin = "1.8.21" -changelog = "2.1.0" -gradleIntelliJPlugin = "1.14.1" -qodana = "0.1.13" -kover = "0.7.1" -grammarkit = "2022.3.1" +kotlin = "2.0.0" +changelog = "2.2.0" +gradleIntelliJPlugin = "1.17.3" +qodana = "2024.1.5" +kover = "0.8.0" +grammarkit = "2022.3.2" [libraries] annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" } diff --git a/src/main/gen/org/c3lang/intellij/lexer/C3Lexer.java b/src/main/gen/org/c3lang/intellij/lexer/C3Lexer.java new file mode 100644 index 0000000..2a3455e --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/lexer/C3Lexer.java @@ -0,0 +1,2105 @@ +// Generated by JFlex 1.9.2 http://jflex.de/ (tweaked for IntelliJ platform) +// source: src/main/java/org/c3lang/intellij/C3.flex + +package org.c3lang.intellij.lexer; + +import com.intellij.psi.tree.IElementType; +import org.c3lang.intellij.C3ParserDefinition; +import org.c3lang.intellij.psi.C3Types; +import com.intellij.psi.TokenType; +import com.intellij.lexer.FlexLexer; + + +class C3Lexer implements FlexLexer { + + /** This character denotes the end of file */ + public static final int YYEOF = -1; + + /** initial size of the lookahead buffer */ + private static final int ZZ_BUFFERSIZE = 16384; + + /** lexical states */ + public static final int YYINITIAL = 0; + public static final int IN_COMMENT = 2; + public static final int IN_RAW_STRING = 4; + public static final int IN_STRING = 6; + public static final int IN_CHAR = 8; + public static final int IN_BYTES_STRING = 10; + public static final int IN_BYTES_CHAR = 12; + public static final int IN_BYTES_RAW_STRING = 14; + + /** + * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l + * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l + * at the beginning of a line + * l is of the form l = 2*k, k a non negative integer + */ + private static final int ZZ_LEXSTATE[] = { + 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7 + }; + + /** + * Top-level table for translating characters to character classes + */ + private static final int [] ZZ_CMAP_TOP = zzUnpackcmap_top(); + + private static final String ZZ_CMAP_TOP_PACKED_0 = + "\1\0\37\u0100\1\u0200\267\u0100\10\u0300\u1020\u0100"; + + private static int [] zzUnpackcmap_top() { + int [] result = new int[4352]; + int offset = 0; + offset = zzUnpackcmap_top(ZZ_CMAP_TOP_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackcmap_top(String packed, int offset, int [] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do result[j++] = value; while (--count > 0); + } + return j; + } + + + /** + * Second-level tables for translating characters to character classes + */ + private static final int [] ZZ_CMAP_BLOCKS = zzUnpackcmap_blocks(); + + private static final String ZZ_CMAP_BLOCKS_PACKED_0 = + "\11\0\1\1\1\2\2\3\1\4\22\0\1\5\1\6"+ + "\1\7\1\10\1\11\1\12\1\13\1\14\1\15\1\16"+ + "\1\17\1\20\1\21\1\22\1\23\1\24\1\25\1\26"+ + "\1\27\1\30\1\31\1\32\1\33\1\32\1\34\1\35"+ + "\1\36\1\37\1\40\1\41\1\42\1\43\1\44\1\45"+ + "\1\46\2\45\1\47\1\50\2\51\1\52\2\51\1\53"+ + "\2\51\1\54\1\55\4\51\1\56\2\51\1\57\2\51"+ + "\1\60\1\61\1\62\1\63\1\64\1\65\1\66\1\67"+ + "\1\70\1\71\1\72\1\73\1\74\1\75\1\76\1\77"+ + "\1\100\1\101\1\102\1\103\1\104\1\105\1\106\1\107"+ + "\1\110\1\111\1\112\1\113\1\114\1\115\1\116\1\117"+ + "\1\120\1\121\1\122\1\123\6\124\1\125\u01a2\124\2\125"+ + "\326\124\u0100\125"; + + private static int [] zzUnpackcmap_blocks() { + int [] result = new int[1024]; + int offset = 0; + offset = zzUnpackcmap_blocks(ZZ_CMAP_BLOCKS_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackcmap_blocks(String packed, int offset, int [] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do result[j++] = value; while (--count > 0); + } + return j; + } + + /** + * Translates DFA states to action switch labels. + */ + private static final int [] ZZ_ACTION = zzUnpackAction(); + + private static final String ZZ_ACTION_PACKED_0 = + "\10\0\1\1\1\2\1\3\1\4\2\1\1\5\1\6"+ + "\1\7\1\10\1\11\1\12\1\13\1\14\1\15\1\16"+ + "\1\17\2\20\1\21\1\22\1\23\1\24\1\25\1\26"+ + "\1\1\1\27\1\30\1\31\1\32\1\1\1\33\22\34"+ + "\1\35\1\36\1\37\1\40\4\41\1\42\1\43\1\44"+ + "\1\42\1\43\1\1\1\42\1\45\1\42\1\46\1\42"+ + "\2\46\1\47\1\50\1\1\1\0\1\51\1\0\1\52"+ + "\1\0\15\53\1\54\1\55\1\56\1\57\1\60\1\61"+ + "\1\62\1\63\1\64\1\65\1\66\1\67\1\70\5\0"+ + "\1\20\2\0\1\71\1\72\1\73\1\74\1\75\1\76"+ + "\1\77\1\100\1\101\1\102\1\103\1\1\1\0\1\104"+ + "\1\105\1\106\1\107\1\0\14\34\1\110\5\34\1\111"+ + "\2\34\1\112\30\34\1\113\1\114\1\115\1\116\1\117"+ + "\1\120\1\121\1\122\1\123\3\0\1\124\1\125\1\126"+ + "\15\53\1\127\3\53\1\130\6\53\1\131\1\132\1\20"+ + "\1\0\1\132\3\0\3\20\1\133\1\134\1\135\1\136"+ + "\1\137\11\34\1\140\10\34\1\141\3\34\1\142\1\34"+ + "\1\143\14\34\1\144\6\34\1\145\1\146\2\34\1\53"+ + "\1\147\12\53\1\150\16\53\1\132\6\0\4\34\1\151"+ + "\1\34\1\152\1\34\1\153\6\34\1\154\1\155\12\34"+ + "\1\156\1\157\3\34\1\160\6\34\1\161\1\34\1\162"+ + "\2\34\1\163\1\34\1\164\1\34\2\53\1\165\2\53"+ + "\1\166\1\167\4\53\1\170\21\53\3\0\1\132\1\0"+ + "\4\34\1\171\1\172\1\173\2\34\1\174\3\34\1\175"+ + "\1\176\1\177\1\34\1\200\4\34\1\201\3\34\1\202"+ + "\6\34\1\203\1\204\1\34\1\205\5\53\1\206\1\53"+ + "\1\207\15\53\1\210\3\53\1\211\2\53\2\0\1\34"+ + "\1\212\5\34\1\213\1\214\2\34\1\215\1\216\1\217"+ + "\1\34\1\220\1\34\1\221\1\222\1\223\1\224\1\225"+ + "\1\226\1\34\1\227\1\53\1\230\2\53\1\231\7\53"+ + "\1\232\1\53\1\233\1\53\1\234\1\53\1\235\2\53"+ + "\1\236\1\53\1\237\4\34\1\240\2\34\1\241\1\242"+ + "\2\34\1\243\1\244\1\245\1\246\4\53\1\247\1\250"+ + "\1\251\1\53\1\252\2\53\1\253\1\254\1\255\1\256"+ + "\1\257\1\34\1\260\1\261\1\262\2\34\1\263\2\53"+ + "\1\264\1\53\1\265\1\53\1\266\1\267\1\270\1\271"+ + "\1\53\1\272\1\273\1\274\1\275"; + + private static int [] zzUnpackAction() { + int [] result = new int[573]; + int offset = 0; + offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackAction(String packed, int offset, int [] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do result[j++] = value; while (--count > 0); + } + return j; + } + + + /** + * Translates a state to a row index in the transition table + */ + private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); + + private static final String ZZ_ROWMAP_PACKED_0 = + "\0\0\0\126\0\254\0\u0102\0\u0158\0\u01ae\0\u0204\0\u025a"+ + "\0\u02b0\0\u0306\0\u035c\0\u02b0\0\u03b2\0\u0408\0\u045e\0\u04b4"+ + "\0\u02b0\0\u050a\0\u02b0\0\u0560\0\u05b6\0\u02b0\0\u060c\0\u0662"+ + "\0\u06b8\0\u070e\0\u0764\0\u07ba\0\u02b0\0\u0810\0\u0866\0\u08bc"+ + "\0\u0912\0\u0968\0\u09be\0\u0a14\0\u02b0\0\u0a6a\0\u0ac0\0\u02b0"+ + "\0\u0b16\0\u0b6c\0\u0bc2\0\u0c18\0\u0c6e\0\u0cc4\0\u0d1a\0\u0d70"+ + "\0\u0dc6\0\u0e1c\0\u0e72\0\u0ec8\0\u0f1e\0\u0f74\0\u0fca\0\u1020"+ + "\0\u1076\0\u10cc\0\u1122\0\u1178\0\u02b0\0\u02b0\0\u11ce\0\u02b0"+ + "\0\u1224\0\u127a\0\u02b0\0\u12d0\0\u02b0\0\u1326\0\u02b0\0\u137c"+ + "\0\u13d2\0\u02b0\0\u1428\0\u147e\0\u14d4\0\u152a\0\u1580\0\u02b0"+ + "\0\u02b0\0\u15d6\0\u03b2\0\u162c\0\u1682\0\u16d8\0\u172e\0\u1784"+ + "\0\u17da\0\u1830\0\u1886\0\u18dc\0\u1932\0\u1988\0\u19de\0\u1a34"+ + "\0\u1a8a\0\u1ae0\0\u1b36\0\u1b8c\0\u02b0\0\u02b0\0\u02b0\0\u02b0"+ + "\0\u02b0\0\u02b0\0\u02b0\0\u02b0\0\u02b0\0\u1be2\0\u02b0\0\u1c38"+ + "\0\u02b0\0\u1c8e\0\u1ce4\0\u1d3a\0\u1d90\0\u1de6\0\u1e3c\0\u1e92"+ + "\0\u1ee8\0\u02b0\0\u1f3e\0\u02b0\0\u02b0\0\u02b0\0\u02b0\0\u02b0"+ + "\0\u1f94\0\u02b0\0\u02b0\0\u02b0\0\u1fea\0\u0968\0\u2040\0\u2096"+ + "\0\u02b0\0\u02b0\0\u0ac0\0\u20ec\0\u2142\0\u2198\0\u21ee\0\u2244"+ + "\0\u229a\0\u22f0\0\u2346\0\u239c\0\u23f2\0\u2448\0\u249e\0\u24f4"+ + "\0\u254a\0\u25a0\0\u25f6\0\u264c\0\u26a2\0\u0d1a\0\u26f8\0\u274e"+ + "\0\u0d1a\0\u27a4\0\u27fa\0\u2850\0\u28a6\0\u28fc\0\u2952\0\u29a8"+ + "\0\u29fe\0\u2a54\0\u2aaa\0\u2b00\0\u2b56\0\u2bac\0\u2c02\0\u2c58"+ + "\0\u2cae\0\u2d04\0\u2d5a\0\u2db0\0\u2e06\0\u2e5c\0\u2eb2\0\u2f08"+ + "\0\u2f5e\0\u02b0\0\u02b0\0\u02b0\0\u02b0\0\u02b0\0\u02b0\0\u02b0"+ + "\0\u02b0\0\u02b0\0\u147e\0\u152a\0\u1580\0\u2fb4\0\u300a\0\u3060"+ + "\0\u30b6\0\u310c\0\u3162\0\u31b8\0\u320e\0\u3264\0\u32ba\0\u3310"+ + "\0\u3366\0\u33bc\0\u3412\0\u3468\0\u34be\0\u17da\0\u3514\0\u356a"+ + "\0\u35c0\0\u17da\0\u3616\0\u366c\0\u36c2\0\u3718\0\u376e\0\u37c4"+ + "\0\u02b0\0\u381a\0\u3870\0\u38c6\0\u391c\0\u3972\0\u39c8\0\u3a1e"+ + "\0\u02b0\0\u3a74\0\u3aca\0\u02b0\0\u02b0\0\u3b20\0\u3b76\0\u0d1a"+ + "\0\u3bcc\0\u3c22\0\u3c78\0\u3cce\0\u3d24\0\u3d7a\0\u3dd0\0\u3e26"+ + "\0\u3e7c\0\u3ed2\0\u3f28\0\u3f7e\0\u3fd4\0\u402a\0\u4080\0\u40d6"+ + "\0\u412c\0\u4182\0\u41d8\0\u422e\0\u4284\0\u42da\0\u4330\0\u4386"+ + "\0\u0d1a\0\u43dc\0\u4432\0\u4488\0\u44de\0\u4534\0\u458a\0\u45e0"+ + "\0\u4636\0\u468c\0\u46e2\0\u4738\0\u478e\0\u0d1a\0\u47e4\0\u483a"+ + "\0\u4890\0\u48e6\0\u493c\0\u4992\0\u0d1a\0\u0d1a\0\u49e8\0\u4a3e"+ + "\0\u4a94\0\u17da\0\u4aea\0\u4b40\0\u4b96\0\u4bec\0\u4c42\0\u4c98"+ + "\0\u4cee\0\u4d44\0\u4d9a\0\u4df0\0\u4e46\0\u4e9c\0\u4ef2\0\u4f48"+ + "\0\u4f9e\0\u4ff4\0\u504a\0\u50a0\0\u50f6\0\u514c\0\u51a2\0\u51f8"+ + "\0\u524e\0\u52a4\0\u52fa\0\u5350\0\u53a6\0\u53fc\0\u5452\0\u54a8"+ + "\0\u54fe\0\u5554\0\u55aa\0\u5600\0\u5656\0\u56ac\0\u0d1a\0\u5702"+ + "\0\u0d1a\0\u5758\0\u0d1a\0\u57ae\0\u5804\0\u585a\0\u58b0\0\u5906"+ + "\0\u595c\0\u0d1a\0\u0d1a\0\u59b2\0\u5a08\0\u5a5e\0\u5ab4\0\u5b0a"+ + "\0\u5b60\0\u5bb6\0\u5c0c\0\u5c62\0\u5cb8\0\u0d1a\0\u0d1a\0\u5d0e"+ + "\0\u5d64\0\u5dba\0\u0d1a\0\u5e10\0\u5e66\0\u5ebc\0\u5f12\0\u5f68"+ + "\0\u5fbe\0\u0d1a\0\u6014\0\u606a\0\u60c0\0\u6116\0\u0d1a\0\u616c"+ + "\0\u0d1a\0\u61c2\0\u6218\0\u626e\0\u17da\0\u62c4\0\u631a\0\u17da"+ + "\0\u17da\0\u6370\0\u63c6\0\u641c\0\u6472\0\u64c8\0\u651e\0\u6574"+ + "\0\u65ca\0\u6620\0\u6676\0\u66cc\0\u6722\0\u6778\0\u67ce\0\u6824"+ + "\0\u687a\0\u68d0\0\u6926\0\u697c\0\u69d2\0\u6a28\0\u6a7e\0\u6ad4"+ + "\0\u6b2a\0\u6b80\0\u02b0\0\u6bd6\0\u6c2c\0\u6c82\0\u6cd8\0\u6d2e"+ + "\0\u0d1a\0\u0d1a\0\u0d1a\0\u6d84\0\u6dda\0\u0d1a\0\u6e30\0\u6e86"+ + "\0\u6edc\0\u0d1a\0\u0d1a\0\u6f32\0\u6f88\0\u0d1a\0\u6fde\0\u7034"+ + "\0\u708a\0\u70e0\0\u0d1a\0\u7136\0\u718c\0\u71e2\0\u0d1a\0\u7238"+ + "\0\u728e\0\u72e4\0\u733a\0\u7390\0\u73e6\0\u0d1a\0\u0d1a\0\u743c"+ + "\0\u0d1a\0\u7492\0\u74e8\0\u753e\0\u7594\0\u75ea\0\u17da\0\u7640"+ + "\0\u17da\0\u7696\0\u76ec\0\u7742\0\u7798\0\u77ee\0\u7844\0\u789a"+ + "\0\u78f0\0\u7946\0\u799c\0\u79f2\0\u7a48\0\u7a9e\0\u17da\0\u7af4"+ + "\0\u7b4a\0\u7ba0\0\u17da\0\u7bf6\0\u7c4c\0\u7ca2\0\u7cf8\0\u7d4e"+ + "\0\u0d1a\0\u7da4\0\u7dfa\0\u7e50\0\u7ea6\0\u7efc\0\u0d1a\0\u0d1a"+ + "\0\u7f52\0\u7fa8\0\u0d1a\0\u0d1a\0\u0d1a\0\u7ffe\0\u0d1a\0\u8054"+ + "\0\u0d1a\0\u0d1a\0\u0d1a\0\u0d1a\0\u0d1a\0\u0d1a\0\u80aa\0\u0d1a"+ + "\0\u8100\0\u17da\0\u8156\0\u81ac\0\u8202\0\u8258\0\u82ae\0\u8304"+ + "\0\u835a\0\u83b0\0\u8406\0\u845c\0\u17da\0\u84b2\0\u17da\0\u8508"+ + "\0\u17da\0\u855e\0\u17da\0\u85b4\0\u860a\0\u17da\0\u8660\0\u17da"+ + "\0\u86b6\0\u870c\0\u8762\0\u87b8\0\u0d1a\0\u880e\0\u8864\0\u0d1a"+ + "\0\u88ba\0\u8910\0\u8966\0\u0d1a\0\u17da\0\u17da\0\u17da\0\u89bc"+ + "\0\u8a12\0\u8a68\0\u8abe\0\u17da\0\u17da\0\u17da\0\u8b14\0\u17da"+ + "\0\u8b6a\0\u8bc0\0\u17da\0\u17da\0\u17da\0\u0d1a\0\u0d1a\0\u8c16"+ + "\0\u0d1a\0\u0d1a\0\u0d1a\0\u8c6c\0\u8cc2\0\u0d1a\0\u8d18\0\u8d6e"+ + "\0\u17da\0\u8dc4\0\u17da\0\u8e1a\0\u17da\0\u0d1a\0\u0d1a\0\u0d1a"+ + "\0\u8e70\0\u17da\0\u17da\0\u17da\0\u17da"; + + private static int [] zzUnpackRowMap() { + int [] result = new int[573]; + int offset = 0; + offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackRowMap(String packed, int offset, int [] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length() - 1; + while (i < l) { + int high = packed.charAt(i++) << 16; + result[j++] = high | packed.charAt(i++); + } + return j; + } + + /** + * The transition table of the DFA + */ + private static final int [] ZZ_TRANS = zzUnpacktrans(); + + private static final String ZZ_TRANS_PACKED_0 = + "\1\11\3\12\1\11\1\12\1\13\1\14\1\15\1\16"+ + "\1\17\1\20\1\21\1\22\1\23\1\24\1\25\1\26"+ + "\1\27\1\30\1\31\1\32\10\33\1\34\1\35\1\36"+ + "\1\37\1\40\1\41\1\42\13\43\1\44\1\11\1\45"+ + "\1\46\1\47\1\50\1\51\1\52\1\53\1\54\1\55"+ + "\1\56\2\57\1\60\2\57\1\61\1\62\1\63\3\57"+ + "\1\64\1\65\1\66\1\67\1\70\1\71\1\72\2\57"+ + "\1\73\1\74\1\75\1\76\2\11\2\77\1\100\14\77"+ + "\1\101\4\77\1\102\101\77\3\103\1\11\61\103\1\104"+ + "\37\103\3\11\1\105\1\11\1\105\2\106\1\107\51\106"+ + "\1\110\44\106\2\11\1\105\1\11\1\105\7\111\1\112"+ + "\44\111\1\110\44\111\2\11\1\105\1\11\1\105\2\113"+ + "\1\114\116\113\2\11\1\105\1\11\1\105\7\115\1\116"+ + "\111\115\3\103\1\11\61\103\1\117\37\103\1\11\127\0"+ + "\3\12\1\0\1\12\126\0\1\120\32\0\1\121\131\0"+ + "\13\122\4\0\1\123\1\0\32\124\17\0\1\125\33\0"+ + "\13\126\4\0\1\127\1\0\1\130\1\131\1\132\1\133"+ + "\1\134\1\135\2\131\1\136\4\131\1\137\1\140\1\131"+ + "\1\141\1\131\1\142\1\143\1\131\1\144\4\131\47\0"+ + "\1\145\77\0\1\146\25\0\1\147\124\0\1\150\126\0"+ + "\1\151\104\0\1\152\20\0\1\153\106\0\1\154\16\0"+ + "\1\155\1\11\106\0\1\156\121\0\1\157\4\0\1\160"+ + "\14\0\1\161\107\0\1\162\1\0\11\33\10\0\1\163"+ + "\1\164\2\0\1\165\1\0\1\166\1\0\1\167\1\170"+ + "\4\0\1\171\2\0\1\163\2\0\1\164\3\0\1\165"+ + "\5\0\1\166\5\0\1\167\2\0\1\170\33\0\1\162"+ + "\1\0\11\33\11\0\1\164\2\0\1\165\3\0\1\167"+ + "\5\0\1\171\5\0\1\164\3\0\1\165\13\0\1\167"+ + "\51\0\1\172\127\0\1\173\1\174\125\0\1\175\1\176"+ + "\101\0\1\177\22\0\1\200\1\201\17\0\1\202\101\0"+ + "\1\203\4\0\1\204\127\0\13\205\4\0\1\206\1\0"+ + "\32\207\33\0\11\43\7\0\13\43\4\0\1\43\1\0"+ + "\32\210\46\0\1\211\126\0\1\212\131\0\13\43\4\0"+ + "\1\213\1\0\32\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\15\57\1\214\4\57\1\215\7\57\33\0"+ + "\6\57\1\216\2\57\7\0\13\57\4\0\1\57\1\0"+ + "\5\57\1\217\2\57\1\220\5\57\1\221\2\57\1\222"+ + "\10\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\1\223\6\57\1\224\6\57\1\225\13\57\33\0\11\57"+ + "\7\0\13\57\4\0\1\57\1\0\4\57\1\226\3\57"+ + "\1\227\5\57\1\230\13\57\33\0\11\57\7\0\13\57"+ + "\4\0\1\57\1\0\13\57\1\231\1\57\1\232\11\57"+ + "\1\233\2\57\33\0\11\57\7\0\13\57\4\0\1\57"+ + "\1\0\1\234\12\57\1\235\1\57\1\236\1\237\13\57"+ + "\33\0\11\57\7\0\13\57\4\0\1\57\1\0\32\57"+ + "\33\0\11\57\7\0\13\57\4\0\1\57\1\0\2\57"+ + "\1\240\2\57\1\241\6\57\1\242\1\243\1\57\1\244"+ + "\2\57\1\245\7\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\16\57\1\246\13\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\1\247\15\57\1\250\13\57"+ + "\33\0\11\57\7\0\13\57\4\0\1\57\1\0\4\57"+ + "\1\251\17\57\1\252\5\57\33\0\11\57\7\0\13\57"+ + "\4\0\1\57\1\0\4\57\1\253\25\57\33\0\11\57"+ + "\7\0\13\57\4\0\1\57\1\0\7\57\1\254\13\57"+ + "\1\255\2\57\1\256\3\57\33\0\11\57\7\0\13\57"+ + "\4\0\1\57\1\0\13\57\1\257\5\57\1\260\6\57"+ + "\1\261\1\57\33\0\11\57\7\0\13\57\4\0\1\57"+ + "\1\0\10\57\1\262\2\57\1\263\1\57\1\264\1\57"+ + "\1\265\2\57\1\266\7\57\33\0\11\57\7\0\13\57"+ + "\4\0\1\57\1\0\1\267\15\57\1\270\13\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\7\57\1\271"+ + "\22\57\15\0\1\272\4\0\1\273\10\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\274\32\57\127\0\1\275\45\0"+ + "\1\276\57\0\1\277\1\300\3\0\2\77\1\0\14\77"+ + "\1\0\4\77\1\0\101\77\24\0\1\301\120\0\1\302"+ + "\173\0\1\103\45\0\2\106\1\0\51\106\1\0\44\106"+ + "\5\0\121\103\5\0\7\111\1\0\44\111\1\0\44\111"+ + "\5\0\2\113\1\0\116\113\1\0\5\303\1\0\1\103"+ + "\123\0\7\115\1\0\111\115\1\0\5\304\6\0\1\103"+ + "\112\0\5\305\57\0\1\103\65\0\11\122\7\0\13\122"+ + "\4\0\1\122\1\0\32\122\33\0\11\124\7\0\13\124"+ + "\4\0\1\124\1\0\32\124\53\0\13\306\4\0\1\125"+ + "\1\0\32\307\33\0\11\126\7\0\13\126\4\0\1\126"+ + "\1\0\32\310\53\0\13\126\4\0\1\127\1\0\32\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\13\131"+ + "\1\311\1\131\1\312\4\131\1\313\7\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\32\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\1\314\31\131\33\0"+ + "\11\131\7\0\13\131\4\0\1\131\1\0\4\131\1\315"+ + "\25\131\33\0\11\131\7\0\13\131\4\0\1\131\1\0"+ + "\2\131\1\316\10\131\1\317\1\131\1\320\3\131\1\321"+ + "\3\131\1\322\1\131\1\323\2\131\33\0\11\131\7\0"+ + "\13\131\4\0\1\131\1\0\4\131\1\324\11\131\1\325"+ + "\13\131\33\0\11\131\7\0\13\131\4\0\1\131\1\0"+ + "\5\131\1\326\7\131\1\327\4\131\1\330\7\131\33\0"+ + "\11\131\7\0\13\131\4\0\1\131\1\0\1\331\31\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\21\131"+ + "\1\332\10\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\15\131\1\333\14\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\10\131\1\334\12\131\1\335\2\131"+ + "\1\336\3\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\30\131\1\337\1\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\1\340\31\131\31\0\1\341\102\0"+ + "\2\160\3\0\120\160\26\0\11\342\115\0\2\343\117\0"+ + "\1\344\1\0\1\344\2\0\11\345\116\0\1\346\1\0"+ + "\1\347\2\0\1\350\1\351\116\0\7\352\120\0\1\346"+ + "\1\0\1\347\2\0\1\350\1\351\16\0\1\351\25\0"+ + "\1\351\51\0\11\353\7\0\4\353\15\0\6\353\57\0"+ + "\11\33\26\0\1\171\102\0\1\354\125\0\1\355\111\0"+ + "\11\205\7\0\13\205\4\0\1\205\1\0\32\356\33\0"+ + "\11\207\7\0\13\207\4\0\1\207\1\0\32\207\33\0"+ + "\11\210\7\0\13\210\4\0\1\210\1\0\32\210\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\30\57\1\357"+ + "\1\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\14\57\1\360\5\57\1\361\7\57\33\0\4\57\1\72"+ + "\4\57\7\0\13\57\4\0\1\57\1\0\32\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\13\57\1\362"+ + "\16\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\23\57\1\363\6\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\16\57\1\364\13\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\4\57\1\365\25\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\22\57\1\366"+ + "\1\367\6\57\33\0\11\57\7\0\13\57\4\0\1\57"+ + "\1\0\1\370\31\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\15\57\1\371\14\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\5\57\1\372\24\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\22\57\1\373"+ + "\7\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\24\57\1\374\5\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\22\57\1\375\7\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\24\57\1\376\5\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\23\57\1\377"+ + "\6\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\13\57\1\u0100\10\57\1\u0101\5\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\16\57\1\u0102\13\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\21\57\1\u0103"+ + "\10\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\7\57\1\u0104\22\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\17\57\1\u0105\12\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\13\57\1\u0106\7\57\1\u0107"+ + "\6\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\23\57\1\u0108\6\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\31\57\1\u0109\33\0\11\57\7\0\13\57"+ + "\4\0\1\57\1\0\15\57\1\u010a\14\57\33\0\11\57"+ + "\7\0\13\57\4\0\1\57\1\0\2\57\1\u010b\27\57"+ + "\33\0\11\57\7\0\13\57\4\0\1\57\1\0\3\57"+ + "\1\u010c\26\57\33\0\11\57\7\0\13\57\4\0\1\57"+ + "\1\0\27\57\1\u010d\2\57\33\0\11\57\7\0\13\57"+ + "\4\0\1\57\1\0\13\57\1\u010e\16\57\33\0\11\57"+ + "\7\0\13\57\4\0\1\57\1\0\23\57\1\u010f\6\57"+ + "\33\0\11\57\7\0\13\57\4\0\1\57\1\0\16\57"+ + "\1\u0110\13\57\33\0\11\57\7\0\13\57\4\0\1\57"+ + "\1\0\1\u0111\20\57\1\u0112\10\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\10\57\1\u0113\21\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\16\57\1\u0114"+ + "\13\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\24\57\1\u0115\3\57\1\u0116\1\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\17\57\1\u0117\12\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\15\57\1\u0118"+ + "\14\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\16\57\1\u0119\13\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\10\57\1\u011a\21\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\23\57\1\u011b\6\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\7\57\1\u011c"+ + "\21\57\1\u011d\33\0\11\57\7\0\13\57\4\0\1\57"+ + "\1\0\21\57\1\u011e\10\57\33\0\11\57\7\0\13\57"+ + "\4\0\1\57\1\0\10\57\1\u011f\21\57\33\0\11\57"+ + "\7\0\13\57\4\0\1\57\1\0\10\57\1\u0120\21\57"+ + "\33\0\11\306\7\0\13\306\4\0\1\306\66\0\11\307"+ + "\7\0\13\307\4\0\1\307\1\0\32\307\33\0\11\310"+ + "\7\0\13\310\4\0\1\310\1\0\32\310\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\10\131\1\u0121\21\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\3\131"+ + "\1\u0122\26\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\22\131\1\u0123\7\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\22\131\1\u0124\7\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\5\131\1\u0125\24\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\7\131"+ + "\1\u0126\22\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\22\131\1\u0127\7\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\3\131\1\u0128\26\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\21\131\1\u0129\10\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\1\u012a"+ + "\31\131\33\0\11\131\7\0\13\131\4\0\1\131\1\0"+ + "\23\131\1\u012b\6\131\33\0\11\131\7\0\13\131\4\0"+ + "\1\131\1\0\1\u012c\31\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\21\131\1\u012d\10\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\2\131\1\u012e\27\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\u012f\1\0\32\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\14\131"+ + "\1\u0130\15\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\1\u0131\31\131\33\0\11\131\7\0\13\131\4\0"+ + "\1\131\1\0\31\131\1\u0132\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\21\131\1\u0133\10\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\10\131\1\u0134\21\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\17\131"+ + "\1\u0135\12\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\1\u0136\1\131\1\u0137\1\131\1\u0138\14\131\1\u0139"+ + "\1\u013a\1\u013b\6\131\33\0\11\342\11\0\1\164\1\u013c"+ + "\13\0\1\u013d\5\0\1\164\1\u013c\57\0\2\343\23\0"+ + "\1\165\3\0\1\167\5\0\1\u013e\11\0\1\165\13\0"+ + "\1\167\40\0\11\345\115\0\11\345\12\0\1\u013c\22\0"+ + "\1\u013c\61\0\1\u013f\3\0\1\351\121\0\1\351\127\0"+ + "\1\351\121\0\7\352\16\0\1\165\3\0\1\167\5\0"+ + "\1\u0140\11\0\1\165\13\0\1\167\36\0\1\u0141\1\0"+ + "\11\353\7\0\4\353\1\0\1\165\2\0\1\164\1\167"+ + "\5\0\1\u0142\1\0\6\353\2\0\1\165\6\0\1\164"+ + "\4\0\1\167\40\0\11\356\7\0\13\356\4\0\1\356"+ + "\1\0\32\356\33\0\11\57\7\0\13\57\4\0\1\57"+ + "\1\0\5\57\1\u0143\24\57\33\0\11\57\7\0\13\57"+ + "\4\0\1\57\1\0\4\57\1\u0144\25\57\33\0\11\57"+ + "\7\0\13\57\4\0\1\57\1\0\16\57\1\u0145\13\57"+ + "\33\0\11\57\7\0\13\57\4\0\1\57\1\0\22\57"+ + "\1\u0146\7\57\33\0\11\57\7\0\13\57\4\0\1\57"+ + "\1\0\13\57\1\u0147\16\57\33\0\11\57\7\0\13\57"+ + "\4\0\1\57\1\0\1\u0148\31\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\4\57\1\u0149\25\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\2\57\1\u014a"+ + "\27\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\21\57\1\u014b\10\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\22\57\1\u014c\1\u014d\6\57\33\0\11\57"+ + "\7\0\13\57\4\0\1\57\1\0\1\u014e\3\57\1\u014f"+ + "\25\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\23\57\1\u0150\6\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\1\57\1\u0151\30\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\4\57\1\u0152\25\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\14\57\1\u0153"+ + "\15\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\4\57\1\u0154\25\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\22\57\1\u0155\7\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\13\57\1\u0156\16\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\1\u0157\31\57"+ + "\33\0\11\57\7\0\13\57\4\0\1\57\1\0\4\57"+ + "\1\u0158\25\57\33\0\11\57\7\0\13\57\4\0\1\57"+ + "\1\0\1\u0159\31\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\16\57\1\u015a\13\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\10\57\1\u015b\21\57\33\0"+ + "\1\57\1\u015c\7\57\7\0\13\57\4\0\1\57\1\0"+ + "\4\57\1\u015d\25\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\21\57\1\u015e\10\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\6\57\1\u015f\23\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\21\57\1\u0160"+ + "\10\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\24\57\1\u0161\5\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\23\57\1\u0162\6\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\13\57\1\u0163\16\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\24\57\1\u0164"+ + "\5\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\21\57\1\u0165\10\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\23\57\1\u0166\6\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\24\57\1\u0167\5\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\23\57\1\u0168"+ + "\6\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\2\57\1\u0169\27\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\4\57\1\u016a\25\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\4\57\1\u016b\25\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\23\57\1\u016c"+ + "\6\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\15\57\1\u016d\14\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\16\57\1\u016e\13\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\21\57\1\u016f\10\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\16\57\1\u0170"+ + "\13\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\3\57\1\u0171\26\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\13\57\1\u0172\16\57\33\0\11\131\7\0"+ + "\13\131\4\0\1\131\1\0\6\131\1\u0173\23\131\33\0"+ + "\11\131\7\0\13\131\4\0\1\131\1\0\4\131\1\u0174"+ + "\25\131\33\0\11\131\7\0\13\131\4\0\1\131\1\0"+ + "\4\131\1\u0175\25\131\33\0\11\131\7\0\13\131\4\0"+ + "\1\131\1\0\1\u0176\7\131\1\u0177\21\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\16\131\1\u0178\13\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\4\131"+ + "\1\u0179\25\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\5\131\1\u017a\2\131\1\u017b\11\131\1\u017c\7\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\16\131"+ + "\1\u017d\13\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\13\131\1\u017e\16\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\15\131\1\u017f\14\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\23\131\1\u0180\6\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\4\131"+ + "\1\u0181\25\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\13\131\1\u0182\16\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\2\131\1\u0183\27\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\4\131\1\u0184\25\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\14\131"+ + "\1\u0185\15\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\4\131\1\u0186\25\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\10\131\1\u0187\21\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\23\131\1\u0188\6\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\4\131"+ + "\1\u0189\25\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\21\131\1\u018a\10\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\16\131\1\u018b\13\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\27\131\1\u018c\2\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\4\131"+ + "\1\u018d\25\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\17\131\1\u018e\12\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\30\131\1\u018f\1\131\34\0\1\u0190"+ + "\1\0\1\u0191\2\0\1\u0192\1\u0193\116\0\11\342\26\0"+ + "\1\u013d\66\0\2\343\35\0\1\u013e\75\0\1\351\116\0"+ + "\7\352\30\0\1\u0140\66\0\11\u0194\7\0\4\u0194\15\0"+ + "\6\u0194\57\0\11\353\7\0\4\353\13\0\1\u0142\1\0"+ + "\6\353\57\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\1\u0195\31\57\33\0\11\57\7\0\13\57\4\0\1\57"+ + "\1\0\21\57\1\u0196\10\57\33\0\11\57\7\0\13\57"+ + "\4\0\1\57\1\0\1\u0197\31\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\23\57\1\u0198\6\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\12\57\1\u0199"+ + "\17\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\7\57\1\u019a\22\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\23\57\1\u019b\6\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\10\57\1\u019c\21\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\24\57\1\u019d"+ + "\5\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\21\57\1\u019e\10\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\10\57\1\u019f\21\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\13\57\1\u01a0\16\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\21\57\1\u01a1"+ + "\10\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\4\57\1\u01a2\25\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\23\57\1\u01a3\6\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\23\57\1\u01a4\6\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\1\u01a5\31\57"+ + "\33\0\11\57\7\0\13\57\4\0\1\57\1\0\21\57"+ + "\1\u01a6\10\57\33\0\11\57\7\0\13\57\4\0\1\57"+ + "\1\0\21\57\1\u01a7\10\57\33\0\11\57\7\0\13\57"+ + "\4\0\1\57\1\0\15\57\1\u01a8\14\57\33\0\2\57"+ + "\1\u01a9\6\57\7\0\13\57\4\0\1\57\1\0\32\57"+ + "\33\0\11\57\7\0\13\57\4\0\1\57\1\0\21\57"+ + "\1\u01aa\10\57\33\0\11\57\7\0\13\57\4\0\1\57"+ + "\1\0\16\57\1\u01ab\13\57\33\0\11\57\7\0\13\57"+ + "\4\0\1\57\1\0\13\57\1\u01ac\16\57\33\0\11\57"+ + "\7\0\13\57\4\0\1\57\1\0\2\57\1\u01ad\27\57"+ + "\33\0\11\57\7\0\13\57\4\0\1\57\1\0\21\57"+ + "\1\u01ae\10\57\33\0\11\57\7\0\13\57\4\0\1\57"+ + "\1\0\23\57\1\u01af\6\57\33\0\11\57\7\0\13\57"+ + "\4\0\1\57\1\0\10\57\1\u01b0\21\57\33\0\11\57"+ + "\7\0\13\57\4\0\1\57\1\0\2\57\1\u01b1\27\57"+ + "\33\0\11\57\7\0\13\57\4\0\1\57\1\0\2\57"+ + "\1\u01b2\27\57\33\0\11\57\7\0\13\57\4\0\1\57"+ + "\1\0\1\u01b3\31\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\10\57\1\u01b4\21\57\33\0\1\57\1\u01b5"+ + "\7\57\7\0\13\57\4\0\1\57\1\0\32\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\6\57\1\u01b6"+ + "\23\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\15\57\1\u01b7\14\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\21\57\1\u01b8\10\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\4\57\1\u01b9\25\57\33\0"+ + "\11\131\7\0\13\131\4\0\1\131\1\0\15\131\1\u01ba"+ + "\14\131\33\0\11\131\7\0\13\131\4\0\1\131\1\0"+ + "\21\131\1\u01bb\10\131\33\0\11\131\7\0\13\131\4\0"+ + "\1\131\1\0\24\131\1\u01bc\5\131\33\0\11\131\7\0"+ + "\13\131\4\0\1\131\1\0\15\131\1\u01bd\14\131\33\0"+ + "\11\131\7\0\13\131\4\0\1\131\1\0\16\131\1\u01be"+ + "\13\131\33\0\11\131\7\0\13\131\4\0\1\131\1\0"+ + "\5\131\1\u01bf\24\131\33\0\11\131\7\0\13\131\4\0"+ + "\1\131\1\0\26\131\1\u01c0\3\131\33\0\11\131\7\0"+ + "\13\131\4\0\1\131\1\0\21\131\1\u01c1\10\131\33\0"+ + "\11\131\7\0\13\131\4\0\1\131\1\0\23\131\1\u01c2"+ + "\6\131\33\0\11\131\7\0\13\131\4\0\1\131\1\0"+ + "\1\u01c3\31\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\24\131\1\u01c4\5\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\1\u01c5\31\131\33\0\11\131\7\0"+ + "\13\131\4\0\1\131\1\0\24\131\1\u01c6\5\131\33\0"+ + "\11\131\7\0\13\131\4\0\1\131\1\0\16\131\1\u01c7"+ + "\13\131\33\0\11\131\7\0\13\131\4\0\1\131\1\0"+ + "\16\131\1\u01c8\13\131\33\0\11\131\7\0\13\131\4\0"+ + "\1\131\1\0\4\131\1\u01c9\25\131\33\0\11\131\7\0"+ + "\13\131\4\0\1\131\1\0\16\131\1\u01ca\13\131\33\0"+ + "\11\131\7\0\13\131\4\0\1\131\1\0\15\131\1\u01cb"+ + "\14\131\33\0\11\131\7\0\13\131\4\0\1\131\1\0"+ + "\2\131\1\u01cc\27\131\33\0\11\131\7\0\13\131\4\0"+ + "\1\131\1\0\5\131\1\u01cd\10\131\1\u01ce\13\131\33\0"+ + "\11\131\7\0\13\131\4\0\1\131\1\0\6\131\1\u01cf"+ + "\23\131\33\0\11\131\7\0\13\131\4\0\1\131\1\0"+ + "\15\131\1\u01d0\6\131\1\u01d1\5\131\33\0\11\131\7\0"+ + "\13\131\4\0\1\131\1\0\17\131\1\u01d2\12\131\33\0"+ + "\11\131\7\0\13\131\4\0\1\131\1\0\5\131\1\u01d3"+ + "\24\131\33\0\11\131\7\0\13\131\4\0\1\131\1\0"+ + "\13\131\1\u01d4\16\131\33\0\11\131\7\0\13\131\4\0"+ + "\1\131\1\0\17\131\1\u01d5\12\131\35\0\1\u01d6\3\0"+ + "\1\u0193\121\0\1\u0193\127\0\1\u0193\121\0\11\u0194\7\0"+ + "\4\u0194\4\0\1\164\6\0\1\u01d7\1\0\6\u0194\11\0"+ + "\1\164\45\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\24\57\1\u01d8\5\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\23\57\1\u01d9\6\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\23\57\1\u01da\6\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\21\57\1\u01db"+ + "\10\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\15\57\1\u01dc\14\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\13\57\1\u01dd\16\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\15\57\1\u01de\14\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\4\57\1\u01df"+ + "\25\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\15\57\1\u01e0\14\57\33\0\1\57\1\u01e1\7\57\7\0"+ + "\13\57\4\0\1\57\1\0\32\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\2\57\1\u01e2\27\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\23\57\1\u01e3"+ + "\6\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\4\57\1\u01e4\25\57\33\0\7\57\1\u01e5\1\57\7\0"+ + "\13\57\4\0\1\57\1\0\32\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\5\57\1\u01e6\24\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\4\57\1\u01e7"+ + "\25\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\1\u01e8\31\57\33\0\11\57\7\0\13\57\4\0\1\57"+ + "\1\0\15\57\1\u01e9\14\57\33\0\11\57\7\0\13\57"+ + "\4\0\1\57\1\0\2\57\1\u01ea\27\57\33\0\11\57"+ + "\7\0\13\57\4\0\1\57\1\0\23\57\1\u01eb\6\57"+ + "\33\0\11\57\7\0\13\57\4\0\1\57\1\0\7\57"+ + "\1\u01ec\22\57\33\0\11\57\7\0\13\57\4\0\1\57"+ + "\1\0\13\57\1\u01ed\16\57\33\0\11\57\7\0\13\57"+ + "\4\0\1\57\1\0\3\57\1\u01ee\26\57\33\0\2\57"+ + "\1\u01ef\6\57\7\0\13\57\4\0\1\57\1\0\32\57"+ + "\33\0\11\57\7\0\13\57\4\0\1\57\1\0\23\57"+ + "\1\u01f0\6\57\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\16\131\1\u01f1\13\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\23\131\1\u01f2\6\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\13\131\1\u01f3\16\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\4\131"+ + "\1\u01f4\25\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\21\131\1\u01f5\10\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\10\131\1\u01f6\21\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\30\131\1\u01f7\1\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\14\131"+ + "\1\u01f8\15\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\21\131\1\u01f9\10\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\2\131\1\u01fa\27\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\3\131\1\u01fb\26\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\15\131"+ + "\1\u01fc\14\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\5\131\1\u01fd\24\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\16\131\1\u01fe\13\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\5\131\1\u01ff\24\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\6\131"+ + "\1\u0200\23\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\7\131\1\u0201\22\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\21\131\1\u0202\10\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\5\131\1\u0203\24\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\22\131"+ + "\1\u0204\7\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\15\131\1\u0205\14\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\21\131\1\u0206\10\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\1\u0207\31\131\33\0"+ + "\11\131\7\0\13\131\4\0\1\131\1\0\4\131\1\u0208"+ + "\25\131\42\0\1\u0193\116\0\11\u0194\7\0\4\u0194\13\0"+ + "\1\u01d7\1\0\6\u0194\57\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\13\57\1\u0209\16\57\33\0\1\57\1\u020a"+ + "\7\57\7\0\13\57\4\0\1\57\1\0\32\57\33\0"+ + "\11\57\7\0\13\57\4\0\1\57\1\0\24\57\1\u020b"+ + "\5\57\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\24\57\1\u020c\5\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\23\57\1\u020d\6\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\2\57\1\u020e\27\57\33\0"+ + "\2\57\1\u020f\3\57\1\u0210\2\57\7\0\13\57\4\0"+ + "\1\57\1\0\32\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\7\57\1\u0211\22\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\1\u0212\31\57\33\0\11\57"+ + "\7\0\13\57\4\0\1\57\1\0\22\57\1\u0213\7\57"+ + "\33\0\7\57\1\u0214\1\57\7\0\13\57\4\0\1\57"+ + "\1\0\32\57\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\5\131\1\u0215\24\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\23\131\1\u0216\6\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\3\131\1\u0217\26\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\4\131"+ + "\1\u0218\25\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\23\131\1\u0219\6\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\17\131\1\u021a\12\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\4\131\1\u021b\25\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\4\131"+ + "\1\u021c\25\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\7\131\1\u021d\22\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\4\131\1\u021e\25\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\22\131\1\u021f\7\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\5\131"+ + "\1\u0220\24\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\10\131\1\u0221\21\131\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\16\131\1\u0222\13\131\33\0\11\131"+ + "\7\0\13\131\4\0\1\131\1\0\23\131\1\u0223\6\131"+ + "\33\0\11\131\7\0\13\131\4\0\1\131\1\0\23\131"+ + "\1\u0224\6\131\33\0\11\131\7\0\13\131\4\0\1\131"+ + "\1\0\23\131\1\u0225\6\131\33\0\11\57\7\0\13\57"+ + "\4\0\1\57\1\0\23\57\1\u0226\6\57\33\0\6\57"+ + "\1\u0227\2\57\7\0\13\57\4\0\1\57\1\0\32\57"+ + "\33\0\11\57\7\0\13\57\4\0\1\57\1\0\2\57"+ + "\1\u0228\27\57\33\0\11\57\7\0\13\57\4\0\1\57"+ + "\1\0\4\57\1\u0229\25\57\33\0\11\57\7\0\13\57"+ + "\4\0\1\57\1\0\23\57\1\u022a\6\57\33\0\7\57"+ + "\1\u022b\1\57\7\0\13\57\4\0\1\57\1\0\32\57"+ + "\33\0\11\57\7\0\13\57\4\0\1\u022c\1\0\32\57"+ + "\33\0\11\57\7\0\13\57\4\0\1\57\1\0\2\57"+ + "\1\u022d\27\57\33\0\11\57\7\0\13\57\4\0\1\57"+ + "\1\0\4\57\1\u022e\25\57\33\0\11\131\7\0\13\131"+ + "\4\0\1\131\1\0\1\u022f\31\131\33\0\11\131\7\0"+ + "\13\131\4\0\1\131\1\0\2\131\1\u0230\27\131\33\0"+ + "\11\131\7\0\13\131\4\0\1\131\1\0\4\131\1\u0231"+ + "\25\131\33\0\11\131\7\0\13\131\4\0\1\131\1\0"+ + "\16\131\1\u0232\13\131\33\0\11\131\7\0\13\131\4\0"+ + "\1\131\1\0\23\131\1\u0233\6\131\33\0\11\131\7\0"+ + "\13\131\4\0\1\131\1\0\5\131\1\u0234\24\131\33\0"+ + "\11\131\7\0\13\131\4\0\1\131\1\0\14\131\1\u0235"+ + "\15\131\33\0\11\57\7\0\13\57\4\0\1\57\1\0"+ + "\23\57\1\u0236\6\57\33\0\11\57\7\0\13\57\4\0"+ + "\1\57\1\0\21\57\1\u0237\10\57\33\0\11\57\7\0"+ + "\13\57\4\0\1\57\1\0\4\57\1\u0238\25\57\33\0"+ + "\11\131\7\0\13\131\4\0\1\131\1\0\2\131\1\u0239"+ + "\27\131\33\0\11\131\7\0\13\131\4\0\1\131\1\0"+ + "\7\131\1\u023a\22\131\33\0\11\131\7\0\13\131\4\0"+ + "\1\131\1\0\5\131\1\u023b\24\131\33\0\11\131\7\0"+ + "\13\131\4\0\1\131\1\0\30\131\1\u023c\1\131\33\0"+ + "\11\131\7\0\13\131\4\0\1\131\1\0\7\131\1\u023d"+ + "\22\131\6\0"; + + private static int [] zzUnpacktrans() { + int [] result = new int[36550]; + int offset = 0; + offset = zzUnpacktrans(ZZ_TRANS_PACKED_0, offset, result); + return result; + } + + private static int zzUnpacktrans(String packed, int offset, int [] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + value--; + do result[j++] = value; while (--count > 0); + } + return j; + } + + + /* error codes */ + private static final int ZZ_UNKNOWN_ERROR = 0; + private static final int ZZ_NO_MATCH = 1; + private static final int ZZ_PUSHBACK_2BIG = 2; + + /* error messages for the codes above */ + private static final String[] ZZ_ERROR_MSG = { + "Unknown internal scanner error", + "Error: could not match input", + "Error: pushback value was too large" + }; + + /** + * ZZ_ATTRIBUTE[aState] contains the attributes of state {@code aState} + */ + private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); + + private static final String ZZ_ATTRIBUTE_PACKED_0 = + "\10\0\1\11\2\1\1\11\4\1\1\11\1\1\1\11"+ + "\2\1\1\11\6\1\1\11\7\1\1\11\2\1\1\11"+ + "\24\1\2\11\1\1\1\11\2\1\1\11\1\1\1\11"+ + "\1\1\1\11\2\1\1\11\5\1\2\11\1\1\1\0"+ + "\1\1\1\0\1\1\1\0\15\1\11\11\1\1\1\11"+ + "\1\1\1\11\5\0\1\1\2\0\1\11\1\1\5\11"+ + "\1\1\3\11\1\1\1\0\2\1\2\11\1\0\56\1"+ + "\11\11\3\0\33\1\1\11\2\1\1\0\1\1\3\0"+ + "\1\11\2\1\2\11\117\1\6\0\115\1\3\0\1\11"+ + "\1\0\101\1\2\0\146\1"; + + private static int [] zzUnpackAttribute() { + int [] result = new int[573]; + int offset = 0; + offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackAttribute(String packed, int offset, int [] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do result[j++] = value; while (--count > 0); + } + return j; + } + + /** the input device */ + private java.io.Reader zzReader; + + /** the current state of the DFA */ + private int zzState; + + /** the current lexical state */ + private int zzLexicalState = YYINITIAL; + + /** this buffer contains the current text to be matched and is + the source of the yytext() string */ + private CharSequence zzBuffer = ""; + + /** the textposition at the last accepting state */ + private int zzMarkedPos; + + /** the current text position in the buffer */ + private int zzCurrentPos; + + /** startRead marks the beginning of the yytext() string in the buffer */ + private int zzStartRead; + + /** endRead marks the last character in the buffer, that has been read + from input */ + private int zzEndRead; + + /** zzAtEOF == true <=> the scanner is at the EOF */ + private boolean zzAtEOF; + + /** Number of newlines encountered up to the start of the matched text. */ + @SuppressWarnings("unused") + private int yyline; + + /** Number of characters from the last newline up to the start of the matched text. */ + @SuppressWarnings("unused") + protected int yycolumn; + + /** Number of characters up to the start of the matched text. */ + @SuppressWarnings("unused") + private long yychar; + + /** Whether the scanner is currently at the beginning of a line. */ + @SuppressWarnings("unused") + private boolean zzAtBOL = true; + + /** Whether the user-EOF-code has already been executed. */ + private boolean zzEOFDone; + + /* user code: */ + private int commentNesting = 0; + + + /** + * Creates a new scanner + * + * @param in the java.io.Reader to read input from. + */ + C3Lexer(java.io.Reader in) { + this.zzReader = in; + } + + + /** Returns the maximum size of the scanner buffer, which limits the size of tokens. */ + private int zzMaxBufferLen() { + return Integer.MAX_VALUE; + } + + /** Whether the scanner buffer can grow to accommodate a larger token. */ + private boolean zzCanGrow() { + return true; + } + + /** + * Translates raw input code points to DFA table row + */ + private static int zzCMap(int input) { + int offset = input & 255; + return offset == input ? ZZ_CMAP_BLOCKS[offset] : ZZ_CMAP_BLOCKS[ZZ_CMAP_TOP[input >> 8] | offset]; + } + + public final int getTokenStart() { + return zzStartRead; + } + + public final int getTokenEnd() { + return getTokenStart() + yylength(); + } + + public void reset(CharSequence buffer, int start, int end, int initialState) { + zzBuffer = buffer; + zzCurrentPos = zzMarkedPos = zzStartRead = start; + zzAtEOF = false; + zzAtBOL = true; + zzEndRead = end; + yybegin(initialState); + } + + /** + * Refills the input buffer. + * + * @return {@code false}, iff there was new input. + * + * @exception java.io.IOException if any I/O-Error occurs + */ + private boolean zzRefill() throws java.io.IOException { + return true; + } + + + /** + * Returns the current lexical state. + */ + public final int yystate() { + return zzLexicalState; + } + + + /** + * Enters a new lexical state + * + * @param newState the new lexical state + */ + public final void yybegin(int newState) { + zzLexicalState = newState; + } + + + /** + * Returns the text matched by the current regular expression. + */ + public final CharSequence yytext() { + return zzBuffer.subSequence(zzStartRead, zzMarkedPos); + } + + + /** + * Returns the character at position {@code pos} from the + * matched text. + * + * It is equivalent to yytext().charAt(pos), but faster + * + * @param pos the position of the character to fetch. + * A value from 0 to yylength()-1. + * + * @return the character at position pos + */ + public final char yycharat(int pos) { + return zzBuffer.charAt(zzStartRead+pos); + } + + + /** + * Returns the length of the matched text region. + */ + public final int yylength() { + return zzMarkedPos-zzStartRead; + } + + + /** + * Reports an error that occurred while scanning. + * + * In a wellformed scanner (no or only correct usage of + * yypushback(int) and a match-all fallback rule) this method + * will only be called with things that "Can't Possibly Happen". + * If this method is called, something is seriously wrong + * (e.g. a JFlex bug producing a faulty scanner etc.). + * + * Usual syntax/scanner level error handling should be done + * in error fallback rules. + * + * @param errorCode the code of the errormessage to display + */ + private void zzScanError(int errorCode) { + String message; + try { + message = ZZ_ERROR_MSG[errorCode]; + } + catch (ArrayIndexOutOfBoundsException e) { + message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; + } + + throw new Error(message); + } + + + /** + * Pushes the specified amount of characters back into the input stream. + * + * They will be read again by then next call of the scanning method + * + * @param number the number of characters to be read again. + * This number must not be greater than yylength()! + */ + public void yypushback(int number) { + if ( number > yylength() ) + zzScanError(ZZ_PUSHBACK_2BIG); + + zzMarkedPos -= number; + } + + + /** + * Contains user EOF-code, which will be executed exactly once, + * when the end of file is reached + */ + private void zzDoEOF() { + if (!zzEOFDone) { + zzEOFDone = true; + + } + } + + + /** + * Resumes scanning until the next regular expression is matched, + * the end of input is encountered or an I/O-Error occurs. + * + * @return the next token + * @exception java.io.IOException if any I/O-Error occurs + */ + public IElementType advance() throws java.io.IOException + { + int zzInput; + int zzAction; + + // cached fields: + int zzCurrentPosL; + int zzMarkedPosL; + int zzEndReadL = zzEndRead; + CharSequence zzBufferL = zzBuffer; + + int [] zzTransL = ZZ_TRANS; + int [] zzRowMapL = ZZ_ROWMAP; + int [] zzAttrL = ZZ_ATTRIBUTE; + + while (true) { + zzMarkedPosL = zzMarkedPos; + + zzAction = -1; + + zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; + + zzState = ZZ_LEXSTATE[zzLexicalState]; + + // set up zzAction for empty match case: + int zzAttributes = zzAttrL[zzState]; + if ( (zzAttributes & 1) == 1 ) { + zzAction = zzState; + } + + + zzForAction: { + while (true) { + + if (zzCurrentPosL < zzEndReadL) { + zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL); + zzCurrentPosL += Character.charCount(zzInput); + } + else if (zzAtEOF) { + zzInput = YYEOF; + break zzForAction; + } + else { + // store back cached positions + zzCurrentPos = zzCurrentPosL; + zzMarkedPos = zzMarkedPosL; + boolean eof = zzRefill(); + // get translated positions and possibly new buffer + zzCurrentPosL = zzCurrentPos; + zzMarkedPosL = zzMarkedPos; + zzBufferL = zzBuffer; + zzEndReadL = zzEndRead; + if (eof) { + zzInput = YYEOF; + break zzForAction; + } + else { + zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL); + zzCurrentPosL += Character.charCount(zzInput); + } + } + int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMap(zzInput) ]; + if (zzNext == -1) break zzForAction; + zzState = zzNext; + + zzAttributes = zzAttrL[zzState]; + if ( (zzAttributes & 1) == 1 ) { + zzAction = zzState; + zzMarkedPosL = zzCurrentPosL; + if ( (zzAttributes & 8) == 8 ) break zzForAction; + } + + } + } + + // store back cached position + zzMarkedPos = zzMarkedPosL; + + if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { + zzAtEOF = true; + zzDoEOF(); + return null; + } + else { + switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { + case 1: + { return TokenType.BAD_CHARACTER; + } + // fall through + case 190: break; + case 2: + { return TokenType.WHITE_SPACE; + } + // fall through + case 191: break; + case 3: + { return C3Types.BANG; + } + // fall through + case 192: break; + case 4: + { yybegin(IN_STRING); + } + // fall through + case 193: break; + case 5: + { return C3Types.MOD; + } + // fall through + case 194: break; + case 6: + { return C3Types.AMP; + } + // fall through + case 195: break; + case 7: + { yybegin(IN_CHAR); + } + // fall through + case 196: break; + case 8: + { return C3Types.LP; + } + // fall through + case 197: break; + case 9: + { return C3Types.RP; + } + // fall through + case 198: break; + case 10: + { return C3Types.STAR; + } + // fall through + case 199: break; + case 11: + { return C3Types.PLUS; + } + // fall through + case 200: break; + case 12: + { return C3Types.COMMA; + } + // fall through + case 201: break; + case 13: + { return C3Types.MINUS; + } + // fall through + case 202: break; + case 14: + { return C3Types.DOT; + } + // fall through + case 203: break; + case 15: + { return C3Types.DIV; + } + // fall through + case 204: break; + case 16: + { return C3Types.INT_LITERAL; + } + // fall through + case 205: break; + case 17: + { return C3Types.COLON; + } + // fall through + case 206: break; + case 18: + { return C3Types.EOS; + } + // fall through + case 207: break; + case 19: + { return C3Types.LT_OP; + } + // fall through + case 208: break; + case 20: + { return C3Types.EQ; + } + // fall through + case 209: break; + case 21: + { return C3Types.GT_OP; + } + // fall through + case 210: break; + case 22: + { return C3Types.QUESTION; + } + // fall through + case 211: break; + case 23: + { return C3Types.CONST_IDENT; + } + // fall through + case 212: break; + case 24: + { return C3Types.LBT; + } + // fall through + case 213: break; + case 25: + { return C3Types.RBT; + } + // fall through + case 214: break; + case 26: + { return C3Types.BIT_XOR; + } + // fall through + case 215: break; + case 27: + { yybegin(IN_RAW_STRING); + } + // fall through + case 216: break; + case 28: + { return C3Types.IDENT; + } + // fall through + case 217: break; + case 29: + { return C3Types.LB; + } + // fall through + case 218: break; + case 30: + { return C3Types.BIT_OR; + } + // fall through + case 219: break; + case 31: + { return C3Types.RB; + } + // fall through + case 220: break; + case 32: + { return C3Types.BIT_NOT; + } + // fall through + case 221: break; + case 33: + { return C3ParserDefinition.BLOCK_COMMENT; + } + // fall through + case 222: break; + case 34: + { + } + // fall through + case 223: break; + case 35: + { yybegin(YYINITIAL); return C3Types.STRING_LIT; + } + // fall through + case 224: break; + case 36: + { yybegin(YYINITIAL); return TokenType.BAD_CHARACTER; + } + // fall through + case 225: break; + case 37: + { yybegin(YYINITIAL); return C3Types.CHAR_LIT; + } + // fall through + case 226: break; + case 38: + { yybegin(YYINITIAL); return C3Types.BYTES; + } + // fall through + case 227: break; + case 39: + { return C3Types.BANGBANG; + } + // fall through + case 228: break; + case 40: + { return C3Types.NE_OP; + } + // fall through + case 229: break; + case 41: + { return C3Types.HASH_IDENT; + } + // fall through + case 230: break; + case 42: + { return C3Types.CT_CONST_IDENT; + } + // fall through + case 231: break; + case 43: + { return C3Types.CT_IDENT; + } + // fall through + case 232: break; + case 44: + { return C3Types.MOD_ASSIGN; + } + // fall through + case 233: break; + case 45: + { return C3Types.AND; + } + // fall through + case 234: break; + case 46: + { return C3Types.BIT_AND_ASSIGN; + } + // fall through + case 235: break; + case 47: + { return C3Types.LGENPAR; + } + // fall through + case 236: break; + case 48: + { return C3Types.MULT_ASSIGN; + } + // fall through + case 237: break; + case 49: + { return C3Types.PLUSPLUS; + } + // fall through + case 238: break; + case 50: + { return C3Types.PLUS_ASSIGN; + } + // fall through + case 239: break; + case 51: + { return C3Types.MINUSMINUS; + } + // fall through + case 240: break; + case 52: + { return C3Types.MINUS_ASSIGN; + } + // fall through + case 241: break; + case 53: + { return C3Types.DOTDOT; + } + // fall through + case 242: break; + case 54: + { yybegin(IN_COMMENT); commentNesting = 1; return C3ParserDefinition.BLOCK_COMMENT; + } + // fall through + case 243: break; + case 55: + { return C3ParserDefinition.LINE_COMMENT; + } + // fall through + case 244: break; + case 56: + { return C3Types.DIV_ASSIGN; + } + // fall through + case 245: break; + case 57: + { return C3Types.SCOPE; + } + // fall through + case 246: break; + case 58: + { return C3Types.SHL; + } + // fall through + case 247: break; + case 59: + { return C3Types.LE_OP; + } + // fall through + case 248: break; + case 60: + { return C3Types.EQ_OP; + } + // fall through + case 249: break; + case 61: + { return C3Types.IMPLIES; + } + // fall through + case 250: break; + case 62: + { return C3Types.RGENPAR; + } + // fall through + case 251: break; + case 63: + { return C3Types.GE_OP; + } + // fall through + case 252: break; + case 64: + { return C3Types.SHR; + } + // fall through + case 253: break; + case 65: + { return C3Types.RVEC; + } + // fall through + case 254: break; + case 66: + { return C3Types.ELVIS; + } + // fall through + case 255: break; + case 67: + { return C3Types.OPTELSE; + } + // fall through + case 256: break; + case 68: + { return C3Types.AT_IDENT; + } + // fall through + case 257: break; + case 69: + { return C3Types.TYPE_IDENT; + } + // fall through + case 258: break; + case 70: + { return C3Types.LVEC; + } + // fall through + case 259: break; + case 71: + { return C3Types.BIT_XOR_ASSIGN; + } + // fall through + case 260: break; + case 72: + { return C3Types.KW_DO; + } + // fall through + case 261: break; + case 73: + { return C3Types.KW_FN; + } + // fall through + case 262: break; + case 74: + { return C3Types.KW_IF; + } + // fall through + case 263: break; + case 75: + { yybegin(IN_BYTES_STRING); + } + // fall through + case 264: break; + case 76: + { yybegin(IN_BYTES_CHAR); + } + // fall through + case 265: break; + case 77: + { yybegin(IN_BYTES_RAW_STRING); + } + // fall through + case 266: break; + case 78: + { return C3Types.LBRAPIPE; + } + // fall through + case 267: break; + case 79: + { return C3Types.BIT_OR_ASSIGN; + } + // fall through + case 268: break; + case 80: + { return C3Types.OR; + } + // fall through + case 269: break; + case 81: + { return C3Types.RBRAPIPE; + } + // fall through + case 270: break; + case 82: + { if (--commentNesting == 0) { yybegin(YYINITIAL); return C3ParserDefinition.BLOCK_COMMENT; } + } + // fall through + case 271: break; + case 83: + { commentNesting++; return C3ParserDefinition.BLOCK_COMMENT; + } + // fall through + case 272: break; + case 84: + { return C3Types.BUILTIN_CONST; + } + // fall through + case 273: break; + case 85: + { return C3Types.BUILTIN; + } + // fall through + case 274: break; + case 86: + { return C3Types.CT_TYPE_IDENT; + } + // fall through + case 275: break; + case 87: + { return C3Types.KW_CT_IF; + } + // fall through + case 276: break; + case 88: + { return C3Types.KW_CT_OR; + } + // fall through + case 277: break; + case 89: + { return C3Types.ELLIPSIS; + } + // fall through + case 278: break; + case 90: + { return C3Types.FLOAT_LITERAL; + } + // fall through + case 279: break; + case 91: + { return C3Types.SHL_ASSIGN; + } + // fall through + case 280: break; + case 92: + { return C3Types.SHR_ASSIGN; + } + // fall through + case 281: break; + case 93: + { return C3Types.AT_TYPE_IDENT; + } + // fall through + case 282: break; + case 94: + { return C3Types.KW_ANY; + } + // fall through + case 283: break; + case 95: + { return C3Types.KW_ASM; + } + // fall through + case 284: break; + case 96: + { return C3Types.KW_DEF; + } + // fall through + case 285: break; + case 97: + { return C3Types.KW_FOR; + } + // fall through + case 286: break; + case 98: + { return C3Types.KW_INT; + } + // fall through + case 287: break; + case 99: + { return C3Types.KW_ISZ; + } + // fall through + case 288: break; + case 100: + { return C3Types.KW_TRY; + } + // fall through + case 289: break; + case 101: + { return C3Types.KW_USZ; + } + // fall through + case 290: break; + case 102: + { return C3Types.KW_VAR; + } + // fall through + case 291: break; + case 103: + { return C3Types.KW_CT_AND; + } + // fall through + case 292: break; + case 104: + { return C3Types.KW_CT_FOR; + } + // fall through + case 293: break; + case 105: + { return C3Types.KW_BOOL; + } + // fall through + case 294: break; + case 106: + { return C3Types.KW_CASE; + } + // fall through + case 295: break; + case 107: + { return C3Types.KW_CHAR; + } + // fall through + case 296: break; + case 108: + { return C3Types.KW_ELSE; + } + // fall through + case 297: break; + case 109: + { return C3Types.KW_ENUM; + } + // fall through + case 298: break; + case 110: + { return C3Types.KW_IPTR; + } + // fall through + case 299: break; + case 111: + { return C3Types.KW_LONG; + } + // fall through + case 300: break; + case 112: + { return C3Types.KW_NULL; + } + // fall through + case 301: break; + case 113: + { return C3Types.KW_TRUE; + } + // fall through + case 302: break; + case 114: + { return C3Types.KW_UINT; + } + // fall through + case 303: break; + case 115: + { return C3Types.KW_UPTR; + } + // fall through + case 304: break; + case 116: + { return C3Types.KW_VOID; + } + // fall through + case 305: break; + case 117: + { return C3Types.KW_CT_CASE; + } + // fall through + case 306: break; + case 118: + { return C3Types.KW_CT_ECHO; + } + // fall through + case 307: break; + case 119: + { return C3Types.KW_CT_ELSE; + } + // fall through + case 308: break; + case 120: + { return C3Types.KW_CT_EVAL; + } + // fall through + case 309: break; + case 121: + { return C3Types.KW_BREAK; + } + // fall through + case 310: break; + case 122: + { return C3Types.KW_CATCH; + } + // fall through + case 311: break; + case 123: + { return C3Types.KW_CONST; + } + // fall through + case 312: break; + case 124: + { return C3Types.KW_DEFER; + } + // fall through + case 313: break; + case 125: + { return C3Types.KW_FALSE; + } + // fall through + case 314: break; + case 126: + { return C3Types.KW_FAULT; + } + // fall through + case 315: break; + case 127: + { return C3Types.KW_FLOAT; + } + // fall through + case 316: break; + case 128: + { return C3Types.KW_ICHAR; + } + // fall through + case 317: break; + case 129: + { return C3Types.KW_MACRO; + } + // fall through + case 318: break; + case 130: + { return C3Types.KW_SHORT; + } + // fall through + case 319: break; + case 131: + { return C3Types.KW_ULONG; + } + // fall through + case 320: break; + case 132: + { return C3Types.KW_UNION; + } + // fall through + case 321: break; + case 133: + { return C3Types.KW_WHILE; + } + // fall through + case 322: break; + case 134: + { return C3Types.KW_CT_ENDIF; + } + // fall through + case 323: break; + case 135: + { return C3Types.KW_CT_ERROR; + } + // fall through + case 324: break; + case 136: + { return C3Types.KW_CT_VAARG; + } + // fall through + case 325: break; + case 137: + { return C3Types.KW_CT_VAREF; + } + // fall through + case 326: break; + case 138: + { return C3Types.KW_ASSERT; + } + // fall through + case 327: break; + case 139: + { return C3Types.KW_DOUBLE; + } + // fall through + case 328: break; + case 140: + { return C3Types.KW_EXTERN; + } + // fall through + case 329: break; + case 141: + { return C3Types.KW_IMPORT; + } + // fall through + case 330: break; + case 142: + { return C3Types.KW_INLINE; + } + // fall through + case 331: break; + case 143: + { return C3Types.KW_INT128; + } + // fall through + case 332: break; + case 144: + { return C3Types.KW_MODULE; + } + // fall through + case 333: break; + case 145: + { return C3Types.KW_RETURN; + } + // fall through + case 334: break; + case 146: + { return C3Types.KW_STATIC; + } + // fall through + case 335: break; + case 147: + { return C3Types.KW_STRUCT; + } + // fall through + case 336: break; + case 148: + { return C3Types.KW_SWITCH; + } + // fall through + case 337: break; + case 149: + { return C3Types.KW_TLOCAL; + } + // fall through + case 338: break; + case 150: + { return C3Types.KW_TYPEID; + } + // fall through + case 339: break; + case 151: + { return C3Types.KW_USHORT; + } + // fall through + case 340: break; + case 152: + { return C3Types.KW_CT_ASSERT; + } + // fall through + case 341: break; + case 153: + { return C3Types.KW_CT_ENDFOR; + } + // fall through + case 342: break; + case 154: + { return C3Types.KW_CT_NAMEOF; + } + // fall through + case 343: break; + case 155: + { return C3Types.KW_CT_SIZEOF; + } + // fall through + case 344: break; + case 156: + { return C3Types.KW_CT_SWITCH; + } + // fall through + case 345: break; + case 157: + { return C3Types.KW_CT_TYPEOF; + } + // fall through + case 346: break; + case 158: + { return C3Types.KW_CT_VAEXPR; + } + // fall through + case 347: break; + case 159: + { return C3Types.KW_CT_VATYPE; + } + // fall through + case 348: break; + case 160: + { return C3Types.KW_DEFAULT; + } + // fall through + case 349: break; + case 161: + { return C3Types.KW_FLOAT16; + } + // fall through + case 350: break; + case 162: + { return C3Types.KW_FOREACH; + } + // fall through + case 351: break; + case 163: + { return C3Types.KW_UINT128; + } + // fall through + case 352: break; + case 164: + { return C3Types.KW_CT_ALIGNOF; + } + // fall through + case 353: break; + case 165: + { return C3Types.KW_CT_DEFAULT; + } + // fall through + case 354: break; + case 166: + { return C3Types.KW_CT_DEFINED; + } + // fall through + case 355: break; + case 167: + { return C3Types.KW_CT_FEATURE; + } + // fall through + case 356: break; + case 168: + { return C3Types.KW_CT_FOREACH; + } + // fall through + case 357: break; + case 169: + { return C3Types.KW_CT_INCLUDE; + } + // fall through + case 358: break; + case 170: + { return C3Types.KW_CT_QNAMEOF; + } + // fall through + case 359: break; + case 171: + { return C3Types.KW_CT_VACONST; + } + // fall through + case 360: break; + case 172: + { return C3Types.KW_CT_VACOUNT; + } + // fall through + case 361: break; + case 173: + { return C3Types.KW_CT_VASPLAT; + } + // fall through + case 362: break; + case 174: + { return C3Types.KW_ANYFAULT; + } + // fall through + case 363: break; + case 175: + { return C3Types.KW_BFLOAT16; + } + // fall through + case 364: break; + case 176: + { return C3Types.KW_CONTINUE; + } + // fall through + case 365: break; + case 177: + { return C3Types.KW_DISTINCT; + } + // fall through + case 366: break; + case 178: + { return C3Types.KW_FLOAT128; + } + // fall through + case 367: break; + case 179: + { return C3Types.KW_NEXTCASE; + } + // fall through + case 368: break; + case 180: + { return C3Types.KW_CT_EVALTYPE; + } + // fall through + case 369: break; + case 181: + { return C3Types.KW_CT_IS_CONST; + } + // fall through + case 370: break; + case 182: + { return C3Types.KW_CT_TYPEFROM; + } + // fall through + case 371: break; + case 183: + { return C3Types.KW_BITSTRUCT; + } + // fall through + case 372: break; + case 184: + { return C3Types.KW_FOREACH_R; + } + // fall through + case 373: break; + case 185: + { return C3Types.KW_INTERFACE; + } + // fall through + case 374: break; + case 186: + { return C3Types.KW_CT_ENDSWITCH; + } + // fall through + case 375: break; + case 187: + { return C3Types.KW_CT_EXTNAMEOF; + } + // fall through + case 376: break; + case 188: + { return C3Types.KW_CT_STRINGIFY; + } + // fall through + case 377: break; + case 189: + { return C3Types.KW_CT_ENDFOREACH; + } + // fall through + case 378: break; + default: + zzScanError(ZZ_NO_MATCH); + } + } + } + } + + +} diff --git a/src/main/gen/org/c3lang/intellij/parser/C3Parser.java b/src/main/gen/org/c3lang/intellij/parser/C3Parser.java index 1770fb9..b7544b4 100644 --- a/src/main/gen/org/c3lang/intellij/parser/C3Parser.java +++ b/src/main/gen/org/c3lang/intellij/parser/C3Parser.java @@ -39,11 +39,12 @@ static boolean parse_root_(IElementType t, PsiBuilder b, int l) { create_token_set_(ASM_EXPR, ASSIGN_TYPE_EXPR, ATTRIBUTE_OPERATOR_EXPR, BINARY_EXPR, BUILTIN_CONST_EXPR, BUILTIN_EXPR, BYTES_EXPR, CALL_EXPR, COMPOUND_INIT_EXPR, CONSTANT_EXPR, CT_ANALYZE_EXPR, CT_ARG_EXPR, - CT_CALL_EXPR, CT_CHECKS_EXPR, DECL_OR_EXPR, EXPR, - EXPR_BLOCK_EXPR, GROUPED_EXPR, INIT_LIST_EXPR, KEYWORD_EXPR, - LAMBDA_DECL_EXPR, LAMBDA_DECL_SHORT_EXPR, LITERAL_EXPR, LOCAL_IDENT_EXPR, - OPTIONAL_EXPR, PATH_AT_IDENT_EXPR, PATH_CONST_EXPR, PATH_IDENT_EXPR, - STRING_EXPR, TERNARY_EXPR, TYPE_ACCESS_EXPR, UNARY_EXPR), + CT_CALL_EXPR, CT_COND_EXPR, CT_DEFINED_CHECK_EXPR, CT_DEFINED_EXPR, + CT_FEATURE_EXPR, DECL_OR_EXPR, EXPR, EXPR_BLOCK_EXPR, + GROUPED_EXPR, INIT_LIST_EXPR, KEYWORD_EXPR, LAMBDA_DECL_EXPR, + LAMBDA_DECL_SHORT_EXPR, LITERAL_EXPR, LOCAL_IDENT_EXPR, OPTIONAL_EXPR, + PATH_AT_IDENT_EXPR, PATH_CONST_EXPR, PATH_IDENT_EXPR, STRING_EXPR, + TERNARY_EXPR, TYPE_ACCESS_EXPR, UNARY_EXPR), }; /* ********************************************************** */ @@ -186,13 +187,14 @@ private static boolean arg_2(PsiBuilder b, int l) { } /* ********************************************************** */ - // arg (COMMA arg)* + // arg (COMMA arg)* COMMA? public static boolean arg_list(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "arg_list")) return false; boolean r; Marker m = enter_section_(b, l, _NONE_, ARG_LIST, ""); r = arg(b, l + 1); r = r && arg_list_1(b, l + 1); + r = r && arg_list_2(b, l + 1); exit_section_(b, l, m, r, false, null); return r; } @@ -219,6 +221,13 @@ private static boolean arg_list_1_0(PsiBuilder b, int l) { return r; } + // COMMA? + private static boolean arg_list_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "arg_list_2")) return false; + consumeToken(b, COMMA); + return true; + } + /* ********************************************************** */ // asm_expr (add_bin_op asm_expr asm_addr_trailing?)? public static boolean asm_addr(PsiBuilder b, int l) { @@ -319,7 +328,7 @@ private static boolean asm_addr_trailing_1_0(PsiBuilder b, int l) { } /* ********************************************************** */ - // KW_ASM (LP expr RP | LB asm_stmt* RB) + // KW_ASM (LP expr RP attributes? | attributes? LB asm_stmt* RB) public static boolean asm_block_stmt(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "asm_block_stmt")) return false; if (!nextTokenIs(b, KW_ASM)) return false; @@ -331,7 +340,7 @@ public static boolean asm_block_stmt(PsiBuilder b, int l) { return r; } - // LP expr RP | LB asm_stmt* RB + // LP expr RP attributes? | attributes? LB asm_stmt* RB private static boolean asm_block_stmt_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "asm_block_stmt_1")) return false; boolean r; @@ -342,7 +351,7 @@ private static boolean asm_block_stmt_1(PsiBuilder b, int l) { return r; } - // LP expr RP + // LP expr RP attributes? private static boolean asm_block_stmt_1_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "asm_block_stmt_1_0")) return false; boolean r; @@ -350,29 +359,45 @@ private static boolean asm_block_stmt_1_0(PsiBuilder b, int l) { r = consumeToken(b, LP); r = r && expr(b, l + 1, -1); r = r && consumeToken(b, RP); + r = r && asm_block_stmt_1_0_3(b, l + 1); exit_section_(b, m, null, r); return r; } - // LB asm_stmt* RB + // attributes? + private static boolean asm_block_stmt_1_0_3(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "asm_block_stmt_1_0_3")) return false; + attributes(b, l + 1); + return true; + } + + // attributes? LB asm_stmt* RB private static boolean asm_block_stmt_1_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "asm_block_stmt_1_1")) return false; boolean r; Marker m = enter_section_(b); - r = consumeToken(b, LB); - r = r && asm_block_stmt_1_1_1(b, l + 1); + r = asm_block_stmt_1_1_0(b, l + 1); + r = r && consumeToken(b, LB); + r = r && asm_block_stmt_1_1_2(b, l + 1); r = r && consumeToken(b, RB); exit_section_(b, m, null, r); return r; } + // attributes? + private static boolean asm_block_stmt_1_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "asm_block_stmt_1_1_0")) return false; + attributes(b, l + 1); + return true; + } + // asm_stmt* - private static boolean asm_block_stmt_1_1_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "asm_block_stmt_1_1_1")) return false; + private static boolean asm_block_stmt_1_1_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "asm_block_stmt_1_1_2")) return false; while (true) { int c = current_position_(b); if (!asm_stmt(b, l + 1)) break; - if (!empty_element_parsed_guard_(b, "asm_block_stmt_1_1_1", c)) break; + if (!empty_element_parsed_guard_(b, "asm_block_stmt_1_1_2", c)) break; } return true; } @@ -931,7 +956,7 @@ private static boolean bitstruct_body_1_0_1(PsiBuilder b, int l) { } /* ********************************************************** */ - // KW_BITSTRUCT type_name COLON type attributes? bitstruct_body + // KW_BITSTRUCT type_name interface_impl? COLON type attributes? bitstruct_body public static boolean bitstruct_declaration(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "bitstruct_declaration")) return false; if (!nextTokenIs(b, KW_BITSTRUCT)) return false; @@ -939,17 +964,25 @@ public static boolean bitstruct_declaration(PsiBuilder b, int l) { Marker m = enter_section_(b); r = consumeToken(b, KW_BITSTRUCT); r = r && type_name(b, l + 1); + r = r && bitstruct_declaration_2(b, l + 1); r = r && consumeToken(b, COLON); r = r && type(b, l + 1); - r = r && bitstruct_declaration_4(b, l + 1); + r = r && bitstruct_declaration_5(b, l + 1); r = r && bitstruct_body(b, l + 1); exit_section_(b, m, BITSTRUCT_DECLARATION, r); return r; } + // interface_impl? + private static boolean bitstruct_declaration_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "bitstruct_declaration_2")) return false; + interface_impl(b, l + 1); + return true; + } + // attributes? - private static boolean bitstruct_declaration_4(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "bitstruct_declaration_4")) return false; + private static boolean bitstruct_declaration_5(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "bitstruct_declaration_5")) return false; attributes(b, l + 1); return true; } @@ -1485,7 +1518,7 @@ private static boolean continue_stmt_1(PsiBuilder b, int l) { } /* ********************************************************** */ - // KW_CT_EVAL | KW_CT_SIZEOF | KW_CT_STRINGIFY + // KW_CT_EVAL | KW_CT_SIZEOF | KW_CT_STRINGIFY | KW_CT_IS_CONST public static boolean ct_analyze(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "ct_analyze")) return false; boolean r; @@ -1493,6 +1526,7 @@ public static boolean ct_analyze(PsiBuilder b, int l) { r = consumeToken(b, KW_CT_EVAL); if (!r) r = consumeToken(b, KW_CT_SIZEOF); if (!r) r = consumeToken(b, KW_CT_STRINGIFY); + if (!r) r = consumeToken(b, KW_CT_IS_CONST); exit_section_(b, l, m, r, false, null); return r; } @@ -1568,13 +1602,12 @@ private static boolean ct_assert_stmt_1_2_0(PsiBuilder b, int l) { } /* ********************************************************** */ - // KW_CT_ALIGNOF | KW_CT_DEFINED | KW_CT_EXTNAMEOF | KW_CT_NAMEOF | KW_CT_OFFSETOF | KW_CT_QNAMEOF + // KW_CT_ALIGNOF | KW_CT_EXTNAMEOF | KW_CT_NAMEOF | KW_CT_OFFSETOF | KW_CT_QNAMEOF public static boolean ct_call(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "ct_call")) return false; boolean r; Marker m = enter_section_(b, l, _NONE_, CT_CALL, ""); r = consumeToken(b, KW_CT_ALIGNOF); - if (!r) r = consumeToken(b, KW_CT_DEFINED); if (!r) r = consumeToken(b, KW_CT_EXTNAMEOF); if (!r) r = consumeToken(b, KW_CT_NAMEOF); if (!r) r = consumeToken(b, KW_CT_OFFSETOF); @@ -1635,6 +1668,65 @@ private static boolean ct_case_stmt_2(PsiBuilder b, int l) { return true; } + /* ********************************************************** */ + // KW_CT_AND | KW_CT_OR + public static boolean ct_cond(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ct_cond")) return false; + if (!nextTokenIs(b, "", KW_CT_AND, KW_CT_OR)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, CT_COND, ""); + r = consumeToken(b, KW_CT_AND); + if (!r) r = consumeToken(b, KW_CT_OR); + exit_section_(b, l, m, r, false, null); + return r; + } + + /* ********************************************************** */ + // expr | type + public static boolean ct_defined_check_expr(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ct_defined_check_expr")) return false; + boolean r; + Marker m = enter_section_(b, l, _COLLAPSE_, CT_DEFINED_CHECK_EXPR, ""); + r = expr(b, l + 1, -1); + if (!r) r = type(b, l + 1); + exit_section_(b, l, m, r, false, null); + return r; + } + + /* ********************************************************** */ + // ct_defined_check_expr (COMMA ct_defined_check_expr)* + public static boolean ct_defined_check_expr_list(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ct_defined_check_expr_list")) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, CT_DEFINED_CHECK_EXPR_LIST, ""); + r = ct_defined_check_expr(b, l + 1); + r = r && ct_defined_check_expr_list_1(b, l + 1); + exit_section_(b, l, m, r, false, null); + return r; + } + + // (COMMA ct_defined_check_expr)* + private static boolean ct_defined_check_expr_list_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ct_defined_check_expr_list_1")) return false; + while (true) { + int c = current_position_(b); + if (!ct_defined_check_expr_list_1_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "ct_defined_check_expr_list_1", c)) break; + } + return true; + } + + // COMMA ct_defined_check_expr + private static boolean ct_defined_check_expr_list_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ct_defined_check_expr_list_1_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, COMMA); + r = r && ct_defined_check_expr(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + /* ********************************************************** */ // KW_CT_ECHO constant_expr EOS public static boolean ct_echo_stmt(PsiBuilder b, int l) { @@ -1970,7 +2062,7 @@ private static boolean def_attr_values_1(PsiBuilder b, int l) { } /* ********************************************************** */ - // KW_DEF any_ident (LP parameter_list RP)? EQ distinct_inline? def_declaration_source attributes? EOS + // KW_DEF any_ident (LP parameter_list RP)? EQ def_declaration_source attributes? EOS public static boolean def_decl(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "def_decl")) return false; if (!nextTokenIs(b, KW_DEF)) return false; @@ -1980,9 +2072,8 @@ public static boolean def_decl(PsiBuilder b, int l) { r = r && any_ident(b, l + 1); r = r && def_decl_2(b, l + 1); r = r && consumeToken(b, EQ); - r = r && def_decl_4(b, l + 1); r = r && def_declaration_source(b, l + 1); - r = r && def_decl_6(b, l + 1); + r = r && def_decl_5(b, l + 1); r = r && consumeToken(b, EOS); exit_section_(b, m, DEF_DECL, r); return r; @@ -2007,16 +2098,9 @@ private static boolean def_decl_2_0(PsiBuilder b, int l) { return r; } - // distinct_inline? - private static boolean def_decl_4(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "def_decl_4")) return false; - distinct_inline(b, l + 1); - return true; - } - // attributes? - private static boolean def_decl_6(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "def_decl_6")) return false; + private static boolean def_decl_5(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "def_decl_5")) return false; attributes(b, l + 1); return true; } @@ -2119,51 +2203,50 @@ private static boolean defer_stmt_1_0(PsiBuilder b, int l) { } /* ********************************************************** */ - // KW_DISTINCT KW_INLINE? | KW_INLINE KW_DISTINCT? - public static boolean distinct_inline(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "distinct_inline")) return false; - if (!nextTokenIs(b, "", KW_DISTINCT, KW_INLINE)) return false; - boolean r; - Marker m = enter_section_(b, l, _NONE_, DISTINCT_INLINE, ""); - r = distinct_inline_0(b, l + 1); - if (!r) r = distinct_inline_1(b, l + 1); - exit_section_(b, l, m, r, false, null); - return r; - } - - // KW_DISTINCT KW_INLINE? - private static boolean distinct_inline_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "distinct_inline_0")) return false; + // KW_DISTINCT type_name interface_impl? attributes? '=' KW_INLINE? type generic_parameters? EOS + public static boolean distinct_declaration(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "distinct_declaration")) return false; + if (!nextTokenIs(b, KW_DISTINCT)) return false; boolean r; Marker m = enter_section_(b); r = consumeToken(b, KW_DISTINCT); - r = r && distinct_inline_0_1(b, l + 1); - exit_section_(b, m, null, r); + r = r && type_name(b, l + 1); + r = r && distinct_declaration_2(b, l + 1); + r = r && distinct_declaration_3(b, l + 1); + r = r && consumeToken(b, "="); + r = r && distinct_declaration_5(b, l + 1); + r = r && type(b, l + 1); + r = r && distinct_declaration_7(b, l + 1); + r = r && consumeToken(b, EOS); + exit_section_(b, m, DISTINCT_DECLARATION, r); return r; } - // KW_INLINE? - private static boolean distinct_inline_0_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "distinct_inline_0_1")) return false; - consumeToken(b, KW_INLINE); + // interface_impl? + private static boolean distinct_declaration_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "distinct_declaration_2")) return false; + interface_impl(b, l + 1); return true; } - // KW_INLINE KW_DISTINCT? - private static boolean distinct_inline_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "distinct_inline_1")) return false; - boolean r; - Marker m = enter_section_(b); - r = consumeToken(b, KW_INLINE); - r = r && distinct_inline_1_1(b, l + 1); - exit_section_(b, m, null, r); - return r; + // attributes? + private static boolean distinct_declaration_3(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "distinct_declaration_3")) return false; + attributes(b, l + 1); + return true; } - // KW_DISTINCT? - private static boolean distinct_inline_1_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "distinct_inline_1_1")) return false; - consumeToken(b, KW_DISTINCT); + // KW_INLINE? + private static boolean distinct_declaration_5(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "distinct_declaration_5")) return false; + consumeToken(b, KW_INLINE); + return true; + } + + // generic_parameters? + private static boolean distinct_declaration_7(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "distinct_declaration_7")) return false; + generic_parameters(b, l + 1); return true; } @@ -2231,7 +2314,7 @@ private static boolean else_part_1(PsiBuilder b, int l) { } /* ********************************************************** */ - // CONST_IDENT (LP arg_list COMMA? RP)? + // CONST_IDENT attributes? (EQ expr)? public static boolean enum_constant(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "enum_constant")) return false; if (!nextTokenIs(b, CONST_IDENT)) return false; @@ -2239,39 +2322,38 @@ public static boolean enum_constant(PsiBuilder b, int l) { Marker m = enter_section_(b); r = consumeToken(b, CONST_IDENT); r = r && enum_constant_1(b, l + 1); + r = r && enum_constant_2(b, l + 1); exit_section_(b, m, ENUM_CONSTANT, r); return r; } - // (LP arg_list COMMA? RP)? + // attributes? private static boolean enum_constant_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "enum_constant_1")) return false; - enum_constant_1_0(b, l + 1); + attributes(b, l + 1); + return true; + } + + // (EQ expr)? + private static boolean enum_constant_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "enum_constant_2")) return false; + enum_constant_2_0(b, l + 1); return true; } - // LP arg_list COMMA? RP - private static boolean enum_constant_1_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "enum_constant_1_0")) return false; + // EQ expr + private static boolean enum_constant_2_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "enum_constant_2_0")) return false; boolean r; Marker m = enter_section_(b); - r = consumeToken(b, LP); - r = r && arg_list(b, l + 1); - r = r && enum_constant_1_0_2(b, l + 1); - r = r && consumeToken(b, RP); + r = consumeToken(b, EQ); + r = r && expr(b, l + 1, -1); exit_section_(b, m, null, r); return r; } - // COMMA? - private static boolean enum_constant_1_0_2(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "enum_constant_1_0_2")) return false; - consumeToken(b, COMMA); - return true; - } - /* ********************************************************** */ - // KW_ENUM type_name (COLON enum_spec)? attributes? LB enum_list RB + // KW_ENUM type_name interface_impl? (COLON enum_spec)? attributes? LB enum_list RB public static boolean enum_declaration(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "enum_declaration")) return false; if (!nextTokenIs(b, KW_ENUM)) return false; @@ -2281,6 +2363,7 @@ public static boolean enum_declaration(PsiBuilder b, int l) { r = r && type_name(b, l + 1); r = r && enum_declaration_2(b, l + 1); r = r && enum_declaration_3(b, l + 1); + r = r && enum_declaration_4(b, l + 1); r = r && consumeToken(b, LB); r = r && enum_list(b, l + 1); r = r && consumeToken(b, RB); @@ -2288,16 +2371,23 @@ public static boolean enum_declaration(PsiBuilder b, int l) { return r; } - // (COLON enum_spec)? + // interface_impl? private static boolean enum_declaration_2(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "enum_declaration_2")) return false; - enum_declaration_2_0(b, l + 1); + interface_impl(b, l + 1); + return true; + } + + // (COLON enum_spec)? + private static boolean enum_declaration_3(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "enum_declaration_3")) return false; + enum_declaration_3_0(b, l + 1); return true; } // COLON enum_spec - private static boolean enum_declaration_2_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "enum_declaration_2_0")) return false; + private static boolean enum_declaration_3_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "enum_declaration_3_0")) return false; boolean r; Marker m = enter_section_(b); r = consumeToken(b, COLON); @@ -2307,14 +2397,14 @@ private static boolean enum_declaration_2_0(PsiBuilder b, int l) { } // attributes? - private static boolean enum_declaration_3(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "enum_declaration_3")) return false; + private static boolean enum_declaration_4(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "enum_declaration_4")) return false; attributes(b, l + 1); return true; } /* ********************************************************** */ - // enum_constant (COMMA enum_constant)* COMMA? + // enum_constant (COMMA enum_constant ?)* COMMA? public static boolean enum_list(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "enum_list")) return false; if (!nextTokenIs(b, CONST_IDENT)) return false; @@ -2327,7 +2417,7 @@ public static boolean enum_list(PsiBuilder b, int l) { return r; } - // (COMMA enum_constant)* + // (COMMA enum_constant ?)* private static boolean enum_list_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "enum_list_1")) return false; while (true) { @@ -2338,17 +2428,24 @@ private static boolean enum_list_1(PsiBuilder b, int l) { return true; } - // COMMA enum_constant + // COMMA enum_constant ? private static boolean enum_list_1_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "enum_list_1_0")) return false; boolean r; Marker m = enter_section_(b); r = consumeToken(b, COMMA); - r = r && enum_constant(b, l + 1); + r = r && enum_list_1_0_1(b, l + 1); exit_section_(b, m, null, r); return r; } + // enum_constant ? + private static boolean enum_list_1_0_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "enum_list_1_0_1")) return false; + enum_constant(b, l + 1); + return true; + } + // COMMA? private static boolean enum_list_2(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "enum_list_2")) return false; @@ -2357,53 +2454,17 @@ private static boolean enum_list_2(PsiBuilder b, int l) { } /* ********************************************************** */ - // type (IDENT (EQ expr)?)? + // type IDENT public static boolean enum_param_decl(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "enum_param_decl")) return false; boolean r; Marker m = enter_section_(b, l, _NONE_, ENUM_PARAM_DECL, ""); r = type(b, l + 1); - r = r && enum_param_decl_1(b, l + 1); + r = r && consumeToken(b, IDENT); exit_section_(b, l, m, r, false, null); return r; } - // (IDENT (EQ expr)?)? - private static boolean enum_param_decl_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "enum_param_decl_1")) return false; - enum_param_decl_1_0(b, l + 1); - return true; - } - - // IDENT (EQ expr)? - private static boolean enum_param_decl_1_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "enum_param_decl_1_0")) return false; - boolean r; - Marker m = enter_section_(b); - r = consumeToken(b, IDENT); - r = r && enum_param_decl_1_0_1(b, l + 1); - exit_section_(b, m, null, r); - return r; - } - - // (EQ expr)? - private static boolean enum_param_decl_1_0_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "enum_param_decl_1_0_1")) return false; - enum_param_decl_1_0_1_0(b, l + 1); - return true; - } - - // EQ expr - private static boolean enum_param_decl_1_0_1_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "enum_param_decl_1_0_1_0")) return false; - boolean r; - Marker m = enter_section_(b); - r = consumeToken(b, EQ); - r = r && expr(b, l + 1, -1); - exit_section_(b, m, null, r); - return r; - } - /* ********************************************************** */ // LP enum_param_decl (COMMA enum_param_decl)* RP public static boolean enum_param_list(PsiBuilder b, int l) { @@ -2442,20 +2503,31 @@ private static boolean enum_param_list_2_0(PsiBuilder b, int l) { } /* ********************************************************** */ - // type enum_param_list? + // enum_param_list | type enum_param_list? public static boolean enum_spec(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "enum_spec")) return false; boolean r; Marker m = enter_section_(b, l, _NONE_, ENUM_SPEC, ""); - r = type(b, l + 1); - r = r && enum_spec_1(b, l + 1); + r = enum_param_list(b, l + 1); + if (!r) r = enum_spec_1(b, l + 1); exit_section_(b, l, m, r, false, null); return r; } - // enum_param_list? + // type enum_param_list? private static boolean enum_spec_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "enum_spec_1")) return false; + boolean r; + Marker m = enter_section_(b); + r = type(b, l + 1); + r = r && enum_spec_1_1(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + // enum_param_list? + private static boolean enum_spec_1_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "enum_spec_1_1")) return false; enum_param_list(b, l + 1); return true; } @@ -2511,7 +2583,7 @@ private static boolean expression_list_1_0(PsiBuilder b, int l) { } /* ********************************************************** */ - // KW_FAULT type_name attributes? LB CONST_IDENT (COMMA CONST_IDENT)* COMMA? RB + // KW_FAULT type_name interface_impl? attributes? LB CONST_IDENT (COMMA CONST_IDENT)* COMMA? RB public static boolean fault_declaration(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "fault_declaration")) return false; if (!nextTokenIs(b, KW_FAULT)) return false; @@ -2520,35 +2592,43 @@ public static boolean fault_declaration(PsiBuilder b, int l) { r = consumeToken(b, KW_FAULT); r = r && type_name(b, l + 1); r = r && fault_declaration_2(b, l + 1); + r = r && fault_declaration_3(b, l + 1); r = r && consumeTokens(b, 0, LB, CONST_IDENT); - r = r && fault_declaration_5(b, l + 1); r = r && fault_declaration_6(b, l + 1); + r = r && fault_declaration_7(b, l + 1); r = r && consumeToken(b, RB); exit_section_(b, m, FAULT_DECLARATION, r); return r; } - // attributes? + // interface_impl? private static boolean fault_declaration_2(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "fault_declaration_2")) return false; + interface_impl(b, l + 1); + return true; + } + + // attributes? + private static boolean fault_declaration_3(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "fault_declaration_3")) return false; attributes(b, l + 1); return true; } // (COMMA CONST_IDENT)* - private static boolean fault_declaration_5(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "fault_declaration_5")) return false; + private static boolean fault_declaration_6(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "fault_declaration_6")) return false; while (true) { int c = current_position_(b); - if (!fault_declaration_5_0(b, l + 1)) break; - if (!empty_element_parsed_guard_(b, "fault_declaration_5", c)) break; + if (!fault_declaration_6_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "fault_declaration_6", c)) break; } return true; } // COMMA CONST_IDENT - private static boolean fault_declaration_5_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "fault_declaration_5_0")) return false; + private static boolean fault_declaration_6_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "fault_declaration_6_0")) return false; boolean r; Marker m = enter_section_(b); r = consumeTokens(b, 0, COMMA, CONST_IDENT); @@ -2557,8 +2637,8 @@ private static boolean fault_declaration_5_0(PsiBuilder b, int l) { } // COMMA? - private static boolean fault_declaration_6(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "fault_declaration_6")) return false; + private static boolean fault_declaration_7(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "fault_declaration_7")) return false; consumeToken(b, COMMA); return true; } @@ -2782,31 +2862,43 @@ private static boolean foreach_vars_1_0(PsiBuilder b, int l) { } /* ********************************************************** */ - // KW_FN func_header fn_parameter_list attributes? (macro_func_body | EOS) - public static boolean func_definition(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "func_definition")) return false; + // KW_FN func_header fn_parameter_list attributes? + public static boolean func_def(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "func_def")) return false; if (!nextTokenIs(b, KW_FN)) return false; boolean r; Marker m = enter_section_(b); r = consumeToken(b, KW_FN); r = r && func_header(b, l + 1); r = r && fn_parameter_list(b, l + 1); - r = r && func_definition_3(b, l + 1); - r = r && func_definition_4(b, l + 1); - exit_section_(b, m, FUNC_DEFINITION, r); + r = r && func_def_3(b, l + 1); + exit_section_(b, m, FUNC_DEF, r); return r; } // attributes? - private static boolean func_definition_3(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "func_definition_3")) return false; + private static boolean func_def_3(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "func_def_3")) return false; attributes(b, l + 1); return true; } + /* ********************************************************** */ + // func_def (macro_func_body | EOS) + public static boolean func_definition(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "func_definition")) return false; + if (!nextTokenIs(b, KW_FN)) return false; + boolean r; + Marker m = enter_section_(b); + r = func_def(b, l + 1); + r = r && func_definition_1(b, l + 1); + exit_section_(b, m, FUNC_DEFINITION, r); + return r; + } + // macro_func_body | EOS - private static boolean func_definition_4(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "func_definition_4")) return false; + private static boolean func_definition_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "func_definition_1")) return false; boolean r; r = macro_func_body(b, l + 1); if (!r) r = consumeToken(b, EOS); @@ -3248,6 +3340,135 @@ public static boolean integer_type(PsiBuilder b, int l) { return r; } + /* ********************************************************** */ + // LB (func_def EOS)* RB + public static boolean interface_body(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "interface_body")) return false; + if (!nextTokenIs(b, LB)) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, LB); + r = r && interface_body_1(b, l + 1); + r = r && consumeToken(b, RB); + exit_section_(b, m, INTERFACE_BODY, r); + return r; + } + + // (func_def EOS)* + private static boolean interface_body_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "interface_body_1")) return false; + while (true) { + int c = current_position_(b); + if (!interface_body_1_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "interface_body_1", c)) break; + } + return true; + } + + // func_def EOS + private static boolean interface_body_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "interface_body_1_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = func_def(b, l + 1); + r = r && consumeToken(b, EOS); + exit_section_(b, m, null, r); + return r; + } + + /* ********************************************************** */ + // KW_INTERFACE type_name (COLON type (COMMA type)*)? interface_body + public static boolean interface_definition(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "interface_definition")) return false; + if (!nextTokenIs(b, KW_INTERFACE)) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, KW_INTERFACE); + r = r && type_name(b, l + 1); + r = r && interface_definition_2(b, l + 1); + r = r && interface_body(b, l + 1); + exit_section_(b, m, INTERFACE_DEFINITION, r); + return r; + } + + // (COLON type (COMMA type)*)? + private static boolean interface_definition_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "interface_definition_2")) return false; + interface_definition_2_0(b, l + 1); + return true; + } + + // COLON type (COMMA type)* + private static boolean interface_definition_2_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "interface_definition_2_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, COLON); + r = r && type(b, l + 1); + r = r && interface_definition_2_0_2(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + // (COMMA type)* + private static boolean interface_definition_2_0_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "interface_definition_2_0_2")) return false; + while (true) { + int c = current_position_(b); + if (!interface_definition_2_0_2_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "interface_definition_2_0_2", c)) break; + } + return true; + } + + // COMMA type + private static boolean interface_definition_2_0_2_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "interface_definition_2_0_2_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, COMMA); + r = r && type(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + /* ********************************************************** */ + // LP type_name (COMMA type)* RP + public static boolean interface_impl(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "interface_impl")) return false; + if (!nextTokenIs(b, LP)) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, LP); + r = r && type_name(b, l + 1); + r = r && interface_impl_2(b, l + 1); + r = r && consumeToken(b, RP); + exit_section_(b, m, INTERFACE_IMPL, r); + return r; + } + + // (COMMA type)* + private static boolean interface_impl_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "interface_impl_2")) return false; + while (true) { + int c = current_position_(b); + if (!interface_impl_2_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "interface_impl_2", c)) break; + } + return true; + } + + // COMMA type + private static boolean interface_impl_2_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "interface_impl_2_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, COMMA); + r = r && type(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + /* ********************************************************** */ // CONST_IDENT COLON public static boolean label(PsiBuilder b, int l) { @@ -3834,7 +4055,7 @@ public static boolean param_path(PsiBuilder b, int l) { } /* ********************************************************** */ - // LBT expr (DOTDOT expr)? RBT | DOT primary_group + // LBT expr (DOTDOT expr)? RBT | DOT primary_group | DOT CT_TYPE_IDENT public static boolean param_path_element(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "param_path_element")) return false; if (!nextTokenIs(b, "", DOT, LBT)) return false; @@ -3842,6 +4063,7 @@ public static boolean param_path_element(PsiBuilder b, int l) { Marker m = enter_section_(b, l, _NONE_, PARAM_PATH_ELEMENT, ""); r = param_path_element_0(b, l + 1); if (!r) r = param_path_element_1(b, l + 1); + if (!r) r = parseTokens(b, 0, DOT, CT_TYPE_IDENT); exit_section_(b, l, m, r, false, null); return r; } @@ -3889,7 +4111,7 @@ private static boolean param_path_element_1(PsiBuilder b, int l) { } /* ********************************************************** */ - // type (ELLIPSIS? IDENT attributes? | ELLIPSIS? CT_IDENT | (HASH_IDENT | AMP IDENT) attributes? | attributes?) + // KW_INLINE? type (ELLIPSIS? IDENT attributes? | ELLIPSIS? CT_IDENT | (HASH_IDENT | AMP IDENT) attributes? | attributes?) // | ELLIPSIS | AMP IDENT attributes? | HASH_IDENT attributes? | IDENT ELLIPSIS? attributes? // | CT_IDENT | CT_IDENT ELLIPSIS public static boolean parameter(PsiBuilder b, int l) { @@ -3907,88 +4129,96 @@ public static boolean parameter(PsiBuilder b, int l) { return r; } - // type (ELLIPSIS? IDENT attributes? | ELLIPSIS? CT_IDENT | (HASH_IDENT | AMP IDENT) attributes? | attributes?) + // KW_INLINE? type (ELLIPSIS? IDENT attributes? | ELLIPSIS? CT_IDENT | (HASH_IDENT | AMP IDENT) attributes? | attributes?) private static boolean parameter_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "parameter_0")) return false; boolean r; Marker m = enter_section_(b); - r = type(b, l + 1); - r = r && parameter_0_1(b, l + 1); + r = parameter_0_0(b, l + 1); + r = r && type(b, l + 1); + r = r && parameter_0_2(b, l + 1); exit_section_(b, m, null, r); return r; } + // KW_INLINE? + private static boolean parameter_0_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "parameter_0_0")) return false; + consumeToken(b, KW_INLINE); + return true; + } + // ELLIPSIS? IDENT attributes? | ELLIPSIS? CT_IDENT | (HASH_IDENT | AMP IDENT) attributes? | attributes? - private static boolean parameter_0_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "parameter_0_1")) return false; + private static boolean parameter_0_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "parameter_0_2")) return false; boolean r; Marker m = enter_section_(b); - r = parameter_0_1_0(b, l + 1); - if (!r) r = parameter_0_1_1(b, l + 1); - if (!r) r = parameter_0_1_2(b, l + 1); - if (!r) r = parameter_0_1_3(b, l + 1); + r = parameter_0_2_0(b, l + 1); + if (!r) r = parameter_0_2_1(b, l + 1); + if (!r) r = parameter_0_2_2(b, l + 1); + if (!r) r = parameter_0_2_3(b, l + 1); exit_section_(b, m, null, r); return r; } // ELLIPSIS? IDENT attributes? - private static boolean parameter_0_1_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "parameter_0_1_0")) return false; + private static boolean parameter_0_2_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "parameter_0_2_0")) return false; boolean r; Marker m = enter_section_(b); - r = parameter_0_1_0_0(b, l + 1); + r = parameter_0_2_0_0(b, l + 1); r = r && consumeToken(b, IDENT); - r = r && parameter_0_1_0_2(b, l + 1); + r = r && parameter_0_2_0_2(b, l + 1); exit_section_(b, m, null, r); return r; } // ELLIPSIS? - private static boolean parameter_0_1_0_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "parameter_0_1_0_0")) return false; + private static boolean parameter_0_2_0_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "parameter_0_2_0_0")) return false; consumeToken(b, ELLIPSIS); return true; } // attributes? - private static boolean parameter_0_1_0_2(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "parameter_0_1_0_2")) return false; + private static boolean parameter_0_2_0_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "parameter_0_2_0_2")) return false; attributes(b, l + 1); return true; } // ELLIPSIS? CT_IDENT - private static boolean parameter_0_1_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "parameter_0_1_1")) return false; + private static boolean parameter_0_2_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "parameter_0_2_1")) return false; boolean r; Marker m = enter_section_(b); - r = parameter_0_1_1_0(b, l + 1); + r = parameter_0_2_1_0(b, l + 1); r = r && consumeToken(b, CT_IDENT); exit_section_(b, m, null, r); return r; } // ELLIPSIS? - private static boolean parameter_0_1_1_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "parameter_0_1_1_0")) return false; + private static boolean parameter_0_2_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "parameter_0_2_1_0")) return false; consumeToken(b, ELLIPSIS); return true; } // (HASH_IDENT | AMP IDENT) attributes? - private static boolean parameter_0_1_2(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "parameter_0_1_2")) return false; + private static boolean parameter_0_2_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "parameter_0_2_2")) return false; boolean r; Marker m = enter_section_(b); - r = parameter_0_1_2_0(b, l + 1); - r = r && parameter_0_1_2_1(b, l + 1); + r = parameter_0_2_2_0(b, l + 1); + r = r && parameter_0_2_2_1(b, l + 1); exit_section_(b, m, null, r); return r; } // HASH_IDENT | AMP IDENT - private static boolean parameter_0_1_2_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "parameter_0_1_2_0")) return false; + private static boolean parameter_0_2_2_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "parameter_0_2_2_0")) return false; boolean r; Marker m = enter_section_(b); r = consumeToken(b, HASH_IDENT); @@ -3998,15 +4228,15 @@ private static boolean parameter_0_1_2_0(PsiBuilder b, int l) { } // attributes? - private static boolean parameter_0_1_2_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "parameter_0_1_2_1")) return false; + private static boolean parameter_0_2_2_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "parameter_0_2_2_1")) return false; attributes(b, l + 1); return true; } // attributes? - private static boolean parameter_0_1_3(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "parameter_0_1_3")) return false; + private static boolean parameter_0_2_3(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "parameter_0_2_3")) return false; attributes(b, l + 1); return true; } @@ -4397,27 +4627,6 @@ public static boolean statement_list(PsiBuilder b, int l) { return r; } - /* ********************************************************** */ - // KW_STATIC IDENT attributes? compound_statement - public static boolean static_decl(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "static_decl")) return false; - if (!nextTokenIs(b, KW_STATIC)) return false; - boolean r; - Marker m = enter_section_(b); - r = consumeTokens(b, 0, KW_STATIC, IDENT); - r = r && static_decl_2(b, l + 1); - r = r && compound_statement(b, l + 1); - exit_section_(b, m, STATIC_DECL, r); - return r; - } - - // attributes? - private static boolean static_decl_2(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "static_decl_2")) return false; - attributes(b, l + 1); - return true; - } - /* ********************************************************** */ // LB struct_member_declaration* RB public static boolean struct_body(PsiBuilder b, int l) { @@ -4444,7 +4653,7 @@ private static boolean struct_body_1(PsiBuilder b, int l) { } /* ********************************************************** */ - // struct_or_union type_name attributes? struct_body + // struct_or_union type_name interface_impl? attributes? struct_body public static boolean struct_declaration(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "struct_declaration")) return false; if (!nextTokenIs(b, "", KW_STRUCT, KW_UNION)) return false; @@ -4453,14 +4662,22 @@ public static boolean struct_declaration(PsiBuilder b, int l) { r = struct_or_union(b, l + 1); r = r && type_name(b, l + 1); r = r && struct_declaration_2(b, l + 1); + r = r && struct_declaration_3(b, l + 1); r = r && struct_body(b, l + 1); exit_section_(b, l, m, r, false, null); return r; } - // attributes? + // interface_impl? private static boolean struct_declaration_2(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "struct_declaration_2")) return false; + interface_impl(b, l + 1); + return true; + } + + // attributes? + private static boolean struct_declaration_3(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "struct_declaration_3")) return false; attributes(b, l + 1); return true; } @@ -4671,8 +4888,9 @@ private static boolean switch_stmt_4(PsiBuilder b, int l) { // | def_decl // | fault_declaration // | macro_definition - // | static_decl - // | KW_ASM expr EOS + // | KW_ASM expr attributes? EOS + // | interface_definition + // | distinct_declaration public static boolean top_level(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "top_level")) return false; boolean r; @@ -4686,8 +4904,9 @@ public static boolean top_level(PsiBuilder b, int l) { if (!r) r = def_decl(b, l + 1); if (!r) r = fault_declaration(b, l + 1); if (!r) r = macro_definition(b, l + 1); - if (!r) r = static_decl(b, l + 1); - if (!r) r = top_level_10(b, l + 1); + if (!r) r = top_level_9(b, l + 1); + if (!r) r = interface_definition(b, l + 1); + if (!r) r = distinct_declaration(b, l + 1); exit_section_(b, l, m, r, false, null); return r; } @@ -4720,18 +4939,26 @@ private static boolean top_level_1_1(PsiBuilder b, int l) { return r; } - // KW_ASM expr EOS - private static boolean top_level_10(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "top_level_10")) return false; + // KW_ASM expr attributes? EOS + private static boolean top_level_9(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "top_level_9")) return false; boolean r; Marker m = enter_section_(b); r = consumeToken(b, KW_ASM); r = r && expr(b, l + 1, -1); + r = r && top_level_9_2(b, l + 1); r = r && consumeToken(b, EOS); exit_section_(b, m, null, r); return r; } + // attributes? + private static boolean top_level_9_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "top_level_9_2")) return false; + attributes(b, l + 1); + return true; + } + /* ********************************************************** */ // AT_IDENT (LP parameter_list? RP)? public static boolean trailing_block_param(PsiBuilder b, int l) { @@ -5192,9 +5419,9 @@ private static boolean while_stmt_1(PsiBuilder b, int l) { /* ********************************************************** */ // Expression root: expr // Operator priority table: - // 0: BINARY(assign_bin_expr) - // 1: ATOM(assign_type_expr) - // 2: BINARY(elvis_bin_expr) BINARY(optelse_bin_expr) BINARY(ternary_expr) POSTFIX(optional_expr) + // 0: BINARY(elvis_bin_expr) BINARY(optelse_bin_expr) BINARY(ternary_expr) POSTFIX(optional_expr) + // 1: BINARY(assign_bin_expr) + // 2: ATOM(assign_type_expr) // 3: BINARY(or_bin_expr) // 4: BINARY(and_bin_expr) // 5: BINARY(rel_bin_expr) @@ -5207,9 +5434,9 @@ private static boolean while_stmt_1(PsiBuilder b, int l) { // 12: ATOM(literal_expr) ATOM(path_ident_expr) ATOM(string_expr) ATOM(bytes_expr) // ATOM(keyword_expr) ATOM(builtin_const_expr) ATOM(builtin_expr) ATOM(path_const_expr) // ATOM(path_at_ident_expr) ATOM(compound_init_expr) PREFIX(grouped_expr) ATOM(local_ident_expr) - // ATOM(type_access_expr) ATOM(expr_block_expr) ATOM(ct_call_expr) ATOM(ct_arg_expr) - // ATOM(ct_analyze_expr) ATOM(ct_checks_expr) ATOM(lambda_decl_expr) PREFIX(lambda_decl_short_expr) - // ATOM(init_list_expr) + // ATOM(type_access_expr) ATOM(expr_block_expr) ATOM(ct_call_expr) ATOM(ct_feature_expr) + // ATOM(ct_arg_expr) ATOM(ct_analyze_expr) ATOM(ct_defined_expr) ATOM(ct_cond_expr) + // ATOM(lambda_decl_expr) PREFIX(lambda_decl_short_expr) ATOM(init_list_expr) public static boolean expr(PsiBuilder b, int l, int g) { if (!recursion_guard_(b, l, "expr")) return false; addVariant(b, ""); @@ -5232,9 +5459,11 @@ public static boolean expr(PsiBuilder b, int l, int g) { if (!r) r = type_access_expr(b, l + 1); if (!r) r = expr_block_expr(b, l + 1); if (!r) r = ct_call_expr(b, l + 1); + if (!r) r = ct_feature_expr(b, l + 1); if (!r) r = ct_arg_expr(b, l + 1); if (!r) r = ct_analyze_expr(b, l + 1); - if (!r) r = ct_checks_expr(b, l + 1); + if (!r) r = ct_defined_expr(b, l + 1); + if (!r) r = ct_cond_expr(b, l + 1); if (!r) r = lambda_decl_expr(b, l + 1); if (!r) r = lambda_decl_short_expr(b, l + 1); if (!r) r = init_list_expr(b, l + 1); @@ -5249,27 +5478,27 @@ public static boolean expr_0(PsiBuilder b, int l, int g) { boolean r = true; while (true) { Marker m = enter_section_(b, l, _LEFT_, null); - if (g < 0 && assign_bin_op(b, l + 1)) { + if (g < 0 && consumeTokenSmart(b, ELVIS)) { r = expr(b, l, -1); exit_section_(b, l, m, BINARY_EXPR, r, true, null); } - else if (g < 2 && consumeTokenSmart(b, ELVIS)) { - r = expr(b, l, 1); - exit_section_(b, l, m, BINARY_EXPR, r, true, null); - } - else if (g < 2 && consumeTokenSmart(b, OPTELSE)) { - r = expr(b, l, 1); + else if (g < 0 && consumeTokenSmart(b, OPTELSE)) { + r = expr(b, l, -1); exit_section_(b, l, m, BINARY_EXPR, r, true, null); } - else if (g < 2 && ternary_expr_0(b, l + 1)) { - r = report_error_(b, expr(b, l, 1)); + else if (g < 0 && ternary_expr_0(b, l + 1)) { + r = report_error_(b, expr(b, l, -1)); r = ternary_expr_1(b, l + 1) && r; exit_section_(b, l, m, TERNARY_EXPR, r, true, null); } - else if (g < 2 && optional_expr_0(b, l + 1)) { + else if (g < 0 && optional_expr_0(b, l + 1)) { r = true; exit_section_(b, l, m, OPTIONAL_EXPR, r, true, null); } + else if (g < 1 && assign_bin_op(b, l + 1)) { + r = expr(b, l, 0); + exit_section_(b, l, m, BINARY_EXPR, r, true, null); + } else if (g < 3 && consumeTokenSmart(b, OR)) { r = expr(b, l, 3); exit_section_(b, l, m, BINARY_EXPR, r, true, null); @@ -5310,18 +5539,6 @@ else if (g < 11 && call_expr_tail(b, l + 1)) { return r; } - // CT_TYPE_IDENT EQ type - public static boolean assign_type_expr(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "assign_type_expr")) return false; - if (!nextTokenIsSmart(b, CT_TYPE_IDENT)) return false; - boolean r; - Marker m = enter_section_(b); - r = consumeTokensSmart(b, 0, CT_TYPE_IDENT, EQ); - r = r && type(b, l + 1); - exit_section_(b, m, ASSIGN_TYPE_EXPR, r); - return r; - } - // QUESTION !(BANG? expr_terminator) private static boolean ternary_expr_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "ternary_expr_0")) return false; @@ -5411,6 +5628,18 @@ private static boolean optional_expr_0_1_0_0(PsiBuilder b, int l) { return true; } + // CT_TYPE_IDENT EQ type + public static boolean assign_type_expr(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "assign_type_expr")) return false; + if (!nextTokenIsSmart(b, CT_TYPE_IDENT)) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeTokensSmart(b, 0, CT_TYPE_IDENT, EQ); + r = r && type(b, l + 1); + exit_section_(b, m, ASSIGN_TYPE_EXPR, r); + return r; + } + public static boolean unary_expr(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "unary_expr")) return false; boolean r, p; @@ -5630,6 +5859,17 @@ public static boolean ct_call_expr(PsiBuilder b, int l) { return r; } + // KW_CT_FEATURE LP CONST_IDENT RP + public static boolean ct_feature_expr(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ct_feature_expr")) return false; + if (!nextTokenIsSmart(b, KW_CT_FEATURE)) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeTokensSmart(b, 0, KW_CT_FEATURE, LP, CONST_IDENT, RP); + exit_section_(b, m, CT_FEATURE_EXPR, r); + return r; + } + // ct_arg grouped_expression public static boolean ct_arg_expr(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "ct_arg_expr")) return false; @@ -5652,16 +5892,30 @@ public static boolean ct_analyze_expr(PsiBuilder b, int l) { return r; } - // KW_CT_CHECKS LP expression_list RP - public static boolean ct_checks_expr(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "ct_checks_expr")) return false; - if (!nextTokenIsSmart(b, KW_CT_CHECKS)) return false; + // KW_CT_DEFINED LP ct_defined_check_expr_list RP + public static boolean ct_defined_expr(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ct_defined_expr")) return false; + if (!nextTokenIsSmart(b, KW_CT_DEFINED)) return false; boolean r; Marker m = enter_section_(b); - r = consumeTokensSmart(b, 0, KW_CT_CHECKS, LP); + r = consumeTokensSmart(b, 0, KW_CT_DEFINED, LP); + r = r && ct_defined_check_expr_list(b, l + 1); + r = r && consumeToken(b, RP); + exit_section_(b, m, CT_DEFINED_EXPR, r); + return r; + } + + // ct_cond LP expression_list RP + public static boolean ct_cond_expr(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ct_cond_expr")) return false; + if (!nextTokenIsSmart(b, KW_CT_AND, KW_CT_OR)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, CT_COND_EXPR, ""); + r = ct_cond(b, l + 1); + r = r && consumeToken(b, LP); r = r && expression_list(b, l + 1); r = r && consumeToken(b, RP); - exit_section_(b, m, CT_CHECKS_EXPR, r); + exit_section_(b, l, m, r, false, null); return r; } diff --git a/src/main/gen/org/c3lang/intellij/psi/C3AsmBlockStmt.java b/src/main/gen/org/c3lang/intellij/psi/C3AsmBlockStmt.java index d7a53cd..0148253 100644 --- a/src/main/gen/org/c3lang/intellij/psi/C3AsmBlockStmt.java +++ b/src/main/gen/org/c3lang/intellij/psi/C3AsmBlockStmt.java @@ -10,6 +10,9 @@ public interface C3AsmBlockStmt extends PsiElement { @NotNull List getAsmStmtList(); + @Nullable + C3Attributes getAttributes(); + @Nullable C3Expr getExpr(); diff --git a/src/main/gen/org/c3lang/intellij/psi/C3BitstructDeclaration.java b/src/main/gen/org/c3lang/intellij/psi/C3BitstructDeclaration.java index 674e3fc..f123301 100644 --- a/src/main/gen/org/c3lang/intellij/psi/C3BitstructDeclaration.java +++ b/src/main/gen/org/c3lang/intellij/psi/C3BitstructDeclaration.java @@ -13,6 +13,9 @@ public interface C3BitstructDeclaration extends PsiElement { @NotNull C3BitstructBody getBitstructBody(); + @Nullable + C3InterfaceImpl getInterfaceImpl(); + @NotNull C3Type getType(); diff --git a/src/main/gen/org/c3lang/intellij/psi/C3CtCond.java b/src/main/gen/org/c3lang/intellij/psi/C3CtCond.java new file mode 100644 index 0000000..c926011 --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/psi/C3CtCond.java @@ -0,0 +1,10 @@ +// This is a generated file. Not intended for manual editing. +package org.c3lang.intellij.psi; + +import java.util.List; +import org.jetbrains.annotations.*; +import com.intellij.psi.PsiElement; + +public interface C3CtCond extends PsiElement { + +} diff --git a/src/main/gen/org/c3lang/intellij/psi/C3CtChecksExpr.java b/src/main/gen/org/c3lang/intellij/psi/C3CtCondExpr.java similarity index 74% rename from src/main/gen/org/c3lang/intellij/psi/C3CtChecksExpr.java rename to src/main/gen/org/c3lang/intellij/psi/C3CtCondExpr.java index a89b698..c63f82b 100644 --- a/src/main/gen/org/c3lang/intellij/psi/C3CtChecksExpr.java +++ b/src/main/gen/org/c3lang/intellij/psi/C3CtCondExpr.java @@ -5,7 +5,10 @@ import org.jetbrains.annotations.*; import com.intellij.psi.PsiElement; -public interface C3CtChecksExpr extends C3Expr { +public interface C3CtCondExpr extends C3Expr { + + @NotNull + C3CtCond getCtCond(); @NotNull C3ExpressionList getExpressionList(); diff --git a/src/main/gen/org/c3lang/intellij/psi/C3CtDefinedCheckExpr.java b/src/main/gen/org/c3lang/intellij/psi/C3CtDefinedCheckExpr.java new file mode 100644 index 0000000..125018e --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/psi/C3CtDefinedCheckExpr.java @@ -0,0 +1,13 @@ +// This is a generated file. Not intended for manual editing. +package org.c3lang.intellij.psi; + +import java.util.List; +import org.jetbrains.annotations.*; +import com.intellij.psi.PsiElement; + +public interface C3CtDefinedCheckExpr extends C3Expr { + + @Nullable + C3Type getType(); + +} diff --git a/src/main/gen/org/c3lang/intellij/psi/C3CtDefinedCheckExprList.java b/src/main/gen/org/c3lang/intellij/psi/C3CtDefinedCheckExprList.java new file mode 100644 index 0000000..be135ae --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/psi/C3CtDefinedCheckExprList.java @@ -0,0 +1,13 @@ +// This is a generated file. Not intended for manual editing. +package org.c3lang.intellij.psi; + +import java.util.List; +import org.jetbrains.annotations.*; +import com.intellij.psi.PsiElement; + +public interface C3CtDefinedCheckExprList extends PsiElement { + + @NotNull + List getExprList(); + +} diff --git a/src/main/gen/org/c3lang/intellij/psi/C3CtDefinedExpr.java b/src/main/gen/org/c3lang/intellij/psi/C3CtDefinedExpr.java new file mode 100644 index 0000000..a7535f0 --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/psi/C3CtDefinedExpr.java @@ -0,0 +1,13 @@ +// This is a generated file. Not intended for manual editing. +package org.c3lang.intellij.psi; + +import java.util.List; +import org.jetbrains.annotations.*; +import com.intellij.psi.PsiElement; + +public interface C3CtDefinedExpr extends C3Expr { + + @NotNull + C3CtDefinedCheckExprList getCtDefinedCheckExprList(); + +} diff --git a/src/main/gen/org/c3lang/intellij/psi/C3CtFeatureExpr.java b/src/main/gen/org/c3lang/intellij/psi/C3CtFeatureExpr.java new file mode 100644 index 0000000..cf0cd7e --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/psi/C3CtFeatureExpr.java @@ -0,0 +1,10 @@ +// This is a generated file. Not intended for manual editing. +package org.c3lang.intellij.psi; + +import java.util.List; +import org.jetbrains.annotations.*; +import com.intellij.psi.PsiElement; + +public interface C3CtFeatureExpr extends C3Expr { + +} diff --git a/src/main/gen/org/c3lang/intellij/psi/C3DefDecl.java b/src/main/gen/org/c3lang/intellij/psi/C3DefDecl.java index 8484905..f217b38 100644 --- a/src/main/gen/org/c3lang/intellij/psi/C3DefDecl.java +++ b/src/main/gen/org/c3lang/intellij/psi/C3DefDecl.java @@ -16,9 +16,6 @@ public interface C3DefDecl extends PsiElement { @NotNull C3DefDeclarationSource getDefDeclarationSource(); - @Nullable - C3DistinctInline getDistinctInline(); - @Nullable C3ParameterList getParameterList(); diff --git a/src/main/gen/org/c3lang/intellij/psi/C3DistinctDeclaration.java b/src/main/gen/org/c3lang/intellij/psi/C3DistinctDeclaration.java new file mode 100644 index 0000000..7ea21b1 --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/psi/C3DistinctDeclaration.java @@ -0,0 +1,25 @@ +// This is a generated file. Not intended for manual editing. +package org.c3lang.intellij.psi; + +import java.util.List; +import org.jetbrains.annotations.*; +import com.intellij.psi.PsiElement; + +public interface C3DistinctDeclaration extends PsiElement { + + @Nullable + C3Attributes getAttributes(); + + @Nullable + C3GenericParameters getGenericParameters(); + + @Nullable + C3InterfaceImpl getInterfaceImpl(); + + @NotNull + C3Type getType(); + + @NotNull + C3TypeName getTypeName(); + +} diff --git a/src/main/gen/org/c3lang/intellij/psi/C3EnumConstant.java b/src/main/gen/org/c3lang/intellij/psi/C3EnumConstant.java index 62549c5..2df395e 100644 --- a/src/main/gen/org/c3lang/intellij/psi/C3EnumConstant.java +++ b/src/main/gen/org/c3lang/intellij/psi/C3EnumConstant.java @@ -8,6 +8,9 @@ public interface C3EnumConstant extends PsiElement { @Nullable - C3ArgList getArgList(); + C3Attributes getAttributes(); + + @Nullable + C3Expr getExpr(); } diff --git a/src/main/gen/org/c3lang/intellij/psi/C3EnumDeclaration.java b/src/main/gen/org/c3lang/intellij/psi/C3EnumDeclaration.java index 2b2bfe0..f1f93ed 100644 --- a/src/main/gen/org/c3lang/intellij/psi/C3EnumDeclaration.java +++ b/src/main/gen/org/c3lang/intellij/psi/C3EnumDeclaration.java @@ -16,6 +16,9 @@ public interface C3EnumDeclaration extends PsiElement { @Nullable C3EnumSpec getEnumSpec(); + @Nullable + C3InterfaceImpl getInterfaceImpl(); + @NotNull C3TypeName getTypeName(); diff --git a/src/main/gen/org/c3lang/intellij/psi/C3EnumParamDecl.java b/src/main/gen/org/c3lang/intellij/psi/C3EnumParamDecl.java index 71f83b8..cb909f9 100644 --- a/src/main/gen/org/c3lang/intellij/psi/C3EnumParamDecl.java +++ b/src/main/gen/org/c3lang/intellij/psi/C3EnumParamDecl.java @@ -7,9 +7,6 @@ public interface C3EnumParamDecl extends PsiElement { - @Nullable - C3Expr getExpr(); - @NotNull C3Type getType(); diff --git a/src/main/gen/org/c3lang/intellij/psi/C3EnumSpec.java b/src/main/gen/org/c3lang/intellij/psi/C3EnumSpec.java index 897a63b..2f9e060 100644 --- a/src/main/gen/org/c3lang/intellij/psi/C3EnumSpec.java +++ b/src/main/gen/org/c3lang/intellij/psi/C3EnumSpec.java @@ -10,7 +10,7 @@ public interface C3EnumSpec extends PsiElement { @Nullable C3EnumParamList getEnumParamList(); - @NotNull + @Nullable C3Type getType(); } diff --git a/src/main/gen/org/c3lang/intellij/psi/C3FaultDeclaration.java b/src/main/gen/org/c3lang/intellij/psi/C3FaultDeclaration.java index 72e6121..20b0677 100644 --- a/src/main/gen/org/c3lang/intellij/psi/C3FaultDeclaration.java +++ b/src/main/gen/org/c3lang/intellij/psi/C3FaultDeclaration.java @@ -10,6 +10,9 @@ public interface C3FaultDeclaration extends PsiElement { @Nullable C3Attributes getAttributes(); + @Nullable + C3InterfaceImpl getInterfaceImpl(); + @NotNull C3TypeName getTypeName(); diff --git a/src/main/gen/org/c3lang/intellij/psi/C3FuncDef.java b/src/main/gen/org/c3lang/intellij/psi/C3FuncDef.java new file mode 100644 index 0000000..885a7cb --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/psi/C3FuncDef.java @@ -0,0 +1,19 @@ +// This is a generated file. Not intended for manual editing. +package org.c3lang.intellij.psi; + +import java.util.List; +import org.jetbrains.annotations.*; +import com.intellij.psi.PsiElement; + +public interface C3FuncDef extends PsiElement { + + @Nullable + C3Attributes getAttributes(); + + @NotNull + C3FnParameterList getFnParameterList(); + + @NotNull + C3FuncHeader getFuncHeader(); + +} diff --git a/src/main/gen/org/c3lang/intellij/psi/C3FuncDefinition.java b/src/main/gen/org/c3lang/intellij/psi/C3FuncDefinition.java index 6fd21b9..e760a3a 100644 --- a/src/main/gen/org/c3lang/intellij/psi/C3FuncDefinition.java +++ b/src/main/gen/org/c3lang/intellij/psi/C3FuncDefinition.java @@ -7,14 +7,8 @@ public interface C3FuncDefinition extends PsiElement { - @Nullable - C3Attributes getAttributes(); - - @NotNull - C3FnParameterList getFnParameterList(); - @NotNull - C3FuncHeader getFuncHeader(); + C3FuncDef getFuncDef(); @Nullable C3MacroFuncBody getMacroFuncBody(); diff --git a/src/main/gen/org/c3lang/intellij/psi/C3InterfaceBody.java b/src/main/gen/org/c3lang/intellij/psi/C3InterfaceBody.java new file mode 100644 index 0000000..b16d7b3 --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/psi/C3InterfaceBody.java @@ -0,0 +1,13 @@ +// This is a generated file. Not intended for manual editing. +package org.c3lang.intellij.psi; + +import java.util.List; +import org.jetbrains.annotations.*; +import com.intellij.psi.PsiElement; + +public interface C3InterfaceBody extends PsiElement { + + @NotNull + List getFuncDefList(); + +} diff --git a/src/main/gen/org/c3lang/intellij/psi/C3InterfaceDefinition.java b/src/main/gen/org/c3lang/intellij/psi/C3InterfaceDefinition.java new file mode 100644 index 0000000..13b06aa --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/psi/C3InterfaceDefinition.java @@ -0,0 +1,19 @@ +// This is a generated file. Not intended for manual editing. +package org.c3lang.intellij.psi; + +import java.util.List; +import org.jetbrains.annotations.*; +import com.intellij.psi.PsiElement; + +public interface C3InterfaceDefinition extends PsiElement { + + @NotNull + C3InterfaceBody getInterfaceBody(); + + @NotNull + List getTypeList(); + + @NotNull + C3TypeName getTypeName(); + +} diff --git a/src/main/gen/org/c3lang/intellij/psi/C3InterfaceImpl.java b/src/main/gen/org/c3lang/intellij/psi/C3InterfaceImpl.java new file mode 100644 index 0000000..5de891e --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/psi/C3InterfaceImpl.java @@ -0,0 +1,16 @@ +// This is a generated file. Not intended for manual editing. +package org.c3lang.intellij.psi; + +import java.util.List; +import org.jetbrains.annotations.*; +import com.intellij.psi.PsiElement; + +public interface C3InterfaceImpl extends PsiElement { + + @NotNull + List getTypeList(); + + @NotNull + C3TypeName getTypeName(); + +} diff --git a/src/main/gen/org/c3lang/intellij/psi/C3StructDeclaration.java b/src/main/gen/org/c3lang/intellij/psi/C3StructDeclaration.java index 7b16faa..6904284 100644 --- a/src/main/gen/org/c3lang/intellij/psi/C3StructDeclaration.java +++ b/src/main/gen/org/c3lang/intellij/psi/C3StructDeclaration.java @@ -10,6 +10,9 @@ public interface C3StructDeclaration extends PsiElement { @Nullable C3Attributes getAttributes(); + @Nullable + C3InterfaceImpl getInterfaceImpl(); + @NotNull C3StructBody getStructBody(); diff --git a/src/main/gen/org/c3lang/intellij/psi/C3TopLevel.java b/src/main/gen/org/c3lang/intellij/psi/C3TopLevel.java index 7673ca4..4603d6a 100644 --- a/src/main/gen/org/c3lang/intellij/psi/C3TopLevel.java +++ b/src/main/gen/org/c3lang/intellij/psi/C3TopLevel.java @@ -7,6 +7,9 @@ public interface C3TopLevel extends PsiElement { + @Nullable + C3Attributes getAttributes(); + @Nullable C3ConstDecl getConstDecl(); @@ -22,6 +25,9 @@ public interface C3TopLevel extends PsiElement { @Nullable C3DefDecl getDefDecl(); + @Nullable + C3DistinctDeclaration getDistinctDeclaration(); + @Nullable C3Expr getExpr(); @@ -38,10 +44,10 @@ public interface C3TopLevel extends PsiElement { C3ImportDecl getImportDecl(); @Nullable - C3MacroDefinition getMacroDefinition(); + C3InterfaceDefinition getInterfaceDefinition(); @Nullable - C3StaticDecl getStaticDecl(); + C3MacroDefinition getMacroDefinition(); @Nullable C3TypeDecl getTypeDecl(); diff --git a/src/main/gen/org/c3lang/intellij/psi/C3Types.java b/src/main/gen/org/c3lang/intellij/psi/C3Types.java index a4af651..fb5bace 100644 --- a/src/main/gen/org/c3lang/intellij/psi/C3Types.java +++ b/src/main/gen/org/c3lang/intellij/psi/C3Types.java @@ -60,8 +60,13 @@ public interface C3Types { IElementType CT_CALL = new C3ElementType("CT_CALL"); IElementType CT_CALL_EXPR = new C3ElementType("CT_CALL_EXPR"); IElementType CT_CASE_STMT = new C3ElementType("CT_CASE_STMT"); - IElementType CT_CHECKS_EXPR = new C3ElementType("CT_CHECKS_EXPR"); + IElementType CT_COND = new C3ElementType("CT_COND"); + IElementType CT_COND_EXPR = new C3ElementType("CT_COND_EXPR"); + IElementType CT_DEFINED_CHECK_EXPR = new C3ElementType("CT_DEFINED_CHECK_EXPR"); + IElementType CT_DEFINED_CHECK_EXPR_LIST = new C3ElementType("CT_DEFINED_CHECK_EXPR_LIST"); + IElementType CT_DEFINED_EXPR = new C3ElementType("CT_DEFINED_EXPR"); IElementType CT_ECHO_STMT = new C3ElementType("CT_ECHO_STMT"); + IElementType CT_FEATURE_EXPR = new C3ElementType("CT_FEATURE_EXPR"); IElementType CT_FOREACH_STMT = new C3ElementType("CT_FOREACH_STMT"); IElementType CT_FOR_STMT = new C3ElementType("CT_FOR_STMT"); IElementType CT_IF_STMT = new C3ElementType("CT_IF_STMT"); @@ -78,7 +83,7 @@ public interface C3Types { IElementType DEF_ATTR_VALUES = new C3ElementType("DEF_ATTR_VALUES"); IElementType DEF_DECL = new C3ElementType("DEF_DECL"); IElementType DEF_DECLARATION_SOURCE = new C3ElementType("DEF_DECLARATION_SOURCE"); - IElementType DISTINCT_INLINE = new C3ElementType("DISTINCT_INLINE"); + IElementType DISTINCT_DECLARATION = new C3ElementType("DISTINCT_DECLARATION"); IElementType DO_STMT = new C3ElementType("DO_STMT"); IElementType ELSE_PART = new C3ElementType("ELSE_PART"); IElementType ENUM_CONSTANT = new C3ElementType("ENUM_CONSTANT"); @@ -100,6 +105,7 @@ public interface C3Types { IElementType FOREACH_VARS = new C3ElementType("FOREACH_VARS"); IElementType FOR_COND = new C3ElementType("FOR_COND"); IElementType FOR_STMT = new C3ElementType("FOR_STMT"); + IElementType FUNC_DEF = new C3ElementType("FUNC_DEF"); IElementType FUNC_DEFINITION = new C3ElementType("FUNC_DEFINITION"); IElementType FUNC_HEADER = new C3ElementType("FUNC_HEADER"); IElementType FUNC_NAME = new C3ElementType("FUNC_NAME"); @@ -119,6 +125,9 @@ public interface C3Types { IElementType INITIALIZER_LIST = new C3ElementType("INITIALIZER_LIST"); IElementType INIT_LIST_EXPR = new C3ElementType("INIT_LIST_EXPR"); IElementType INTEGER_TYPE = new C3ElementType("INTEGER_TYPE"); + IElementType INTERFACE_BODY = new C3ElementType("INTERFACE_BODY"); + IElementType INTERFACE_DEFINITION = new C3ElementType("INTERFACE_DEFINITION"); + IElementType INTERFACE_IMPL = new C3ElementType("INTERFACE_IMPL"); IElementType KEYWORD_EXPR = new C3ElementType("KEYWORD_EXPR"); IElementType LABEL = new C3ElementType("LABEL"); IElementType LAMBDA_DECL = new C3ElementType("LAMBDA_DECL"); @@ -159,7 +168,6 @@ public interface C3Types { IElementType RETURN_STMT = new C3ElementType("RETURN_STMT"); IElementType STATEMENT = new C3ElementType("STATEMENT"); IElementType STATEMENT_LIST = new C3ElementType("STATEMENT_LIST"); - IElementType STATIC_DECL = new C3ElementType("STATIC_DECL"); IElementType STRING_EXPR = new C3ElementType("STRING_EXPR"); IElementType STRUCT_BODY = new C3ElementType("STRUCT_BODY"); IElementType STRUCT_DECLARATION = new C3ElementType("STRUCT_DECLARATION"); @@ -235,9 +243,9 @@ public interface C3Types { IElementType KW_CONST = new C3TokenType("KW_CONST"); IElementType KW_CONTINUE = new C3TokenType("KW_CONTINUE"); IElementType KW_CT_ALIGNOF = new C3TokenType("KW_CT_ALIGNOF"); + IElementType KW_CT_AND = new C3TokenType("KW_CT_AND"); IElementType KW_CT_ASSERT = new C3TokenType("KW_CT_ASSERT"); IElementType KW_CT_CASE = new C3TokenType("KW_CT_CASE"); - IElementType KW_CT_CHECKS = new C3TokenType("KW_CT_CHECKS"); IElementType KW_CT_DEFAULT = new C3TokenType("KW_CT_DEFAULT"); IElementType KW_CT_DEFINED = new C3TokenType("KW_CT_DEFINED"); IElementType KW_CT_ECHO = new C3TokenType("KW_CT_ECHO"); @@ -250,12 +258,15 @@ public interface C3Types { IElementType KW_CT_EVAL = new C3TokenType("KW_CT_EVAL"); IElementType KW_CT_EVALTYPE = new C3TokenType("KW_CT_EVALTYPE"); IElementType KW_CT_EXTNAMEOF = new C3TokenType("KW_CT_EXTNAMEOF"); + IElementType KW_CT_FEATURE = new C3TokenType("KW_CT_FEATURE"); IElementType KW_CT_FOR = new C3TokenType("KW_CT_FOR"); IElementType KW_CT_FOREACH = new C3TokenType("KW_CT_FOREACH"); IElementType KW_CT_IF = new C3TokenType("KW_CT_IF"); IElementType KW_CT_INCLUDE = new C3TokenType("KW_CT_INCLUDE"); + IElementType KW_CT_IS_CONST = new C3TokenType("KW_CT_IS_CONST"); IElementType KW_CT_NAMEOF = new C3TokenType("KW_CT_NAMEOF"); IElementType KW_CT_OFFSETOF = new C3TokenType("KW_CT_OFFSETOF"); + IElementType KW_CT_OR = new C3TokenType("KW_CT_OR"); IElementType KW_CT_QNAMEOF = new C3TokenType("KW_CT_QNAMEOF"); IElementType KW_CT_SIZEOF = new C3TokenType("KW_CT_SIZEOF"); IElementType KW_CT_STRINGIFY = new C3TokenType("KW_CT_STRINGIFY"); @@ -293,6 +304,7 @@ public interface C3Types { IElementType KW_INLINE = new C3TokenType("KW_INLINE"); IElementType KW_INT = new C3TokenType("KW_INT"); IElementType KW_INT128 = new C3TokenType("KW_INT128"); + IElementType KW_INTERFACE = new C3TokenType("KW_INTERFACE"); IElementType KW_IPTR = new C3TokenType("KW_IPTR"); IElementType KW_ISZ = new C3TokenType("KW_ISZ"); IElementType KW_LONG = new C3TokenType("KW_LONG"); @@ -511,12 +523,27 @@ else if (type == CT_CALL_EXPR) { else if (type == CT_CASE_STMT) { return new C3CtCaseStmtImpl(node); } - else if (type == CT_CHECKS_EXPR) { - return new C3CtChecksExprImpl(node); + else if (type == CT_COND) { + return new C3CtCondImpl(node); + } + else if (type == CT_COND_EXPR) { + return new C3CtCondExprImpl(node); + } + else if (type == CT_DEFINED_CHECK_EXPR) { + return new C3CtDefinedCheckExprImpl(node); + } + else if (type == CT_DEFINED_CHECK_EXPR_LIST) { + return new C3CtDefinedCheckExprListImpl(node); + } + else if (type == CT_DEFINED_EXPR) { + return new C3CtDefinedExprImpl(node); } else if (type == CT_ECHO_STMT) { return new C3CtEchoStmtImpl(node); } + else if (type == CT_FEATURE_EXPR) { + return new C3CtFeatureExprImpl(node); + } else if (type == CT_FOREACH_STMT) { return new C3CtForeachStmtImpl(node); } @@ -565,8 +592,8 @@ else if (type == DEF_DECL) { else if (type == DEF_DECLARATION_SOURCE) { return new C3DefDeclarationSourceImpl(node); } - else if (type == DISTINCT_INLINE) { - return new C3DistinctInlineImpl(node); + else if (type == DISTINCT_DECLARATION) { + return new C3DistinctDeclarationImpl(node); } else if (type == DO_STMT) { return new C3DoStmtImpl(node); @@ -628,6 +655,9 @@ else if (type == FOR_COND) { else if (type == FOR_STMT) { return new C3ForStmtImpl(node); } + else if (type == FUNC_DEF) { + return new C3FuncDefImpl(node); + } else if (type == FUNC_DEFINITION) { return new C3FuncDefinitionImpl(node); } @@ -685,6 +715,15 @@ else if (type == INIT_LIST_EXPR) { else if (type == INTEGER_TYPE) { return new C3IntegerTypeImpl(node); } + else if (type == INTERFACE_BODY) { + return new C3InterfaceBodyImpl(node); + } + else if (type == INTERFACE_DEFINITION) { + return new C3InterfaceDefinitionImpl(node); + } + else if (type == INTERFACE_IMPL) { + return new C3InterfaceImplImpl(node); + } else if (type == KEYWORD_EXPR) { return new C3KeywordExprImpl(node); } @@ -805,9 +844,6 @@ else if (type == STATEMENT) { else if (type == STATEMENT_LIST) { return new C3StatementListImpl(node); } - else if (type == STATIC_DECL) { - return new C3StaticDeclImpl(node); - } else if (type == STRING_EXPR) { return new C3StringExprImpl(node); } diff --git a/src/main/gen/org/c3lang/intellij/psi/C3Visitor.java b/src/main/gen/org/c3lang/intellij/psi/C3Visitor.java index 69e6210..4902f90 100644 --- a/src/main/gen/org/c3lang/intellij/psi/C3Visitor.java +++ b/src/main/gen/org/c3lang/intellij/psi/C3Visitor.java @@ -215,7 +215,23 @@ public void visitCtCaseStmt(@NotNull C3CtCaseStmt o) { visitPsiElement(o); } - public void visitCtChecksExpr(@NotNull C3CtChecksExpr o) { + public void visitCtCond(@NotNull C3CtCond o) { + visitPsiElement(o); + } + + public void visitCtCondExpr(@NotNull C3CtCondExpr o) { + visitExpr(o); + } + + public void visitCtDefinedCheckExpr(@NotNull C3CtDefinedCheckExpr o) { + visitExpr(o); + } + + public void visitCtDefinedCheckExprList(@NotNull C3CtDefinedCheckExprList o) { + visitPsiElement(o); + } + + public void visitCtDefinedExpr(@NotNull C3CtDefinedExpr o) { visitExpr(o); } @@ -223,6 +239,10 @@ public void visitCtEchoStmt(@NotNull C3CtEchoStmt o) { visitPsiElement(o); } + public void visitCtFeatureExpr(@NotNull C3CtFeatureExpr o) { + visitExpr(o); + } + public void visitCtForStmt(@NotNull C3CtForStmt o) { visitPsiElement(o); } @@ -287,7 +307,7 @@ public void visitDeferStmt(@NotNull C3DeferStmt o) { visitPsiElement(o); } - public void visitDistinctInline(@NotNull C3DistinctInline o) { + public void visitDistinctDeclaration(@NotNull C3DistinctDeclaration o) { visitPsiElement(o); } @@ -375,6 +395,10 @@ public void visitForeachVars(@NotNull C3ForeachVars o) { visitPsiElement(o); } + public void visitFuncDef(@NotNull C3FuncDef o) { + visitPsiElement(o); + } + public void visitFuncDefinition(@NotNull C3FuncDefinition o) { visitPsiElement(o); } @@ -451,6 +475,18 @@ public void visitIntegerType(@NotNull C3IntegerType o) { visitPsiElement(o); } + public void visitInterfaceBody(@NotNull C3InterfaceBody o) { + visitPsiElement(o); + } + + public void visitInterfaceDefinition(@NotNull C3InterfaceDefinition o) { + visitPsiElement(o); + } + + public void visitInterfaceImpl(@NotNull C3InterfaceImpl o) { + visitPsiElement(o); + } + public void visitKeywordExpr(@NotNull C3KeywordExpr o) { visitExpr(o); } @@ -611,10 +647,6 @@ public void visitStatementList(@NotNull C3StatementList o) { visitPsiElement(o); } - public void visitStaticDecl(@NotNull C3StaticDecl o) { - visitPsiElement(o); - } - public void visitStringExpr(@NotNull C3StringExpr o) { visitExpr(o); } diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3AsmBlockStmtImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3AsmBlockStmtImpl.java index 432bec1..8fb6803 100644 --- a/src/main/gen/org/c3lang/intellij/psi/impl/C3AsmBlockStmtImpl.java +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3AsmBlockStmtImpl.java @@ -33,6 +33,12 @@ public List getAsmStmtList() { return PsiTreeUtil.getChildrenOfTypeAsList(this, C3AsmStmt.class); } + @Override + @Nullable + public C3Attributes getAttributes() { + return PsiTreeUtil.getChildOfType(this, C3Attributes.class); + } + @Override @Nullable public C3Expr getExpr() { diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3BitstructDeclarationImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3BitstructDeclarationImpl.java index f6d6bbd..e49693c 100644 --- a/src/main/gen/org/c3lang/intellij/psi/impl/C3BitstructDeclarationImpl.java +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3BitstructDeclarationImpl.java @@ -39,6 +39,12 @@ public C3BitstructBody getBitstructBody() { return notNullChild(PsiTreeUtil.getChildOfType(this, C3BitstructBody.class)); } + @Override + @Nullable + public C3InterfaceImpl getInterfaceImpl() { + return PsiTreeUtil.getChildOfType(this, C3InterfaceImpl.class); + } + @Override @NotNull public C3Type getType() { diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3CtChecksExprImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3CtCondExprImpl.java similarity index 73% rename from src/main/gen/org/c3lang/intellij/psi/impl/C3CtChecksExprImpl.java rename to src/main/gen/org/c3lang/intellij/psi/impl/C3CtCondExprImpl.java index 1319712..c8032db 100644 --- a/src/main/gen/org/c3lang/intellij/psi/impl/C3CtChecksExprImpl.java +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3CtCondExprImpl.java @@ -10,15 +10,15 @@ import static org.c3lang.intellij.psi.C3Types.*; import org.c3lang.intellij.psi.*; -public class C3CtChecksExprImpl extends C3ExprImpl implements C3CtChecksExpr { +public class C3CtCondExprImpl extends C3ExprImpl implements C3CtCondExpr { - public C3CtChecksExprImpl(@NotNull ASTNode node) { + public C3CtCondExprImpl(@NotNull ASTNode node) { super(node); } @Override public void accept(@NotNull C3Visitor visitor) { - visitor.visitCtChecksExpr(this); + visitor.visitCtCondExpr(this); } @Override @@ -27,6 +27,12 @@ public void accept(@NotNull PsiElementVisitor visitor) { else super.accept(visitor); } + @Override + @NotNull + public C3CtCond getCtCond() { + return notNullChild(PsiTreeUtil.getChildOfType(this, C3CtCond.class)); + } + @Override @NotNull public C3ExpressionList getExpressionList() { diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3DistinctInlineImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3CtCondImpl.java similarity index 79% rename from src/main/gen/org/c3lang/intellij/psi/impl/C3DistinctInlineImpl.java rename to src/main/gen/org/c3lang/intellij/psi/impl/C3CtCondImpl.java index 65adf90..0cd3417 100644 --- a/src/main/gen/org/c3lang/intellij/psi/impl/C3DistinctInlineImpl.java +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3CtCondImpl.java @@ -11,14 +11,14 @@ import com.intellij.extapi.psi.ASTWrapperPsiElement; import org.c3lang.intellij.psi.*; -public class C3DistinctInlineImpl extends ASTWrapperPsiElement implements C3DistinctInline { +public class C3CtCondImpl extends ASTWrapperPsiElement implements C3CtCond { - public C3DistinctInlineImpl(@NotNull ASTNode node) { + public C3CtCondImpl(@NotNull ASTNode node) { super(node); } public void accept(@NotNull C3Visitor visitor) { - visitor.visitDistinctInline(this); + visitor.visitCtCond(this); } @Override diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3CtDefinedCheckExprImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3CtDefinedCheckExprImpl.java new file mode 100644 index 0000000..53c959b --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3CtDefinedCheckExprImpl.java @@ -0,0 +1,36 @@ +// This is a generated file. Not intended for manual editing. +package org.c3lang.intellij.psi.impl; + +import java.util.List; +import org.jetbrains.annotations.*; +import com.intellij.lang.ASTNode; +import com.intellij.psi.PsiElement; +import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; +import static org.c3lang.intellij.psi.C3Types.*; +import org.c3lang.intellij.psi.*; + +public class C3CtDefinedCheckExprImpl extends C3ExprImpl implements C3CtDefinedCheckExpr { + + public C3CtDefinedCheckExprImpl(@NotNull ASTNode node) { + super(node); + } + + @Override + public void accept(@NotNull C3Visitor visitor) { + visitor.visitCtDefinedCheckExpr(this); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof C3Visitor) accept((C3Visitor)visitor); + else super.accept(visitor); + } + + @Override + @Nullable + public C3Type getType() { + return PsiTreeUtil.getChildOfType(this, C3Type.class); + } + +} diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3CtDefinedCheckExprListImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3CtDefinedCheckExprListImpl.java new file mode 100644 index 0000000..01351b6 --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3CtDefinedCheckExprListImpl.java @@ -0,0 +1,36 @@ +// This is a generated file. Not intended for manual editing. +package org.c3lang.intellij.psi.impl; + +import java.util.List; +import org.jetbrains.annotations.*; +import com.intellij.lang.ASTNode; +import com.intellij.psi.PsiElement; +import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; +import static org.c3lang.intellij.psi.C3Types.*; +import com.intellij.extapi.psi.ASTWrapperPsiElement; +import org.c3lang.intellij.psi.*; + +public class C3CtDefinedCheckExprListImpl extends ASTWrapperPsiElement implements C3CtDefinedCheckExprList { + + public C3CtDefinedCheckExprListImpl(@NotNull ASTNode node) { + super(node); + } + + public void accept(@NotNull C3Visitor visitor) { + visitor.visitCtDefinedCheckExprList(this); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof C3Visitor) accept((C3Visitor)visitor); + else super.accept(visitor); + } + + @Override + @NotNull + public List getExprList() { + return PsiTreeUtil.getChildrenOfTypeAsList(this, C3Expr.class); + } + +} diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3CtDefinedExprImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3CtDefinedExprImpl.java new file mode 100644 index 0000000..e49af67 --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3CtDefinedExprImpl.java @@ -0,0 +1,36 @@ +// This is a generated file. Not intended for manual editing. +package org.c3lang.intellij.psi.impl; + +import java.util.List; +import org.jetbrains.annotations.*; +import com.intellij.lang.ASTNode; +import com.intellij.psi.PsiElement; +import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; +import static org.c3lang.intellij.psi.C3Types.*; +import org.c3lang.intellij.psi.*; + +public class C3CtDefinedExprImpl extends C3ExprImpl implements C3CtDefinedExpr { + + public C3CtDefinedExprImpl(@NotNull ASTNode node) { + super(node); + } + + @Override + public void accept(@NotNull C3Visitor visitor) { + visitor.visitCtDefinedExpr(this); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof C3Visitor) accept((C3Visitor)visitor); + else super.accept(visitor); + } + + @Override + @NotNull + public C3CtDefinedCheckExprList getCtDefinedCheckExprList() { + return notNullChild(PsiTreeUtil.getChildOfType(this, C3CtDefinedCheckExprList.class)); + } + +} diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3CtFeatureExprImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3CtFeatureExprImpl.java new file mode 100644 index 0000000..c28972f --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3CtFeatureExprImpl.java @@ -0,0 +1,30 @@ +// This is a generated file. Not intended for manual editing. +package org.c3lang.intellij.psi.impl; + +import java.util.List; +import org.jetbrains.annotations.*; +import com.intellij.lang.ASTNode; +import com.intellij.psi.PsiElement; +import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; +import static org.c3lang.intellij.psi.C3Types.*; +import org.c3lang.intellij.psi.*; + +public class C3CtFeatureExprImpl extends C3ExprImpl implements C3CtFeatureExpr { + + public C3CtFeatureExprImpl(@NotNull ASTNode node) { + super(node); + } + + @Override + public void accept(@NotNull C3Visitor visitor) { + visitor.visitCtFeatureExpr(this); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof C3Visitor) accept((C3Visitor)visitor); + else super.accept(visitor); + } + +} diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3DefDeclImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3DefDeclImpl.java index 211a20d..87c48e4 100644 --- a/src/main/gen/org/c3lang/intellij/psi/impl/C3DefDeclImpl.java +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3DefDeclImpl.java @@ -45,12 +45,6 @@ public C3DefDeclarationSource getDefDeclarationSource() { return notNullChild(PsiTreeUtil.getChildOfType(this, C3DefDeclarationSource.class)); } - @Override - @Nullable - public C3DistinctInline getDistinctInline() { - return PsiTreeUtil.getChildOfType(this, C3DistinctInline.class); - } - @Override @Nullable public C3ParameterList getParameterList() { diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3DistinctDeclarationImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3DistinctDeclarationImpl.java new file mode 100644 index 0000000..f346317 --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3DistinctDeclarationImpl.java @@ -0,0 +1,60 @@ +// This is a generated file. Not intended for manual editing. +package org.c3lang.intellij.psi.impl; + +import java.util.List; +import org.jetbrains.annotations.*; +import com.intellij.lang.ASTNode; +import com.intellij.psi.PsiElement; +import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; +import static org.c3lang.intellij.psi.C3Types.*; +import com.intellij.extapi.psi.ASTWrapperPsiElement; +import org.c3lang.intellij.psi.*; + +public class C3DistinctDeclarationImpl extends ASTWrapperPsiElement implements C3DistinctDeclaration { + + public C3DistinctDeclarationImpl(@NotNull ASTNode node) { + super(node); + } + + public void accept(@NotNull C3Visitor visitor) { + visitor.visitDistinctDeclaration(this); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof C3Visitor) accept((C3Visitor)visitor); + else super.accept(visitor); + } + + @Override + @Nullable + public C3Attributes getAttributes() { + return PsiTreeUtil.getChildOfType(this, C3Attributes.class); + } + + @Override + @Nullable + public C3GenericParameters getGenericParameters() { + return PsiTreeUtil.getChildOfType(this, C3GenericParameters.class); + } + + @Override + @Nullable + public C3InterfaceImpl getInterfaceImpl() { + return PsiTreeUtil.getChildOfType(this, C3InterfaceImpl.class); + } + + @Override + @NotNull + public C3Type getType() { + return notNullChild(PsiTreeUtil.getChildOfType(this, C3Type.class)); + } + + @Override + @NotNull + public C3TypeName getTypeName() { + return notNullChild(PsiTreeUtil.getChildOfType(this, C3TypeName.class)); + } + +} diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3EnumConstantImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3EnumConstantImpl.java index 7978488..83d0538 100644 --- a/src/main/gen/org/c3lang/intellij/psi/impl/C3EnumConstantImpl.java +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3EnumConstantImpl.java @@ -29,8 +29,14 @@ public void accept(@NotNull PsiElementVisitor visitor) { @Override @Nullable - public C3ArgList getArgList() { - return PsiTreeUtil.getChildOfType(this, C3ArgList.class); + public C3Attributes getAttributes() { + return PsiTreeUtil.getChildOfType(this, C3Attributes.class); + } + + @Override + @Nullable + public C3Expr getExpr() { + return PsiTreeUtil.getChildOfType(this, C3Expr.class); } } diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3EnumDeclarationImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3EnumDeclarationImpl.java index 8755439..9a41adc 100644 --- a/src/main/gen/org/c3lang/intellij/psi/impl/C3EnumDeclarationImpl.java +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3EnumDeclarationImpl.java @@ -45,6 +45,12 @@ public C3EnumSpec getEnumSpec() { return PsiTreeUtil.getChildOfType(this, C3EnumSpec.class); } + @Override + @Nullable + public C3InterfaceImpl getInterfaceImpl() { + return PsiTreeUtil.getChildOfType(this, C3InterfaceImpl.class); + } + @Override @NotNull public C3TypeName getTypeName() { diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3EnumParamDeclImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3EnumParamDeclImpl.java index 16ee44d..6d18761 100644 --- a/src/main/gen/org/c3lang/intellij/psi/impl/C3EnumParamDeclImpl.java +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3EnumParamDeclImpl.java @@ -27,12 +27,6 @@ public void accept(@NotNull PsiElementVisitor visitor) { else super.accept(visitor); } - @Override - @Nullable - public C3Expr getExpr() { - return PsiTreeUtil.getChildOfType(this, C3Expr.class); - } - @Override @NotNull public C3Type getType() { diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3EnumSpecImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3EnumSpecImpl.java index 267691a..5081248 100644 --- a/src/main/gen/org/c3lang/intellij/psi/impl/C3EnumSpecImpl.java +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3EnumSpecImpl.java @@ -34,9 +34,9 @@ public C3EnumParamList getEnumParamList() { } @Override - @NotNull + @Nullable public C3Type getType() { - return notNullChild(PsiTreeUtil.getChildOfType(this, C3Type.class)); + return PsiTreeUtil.getChildOfType(this, C3Type.class); } } diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3FaultDeclarationImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3FaultDeclarationImpl.java index fabdbaa..ef00894 100644 --- a/src/main/gen/org/c3lang/intellij/psi/impl/C3FaultDeclarationImpl.java +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3FaultDeclarationImpl.java @@ -33,6 +33,12 @@ public C3Attributes getAttributes() { return PsiTreeUtil.getChildOfType(this, C3Attributes.class); } + @Override + @Nullable + public C3InterfaceImpl getInterfaceImpl() { + return PsiTreeUtil.getChildOfType(this, C3InterfaceImpl.class); + } + @Override @NotNull public C3TypeName getTypeName() { diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3StaticDeclImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3FuncDefImpl.java similarity index 66% rename from src/main/gen/org/c3lang/intellij/psi/impl/C3StaticDeclImpl.java rename to src/main/gen/org/c3lang/intellij/psi/impl/C3FuncDefImpl.java index 4ddd0db..7ff93e0 100644 --- a/src/main/gen/org/c3lang/intellij/psi/impl/C3StaticDeclImpl.java +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3FuncDefImpl.java @@ -11,14 +11,14 @@ import com.intellij.extapi.psi.ASTWrapperPsiElement; import org.c3lang.intellij.psi.*; -public class C3StaticDeclImpl extends ASTWrapperPsiElement implements C3StaticDecl { +public class C3FuncDefImpl extends ASTWrapperPsiElement implements C3FuncDef { - public C3StaticDeclImpl(@NotNull ASTNode node) { + public C3FuncDefImpl(@NotNull ASTNode node) { super(node); } public void accept(@NotNull C3Visitor visitor) { - visitor.visitStaticDecl(this); + visitor.visitFuncDef(this); } @Override @@ -35,8 +35,14 @@ public C3Attributes getAttributes() { @Override @NotNull - public C3CompoundStatement getCompoundStatement() { - return notNullChild(PsiTreeUtil.getChildOfType(this, C3CompoundStatement.class)); + public C3FnParameterList getFnParameterList() { + return notNullChild(PsiTreeUtil.getChildOfType(this, C3FnParameterList.class)); + } + + @Override + @NotNull + public C3FuncHeader getFuncHeader() { + return notNullChild(PsiTreeUtil.getChildOfType(this, C3FuncHeader.class)); } } diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3FuncDefinitionImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3FuncDefinitionImpl.java index 1340541..bb4be46 100644 --- a/src/main/gen/org/c3lang/intellij/psi/impl/C3FuncDefinitionImpl.java +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3FuncDefinitionImpl.java @@ -27,22 +27,10 @@ public void accept(@NotNull PsiElementVisitor visitor) { else super.accept(visitor); } - @Override - @Nullable - public C3Attributes getAttributes() { - return PsiTreeUtil.getChildOfType(this, C3Attributes.class); - } - - @Override - @NotNull - public C3FnParameterList getFnParameterList() { - return notNullChild(PsiTreeUtil.getChildOfType(this, C3FnParameterList.class)); - } - @Override @NotNull - public C3FuncHeader getFuncHeader() { - return notNullChild(PsiTreeUtil.getChildOfType(this, C3FuncHeader.class)); + public C3FuncDef getFuncDef() { + return notNullChild(PsiTreeUtil.getChildOfType(this, C3FuncDef.class)); } @Override diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3InterfaceBodyImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3InterfaceBodyImpl.java new file mode 100644 index 0000000..935a1e4 --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3InterfaceBodyImpl.java @@ -0,0 +1,36 @@ +// This is a generated file. Not intended for manual editing. +package org.c3lang.intellij.psi.impl; + +import java.util.List; +import org.jetbrains.annotations.*; +import com.intellij.lang.ASTNode; +import com.intellij.psi.PsiElement; +import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; +import static org.c3lang.intellij.psi.C3Types.*; +import com.intellij.extapi.psi.ASTWrapperPsiElement; +import org.c3lang.intellij.psi.*; + +public class C3InterfaceBodyImpl extends ASTWrapperPsiElement implements C3InterfaceBody { + + public C3InterfaceBodyImpl(@NotNull ASTNode node) { + super(node); + } + + public void accept(@NotNull C3Visitor visitor) { + visitor.visitInterfaceBody(this); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof C3Visitor) accept((C3Visitor)visitor); + else super.accept(visitor); + } + + @Override + @NotNull + public List getFuncDefList() { + return PsiTreeUtil.getChildrenOfTypeAsList(this, C3FuncDef.class); + } + +} diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3InterfaceDefinitionImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3InterfaceDefinitionImpl.java new file mode 100644 index 0000000..836037a --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3InterfaceDefinitionImpl.java @@ -0,0 +1,48 @@ +// This is a generated file. Not intended for manual editing. +package org.c3lang.intellij.psi.impl; + +import java.util.List; +import org.jetbrains.annotations.*; +import com.intellij.lang.ASTNode; +import com.intellij.psi.PsiElement; +import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; +import static org.c3lang.intellij.psi.C3Types.*; +import com.intellij.extapi.psi.ASTWrapperPsiElement; +import org.c3lang.intellij.psi.*; + +public class C3InterfaceDefinitionImpl extends ASTWrapperPsiElement implements C3InterfaceDefinition { + + public C3InterfaceDefinitionImpl(@NotNull ASTNode node) { + super(node); + } + + public void accept(@NotNull C3Visitor visitor) { + visitor.visitInterfaceDefinition(this); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof C3Visitor) accept((C3Visitor)visitor); + else super.accept(visitor); + } + + @Override + @NotNull + public C3InterfaceBody getInterfaceBody() { + return notNullChild(PsiTreeUtil.getChildOfType(this, C3InterfaceBody.class)); + } + + @Override + @NotNull + public List getTypeList() { + return PsiTreeUtil.getChildrenOfTypeAsList(this, C3Type.class); + } + + @Override + @NotNull + public C3TypeName getTypeName() { + return notNullChild(PsiTreeUtil.getChildOfType(this, C3TypeName.class)); + } + +} diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3InterfaceImplImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3InterfaceImplImpl.java new file mode 100644 index 0000000..c0ed8c7 --- /dev/null +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3InterfaceImplImpl.java @@ -0,0 +1,42 @@ +// This is a generated file. Not intended for manual editing. +package org.c3lang.intellij.psi.impl; + +import java.util.List; +import org.jetbrains.annotations.*; +import com.intellij.lang.ASTNode; +import com.intellij.psi.PsiElement; +import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; +import static org.c3lang.intellij.psi.C3Types.*; +import com.intellij.extapi.psi.ASTWrapperPsiElement; +import org.c3lang.intellij.psi.*; + +public class C3InterfaceImplImpl extends ASTWrapperPsiElement implements C3InterfaceImpl { + + public C3InterfaceImplImpl(@NotNull ASTNode node) { + super(node); + } + + public void accept(@NotNull C3Visitor visitor) { + visitor.visitInterfaceImpl(this); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof C3Visitor) accept((C3Visitor)visitor); + else super.accept(visitor); + } + + @Override + @NotNull + public List getTypeList() { + return PsiTreeUtil.getChildrenOfTypeAsList(this, C3Type.class); + } + + @Override + @NotNull + public C3TypeName getTypeName() { + return notNullChild(PsiTreeUtil.getChildOfType(this, C3TypeName.class)); + } + +} diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3StructDeclarationImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3StructDeclarationImpl.java index 57c0ad0..542fd5f 100644 --- a/src/main/gen/org/c3lang/intellij/psi/impl/C3StructDeclarationImpl.java +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3StructDeclarationImpl.java @@ -33,6 +33,12 @@ public C3Attributes getAttributes() { return PsiTreeUtil.getChildOfType(this, C3Attributes.class); } + @Override + @Nullable + public C3InterfaceImpl getInterfaceImpl() { + return PsiTreeUtil.getChildOfType(this, C3InterfaceImpl.class); + } + @Override @NotNull public C3StructBody getStructBody() { diff --git a/src/main/gen/org/c3lang/intellij/psi/impl/C3TopLevelImpl.java b/src/main/gen/org/c3lang/intellij/psi/impl/C3TopLevelImpl.java index 35d5823..041fbee 100644 --- a/src/main/gen/org/c3lang/intellij/psi/impl/C3TopLevelImpl.java +++ b/src/main/gen/org/c3lang/intellij/psi/impl/C3TopLevelImpl.java @@ -27,6 +27,12 @@ public void accept(@NotNull PsiElementVisitor visitor) { else super.accept(visitor); } + @Override + @Nullable + public C3Attributes getAttributes() { + return PsiTreeUtil.getChildOfType(this, C3Attributes.class); + } + @Override @Nullable public C3ConstDecl getConstDecl() { @@ -57,6 +63,12 @@ public C3DefDecl getDefDecl() { return PsiTreeUtil.getChildOfType(this, C3DefDecl.class); } + @Override + @Nullable + public C3DistinctDeclaration getDistinctDeclaration() { + return PsiTreeUtil.getChildOfType(this, C3DistinctDeclaration.class); + } + @Override @Nullable public C3Expr getExpr() { @@ -89,14 +101,14 @@ public C3ImportDecl getImportDecl() { @Override @Nullable - public C3MacroDefinition getMacroDefinition() { - return PsiTreeUtil.getChildOfType(this, C3MacroDefinition.class); + public C3InterfaceDefinition getInterfaceDefinition() { + return PsiTreeUtil.getChildOfType(this, C3InterfaceDefinition.class); } @Override @Nullable - public C3StaticDecl getStaticDecl() { - return PsiTreeUtil.getChildOfType(this, C3StaticDecl.class); + public C3MacroDefinition getMacroDefinition() { + return PsiTreeUtil.getChildOfType(this, C3MacroDefinition.class); } @Override diff --git a/src/main/java/org/c3lang/intellij/C3.bnf b/src/main/java/org/c3lang/intellij/C3.bnf index 01b4415..17a0300 100644 --- a/src/main/java/org/c3lang/intellij/C3.bnf +++ b/src/main/java/org/c3lang/intellij/C3.bnf @@ -67,11 +67,9 @@ top_level ::= import_decl | def_decl | fault_declaration | macro_definition - | static_decl - | KW_ASM expr EOS - - -static_decl ::= KW_STATIC IDENT attributes? compound_statement + | KW_ASM expr attributes? EOS + | interface_definition + | distinct_declaration private const_paren_expr ::= LP constant_expr RP @@ -86,14 +84,13 @@ private struct_or_union ::= KW_STRUCT | KW_UNION type_name ::= TYPE_IDENT -struct_declaration ::= struct_or_union type_name attributes? struct_body +struct_declaration ::= struct_or_union type_name interface_impl? attributes? struct_body -bitstruct_declaration ::= KW_BITSTRUCT type_name COLON type attributes? bitstruct_body +bitstruct_declaration ::= KW_BITSTRUCT type_name interface_impl? COLON type attributes? bitstruct_body func_typedef ::= KW_FN optional_type fn_parameter_list -distinct_inline ::= KW_DISTINCT KW_INLINE? | KW_INLINE KW_DISTINCT? typedef_type ::= func_typedef | type generic_parameters? generic_parameter ::= expr | type generic_parameters ::= LGENPAR generic_parameter (COMMA generic_parameter)* RGENPAR @@ -101,7 +98,7 @@ any_ident ::= AT_TYPE_IDENT | TYPE_IDENT | CT_TYPE_IDENT | AT_IDENT | IDENT | CO def_attr_values ::= LB attributes? RB def_declaration_source ::= (def_attr_values | path_const | path_ident | typedef_type | any_ident) generic_parameters? -def_decl ::= KW_DEF any_ident (LP parameter_list RP)? EQ distinct_inline? def_declaration_source attributes? EOS +def_decl ::= KW_DEF any_ident (LP parameter_list RP)? EQ def_declaration_source attributes? EOS struct_body ::= LB struct_member_declaration* RB @@ -115,13 +112,13 @@ bitstruct_body ::= LB (bitstruct_def+ | bitstruct_simple_def+)? RB bitstruct_def ::= base_type IDENT COLON constant_expr (DOTDOT constant_expr)? EOS bitstruct_simple_def ::= base_type IDENT EOS -enum_declaration ::= KW_ENUM type_name (COLON enum_spec)? attributes? LB enum_list RB -enum_spec ::= type enum_param_list? -enum_param_list ::= LP enum_param_decl (COMMA enum_param_decl)* RP -enum_param_decl ::= type (IDENT (EQ expr)?)? -enum_list ::= enum_constant (COMMA enum_constant)* COMMA? -enum_constant ::= CONST_IDENT (LP arg_list COMMA? RP)? -arg_list ::= arg (COMMA arg)* +enum_declaration ::= KW_ENUM type_name interface_impl? (COLON enum_spec)? attributes? LB enum_list RB +enum_spec ::= enum_param_list | type enum_param_list? +enum_param_list ::= LP enum_param_decl (COMMA enum_param_decl)* RP +enum_param_decl ::= type IDENT +enum_list ::= enum_constant (COMMA enum_constant ?)* COMMA? +enum_constant ::= CONST_IDENT attributes? (EQ expr)? +arg_list ::= arg (COMMA arg)* COMMA? arg ::= (param_path EQ)? (expr | type) | KW_CT_VASPLAT LP range_exp? RP | ELLIPSIS expr @@ -147,13 +144,14 @@ call_expr_tail ::= call_invocation compound_statement? | BANGBANG -ct_call ::= KW_CT_ALIGNOF | KW_CT_DEFINED | KW_CT_EXTNAMEOF | KW_CT_NAMEOF | KW_CT_OFFSETOF | KW_CT_QNAMEOF +ct_call ::= KW_CT_ALIGNOF | KW_CT_EXTNAMEOF | KW_CT_NAMEOF | KW_CT_OFFSETOF | KW_CT_QNAMEOF ct_arg ::= KW_CT_VACONST | KW_CT_VAARG | KW_CT_VAREF | KW_CT_VAEXPR -ct_analyze ::= KW_CT_EVAL | KW_CT_SIZEOF | KW_CT_STRINGIFY +ct_analyze ::= KW_CT_EVAL | KW_CT_SIZEOF | KW_CT_STRINGIFY | KW_CT_IS_CONST +ct_cond ::= KW_CT_AND | KW_CT_OR flat_path ::= primary_group param_path? | type param_path ::= param_path_element+ -param_path_element ::= LBT expr (DOTDOT expr)? RBT | DOT primary_group +param_path_element ::= LBT expr (DOTDOT expr)? RBT | DOT primary_group | DOT CT_TYPE_IDENT range_exp ::= range_loc? (DOTDOT | COLON) range_loc? range_loc ::= BIT_XOR? expr @@ -162,7 +160,7 @@ optional_type ::= type BANG? fn_parameter_list ::= LP parameter_list? RP param_decl ::= parameter (EQ expr)? parameter_list ::= param_decl (COMMA param_decl)* -parameter ::= type (ELLIPSIS? IDENT attributes? | ELLIPSIS? CT_IDENT | (HASH_IDENT | AMP IDENT) attributes? | attributes?) +parameter ::= KW_INLINE? type (ELLIPSIS? IDENT attributes? | ELLIPSIS? CT_IDENT | (HASH_IDENT | AMP IDENT) attributes? | attributes?) | ELLIPSIS | AMP IDENT attributes? | HASH_IDENT attributes? | IDENT ELLIPSIS? attributes? | CT_IDENT | CT_IDENT ELLIPSIS @@ -271,7 +269,7 @@ continue_stmt ::= KW_CONTINUE CONST_IDENT? EOS break_stmt ::= KW_BREAK CONST_IDENT? EOS nextcase_stmt ::= KW_NEXTCASE ((CONST_IDENT COLON)? (type | expr | KW_DEFAULT))? EOS -asm_block_stmt ::= KW_ASM (LP expr RP | LB asm_stmt* RB) +asm_block_stmt ::= KW_ASM (LP expr RP attributes? | attributes? LB asm_stmt* RB) asm_stmt ::= asm_instr asm_exprs? EOS asm_instr ::= (KW_INT | IDENT) (DOT IDENT)? asm_exprs ::= asm_expr (COMMA asm_expr)* @@ -338,9 +336,13 @@ local_ident_expr ::= CT_IDENT | HASH_IDENT type_access_expr ::= type DOT (access_ident | CONST_IDENT) expr_block_expr ::= LBRAPIPE statement_list? RBRAPIPE ct_call_expr ::= ct_call LP flat_path RP +ct_feature_expr ::= KW_CT_FEATURE LP CONST_IDENT RP ct_arg_expr ::= ct_arg grouped_expression ct_analyze_expr ::= ct_analyze grouped_expression -ct_checks_expr ::= KW_CT_CHECKS LP expression_list RP +ct_defined_check_expr ::= expr | type +ct_defined_check_expr_list ::= ct_defined_check_expr (COMMA ct_defined_check_expr)* +ct_defined_expr ::= KW_CT_DEFINED LP ct_defined_check_expr_list RP +ct_cond_expr ::= ct_cond LP expression_list RP lambda_decl_expr ::= lambda_decl compound_statement lambda_decl_short_expr ::= lambda_decl IMPLIES expr call_expr ::= expr call_expr_tail @@ -368,16 +370,18 @@ private primary_group ::= literal_expr | type_access_expr | expr_block_expr | ct_call_expr + | ct_feature_expr | ct_arg_expr | ct_analyze_expr - | ct_checks_expr + | ct_defined_expr + | ct_cond_expr | lambda_decl_expr | lambda_decl_short_expr | init_list_expr -expr ::= assign_bin_expr +expr ::= ternary_group + | assign_bin_expr | assign_type_expr - | ternary_group | or_bin_expr | and_bin_expr | rel_bin_expr @@ -392,15 +396,24 @@ expr ::= assign_bin_expr identifier_list ::= IDENT (COMMA IDENT)* -func_definition ::= KW_FN func_header fn_parameter_list attributes? (macro_func_body | EOS) +interface_definition ::= KW_INTERFACE type_name (COLON type (COMMA type)*)? interface_body + +interface_body ::= LB (func_def EOS)* RB + +func_def ::= KW_FN func_header fn_parameter_list attributes? +func_definition ::= func_def (macro_func_body | EOS) macro_func_body ::= implies_body EOS | compound_statement +interface_impl ::= LP type_name (COMMA type)* RP + +distinct_declaration ::= KW_DISTINCT type_name interface_impl? attributes? '=' KW_INLINE? type generic_parameters? EOS + func_name ::= (type DOT)? IDENT func_header ::= optional_type func_name -fault_declaration ::= KW_FAULT type_name attributes? LB CONST_IDENT (COMMA CONST_IDENT)* COMMA? RB +fault_declaration ::= KW_FAULT type_name interface_impl? attributes? LB CONST_IDENT (COMMA CONST_IDENT)* COMMA? RB macro_name ::= (type DOT)? (AT_IDENT | IDENT) macro_definition ::= KW_MACRO macro_header LP macro_params RP attributes? macro_func_body diff --git a/src/main/java/org/c3lang/intellij/C3.flex b/src/main/java/org/c3lang/intellij/C3.flex index c345fa7..3f53640 100644 --- a/src/main/java/org/c3lang/intellij/C3.flex +++ b/src/main/java/org/c3lang/intellij/C3.flex @@ -107,6 +107,7 @@ LINE_COMMENT = "//" .* "fn" { return C3Types.KW_FN; } "if" { return C3Types.KW_IF; } "inline" { return C3Types.KW_INLINE; } + "interface" { return C3Types.KW_INTERFACE; } "import" { return C3Types.KW_IMPORT; } "macro" { return C3Types.KW_MACRO; } "module" { return C3Types.KW_MODULE; } @@ -124,9 +125,9 @@ LINE_COMMENT = "//" .* "var" { return C3Types.KW_VAR; } "while" { return C3Types.KW_WHILE; } "$alignof" { return C3Types.KW_CT_ALIGNOF; } + "$and" { return C3Types.KW_CT_AND; } "$assert" { return C3Types.KW_CT_ASSERT; } "$case" { return C3Types.KW_CT_CASE; } - "$checks" { return C3Types.KW_CT_CHECKS; } "$default" { return C3Types.KW_CT_DEFAULT; } "$defined" { return C3Types.KW_CT_DEFINED; } "$echo" { return C3Types.KW_CT_ECHO; } @@ -139,11 +140,14 @@ LINE_COMMENT = "//" .* "$eval" { return C3Types.KW_CT_EVAL; } "$evaltype" { return C3Types.KW_CT_EVALTYPE; } "$extnameof" { return C3Types.KW_CT_EXTNAMEOF; } + "$feature" { return C3Types.KW_CT_FEATURE; } "$for" { return C3Types.KW_CT_FOR; } "$foreach" { return C3Types.KW_CT_FOREACH; } "$if" { return C3Types.KW_CT_IF; } + "$is_const" { return C3Types.KW_CT_IS_CONST; } "$include" { return C3Types.KW_CT_INCLUDE; } "$nameof" { return C3Types.KW_CT_NAMEOF; } + "$or" { return C3Types.KW_CT_OR; } "$sizeof" { return C3Types.KW_CT_SIZEOF; } "$stringify" { return C3Types.KW_CT_STRINGIFY; } "$switch" { return C3Types.KW_CT_SWITCH; } diff --git a/src/main/java/org/c3lang/intellij/C3Annotator.java b/src/main/java/org/c3lang/intellij/C3Annotator.java index 8d9c53f..55bf84c 100644 --- a/src/main/java/org/c3lang/intellij/C3Annotator.java +++ b/src/main/java/org/c3lang/intellij/C3Annotator.java @@ -54,18 +54,6 @@ private void annotate(@NotNull C3DefDecl element, @NotNull AnnotationHolder anno .create(); return; } - if (element.getDistinctInline() != null && !is_type) - { - annotationHolder.newAnnotation(HighlightSeverity.ERROR, "'distinct' and 'inline' may only be used with types.") - .range(element.getDistinctInline()) - .create(); - } - if (element.getParameterList() != null && !is_attribute) - { - annotationHolder.newAnnotation(HighlightSeverity.ERROR, "Unexpected parameter list.") - .range(element.getDistinctInline()) - .create(); - } C3DefDeclarationSource source = element.getDefDeclarationSource(); if (source.getDefAttrValues() != null && !is_attribute) { diff --git a/src/main/java/org/c3lang/intellij/C3BreadcrumbsProvider.java b/src/main/java/org/c3lang/intellij/C3BreadcrumbsProvider.java index f301b32..8f34e78 100644 --- a/src/main/java/org/c3lang/intellij/C3BreadcrumbsProvider.java +++ b/src/main/java/org/c3lang/intellij/C3BreadcrumbsProvider.java @@ -5,6 +5,7 @@ import com.intellij.psi.PsiElement; import com.intellij.ui.breadcrumbs.BreadcrumbsProvider; import org.c3lang.intellij.psi.*; +import org.c3lang.intellij.psi.impl.C3InterfaceDefinitionImpl; import org.jetbrains.annotations.NotNull; public class C3BreadcrumbsProvider implements BreadcrumbsProvider @@ -47,9 +48,17 @@ else if (psiElement instanceof C3MacroDefinition decl) { return decl.getMacroHeader().getMacroName().getText(); } + else if (psiElement instanceof C3DistinctDeclaration decl) + { + return decl.getTypeName().getText(); + } + else if (psiElement instanceof C3InterfaceDefinition decl) + { + return decl.getTypeName().getText(); + } else if (psiElement instanceof C3FuncDefinition decl) { - return decl.getFuncHeader().getFuncName().getText(); + return decl.getFuncDef().getFuncHeader().getFuncName().getText(); } else if (psiElement instanceof C3BitstructDeclaration decl) { diff --git a/src/main/java/org/c3lang/intellij/C3TokenSets.java b/src/main/java/org/c3lang/intellij/C3TokenSets.java index 5111776..11d5c19 100644 --- a/src/main/java/org/c3lang/intellij/C3TokenSets.java +++ b/src/main/java/org/c3lang/intellij/C3TokenSets.java @@ -87,7 +87,9 @@ public interface C3TokenSets TokenSet CT_KEYWORDS = TokenSet.create(C3Types.KW_CT_ALIGNOF, C3Types.KW_CT_ASSERT, C3Types.KW_CT_CASE, - C3Types.KW_CT_CHECKS, + C3Types.KW_CT_AND, + C3Types.KW_CT_OR, + C3Types.KW_CT_IS_CONST, C3Types.KW_CT_DEFAULT, C3Types.KW_CT_DEFINED, C3Types.KW_CT_ECHO, @@ -99,6 +101,7 @@ public interface C3TokenSets C3Types.KW_CT_ERROR, C3Types.KW_CT_EVAL, C3Types.KW_CT_EXTNAMEOF, + C3Types.KW_CT_FEATURE, C3Types.KW_CT_FOR, C3Types.KW_CT_FOREACH, C3Types.KW_CT_IF, @@ -141,6 +144,7 @@ public interface C3TokenSets C3Types.KW_IF, C3Types.KW_IMPORT, C3Types.KW_INLINE, + C3Types.KW_INTERFACE, C3Types.KW_MACRO, C3Types.KW_MODULE, C3Types.KW_NEXTCASE, diff --git a/src/main/java/org/c3lang/intellij/stubs/C3ModulesIndex.java b/src/main/java/org/c3lang/intellij/stubs/C3ModulesIndex.java index f9ef6b8..2512372 100644 --- a/src/main/java/org/c3lang/intellij/stubs/C3ModulesIndex.java +++ b/src/main/java/org/c3lang/intellij/stubs/C3ModulesIndex.java @@ -25,9 +25,4 @@ public C3ModulesIndex() return KEY; } - @Override - public Collection get(@NotNull String s, @NotNull Project project, @NotNull GlobalSearchScope scope) - { - return StubIndex.getElements(KEY, s, project, GlobalSearchScope.everythingScope(project), C3ModuleSection.class); - } }