From 3a73a96e0695791cb016966e37ef4011b861b521 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Wed, 21 Mar 2012 15:51:48 +0100 Subject: [PATCH] KT-482 Support nested comments: comments nest properly, but strings are not accounted for inside comments #KT-482 In progress --- compiler/frontend/buildLexer.xml | 8 + .../src/org/jetbrains/jet/lexer/Jet.flex | 73 +- .../org/jetbrains/jet/lexer/_JetLexer.java | 1052 +++++++++-------- .../psi/BlockCommentAtBeginningOfFile1.jet | 1 + .../psi/BlockCommentAtBeginningOfFile1.txt | 4 + .../psi/BlockCommentAtBeginningOfFile2.jet | 2 + .../psi/BlockCommentAtBeginningOfFile2.txt | 4 + .../psi/BlockCommentAtBeginningOfFile3.jet | 3 + .../psi/BlockCommentAtBeginningOfFile3.txt | 4 + .../psi/BlockCommentAtBeginningOfFile4.jet | 5 + .../psi/BlockCommentAtBeginningOfFile4.txt | 4 + .../psi/DocCommentAtBeginningOfFile1.jet | 1 + .../psi/DocCommentAtBeginningOfFile1.txt | 4 + .../psi/DocCommentAtBeginningOfFile2.jet | 2 + .../psi/DocCommentAtBeginningOfFile2.txt | 4 + .../psi/DocCommentAtBeginningOfFile3.jet | 3 + .../psi/DocCommentAtBeginningOfFile3.txt | 4 + .../psi/DocCommentAtBeginningOfFile4.jet | 5 + .../psi/DocCommentAtBeginningOfFile4.txt | 4 + compiler/testData/psi/NestedComments.jet | 19 + compiler/testData/psi/NestedComments.txt | 34 + 21 files changed, 749 insertions(+), 491 deletions(-) create mode 100644 compiler/testData/psi/BlockCommentAtBeginningOfFile1.jet create mode 100644 compiler/testData/psi/BlockCommentAtBeginningOfFile1.txt create mode 100644 compiler/testData/psi/BlockCommentAtBeginningOfFile2.jet create mode 100644 compiler/testData/psi/BlockCommentAtBeginningOfFile2.txt create mode 100644 compiler/testData/psi/BlockCommentAtBeginningOfFile3.jet create mode 100644 compiler/testData/psi/BlockCommentAtBeginningOfFile3.txt create mode 100644 compiler/testData/psi/BlockCommentAtBeginningOfFile4.jet create mode 100644 compiler/testData/psi/BlockCommentAtBeginningOfFile4.txt create mode 100644 compiler/testData/psi/DocCommentAtBeginningOfFile1.jet create mode 100644 compiler/testData/psi/DocCommentAtBeginningOfFile1.txt create mode 100644 compiler/testData/psi/DocCommentAtBeginningOfFile2.jet create mode 100644 compiler/testData/psi/DocCommentAtBeginningOfFile2.txt create mode 100644 compiler/testData/psi/DocCommentAtBeginningOfFile3.jet create mode 100644 compiler/testData/psi/DocCommentAtBeginningOfFile3.txt create mode 100644 compiler/testData/psi/DocCommentAtBeginningOfFile4.jet create mode 100644 compiler/testData/psi/DocCommentAtBeginningOfFile4.txt create mode 100644 compiler/testData/psi/NestedComments.jet create mode 100644 compiler/testData/psi/NestedComments.txt diff --git a/compiler/frontend/buildLexer.xml b/compiler/frontend/buildLexer.xml index 3d16ff1da25..f39f99d46cd 100644 --- a/compiler/frontend/buildLexer.xml +++ b/compiler/frontend/buildLexer.xml @@ -1,5 +1,13 @@ + diff --git a/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex b/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex index 9efa6ad3bdc..47b556c9af2 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex +++ b/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex @@ -22,11 +22,19 @@ import org.jetbrains.jet.lexer.JetTokens; this.state = state; this.lBraceCount = lBraceCount; } + + @Override + public String toString() { + return "yystate = " + state + (lBraceCount == 0 ? "" : "lBraceCount = " + lBraceCount); + } } private final Stack states = new Stack(); private int lBraceCount; + private int commentStart; + private int commentDepth; + private void pushState(int state) { states.push(new State(yystate(), lBraceCount)); lBraceCount = 0; @@ -38,14 +46,26 @@ import org.jetbrains.jet.lexer.JetTokens; lBraceCount = state.lBraceCount; yybegin(state.state); } + + private IElementType commentStateToTokenType(int state) { + switch (state) { + case BLOCK_COMMENT: + return JetTokens.BLOCK_COMMENT; + case DOC_COMMENT: + return JetTokens.DOC_COMMENT; + default: + throw new IllegalArgumentException("Unexpected state: " + state); + } + } %} %function advance %type IElementType -%eof{ return; +%eof{ + return; %eof} -%xstate STRING RAW_STRING SHORT_TEMPLATE_ENTRY +%xstate STRING RAW_STRING SHORT_TEMPLATE_ENTRY BLOCK_COMMENT DOC_COMMENT %state LONG_TEMPLATE_ENTRY DIGIT=[0-9] @@ -63,10 +83,6 @@ IDENTIFIER = {PLAIN_IDENTIFIER}|{ESCAPED_IDENTIFIER} FIELD_IDENTIFIER = \${IDENTIFIER} LABEL_IDENTIFIER = \@{IDENTIFIER} -BLOCK_COMMENT=("/*"[^"*"]{COMMENT_TAIL})|"/*" -// TODO: Wiki markup for doc comments? -DOC_COMMENT="/*""*"+("/"|([^"/""*"]{COMMENT_TAIL}))? -COMMENT_TAIL=([^"*"]*("*"+[^"*""/"])?)*("*"+"/")? EOL_COMMENT="/""/"[^\n]* INTEGER_LITERAL={DECIMAL_INTEGER_LITERAL}|{HEX_INTEGER_LITERAL}|{BIN_INTEGER_LITERAL} @@ -146,10 +162,48 @@ LONG_TEMPLATE_ENTRY_END=\} return JetTokens.RBRACE; } -// Mere mortals +// (Nested) comments -{BLOCK_COMMENT} { return JetTokens.BLOCK_COMMENT; } -{DOC_COMMENT} { return JetTokens.DOC_COMMENT; } +"/**" { + pushState(DOC_COMMENT); + commentDepth = 0; + commentStart = getTokenStart(); +} + +"/*" { + pushState(BLOCK_COMMENT); + commentDepth = 0; + commentStart = getTokenStart(); +} + + { + "/*" { + commentDepth++; + } + + <> { + int state = yystate(); + popState(); + zzStartRead = commentStart; + return commentStateToTokenType(state); + } + + "*/" { + if (commentDepth > 0) { + commentDepth--; + } + else { + int state = yystate(); + popState(); + zzStartRead = commentStart; + return commentStateToTokenType(state); + } + } + + .|{WHITE_SPACE_CHAR} {} +} + +// Mere mortals ({WHITE_SPACE_CHAR})+ { return JetTokens.WHITE_SPACE; } @@ -162,7 +216,6 @@ LONG_TEMPLATE_ENTRY_END=\} {HEX_DOUBLE_LITERAL} { return JetTokens.FLOAT_LITERAL; } {CHARACTER_LITERAL} { return JetTokens.CHARACTER_LITERAL; } -//{STRING_LITERAL} { return JetTokens.STRING_LITERAL; } "continue" { return JetTokens.CONTINUE_KEYWORD ;} "package" { return JetTokens.PACKAGE_KEYWORD ;} diff --git a/compiler/frontend/src/org/jetbrains/jet/lexer/_JetLexer.java b/compiler/frontend/src/org/jetbrains/jet/lexer/_JetLexer.java index 16e71556c44..b73cfa28121 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lexer/_JetLexer.java +++ b/compiler/frontend/src/org/jetbrains/jet/lexer/_JetLexer.java @@ -1,19 +1,18 @@ -/* The following code was generated by JFlex 1.4.3 on 2/24/12 1:22 PM */ +/* The following code was generated by JFlex 1.4.3 on 3/21/12 3:48 PM */ package org.jetbrains.jet.lexer; -import java.util.*; -import com.intellij.lexer.*; -import com.intellij.psi.*; +import com.intellij.lexer.FlexLexer; +import com.intellij.psi.TokenType; import com.intellij.psi.tree.IElementType; -import org.jetbrains.jet.lexer.JetTokens; +import java.util.Stack; /** * This class is a scanner generated by * JFlex 1.4.3 - * on 2/24/12 1:22 PM from the specification file + * on 3/21/12 3:48 PM from the specification file * /Users/abreslav/work/jet/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex */ class _JetLexer implements FlexLexer { @@ -22,8 +21,10 @@ class _JetLexer implements FlexLexer { /** lexical states */ public static final int STRING = 2; + public static final int BLOCK_COMMENT = 8; public static final int YYINITIAL = 0; - public static final int LONG_TEMPLATE_ENTRY = 8; + public static final int LONG_TEMPLATE_ENTRY = 12; + public static final int DOC_COMMENT = 10; public static final int RAW_STRING = 4; public static final int SHORT_TEMPLATE_ENTRY = 6; @@ -34,21 +35,21 @@ class _JetLexer 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, 4, 4, 5, 5 }; /** * Translates characters to character classes */ private static final String ZZ_CMAP_PACKED = - "\11\0\1\3\1\7\1\0\1\3\23\0\1\3\1\57\1\25\1\61"+ - "\1\10\1\70\1\66\1\23\1\73\1\74\1\13\1\65\1\77\1\21"+ - "\1\17\1\12\1\14\11\1\1\75\1\76\1\60\1\63\1\62\1\64"+ - "\1\11\1\2\1\16\2\2\1\20\1\2\11\4\1\22\3\4\1\54"+ - "\3\4\1\15\2\4\1\71\1\24\1\72\1\0\1\4\1\6\1\42"+ - "\1\46\1\35\1\56\1\40\1\52\1\44\1\32\1\33\1\47\1\43"+ - "\1\51\1\4\1\37\1\36\1\41\1\4\1\45\1\34\1\31\1\26"+ - "\1\55\1\50\1\15\1\53\1\4\1\27\1\67\1\30\54\0\1\4"+ + "\11\0\1\3\1\7\1\0\1\3\23\0\1\3\1\57\1\24\1\61"+ + "\1\10\1\70\1\66\1\22\1\73\1\74\1\34\1\65\1\77\1\20"+ + "\1\16\1\12\1\13\11\1\1\75\1\76\1\60\1\63\1\62\1\64"+ + "\1\11\1\2\1\15\2\2\1\17\1\2\11\4\1\21\3\4\1\54"+ + "\3\4\1\14\2\4\1\71\1\23\1\72\1\0\1\4\1\6\1\42"+ + "\1\46\1\35\1\56\1\40\1\52\1\44\1\31\1\32\1\47\1\43"+ + "\1\51\1\4\1\37\1\36\1\41\1\4\1\45\1\33\1\30\1\25"+ + "\1\55\1\50\1\14\1\53\1\4\1\26\1\67\1\27\54\0\1\4"+ "\12\0\1\4\4\0\1\4\5\0\27\4\1\0\37\4\1\0\u013f\4"+ "\31\0\162\4\4\0\14\4\16\0\5\4\11\0\1\4\213\0\1\4"+ "\13\0\1\4\1\0\3\4\1\0\1\4\1\0\24\4\1\0\54\4"+ @@ -120,26 +121,26 @@ class _JetLexer implements FlexLexer { private static final int [] ZZ_ACTION = zzUnpackAction(); private static final String ZZ_ACTION_PACKED_0 = - "\5\0\1\1\1\2\1\3\1\4\2\1\1\5\1\6"+ - "\1\7\1\2\1\10\1\11\1\12\1\13\1\14\1\15"+ - "\20\3\1\16\1\17\1\20\1\21\1\22\1\23\1\24"+ - "\2\1\1\25\1\26\1\27\1\30\1\31\1\32\1\33"+ - "\1\34\1\35\1\36\1\35\1\0\1\37\2\35\1\40"+ - "\1\0\1\40\1\41\1\42\1\0\1\43\1\0\1\44"+ - "\1\0\1\45\1\0\1\46\1\47\1\50\1\51\1\52"+ - "\1\43\2\2\1\43\1\53\1\54\1\55\1\56\2\12"+ - "\1\0\3\3\1\57\1\60\1\61\7\3\1\62\10\3"+ - "\1\63\1\0\1\64\1\0\1\65\1\0\1\66\1\67"+ - "\1\70\1\71\1\72\1\73\1\74\1\75\1\76\1\0"+ - "\1\77\2\100\2\0\1\40\1\101\1\43\1\3\2\0"+ - "\1\50\1\102\4\0\1\103\4\3\1\104\10\3\1\105"+ - "\4\3\1\106\1\107\2\3\1\110\1\111\1\112\1\113"+ - "\1\114\1\115\1\116\1\117\2\0\2\40\1\44\1\45"+ - "\1\0\2\102\1\43\1\0\1\120\1\3\1\121\1\3"+ - "\1\122\4\3\1\123\1\124\4\3\1\125\1\3\1\126"+ - "\1\127\1\76\1\0\1\130\1\50\1\0\1\131\1\132"+ - "\1\133\1\3\1\134\3\3\1\135\1\136\1\137\1\0"+ - "\1\3\1\140\1\3\1\141\1\3\1\142\1\143"; + "\6\0\1\1\1\2\1\3\1\4\2\1\1\5\1\6"+ + "\1\2\1\7\1\10\1\11\1\12\1\13\1\14\3\3"+ + "\1\15\15\3\1\16\1\17\1\20\1\21\1\22\1\23"+ + "\1\24\2\1\1\25\1\26\1\27\1\30\1\31\1\32"+ + "\1\33\1\34\1\35\1\36\1\35\1\0\1\37\2\35"+ + "\1\40\1\0\1\40\3\41\1\42\1\43\1\0\1\44"+ + "\1\0\1\45\1\0\1\46\1\0\1\47\1\50\1\51"+ + "\1\52\1\44\2\2\1\44\1\53\1\54\1\55\1\56"+ + "\2\11\1\0\3\3\1\57\1\60\1\61\1\3\1\62"+ + "\6\3\1\63\10\3\1\64\1\0\1\65\1\0\1\66"+ + "\1\0\1\67\1\70\1\71\1\72\1\73\1\74\1\75"+ + "\1\76\1\77\1\0\1\100\2\101\2\0\1\40\1\102"+ + "\1\103\1\104\1\44\1\3\2\0\1\105\4\0\1\106"+ + "\4\3\1\107\10\3\1\110\4\3\1\111\1\112\2\3"+ + "\1\113\1\114\1\115\1\116\1\117\1\120\1\121\1\122"+ + "\2\0\2\40\1\45\1\46\1\44\1\0\1\123\1\3"+ + "\1\124\1\3\1\125\4\3\1\126\1\127\4\3\1\130"+ + "\1\3\1\131\1\132\1\77\1\0\1\133\1\134\1\135"+ + "\1\136\1\3\1\137\3\3\1\140\1\141\1\142\1\0"+ + "\1\3\1\143\1\3\1\144\1\3\1\145\1\146"; private static int [] zzUnpackAction() { int [] result = new int[229]; @@ -169,33 +170,33 @@ class _JetLexer implements FlexLexer { private static final String ZZ_ROWMAP_PACKED_0 = "\0\0\0\100\0\200\0\300\0\u0100\0\u0140\0\u0180\0\u01c0"+ "\0\u0200\0\u0240\0\u0280\0\u02c0\0\u0300\0\u0340\0\u0380\0\u03c0"+ - "\0\u0400\0\u0440\0\u0480\0\u0140\0\u0140\0\u04c0\0\u0500\0\u0540"+ + "\0\u0400\0\u0440\0\u0480\0\u0180\0\u0180\0\u04c0\0\u0500\0\u0540"+ "\0\u0580\0\u05c0\0\u0600\0\u0640\0\u0680\0\u06c0\0\u0700\0\u0740"+ - "\0\u0780\0\u07c0\0\u0800\0\u0840\0\u0880\0\u08c0\0\u0900\0\u0140"+ - "\0\u0940\0\u0980\0\u0140\0\u09c0\0\u0a00\0\u0a40\0\u0a80\0\u0140"+ - "\0\u0140\0\u0140\0\u0140\0\u0140\0\u0140\0\u0140\0\u0ac0\0\u0140"+ - "\0\u0b00\0\u0b40\0\u0140\0\u0140\0\u0b80\0\u0bc0\0\u0c00\0\u0c40"+ - "\0\u0140\0\u0140\0\u0c80\0\u0cc0\0\u0d00\0\u0d40\0\u0d80\0\u0dc0"+ - "\0\u0e00\0\u0140\0\u0e40\0\u0e80\0\u0140\0\u0140\0\u0ec0\0\u0f00"+ - "\0\u0f40\0\u0f80\0\u0140\0\u0140\0\u0140\0\u0140\0\u0140\0\u0fc0"+ - "\0\u1000\0\u1040\0\u1080\0\u10c0\0\u01c0\0\u01c0\0\u01c0\0\u1100"+ - "\0\u1140\0\u1180\0\u11c0\0\u1200\0\u1240\0\u1280\0\u12c0\0\u1300"+ - "\0\u1340\0\u1380\0\u13c0\0\u1400\0\u1440\0\u1480\0\u14c0\0\u01c0"+ - "\0\u1500\0\u1540\0\u1580\0\u0140\0\u15c0\0\u0140\0\u0140\0\u1600"+ - "\0\u0140\0\u0140\0\u0140\0\u0140\0\u0140\0\u1640\0\u1680\0\u0140"+ - "\0\u0140\0\u16c0\0\u1700\0\u1740\0\u1780\0\u0140\0\u17c0\0\u0140"+ - "\0\u1800\0\u1840\0\u1880\0\u18c0\0\u1900\0\u1940\0\u1980\0\u19c0"+ - "\0\u0140\0\u1a00\0\u1a40\0\u1a80\0\u1ac0\0\u01c0\0\u1b00\0\u1b40"+ - "\0\u1b80\0\u1bc0\0\u1c00\0\u1c40\0\u1c80\0\u1cc0\0\u0140\0\u1d00"+ - "\0\u1d40\0\u1d80\0\u1dc0\0\u01c0\0\u01c0\0\u1e00\0\u1e40\0\u01c0"+ - "\0\u01c0\0\u1e80\0\u1e80\0\u0140\0\u0140\0\u0140\0\u0140\0\u1ec0"+ - "\0\u1f00\0\u0140\0\u1f40\0\u0140\0\u0140\0\u1f80\0\u1fc0\0\u0140"+ - "\0\u2000\0\u17c0\0\u01c0\0\u2040\0\u01c0\0\u2080\0\u01c0\0\u20c0"+ - "\0\u2100\0\u2140\0\u2180\0\u01c0\0\u01c0\0\u21c0\0\u2200\0\u2240"+ - "\0\u2280\0\u01c0\0\u22c0\0\u01c0\0\u0140\0\u0140\0\u2300\0\u0bc0"+ - "\0\u0140\0\u2340\0\u01c0\0\u01c0\0\u01c0\0\u2380\0\u01c0\0\u23c0"+ - "\0\u2400\0\u2440\0\u01c0\0\u01c0\0\u01c0\0\u2480\0\u24c0\0\u01c0"+ - "\0\u2500\0\u01c0\0\u2540\0\u01c0\0\u01c0"; + "\0\u0780\0\u07c0\0\u0800\0\u0840\0\u0880\0\u08c0\0\u0900\0\u0940"+ + "\0\u0180\0\u0980\0\u09c0\0\u0180\0\u0a00\0\u0a40\0\u0a80\0\u0ac0"+ + "\0\u0180\0\u0180\0\u0180\0\u0180\0\u0180\0\u0180\0\u0180\0\u0b00"+ + "\0\u0180\0\u0b40\0\u0b80\0\u0180\0\u0180\0\u0bc0\0\u0c00\0\u0c40"+ + "\0\u0c80\0\u0180\0\u0cc0\0\u0d00\0\u0180\0\u0180\0\u0d40\0\u0d80"+ + "\0\u0dc0\0\u0e00\0\u0e40\0\u0e80\0\u0ec0\0\u0180\0\u0f00\0\u0f40"+ + "\0\u0180\0\u0f80\0\u0fc0\0\u1000\0\u1040\0\u0180\0\u0180\0\u0180"+ + "\0\u0180\0\u0180\0\u1080\0\u10c0\0\u1100\0\u1140\0\u1180\0\u0200"+ + "\0\u0200\0\u0200\0\u11c0\0\u0180\0\u1200\0\u1240\0\u1280\0\u12c0"+ + "\0\u1300\0\u1340\0\u1380\0\u13c0\0\u1400\0\u1440\0\u1480\0\u14c0"+ + "\0\u1500\0\u1540\0\u1580\0\u0200\0\u15c0\0\u1600\0\u1640\0\u0180"+ + "\0\u1680\0\u0180\0\u0180\0\u16c0\0\u0180\0\u0180\0\u0180\0\u0180"+ + "\0\u0180\0\u1700\0\u1740\0\u0180\0\u0180\0\u1780\0\u17c0\0\u1800"+ + "\0\u1840\0\u0180\0\u0180\0\u0180\0\u1880\0\u0180\0\u18c0\0\u1900"+ + "\0\u0180\0\u1940\0\u1980\0\u19c0\0\u1a00\0\u0180\0\u1a40\0\u1a80"+ + "\0\u1ac0\0\u1b00\0\u0200\0\u1b40\0\u1b80\0\u1bc0\0\u1c00\0\u1c40"+ + "\0\u1c80\0\u1cc0\0\u1d00\0\u0180\0\u1d40\0\u1d80\0\u1dc0\0\u1e00"+ + "\0\u0200\0\u0200\0\u1e40\0\u1e80\0\u0200\0\u0200\0\u1ec0\0\u1ec0"+ + "\0\u0180\0\u0180\0\u0180\0\u0180\0\u1f00\0\u1f40\0\u0180\0\u1f80"+ + "\0\u0180\0\u0180\0\u1fc0\0\u1880\0\u0200\0\u2000\0\u0200\0\u2040"+ + "\0\u0200\0\u2080\0\u20c0\0\u2100\0\u2140\0\u0200\0\u0200\0\u2180"+ + "\0\u21c0\0\u2200\0\u2240\0\u0200\0\u2280\0\u0200\0\u0180\0\u0180"+ + "\0\u22c0\0\u0c00\0\u0200\0\u0200\0\u0200\0\u2300\0\u0200\0\u2340"+ + "\0\u2380\0\u23c0\0\u0200\0\u0200\0\u0200\0\u2400\0\u2440\0\u0200"+ + "\0\u2480\0\u0200\0\u24c0\0\u0200\0\u0200"; private static int [] zzUnpackRowMap() { int [] result = new int[229]; @@ -221,242 +222,261 @@ class _JetLexer implements FlexLexer { private static final int [] ZZ_TRANS = zzUnpackTrans(); private static final String ZZ_TRANS_PACKED_0 = - "\1\6\1\7\1\10\1\11\1\10\1\6\1\12\1\11"+ - "\1\13\1\14\1\15\1\16\1\17\2\10\1\20\1\10"+ - "\1\21\1\10\1\22\1\6\1\23\1\10\1\24\1\25"+ - "\1\26\1\10\1\27\1\30\1\31\1\32\1\33\1\34"+ - "\1\35\1\36\2\10\1\37\1\40\1\10\1\41\1\10"+ - "\1\42\1\10\1\43\1\44\1\45\1\46\1\47\1\50"+ - "\1\51\1\52\1\53\1\54\1\55\1\56\1\57\1\60"+ - "\1\61\1\62\1\63\1\64\1\65\1\66\7\67\1\70"+ - "\1\71\13\67\1\72\1\73\61\67\1\74\1\71\13\67"+ - "\1\74\1\75\52\67\2\0\1\76\1\0\1\76\1\0"+ - "\1\77\6\0\2\76\1\0\1\76\1\0\1\76\3\0"+ - "\1\76\2\0\1\100\25\76\21\0\1\6\1\7\1\10"+ - "\1\11\1\10\1\6\1\12\1\11\1\13\1\14\1\15"+ - "\1\16\1\17\2\10\1\20\1\10\1\21\1\10\1\22"+ - "\1\6\1\23\1\10\1\101\1\102\1\26\1\10\1\27"+ - "\1\30\1\31\1\32\1\33\1\34\1\35\1\36\2\10"+ - "\1\37\1\40\1\10\1\41\1\10\1\42\1\10\1\43"+ - "\1\44\1\45\1\46\1\47\1\50\1\51\1\52\1\53"+ - "\1\54\1\55\1\56\1\57\1\60\1\61\1\62\1\63"+ - "\1\64\1\65\1\66\101\0\1\7\12\0\1\7\2\0"+ - "\1\103\1\104\17\0\1\104\40\0\2\10\1\0\2\10"+ - "\6\0\3\10\1\0\1\10\1\0\1\10\3\0\1\10"+ - "\2\0\26\10\24\0\1\11\3\0\1\11\70\0\6\105"+ - "\2\0\70\105\2\0\1\106\1\0\1\106\1\0\1\107"+ - "\6\0\2\106\1\0\1\106\1\0\1\106\3\0\1\106"+ - "\2\0\26\106\23\0\1\110\1\0\1\110\1\0\1\111"+ - "\2\0\1\112\3\0\2\110\1\0\1\110\1\0\1\110"+ - "\3\0\1\110\2\0\26\110\33\0\1\113\1\114\47\0"+ - "\1\115\77\0\1\116\15\0\1\117\12\0\1\117\1\120"+ - "\1\121\1\103\1\104\17\0\1\104\5\0\1\121\32\0"+ - "\1\122\12\0\1\122\2\0\1\123\101\0\1\124\40\0"+ - "\1\125\1\126\14\0\7\22\1\0\13\22\1\127\1\130"+ - "\53\22\25\0\1\131\53\0\2\10\1\0\2\10\6\0"+ - "\3\10\1\0\1\10\1\0\1\10\3\0\1\10\2\0"+ - "\1\10\1\132\12\10\1\133\5\10\1\134\3\10\22\0"+ - "\2\10\1\0\2\10\6\0\3\10\1\0\1\10\1\0"+ - "\1\10\3\0\1\10\2\0\3\10\1\135\2\10\1\136"+ - "\12\10\1\137\4\10\22\0\2\10\1\0\2\10\6\0"+ - "\3\10\1\0\1\10\1\0\1\10\3\0\1\140\2\0"+ - "\26\10\22\0\2\10\1\0\2\10\6\0\3\10\1\0"+ - "\1\10\1\0\1\10\3\0\1\10\2\0\5\10\1\141"+ - "\12\10\1\142\5\10\22\0\2\10\1\0\2\10\6\0"+ - "\3\10\1\0\1\10\1\0\1\10\3\0\1\10\2\0"+ - "\15\10\1\143\10\10\22\0\2\10\1\0\2\10\6\0"+ - "\3\10\1\0\1\10\1\0\1\10\3\0\1\144\2\0"+ - "\26\10\22\0\2\10\1\0\2\10\6\0\3\10\1\0"+ - "\1\10\1\0\1\10\3\0\1\10\2\0\20\10\1\145"+ - "\5\10\22\0\2\10\1\0\2\10\6\0\3\10\1\0"+ - "\1\10\1\0\1\10\3\0\1\10\2\0\11\10\1\146"+ - "\14\10\22\0\2\10\1\0\2\10\6\0\3\10\1\0"+ - "\1\10\1\0\1\10\3\0\1\10\2\0\3\10\1\147"+ - "\22\10\22\0\2\10\1\0\2\10\6\0\3\10\1\0"+ - "\1\10\1\0\1\10\3\0\1\10\2\0\7\10\1\150"+ - "\16\10\22\0\2\10\1\0\2\10\6\0\3\10\1\0"+ - "\1\10\1\0\1\10\3\0\1\10\2\0\14\10\1\151"+ - "\11\10\22\0\2\10\1\0\2\10\6\0\3\10\1\0"+ - "\1\10\1\0\1\10\3\0\1\10\2\0\1\10\1\152"+ - "\24\10\22\0\2\10\1\0\2\10\6\0\3\10\1\0"+ - "\1\10\1\0\1\10\3\0\1\153\2\0\5\10\1\154"+ - "\3\10\1\155\14\10\22\0\2\10\1\0\2\10\6\0"+ - "\3\10\1\0\1\10\1\0\1\10\3\0\1\10\2\0"+ - "\1\10\1\156\24\10\22\0\2\10\1\0\2\10\6\0"+ - "\3\10\1\0\1\10\1\0\1\10\3\0\1\10\2\0"+ - "\11\10\1\157\14\10\22\0\2\10\1\0\2\10\6\0"+ - "\3\10\1\0\1\10\1\0\1\10\3\0\1\10\2\0"+ - "\5\10\1\160\20\10\54\0\1\161\27\0\1\162\75\0"+ - "\1\163\1\0\1\164\75\0\1\165\1\0\1\166\76\0"+ - "\1\167\1\170\77\0\1\171\1\0\1\172\100\0\1\173"+ - "\100\0\1\174\73\0\1\175\14\0\7\67\2\0\13\67"+ - "\2\0\52\67\2\0\1\176\1\0\1\176\1\0\1\177"+ - "\6\0\2\176\1\0\1\176\1\0\1\176\3\0\1\176"+ - "\1\200\1\0\26\176\21\0\7\201\1\0\16\201\1\202"+ - "\51\201\25\0\1\203\53\0\2\76\1\0\2\76\6\0"+ - "\3\76\1\0\1\76\1\0\1\76\3\0\1\76\2\0"+ - "\26\76\21\0\6\204\2\0\70\204\1\0\2\76\1\0"+ - "\2\76\6\0\3\76\1\0\1\76\1\0\1\76\3\0"+ - "\1\76\2\0\1\76\1\205\24\76\22\0\1\122\12\0"+ - "\1\122\2\0\1\206\61\0\1\207\12\0\1\207\4\0"+ - "\1\207\43\0\1\207\12\0\6\105\1\210\1\0\70\105"+ - "\1\0\2\106\1\0\2\106\6\0\3\106\1\0\1\106"+ - "\1\0\1\106\3\0\1\106\2\0\26\106\21\0\6\211"+ - "\2\0\70\211\1\0\2\110\1\0\2\110\6\0\3\110"+ - "\1\0\1\110\1\0\1\110\3\0\1\110\2\0\26\110"+ - "\21\0\6\212\2\0\70\212\7\113\1\0\70\113\13\213"+ - "\1\214\64\213\1\0\1\117\12\0\1\117\2\0\1\215"+ - "\1\104\17\0\1\104\40\0\2\120\11\0\1\120\1\0"+ - "\1\120\1\216\1\120\1\0\1\217\12\0\1\120\2\0"+ - "\1\120\1\217\1\120\3\0\1\120\3\0\1\120\3\0"+ - "\1\120\22\0\1\121\12\0\1\121\2\0\1\220\61\0"+ - "\1\122\12\0\1\122\3\0\1\104\17\0\1\104\37\0"+ - "\7\22\1\0\70\22\25\0\1\221\53\0\2\10\1\0"+ - "\2\10\6\0\3\10\1\0\1\10\1\0\1\10\3\0"+ - "\1\10\2\0\2\10\1\222\11\10\1\223\11\10\22\0"+ - "\2\10\1\0\2\10\6\0\3\10\1\0\1\10\1\0"+ - "\1\10\3\0\1\224\2\0\11\10\1\225\10\10\1\226"+ - "\3\10\22\0\2\10\1\0\2\10\6\0\3\10\1\0"+ - "\1\10\1\0\1\10\3\0\1\10\2\0\10\10\1\227"+ - "\15\10\22\0\2\10\1\0\2\10\6\0\3\10\1\0"+ - "\1\10\1\0\1\10\3\0\1\10\2\0\10\10\1\230"+ - "\15\10\22\0\2\10\1\0\2\10\6\0\3\10\1\0"+ - "\1\10\1\0\1\10\3\0\1\10\2\0\6\10\1\231"+ - "\17\10\22\0\2\10\1\0\2\10\6\0\3\10\1\0"+ - "\1\10\1\0\1\10\3\0\1\10\2\0\11\10\1\232"+ - "\14\10\22\0\2\10\1\0\2\10\6\0\3\10\1\0"+ - "\1\10\1\0\1\10\3\0\1\10\2\0\16\10\1\233"+ - "\7\10\22\0\2\10\1\0\2\10\6\0\3\10\1\0"+ - "\1\10\1\0\1\10\3\0\1\10\2\0\20\10\1\234"+ - "\5\10\22\0\2\10\1\0\2\10\6\0\3\10\1\0"+ - "\1\10\1\0\1\10\3\0\1\10\2\0\3\10\1\235"+ - "\22\10\22\0\2\10\1\0\2\10\6\0\3\10\1\0"+ - "\1\10\1\0\1\10\3\0\1\10\2\0\4\10\1\236"+ - "\21\10\22\0\2\10\1\0\2\10\6\0\3\10\1\0"+ - "\1\10\1\0\1\10\3\0\1\10\2\0\26\10\5\0"+ - "\1\237\14\0\2\10\1\0\2\10\6\0\3\10\1\0"+ - "\1\10\1\0\1\10\3\0\1\10\2\0\1\240\25\10"+ - "\22\0\2\10\1\0\2\10\6\0\3\10\1\0\1\10"+ - "\1\0\1\10\3\0\1\10\2\0\7\10\1\241\16\10"+ - "\22\0\2\10\1\0\2\10\6\0\3\10\1\0\1\10"+ - "\1\0\1\10\3\0\1\10\2\0\2\10\1\242\4\10"+ - "\1\243\16\10\22\0\2\10\1\0\2\10\6\0\3\10"+ - "\1\0\1\10\1\0\1\10\3\0\1\10\2\0\6\10"+ - "\1\244\17\10\22\0\2\10\1\0\2\10\6\0\3\10"+ - "\1\0\1\10\1\0\1\10\3\0\1\10\2\0\14\10"+ - "\1\245\11\10\22\0\2\10\1\0\2\10\6\0\3\10"+ - "\1\0\1\10\1\0\1\10\3\0\1\10\2\0\20\10"+ - "\1\246\5\10\22\0\2\10\1\0\2\10\6\0\3\10"+ - "\1\0\1\10\1\0\1\10\3\0\1\10\2\0\2\10"+ - "\1\247\23\10\22\0\2\10\1\0\2\10\6\0\3\10"+ - "\1\0\1\10\1\0\1\10\3\0\1\10\2\0\14\10"+ - "\1\250\3\10\1\251\5\10\55\0\1\252\2\0\1\253"+ - "\123\0\1\254\74\0\1\255\101\0\1\256\100\0\1\257"+ - "\15\0\2\176\1\0\2\176\6\0\3\176\1\0\1\176"+ - "\1\0\1\176\3\0\1\176\2\0\26\176\21\0\6\260"+ - "\2\0\70\260\1\0\2\261\11\0\1\261\1\0\1\261"+ - "\1\0\1\261\14\0\1\261\2\0\1\261\1\0\1\261"+ - "\3\0\1\261\3\0\1\261\3\0\1\261\46\0\1\73"+ - "\52\0\6\204\1\262\1\0\70\204\1\0\2\76\1\0"+ - "\2\76\6\0\3\76\1\0\1\76\1\0\1\76\3\0"+ - "\1\76\2\0\2\76\1\263\23\76\22\0\1\207\12\0"+ - "\1\207\63\0\6\211\1\264\1\0\70\211\6\212\1\265"+ - "\1\0\70\212\13\213\1\266\64\213\12\267\1\270\1\214"+ - "\64\267\1\0\1\122\12\0\1\122\64\0\2\271\11\0"+ - "\1\271\1\0\1\271\1\206\1\271\14\0\1\271\2\0"+ - "\1\271\1\0\1\271\3\0\1\271\3\0\1\271\3\0"+ - "\1\271\22\0\1\207\12\0\1\207\4\0\1\272\43\0"+ - "\1\272\31\0\1\206\61\0\2\10\1\0\2\10\6\0"+ - "\3\10\1\0\1\10\1\0\1\10\3\0\1\10\2\0"+ - "\3\10\1\273\22\10\22\0\2\10\1\0\2\10\6\0"+ - "\3\10\1\0\1\10\1\0\1\10\3\0\1\10\2\0"+ - "\5\10\1\274\20\10\22\0\2\10\1\0\2\10\6\0"+ - "\3\10\1\0\1\10\1\0\1\10\3\0\1\10\2\0"+ - "\7\10\1\275\16\10\22\0\2\10\1\0\2\10\6\0"+ - "\3\10\1\0\1\10\1\0\1\10\3\0\1\10\2\0"+ - "\2\10\1\276\23\10\22\0\2\10\1\0\2\10\6\0"+ - "\3\10\1\0\1\10\1\0\1\10\3\0\1\10\2\0"+ - "\7\10\1\277\16\10\22\0\2\10\1\0\2\10\6\0"+ - "\3\10\1\0\1\10\1\0\1\10\3\0\1\10\2\0"+ - "\7\10\1\300\16\10\22\0\2\10\1\0\2\10\6\0"+ - "\3\10\1\0\1\10\1\0\1\10\3\0\1\10\2\0"+ - "\1\301\25\10\22\0\2\10\1\0\2\10\6\0\3\10"+ - "\1\0\1\10\1\0\1\10\3\0\1\10\2\0\3\10"+ - "\1\302\22\10\22\0\2\10\1\0\2\10\6\0\3\10"+ - "\1\0\1\10\1\0\1\10\3\0\1\10\2\0\7\10"+ - "\1\303\16\10\22\0\2\10\1\0\2\10\6\0\3\10"+ - "\1\0\1\10\1\0\1\10\3\0\1\10\2\0\20\10"+ - "\1\304\5\10\22\0\2\10\1\0\2\10\6\0\3\10"+ - "\1\0\1\10\1\0\1\10\3\0\1\10\2\0\7\10"+ - "\1\305\16\10\22\0\2\10\1\0\2\10\6\0\3\10"+ - "\1\0\1\10\1\0\1\10\3\0\1\10\2\0\12\10"+ - "\1\306\13\10\22\0\2\10\1\0\2\10\6\0\3\10"+ - "\1\0\1\10\1\0\1\10\3\0\1\307\2\0\26\10"+ - "\22\0\2\10\1\0\2\10\6\0\3\10\1\0\1\10"+ - "\1\0\1\10\3\0\1\10\2\0\11\10\1\310\14\10"+ - "\22\0\2\10\1\0\2\10\6\0\3\10\1\0\1\10"+ - "\1\0\1\10\3\0\1\10\2\0\20\10\1\311\5\10"+ - "\22\0\2\10\1\0\2\10\6\0\3\10\1\0\1\10"+ - "\1\0\1\10\3\0\1\10\2\0\6\10\1\312\17\10"+ - "\22\0\2\10\1\0\2\10\6\0\3\10\1\0\1\10"+ - "\1\0\1\10\3\0\1\10\2\0\3\10\1\313\22\10"+ - "\22\0\2\10\1\0\2\10\6\0\3\10\1\0\1\10"+ - "\1\0\1\10\3\0\1\10\2\0\3\10\1\314\22\10"+ - "\22\0\2\315\1\0\2\315\6\0\3\315\1\0\1\315"+ - "\1\0\1\315\3\0\1\315\2\0\26\315\21\0\6\260"+ - "\1\316\1\0\70\260\1\0\2\317\11\0\1\317\1\0"+ - "\1\317\1\0\1\317\14\0\1\317\2\0\1\317\1\0"+ - "\1\317\3\0\1\317\3\0\1\317\3\0\1\317\22\0"+ - "\2\76\1\0\2\76\6\0\3\76\1\0\1\76\1\0"+ - "\1\76\3\0\1\76\2\0\3\76\1\320\22\76\21\0"+ - "\12\213\1\321\1\266\64\213\13\267\1\322\64\267\1\0"+ - "\2\271\11\0\1\271\1\0\1\271\1\0\1\271\1\0"+ - "\1\217\12\0\1\271\2\0\1\271\1\217\1\271\3\0"+ - "\1\271\3\0\1\271\3\0\1\271\22\0\2\10\1\0"+ - "\2\10\6\0\3\10\1\0\1\10\1\0\1\10\3\0"+ - "\1\10\2\0\17\10\1\323\6\10\22\0\2\10\1\0"+ - "\2\10\6\0\3\10\1\0\1\10\1\0\1\10\3\0"+ - "\1\10\2\0\1\324\25\10\22\0\2\10\1\0\2\10"+ - "\6\0\3\10\1\0\1\10\1\0\1\10\3\0\1\10"+ - "\2\0\14\10\1\325\11\10\22\0\2\10\1\0\2\10"+ - "\6\0\3\10\1\0\1\10\1\0\1\10\3\0\1\10"+ - "\2\0\2\10\1\326\23\10\22\0\2\10\1\0\2\10"+ - "\6\0\3\10\1\0\1\10\1\0\1\10\3\0\1\10"+ - "\2\0\3\10\1\327\22\10\22\0\2\10\1\0\2\10"+ - "\6\0\3\10\1\0\1\10\1\0\1\10\3\0\1\10"+ - "\2\0\4\10\1\330\21\10\22\0\2\10\1\0\2\10"+ - "\6\0\3\10\1\0\1\10\1\0\1\10\3\0\1\10"+ - "\2\0\11\10\1\331\14\10\22\0\2\10\1\0\2\10"+ - "\6\0\3\10\1\0\1\10\1\0\1\10\3\0\1\10"+ - "\2\0\14\10\1\332\11\10\22\0\2\10\1\0\2\10"+ - "\6\0\3\10\1\0\1\10\1\0\1\10\3\0\1\10"+ - "\2\0\12\10\1\333\13\10\22\0\2\10\1\0\2\10"+ - "\6\0\3\10\1\0\1\10\1\0\1\10\3\0\1\10"+ - "\2\0\7\10\1\334\16\10\22\0\2\10\1\0\2\10"+ - "\6\0\3\10\1\0\1\10\1\0\1\10\3\0\1\10"+ - "\2\0\7\10\1\335\16\10\22\0\2\336\11\0\1\336"+ - "\1\0\1\336\1\0\1\336\14\0\1\336\2\0\1\336"+ - "\1\0\1\336\3\0\1\336\3\0\1\336\3\0\1\336"+ - "\21\0\12\267\1\270\1\322\64\267\1\0\2\10\1\0"+ - "\2\10\6\0\3\10\1\0\1\10\1\0\1\10\3\0"+ - "\1\10\2\0\6\10\1\337\17\10\22\0\2\10\1\0"+ - "\2\10\6\0\3\10\1\0\1\10\1\0\1\10\3\0"+ - "\1\10\2\0\1\340\25\10\22\0\2\10\1\0\2\10"+ - "\6\0\3\10\1\0\1\10\1\0\1\10\3\0\1\10"+ - "\2\0\13\10\1\341\12\10\22\0\2\10\1\0\2\10"+ - "\6\0\3\10\1\0\1\10\1\0\1\10\3\0\1\10"+ - "\2\0\6\10\1\342\17\10\22\0\2\201\11\0\1\201"+ - "\1\0\1\201\1\0\1\201\14\0\1\201\2\0\1\201"+ - "\1\0\1\201\3\0\1\201\3\0\1\201\3\0\1\201"+ - "\22\0\2\10\1\0\2\10\6\0\3\10\1\0\1\10"+ - "\1\0\1\10\3\0\1\343\2\0\26\10\22\0\2\10"+ - "\1\0\2\10\6\0\3\10\1\0\1\10\1\0\1\10"+ - "\3\0\1\10\2\0\7\10\1\344\16\10\22\0\2\10"+ - "\1\0\2\10\6\0\3\10\1\0\1\10\1\0\1\10"+ - "\3\0\1\10\2\0\7\10\1\345\16\10\21\0"; + "\1\7\1\10\1\11\1\12\1\11\1\7\1\13\1\12"+ + "\1\14\1\15\1\16\1\17\2\11\1\20\1\11\1\21"+ + "\1\11\1\22\1\7\1\23\1\11\1\24\1\25\1\26"+ + "\1\11\1\27\1\30\1\31\1\32\1\33\1\34\1\35"+ + "\1\36\1\37\2\11\1\40\1\41\1\11\1\42\1\11"+ + "\1\43\1\11\1\44\1\45\1\46\1\47\1\50\1\51"+ + "\1\52\1\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\7\70\1\71"+ + "\1\72\12\70\1\73\1\74\62\70\1\75\1\72\12\70"+ + "\1\75\1\76\53\70\2\0\1\77\1\0\1\77\1\0"+ + "\1\100\5\0\2\77\1\0\1\77\1\0\1\77\3\0"+ + "\1\77\2\0\1\101\3\77\1\0\22\77\21\0\12\102"+ + "\1\103\21\102\1\104\43\102\1\7\1\10\1\11\1\12"+ + "\1\11\1\7\1\13\1\12\1\14\1\15\1\16\1\17"+ + "\2\11\1\20\1\11\1\21\1\11\1\22\1\7\1\23"+ + "\1\11\1\105\1\106\1\26\1\11\1\27\1\30\1\31"+ + "\1\32\1\33\1\34\1\35\1\36\1\37\2\11\1\40"+ + "\1\41\1\11\1\42\1\11\1\43\1\11\1\44\1\45"+ + "\1\46\1\47\1\50\1\51\1\52\1\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\101\0\1\10\11\0\1\10\2\0\1\107"+ + "\1\110\20\0\1\110\40\0\2\11\1\0\2\11\5\0"+ + "\3\11\1\0\1\11\1\0\1\11\3\0\1\11\2\0"+ + "\4\11\1\0\22\11\24\0\1\12\3\0\1\12\70\0"+ + "\6\111\2\0\70\111\2\0\1\112\1\0\1\112\1\0"+ + "\1\113\5\0\2\112\1\0\1\112\1\0\1\112\3\0"+ + "\1\112\2\0\4\112\1\0\22\112\23\0\1\114\1\0"+ + "\1\114\1\0\1\115\2\0\1\116\2\0\2\114\1\0"+ + "\1\114\1\0\1\114\3\0\1\114\2\0\4\114\1\0"+ + "\22\114\33\0\1\117\21\0\1\120\26\0\1\121\15\0"+ + "\1\122\11\0\1\122\1\123\1\124\1\107\1\110\20\0"+ + "\1\110\5\0\1\124\32\0\1\125\11\0\1\125\2\0"+ + "\1\126\101\0\1\127\41\0\1\130\1\131\14\0\7\22"+ + "\1\0\12\22\1\132\1\133\54\22\24\0\1\134\54\0"+ + "\2\11\1\0\2\11\5\0\3\11\1\0\1\11\1\0"+ + "\1\11\3\0\1\11\2\0\1\11\1\135\2\11\1\0"+ + "\10\11\1\136\5\11\1\137\3\11\22\0\2\11\1\0"+ + "\2\11\5\0\3\11\1\0\1\11\1\0\1\11\3\0"+ + "\1\11\2\0\3\11\1\140\1\0\2\11\1\141\12\11"+ + "\1\142\4\11\22\0\2\11\1\0\2\11\5\0\3\11"+ + "\1\0\1\11\1\0\1\11\3\0\1\143\2\0\4\11"+ + "\1\0\22\11\104\0\1\144\15\0\2\11\1\0\2\11"+ + "\5\0\3\11\1\0\1\11\1\0\1\11\3\0\1\11"+ + "\2\0\4\11\1\0\1\11\1\145\12\11\1\146\5\11"+ + "\22\0\2\11\1\0\2\11\5\0\3\11\1\0\1\11"+ + "\1\0\1\11\3\0\1\11\2\0\4\11\1\0\11\11"+ + "\1\147\10\11\22\0\2\11\1\0\2\11\5\0\3\11"+ + "\1\0\1\11\1\0\1\11\3\0\1\150\2\0\4\11"+ + "\1\0\22\11\22\0\2\11\1\0\2\11\5\0\3\11"+ + "\1\0\1\11\1\0\1\11\3\0\1\11\2\0\4\11"+ + "\1\0\14\11\1\151\5\11\22\0\2\11\1\0\2\11"+ + "\5\0\3\11\1\0\1\11\1\0\1\11\3\0\1\11"+ + "\2\0\4\11\1\0\5\11\1\152\14\11\22\0\2\11"+ + "\1\0\2\11\5\0\3\11\1\0\1\11\1\0\1\11"+ + "\3\0\1\11\2\0\3\11\1\153\1\0\22\11\22\0"+ + "\2\11\1\0\2\11\5\0\3\11\1\0\1\11\1\0"+ + "\1\11\3\0\1\11\2\0\4\11\1\0\3\11\1\154"+ + "\16\11\22\0\2\11\1\0\2\11\5\0\3\11\1\0"+ + "\1\11\1\0\1\11\3\0\1\11\2\0\4\11\1\0"+ + "\10\11\1\155\11\11\22\0\2\11\1\0\2\11\5\0"+ + "\3\11\1\0\1\11\1\0\1\11\3\0\1\11\2\0"+ + "\1\11\1\156\2\11\1\0\22\11\22\0\2\11\1\0"+ + "\2\11\5\0\3\11\1\0\1\11\1\0\1\11\3\0"+ + "\1\157\2\0\4\11\1\0\1\11\1\160\3\11\1\161"+ + "\14\11\22\0\2\11\1\0\2\11\5\0\3\11\1\0"+ + "\1\11\1\0\1\11\3\0\1\11\2\0\1\11\1\162"+ + "\2\11\1\0\22\11\22\0\2\11\1\0\2\11\5\0"+ + "\3\11\1\0\1\11\1\0\1\11\3\0\1\11\2\0"+ + "\4\11\1\0\5\11\1\163\14\11\22\0\2\11\1\0"+ + "\2\11\5\0\3\11\1\0\1\11\1\0\1\11\3\0"+ + "\1\11\2\0\4\11\1\0\1\11\1\164\20\11\53\0"+ + "\1\165\30\0\1\166\75\0\1\167\1\0\1\170\75\0"+ + "\1\171\1\0\1\172\76\0\1\173\1\174\77\0\1\175"+ + "\1\0\1\176\100\0\1\177\100\0\1\200\73\0\1\201"+ + "\14\0\7\70\2\0\12\70\2\0\53\70\2\0\1\202"+ + "\1\0\1\202\1\0\1\203\5\0\2\202\1\0\1\202"+ + "\1\0\1\202\3\0\1\202\1\204\1\0\4\202\1\0"+ + "\22\202\21\0\7\205\1\0\15\205\1\206\52\205\24\0"+ + "\1\207\54\0\2\77\1\0\2\77\5\0\3\77\1\0"+ + "\1\77\1\0\1\77\3\0\1\77\2\0\4\77\1\0"+ + "\22\77\21\0\6\210\2\0\70\210\1\0\2\77\1\0"+ + "\2\77\5\0\3\77\1\0\1\77\1\0\1\77\3\0"+ + "\1\77\2\0\1\77\1\211\2\77\1\0\22\77\55\0"+ + "\1\212\55\0\1\213\66\0\1\125\11\0\1\125\2\0"+ + "\1\214\62\0\1\215\11\0\1\215\4\0\1\215\44\0"+ + "\1\215\12\0\6\111\1\216\1\0\70\111\1\0\2\112"+ + "\1\0\2\112\5\0\3\112\1\0\1\112\1\0\1\112"+ + "\3\0\1\112\2\0\4\112\1\0\22\112\21\0\6\217"+ + "\2\0\70\217\1\0\2\114\1\0\2\114\5\0\3\114"+ + "\1\0\1\114\1\0\1\114\3\0\1\114\2\0\4\114"+ + "\1\0\22\114\21\0\6\220\2\0\70\220\7\117\1\0"+ + "\70\117\34\0\1\221\44\0\1\122\11\0\1\122\2\0"+ + "\1\222\1\110\20\0\1\110\40\0\2\123\10\0\1\123"+ + "\1\0\1\123\1\223\1\123\1\0\1\224\13\0\1\123"+ + "\2\0\1\123\1\224\1\123\3\0\1\123\3\0\1\123"+ + "\3\0\1\123\22\0\1\124\11\0\1\124\2\0\1\225"+ + "\62\0\1\125\11\0\1\125\3\0\1\110\20\0\1\110"+ + "\37\0\7\22\1\0\70\22\24\0\1\226\54\0\2\11"+ + "\1\0\2\11\5\0\3\11\1\0\1\11\1\0\1\11"+ + "\3\0\1\11\2\0\2\11\1\227\1\11\1\0\10\11"+ + "\1\230\11\11\22\0\2\11\1\0\2\11\5\0\3\11"+ + "\1\0\1\11\1\0\1\11\3\0\1\231\2\0\4\11"+ + "\1\0\5\11\1\232\10\11\1\233\3\11\22\0\2\11"+ + "\1\0\2\11\5\0\3\11\1\0\1\11\1\0\1\11"+ + "\3\0\1\11\2\0\4\11\1\0\4\11\1\234\15\11"+ + "\22\0\2\11\1\0\2\11\5\0\3\11\1\0\1\11"+ + "\1\0\1\11\3\0\1\11\2\0\4\11\1\0\4\11"+ + "\1\235\15\11\22\0\2\11\1\0\2\11\5\0\3\11"+ + "\1\0\1\11\1\0\1\11\3\0\1\11\2\0\4\11"+ + "\1\0\2\11\1\236\17\11\22\0\2\11\1\0\2\11"+ + "\5\0\3\11\1\0\1\11\1\0\1\11\3\0\1\11"+ + "\2\0\4\11\1\0\5\11\1\237\14\11\22\0\2\11"+ + "\1\0\2\11\5\0\3\11\1\0\1\11\1\0\1\11"+ + "\3\0\1\11\2\0\4\11\1\0\12\11\1\240\7\11"+ + "\22\0\2\11\1\0\2\11\5\0\3\11\1\0\1\11"+ + "\1\0\1\11\3\0\1\11\2\0\4\11\1\0\14\11"+ + "\1\241\5\11\22\0\2\11\1\0\2\11\5\0\3\11"+ + "\1\0\1\11\1\0\1\11\3\0\1\11\2\0\3\11"+ + "\1\242\1\0\22\11\22\0\2\11\1\0\2\11\5\0"+ + "\3\11\1\0\1\11\1\0\1\11\3\0\1\11\2\0"+ + "\4\11\1\0\1\243\21\11\22\0\2\11\1\0\2\11"+ + "\5\0\3\11\1\0\1\11\1\0\1\11\3\0\1\11"+ + "\2\0\4\11\1\0\22\11\5\0\1\244\14\0\2\11"+ + "\1\0\2\11\5\0\3\11\1\0\1\11\1\0\1\11"+ + "\3\0\1\11\2\0\1\245\3\11\1\0\22\11\22\0"+ + "\2\11\1\0\2\11\5\0\3\11\1\0\1\11\1\0"+ + "\1\11\3\0\1\11\2\0\4\11\1\0\3\11\1\246"+ + "\16\11\22\0\2\11\1\0\2\11\5\0\3\11\1\0"+ + "\1\11\1\0\1\11\3\0\1\11\2\0\2\11\1\247"+ + "\1\11\1\0\3\11\1\250\16\11\22\0\2\11\1\0"+ + "\2\11\5\0\3\11\1\0\1\11\1\0\1\11\3\0"+ + "\1\11\2\0\4\11\1\0\2\11\1\251\17\11\22\0"+ + "\2\11\1\0\2\11\5\0\3\11\1\0\1\11\1\0"+ + "\1\11\3\0\1\11\2\0\4\11\1\0\10\11\1\252"+ + "\11\11\22\0\2\11\1\0\2\11\5\0\3\11\1\0"+ + "\1\11\1\0\1\11\3\0\1\11\2\0\4\11\1\0"+ + "\14\11\1\253\5\11\22\0\2\11\1\0\2\11\5\0"+ + "\3\11\1\0\1\11\1\0\1\11\3\0\1\11\2\0"+ + "\2\11\1\254\1\11\1\0\22\11\22\0\2\11\1\0"+ + "\2\11\5\0\3\11\1\0\1\11\1\0\1\11\3\0"+ + "\1\11\2\0\4\11\1\0\10\11\1\255\3\11\1\256"+ + "\5\11\54\0\1\257\3\0\1\260\123\0\1\261\74\0"+ + "\1\262\101\0\1\263\100\0\1\264\15\0\2\202\1\0"+ + "\2\202\5\0\3\202\1\0\1\202\1\0\1\202\3\0"+ + "\1\202\2\0\4\202\1\0\22\202\21\0\6\265\2\0"+ + "\70\265\1\0\2\266\10\0\1\266\1\0\1\266\1\0"+ + "\1\266\15\0\1\266\2\0\1\266\1\0\1\266\3\0"+ + "\1\266\3\0\1\266\3\0\1\266\45\0\1\74\53\0"+ + "\6\210\1\267\1\0\70\210\1\0\2\77\1\0\2\77"+ + "\5\0\3\77\1\0\1\77\1\0\1\77\3\0\1\77"+ + "\2\0\2\77\1\270\1\77\1\0\22\77\22\0\1\215"+ + "\11\0\1\215\64\0\6\217\1\271\1\0\70\217\6\220"+ + "\1\272\1\0\70\220\1\0\1\125\11\0\1\125\65\0"+ + "\2\273\10\0\1\273\1\0\1\273\1\214\1\273\15\0"+ + "\1\273\2\0\1\273\1\0\1\273\3\0\1\273\3\0"+ + "\1\273\3\0\1\273\22\0\1\215\11\0\1\215\4\0"+ + "\1\274\44\0\1\274\30\0\1\214\62\0\2\11\1\0"+ + "\2\11\5\0\3\11\1\0\1\11\1\0\1\11\3\0"+ + "\1\11\2\0\3\11\1\275\1\0\22\11\22\0\2\11"+ + "\1\0\2\11\5\0\3\11\1\0\1\11\1\0\1\11"+ + "\3\0\1\11\2\0\4\11\1\0\1\11\1\276\20\11"+ + "\22\0\2\11\1\0\2\11\5\0\3\11\1\0\1\11"+ + "\1\0\1\11\3\0\1\11\2\0\4\11\1\0\3\11"+ + "\1\277\16\11\22\0\2\11\1\0\2\11\5\0\3\11"+ + "\1\0\1\11\1\0\1\11\3\0\1\11\2\0\2\11"+ + "\1\300\1\11\1\0\22\11\22\0\2\11\1\0\2\11"+ + "\5\0\3\11\1\0\1\11\1\0\1\11\3\0\1\11"+ + "\2\0\4\11\1\0\3\11\1\301\16\11\22\0\2\11"+ + "\1\0\2\11\5\0\3\11\1\0\1\11\1\0\1\11"+ + "\3\0\1\11\2\0\4\11\1\0\3\11\1\302\16\11"+ + "\22\0\2\11\1\0\2\11\5\0\3\11\1\0\1\11"+ + "\1\0\1\11\3\0\1\11\2\0\1\303\3\11\1\0"+ + "\22\11\22\0\2\11\1\0\2\11\5\0\3\11\1\0"+ + "\1\11\1\0\1\11\3\0\1\11\2\0\3\11\1\304"+ + "\1\0\22\11\22\0\2\11\1\0\2\11\5\0\3\11"+ + "\1\0\1\11\1\0\1\11\3\0\1\11\2\0\4\11"+ + "\1\0\3\11\1\305\16\11\22\0\2\11\1\0\2\11"+ + "\5\0\3\11\1\0\1\11\1\0\1\11\3\0\1\11"+ + "\2\0\4\11\1\0\14\11\1\306\5\11\22\0\2\11"+ + "\1\0\2\11\5\0\3\11\1\0\1\11\1\0\1\11"+ + "\3\0\1\11\2\0\4\11\1\0\3\11\1\307\16\11"+ + "\22\0\2\11\1\0\2\11\5\0\3\11\1\0\1\11"+ + "\1\0\1\11\3\0\1\11\2\0\4\11\1\0\6\11"+ + "\1\310\13\11\22\0\2\11\1\0\2\11\5\0\3\11"+ + "\1\0\1\11\1\0\1\11\3\0\1\311\2\0\4\11"+ + "\1\0\22\11\22\0\2\11\1\0\2\11\5\0\3\11"+ + "\1\0\1\11\1\0\1\11\3\0\1\11\2\0\4\11"+ + "\1\0\5\11\1\312\14\11\22\0\2\11\1\0\2\11"+ + "\5\0\3\11\1\0\1\11\1\0\1\11\3\0\1\11"+ + "\2\0\4\11\1\0\14\11\1\313\5\11\22\0\2\11"+ + "\1\0\2\11\5\0\3\11\1\0\1\11\1\0\1\11"+ + "\3\0\1\11\2\0\4\11\1\0\2\11\1\314\17\11"+ + "\22\0\2\11\1\0\2\11\5\0\3\11\1\0\1\11"+ + "\1\0\1\11\3\0\1\11\2\0\3\11\1\315\1\0"+ + "\22\11\22\0\2\11\1\0\2\11\5\0\3\11\1\0"+ + "\1\11\1\0\1\11\3\0\1\11\2\0\3\11\1\316"+ + "\1\0\22\11\22\0\2\317\1\0\2\317\5\0\3\317"+ + "\1\0\1\317\1\0\1\317\3\0\1\317\2\0\4\317"+ + "\1\0\22\317\21\0\6\265\1\320\1\0\70\265\1\0"+ + "\2\321\10\0\1\321\1\0\1\321\1\0\1\321\15\0"+ + "\1\321\2\0\1\321\1\0\1\321\3\0\1\321\3\0"+ + "\1\321\3\0\1\321\22\0\2\77\1\0\2\77\5\0"+ + "\3\77\1\0\1\77\1\0\1\77\3\0\1\77\2\0"+ + "\3\77\1\322\1\0\22\77\22\0\2\273\10\0\1\273"+ + "\1\0\1\273\1\0\1\273\1\0\1\224\13\0\1\273"+ + "\2\0\1\273\1\224\1\273\3\0\1\273\3\0\1\273"+ + "\3\0\1\273\22\0\2\11\1\0\2\11\5\0\3\11"+ + "\1\0\1\11\1\0\1\11\3\0\1\11\2\0\4\11"+ + "\1\0\13\11\1\323\6\11\22\0\2\11\1\0\2\11"+ + "\5\0\3\11\1\0\1\11\1\0\1\11\3\0\1\11"+ + "\2\0\1\324\3\11\1\0\22\11\22\0\2\11\1\0"+ + "\2\11\5\0\3\11\1\0\1\11\1\0\1\11\3\0"+ + "\1\11\2\0\4\11\1\0\10\11\1\325\11\11\22\0"+ + "\2\11\1\0\2\11\5\0\3\11\1\0\1\11\1\0"+ + "\1\11\3\0\1\11\2\0\2\11\1\326\1\11\1\0"+ + "\22\11\22\0\2\11\1\0\2\11\5\0\3\11\1\0"+ + "\1\11\1\0\1\11\3\0\1\11\2\0\3\11\1\327"+ + "\1\0\22\11\22\0\2\11\1\0\2\11\5\0\3\11"+ + "\1\0\1\11\1\0\1\11\3\0\1\11\2\0\4\11"+ + "\1\0\1\330\21\11\22\0\2\11\1\0\2\11\5\0"+ + "\3\11\1\0\1\11\1\0\1\11\3\0\1\11\2\0"+ + "\4\11\1\0\5\11\1\331\14\11\22\0\2\11\1\0"+ + "\2\11\5\0\3\11\1\0\1\11\1\0\1\11\3\0"+ + "\1\11\2\0\4\11\1\0\10\11\1\332\11\11\22\0"+ + "\2\11\1\0\2\11\5\0\3\11\1\0\1\11\1\0"+ + "\1\11\3\0\1\11\2\0\4\11\1\0\6\11\1\333"+ + "\13\11\22\0\2\11\1\0\2\11\5\0\3\11\1\0"+ + "\1\11\1\0\1\11\3\0\1\11\2\0\4\11\1\0"+ + "\3\11\1\334\16\11\22\0\2\11\1\0\2\11\5\0"+ + "\3\11\1\0\1\11\1\0\1\11\3\0\1\11\2\0"+ + "\4\11\1\0\3\11\1\335\16\11\22\0\2\336\10\0"+ + "\1\336\1\0\1\336\1\0\1\336\15\0\1\336\2\0"+ + "\1\336\1\0\1\336\3\0\1\336\3\0\1\336\3\0"+ + "\1\336\22\0\2\11\1\0\2\11\5\0\3\11\1\0"+ + "\1\11\1\0\1\11\3\0\1\11\2\0\4\11\1\0"+ + "\2\11\1\337\17\11\22\0\2\11\1\0\2\11\5\0"+ + "\3\11\1\0\1\11\1\0\1\11\3\0\1\11\2\0"+ + "\1\340\3\11\1\0\22\11\22\0\2\11\1\0\2\11"+ + "\5\0\3\11\1\0\1\11\1\0\1\11\3\0\1\11"+ + "\2\0\4\11\1\0\7\11\1\341\12\11\22\0\2\11"+ + "\1\0\2\11\5\0\3\11\1\0\1\11\1\0\1\11"+ + "\3\0\1\11\2\0\4\11\1\0\2\11\1\342\17\11"+ + "\22\0\2\205\10\0\1\205\1\0\1\205\1\0\1\205"+ + "\15\0\1\205\2\0\1\205\1\0\1\205\3\0\1\205"+ + "\3\0\1\205\3\0\1\205\22\0\2\11\1\0\2\11"+ + "\5\0\3\11\1\0\1\11\1\0\1\11\3\0\1\343"+ + "\2\0\4\11\1\0\22\11\22\0\2\11\1\0\2\11"+ + "\5\0\3\11\1\0\1\11\1\0\1\11\3\0\1\11"+ + "\2\0\4\11\1\0\3\11\1\344\16\11\22\0\2\11"+ + "\1\0\2\11\5\0\3\11\1\0\1\11\1\0\1\11"+ + "\3\0\1\11\2\0\4\11\1\0\3\11\1\345\16\11"+ + "\21\0"; private static int [] zzUnpackTrans() { - int [] result = new int[9600]; + int [] result = new int[9472]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; @@ -497,16 +517,16 @@ class _JetLexer implements FlexLexer { private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\5\0\1\11\15\1\2\11\22\1\1\11\2\1\1\11"+ + "\6\0\1\11\14\1\2\11\23\1\1\11\2\1\1\11"+ "\4\1\7\11\1\1\1\11\1\1\1\0\2\11\2\1"+ - "\1\0\1\1\2\11\1\0\1\1\1\0\1\1\1\0"+ - "\1\1\1\0\1\11\2\1\2\11\4\1\5\11\1\1"+ - "\1\0\27\1\1\0\1\1\1\0\1\11\1\0\2\11"+ - "\1\1\5\11\1\1\1\0\2\11\1\1\2\0\1\1"+ - "\1\11\1\1\1\11\2\0\2\1\4\0\1\11\15\1"+ - "\1\11\14\1\4\11\2\0\1\11\1\1\2\11\1\0"+ - "\1\1\1\11\1\1\1\0\22\1\2\11\1\0\1\1"+ - "\1\11\1\0\13\1\1\0\7\1"; + "\1\0\1\1\1\11\2\1\2\11\1\0\1\1\1\0"+ + "\1\1\1\0\1\1\1\0\1\11\2\1\1\11\4\1"+ + "\5\11\1\1\1\0\7\1\1\11\20\1\1\0\1\1"+ + "\1\0\1\11\1\0\2\11\1\1\5\11\1\1\1\0"+ + "\2\11\1\1\2\0\1\1\3\11\1\1\1\11\2\0"+ + "\1\11\4\0\1\11\15\1\1\11\14\1\4\11\2\0"+ + "\1\11\1\1\2\11\1\1\1\0\22\1\2\11\1\0"+ + "\14\1\1\0\7\1"; private static int [] zzUnpackAttribute() { int [] result = new int[229]; @@ -576,11 +596,19 @@ class _JetLexer implements FlexLexer { this.state = state; this.lBraceCount = lBraceCount; } + + @Override + public String toString() { + return "yystate = " + state + (lBraceCount == 0 ? "" : "lBraceCount = " + lBraceCount); + } } private final Stack states = new Stack(); private int lBraceCount; + private int commentStart; + private int commentDepth; + private void pushState(int state) { states.push(new State(yystate(), lBraceCount)); lBraceCount = 0; @@ -593,6 +621,26 @@ class _JetLexer implements FlexLexer { yybegin(state.state); } + private boolean atCommentState() { + int state = yystate(); + return state == BLOCK_COMMENT || state == DOC_COMMENT; + } + + private IElementType commentStateToTokenType(int state) { + switch (state) { + case BLOCK_COMMENT: + return JetTokens.BLOCK_COMMENT; + case DOC_COMMENT: + return JetTokens.DOC_COMMENT; + default: + throw new IllegalArgumentException("Unexpected state: " + state); + } + } + + void p(Object o) { + System.out.println(o); + } + _JetLexer(java.io.Reader in) { this.zzReader = in; @@ -757,7 +805,8 @@ class _JetLexer implements FlexLexer { private void zzDoEOF() { if (!zzEOFDone) { zzEOFDone = true; - + return; + } } @@ -843,24 +892,24 @@ class _JetLexer implements FlexLexer { case 3: { return JetTokens.IDENTIFIER; } - case 100: break; - case 11: + case 103: break; + case 10: { pushState(STRING); return JetTokens.OPEN_QUOTE; } - case 101: break; - case 71: + case 104: break; + case 74: { return JetTokens.FOR_KEYWORD ; } - case 102: break; - case 97: + case 105: break; + case 100: { return JetTokens.RETURN_KEYWORD ; } - case 103: break; - case 83: + case 106: break; + case 86: { return JetTokens.NULL_KEYWORD ; } - case 104: break; - case 34: + case 107: break; + case 35: { if (lBraceCount == 0) { popState(); return JetTokens.LONG_TEMPLATE_ENTRY_END; @@ -868,386 +917,427 @@ class _JetLexer implements FlexLexer { lBraceCount--; return JetTokens.RBRACE; } - case 105: break; + case 108: break; case 15: { return JetTokens.LT ; } - case 106: break; - case 51: + case 109: break; + case 52: { return JetTokens.DO_KEYWORD ; } - case 107: break; + case 110: break; case 20: { return JetTokens.PLUS ; } - case 108: break; - case 57: + case 111: break; + case 58: { return JetTokens.PLUSEQ ; } - case 109: break; - case 88: + case 112: break; + case 91: { popState(); return JetTokens.THIS_KEYWORD; } - case 110: break; + case 113: break; case 28: { return JetTokens.COMMA ; } - case 111: break; + case 114: break; case 17: { return JetTokens.GT ; } - case 112: break; + case 115: break; case 4: { return JetTokens.WHITE_SPACE; } - case 113: break; + case 116: break; case 25: { return JetTokens.RPAR ; } - case 114: break; - case 55: + case 117: break; + case 56: { return JetTokens.DOUBLE_ARROW; } - case 115: break; - case 81: + case 118: break; + case 84: { return JetTokens.TRUE_KEYWORD ; } - case 116: break; - case 77: + case 119: break; + case 80: { return JetTokens.IDE_TEMPLATE_START ; } - case 117: break; - case 36: + case 120: break; + case 37: { return JetTokens.FIELD_IDENTIFIER; } - case 118: break; - case 59: + case 121: break; + case 60: { return JetTokens.ANDAND ; } - case 119: break; - case 63: + case 122: break; + case 64: { pushState(LONG_TEMPLATE_ENTRY); return JetTokens.LONG_TEMPLATE_ENTRY_START; } - case 120: break; - case 66: - { return JetTokens.DOC_COMMENT; - } - case 121: break; - case 35: + case 123: break; + case 36: { return JetTokens.FLOAT_LITERAL; } - case 122: break; - case 39: + case 124: break; + case 40: { return JetTokens.EOL_COMMENT; } - case 123: break; - case 85: + case 125: break; + case 88: { return JetTokens.WHEN_KEYWORD ; } - case 124: break; - case 67: + case 126: break; + case 70: { pushState(RAW_STRING); return JetTokens.OPEN_QUOTE; } - case 125: break; + case 127: break; case 26: { return JetTokens.COLON ; } - case 126: break; - case 53: + case 128: break; + case 54: { return JetTokens.LTEQ ; } - case 127: break; + case 129: break; case 45: { return JetTokens.ARROW ; } - case 128: break; + case 130: break; case 32: { popState(); return JetTokens.IDENTIFIER; } - case 129: break; + case 131: break; case 22: { return JetTokens.LBRACKET ; } - case 130: break; - case 65: + case 132: break; + case 68: { yypushback(2); return JetTokens.INTEGER_LITERAL; } - case 131: break; - case 10: + case 133: break; + case 9: { return JetTokens.CHARACTER_LITERAL; } - case 132: break; - case 72: + case 134: break; + case 75: { return JetTokens.VAR_KEYWORD ; } - case 133: break; - case 54: + case 135: break; + case 55: { return JetTokens.GTEQ ; } - case 134: break; + case 136: break; case 2: { return JetTokens.INTEGER_LITERAL; } - case 135: break; - case 13: + case 137: break; + case 12: { return JetTokens.RBRACE ; } - case 136: break; - case 92: + case 138: break; + case 95: { return JetTokens.CLASS_KEYWORD ; } - case 137: break; + case 139: break; case 14: { return JetTokens.EXCL ; } - case 138: break; - case 68: + case 140: break; + case 71: { return JetTokens.TRY_KEYWORD ; } - case 139: break; - case 52: + case 141: break; + case 53: { return JetTokens.EXCLEQ ; } - case 140: break; + case 142: break; case 46: { return JetTokens.MINUSEQ ; } - case 141: break; - case 98: + case 143: break; + case 101: { return JetTokens.PACKAGE_KEYWORD ; } - case 142: break; - case 89: + case 144: break; + case 92: { return JetTokens.THROW_KEYWORD ; } - case 143: break; - case 91: + case 145: break; + case 94: { return JetTokens.SUPER_KEYWORD ; } - case 144: break; - case 94: + case 146: break; + case 67: + { if (commentDepth > 0) { + commentDepth--; + } + else { + int state = yystate(); + popState(); + zzStartRead = commentStart; + return commentStateToTokenType(state); + } + } + case 147: break; + case 97: { return JetTokens.WHILE_KEYWORD ; } - case 145: break; + case 148: break; case 44: { return JetTokens.MINUSMINUS; } - case 146: break; - case 99: - { return JetTokens.CONTINUE_KEYWORD ; - } - case 147: break; - case 75: - { return JetTokens.NOT_IN; - } - case 148: break; - case 38: - { return JetTokens.ATAT ; - } case 149: break; - case 6: - { return JetTokens.DIV ; + case 102: + { return JetTokens.CONTINUE_KEYWORD ; } case 150: break; case 78: - { return JetTokens.IDE_TEMPLATE_END ; + { return JetTokens.NOT_IN; } case 151: break; - case 37: - { return JetTokens.LABEL_IDENTIFIER; + case 39: + { return JetTokens.ATAT ; } case 152: break; + case 6: + { return JetTokens.DIV ; + } + case 153: break; + case 81: + { return JetTokens.IDE_TEMPLATE_END ; + } + case 154: break; + case 38: + { return JetTokens.LABEL_IDENTIFIER; + } + case 155: break; case 29: { return JetTokens.REGULAR_STRING_PART; } - case 153: break; + case 156: break; case 19: { return JetTokens.QUEST ; } - case 154: break; - case 60: + case 157: break; + case 69: + { pushState(DOC_COMMENT); + commentDepth = 0; + commentStart = getTokenStart(); + } + case 158: break; + case 61: { return JetTokens.OROR ; } - case 155: break; + case 159: break; case 21: { return JetTokens.PERC ; } - case 156: break; - case 76: + case 160: break; + case 79: { return JetTokens.EXCLEQEQEQ; } - case 157: break; - case 61: + case 161: break; + case 62: { return JetTokens.PERCEQ ; } - case 158: break; + case 162: break; case 43: { return JetTokens.RANGE ; } - case 159: break; + case 163: break; case 1: { return TokenType.BAD_CHARACTER; } - case 160: break; - case 62: + case 164: break; + case 63: { pushState(SHORT_TEMPLATE_ENTRY); yypushback(yylength() - 1); return JetTokens.SHORT_TEMPLATE_ENTRY_START; } - case 161: break; - case 74: + case 165: break; + case 77: { return JetTokens.NOT_IS; } - case 162: break; - case 7: + case 166: break; + case 13: { return JetTokens.MUL ; } - case 163: break; + case 167: break; case 23: { return JetTokens.RBRACKET ; } - case 164: break; - case 58: + case 168: break; + case 59: { return JetTokens.PLUSPLUS ; } - case 165: break; - case 80: + case 169: break; + case 41: + { pushState(BLOCK_COMMENT); + commentDepth = 0; + commentStart = getTokenStart(); + } + case 170: break; + case 83: { return JetTokens.THIS_KEYWORD ; } - case 166: break; - case 8: + case 171: break; + case 7: { return JetTokens.DOT ; } - case 167: break; + case 172: break; case 27: { return JetTokens.SEMICOLON ; } - case 168: break; + case 173: break; case 49: { return JetTokens.IF_KEYWORD ; } - case 169: break; - case 64: + case 174: break; + case 65: { return JetTokens.ESCAPE_SEQUENCE; } - case 170: break; + case 175: break; case 31: { popState(); return JetTokens.CLOSING_QUOTE; } - case 171: break; + case 176: break; case 18: { return JetTokens.EQ ; } - case 172: break; + case 177: break; case 5: { return JetTokens.AT ; } - case 173: break; - case 69: + case 178: break; + case 72: { return JetTokens.AS_SAFE; } - case 174: break; + case 179: break; case 24: { return JetTokens.LPAR ; } - case 175: break; - case 9: + case 180: break; + case 8: { return JetTokens.MINUS ; } - case 176: break; - case 95: + case 181: break; + case 98: { return JetTokens.FALSE_KEYWORD ; } - case 177: break; - case 82: + case 182: break; + case 85: { return JetTokens.TYPE_KEYWORD ; } - case 178: break; - case 70: + case 183: break; + case 66: + { commentDepth++; + } + case 184: break; + case 73: { return JetTokens.FUN_KEYWORD ; } - case 179: break; + case 185: break; case 47: { return JetTokens.IS_KEYWORD ; } - case 180: break; + case 186: break; case 30: { popState(); yypushback(1); return JetTokens.DANGLING_NEWLINE; } - case 181: break; - case 33: + case 187: break; + case 34: { lBraceCount++; return JetTokens.LBRACE; } - case 182: break; - case 87: + case 188: break; + case 90: { yypushback(3); return JetTokens.EXCL; } - case 183: break; - case 41: + case 189: break; + case 42: { return JetTokens.DIVEQ ; } - case 184: break; - case 84: + case 190: break; + case 87: { return JetTokens.ELSE_KEYWORD ; } - case 185: break; - case 50: + case 191: break; + case 51: { return JetTokens.AS_KEYWORD ; } - case 186: break; + case 192: break; case 48: { return JetTokens.IN_KEYWORD ; } - case 187: break; - case 56: + case 193: break; + case 57: { return JetTokens.EQEQ ; } - case 188: break; - case 79: + case 194: break; + case 82: { return JetTokens.EQEQEQ ; } - case 189: break; - case 73: + case 195: break; + case 76: { return JetTokens.VAL_KEYWORD ; } - case 190: break; - case 86: + case 196: break; + case 89: { return JetTokens.CAPITALIZED_THIS_KEYWORD ; } - case 191: break; - case 42: + case 197: break; + case 50: { return JetTokens.MULTEQ ; } - case 192: break; - case 12: + case 198: break; + case 11: { return JetTokens.LBRACE ; } - case 193: break; - case 96: + case 199: break; + case 99: { return JetTokens.OBJECT_KEYWORD ; } - case 194: break; - case 93: + case 200: break; + case 96: { return JetTokens.BREAK_KEYWORD ; } - case 195: break; - case 40: - { return JetTokens.BLOCK_COMMENT; - } - case 196: break; - case 90: + case 201: break; + case 93: { return JetTokens.TRAIT_KEYWORD ; } - case 197: break; + case 202: break; + case 33: + { + } + case 203: break; case 16: { return JetTokens.HASH ; } - case 198: break; + case 204: break; default: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { zzAtEOF = true; zzDoEOF(); + switch (zzLexicalState) { + case BLOCK_COMMENT: { + int state = yystate(); + popState(); + zzStartRead = commentStart; + return commentStateToTokenType(state); + } + case 230: break; + case DOC_COMMENT: { + int state = yystate(); + popState(); + zzStartRead = commentStart; + return commentStateToTokenType(state); + } + case 231: break; + default: return null; + } } else { zzScanError(ZZ_NO_MATCH); diff --git a/compiler/testData/psi/BlockCommentAtBeginningOfFile1.jet b/compiler/testData/psi/BlockCommentAtBeginningOfFile1.jet new file mode 100644 index 00000000000..22e83649f7d --- /dev/null +++ b/compiler/testData/psi/BlockCommentAtBeginningOfFile1.jet @@ -0,0 +1 @@ +/* \ No newline at end of file diff --git a/compiler/testData/psi/BlockCommentAtBeginningOfFile1.txt b/compiler/testData/psi/BlockCommentAtBeginningOfFile1.txt new file mode 100644 index 00000000000..caa38bde685 --- /dev/null +++ b/compiler/testData/psi/BlockCommentAtBeginningOfFile1.txt @@ -0,0 +1,4 @@ +JetFile: BlockCommentAtBeginningOfFile1.jet + PsiComment(BLOCK_COMMENT)('/*') + NAMESPACE_HEADER + \ No newline at end of file diff --git a/compiler/testData/psi/BlockCommentAtBeginningOfFile2.jet b/compiler/testData/psi/BlockCommentAtBeginningOfFile2.jet new file mode 100644 index 00000000000..ea041783433 --- /dev/null +++ b/compiler/testData/psi/BlockCommentAtBeginningOfFile2.jet @@ -0,0 +1,2 @@ +/* +/* \ No newline at end of file diff --git a/compiler/testData/psi/BlockCommentAtBeginningOfFile2.txt b/compiler/testData/psi/BlockCommentAtBeginningOfFile2.txt new file mode 100644 index 00000000000..44c693c5596 --- /dev/null +++ b/compiler/testData/psi/BlockCommentAtBeginningOfFile2.txt @@ -0,0 +1,4 @@ +JetFile: BlockCommentAtBeginningOfFile2.jet + PsiComment(BLOCK_COMMENT)('/*\n/*') + NAMESPACE_HEADER + \ No newline at end of file diff --git a/compiler/testData/psi/BlockCommentAtBeginningOfFile3.jet b/compiler/testData/psi/BlockCommentAtBeginningOfFile3.jet new file mode 100644 index 00000000000..21f8d3fc118 --- /dev/null +++ b/compiler/testData/psi/BlockCommentAtBeginningOfFile3.jet @@ -0,0 +1,3 @@ +/* + +fooo \ No newline at end of file diff --git a/compiler/testData/psi/BlockCommentAtBeginningOfFile3.txt b/compiler/testData/psi/BlockCommentAtBeginningOfFile3.txt new file mode 100644 index 00000000000..57e41e65171 --- /dev/null +++ b/compiler/testData/psi/BlockCommentAtBeginningOfFile3.txt @@ -0,0 +1,4 @@ +JetFile: BlockCommentAtBeginningOfFile3.jet + PsiComment(BLOCK_COMMENT)('/*\n\nfooo') + NAMESPACE_HEADER + \ No newline at end of file diff --git a/compiler/testData/psi/BlockCommentAtBeginningOfFile4.jet b/compiler/testData/psi/BlockCommentAtBeginningOfFile4.jet new file mode 100644 index 00000000000..b924e8957ea --- /dev/null +++ b/compiler/testData/psi/BlockCommentAtBeginningOfFile4.jet @@ -0,0 +1,5 @@ +/* + +/*foo*/ + +asdfas \ No newline at end of file diff --git a/compiler/testData/psi/BlockCommentAtBeginningOfFile4.txt b/compiler/testData/psi/BlockCommentAtBeginningOfFile4.txt new file mode 100644 index 00000000000..7ca748707c9 --- /dev/null +++ b/compiler/testData/psi/BlockCommentAtBeginningOfFile4.txt @@ -0,0 +1,4 @@ +JetFile: BlockCommentAtBeginningOfFile4.jet + PsiComment(BLOCK_COMMENT)('/*\n\n/*foo*/\n\nasdfas') + NAMESPACE_HEADER + \ No newline at end of file diff --git a/compiler/testData/psi/DocCommentAtBeginningOfFile1.jet b/compiler/testData/psi/DocCommentAtBeginningOfFile1.jet new file mode 100644 index 00000000000..45ee88f1bef --- /dev/null +++ b/compiler/testData/psi/DocCommentAtBeginningOfFile1.jet @@ -0,0 +1 @@ +/** \ No newline at end of file diff --git a/compiler/testData/psi/DocCommentAtBeginningOfFile1.txt b/compiler/testData/psi/DocCommentAtBeginningOfFile1.txt new file mode 100644 index 00000000000..b0c76e51b08 --- /dev/null +++ b/compiler/testData/psi/DocCommentAtBeginningOfFile1.txt @@ -0,0 +1,4 @@ +JetFile: DocCommentAtBeginningOfFile1.jet + PsiComment(DOC_COMMENT)('/**') + NAMESPACE_HEADER + \ No newline at end of file diff --git a/compiler/testData/psi/DocCommentAtBeginningOfFile2.jet b/compiler/testData/psi/DocCommentAtBeginningOfFile2.jet new file mode 100644 index 00000000000..4ec74d84f6a --- /dev/null +++ b/compiler/testData/psi/DocCommentAtBeginningOfFile2.jet @@ -0,0 +1,2 @@ +/** +/** \ No newline at end of file diff --git a/compiler/testData/psi/DocCommentAtBeginningOfFile2.txt b/compiler/testData/psi/DocCommentAtBeginningOfFile2.txt new file mode 100644 index 00000000000..b6686bdc4a1 --- /dev/null +++ b/compiler/testData/psi/DocCommentAtBeginningOfFile2.txt @@ -0,0 +1,4 @@ +JetFile: DocCommentAtBeginningOfFile2.jet + PsiComment(DOC_COMMENT)('/**\n/**') + NAMESPACE_HEADER + \ No newline at end of file diff --git a/compiler/testData/psi/DocCommentAtBeginningOfFile3.jet b/compiler/testData/psi/DocCommentAtBeginningOfFile3.jet new file mode 100644 index 00000000000..674692b878e --- /dev/null +++ b/compiler/testData/psi/DocCommentAtBeginningOfFile3.jet @@ -0,0 +1,3 @@ +/** + +fooo \ No newline at end of file diff --git a/compiler/testData/psi/DocCommentAtBeginningOfFile3.txt b/compiler/testData/psi/DocCommentAtBeginningOfFile3.txt new file mode 100644 index 00000000000..9e62678cdd3 --- /dev/null +++ b/compiler/testData/psi/DocCommentAtBeginningOfFile3.txt @@ -0,0 +1,4 @@ +JetFile: DocCommentAtBeginningOfFile3.jet + PsiComment(DOC_COMMENT)('/**\n\nfooo') + NAMESPACE_HEADER + \ No newline at end of file diff --git a/compiler/testData/psi/DocCommentAtBeginningOfFile4.jet b/compiler/testData/psi/DocCommentAtBeginningOfFile4.jet new file mode 100644 index 00000000000..9f927c11fca --- /dev/null +++ b/compiler/testData/psi/DocCommentAtBeginningOfFile4.jet @@ -0,0 +1,5 @@ +/** + +/**foo*/ + +asdfas \ No newline at end of file diff --git a/compiler/testData/psi/DocCommentAtBeginningOfFile4.txt b/compiler/testData/psi/DocCommentAtBeginningOfFile4.txt new file mode 100644 index 00000000000..3c3a4906909 --- /dev/null +++ b/compiler/testData/psi/DocCommentAtBeginningOfFile4.txt @@ -0,0 +1,4 @@ +JetFile: DocCommentAtBeginningOfFile4.jet + PsiComment(DOC_COMMENT)('/**\n\n/**foo*/\n\nasdfas') + NAMESPACE_HEADER + \ No newline at end of file diff --git a/compiler/testData/psi/NestedComments.jet b/compiler/testData/psi/NestedComments.jet new file mode 100644 index 00000000000..a2be7763b75 --- /dev/null +++ b/compiler/testData/psi/NestedComments.jet @@ -0,0 +1,19 @@ +fun doo() { +/*/b +// */ +b +/**/ +b +/* */ +b +/*/**/*/ +b +/***/ +b +/**/***/*/ +b +/** /** + +*/***/ +b +} \ No newline at end of file diff --git a/compiler/testData/psi/NestedComments.txt b/compiler/testData/psi/NestedComments.txt new file mode 100644 index 00000000000..7e3b37e27ba --- /dev/null +++ b/compiler/testData/psi/NestedComments.txt @@ -0,0 +1,34 @@ +JetFile: NestedComments.jet + NAMESPACE_HEADER + + FUN + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('doo') + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n') + PsiComment(BLOCK_COMMENT)('/*/b\n// */') + PsiWhiteSpace('\n') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace('\n') + PsiComment(DOC_COMMENT)('/**/\nb\n/* */\nb\n/*/**/*/\nb\n/***/\nb\n/**/***/') + PsiErrorElement:Expecting an element + PsiElement(MUL)('*') + PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line) + PsiElement(DIV)('/') + PsiWhiteSpace('\n') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace('\n') + PsiComment(DOC_COMMENT)('/** /**\n\n*/***/') + PsiWhiteSpace('\n') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace('\n') + PsiElement(RBRACE)('}') \ No newline at end of file