From f713b3078ea698973307b580b130f5b8667aad9f Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Sat, 6 Jan 2024 11:30:16 +0100 Subject: [PATCH] feat: support style object syntax --- gradle.properties | 2 +- .../plugins/d2/lang/D2ElementTypes.java | 5 + .../plugins/d2/lang/D2FlexLexer.java | 1055 +++++++++-------- .../jetbrains/plugins/d2/lang/D2Parser.java | 102 +- .../plugins/d2/editor/D2BraceMatcher.kt | 1 + .../plugins/d2/editor/D2FormatterService.kt | 3 +- .../jetbrains/plugins/d2/lang/D2Lexer.flex | 73 +- .../plugins/d2/lang/D2ParserDefinition.kt | 2 + .../org/jetbrains/plugins/d2/lang/d2.bnf | 13 +- .../jetbrains/plugins/d2/lang/highlighter.kt | 3 + .../jetbrains/plugins/d2/lang/psi/Property.kt | 4 + .../jetbrains/plugins/d2/lang/psi/ShapeId.kt | 12 +- .../org/jetbrains/plugins/d2/D2ParsingTest.kt | 53 +- .../jetbrains/plugins/d2/D2ParsingTestCase.kt | 9 +- src/test/resources/psi/classes and array.txt | 94 ++ src/test/resources/psi/style object.txt | 47 + 16 files changed, 896 insertions(+), 582 deletions(-) create mode 100644 src/test/resources/psi/classes and array.txt create mode 100644 src/test/resources/psi/style object.txt diff --git a/gradle.properties b/gradle.properties index 072128f..8435ea7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ pluginGroup=com.dvd.intellij.d2 pluginName=D2 pluginRepositoryUrl=https://github.com/develar/d2-intellij-plugin -pluginVersion=1.1.1 +pluginVersion=1.2.0 pluginSinceBuild=232 pluginUntilBuild=241.* diff --git a/src/main/gen/org/jetbrains/plugins/d2/lang/D2ElementTypes.java b/src/main/gen/org/jetbrains/plugins/d2/lang/D2ElementTypes.java index 92d81de..81a43cf 100644 --- a/src/main/gen/org/jetbrains/plugins/d2/lang/D2ElementTypes.java +++ b/src/main/gen/org/jetbrains/plugins/d2/lang/D2ElementTypes.java @@ -5,6 +5,7 @@ public interface D2ElementTypes { + IElementType ARRAY = D2ElementTypeFactory.element("ARRAY"); IElementType BLOCK_DEFINITION = D2ElementTypeFactory.element("BLOCK_DEFINITION"); IElementType BLOCK_STRING = D2ElementTypeFactory.element("BLOCK_STRING"); IElementType COLOR_VALUE = D2ElementTypeFactory.element("COLOR_VALUE"); @@ -12,6 +13,7 @@ public interface D2ElementTypes { IElementType OTHER_VALUE = D2ElementTypeFactory.element("OTHER_VALUE"); IElementType PROPERTY = D2ElementTypeFactory.element("PROPERTY"); IElementType PROPERTY_KEY = D2ElementTypeFactory.element("PROPERTY_KEY"); + IElementType PROPERTY_MAP = D2ElementTypeFactory.element("PROPERTY_MAP"); IElementType SHAPE_CONNECTION = D2ElementTypeFactory.element("SHAPE_CONNECTION"); IElementType SHAPE_DECLARATION = D2ElementTypeFactory.element("SHAPE_DECLARATION"); IElementType SHAPE_ID = D2ElementTypeFactory.element("SHAPE_ID"); @@ -26,6 +28,7 @@ public interface D2ElementTypes { IElementType COLON = D2ElementTypeFactory.token("COLON"); IElementType COLOR = D2ElementTypeFactory.token("COLOR"); IElementType COMMENT = D2ElementTypeFactory.token("COMMENT"); + IElementType COMPOSITE_RESERVED_KEYWORDS = D2ElementTypeFactory.token("COMPOSITE_RESERVED_KEYWORDS"); IElementType CONTAINER_LESS_KEYWORDS = D2ElementTypeFactory.token("CONTAINER_LESS_KEYWORDS"); IElementType DOT = D2ElementTypeFactory.token("DOT"); IElementType DOUBLE_ARROW = D2ElementTypeFactory.token("DOUBLE_ARROW"); @@ -35,7 +38,9 @@ public interface D2ElementTypes { IElementType ID = D2ElementTypeFactory.token("ID"); IElementType INT = D2ElementTypeFactory.token("INT"); IElementType LBRACE = D2ElementTypeFactory.token("LBRACE"); + IElementType LBRACKET = D2ElementTypeFactory.token("LBRACKET"); IElementType RBRACE = D2ElementTypeFactory.token("RBRACE"); + IElementType RBRACKET = D2ElementTypeFactory.token("RBRACKET"); IElementType RESERVED_KEYWORD_HOLDERS = D2ElementTypeFactory.token("RESERVED_KEYWORD_HOLDERS"); IElementType REVERSE_ARROW = D2ElementTypeFactory.token("REVERSE_ARROW"); IElementType SEMICOLON = D2ElementTypeFactory.token("SEMICOLON"); diff --git a/src/main/gen/org/jetbrains/plugins/d2/lang/D2FlexLexer.java b/src/main/gen/org/jetbrains/plugins/d2/lang/D2FlexLexer.java index bed54b5..adf42ce 100644 --- a/src/main/gen/org/jetbrains/plugins/d2/lang/D2FlexLexer.java +++ b/src/main/gen/org/jetbrains/plugins/d2/lang/D2FlexLexer.java @@ -23,9 +23,11 @@ public class D2FlexLexer implements FlexLexer { /** lexical states */ public static final int YYINITIAL = 0; public static final int LABEL_STATE = 2; - public static final int PROPERTY_VALUE_STATE = 4; - public static final int BLOCK_STRING_LANG_STATE = 6; - public static final int BLOCK_STRING_BODY_STATE = 8; + public static final int PROPERTY_VALUE_BEGIN_STATE = 4; + public static final int PROPERTY_VALUE_STATE = 6; + public static final int BLOCK_STRING_LANG_STATE = 8; + public static final int BLOCK_STRING_BODY_STATE = 10; + public static final int ARRAY_STATE = 12; /** * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l @@ -34,7 +36,7 @@ public class D2FlexLexer implements FlexLexer { * 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 + 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6 }; /** @@ -75,13 +77,13 @@ private static int zzUnpackcmap_top(String packed, int offset, int [] result) { "\11\0\1\1\1\2\2\3\1\2\22\0\1\1\1\0"+ "\1\4\1\5\3\0\1\6\5\0\1\7\1\10\1\0"+ "\3\11\1\12\6\11\1\13\1\14\1\15\1\0\1\16"+ - "\2\0\6\17\24\20\1\0\1\21\2\0\1\20\1\0"+ - "\1\22\1\23\1\24\1\25\1\26\1\27\1\30\1\31"+ - "\1\32\1\20\1\33\1\34\1\35\1\36\1\37\1\40"+ - "\1\20\1\41\1\42\1\43\1\44\1\45\1\46\1\47"+ - "\1\50\1\51\1\52\1\53\1\54\7\0\1\3\32\0"+ - "\1\55\u01df\0\1\55\177\0\13\55\35\0\2\3\5\0"+ - "\1\55\57\0\1\55\240\0\1\55\377\0\u0100\56"; + "\2\0\6\17\24\20\1\21\1\22\1\23\1\0\1\20"+ + "\1\0\1\24\1\25\1\26\1\27\1\30\1\31\1\32"+ + "\1\33\1\34\1\20\1\35\1\36\1\37\1\40\1\41"+ + "\1\42\1\20\1\43\1\44\1\45\1\46\1\47\1\50"+ + "\1\51\1\52\1\53\1\54\1\55\1\56\7\0\1\3"+ + "\32\0\1\57\u01df\0\1\57\177\0\13\57\35\0\2\3"+ + "\5\0\1\57\57\0\1\57\240\0\1\57\377\0\u0100\60"; private static int [] zzUnpackcmap_blocks() { int [] result = new int[1536]; @@ -108,22 +110,22 @@ private static int zzUnpackcmap_blocks(String packed, int offset, int [] result) private static final int [] ZZ_ACTION = zzUnpackAction(); private static final String ZZ_ACTION_PACKED_0 = - "\5\0\1\1\1\2\1\1\1\3\1\1\1\4\1\5"+ + "\7\0\1\1\1\2\1\1\1\3\1\1\1\4\1\5"+ "\1\1\1\6\1\7\2\4\21\1\1\10\1\11\1\12"+ - "\1\2\1\13\2\12\1\14\1\15\1\16\3\12\1\17"+ - "\1\20\1\21\2\12\1\22\1\4\1\23\3\0\1\1"+ - "\1\3\2\0\1\1\1\24\1\25\1\26\1\27\36\1"+ - "\2\0\1\30\1\12\1\0\1\12\1\15\1\0\1\12"+ - "\1\0\1\30\2\12\1\0\4\12\1\0\1\30\2\0"+ - "\1\31\33\1\1\32\4\1\1\30\1\12\1\30\1\33"+ - "\2\12\1\30\6\1\2\26\22\1\2\12\1\34\2\1"+ - "\1\32\3\1\3\0\7\1\1\35\1\1\1\0\3\1"+ - "\1\12\1\36\17\1\1\26\4\1\1\37\1\12\1\0"+ - "\2\1\1\0\7\1\2\0\3\1\1\12\14\1\1\12"+ - "\1\1\1\40\10\1\1\0\24\1\1\41"; + "\1\2\1\13\2\12\1\14\1\15\1\16\1\17\1\12"+ + "\1\20\1\21\1\22\1\23\1\24\2\12\1\25\1\4"+ + "\1\26\1\27\1\30\3\0\1\1\1\3\2\0\1\1"+ + "\1\31\1\32\1\33\1\34\36\1\2\0\1\35\1\12"+ + "\1\0\1\12\1\15\4\12\1\0\1\35\2\0\1\36"+ + "\33\1\1\37\4\1\1\35\1\12\1\40\2\12\1\35"+ + "\6\1\2\33\20\1\1\41\2\1\2\12\1\42\2\1"+ + "\1\37\3\1\3\0\7\1\1\43\1\1\1\0\3\1"+ + "\1\12\1\44\17\1\1\33\4\1\1\45\1\12\1\0"+ + "\2\1\1\0\7\1\2\0\3\1\1\12\15\1\1\12"+ + "\1\1\1\46\10\1\1\0\24\1\1\47"; private static int [] zzUnpackAction() { - int [] result = new int[296]; + int [] result = new int[295]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; @@ -148,46 +150,46 @@ private static int zzUnpackAction(String packed, int offset, int [] result) { private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\57\0\136\0\215\0\274\0\353\0\u011a\0\u0149"+ - "\0\u0178\0\u01a7\0\u01d6\0\u0205\0\u0234\0\u0205\0\u0205\0\u0263"+ - "\0\u0205\0\u0292\0\u02c1\0\u02f0\0\u031f\0\u034e\0\u037d\0\u03ac"+ - "\0\u03db\0\u040a\0\u0439\0\u0468\0\u0497\0\u04c6\0\u04f5\0\u0524"+ - "\0\u0553\0\u0582\0\u0205\0\u0205\0\u05b1\0\u05e0\0\u060f\0\u063e"+ - "\0\u066d\0\u0205\0\u069c\0\u0205\0\u06cb\0\u06fa\0\u0729\0\u0758"+ - "\0\u0205\0\u0205\0\u0787\0\u07b6\0\u07e5\0\u0814\0\u0843\0\353"+ - "\0\u0149\0\u0872\0\u08a1\0\u08d0\0\u01a7\0\u08ff\0\u092e\0\u01d6"+ - "\0\u0205\0\353\0\u095d\0\u098c\0\u09bb\0\u09ea\0\u0a19\0\u0a48"+ - "\0\u0a77\0\u0aa6\0\u0ad5\0\u0b04\0\u0b33\0\u0b62\0\u0b91\0\u0bc0"+ - "\0\u0bef\0\u0c1e\0\u0c4d\0\u0c7c\0\u0cab\0\u0cda\0\u0d09\0\u0d38"+ - "\0\u0d67\0\u0d96\0\u0dc5\0\u0df4\0\u0e23\0\u0e52\0\u0e81\0\u0eb0"+ - "\0\u0edf\0\u05b1\0\u063e\0\u05b1\0\u0f0e\0\u066d\0\u0f3d\0\u0f6c"+ - "\0\u06cb\0\u0f9b\0\u0f9b\0\u06cb\0\u0fca\0\u0ff9\0\u0729\0\u1028"+ - "\0\u1057\0\u1086\0\u10b5\0\u0814\0\u0205\0\u10e4\0\u1113\0\u0205"+ - "\0\u1142\0\u1171\0\u11a0\0\u11cf\0\u11fe\0\u122d\0\u125c\0\u128b"+ - "\0\u12ba\0\u12e9\0\u1318\0\u1347\0\u1376\0\u13a5\0\u13d4\0\u1403"+ - "\0\u1432\0\u1461\0\u1490\0\u14bf\0\u14ee\0\u151d\0\u154c\0\u157b"+ - "\0\u15aa\0\u15d9\0\u1608\0\353\0\u1637\0\u1666\0\u1695\0\u16c4"+ - "\0\u063e\0\u16f3\0\u0f9b\0\u1057\0\u1722\0\u1751\0\u0872\0\u1780"+ - "\0\u17af\0\u17de\0\u180d\0\u183c\0\u186b\0\u189a\0\u18c9\0\u18f8"+ - "\0\u1927\0\u1956\0\u1985\0\u19b4\0\u19e3\0\u1a12\0\u1a41\0\u1a70"+ - "\0\u1a9f\0\u1ace\0\u1afd\0\u1b2c\0\u1b5b\0\u1b8a\0\u1bb9\0\u1be8"+ - "\0\u1c17\0\u1c46\0\u1c75\0\u06cb\0\u1ca4\0\u1cd3\0\u1d02\0\u1d31"+ - "\0\u1d60\0\u1d8f\0\u1dbe\0\u1ded\0\u1e1c\0\u1e4b\0\u1e7a\0\u1ea9"+ - "\0\u1ed8\0\u1f07\0\u1f36\0\u1f65\0\353\0\u1f94\0\u1fc3\0\u1ff2"+ - "\0\u2021\0\u2050\0\u207f\0\u06cb\0\u20ae\0\u20dd\0\u210c\0\u213b"+ - "\0\u216a\0\u2199\0\u21c8\0\u21f7\0\u2226\0\u2255\0\u2284\0\u22b3"+ - "\0\u22e2\0\u2311\0\u2340\0\u236f\0\u239e\0\u23cd\0\u23fc\0\u242b"+ - "\0\u06cb\0\u245a\0\u2489\0\u24b8\0\u24e7\0\u2516\0\u2545\0\u2574"+ - "\0\u25a3\0\u25d2\0\u2601\0\u2630\0\u265f\0\u268e\0\u26bd\0\u26ec"+ - "\0\u271b\0\u274a\0\u2779\0\u27a8\0\u27d7\0\u2806\0\u2835\0\u2864"+ - "\0\u2893\0\u28c2\0\u28f1\0\u2920\0\u294f\0\u297e\0\u29ad\0\u29dc"+ - "\0\u2a0b\0\353\0\u2a3a\0\u2a69\0\u2a98\0\u2ac7\0\u2af6\0\u2b25"+ - "\0\u2b54\0\u2b83\0\u2bb2\0\u2be1\0\u2c10\0\u2c3f\0\u2c6e\0\u2c9d"+ - "\0\u2ccc\0\u2cfb\0\u2d2a\0\u2d59\0\u2d88\0\u2db7\0\u2de6\0\u2e15"+ - "\0\u2e44\0\u2e73\0\u2ea2\0\u2ed1\0\u2f00\0\u2f2f\0\u2f5e\0\353"; + "\0\0\0\61\0\142\0\223\0\304\0\365\0\u0126\0\u0157"+ + "\0\u0188\0\u01b9\0\u01ea\0\u021b\0\u024c\0\u027d\0\u02ae\0\u027d"+ + "\0\u027d\0\u02df\0\u027d\0\u0310\0\u0341\0\u0372\0\u03a3\0\u03d4"+ + "\0\u0405\0\u0436\0\u0467\0\u0498\0\u04c9\0\u04fa\0\u052b\0\u055c"+ + "\0\u058d\0\u05be\0\u05ef\0\u0620\0\u027d\0\u027d\0\u0651\0\u0682"+ + "\0\u06b3\0\u06e4\0\u0715\0\u027d\0\u0746\0\u027d\0\u027d\0\u0777"+ + "\0\u07a8\0\u0651\0\u027d\0\u0651\0\u0651\0\u07d9\0\u080a\0\u083b"+ + "\0\u086c\0\u089d\0\u0651\0\u0651\0\u0157\0\u01b9\0\u08ce\0\u08ff"+ + "\0\u0930\0\u021b\0\u0961\0\u0992\0\u024c\0\u027d\0\u0157\0\u09c3"+ + "\0\u09f4\0\u0a25\0\u0a56\0\u0a87\0\u0ab8\0\u0ae9\0\u0b1a\0\u0b4b"+ + "\0\u0b7c\0\u0bad\0\u0bde\0\u0c0f\0\u0c40\0\u0c71\0\u0ca2\0\u0cd3"+ + "\0\u0d04\0\u0d35\0\u0d66\0\u0d97\0\u0dc8\0\u0df9\0\u0e2a\0\u0e5b"+ + "\0\u0e8c\0\u0ebd\0\u0eee\0\u0f1f\0\u0f50\0\u0f81\0\u0651\0\u06e4"+ + "\0\u0651\0\u0fb2\0\u0715\0\u0fe3\0\u1014\0\u1045\0\u1076\0\u10a7"+ + "\0\u10d8\0\u086c\0\u027d\0\u1109\0\u113a\0\u027d\0\u116b\0\u119c"+ + "\0\u11cd\0\u11fe\0\u122f\0\u1260\0\u1291\0\u12c2\0\u12f3\0\u1324"+ + "\0\u1355\0\u1386\0\u13b7\0\u13e8\0\u1419\0\u144a\0\u147b\0\u14ac"+ + "\0\u14dd\0\u150e\0\u153f\0\u1570\0\u15a1\0\u15d2\0\u1603\0\u1634"+ + "\0\u1665\0\u0157\0\u1696\0\u16c7\0\u16f8\0\u1729\0\u06e4\0\u175a"+ + "\0\u1076\0\u178b\0\u17bc\0\u08ce\0\u17ed\0\u181e\0\u184f\0\u1880"+ + "\0\u18b1\0\u18e2\0\u1913\0\u1944\0\u1975\0\u19a6\0\u19d7\0\u1a08"+ + "\0\u1a39\0\u1a6a\0\u1a9b\0\u1acc\0\u1afd\0\u1b2e\0\u1b5f\0\u1b90"+ + "\0\u1bc1\0\u1bf2\0\u1c23\0\u1c54\0\u0157\0\u1c85\0\u1cb6\0\u1ce7"+ + "\0\u1d18\0\u0651\0\u1d49\0\u1d7a\0\u1dab\0\u1ddc\0\u1e0d\0\u1e3e"+ + "\0\u1e6f\0\u1ea0\0\u1ed1\0\u1f02\0\u1f33\0\u1f64\0\u1f95\0\u1fc6"+ + "\0\u1ff7\0\u2028\0\u0157\0\u2059\0\u208a\0\u20bb\0\u20ec\0\u211d"+ + "\0\u214e\0\u0651\0\u217f\0\u21b0\0\u21e1\0\u2212\0\u2243\0\u2274"+ + "\0\u22a5\0\u22d6\0\u2307\0\u2338\0\u2369\0\u239a\0\u23cb\0\u23fc"+ + "\0\u242d\0\u245e\0\u248f\0\u24c0\0\u24f1\0\u2522\0\u0651\0\u2553"+ + "\0\u2584\0\u25b5\0\u25e6\0\u2617\0\u2648\0\u2679\0\u26aa\0\u26db"+ + "\0\u270c\0\u273d\0\u276e\0\u279f\0\u27d0\0\u2801\0\u2832\0\u2863"+ + "\0\u2894\0\u28c5\0\u28f6\0\u2927\0\u2958\0\u2989\0\u29ba\0\u29eb"+ + "\0\u2a1c\0\u2a4d\0\u2a7e\0\u2aaf\0\u2ae0\0\u2b11\0\u2b42\0\u2b73"+ + "\0\u0157\0\u2ba4\0\u2bd5\0\u2c06\0\u2c37\0\u2c68\0\u2c99\0\u2cca"+ + "\0\u2cfb\0\u2d2c\0\u2d5d\0\u2d8e\0\u2dbf\0\u2df0\0\u2e21\0\u2e52"+ + "\0\u2e83\0\u2eb4\0\u2ee5\0\u2f16\0\u2f47\0\u2f78\0\u2fa9\0\u2fda"+ + "\0\u300b\0\u303c\0\u306d\0\u309e\0\u30cf\0\u3100\0\u0157"; private static int [] zzUnpackRowMap() { - int [] result = new int[296]; + int [] result = new int[295]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; @@ -210,387 +212,387 @@ private static int zzUnpackRowMap(String packed, int offset, int [] result) { private static final int [] ZZ_TRANS = zzUnpacktrans(); private static final String ZZ_TRANS_PACKED_0 = - "\1\6\3\7\1\10\1\11\1\12\1\13\1\14\1\6"+ - "\1\15\1\16\1\17\1\20\1\21\3\6\1\22\1\23"+ - "\1\24\1\25\1\6\1\26\1\27\1\30\1\31\1\6"+ - "\1\32\1\33\1\34\1\35\2\6\1\36\1\37\1\40"+ - "\1\41\1\42\3\6\1\43\1\21\1\44\1\7\1\6"+ - "\1\45\1\46\1\47\1\21\1\50\1\45\1\51\5\45"+ - "\1\21\35\45\1\52\1\53\1\54\1\21\1\45\1\55"+ - "\1\46\1\47\1\21\1\56\1\55\1\57\2\55\2\60"+ - "\1\61\1\62\12\55\1\63\13\55\1\64\6\55\2\21"+ - "\1\54\1\21\1\55\1\65\3\7\47\65\1\21\1\65"+ - "\1\7\1\65\53\66\1\67\3\66\1\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\33\6\4\0\1\6"+ - "\1\0\3\7\51\0\1\7\1\0\1\10\1\71\2\72"+ - "\1\6\2\10\1\71\1\72\2\10\4\72\2\10\1\73"+ - "\30\10\4\72\1\10\2\11\2\0\4\11\1\74\2\11"+ - "\4\74\33\11\4\74\1\6\1\12\1\75\2\76\2\12"+ - "\1\6\1\75\1\76\2\12\4\76\2\12\1\77\30\12"+ - "\4\76\1\12\7\0\1\100\6\0\1\101\117\0\1\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\6\6"+ - "\1\102\24\6\4\0\1\6\7\0\1\103\47\0\1\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\17\6"+ - "\1\104\13\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\20\6\1\105\12\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\15\6"+ - "\1\106\2\6\1\107\12\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\7\6\1\110\3\6"+ - "\1\111\4\6\1\112\12\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\13\6\1\113\4\6"+ - "\1\114\12\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\22\6\1\115\10\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\7\6"+ - "\1\116\10\6\1\117\12\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\5\6\1\120\16\6"+ - "\1\121\6\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\3\6\1\122\3\6\1\123\3\6"+ - "\1\124\17\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\25\6\1\125\5\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\7\6"+ - "\1\126\23\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\21\6\1\127\11\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\12\6"+ - "\1\130\5\6\1\131\3\6\1\132\6\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\3\6"+ - "\1\133\3\6\1\134\10\6\1\135\12\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\17\6"+ - "\1\136\13\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\3\6\1\137\3\6\1\140\23\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\13\6\1\141\17\6\4\0\1\6\1\45\1\142"+ - "\2\0\10\45\1\0\35\45\4\0\1\45\1\0\1\46"+ - "\57\0\1\47\54\0\1\50\1\143\2\72\1\144\7\50"+ - "\1\72\4\50\1\145\30\50\4\72\1\50\1\51\1\146"+ - "\2\76\2\51\1\144\5\51\1\76\4\51\1\147\30\51"+ - "\4\76\1\51\1\150\3\0\5\150\2\0\4\150\2\0"+ - "\1\150\30\0\1\150\1\53\1\150\1\0\1\150\1\55"+ - "\1\151\2\0\7\55\2\0\35\55\4\0\1\55\1\152"+ - "\1\153\2\72\1\154\1\155\5\152\2\72\4\152\1\156"+ - "\30\152\4\72\1\152\1\57\1\157\2\76\2\57\1\154"+ - "\4\57\2\76\4\57\1\160\30\57\4\76\1\57\1\55"+ - "\1\151\2\0\4\55\1\161\2\60\2\0\35\55\4\0"+ - "\2\55\1\151\2\0\7\55\2\0\5\55\1\162\27\55"+ - "\4\0\2\55\1\151\2\0\7\55\2\0\24\55\1\163"+ - "\10\55\4\0\1\55\1\65\3\0\47\65\1\0\1\65"+ - "\1\0\1\65\53\164\1\67\3\164\53\0\1\67\3\0"+ - "\4\72\1\165\14\72\1\166\35\72\1\10\1\71\2\72"+ - "\3\10\1\71\1\72\2\10\4\72\2\10\1\73\30\10"+ - "\4\72\1\10\2\74\2\0\52\74\1\0\6\76\1\165"+ - "\12\76\1\167\35\76\1\12\1\75\2\0\3\12\1\75"+ - "\1\76\2\12\4\76\33\12\4\76\1\6\7\0\1\103"+ - "\6\0\1\170\40\0\1\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\13\6\1\171\17\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\15\6"+ - "\1\15\4\6\1\172\10\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\3\6\1\173\27\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\17\6\1\174\13\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\23\6\1\175\7\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\22\6\1\176\10\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\25\6\1\177\5\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\15\6\1\200\15\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\17\6\1\201\13\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\13\6\1\202\17\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\13\6\1\203\17\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\22\6\1\204\10\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\20\6\1\205\12\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\3\6\1\206\27\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\4\6\1\207\26\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\10\6\1\210\22\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\17\6\1\211\13\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\15\6\1\212\15\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\3\6\1\213\27\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\3\6\1\214\27\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\3\6\1\215\27\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\25\6\1\216\5\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\22\6\1\217\6\6"+ - "\1\220\1\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\22\6\1\221\10\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\30\6"+ - "\1\222\2\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\20\6\1\223\1\224\11\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\6\6\1\225\24\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\22\6\1\226\10\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\22\6\1\227\10\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\6\6\1\230\24\6\4\0"+ - "\1\6\1\50\1\143\2\72\1\231\7\50\1\72\4\50"+ - "\1\145\30\50\4\72\1\50\1\51\1\146\2\0\10\51"+ - "\1\76\35\51\4\76\1\45\1\150\3\0\5\150\2\0"+ - "\4\150\2\0\1\150\30\0\1\150\1\0\1\150\1\0"+ - "\1\150\1\152\1\153\2\72\1\154\6\152\2\72\4\152"+ - "\1\156\30\152\4\72\2\152\1\153\2\72\1\154\4\152"+ - "\2\232\2\72\2\152\1\232\1\152\1\156\6\232\22\152"+ - "\4\72\2\152\1\153\2\72\1\233\6\152\2\72\4\152"+ - "\1\156\30\152\4\72\1\152\1\57\1\157\2\0\7\57"+ - "\2\76\35\57\4\76\2\55\1\151\2\0\5\55\2\234"+ - "\2\0\35\55\4\0\2\55\1\151\2\0\7\55\2\0"+ - "\17\55\1\235\15\55\4\0\2\55\1\151\2\0\7\55"+ - "\2\0\27\55\1\236\5\55\4\0\1\55\4\72\1\237"+ - "\14\72\1\166\35\72\2\76\2\0\52\76\1\0\1\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\16\6"+ - "\1\240\14\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\6\6\1\241\24\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\23\6"+ - "\1\242\7\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\23\6\1\243\7\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\5\6"+ - "\1\224\25\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\7\6\1\244\23\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\4\6"+ - "\1\245\26\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\15\6\1\246\15\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\24\6"+ - "\1\247\6\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\6\6\1\250\24\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\11\6"+ - "\1\251\21\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\13\6\1\252\17\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\17\6"+ - "\1\224\13\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\15\6\1\253\15\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\7\6"+ - "\1\254\23\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\24\6\1\224\6\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\14\6"+ - "\1\224\16\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\24\6\1\255\6\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\22\6"+ - "\1\224\10\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\5\6\1\256\25\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\6\6"+ - "\1\257\12\6\1\260\11\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\22\6\1\261\10\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\20\6\1\262\12\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\15\6\1\263\15\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\11\6\1\264\21\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\24\6\1\265\6\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\15\6\1\266\15\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\7\6\1\267\23\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\23\6\1\224\7\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\24\6\1\270\6\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\24\6\1\271\6\6\4\0\1\6\1\152\1\153"+ - "\2\72\1\154\4\152\2\272\2\72\2\152\1\272\1\152"+ - "\1\156\6\272\22\152\4\72\1\152\1\55\1\151\2\0"+ - "\7\55\2\0\25\55\1\273\7\55\4\0\2\55\1\151"+ - "\2\0\7\55\2\0\11\55\1\274\23\55\4\0\1\55"+ - "\1\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\3\6\1\275\27\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\7\6\1\276\23\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\23\6\1\277\7\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\24\6\1\300\6\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\5\6\1\301\25\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\15\6\1\302\15\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\303\1\0\2\6\4\0"+ - "\7\6\1\15\23\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\304\1\0\2\6\4\0\33\6\4\0\2\6\1\70"+ - "\2\0\3\6\1\305\1\0\2\6\4\0\33\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\12\6\1\210\20\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\32\6\1\306\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\13\6"+ - "\1\307\17\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\15\6\1\224\15\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\13\6"+ - "\1\310\17\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\13\6\1\311\17\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\20\6"+ - "\1\312\12\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\7\6\1\224\23\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\5\6"+ - "\1\313\25\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\14\6\1\314\16\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\7\6"+ - "\1\315\23\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\7\6\1\316\23\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\317\1\0\2\6\4\0\33\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\24\6\1\320\6\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\22\6\1\321\10\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\13\6\1\322\17\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\12\6\1\224\20\6"+ - "\4\0\1\6\1\152\1\153\2\72\1\154\4\152\2\323"+ - "\2\72\2\152\1\323\1\152\1\156\6\323\22\152\4\72"+ - "\1\152\1\55\1\151\2\0\7\55\2\0\11\55\1\324"+ - "\23\55\4\0\1\55\1\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\24\6\1\325\6\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\22\6"+ - "\1\326\10\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\7\6\1\226\23\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\22\6"+ - "\1\327\10\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\24\6\1\330\6\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\7\6"+ - "\1\331\23\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\21\6\1\332\11\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\5\6"+ - "\1\333\15\6\1\334\7\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\5\6\1\335\3\6"+ - "\1\336\10\6\1\337\10\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\20\6\1\340\12\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\5\6\1\102\25\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\21\6\1\341\11\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\24\6\1\342\6\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\27\6\1\102\3\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\7\6\1\343\23\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\7\6\1\344\23\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\24\6\1\343\6\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\24\6\1\345\6\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\13\6\1\346\17\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\15\6\1\347\15\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\5\6\1\350\25\6\4\0\1\6\1\152\1\153"+ - "\2\72\1\351\4\152\2\352\2\72\2\152\1\352\1\152"+ - "\1\156\6\352\22\152\4\72\1\152\1\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\7\6\1\15\23\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\353\1\0\2\6"+ - "\4\0\33\6\4\0\2\6\1\70\2\0\3\6\1\70"+ - "\1\0\2\6\4\0\3\6\1\354\27\6\4\0\2\6"+ - "\1\70\2\0\3\6\1\70\1\0\2\6\4\0\13\6"+ - "\1\355\17\6\4\0\2\6\1\70\2\0\3\6\1\356"+ - "\1\0\2\6\4\0\33\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\3\6\1\357\27\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\20\6\1\360\12\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\13\6\1\361\17\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\20\6\1\362\12\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\3\6\1\346\27\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\20\6\1\363\12\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\17\6\1\364\13\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\15\6\1\365\15\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\31\6\1\102\1\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\366\1\0\2\6"+ - "\4\0\33\6\4\0\2\6\1\70\2\0\3\6\1\367"+ - "\1\0\2\6\4\0\33\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\22\6\1\370\10\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\21\6\1\224\11\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\13\6\1\371\17\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\3\6\1\372\27\6\4\0\1\6\1\152\1\153"+ - "\2\72\1\154\4\152\2\373\2\72\2\152\1\373\1\152"+ - "\1\156\6\373\22\152\4\72\1\152\1\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\22\6\1\374\10\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\13\6\1\375\17\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\20\6\1\376\12\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\4\6\1\377\26\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\24\6\1\u0100\6\6"+ - "\4\0\2\6\1\70\2\0\3\6\1\70\1\0\2\6"+ - "\4\0\15\6\1\u0101\15\6\4\0\2\6\1\70\2\0"+ - "\3\6\1\70\1\0\2\6\4\0\32\6\1\365\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\15\6\1\u0102\15\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\27\6\1\226\3\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\24\6\1\350\6\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\7\6\1\102\23\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\3\6\1\u0103\27\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\6\6\1\u0104\20\6\1\u0105"+ - "\3\6\4\0\2\6\1\70\2\0\3\6\1\70\1\0"+ - "\2\6\4\0\3\6\1\u0106\27\6\4\0\2\6\1\70"+ - "\2\0\3\6\1\70\1\0\2\6\4\0\17\6\1\365"+ - "\13\6\4\0\2\6\1\70\2\0\3\6\1\70\1\0"+ - "\2\6\4\0\15\6\1\u0107\15\6\4\0\1\6\1\152"+ - "\1\153\2\72\1\154\4\152\2\u0108\2\72\2\152\1\u0108"+ - "\1\152\1\156\6\u0108\22\152\4\72\1\152\1\6\1\70"+ - "\2\0\3\6\1\70\1\0\2\6\4\0\3\6\1\u0109"+ - "\27\6\4\0\2\6\1\70\2\0\3\6\1\70\1\0"+ - "\2\6\4\0\17\6\1\210\13\6\4\0\2\6\1\70"+ - "\2\0\3\6\1\70\1\0\2\6\4\0\17\6\1\u010a"+ - "\13\6\4\0\2\6\1\70\2\0\3\6\1\70\1\0"+ - "\2\6\4\0\20\6\1\u010b\12\6\4\0\2\6\1\70"+ - "\2\0\3\6\1\70\1\0\2\6\4\0\24\6\1\u010c"+ - "\6\6\4\0\2\6\1\70\2\0\3\6\1\70\1\0"+ - "\2\6\4\0\20\6\1\u010d\12\6\4\0\2\6\1\70"+ - "\2\0\3\6\1\70\1\0\2\6\4\0\25\6\1\u010e"+ - "\5\6\4\0\2\6\1\70\2\0\3\6\1\70\1\0"+ - "\2\6\4\0\22\6\1\u010f\10\6\4\0\2\6\1\70"+ - "\2\0\3\6\1\70\1\0\2\6\4\0\3\6\1\u0110"+ - "\27\6\4\0\2\6\1\70\2\0\3\6\1\70\1\0"+ - "\2\6\4\0\13\6\1\u0111\17\6\4\0\2\6\1\70"+ - "\2\0\3\6\1\70\1\0\2\6\4\0\17\6\1\u0112"+ - "\13\6\4\0\2\6\1\70\2\0\3\6\1\u0113\1\0"+ - "\2\6\4\0\33\6\4\0\1\6\1\152\1\153\2\72"+ - "\1\351\6\152\2\72\4\152\1\156\30\152\4\72\1\152"+ - "\1\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\6\6\1\u0114\24\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\22\6\1\u0115\10\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\7\6\1\u0116\23\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\22\6\1\102\10\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\16\6\1\u0117\14\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\22\6\1\u0118\10\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\23\6\1\u0119\7\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\6\6\1\u011a\24\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\23\6\1\u011b\7\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\11\6\1\336\21\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\13\6\1\u011c\17\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\6\6\1\u011d\24\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\22\6\1\u011e\10\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\17\6\1\226\13\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\20\6\1\u011f\12\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\12\6\1\102\20\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\24\6\1\u0119\6\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\10\6\1\u0120\22\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\25\6\1\u0121\5\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\7\6\1\u010d\23\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\17\6\1\102\13\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\27\6\1\u0122\3\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\20\6\1\u0123\12\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\23\6\1\102\7\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\12\6\1\u0124\20\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\22\6\1\u0125\10\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\7\6\1\u0126\23\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\16\6\1\102\14\6\4\0"+ - "\2\6\1\70\2\0\3\6\1\70\1\0\2\6\4\0"+ - "\3\6\1\u0127\27\6\4\0\2\6\1\70\2\0\3\6"+ - "\1\70\1\0\2\6\4\0\6\6\1\u0128\24\6\4\0"+ - "\1\6"; + "\1\10\3\11\1\12\1\13\1\14\1\15\1\16\1\10"+ + "\1\17\1\20\1\21\1\22\1\23\5\10\1\24\1\25"+ + "\1\26\1\27\1\10\1\30\1\31\1\32\1\33\1\10"+ + "\1\34\1\35\1\36\1\37\2\10\1\40\1\41\1\42"+ + "\1\43\1\44\3\10\1\45\1\23\1\46\1\11\1\10"+ + "\1\47\1\50\1\51\1\23\1\52\1\47\1\53\5\47"+ + "\1\23\37\47\1\54\1\55\1\56\1\23\1\47\1\23"+ + "\3\11\7\23\1\57\43\23\1\11\1\23\1\47\1\50"+ + "\1\51\1\23\1\60\1\47\1\53\2\47\2\61\1\62"+ + "\1\63\4\47\1\64\1\47\1\65\5\47\1\66\13\47"+ + "\1\67\6\47\2\23\1\56\1\23\1\47\1\70\3\11"+ + "\51\70\1\23\1\70\1\11\1\70\55\71\1\72\3\71"+ + "\1\47\3\11\10\47\1\21\4\47\1\73\1\47\1\74"+ + "\30\47\3\23\1\11\1\47\1\10\1\75\2\0\3\10"+ + "\1\75\1\0\2\10\4\0\35\10\4\0\1\10\1\0"+ + "\3\11\53\0\1\11\1\0\1\12\1\76\2\77\1\10"+ + "\2\12\1\76\1\77\2\12\4\77\3\12\1\100\31\12"+ + "\4\77\1\12\2\13\2\0\4\13\1\101\2\13\4\101"+ + "\35\13\4\101\1\10\1\14\1\102\2\103\2\14\1\10"+ + "\1\102\1\103\2\14\4\103\3\14\1\104\31\14\4\103"+ + "\1\14\7\0\1\105\6\0\1\106\123\0\1\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\10\10\1\107"+ + "\24\10\4\0\1\10\7\0\1\110\51\0\1\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\21\10\1\111"+ + "\13\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\22\10\1\112\12\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\17\10\1\113"+ + "\2\10\1\114\12\10\4\0\2\10\1\75\2\0\3\10"+ + "\1\75\1\0\2\10\4\0\11\10\1\115\3\10\1\116"+ + "\4\10\1\117\12\10\4\0\2\10\1\75\2\0\3\10"+ + "\1\75\1\0\2\10\4\0\15\10\1\120\4\10\1\121"+ + "\12\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\24\10\1\122\10\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\11\10\1\123"+ + "\10\10\1\124\12\10\4\0\2\10\1\75\2\0\3\10"+ + "\1\75\1\0\2\10\4\0\7\10\1\125\16\10\1\126"+ + "\6\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\5\10\1\127\3\10\1\130\3\10\1\131"+ + "\17\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\27\10\1\132\5\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\11\10\1\133"+ + "\23\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\23\10\1\134\11\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\14\10\1\135"+ + "\5\10\1\136\3\10\1\137\6\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\5\10\1\140"+ + "\3\10\1\141\10\10\1\142\12\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\21\10\1\143"+ + "\13\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\5\10\1\144\3\10\1\145\23\10\4\0"+ + "\2\10\1\75\2\0\3\10\1\75\1\0\2\10\4\0"+ + "\15\10\1\146\17\10\4\0\1\10\1\47\1\147\2\0"+ + "\10\47\1\0\37\47\4\0\1\47\1\0\1\50\61\0"+ + "\1\51\56\0\1\52\1\150\2\77\1\151\7\52\1\77"+ + "\5\52\1\152\31\52\4\77\1\52\1\53\1\153\2\103"+ + "\2\53\1\151\5\53\1\103\5\53\1\154\31\53\4\103"+ + "\1\53\1\155\3\0\5\155\2\0\4\155\2\0\3\155"+ + "\30\0\1\155\1\55\1\155\1\0\1\155\1\52\1\150"+ + "\2\77\1\151\1\156\6\52\1\77\5\52\1\152\31\52"+ + "\4\77\1\52\1\47\1\147\2\0\4\47\1\157\2\61"+ + "\1\47\1\0\37\47\4\0\2\47\1\147\2\0\10\47"+ + "\1\0\7\47\1\160\27\47\4\0\2\47\1\147\2\0"+ + "\10\47\1\0\26\47\1\161\10\47\4\0\1\47\1\70"+ + "\3\0\51\70\1\0\1\70\1\0\1\70\55\162\1\72"+ + "\3\162\55\0\1\72\3\0\4\77\1\163\15\77\1\164"+ + "\36\77\1\12\1\76\2\77\3\12\1\76\1\77\2\12"+ + "\4\77\3\12\1\100\31\12\4\77\1\12\2\101\2\0"+ + "\54\101\1\0\6\103\1\163\13\103\1\165\36\103\1\14"+ + "\1\102\2\0\3\14\1\102\1\103\2\14\4\103\35\14"+ + "\4\103\1\10\7\0\1\110\6\0\1\166\42\0\1\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\15\10"+ + "\1\167\17\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\17\10\1\17\4\10\1\170\10\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\5\10\1\171\27\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\21\10\1\172\13\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\25\10\1\173\7\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\24\10\1\174\10\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\27\10\1\175\5\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\17\10\1\176\15\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\21\10\1\177\13\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\15\10\1\200\17\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\15\10\1\201\17\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\24\10\1\202\10\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\22\10\1\203\12\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\5\10\1\204\27\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\6\10\1\205\26\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\12\10\1\206\22\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\21\10\1\207\13\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\17\10\1\210\15\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\5\10\1\211\27\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\5\10\1\212\27\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\5\10\1\213\27\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\27\10\1\214\5\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\24\10\1\215\6\10\1\216\1\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\24\10"+ + "\1\217\10\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\32\10\1\220\2\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\22\10"+ + "\1\221\1\222\11\10\4\0\2\10\1\75\2\0\3\10"+ + "\1\75\1\0\2\10\4\0\10\10\1\223\24\10\4\0"+ + "\2\10\1\75\2\0\3\10\1\75\1\0\2\10\4\0"+ + "\24\10\1\224\10\10\4\0\2\10\1\75\2\0\3\10"+ + "\1\75\1\0\2\10\4\0\24\10\1\225\10\10\4\0"+ + "\2\10\1\75\2\0\3\10\1\75\1\0\2\10\4\0"+ + "\10\10\1\226\24\10\4\0\1\10\1\52\1\150\2\77"+ + "\1\227\7\52\1\77\5\52\1\152\31\52\4\77\1\52"+ + "\1\53\1\153\2\0\10\53\1\103\37\53\4\103\1\47"+ + "\1\155\3\0\5\155\2\0\4\155\2\0\3\155\30\0"+ + "\1\155\1\0\1\155\1\0\1\155\1\52\1\150\2\77"+ + "\1\151\4\52\2\230\1\52\1\77\2\52\1\230\2\52"+ + "\1\152\1\52\6\230\22\52\4\77\1\52\1\47\1\147"+ + "\2\0\5\47\2\231\1\47\1\0\37\47\4\0\2\47"+ + "\1\147\2\0\10\47\1\0\21\47\1\232\15\47\4\0"+ + "\2\47\1\147\2\0\10\47\1\0\31\47\1\233\5\47"+ + "\4\0\1\47\4\77\1\234\15\77\1\164\36\77\2\103"+ + "\2\0\54\103\1\0\1\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\20\10\1\235\14\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\10\10"+ + "\1\236\24\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\25\10\1\237\7\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\25\10"+ + "\1\240\7\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\7\10\1\222\25\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\11\10"+ + "\1\241\23\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\6\10\1\242\26\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\17\10"+ + "\1\243\15\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\26\10\1\244\6\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\10\10"+ + "\1\245\24\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\13\10\1\246\21\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\15\10"+ + "\1\247\17\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\21\10\1\222\13\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\17\10"+ + "\1\250\15\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\11\10\1\251\23\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\26\10"+ + "\1\222\6\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\16\10\1\222\16\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\26\10"+ + "\1\252\6\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\24\10\1\222\10\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\7\10"+ + "\1\253\25\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\10\10\1\254\12\10\1\255\11\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\24\10\1\256\10\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\22\10\1\257\12\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\17\10\1\260\15\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\13\10\1\261\21\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\26\10\1\262\6\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\17\10\1\263\15\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\11\10\1\264\23\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\25\10\1\265\7\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\26\10\1\266\6\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\26\10\1\267\6\10"+ + "\4\0\1\10\1\52\1\150\2\77\1\151\4\52\2\270"+ + "\1\52\1\77\2\52\1\270\2\52\1\152\1\52\6\270"+ + "\22\52\4\77\1\52\1\47\1\147\2\0\10\47\1\0"+ + "\27\47\1\271\7\47\4\0\2\47\1\147\2\0\10\47"+ + "\1\0\13\47\1\272\23\47\4\0\1\47\1\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\5\10\1\273"+ + "\27\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\11\10\1\274\23\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\25\10\1\275"+ + "\7\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\26\10\1\276\6\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\7\10\1\277"+ + "\25\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\17\10\1\300\15\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\301\1\0\2\10\4\0\11\10\1\17"+ + "\23\10\4\0\2\10\1\75\2\0\3\10\1\302\1\0"+ + "\2\10\4\0\35\10\4\0\2\10\1\75\2\0\3\10"+ + "\1\303\1\0\2\10\4\0\35\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\14\10\1\206"+ + "\20\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\34\10\1\304\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\15\10\1\305\17\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\17\10\1\222\15\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\15\10\1\306\17\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\15\10\1\307\17\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\22\10\1\310\12\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\11\10\1\222\23\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\7\10\1\311\25\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\16\10\1\312\16\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\11\10\1\313\23\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\11\10\1\314\23\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\315\1\0\2\10\4\0\35\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\26\10"+ + "\1\316\6\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\24\10\1\317\10\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\15\10"+ + "\1\320\17\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\14\10\1\222\20\10\4\0\1\10"+ + "\1\52\1\150\2\77\1\151\4\52\2\321\1\52\1\77"+ + "\2\52\1\321\2\52\1\152\1\52\6\321\22\52\4\77"+ + "\1\52\1\47\1\147\2\0\10\47\1\0\13\47\1\322"+ + "\23\47\4\0\1\47\1\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\26\10\1\323\6\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\24\10"+ + "\1\324\10\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\11\10\1\224\23\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\24\10"+ + "\1\325\10\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\26\10\1\326\6\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\11\10"+ + "\1\327\23\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\23\10\1\330\11\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\7\10"+ + "\1\331\15\10\1\332\7\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\7\10\1\333\3\10"+ + "\1\334\10\10\1\335\10\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\22\10\1\336\12\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\7\10\1\107\25\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\23\10\1\337\11\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\26\10\1\340\6\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\31\10\1\107\3\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\11\10\1\341\23\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\11\10\1\342\23\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\26\10\1\341\6\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\26\10\1\343\6\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\15\10\1\344\17\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\17\10\1\345\15\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\7\10\1\346\25\10\4\0\1\10\1\52\1\150"+ + "\2\77\1\347\4\52\2\350\1\52\1\77\2\52\1\350"+ + "\2\52\1\152\1\52\6\350\22\52\4\77\1\52\1\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\11\10"+ + "\1\17\23\10\4\0\2\10\1\75\2\0\3\10\1\351"+ + "\1\0\2\10\4\0\35\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\5\10\1\352\27\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\15\10\1\353\17\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\354\1\0\2\10\4\0\35\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\5\10"+ + "\1\355\27\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\22\10\1\356\12\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\15\10"+ + "\1\357\17\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\22\10\1\360\12\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\5\10"+ + "\1\344\27\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\22\10\1\361\12\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\21\10"+ + "\1\362\13\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\17\10\1\363\15\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\33\10"+ + "\1\107\1\10\4\0\2\10\1\75\2\0\3\10\1\364"+ + "\1\0\2\10\4\0\35\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\365\1\0\2\10\4\0\35\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\24\10"+ + "\1\366\10\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\23\10\1\222\11\10\4\0\2\10"+ + "\1\75\2\0\3\10\1\75\1\0\2\10\4\0\15\10"+ + "\1\367\17\10\4\0\2\10\1\75\2\0\3\10\1\75"+ + "\1\0\2\10\4\0\5\10\1\370\27\10\4\0\1\10"+ + "\1\52\1\150\2\77\1\151\4\52\2\371\1\52\1\77"+ + "\2\52\1\371\2\52\1\152\1\52\6\371\22\52\4\77"+ + "\1\52\1\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\24\10\1\372\10\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\15\10\1\373\17\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\22\10\1\374\12\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\6\10\1\375\26\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\26\10\1\376\6\10\4\0\2\10\1\75\2\0"+ + "\3\10\1\75\1\0\2\10\4\0\17\10\1\377\15\10"+ + "\4\0\2\10\1\75\2\0\3\10\1\75\1\0\2\10"+ + "\4\0\34\10\1\363\4\0\2\10\1\75\2\0\3\10"+ + "\1\75\1\0\2\10\4\0\17\10\1\u0100\15\10\4\0"+ + "\2\10\1\75\2\0\3\10\1\75\1\0\2\10\4\0"+ + "\31\10\1\u0101\3\10\4\0\2\10\1\75\2\0\3\10"+ + "\1\75\1\0\2\10\4\0\26\10\1\346\6\10\4\0"+ + "\2\10\1\75\2\0\3\10\1\75\1\0\2\10\4\0"+ + "\11\10\1\107\23\10\4\0\2\10\1\75\2\0\3\10"+ + "\1\75\1\0\2\10\4\0\5\10\1\u0102\27\10\4\0"+ + "\2\10\1\75\2\0\3\10\1\75\1\0\2\10\4\0"+ + "\10\10\1\u0103\20\10\1\u0104\3\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\5\10\1\u0105"+ + "\27\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\21\10\1\363\13\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\17\10\1\u0106"+ + "\15\10\4\0\1\10\1\52\1\150\2\77\1\151\4\52"+ + "\2\u0107\1\52\1\77\2\52\1\u0107\2\52\1\152\1\52"+ + "\6\u0107\22\52\4\77\1\52\1\10\1\75\2\0\3\10"+ + "\1\75\1\0\2\10\4\0\5\10\1\u0108\27\10\4\0"+ + "\2\10\1\75\2\0\3\10\1\75\1\0\2\10\4\0"+ + "\21\10\1\206\13\10\4\0\2\10\1\75\2\0\3\10"+ + "\1\75\1\0\2\10\4\0\21\10\1\u0109\13\10\4\0"+ + "\2\10\1\75\2\0\3\10\1\75\1\0\2\10\4\0"+ + "\22\10\1\u010a\12\10\4\0\2\10\1\75\2\0\3\10"+ + "\1\75\1\0\2\10\4\0\26\10\1\u010b\6\10\4\0"+ + "\2\10\1\75\2\0\3\10\1\75\1\0\2\10\4\0"+ + "\22\10\1\u010c\12\10\4\0\2\10\1\75\2\0\3\10"+ + "\1\75\1\0\2\10\4\0\27\10\1\u010d\5\10\4\0"+ + "\2\10\1\75\2\0\3\10\1\75\1\0\2\10\4\0"+ + "\25\10\1\222\7\10\4\0\2\10\1\75\2\0\3\10"+ + "\1\75\1\0\2\10\4\0\24\10\1\u010e\10\10\4\0"+ + "\2\10\1\75\2\0\3\10\1\75\1\0\2\10\4\0"+ + "\5\10\1\u010f\27\10\4\0\2\10\1\75\2\0\3\10"+ + "\1\75\1\0\2\10\4\0\15\10\1\u0110\17\10\4\0"+ + "\2\10\1\75\2\0\3\10\1\75\1\0\2\10\4\0"+ + "\21\10\1\u0111\13\10\4\0\2\10\1\75\2\0\3\10"+ + "\1\u0112\1\0\2\10\4\0\35\10\4\0\1\10\1\52"+ + "\1\150\2\77\1\347\7\52\1\77\5\52\1\152\31\52"+ + "\4\77\1\52\1\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\10\10\1\u0113\24\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\24\10\1\u0114"+ + "\10\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\11\10\1\u0115\23\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\24\10\1\107"+ + "\10\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\20\10\1\u0116\14\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\24\10\1\u0117"+ + "\10\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\25\10\1\u0118\7\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\10\10\1\u0119"+ + "\24\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\25\10\1\u011a\7\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\13\10\1\334"+ + "\21\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\15\10\1\u011b\17\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\10\10\1\u011c"+ + "\24\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\24\10\1\u011d\10\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\21\10\1\u0101"+ + "\13\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\22\10\1\u011e\12\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\14\10\1\107"+ + "\20\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\26\10\1\u0118\6\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\12\10\1\u011f"+ + "\22\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\27\10\1\u0120\5\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\11\10\1\u010c"+ + "\23\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\21\10\1\107\13\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\31\10\1\u0121"+ + "\3\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\22\10\1\u0122\12\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\25\10\1\107"+ + "\7\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\14\10\1\u0123\20\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\24\10\1\u0124"+ + "\10\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\11\10\1\u0125\23\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\20\10\1\107"+ + "\14\10\4\0\2\10\1\75\2\0\3\10\1\75\1\0"+ + "\2\10\4\0\5\10\1\u0126\27\10\4\0\2\10\1\75"+ + "\2\0\3\10\1\75\1\0\2\10\4\0\10\10\1\u0127"+ + "\24\10\4\0\1\10"; private static int [] zzUnpacktrans() { - int [] result = new int[12173]; + int [] result = new int[12593]; int offset = 0; offset = zzUnpacktrans(ZZ_TRANS_PACKED_0, offset, result); return result; @@ -628,16 +630,15 @@ private static int zzUnpacktrans(String packed, int offset, int [] result) { private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\5\0\6\1\1\11\1\1\2\11\1\1\1\11\21\1"+ - "\2\11\5\1\1\11\1\1\1\11\4\1\2\11\5\1"+ + "\7\0\6\1\1\11\1\1\2\11\1\1\1\11\21\1"+ + "\2\11\5\1\1\11\1\1\2\11\3\1\1\11\11\1"+ "\3\0\2\1\2\0\2\1\1\11\40\1\2\0\2\1"+ - "\1\0\2\1\1\0\1\1\1\0\3\1\1\0\4\1"+ - "\1\0\1\11\2\0\1\11\112\1\3\0\11\1\1\0"+ - "\33\1\1\0\2\1\1\0\7\1\2\0\33\1\1\0"+ - "\25\1"; + "\1\0\6\1\1\0\1\11\2\0\1\11\112\1\3\0"+ + "\11\1\1\0\33\1\1\0\2\1\1\0\7\1\2\0"+ + "\34\1\1\0\25\1"; private static int [] zzUnpackAttribute() { - int [] result = new int[296]; + int [] result = new int[295]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; @@ -953,11 +954,11 @@ else if (zzAtEOF) { case BLOCK_STRING_LANG_STATE: { yybegin(YYINITIAL); return BAD_CHARACTER; } // fall though - case 297: break; + case 296: break; case BLOCK_STRING_BODY_STATE: { yybegin(YYINITIAL); return BAD_CHARACTER; } // fall though - case 298: break; + case 297: break; default: return null; } @@ -968,180 +969,210 @@ else if (zzAtEOF) { { return ID; } // fall through - case 34: break; + case 40: break; case 2: { return WHITE_SPACE; } // fall through - case 35: break; + case 41: break; case 3: { return COMMENT; } // fall through - case 36: break; + case 42: break; case 4: { return BAD_CHARACTER; } // fall through - case 37: break; + case 43: break; case 5: { return DOT; } // fall through - case 38: break; + case 44: break; case 6: { yybegin(LABEL_STATE); return COLON; } // fall through - case 39: break; + case 45: break; case 7: { return SEMICOLON; } // fall through - case 40: break; + case 46: break; case 8: { return LBRACE; } // fall through - case 41: break; + case 47: break; case 9: { return RBRACE; } // fall through - case 42: break; + case 48: break; case 10: { return UNQUOTED_STRING; } // fall through - case 43: break; + case 49: break; case 11: { yybegin(YYINITIAL); return WHITE_SPACE; } // fall through - case 44: break; + case 50: break; case 12: { yybegin(YYINITIAL); return LBRACE; } // fall through - case 45: break; + case 51: break; case 13: { yybegin(BLOCK_STRING_LANG_STATE); blockStringToken = new StringBuilder(yytext()).reverse(); return BLOCK_STRING_OPEN; } // fall through - case 46: break; + case 52: break; case 14: { yybegin(YYINITIAL); return RBRACE; } // fall through - case 47: break; + case 53: break; case 15: - { return INT; + { yybegin(PROPERTY_VALUE_STATE); return COLON; } // fall through - case 48: break; + case 54: break; case 16: - { return COLON; + { return INT; } // fall through - case 49: break; + case 55: break; case 17: - { yybegin(YYINITIAL); return SEMICOLON; + { return COLON; } // fall through - case 50: break; + case 56: break; case 18: - { yybegin(BLOCK_STRING_BODY_STATE); return BLOCK_STRING_LANG; + { yybegin(YYINITIAL); return SEMICOLON; } // fall through - case 51: break; + case 57: break; case 19: - { if (blockStringToken == null) { - yybegin(YYINITIAL); - blockStringToken = null; - return BLOCK_STRING_CLOSE; - } - else if (StringUtilRt.endsWith(yytext(), blockStringToken)) { - // push back to register on next step as a BLOCK_STRING_CLOSE token, - // (we neeed it to easily implement embededed language, brace matcher and so on) - yypushback(blockStringToken.length()); - blockStringToken = null; - return BLOCK_STRING_BODY; - } + { yybegin(ARRAY_STATE); return LBRACKET; } // fall through - case 52: break; + case 58: break; case 20: - { return DOUBLE_HYPHEN_ARROW; + { return RBRACKET; } // fall through - case 53: break; + case 59: break; case 21: - { return ARROW; + { yybegin(BLOCK_STRING_BODY_STATE); return BLOCK_STRING_LANG; } // fall through - case 54: break; + case 60: break; case 22: - { yybegin(PROPERTY_VALUE_STATE); return STYLE_KEYWORDS; + { if (blockStringToken == null) { + yybegin(YYINITIAL); + blockStringToken = null; + return BLOCK_STRING_CLOSE; + } + else if (StringUtilRt.endsWith(yytext(), blockStringToken)) { + // push back to register on next step as a BLOCK_STRING_CLOSE token, + // (we neeed it to easily implement embededed language, brace matcher and so on) + yypushback(blockStringToken.length()); + blockStringToken = null; + return BLOCK_STRING_BODY; + } } // fall through - case 55: break; + case 61: break; case 23: - { return REVERSE_ARROW; + { return LBRACKET; } // fall through - case 56: break; + case 62: break; case 24: - { return STRING; + { yybegin(YYINITIAL); return RBRACKET; } // fall through - case 57: break; + case 63: break; case 25: - { return DOUBLE_ARROW; + { return DOUBLE_HYPHEN_ARROW; } // fall through - case 58: break; + case 64: break; case 26: - { yybegin(PROPERTY_VALUE_STATE); return SIMPLE_RESERVED_KEYWORDS; + { return ARROW; } // fall through - case 59: break; + case 65: break; case 27: - { return FLOAT; + { yybegin(PROPERTY_VALUE_BEGIN_STATE); return STYLE_KEYWORDS; } // fall through - case 60: break; + case 66: break; case 28: - { return TRUE; + { return REVERSE_ARROW; } // fall through - case 61: break; + case 67: break; case 29: - { return STYLE_KEYWORD; + { return STRING; } // fall through - case 62: break; + case 68: break; case 30: - { return FALSE; + { return DOUBLE_ARROW; } // fall through - case 63: break; + case 69: break; case 31: - { return COLOR; + { yybegin(PROPERTY_VALUE_BEGIN_STATE); return SIMPLE_RESERVED_KEYWORDS; } // fall through - case 64: break; + case 70: break; case 32: - { yybegin(PROPERTY_VALUE_STATE); return CONTAINER_LESS_KEYWORDS; + { return FLOAT; } // fall through - case 65: break; + case 71: break; case 33: + { return COMPOSITE_RESERVED_KEYWORDS; + } + // fall through + case 72: break; + case 34: + { return TRUE; + } + // fall through + case 73: break; + case 35: + { return STYLE_KEYWORD; + } + // fall through + case 74: break; + case 36: + { return FALSE; + } + // fall through + case 75: break; + case 37: + { return COLOR; + } + // fall through + case 76: break; + case 38: + { yybegin(PROPERTY_VALUE_BEGIN_STATE); return CONTAINER_LESS_KEYWORDS; + } + // fall through + case 77: break; + case 39: { return RESERVED_KEYWORD_HOLDERS; } // fall through - case 66: break; + case 78: break; default: zzScanError(ZZ_NO_MATCH); } diff --git a/src/main/gen/org/jetbrains/plugins/d2/lang/D2Parser.java b/src/main/gen/org/jetbrains/plugins/d2/lang/D2Parser.java index f7b6944..8af819d 100644 --- a/src/main/gen/org/jetbrains/plugins/d2/lang/D2Parser.java +++ b/src/main/gen/org/jetbrains/plugins/d2/lang/D2Parser.java @@ -1,15 +1,15 @@ // This is a generated file. Not intended for manual editing. package org.jetbrains.plugins.d2.lang; +import com.intellij.lang.ASTNode; +import com.intellij.lang.LightPsiParser; import com.intellij.lang.PsiBuilder; import com.intellij.lang.PsiBuilder.Marker; -import static org.jetbrains.plugins.d2.lang.D2ElementTypes.*; -import static com.intellij.lang.parser.GeneratedParserUtilBase.*; -import com.intellij.psi.tree.IElementType; -import com.intellij.lang.ASTNode; -import com.intellij.psi.tree.TokenSet; import com.intellij.lang.PsiParser; -import com.intellij.lang.LightPsiParser; +import com.intellij.psi.tree.IElementType; + +import static com.intellij.lang.parser.GeneratedParserUtilBase.*; +import static org.jetbrains.plugins.d2.lang.D2ElementTypes.*; @SuppressWarnings({"SimplifiableIfStatement", "UnusedAssignment"}) public class D2Parser implements PsiParser, LightPsiParser { @@ -35,6 +35,49 @@ static boolean parse_root_(IElementType t, PsiBuilder b, int l) { return File(b, l + 1); } + /* ********************************************************** */ + // LBRACKET (PropertyValue SEMICOLON?)* RBRACKET + public static boolean Array(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Array")) return false; + if (!nextTokenIs(b, LBRACKET)) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, LBRACKET); + r = r && Array_1(b, l + 1); + r = r && consumeToken(b, RBRACKET); + exit_section_(b, m, ARRAY, r); + return r; + } + + // (PropertyValue SEMICOLON?)* + private static boolean Array_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Array_1")) return false; + while (true) { + int c = current_position_(b); + if (!Array_1_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "Array_1", c)) break; + } + return true; + } + + // PropertyValue SEMICOLON? + private static boolean Array_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Array_1_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = PropertyValue(b, l + 1); + r = r && Array_1_0_1(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + // SEMICOLON? + private static boolean Array_1_0_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Array_1_0_1")) return false; + consumeToken(b, SEMICOLON); + return true; + } + /* ********************************************************** */ // STRING | ID | INT | FLOAT | TRUE | FALSE | DOT | COLOR static boolean AttributeValue(PsiBuilder b, int l) { @@ -125,7 +168,7 @@ public static boolean Connector(PsiBuilder b, int l) { } /* ********************************************************** */ - // ShapeDeclaration | ShapeIdWithProperty | ShapeConnection | ShapeId | COMMENT | SEMICOLON + // ShapeDeclaration | ShapeIdWithProperty | ShapeConnection | ShapeId | PropertyMap| COMMENT | SEMICOLON static boolean ContainerContent(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "ContainerContent")) return false; boolean r; @@ -133,6 +176,7 @@ static boolean ContainerContent(PsiBuilder b, int l) { if (!r) r = ShapeIdWithProperty(b, l + 1); if (!r) r = ShapeConnection(b, l + 1); if (!r) r = ShapeId(b, l + 1); + if (!r) r = PropertyMap(b, l + 1); if (!r) r = consumeToken(b, COMMENT); if (!r) r = consumeToken(b, SEMICOLON); return r; @@ -197,7 +241,7 @@ public static boolean Property(PsiBuilder b, int l) { } /* ********************************************************** */ - // SIMPLE_RESERVED_KEYWORDS | (RESERVED_KEYWORD_HOLDERS DOT ID) | (STYLE_KEYWORD DOT STYLE_KEYWORDS) | CONTAINER_LESS_KEYWORDS + // SIMPLE_RESERVED_KEYWORDS | (RESERVED_KEYWORD_HOLDERS DOT ID) | (STYLE_KEYWORD DOT STYLE_KEYWORDS) | CONTAINER_LESS_KEYWORDS | STYLE_KEYWORDS public static boolean PropertyKey(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "PropertyKey")) return false; boolean r; @@ -206,6 +250,7 @@ public static boolean PropertyKey(PsiBuilder b, int l) { if (!r) r = PropertyKey_1(b, l + 1); if (!r) r = PropertyKey_2(b, l + 1); if (!r) r = consumeToken(b, CONTAINER_LESS_KEYWORDS); + if (!r) r = consumeToken(b, STYLE_KEYWORDS); exit_section_(b, l, m, r, false, null); return r; } @@ -231,7 +276,30 @@ private static boolean PropertyKey_2(PsiBuilder b, int l) { } /* ********************************************************** */ - // UnquotedStringValue | StringValue | ColorValue | OtherValue + // (COMPOSITE_RESERVED_KEYWORDS | STYLE_KEYWORD) COLON BlockDefinition + public static boolean PropertyMap(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "PropertyMap")) return false; + if (!nextTokenIs(b, "", COMPOSITE_RESERVED_KEYWORDS, STYLE_KEYWORD)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, PROPERTY_MAP, ""); + r = PropertyMap_0(b, l + 1); + r = r && consumeToken(b, COLON); + r = r && BlockDefinition(b, l + 1); + exit_section_(b, l, m, r, false, null); + return r; + } + + // COMPOSITE_RESERVED_KEYWORDS | STYLE_KEYWORD + private static boolean PropertyMap_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "PropertyMap_0")) return false; + boolean r; + r = consumeToken(b, COMPOSITE_RESERVED_KEYWORDS); + if (!r) r = consumeToken(b, STYLE_KEYWORD); + return r; + } + + /* ********************************************************** */ + // UnquotedStringValue | StringValue | ColorValue | OtherValue | Array static boolean PropertyValue(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "PropertyValue")) return false; boolean r; @@ -239,11 +307,12 @@ static boolean PropertyValue(PsiBuilder b, int l) { if (!r) r = StringValue(b, l + 1); if (!r) r = ColorValue(b, l + 1); if (!r) r = OtherValue(b, l + 1); + if (!r) r = Array(b, l + 1); return r; } /* ********************************************************** */ - // ShapeIdChain (Connector ShapeId (DOT ShapeId)*)+ (COLON (ShapeLabel | BlockString))? BlockDefinition? + // ShapeIdChain (Connector ShapeId (DOT ShapeId)*)+ (COLON (ShapeLabel | BlockString)?)? BlockDefinition? public static boolean ShapeConnection(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "ShapeConnection")) return false; if (!nextTokenIs(b, "", ID, STRING)) return false; @@ -306,14 +375,14 @@ private static boolean ShapeConnection_1_0_2_0(PsiBuilder b, int l) { return r; } - // (COLON (ShapeLabel | BlockString))? + // (COLON (ShapeLabel | BlockString)?)? private static boolean ShapeConnection_2(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "ShapeConnection_2")) return false; ShapeConnection_2_0(b, l + 1); return true; } - // COLON (ShapeLabel | BlockString) + // COLON (ShapeLabel | BlockString)? private static boolean ShapeConnection_2_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "ShapeConnection_2_0")) return false; boolean r; @@ -324,9 +393,16 @@ private static boolean ShapeConnection_2_0(PsiBuilder b, int l) { return r; } - // ShapeLabel | BlockString + // (ShapeLabel | BlockString)? private static boolean ShapeConnection_2_0_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "ShapeConnection_2_0_1")) return false; + ShapeConnection_2_0_1_0(b, l + 1); + return true; + } + + // ShapeLabel | BlockString + private static boolean ShapeConnection_2_0_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ShapeConnection_2_0_1_0")) return false; boolean r; r = ShapeLabel(b, l + 1); if (!r) r = BlockString(b, l + 1); diff --git a/src/main/kotlin/org/jetbrains/plugins/d2/editor/D2BraceMatcher.kt b/src/main/kotlin/org/jetbrains/plugins/d2/editor/D2BraceMatcher.kt index 6b7597c..7c82ac9 100644 --- a/src/main/kotlin/org/jetbrains/plugins/d2/editor/D2BraceMatcher.kt +++ b/src/main/kotlin/org/jetbrains/plugins/d2/editor/D2BraceMatcher.kt @@ -10,6 +10,7 @@ import org.jetbrains.plugins.d2.lang.psi.ShapeId private val BRACE_PAIRS = arrayOf( BracePair(D2ElementTypes.LBRACE, D2ElementTypes.RBRACE, true), + BracePair(D2ElementTypes.LBRACKET, D2ElementTypes.RBRACKET, true), BracePair(D2ElementTypes.BLOCK_STRING_OPEN, D2ElementTypes.BLOCK_STRING_CLOSE, true), ) diff --git a/src/main/kotlin/org/jetbrains/plugins/d2/editor/D2FormatterService.kt b/src/main/kotlin/org/jetbrains/plugins/d2/editor/D2FormatterService.kt index 718b8f4..bf121fb 100644 --- a/src/main/kotlin/org/jetbrains/plugins/d2/editor/D2FormatterService.kt +++ b/src/main/kotlin/org/jetbrains/plugins/d2/editor/D2FormatterService.kt @@ -1,6 +1,5 @@ package org.jetbrains.plugins.d2.editor -import com.intellij.codeInsight.codeVision.CodeVisionState import com.intellij.execution.configurations.GeneralCommandLine import com.intellij.execution.process.OSProcessHandler import com.intellij.execution.process.ProcessNotCreatedException @@ -54,7 +53,7 @@ private fun format(file: Path, request: AsyncFormattingRequest) { val params = command.parametersList params.add("fmt") Files.copy(file, result, StandardCopyOption.REPLACE_EXISTING) - params.add(CodeVisionState.NotReady.result.toString()) + params.add(result.toString()) val output = ScriptRunnerUtil.getProcessOutput( command, ScriptRunnerUtil.STDOUT_OR_STDERR_OUTPUT_KEY_FILTER, diff --git a/src/main/kotlin/org/jetbrains/plugins/d2/lang/D2Lexer.flex b/src/main/kotlin/org/jetbrains/plugins/d2/lang/D2Lexer.flex index 72bca73..2808d6c 100644 --- a/src/main/kotlin/org/jetbrains/plugins/d2/lang/D2Lexer.flex +++ b/src/main/kotlin/org/jetbrains/plugins/d2/lang/D2Lexer.flex @@ -26,11 +26,12 @@ import static org.jetbrains.plugins.d2.lang.D2ElementTypes.*; %unicode // non style/holder keywords, see SimpleReservedKeywords in d2 source code, -// `classes` is not SimpleReservedKeyword, from CompositeReservedKeywords SimpleReservedKeywords = label | desc | shape | icon | constraint | tooltip | link | near | width | height | top | left | grid-rows | grid-columns | grid-gap | vertical-gap | horizontal-gap | -class | vars | classes +class + +CompositeReservedKeywords = classes | vars StyleKeyword = style @@ -64,10 +65,17 @@ WhiteSpace=\s+ LBrace="{" RBrace="}" -UnquotedStringFragment=[^\s{}|;]+ +LBracket="[" +RBracket="]" + +UnquotedLabelStringFragment=[^\s{}|;]+ +UnquotedLabelString={UnquotedLabelStringFragment}([ \t]+{UnquotedLabelStringFragment})* + +// [] is not supported - it is array +UnquotedStringFragment=[^\s{}[]|;]+ UnquotedString={UnquotedStringFragment}([ \t]+{UnquotedStringFragment})* -%states LABEL_STATE PROPERTY_VALUE_STATE BLOCK_STRING_LANG_STATE BLOCK_STRING_BODY_STATE +%states LABEL_STATE PROPERTY_VALUE_BEGIN_STATE PROPERTY_VALUE_STATE BLOCK_STRING_LANG_STATE BLOCK_STRING_BODY_STATE ARRAY_STATE %% { @@ -77,7 +85,7 @@ UnquotedString={UnquotedStringFragment}([ \t]+{UnquotedStringFragment})* {RBrace} { return RBRACE; } "." { return DOT; } {Semicolon} { return SEMICOLON; } - ":" { yybegin(LABEL_STATE); return COLON; } + ":" { yybegin(LABEL_STATE); return COLON; } {ARROW} { return ARROW; } {REVERSE_ARROW} { return REVERSE_ARROW; } @@ -85,11 +93,12 @@ UnquotedString={UnquotedStringFragment}([ \t]+{UnquotedStringFragment})* {DOUBLE_ARROW} { return DOUBLE_ARROW; } {Comment} { return COMMENT; } - {SimpleReservedKeywords} { yybegin(PROPERTY_VALUE_STATE); return SIMPLE_RESERVED_KEYWORDS; } + {CompositeReservedKeywords} { return COMPOSITE_RESERVED_KEYWORDS; } + {SimpleReservedKeywords} { yybegin(PROPERTY_VALUE_BEGIN_STATE); return SIMPLE_RESERVED_KEYWORDS; } {ReservedKeywordHolders} { return RESERVED_KEYWORD_HOLDERS; } {StyleKeyword} { return STYLE_KEYWORD; } - {StyleKeywords} { yybegin(PROPERTY_VALUE_STATE); return STYLE_KEYWORDS; } - {ContainerLessKeywords} { yybegin(PROPERTY_VALUE_STATE); return CONTAINER_LESS_KEYWORDS; } + {StyleKeywords} { yybegin(PROPERTY_VALUE_BEGIN_STATE); return STYLE_KEYWORDS; } + {ContainerLessKeywords} { yybegin(PROPERTY_VALUE_BEGIN_STATE); return CONTAINER_LESS_KEYWORDS; } {Id} { return ID; } @@ -98,6 +107,11 @@ UnquotedString={UnquotedStringFragment}([ \t]+{UnquotedStringFragment})* {Color} { return COLOR; } } + { + ":" { yybegin(PROPERTY_VALUE_STATE); return COLON; } + {WhiteSpace} { return WHITE_SPACE; } +} + // block string is not allowed for property value { ":" { return COLON; } @@ -108,8 +122,9 @@ UnquotedString={UnquotedStringFragment}([ \t]+{UnquotedStringFragment})* "false" { return FALSE; } {Color} { return COLOR; } {String} { return STRING; } - // unquoted string - opposite to LABEL_STATE, `:` is not allowed (otherwise, we match `:` as UNQUOTED_STRING instead of COLON) - [^\s{}|:;]+([ \t]+[^\s{}|:;]+)* { return UNQUOTED_STRING; } + {LBracket} { yybegin(ARRAY_STATE); return LBRACKET; } + {RBracket} { return RBRACKET; } + {UnquotedString} { return UNQUOTED_STRING; } [ \t]+ { return WHITE_SPACE; } [\r\n]+ { yybegin(YYINITIAL); return WHITE_SPACE; } @@ -119,6 +134,16 @@ UnquotedString={UnquotedStringFragment}([ \t]+{UnquotedStringFragment})* {RBrace} { yybegin(YYINITIAL); return RBRACE; } } + { + {Semicolon} { return SEMICOLON; } + // D2 supports nested arrays, but we don't for now (nested states are nnot supported, can be implemented, but not clear yet for what) + {LBracket} { return LBRACKET; } + {RBracket} { yybegin(YYINITIAL); return RBRACKET; } + {UnquotedString} { return UNQUOTED_STRING; } + + {WhiteSpace} { return WHITE_SPACE; } +} + { // docs: D2 actually allows you to use any special symbols (not alphanumeric, space, or _) after the first pipe \|+[^a-zA-Z0-9\s_|]* { @@ -128,7 +153,7 @@ UnquotedString={UnquotedStringFragment}([ \t]+{UnquotedStringFragment})* } {String} { return STRING; } - {UnquotedString} { return UNQUOTED_STRING; } + {UnquotedLabelString} { return UNQUOTED_STRING; } [ \t]+ { return WHITE_SPACE; } [\r\n]+ { yybegin(YYINITIAL); return WHITE_SPACE; } {LBrace} { yybegin(YYINITIAL); return LBRACE; } @@ -148,19 +173,19 @@ UnquotedString={UnquotedStringFragment}([ \t]+{UnquotedStringFragment})* // so, we can be sure that lexing will be never performed in the middle of block string (always from BLOCK_STRING_OPEN) { [^|]*\|+ { - if (blockStringToken == null) { - yybegin(YYINITIAL); - blockStringToken = null; - return BLOCK_STRING_CLOSE; - } - else if (StringUtilRt.endsWith(yytext(), blockStringToken)) { - // push back to register on next step as a BLOCK_STRING_CLOSE token, - // (we neeed it to easily implement embededed language, brace matcher and so on) - yypushback(blockStringToken.length()); - blockStringToken = null; - return BLOCK_STRING_BODY; - } - } + if (blockStringToken == null) { + yybegin(YYINITIAL); + blockStringToken = null; + return BLOCK_STRING_CLOSE; + } + else if (StringUtilRt.endsWith(yytext(), blockStringToken)) { + // push back to register on next step as a BLOCK_STRING_CLOSE token, + // (we neeed it to easily implement embededed language, brace matcher and so on) + yypushback(blockStringToken.length()); + blockStringToken = null; + return BLOCK_STRING_BODY; + } +} <> { yybegin(YYINITIAL); return BAD_CHARACTER; } } diff --git a/src/main/kotlin/org/jetbrains/plugins/d2/lang/D2ParserDefinition.kt b/src/main/kotlin/org/jetbrains/plugins/d2/lang/D2ParserDefinition.kt index 7c2a3a2..c072ce9 100644 --- a/src/main/kotlin/org/jetbrains/plugins/d2/lang/D2ParserDefinition.kt +++ b/src/main/kotlin/org/jetbrains/plugins/d2/lang/D2ParserDefinition.kt @@ -32,6 +32,8 @@ class D2ParserDefinition : ParserDefinition { CONNECTOR -> Connector(node) PROPERTY -> Property(node) PROPERTY_KEY -> PropertyKey(node) + PROPERTY_MAP -> PropertyMap(node) + ARRAY -> D2Array(node) SHAPE_DECLARATION -> ShapeDeclaration(node) SHAPE_CONNECTION -> ShapeConnection(node) diff --git a/src/main/kotlin/org/jetbrains/plugins/d2/lang/d2.bnf b/src/main/kotlin/org/jetbrains/plugins/d2/lang/d2.bnf index dddbe63..360173e 100644 --- a/src/main/kotlin/org/jetbrains/plugins/d2/lang/d2.bnf +++ b/src/main/kotlin/org/jetbrains/plugins/d2/lang/d2.bnf @@ -20,7 +20,7 @@ File ::= !<> ContainerContent* -private ContainerContent ::= ShapeDeclaration | ShapeIdWithProperty | ShapeConnection | ShapeId | COMMENT | SEMICOLON +private ContainerContent ::= ShapeDeclaration | ShapeIdWithProperty | ShapeConnection | ShapeId | PropertyMap| COMMENT | SEMICOLON // same as for file level, but Property is allowed without ShapeIdChain BlockDefinition ::= LBRACE ContainerContent* RBRACE { @@ -32,7 +32,9 @@ private ShapeIdChain ::= ShapeId (DOT ShapeId)* // declaration means `id + label` (not implicit shape via just ID) ShapeDeclaration ::= ShapeIdChain COLON (ShapeLabel | BlockString)? BlockDefinition? -ShapeConnection ::= ShapeIdChain (Connector ShapeId (DOT ShapeId)*)+ (COLON (ShapeLabel | BlockString))? BlockDefinition? +PropertyMap ::= (COMPOSITE_RESERVED_KEYWORDS | STYLE_KEYWORD) COLON BlockDefinition + +ShapeConnection ::= ShapeIdChain (Connector ShapeId (DOT ShapeId)*)+ (COLON (ShapeLabel | BlockString)?)? BlockDefinition? // logs.style.strokes: "#f4a261" private ShapeIdWithProperty ::= (ShapeIdChain DOT)? Property @@ -50,9 +52,12 @@ StringValue ::= STRING ColorValue ::= COLOR OtherValue ::= AttributeValue | BlockString +// STYLE_KEYWORDS are not allowed, but we parse it (report error as inspection - it is allowed if our parent is "style") // todo: handle RESERVED_KEYWORD_HOLDERS in the same way as style (do not allow arbitrary ID) -PropertyKey ::= SIMPLE_RESERVED_KEYWORDS | (RESERVED_KEYWORD_HOLDERS DOT ID) | (STYLE_KEYWORD DOT STYLE_KEYWORDS) | CONTAINER_LESS_KEYWORDS -private PropertyValue ::= UnquotedStringValue | StringValue | ColorValue | OtherValue +PropertyKey ::= SIMPLE_RESERVED_KEYWORDS | (RESERVED_KEYWORD_HOLDERS DOT ID) | (STYLE_KEYWORD DOT STYLE_KEYWORDS) | CONTAINER_LESS_KEYWORDS | STYLE_KEYWORDS +private PropertyValue ::= UnquotedStringValue | StringValue | ColorValue | OtherValue | Array + +Array ::= LBRACKET (PropertyValue SEMICOLON?)* RBRACKET Property ::= PropertyKey COLON PropertyValue diff --git a/src/main/kotlin/org/jetbrains/plugins/d2/lang/highlighter.kt b/src/main/kotlin/org/jetbrains/plugins/d2/lang/highlighter.kt index 66e4b1b..9b1ed91 100644 --- a/src/main/kotlin/org/jetbrains/plugins/d2/lang/highlighter.kt +++ b/src/main/kotlin/org/jetbrains/plugins/d2/lang/highlighter.kt @@ -60,6 +60,9 @@ class D2SyntaxHighlighter : SyntaxHighlighterBase() { put(D2ElementTypes.LBRACE, BRACES) put(D2ElementTypes.RBRACE, BRACES) + put(D2ElementTypes.LBRACKET, BRACES) + put(D2ElementTypes.RBRACKET, BRACES) + put(D2ElementTypes.BLOCK_STRING_OPEN, BLOCK_STRING_MARKER) put(D2ElementTypes.BLOCK_STRING_CLOSE, BLOCK_STRING_MARKER) put(D2ElementTypes.BLOCK_STRING_LANG, IDENTIFIERS) diff --git a/src/main/kotlin/org/jetbrains/plugins/d2/lang/psi/Property.kt b/src/main/kotlin/org/jetbrains/plugins/d2/lang/psi/Property.kt index ca2a230..d0aff2e 100644 --- a/src/main/kotlin/org/jetbrains/plugins/d2/lang/psi/Property.kt +++ b/src/main/kotlin/org/jetbrains/plugins/d2/lang/psi/Property.kt @@ -12,6 +12,10 @@ class Property(node: ASTNode) : ASTWrapperPsiElement(node) class PropertyKey(node: ASTNode) : ASTWrapperPsiElement(node) +class PropertyMap(node: ASTNode) : ASTWrapperPsiElement(node) + +class D2Array(node: ASTNode) : ASTWrapperPsiElement(node) + sealed interface PropertyValue : PsiElement class OtherValue(node: ASTNode) : ASTWrapperPsiElement(node), PropertyValue diff --git a/src/main/kotlin/org/jetbrains/plugins/d2/lang/psi/ShapeId.kt b/src/main/kotlin/org/jetbrains/plugins/d2/lang/psi/ShapeId.kt index 85610f9..654121d 100644 --- a/src/main/kotlin/org/jetbrains/plugins/d2/lang/psi/ShapeId.kt +++ b/src/main/kotlin/org/jetbrains/plugins/d2/lang/psi/ShapeId.kt @@ -14,10 +14,6 @@ import com.intellij.psi.util.elementType import org.jetbrains.plugins.d2.lang.D2ElementTypes internal class ShapeDeclaration(node: ASTNode) : ASTWrapperPsiElement(node) { - //override fun getName(): String? { - // return findId()?.name - //} - fun findId(): ShapeId? { var child: PsiElement? = firstChild var id: ShapeId? = null @@ -33,10 +29,6 @@ internal class ShapeDeclaration(node: ASTNode) : ASTWrapperPsiElement(node) { } return id } - - //override fun getNameIdentifier(): PsiElement? = findId()?.getNameIdentifier() - - //override fun setName(name: String): PsiElement? = findId()?.setName(name) } internal class ShapeId(node: ASTNode) : ASTWrapperPsiElement(node), PsiNamedElement { @@ -64,8 +56,6 @@ internal class ShapeId(node: ASTNode) : ASTWrapperPsiElement(node), PsiNamedElem } } - //fun getNameIdentifier(): PsiElement? = firstChild - override fun setName(name: String): PsiElement? { val child = firstChild ?: return null val project = child.project @@ -89,7 +79,7 @@ private class ShapePsiReference(private val reference: ShapeId) : PsiReference { // todo FQN override fun resolve(): PsiElement? { var lastCandidate: ShapeId? = null - for (element in reference.containingFile.descendants()) { + for (element in reference.containingFile.descendants(canGoInside = { it !is PropertyMap && it !is D2Array })) { if (element is ShapeDeclaration) { val shapeId = element.findId() if (shapeId != null && compare(shapeId, reference)) { diff --git a/src/test/kotlin/org/jetbrains/plugins/d2/D2ParsingTest.kt b/src/test/kotlin/org/jetbrains/plugins/d2/D2ParsingTest.kt index 62a2c0c..e849258 100644 --- a/src/test/kotlin/org/jetbrains/plugins/d2/D2ParsingTest.kt +++ b/src/test/kotlin/org/jetbrains/plugins/d2/D2ParsingTest.kt @@ -8,46 +8,81 @@ class D2ParsingTest : D2ParsingTestCase() { test() } + @Test + fun `style object`() { + test(""" + x -> y: { + style: { + stroke-dash: 10 + } + } + x.style.stroke-dash: 3 + """) + } + + @Test + fun `classes and array`() { + test(""" +classes: { + x: "qweqwr" + "324:": { + label: "" + icon: https://play.d2lang.com/assets/icons/d2-logo.svg + } + sphere: { + shape: circle + style.stroke-width: 0 + } +} + +logo.class: [ + 324: + "sphere" +] + """) + } + + @Test fun `just id`() { test(""" s - """.trimIndent()) + """) } @Test fun `top-level direction`() { test(""" direction: down - """.trimIndent()) + """) } @Test fun `label with dot`() { test(""" s: 1.2 - """.trimIndent()) + """) } @Test fun `id with spaces`() { test(""" logs foo bar -> logs - """.trimIndent()) + """) } @Test fun `id with spaces and dash`() { test(""" logs-foo bar - dash -> logs - """.trimIndent()) + """) } @Test fun idAndReservedKeyword() { test(""" logs.style.stroke: "#694024" - """.trimIndent()) + """) } @Test @@ -60,7 +95,7 @@ class D2ParsingTest : D2ParsingTestCase() { And other normal markdown stuff | - """.trimIndent()) + """) } @Test @@ -73,7 +108,7 @@ class D2ParsingTest : D2ParsingTestCase() { And other normal markdown stuff || - """.trimIndent()) + """) } @Test @@ -84,6 +119,6 @@ class D2ParsingTest : D2ParsingTestCase() { declare function getSmallPet(): Fish | Bird; const works = (a > 1) || (b < 2) `| - """.trimIndent()) + """) } } \ No newline at end of file diff --git a/src/test/kotlin/org/jetbrains/plugins/d2/D2ParsingTestCase.kt b/src/test/kotlin/org/jetbrains/plugins/d2/D2ParsingTestCase.kt index 58561ae..5fd7093 100644 --- a/src/test/kotlin/org/jetbrains/plugins/d2/D2ParsingTestCase.kt +++ b/src/test/kotlin/org/jetbrains/plugins/d2/D2ParsingTestCase.kt @@ -3,6 +3,7 @@ package org.jetbrains.plugins.d2 import com.intellij.testFramework.ParsingTestCase import com.intellij.testFramework.rules.TestNameExtension import com.intellij.testFramework.runInEdtAndWait +import org.intellij.lang.annotations.Language import org.intellij.plugins.markdown.lang.parser.MarkdownParserDefinition import org.jetbrains.plugins.d2.lang.D2ParserDefinition import org.junit.jupiter.api.extension.AfterEachCallback @@ -11,10 +12,6 @@ import org.junit.jupiter.api.extension.ExtensionContext import org.junit.jupiter.api.extension.RegisterExtension abstract class D2ParsingTestCase() { - init { -// System.setProperty("idea.tests.overwrite.data", "true") - } - @RegisterExtension protected val testNameRule: TestNameExtension = TestNameExtension() @@ -61,7 +58,7 @@ abstract class D2ParsingTestCase() { } } - fun test(text: String? = null) { - testCase.test(text) + fun test(@Language("D2") text: String? = null) { + testCase.test(text?.trimIndent()) } } \ No newline at end of file diff --git a/src/test/resources/psi/classes and array.txt b/src/test/resources/psi/classes and array.txt new file mode 100644 index 0000000..b2130b0 --- /dev/null +++ b/src/test/resources/psi/classes and array.txt @@ -0,0 +1,94 @@ +D2 File + PropertyMap(PROPERTY_MAP) + PsiElement(COMPOSITE_RESERVED_KEYWORDS)('classes') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + BlockDefinition(BLOCK_DEFINITION) + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + ShapeDeclaration(SHAPE_DECLARATION) + ShapeId(SHAPE_ID) + PsiElement(ID)('x') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + PsiElement(STRING)('"qweqwr"') + PsiWhiteSpace('\n') + PsiWhiteSpace(' ') + ShapeDeclaration(SHAPE_DECLARATION) + ShapeId(SHAPE_ID) + PsiElement(STRING)('"324:"') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + BlockDefinition(BLOCK_DEFINITION) + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + Property(PROPERTY) + PropertyKey(PROPERTY_KEY) + PsiElement(SIMPLE_RESERVED_KEYWORDS)('label') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + StringValue(STRING_VALUE) + PsiElement(STRING)('""') + PsiWhiteSpace('\n') + PsiWhiteSpace(' ') + Property(PROPERTY) + PropertyKey(PROPERTY_KEY) + PsiElement(SIMPLE_RESERVED_KEYWORDS)('icon') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + UnquotedStringValue(UNQUOTED_STRING_VALUE) + PsiElement(UNQUOTED_STRING)('https://play.d2lang.com/assets/icons/d2-logo.svg') + PsiWhiteSpace('\n') + PsiWhiteSpace(' ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n ') + ShapeDeclaration(SHAPE_DECLARATION) + ShapeId(SHAPE_ID) + PsiElement(ID)('sphere') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + BlockDefinition(BLOCK_DEFINITION) + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + Property(PROPERTY) + PropertyKey(PROPERTY_KEY) + PsiElement(SIMPLE_RESERVED_KEYWORDS)('shape') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + UnquotedStringValue(UNQUOTED_STRING_VALUE) + PsiElement(UNQUOTED_STRING)('circle') + PsiWhiteSpace('\n') + PsiWhiteSpace(' ') + Property(PROPERTY) + PropertyKey(PROPERTY_KEY) + PsiElement(STYLE_KEYWORD)('style') + PsiElement(DOT)('.') + PsiElement(STYLE_KEYWORDS)('stroke-width') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + OtherValue(OTHER_VALUE) + PsiElement(INT)('0') + PsiWhiteSpace('\n') + PsiWhiteSpace(' ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n') + ShapeId(SHAPE_ID) + PsiElement(ID)('logo') + PsiElement(DOT)('.') + Property(PROPERTY) + PropertyKey(PROPERTY_KEY) + PsiElement(SIMPLE_RESERVED_KEYWORDS)('class') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + D2Array(ARRAY) + PsiElement(LBRACKET)('[') + PsiWhiteSpace('\n ') + UnquotedStringValue(UNQUOTED_STRING_VALUE) + PsiElement(UNQUOTED_STRING)('324:') + PsiWhiteSpace('\n ') + UnquotedStringValue(UNQUOTED_STRING_VALUE) + PsiElement(UNQUOTED_STRING)('"sphere"') + PsiWhiteSpace('\n') + PsiElement(RBRACKET)(']') \ No newline at end of file diff --git a/src/test/resources/psi/style object.txt b/src/test/resources/psi/style object.txt new file mode 100644 index 0000000..7458662 --- /dev/null +++ b/src/test/resources/psi/style object.txt @@ -0,0 +1,47 @@ +D2 File + ShapeConnection(SHAPE_CONNECTION) + ShapeId(SHAPE_ID) + PsiElement(ID)('x') + PsiWhiteSpace(' ') + Connector(CONNECTOR) + PsiElement(ARROW)('->') + PsiWhiteSpace(' ') + ShapeId(SHAPE_ID) + PsiElement(ID)('y') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + BlockDefinition(BLOCK_DEFINITION) + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + PropertyMap(PROPERTY_MAP) + PsiElement(STYLE_KEYWORD)('style') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + BlockDefinition(BLOCK_DEFINITION) + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + Property(PROPERTY) + PropertyKey(PROPERTY_KEY) + PsiElement(STYLE_KEYWORDS)('stroke-dash') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + OtherValue(OTHER_VALUE) + PsiElement(INT)('10') + PsiWhiteSpace('\n') + PsiWhiteSpace(' ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n') + ShapeId(SHAPE_ID) + PsiElement(ID)('x') + PsiElement(DOT)('.') + Property(PROPERTY) + PropertyKey(PROPERTY_KEY) + PsiElement(STYLE_KEYWORD)('style') + PsiElement(DOT)('.') + PsiElement(STYLE_KEYWORDS)('stroke-dash') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + OtherValue(OTHER_VALUE) + PsiElement(INT)('3') \ No newline at end of file