From 7341a82b0bdb46a05770ac5b211ac779badc898d Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Thu, 22 Mar 2012 12:36:40 +0100 Subject: [PATCH 1/6] Support for !! (analog of sure()/npe()) --- .../jet/lang/diagnostics/Errors.java | 1 + .../lang/parsing/JetExpressionParsing.java | 8 +- .../BasicExpressionTypingVisitor.java | 57 +- .../src/org/jetbrains/jet/lexer/Jet.flex | 1 + .../org/jetbrains/jet/lexer/JetTokens.java | 3 +- .../org/jetbrains/jet/lexer/_JetLexer.java | 713 +++++++++--------- .../nullabilityAndAutoCasts/AssertNotNull.jet | 35 + grammar/src/expressions.grm | 2 +- .../annotations/DebugInfoAnnotator.java | 2 +- .../formatter/JetFormattingModelBuilder.java | 2 +- 10 files changed, 449 insertions(+), 375 deletions(-) create mode 100644 compiler/testData/diagnostics/tests/nullabilityAndAutoCasts/AssertNotNull.jet diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java index c599e0e1d84..1ca46d8fbae 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/Errors.java @@ -322,6 +322,7 @@ public interface Errors { DiagnosticFactory AMBIGUOUS_LABEL = DiagnosticFactory.create(ERROR, "Ambiguous label"); DiagnosticFactory1 UNSUPPORTED = DiagnosticFactory1.create(ERROR, "Unsupported [{0}]"); DiagnosticFactory1 UNNECESSARY_SAFE_CALL = DiagnosticFactory1.create(WARNING, "Unnecessary safe call on a non-null receiver of type {0}"); + DiagnosticFactory1 UNNECESSARY_NOT_NULL_ASSERTION = DiagnosticFactory1.create(WARNING, "Unnecessary non-null assertion (!!) on a non-null receiver of type {0}"); DiagnosticFactory2 NAME_IN_CONSTRAINT_IS_NOT_A_TYPE_PARAMETER = DiagnosticFactory2.create(ERROR, "{0} does not refer to a type parameter of {1}", new Renderer() { @NotNull @Override diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java b/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java index 0831cff822c..301b719e26c 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java @@ -53,7 +53,7 @@ public class JetExpressionParsing extends AbstractJetParsing { FUN_KEYWORD, FOR_KEYWORD, NULL_KEYWORD, TRUE_KEYWORD, FALSE_KEYWORD, IS_KEYWORD, THROW_KEYWORD, RETURN_KEYWORD, BREAK_KEYWORD, CONTINUE_KEYWORD, OBJECT_KEYWORD, IF_KEYWORD, TRY_KEYWORD, ELSE_KEYWORD, WHILE_KEYWORD, DO_KEYWORD, - WHEN_KEYWORD, RBRACKET, RBRACE, RPAR, PLUSPLUS, MINUSMINUS, + WHEN_KEYWORD, RBRACKET, RBRACE, RPAR, PLUSPLUS, MINUSMINUS, EXCLEXCL, // MUL, PLUS, MINUS, EXCL, DIV, PERC, LTEQ, // TODO GTEQ, foo=x @@ -126,7 +126,7 @@ public class JetExpressionParsing extends AbstractJetParsing { @SuppressWarnings({"UnusedDeclaration"}) private enum Precedence { - POSTFIX(PLUSPLUS, MINUSMINUS, + POSTFIX(PLUSPLUS, MINUSMINUS, EXCLEXCL, // HASH, DOT, SAFE_ACCESS), // typeArguments? valueArguments : typeArguments : arrayAccess @@ -235,7 +235,7 @@ public class JetExpressionParsing extends AbstractJetParsing { opSet.removeAll(usedSet); assert false : opSet; } - assert usedSet.size() == opSet.size(); + assert usedSet.size() == opSet.size() : "Either some operations are unused, or something that's not an operation is used"; usedSet.removeAll(opSet); @@ -350,7 +350,7 @@ public class JetExpressionParsing extends AbstractJetParsing { * atomicExpression postfixUnaryOperation? * * postfixUnaryOperation - * : "++" : "--" + * : "++" : "--" : "!!" * : typeArguments? valueArguments (getEntryPoint? functionLiteral) * : typeArguments (getEntryPoint? functionLiteral) * : arrayAccess diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/BasicExpressionTypingVisitor.java b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/BasicExpressionTypingVisitor.java index f6eee07a0f0..6e52b10a73f 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/BasicExpressionTypingVisitor.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/BasicExpressionTypingVisitor.java @@ -33,6 +33,7 @@ import org.jetbrains.jet.lang.resolve.calls.CallMaker; import org.jetbrains.jet.lang.resolve.calls.OverloadResolutionResults; import org.jetbrains.jet.lang.resolve.calls.OverloadResolutionResultsUtil; import org.jetbrains.jet.lang.resolve.calls.autocasts.DataFlowInfo; +import org.jetbrains.jet.lang.resolve.calls.autocasts.DataFlowValueFactory; import org.jetbrains.jet.lang.resolve.constants.*; import org.jetbrains.jet.lang.resolve.constants.StringValue; import org.jetbrains.jet.lang.resolve.scopes.JetScope; @@ -661,7 +662,10 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor { public JetType visitUnaryExpression(JetUnaryExpression expression, ExpressionTypingContext context, boolean isStatement) { JetExpression baseExpression = expression.getBaseExpression(); if (baseExpression == null) return null; + JetSimpleNameExpression operationSign = expression.getOperationReference(); + + // If it's a labeled expression if (JetTokens.LABELS.contains(operationSign.getReferencedNameElementType())) { String referencedName = operationSign.getReferencedName(); referencedName = referencedName == null ? " " : referencedName; @@ -672,12 +676,10 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor { context.labelResolver.exitLabeledElement(baseExpression); return DataFlowUtils.checkType(type, expression, context); } + IElementType operationType = operationSign.getReferencedNameElementType(); - String name = OperatorConventions.UNARY_OPERATION_NAMES.get(operationType); - if (name == null) { - context.trace.report(UNSUPPORTED.on(operationSign, "visitUnaryExpression")); - return null; - } + + // Type check the base expression TemporaryBindingTrace temporaryTrace = TemporaryBindingTrace.create(context.trace); BindingTrace initialTrace = context.trace; context = context.replaceBindingTrace(temporaryTrace); @@ -687,6 +689,28 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor { return null; } + // Special case for expr!! + if (operationType == JetTokens.EXCLEXCL) { + JetType result; + if (isKnownToBeNotNull(baseExpression, context)) { + temporaryTrace.report(UNNECESSARY_NOT_NULL_ASSERTION.on(operationSign, type)); + result = type; + } + else { + result = TypeUtils.makeNotNullable(type); + } + temporaryTrace.commit(); + return DataFlowUtils.checkType(result, expression, context); + } + + // Conventions for unary operations + String name = OperatorConventions.UNARY_OPERATION_NAMES.get(operationType); + if (name == null) { + context.trace.report(UNSUPPORTED.on(operationSign, "visitUnaryExpression")); + return null; + } + + // a[i]++/-- takes special treatment because it is actually let j = i, arr = a in arr.set(j, a.get(j).inc()) if ((operationType == JetTokens.PLUSPLUS || operationType == JetTokens.MINUSMINUS) && baseExpression instanceof JetArrayAccessExpression) { JetExpression stubExpression = ExpressionTypingUtils.createStubExpressionOfNecessaryType(baseExpression.getProject(), type, context.trace); resolveArrayAccessSetMethod((JetArrayAccessExpression) baseExpression, stubExpression, context.replaceExpectedType(NO_EXPECTED_TYPE).replaceBindingTrace(TemporaryBindingTrace.create(initialTrace)), context.trace); @@ -694,16 +718,19 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor { ExpressionReceiver receiver = new ExpressionReceiver(baseExpression, type); - OverloadResolutionResults functionDescriptor = context.resolveCallWithGivenNameToDescriptor( + // Resolve the operation reference + OverloadResolutionResults resolutionResults = context.resolveCallWithGivenNameToDescriptor( CallMaker.makeCall(receiver, expression), expression.getOperationReference(), name); - if (!functionDescriptor.isSuccess()) { + if (!resolutionResults.isSuccess()) { temporaryTrace.commit(); return null; } - JetType returnType = functionDescriptor.getResultingDescriptor().getReturnType(); + + // Computing the return type + JetType returnType = resolutionResults.getResultingDescriptor().getReturnType(); JetType result; if (operationType == JetTokens.PLUSPLUS || operationType == JetTokens.MINUSMINUS) { if (JetTypeChecker.INSTANCE.isSubtypeOf(returnType, JetStandardClasses.getUnitType())) { @@ -731,6 +758,20 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor { return DataFlowUtils.checkType(result, expression, context); } + private boolean isKnownToBeNotNull(JetExpression expression, ExpressionTypingContext context) { + JetType type = context.trace.get(EXPRESSION_TYPE, expression); + assert type != null : "This method is only supposed to be called when the type is not null"; + if (!type.isNullable()) return true; + List possibleTypes = context.dataFlowInfo + .getPossibleTypes(DataFlowValueFactory.INSTANCE.createDataFlowValue(expression, type, context.trace.getBindingContext())); + for (JetType possibleType : possibleTypes) { + if (!possibleType.isNullable()) { + return true; + } + } + return false; + } + public void checkLValue(BindingTrace trace, JetExpression expression) { checkLValue(trace, expression, false); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex b/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex index 47b556c9af2..31d590dad2d 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex +++ b/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex @@ -266,6 +266,7 @@ LONG_TEMPLATE_ENTRY_END=\} ">=" { return JetTokens.GTEQ ; } "==" { return JetTokens.EQEQ ; } "!=" { return JetTokens.EXCLEQ ; } +"!!" { return JetTokens.EXCLEXCL ; } "&&" { return JetTokens.ANDAND ; } "||" { return JetTokens.OROR ; } //"?." { return JetTokens.SAFE_ACCESS;} diff --git a/compiler/frontend/src/org/jetbrains/jet/lexer/JetTokens.java b/compiler/frontend/src/org/jetbrains/jet/lexer/JetTokens.java index f581555c309..368b102bf55 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lexer/JetTokens.java +++ b/compiler/frontend/src/org/jetbrains/jet/lexer/JetTokens.java @@ -107,6 +107,7 @@ public interface JetTokens { JetToken EXCLEQEQEQ = new JetToken("EXCLEQEQEQ"); JetToken EQEQ = new JetToken("EQEQ"); JetToken EXCLEQ = new JetToken("EXCLEQ"); + JetToken EXCLEXCL = new JetToken("EXCLEXCL"); JetToken ANDAND = new JetToken("ANDAND"); JetToken OROR = new JetToken("OROR"); JetToken SAFE_ACCESS = new JetToken("SAFE_ACCESS"); @@ -184,7 +185,7 @@ public interface JetTokens { TokenSet COMMENTS = TokenSet.create(EOL_COMMENT, BLOCK_COMMENT, DOC_COMMENT); TokenSet STRINGS = TokenSet.create(CHARACTER_LITERAL, REGULAR_STRING_PART); - TokenSet OPERATIONS = TokenSet.create(AS_KEYWORD, AS_SAFE, IS_KEYWORD, IN_KEYWORD, DOT, PLUSPLUS, MINUSMINUS, MUL, PLUS, + TokenSet OPERATIONS = TokenSet.create(AS_KEYWORD, AS_SAFE, IS_KEYWORD, IN_KEYWORD, DOT, PLUSPLUS, MINUSMINUS, EXCLEXCL, MUL, PLUS, MINUS, EXCL, DIV, PERC, LT, GT, LTEQ, GTEQ, EQEQEQ, EXCLEQEQEQ, EQEQ, EXCLEQ, ANDAND, OROR, SAFE_ACCESS, ELVIS, // MAP, FILTER, diff --git a/compiler/frontend/src/org/jetbrains/jet/lexer/_JetLexer.java b/compiler/frontend/src/org/jetbrains/jet/lexer/_JetLexer.java index b73cfa28121..4ac369ff1e3 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lexer/_JetLexer.java +++ b/compiler/frontend/src/org/jetbrains/jet/lexer/_JetLexer.java @@ -1,4 +1,4 @@ -/* The following code was generated by JFlex 1.4.3 on 3/21/12 3:48 PM */ +/* The following code was generated by JFlex 1.4.3 on 3/22/12 10:33 AM */ package org.jetbrains.jet.lexer; @@ -12,7 +12,7 @@ import java.util.Stack; /** * This class is a scanner generated by * JFlex 1.4.3 - * on 3/21/12 3:48 PM from the specification file + * on 3/22/12 10:33 AM from the specification file * /Users/abreslav/work/jet/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex */ class _JetLexer implements FlexLexer { @@ -130,20 +130,20 @@ class _JetLexer implements FlexLexer { "\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"; + "\6\3\1\63\10\3\1\64\1\0\1\65\1\66\1\0"+ + "\1\67\1\0\1\70\1\71\1\72\1\73\1\74\1\75"+ + "\1\76\1\77\1\100\1\0\1\101\2\102\2\0\1\40"+ + "\1\103\1\104\1\105\1\44\1\3\2\0\1\106\4\0"+ + "\1\107\4\3\1\110\10\3\1\111\4\3\1\112\1\113"+ + "\2\3\1\114\1\115\1\116\1\117\1\120\1\121\1\122"+ + "\1\123\2\0\2\40\1\45\1\46\1\44\1\0\1\124"+ + "\1\3\1\125\1\3\1\126\4\3\1\127\1\130\4\3"+ + "\1\131\1\3\1\132\1\133\1\100\1\0\1\134\1\135"+ + "\1\136\1\137\1\3\1\140\3\3\1\141\1\142\1\143"+ + "\1\0\1\3\1\144\1\3\1\145\1\3\1\146\1\147"; private static int [] zzUnpackAction() { - int [] result = new int[229]; + int [] result = new int[230]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; @@ -182,24 +182,24 @@ class _JetLexer implements FlexLexer { "\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"; + "\0\u1500\0\u1540\0\u1580\0\u0200\0\u15c0\0\u0180\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]; + int [] result = new int[230]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; @@ -293,187 +293,187 @@ class _JetLexer implements FlexLexer { "\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"+ + "\1\165\24\0\1\166\3\0\1\167\75\0\1\170\1\0"+ + "\1\171\75\0\1\172\1\0\1\173\76\0\1\174\1\175"+ + "\77\0\1\176\1\0\1\177\100\0\1\200\100\0\1\201"+ + "\73\0\1\202\14\0\7\70\2\0\12\70\2\0\53\70"+ + "\2\0\1\203\1\0\1\203\1\0\1\204\5\0\2\203"+ + "\1\0\1\203\1\0\1\203\3\0\1\203\1\205\1\0"+ + "\4\203\1\0\22\203\21\0\7\206\1\0\15\206\1\207"+ + "\52\206\24\0\1\210\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\211\2\0\70\211\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\212\2\77\1\0"+ + "\22\77\55\0\1\213\55\0\1\214\66\0\1\125\11\0"+ + "\1\125\2\0\1\215\62\0\1\216\11\0\1\216\4\0"+ + "\1\216\44\0\1\216\12\0\6\111\1\217\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\220\2\0\70\220\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\221\2\0\70\221"+ + "\7\117\1\0\70\117\34\0\1\222\44\0\1\122\11\0"+ + "\1\122\2\0\1\223\1\110\20\0\1\110\40\0\2\123"+ + "\10\0\1\123\1\0\1\123\1\224\1\123\1\0\1\225"+ + "\13\0\1\123\2\0\1\123\1\225\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\226\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\227"+ + "\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\230\1\11"+ + "\1\0\10\11\1\231\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\232"+ + "\2\0\4\11\1\0\5\11\1\233\10\11\1\234\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\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"+ + "\1\0\4\11\1\236\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\5\11\1\237\14\11\22\0\2\11"+ + "\2\0\4\11\1\0\2\11\1\237\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\12\11\1\240\7\11"+ + "\3\0\1\11\2\0\4\11\1\0\5\11\1\240\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\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"+ + "\1\0\1\11\3\0\1\11\2\0\4\11\1\0\12\11"+ + "\1\241\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\242\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\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\0\3\11\1\243\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\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\2\0\4\11\1\0\1\244\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\245"+ + "\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\246\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"+ - "\14\11\1\253\5\11\22\0\2\11\1\0\2\11\5\0"+ + "\3\11\1\247\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\254\1\11\1\0\22\11\22\0\2\11\1\0"+ + "\2\11\1\250\1\11\1\0\3\11\1\251\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\252"+ + "\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\253\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\254\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\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"+ + "\1\11\2\0\2\11\1\255\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\256"+ + "\3\11\1\257\5\11\54\0\1\260\3\0\1\261\123\0"+ + "\1\262\74\0\1\263\101\0\1\264\100\0\1\265\15\0"+ + "\2\203\1\0\2\203\5\0\3\203\1\0\1\203\1\0"+ + "\1\203\3\0\1\203\2\0\4\203\1\0\22\203\21\0"+ + "\6\266\2\0\70\266\1\0\2\267\10\0\1\267\1\0"+ + "\1\267\1\0\1\267\15\0\1\267\2\0\1\267\1\0"+ + "\1\267\3\0\1\267\3\0\1\267\3\0\1\267\45\0"+ + "\1\74\53\0\6\211\1\270\1\0\70\211\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\271\1\77\1\0\22\77"+ + "\22\0\1\216\11\0\1\216\64\0\6\220\1\272\1\0"+ + "\70\220\6\221\1\273\1\0\70\221\1\0\1\125\11\0"+ + "\1\125\65\0\2\274\10\0\1\274\1\0\1\274\1\215"+ + "\1\274\15\0\1\274\2\0\1\274\1\0\1\274\3\0"+ + "\1\274\3\0\1\274\3\0\1\274\22\0\1\216\11\0"+ + "\1\216\4\0\1\275\44\0\1\275\30\0\1\215\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\276\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\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"+ + "\1\0\1\11\3\0\1\11\2\0\4\11\1\0\1\11"+ + "\1\277\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\300\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\301\16\11\22\0\2\11"+ + "\2\0\2\11\1\301\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\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"+ + "\1\0\1\11\3\0\1\11\2\0\4\11\1\0\3\11"+ + "\1\303\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\304"+ + "\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\305\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\306\5\11\22\0\2\11"+ + "\2\0\4\11\1\0\3\11\1\306\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\307\16\11"+ + "\3\0\1\11\2\0\4\11\1\0\14\11\1\307\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\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\3\0\1\11\2\0\4\11\1\0\3\11"+ + "\1\310\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\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"+ + "\1\0\6\11\1\311\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\312"+ "\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"+ + "\2\0\4\11\1\0\5\11\1\313\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\314\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\315\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\316\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\317\1\0\22\11\22\0\2\320\1\0\2\320"+ + "\5\0\3\320\1\0\1\320\1\0\1\320\3\0\1\320"+ + "\2\0\4\320\1\0\22\320\21\0\6\266\1\321\1\0"+ + "\70\266\1\0\2\322\10\0\1\322\1\0\1\322\1\0"+ + "\1\322\15\0\1\322\2\0\1\322\1\0\1\322\3\0"+ + "\1\322\3\0\1\322\3\0\1\322\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\323\1\0\22\77\22\0\2\274"+ + "\10\0\1\274\1\0\1\274\1\0\1\274\1\0\1\225"+ + "\13\0\1\274\2\0\1\274\1\225\1\274\3\0\1\274"+ + "\3\0\1\274\3\0\1\274\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\324\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\325\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\326"+ + "\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\327"+ + "\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\330\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\331\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\332\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\333"+ + "\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\334\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\335\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\336\16\11\22\0"+ + "\2\337\10\0\1\337\1\0\1\337\1\0\1\337\15\0"+ + "\1\337\2\0\1\337\1\0\1\337\3\0\1\337\3\0"+ + "\1\337\3\0\1\337\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\340\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\341\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\342\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\343\17\11\22\0\2\206\10\0\1\206\1\0\1\206"+ + "\1\0\1\206\15\0\1\206\2\0\1\206\1\0\1\206"+ + "\3\0\1\206\3\0\1\206\3\0\1\206\22\0\2\11"+ + "\1\0\2\11\5\0\3\11\1\0\1\11\1\0\1\11"+ + "\3\0\1\344\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\345\16\11"+ - "\21\0"; + "\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\346\16\11\21\0"; private static int [] zzUnpackTrans() { int [] result = new int[9472]; @@ -521,15 +521,15 @@ class _JetLexer implements FlexLexer { "\4\1\7\11\1\1\1\11\1\1\1\0\2\11\2\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"; + "\5\11\1\1\1\0\7\1\1\11\20\1\1\0\1\11"+ + "\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]; + int [] result = new int[230]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; @@ -621,11 +621,6 @@ 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: @@ -637,10 +632,6 @@ class _JetLexer implements FlexLexer { } } - void p(Object o) { - System.out.println(o); - } - _JetLexer(java.io.Reader in) { this.zzReader = in; @@ -892,23 +883,27 @@ class _JetLexer implements FlexLexer { case 3: { return JetTokens.IDENTIFIER; } - case 103: break; + case 104: break; case 10: { pushState(STRING); return JetTokens.OPEN_QUOTE; } - case 104: break; - case 74: - { return JetTokens.FOR_KEYWORD ; - } case 105: break; - case 100: - { return JetTokens.RETURN_KEYWORD ; + case 53: + { return JetTokens.EXCLEXCL ; } case 106: break; - case 86: - { return JetTokens.NULL_KEYWORD ; + case 75: + { return JetTokens.FOR_KEYWORD ; } case 107: break; + case 101: + { return JetTokens.RETURN_KEYWORD ; + } + case 108: break; + case 87: + { return JetTokens.NULL_KEYWORD ; + } + case 109: break; case 35: { if (lBraceCount == 0) { popState(); @@ -917,160 +912,160 @@ class _JetLexer implements FlexLexer { lBraceCount--; return JetTokens.RBRACE; } - case 108: break; + case 110: break; case 15: { return JetTokens.LT ; } - case 109: break; + case 111: break; case 52: { return JetTokens.DO_KEYWORD ; } - case 110: break; + case 112: break; case 20: { return JetTokens.PLUS ; } - case 111: break; - case 58: + case 113: break; + case 59: { return JetTokens.PLUSEQ ; } - case 112: break; - case 91: + case 114: break; + case 92: { popState(); return JetTokens.THIS_KEYWORD; } - case 113: break; + case 115: break; case 28: { return JetTokens.COMMA ; } - case 114: break; + case 116: break; case 17: { return JetTokens.GT ; } - case 115: break; + case 117: break; case 4: { return JetTokens.WHITE_SPACE; } - case 116: break; + case 118: break; case 25: { return JetTokens.RPAR ; } - case 117: break; - case 56: + case 119: break; + case 57: { return JetTokens.DOUBLE_ARROW; } - case 118: break; - case 84: + case 120: break; + case 85: { return JetTokens.TRUE_KEYWORD ; } - case 119: break; - case 80: + case 121: break; + case 81: { return JetTokens.IDE_TEMPLATE_START ; } - case 120: break; + case 122: break; case 37: { return JetTokens.FIELD_IDENTIFIER; } - case 121: break; - case 60: + case 123: break; + case 61: { return JetTokens.ANDAND ; } - case 122: break; - case 64: + case 124: break; + case 65: { pushState(LONG_TEMPLATE_ENTRY); return JetTokens.LONG_TEMPLATE_ENTRY_START; } - case 123: break; + case 125: break; case 36: { return JetTokens.FLOAT_LITERAL; } - case 124: break; + case 126: break; case 40: { return JetTokens.EOL_COMMENT; } - case 125: break; - case 88: + case 127: break; + case 89: { return JetTokens.WHEN_KEYWORD ; } - case 126: break; - case 70: + case 128: break; + case 71: { pushState(RAW_STRING); return JetTokens.OPEN_QUOTE; } - case 127: break; + case 129: break; case 26: { return JetTokens.COLON ; } - case 128: break; - case 54: + case 130: break; + case 55: { return JetTokens.LTEQ ; } - case 129: break; + case 131: break; case 45: { return JetTokens.ARROW ; } - case 130: break; + case 132: break; case 32: { popState(); return JetTokens.IDENTIFIER; } - case 131: break; + case 133: break; case 22: { return JetTokens.LBRACKET ; } - case 132: break; - case 68: + case 134: break; + case 69: { yypushback(2); return JetTokens.INTEGER_LITERAL; } - case 133: break; + case 135: break; case 9: { return JetTokens.CHARACTER_LITERAL; } - case 134: break; - case 75: + case 136: break; + case 76: { return JetTokens.VAR_KEYWORD ; } - case 135: break; - case 55: + case 137: break; + case 56: { return JetTokens.GTEQ ; } - case 136: break; + case 138: break; case 2: { return JetTokens.INTEGER_LITERAL; } - case 137: break; + case 139: break; case 12: { return JetTokens.RBRACE ; } - case 138: break; - case 95: + case 140: break; + case 96: { return JetTokens.CLASS_KEYWORD ; } - case 139: break; + case 141: break; + case 72: + { return JetTokens.TRY_KEYWORD ; + } + case 142: break; case 14: { return JetTokens.EXCL ; } - case 140: break; - case 71: - { return JetTokens.TRY_KEYWORD ; - } - case 141: break; - case 53: + case 143: break; + case 54: { return JetTokens.EXCLEQ ; } - case 142: break; + case 144: break; case 46: { return JetTokens.MINUSEQ ; } - case 143: break; - case 101: + case 145: break; + case 102: { return JetTokens.PACKAGE_KEYWORD ; } - case 144: break; - case 92: + case 146: break; + case 93: { return JetTokens.THROW_KEYWORD ; } - case 145: break; - case 94: + case 147: break; + case 95: { return JetTokens.SUPER_KEYWORD ; } - case 146: break; - case 67: + case 148: break; + case 68: { if (commentDepth > 0) { commentDepth--; } @@ -1081,241 +1076,241 @@ class _JetLexer implements FlexLexer { return commentStateToTokenType(state); } } - case 147: break; - case 97: + case 149: break; + case 98: { return JetTokens.WHILE_KEYWORD ; } - case 148: break; + case 150: break; case 44: { return JetTokens.MINUSMINUS; } - case 149: break; - case 102: + case 151: break; + case 103: { return JetTokens.CONTINUE_KEYWORD ; } - case 150: break; - case 78: + case 152: break; + case 79: { return JetTokens.NOT_IN; } - case 151: break; + case 153: break; case 39: { return JetTokens.ATAT ; } - case 152: break; + case 154: break; case 6: { return JetTokens.DIV ; } - case 153: break; - case 81: + case 155: break; + case 82: { return JetTokens.IDE_TEMPLATE_END ; } - case 154: break; + case 156: break; case 38: { return JetTokens.LABEL_IDENTIFIER; } - case 155: break; + case 157: break; case 29: { return JetTokens.REGULAR_STRING_PART; } - case 156: break; + case 158: break; case 19: { return JetTokens.QUEST ; } - case 157: break; - case 69: + case 159: break; + case 70: { pushState(DOC_COMMENT); commentDepth = 0; commentStart = getTokenStart(); } - case 158: break; - case 61: + case 160: break; + case 62: { return JetTokens.OROR ; } - case 159: break; + case 161: break; case 21: { return JetTokens.PERC ; } - case 160: break; - case 79: + case 162: break; + case 80: { return JetTokens.EXCLEQEQEQ; } - case 161: break; - case 62: + case 163: break; + case 63: { return JetTokens.PERCEQ ; } - case 162: break; + case 164: break; case 43: { return JetTokens.RANGE ; } - case 163: break; + case 165: break; case 1: { return TokenType.BAD_CHARACTER; } - case 164: break; - case 63: + case 166: break; + case 64: { pushState(SHORT_TEMPLATE_ENTRY); yypushback(yylength() - 1); return JetTokens.SHORT_TEMPLATE_ENTRY_START; } - case 165: break; - case 77: + case 167: break; + case 78: { return JetTokens.NOT_IS; } - case 166: break; + case 168: break; case 13: { return JetTokens.MUL ; } - case 167: break; + case 169: break; case 23: { return JetTokens.RBRACKET ; } - case 168: break; - case 59: + case 170: break; + case 60: { return JetTokens.PLUSPLUS ; } - case 169: break; + case 171: break; case 41: { pushState(BLOCK_COMMENT); commentDepth = 0; commentStart = getTokenStart(); } - case 170: break; - case 83: + case 172: break; + case 84: { return JetTokens.THIS_KEYWORD ; } - case 171: break; + case 173: break; case 7: { return JetTokens.DOT ; } - case 172: break; + case 174: break; case 27: { return JetTokens.SEMICOLON ; } - case 173: break; + case 175: break; case 49: { return JetTokens.IF_KEYWORD ; } - case 174: break; - case 65: + case 176: break; + case 66: { return JetTokens.ESCAPE_SEQUENCE; } - case 175: break; + case 177: break; case 31: { popState(); return JetTokens.CLOSING_QUOTE; } - case 176: break; + case 178: break; case 18: { return JetTokens.EQ ; } - case 177: break; + case 179: break; case 5: { return JetTokens.AT ; } - case 178: break; - case 72: + case 180: break; + case 73: { return JetTokens.AS_SAFE; } - case 179: break; + case 181: break; case 24: { return JetTokens.LPAR ; } - case 180: break; + case 182: break; case 8: { return JetTokens.MINUS ; } - case 181: break; - case 98: + case 183: break; + case 99: { return JetTokens.FALSE_KEYWORD ; } - case 182: break; - case 85: + case 184: break; + case 86: { return JetTokens.TYPE_KEYWORD ; } - case 183: break; - case 66: + case 185: break; + case 67: { commentDepth++; } - case 184: break; - case 73: + case 186: break; + case 74: { return JetTokens.FUN_KEYWORD ; } - case 185: break; + case 187: break; case 47: { return JetTokens.IS_KEYWORD ; } - case 186: break; + case 188: break; case 30: { popState(); yypushback(1); return JetTokens.DANGLING_NEWLINE; } - case 187: break; + case 189: break; case 34: { lBraceCount++; return JetTokens.LBRACE; } - case 188: break; - case 90: + case 190: break; + case 91: { yypushback(3); return JetTokens.EXCL; } - case 189: break; + case 191: break; case 42: { return JetTokens.DIVEQ ; } - case 190: break; - case 87: + case 192: break; + case 88: { return JetTokens.ELSE_KEYWORD ; } - case 191: break; + case 193: break; case 51: { return JetTokens.AS_KEYWORD ; } - case 192: break; + case 194: break; case 48: { return JetTokens.IN_KEYWORD ; } - case 193: break; - case 57: + case 195: break; + case 58: { return JetTokens.EQEQ ; } - case 194: break; - case 82: + case 196: break; + case 83: { return JetTokens.EQEQEQ ; } - case 195: break; - case 76: + case 197: break; + case 77: { return JetTokens.VAL_KEYWORD ; } - case 196: break; - case 89: + case 198: break; + case 90: { return JetTokens.CAPITALIZED_THIS_KEYWORD ; } - case 197: break; + case 199: break; case 50: { return JetTokens.MULTEQ ; } - case 198: break; + case 200: break; case 11: { return JetTokens.LBRACE ; } - case 199: break; - case 99: + case 201: break; + case 100: { return JetTokens.OBJECT_KEYWORD ; } - case 200: break; - case 96: + case 202: break; + case 97: { return JetTokens.BREAK_KEYWORD ; } - case 201: break; - case 93: + case 203: break; + case 94: { return JetTokens.TRAIT_KEYWORD ; } - case 202: break; + case 204: break; case 33: { } - case 203: break; + case 205: break; case 16: { return JetTokens.HASH ; } - case 204: break; + case 206: break; default: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { zzAtEOF = true; @@ -1327,14 +1322,14 @@ class _JetLexer implements FlexLexer { zzStartRead = commentStart; return commentStateToTokenType(state); } - case 230: break; + case 231: break; case DOC_COMMENT: { int state = yystate(); popState(); zzStartRead = commentStart; return commentStateToTokenType(state); } - case 231: break; + case 232: break; default: return null; } diff --git a/compiler/testData/diagnostics/tests/nullabilityAndAutoCasts/AssertNotNull.jet b/compiler/testData/diagnostics/tests/nullabilityAndAutoCasts/AssertNotNull.jet new file mode 100644 index 00000000000..bf91b286d2b --- /dev/null +++ b/compiler/testData/diagnostics/tests/nullabilityAndAutoCasts/AssertNotNull.jet @@ -0,0 +1,35 @@ +fun main(args : Array) { + val a : Int? = null + val b : Int? = null + a!! : Int + a!! + 2 + a!!.plus(2) + a!!.plus(b!!) + 2.plus(b!!) + 2 + b!! + + val c = 1 + c!! + + val d : Any? = null + + if (d != null) { + d!! + } + + if (d is String) { + d!! + } + + if (d is String?) { + if (d != null) { + d!! + } + if (d is String) { + d!! + } + } + + val f : String = a!! + a!! : String +} \ No newline at end of file diff --git a/grammar/src/expressions.grm b/grammar/src/expressions.grm index b0da83d76b1..1c3fc4d0f69 100644 --- a/grammar/src/expressions.grm +++ b/grammar/src/expressions.grm @@ -212,7 +212,7 @@ prefixUnaryOperation ; postfixUnaryOperation - : "++" : "--" + : "++" : "--" : "!!" : callSuffix : arrayAccess : memberAccessOperation postfixUnaryExpression // TODO: Review diff --git a/idea/src/org/jetbrains/jet/plugin/annotations/DebugInfoAnnotator.java b/idea/src/org/jetbrains/jet/plugin/annotations/DebugInfoAnnotator.java index 231bc62bc43..fe144866701 100644 --- a/idea/src/org/jetbrains/jet/plugin/annotations/DebugInfoAnnotator.java +++ b/idea/src/org/jetbrains/jet/plugin/annotations/DebugInfoAnnotator.java @@ -50,7 +50,7 @@ import static org.jetbrains.jet.lexer.JetTokens.*; */ public class DebugInfoAnnotator implements Annotator { - public static final TokenSet EXCLUDED = TokenSet.create(COLON, AS_KEYWORD, AS_SAFE, IS_KEYWORD, NOT_IS, OROR, ANDAND, EQ, EQEQEQ, EXCLEQEQEQ, ELVIS); + public static final TokenSet EXCLUDED = TokenSet.create(COLON, AS_KEYWORD, AS_SAFE, IS_KEYWORD, NOT_IS, OROR, ANDAND, EQ, EQEQEQ, EXCLEQEQEQ, ELVIS, EXCLEXCL); private static volatile boolean debugInfoEnabled = true; diff --git a/idea/src/org/jetbrains/jet/plugin/formatter/JetFormattingModelBuilder.java b/idea/src/org/jetbrains/jet/plugin/formatter/JetFormattingModelBuilder.java index daba83c28db..375b08288cd 100644 --- a/idea/src/org/jetbrains/jet/plugin/formatter/JetFormattingModelBuilder.java +++ b/idea/src/org/jetbrains/jet/plugin/formatter/JetFormattingModelBuilder.java @@ -75,7 +75,7 @@ public class JetFormattingModelBuilder implements FormattingModelBuilder { .aroundInside(TokenSet.create(LT, GT, LTEQ, GTEQ), BINARY_EXPRESSION).spaceIf(jetCommonSettings.SPACE_AROUND_RELATIONAL_OPERATORS) .around(TokenSet.create(PLUS, MINUS)).spaceIf(jetCommonSettings.SPACE_AROUND_ADDITIVE_OPERATORS) .aroundInside(TokenSet.create(MUL, DIV, PERC), BINARY_EXPRESSION).spaceIf(jetCommonSettings.SPACE_AROUND_MULTIPLICATIVE_OPERATORS) - .around(TokenSet.create(PLUSPLUS, MINUSMINUS, MINUS, PLUS, EXCL)).spaceIf(jetCommonSettings.SPACE_AROUND_UNARY_OPERATOR) + .around(TokenSet.create(PLUSPLUS, MINUSMINUS, EXCLEXCL, MINUS, PLUS, EXCL)).spaceIf(jetCommonSettings.SPACE_AROUND_UNARY_OPERATOR) .around(RANGE).spaceIf(jetSettings.SPACE_AROUND_RANGE) .beforeInside(BLOCK, FUN).spaceIf(jetCommonSettings.SPACE_BEFORE_METHOD_LBRACE) From 4cef4ec1709c764952029710ffa48f2b020aee50 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Thu, 22 Mar 2012 15:50:52 +0100 Subject: [PATCH 2/6] Fixed type checking in the case of val s : String = !true --- .../lang/parsing/JetExpressionParsing.java | 2 +- .../BasicExpressionTypingVisitor.java | 26 ++++++++++--------- .../TypeMismatchOnUnaryOperations.jet | 16 ++++++++++++ 3 files changed, 31 insertions(+), 13 deletions(-) create mode 100644 compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.jet diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java b/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java index 301b719e26c..c26a4602b9e 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java @@ -235,7 +235,7 @@ public class JetExpressionParsing extends AbstractJetParsing { opSet.removeAll(usedSet); assert false : opSet; } - assert usedSet.size() == opSet.size() : "Either some operations are unused, or something that's not an operation is used"; + assert usedSet.size() == opSet.size() : "Either some ops are unused, or something a non-op is used"; usedSet.removeAll(opSet); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/BasicExpressionTypingVisitor.java b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/BasicExpressionTypingVisitor.java index 6e52b10a73f..dceace41d84 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/BasicExpressionTypingVisitor.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/BasicExpressionTypingVisitor.java @@ -681,9 +681,8 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor { // Type check the base expression TemporaryBindingTrace temporaryTrace = TemporaryBindingTrace.create(context.trace); - BindingTrace initialTrace = context.trace; - context = context.replaceBindingTrace(temporaryTrace); - JetType type = facade.getType(baseExpression, context.replaceExpectedType(NO_EXPECTED_TYPE)); + ExpressionTypingContext contextWithTemporaryTrace = context.replaceBindingTrace(temporaryTrace); + JetType type = facade.getType(baseExpression, contextWithTemporaryTrace.replaceExpectedType(NO_EXPECTED_TYPE)); if (type == null) { temporaryTrace.commit(); return null; @@ -692,7 +691,7 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor { // Special case for expr!! if (operationType == JetTokens.EXCLEXCL) { JetType result; - if (isKnownToBeNotNull(baseExpression, context)) { + if (isKnownToBeNotNull(baseExpression, contextWithTemporaryTrace)) { temporaryTrace.report(UNNECESSARY_NOT_NULL_ASSERTION.on(operationSign, type)); result = type; } @@ -712,14 +711,17 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor { // a[i]++/-- takes special treatment because it is actually let j = i, arr = a in arr.set(j, a.get(j).inc()) if ((operationType == JetTokens.PLUSPLUS || operationType == JetTokens.MINUSMINUS) && baseExpression instanceof JetArrayAccessExpression) { - JetExpression stubExpression = ExpressionTypingUtils.createStubExpressionOfNecessaryType(baseExpression.getProject(), type, context.trace); - resolveArrayAccessSetMethod((JetArrayAccessExpression) baseExpression, stubExpression, context.replaceExpectedType(NO_EXPECTED_TYPE).replaceBindingTrace(TemporaryBindingTrace.create(initialTrace)), context.trace); + JetExpression stubExpression = ExpressionTypingUtils.createStubExpressionOfNecessaryType(baseExpression.getProject(), type, contextWithTemporaryTrace.trace); + resolveArrayAccessSetMethod((JetArrayAccessExpression) baseExpression, + stubExpression, + context.replaceExpectedType(NO_EXPECTED_TYPE).replaceBindingTrace(TemporaryBindingTrace.create(context.trace)), + contextWithTemporaryTrace.trace); } ExpressionReceiver receiver = new ExpressionReceiver(baseExpression, type); // Resolve the operation reference - OverloadResolutionResults resolutionResults = context.resolveCallWithGivenNameToDescriptor( + OverloadResolutionResults resolutionResults = contextWithTemporaryTrace.resolveCallWithGivenNameToDescriptor( CallMaker.makeCall(receiver, expression), expression.getOperationReference(), name); @@ -734,18 +736,18 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor { JetType result; if (operationType == JetTokens.PLUSPLUS || operationType == JetTokens.MINUSMINUS) { if (JetTypeChecker.INSTANCE.isSubtypeOf(returnType, JetStandardClasses.getUnitType())) { - result = JetStandardClasses.getUnitType(); - context.trace.report(INC_DEC_SHOULD_NOT_RETURN_UNIT.on(operationSign)); + result = ErrorUtils.createErrorType("Unit"); + contextWithTemporaryTrace.trace.report(INC_DEC_SHOULD_NOT_RETURN_UNIT.on(operationSign)); } else { JetType receiverType = receiver.getType(); if (!JetTypeChecker.INSTANCE.isSubtypeOf(returnType, receiverType)) { - context.trace.report(RESULT_TYPE_MISMATCH.on(operationSign, name, receiverType, returnType)); + contextWithTemporaryTrace.trace.report(RESULT_TYPE_MISMATCH.on(operationSign, name, receiverType, returnType)); } else { - context.trace.record(BindingContext.VARIABLE_REASSIGNMENT, expression); + contextWithTemporaryTrace.trace.record(BindingContext.VARIABLE_REASSIGNMENT, expression); - checkLValue(context.trace, baseExpression); + checkLValue(contextWithTemporaryTrace.trace, baseExpression); } // TODO : Maybe returnType? result = receiverType; diff --git a/compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.jet b/compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.jet new file mode 100644 index 00000000000..c1800e156d4 --- /dev/null +++ b/compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.jet @@ -0,0 +1,16 @@ +fun main(args : Array) { + val a : Int? = null; + var v = 1 + val b : String = v; + val f : String = a!!; + val g : String = v++; + val g1 : String = ++v; + val h : String = v--; + val h1 : String = --v; + val i : String = !true; + val j : String = @foo true; + val j1 : String = @ true; + val j2 : String = @@ true; + val k : String = -1; + val l : String = +1; +} \ No newline at end of file From 73baa8b65d8ed0ca7e57c2a72e3cdb9ee2d797ca Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Thu, 22 Mar 2012 15:59:43 +0100 Subject: [PATCH 3/6] Eliminate unneeded temporary trace --- .../BasicExpressionTypingVisitor.java | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/BasicExpressionTypingVisitor.java b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/BasicExpressionTypingVisitor.java index dceace41d84..03ba7ba3235 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/BasicExpressionTypingVisitor.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/BasicExpressionTypingVisitor.java @@ -680,25 +680,21 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor { IElementType operationType = operationSign.getReferencedNameElementType(); // Type check the base expression - TemporaryBindingTrace temporaryTrace = TemporaryBindingTrace.create(context.trace); - ExpressionTypingContext contextWithTemporaryTrace = context.replaceBindingTrace(temporaryTrace); - JetType type = facade.getType(baseExpression, contextWithTemporaryTrace.replaceExpectedType(NO_EXPECTED_TYPE)); + JetType type = facade.getType(baseExpression, context.replaceExpectedType(NO_EXPECTED_TYPE)); if (type == null) { - temporaryTrace.commit(); return null; } // Special case for expr!! if (operationType == JetTokens.EXCLEXCL) { JetType result; - if (isKnownToBeNotNull(baseExpression, contextWithTemporaryTrace)) { - temporaryTrace.report(UNNECESSARY_NOT_NULL_ASSERTION.on(operationSign, type)); + if (isKnownToBeNotNull(baseExpression, context)) { + context.trace.report(UNNECESSARY_NOT_NULL_ASSERTION.on(operationSign, type)); result = type; } else { result = TypeUtils.makeNotNullable(type); } - temporaryTrace.commit(); return DataFlowUtils.checkType(result, expression, context); } @@ -711,23 +707,22 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor { // a[i]++/-- takes special treatment because it is actually let j = i, arr = a in arr.set(j, a.get(j).inc()) if ((operationType == JetTokens.PLUSPLUS || operationType == JetTokens.MINUSMINUS) && baseExpression instanceof JetArrayAccessExpression) { - JetExpression stubExpression = ExpressionTypingUtils.createStubExpressionOfNecessaryType(baseExpression.getProject(), type, contextWithTemporaryTrace.trace); + JetExpression stubExpression = ExpressionTypingUtils.createStubExpressionOfNecessaryType(baseExpression.getProject(), type, context.trace); resolveArrayAccessSetMethod((JetArrayAccessExpression) baseExpression, stubExpression, context.replaceExpectedType(NO_EXPECTED_TYPE).replaceBindingTrace(TemporaryBindingTrace.create(context.trace)), - contextWithTemporaryTrace.trace); + context.trace); } ExpressionReceiver receiver = new ExpressionReceiver(baseExpression, type); // Resolve the operation reference - OverloadResolutionResults resolutionResults = contextWithTemporaryTrace.resolveCallWithGivenNameToDescriptor( + OverloadResolutionResults resolutionResults = context.resolveCallWithGivenNameToDescriptor( CallMaker.makeCall(receiver, expression), expression.getOperationReference(), name); if (!resolutionResults.isSuccess()) { - temporaryTrace.commit(); return null; } @@ -737,17 +732,17 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor { if (operationType == JetTokens.PLUSPLUS || operationType == JetTokens.MINUSMINUS) { if (JetTypeChecker.INSTANCE.isSubtypeOf(returnType, JetStandardClasses.getUnitType())) { result = ErrorUtils.createErrorType("Unit"); - contextWithTemporaryTrace.trace.report(INC_DEC_SHOULD_NOT_RETURN_UNIT.on(operationSign)); + context.trace.report(INC_DEC_SHOULD_NOT_RETURN_UNIT.on(operationSign)); } else { JetType receiverType = receiver.getType(); if (!JetTypeChecker.INSTANCE.isSubtypeOf(returnType, receiverType)) { - contextWithTemporaryTrace.trace.report(RESULT_TYPE_MISMATCH.on(operationSign, name, receiverType, returnType)); + context.trace.report(RESULT_TYPE_MISMATCH.on(operationSign, name, receiverType, returnType)); } else { - contextWithTemporaryTrace.trace.record(BindingContext.VARIABLE_REASSIGNMENT, expression); + context.trace.record(BindingContext.VARIABLE_REASSIGNMENT, expression); - checkLValue(contextWithTemporaryTrace.trace, baseExpression); + checkLValue(context.trace, baseExpression); } // TODO : Maybe returnType? result = receiverType; @@ -756,7 +751,6 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor { else { result = returnType; } - temporaryTrace.commit(); return DataFlowUtils.checkType(result, expression, context); } From 77159a0d8e0797c49b5b6cfc1756c94c3b58a547 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Fri, 23 Mar 2012 09:46:09 +0100 Subject: [PATCH 4/6] Fixed the /**/ case. It is now a comment --- .../src/org/jetbrains/jet/lexer/Jet.flex | 4 + .../org/jetbrains/jet/lexer/_JetLexer.java | 850 +++++++++--------- compiler/testData/psi/NestedComments.jet | 4 +- compiler/testData/psi/NestedComments.txt | 26 +- 4 files changed, 456 insertions(+), 428 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex b/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex index 31d590dad2d..9e820a75db0 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex +++ b/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex @@ -164,6 +164,10 @@ LONG_TEMPLATE_ENTRY_END=\} // (Nested) comments +"/**/" { + return JetTokens.BLOCK_COMMENT; +} + "/**" { pushState(DOC_COMMENT); commentDepth = 0; diff --git a/compiler/frontend/src/org/jetbrains/jet/lexer/_JetLexer.java b/compiler/frontend/src/org/jetbrains/jet/lexer/_JetLexer.java index 4ac369ff1e3..de3f95b6e4f 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lexer/_JetLexer.java +++ b/compiler/frontend/src/org/jetbrains/jet/lexer/_JetLexer.java @@ -1,18 +1,19 @@ -/* The following code was generated by JFlex 1.4.3 on 3/22/12 10:33 AM */ +/* The following code was generated by JFlex 1.4.3 on 3/23/12 9:41 AM */ package org.jetbrains.jet.lexer; -import com.intellij.lexer.FlexLexer; -import com.intellij.psi.TokenType; +import java.util.*; +import com.intellij.lexer.*; +import com.intellij.psi.*; import com.intellij.psi.tree.IElementType; -import java.util.Stack; +import org.jetbrains.jet.lexer.JetTokens; /** * This class is a scanner generated by * JFlex 1.4.3 - * on 3/22/12 10:33 AM from the specification file + * on 3/23/12 9:41 AM from the specification file * /Users/abreslav/work/jet/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex */ class _JetLexer implements FlexLexer { @@ -21,10 +22,11 @@ class _JetLexer implements FlexLexer { /** lexical states */ public static final int STRING = 2; + public static final int DOC_COMMENT_START = 10; public static final int BLOCK_COMMENT = 8; public static final int YYINITIAL = 0; - public static final int LONG_TEMPLATE_ENTRY = 12; - public static final int DOC_COMMENT = 10; + public static final int LONG_TEMPLATE_ENTRY = 14; + public static final int DOC_COMMENT = 12; public static final int RAW_STRING = 4; public static final int SHORT_TEMPLATE_ENTRY = 6; @@ -35,7 +37,7 @@ 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, 4, 4, 5, 5 + 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 4, 4, 6, 6 }; /** @@ -121,7 +123,7 @@ class _JetLexer implements FlexLexer { private static final int [] ZZ_ACTION = zzUnpackAction(); private static final String ZZ_ACTION_PACKED_0 = - "\6\0\1\1\1\2\1\3\1\4\2\1\1\5\1\6"+ + "\7\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"+ @@ -136,14 +138,15 @@ class _JetLexer implements FlexLexer { "\1\103\1\104\1\105\1\44\1\3\2\0\1\106\4\0"+ "\1\107\4\3\1\110\10\3\1\111\4\3\1\112\1\113"+ "\2\3\1\114\1\115\1\116\1\117\1\120\1\121\1\122"+ - "\1\123\2\0\2\40\1\45\1\46\1\44\1\0\1\124"+ - "\1\3\1\125\1\3\1\126\4\3\1\127\1\130\4\3"+ - "\1\131\1\3\1\132\1\133\1\100\1\0\1\134\1\135"+ - "\1\136\1\137\1\3\1\140\3\3\1\141\1\142\1\143"+ - "\1\0\1\3\1\144\1\3\1\145\1\3\1\146\1\147"; + "\1\123\2\0\2\40\1\45\1\46\1\124\1\44\1\0"+ + "\1\125\1\3\1\126\1\3\1\127\4\3\1\130\1\131"+ + "\4\3\1\132\1\3\1\133\1\134\1\100\1\0\1\135"+ + "\1\136\1\137\1\140\1\3\1\141\3\3\1\142\1\143"+ + "\1\144\1\0\1\3\1\145\1\3\1\146\1\3\1\147"+ + "\1\150"; private static int [] zzUnpackAction() { - int [] result = new int[230]; + int [] result = new int[232]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; @@ -168,38 +171,38 @@ class _JetLexer implements FlexLexer { private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); 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\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\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\u0180\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"; + "\0\0\0\100\0\200\0\300\0\u0100\0\u0140\0\u0180\0\u0140"+ + "\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\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\u0940\0\u0140\0\u0980\0\u09c0\0\u0140\0\u0a00\0\u0a40\0\u0a80"+ + "\0\u0ac0\0\u0140\0\u0140\0\u0140\0\u0140\0\u0140\0\u0140\0\u0140"+ + "\0\u0b00\0\u0140\0\u0b40\0\u0b80\0\u0140\0\u0140\0\u0bc0\0\u0c00"+ + "\0\u0c40\0\u0c80\0\u0140\0\u0cc0\0\u0d00\0\u0140\0\u0140\0\u0d40"+ + "\0\u0d80\0\u0dc0\0\u0e00\0\u0e40\0\u0e80\0\u0ec0\0\u0140\0\u0f00"+ + "\0\u0f40\0\u0140\0\u0f80\0\u0fc0\0\u1000\0\u1040\0\u0140\0\u0140"+ + "\0\u0140\0\u0140\0\u0140\0\u1080\0\u10c0\0\u1100\0\u1140\0\u1180"+ + "\0\u0200\0\u0200\0\u0200\0\u11c0\0\u0140\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\u0140\0\u1600"+ + "\0\u1640\0\u0140\0\u1680\0\u0140\0\u0140\0\u16c0\0\u0140\0\u0140"+ + "\0\u0140\0\u0140\0\u0140\0\u1700\0\u1740\0\u0140\0\u0140\0\u1780"+ + "\0\u17c0\0\u1800\0\u1840\0\u0140\0\u0140\0\u0140\0\u1880\0\u0140"+ + "\0\u18c0\0\u1900\0\u1940\0\u1980\0\u19c0\0\u1a00\0\u1a40\0\u0140"+ + "\0\u1a80\0\u1ac0\0\u1b00\0\u1b40\0\u0200\0\u1b80\0\u1bc0\0\u1c00"+ + "\0\u1c40\0\u1c80\0\u1cc0\0\u1d00\0\u1d40\0\u0140\0\u1d80\0\u1dc0"+ + "\0\u1e00\0\u1e40\0\u0200\0\u0200\0\u1e80\0\u1ec0\0\u0200\0\u0200"+ + "\0\u1f00\0\u1f00\0\u0140\0\u0140\0\u0140\0\u0140\0\u1f40\0\u1f80"+ + "\0\u0140\0\u1fc0\0\u0140\0\u0140\0\u0140\0\u2000\0\u1880\0\u0200"+ + "\0\u2040\0\u0200\0\u2080\0\u0200\0\u20c0\0\u2100\0\u2140\0\u2180"+ + "\0\u0200\0\u0200\0\u21c0\0\u2200\0\u2240\0\u2280\0\u0200\0\u22c0"+ + "\0\u0200\0\u0140\0\u0140\0\u2300\0\u0c00\0\u0200\0\u0200\0\u0200"+ + "\0\u2340\0\u0200\0\u2380\0\u23c0\0\u2400\0\u0200\0\u0200\0\u0200"+ + "\0\u2440\0\u2480\0\u0200\0\u24c0\0\u0200\0\u2500\0\u0200\0\u0200"; private static int [] zzUnpackRowMap() { - int [] result = new int[230]; + int [] result = new int[232]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; @@ -222,261 +225,261 @@ class _JetLexer implements FlexLexer { private static final int [] ZZ_TRANS = zzUnpackTrans(); private static final String ZZ_TRANS_PACKED_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\10\1\11\1\12\1\13\1\12\1\10\1\14\1\13"+ + "\1\15\1\16\1\17\1\20\2\12\1\21\1\12\1\22"+ + "\1\12\1\23\1\10\1\24\1\12\1\25\1\26\1\27"+ + "\1\12\1\30\1\31\1\32\1\33\1\34\1\35\1\36"+ + "\1\37\1\40\2\12\1\41\1\42\1\12\1\43\1\12"+ + "\1\44\1\12\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\1\70\7\71\1\72"+ + "\1\73\12\71\1\74\1\75\62\71\1\76\1\73\12\71"+ + "\1\76\1\77\53\71\2\0\1\100\1\0\1\100\1\0"+ + "\1\101\5\0\2\100\1\0\1\100\1\0\1\100\3\0"+ + "\1\100\2\0\1\102\3\100\1\0\22\100\21\0\12\103"+ + "\1\104\21\103\1\105\43\103\100\0\1\10\1\11\1\12"+ + "\1\13\1\12\1\10\1\14\1\13\1\15\1\16\1\17"+ + "\1\20\2\12\1\21\1\12\1\22\1\12\1\23\1\10"+ + "\1\24\1\12\1\106\1\107\1\27\1\12\1\30\1\31"+ + "\1\32\1\33\1\34\1\35\1\36\1\37\1\40\2\12"+ + "\1\41\1\42\1\12\1\43\1\12\1\44\1\12\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\24\0\1\166\3\0\1\167\75\0\1\170\1\0"+ - "\1\171\75\0\1\172\1\0\1\173\76\0\1\174\1\175"+ - "\77\0\1\176\1\0\1\177\100\0\1\200\100\0\1\201"+ - "\73\0\1\202\14\0\7\70\2\0\12\70\2\0\53\70"+ - "\2\0\1\203\1\0\1\203\1\0\1\204\5\0\2\203"+ - "\1\0\1\203\1\0\1\203\3\0\1\203\1\205\1\0"+ - "\4\203\1\0\22\203\21\0\7\206\1\0\15\206\1\207"+ - "\52\206\24\0\1\210\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\211\2\0\70\211\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\212\2\77\1\0"+ - "\22\77\55\0\1\213\55\0\1\214\66\0\1\125\11\0"+ - "\1\125\2\0\1\215\62\0\1\216\11\0\1\216\4\0"+ - "\1\216\44\0\1\216\12\0\6\111\1\217\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\220\2\0\70\220\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\221\2\0\70\221"+ - "\7\117\1\0\70\117\34\0\1\222\44\0\1\122\11\0"+ - "\1\122\2\0\1\223\1\110\20\0\1\110\40\0\2\123"+ - "\10\0\1\123\1\0\1\123\1\224\1\123\1\0\1\225"+ - "\13\0\1\123\2\0\1\123\1\225\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\226\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\227"+ - "\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\230\1\11"+ - "\1\0\10\11\1\231\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\232"+ - "\2\0\4\11\1\0\5\11\1\233\10\11\1\234\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\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\4\11\1\236\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\237\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\240\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\241\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\242\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\243\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\244\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\245"+ - "\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\246\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\247\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\250\1\11\1\0\3\11\1\251\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\252"+ - "\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\253\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\254\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\255\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\256"+ - "\3\11\1\257\5\11\54\0\1\260\3\0\1\261\123\0"+ - "\1\262\74\0\1\263\101\0\1\264\100\0\1\265\15\0"+ - "\2\203\1\0\2\203\5\0\3\203\1\0\1\203\1\0"+ - "\1\203\3\0\1\203\2\0\4\203\1\0\22\203\21\0"+ - "\6\266\2\0\70\266\1\0\2\267\10\0\1\267\1\0"+ - "\1\267\1\0\1\267\15\0\1\267\2\0\1\267\1\0"+ - "\1\267\3\0\1\267\3\0\1\267\3\0\1\267\45\0"+ - "\1\74\53\0\6\211\1\270\1\0\70\211\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\271\1\77\1\0\22\77"+ - "\22\0\1\216\11\0\1\216\64\0\6\220\1\272\1\0"+ - "\70\220\6\221\1\273\1\0\70\221\1\0\1\125\11\0"+ - "\1\125\65\0\2\274\10\0\1\274\1\0\1\274\1\215"+ - "\1\274\15\0\1\274\2\0\1\274\1\0\1\274\3\0"+ - "\1\274\3\0\1\274\3\0\1\274\22\0\1\216\11\0"+ - "\1\216\4\0\1\275\44\0\1\275\30\0\1\215\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\276\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\277\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\300\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\301\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\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\4\11\1\0\3\11"+ - "\1\303\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\304"+ - "\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\305\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\306\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\307\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\310\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\311\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\312"+ - "\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\313\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\314\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\315\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\316\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\317\1\0\22\11\22\0\2\320\1\0\2\320"+ - "\5\0\3\320\1\0\1\320\1\0\1\320\3\0\1\320"+ - "\2\0\4\320\1\0\22\320\21\0\6\266\1\321\1\0"+ - "\70\266\1\0\2\322\10\0\1\322\1\0\1\322\1\0"+ - "\1\322\15\0\1\322\2\0\1\322\1\0\1\322\3\0"+ - "\1\322\3\0\1\322\3\0\1\322\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\323\1\0\22\77\22\0\2\274"+ - "\10\0\1\274\1\0\1\274\1\0\1\274\1\0\1\225"+ - "\13\0\1\274\2\0\1\274\1\225\1\274\3\0\1\274"+ - "\3\0\1\274\3\0\1\274\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\324\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\325\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\326"+ - "\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\327"+ - "\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\330\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\331\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\332\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\333"+ - "\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\334\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\335\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\336\16\11\22\0"+ - "\2\337\10\0\1\337\1\0\1\337\1\0\1\337\15\0"+ - "\1\337\2\0\1\337\1\0\1\337\3\0\1\337\3\0"+ - "\1\337\3\0\1\337\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\340\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\341\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\342\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\343\17\11\22\0\2\206\10\0\1\206\1\0\1\206"+ - "\1\0\1\206\15\0\1\206\2\0\1\206\1\0\1\206"+ - "\3\0\1\206\3\0\1\206\3\0\1\206\22\0\2\11"+ - "\1\0\2\11\5\0\3\11\1\0\1\11\1\0\1\11"+ - "\3\0\1\344\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\345\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\346\16\11\21\0"; + "\1\66\1\67\1\70\1\0\1\11\11\0\1\11\2\0"+ + "\1\110\1\111\20\0\1\111\40\0\2\12\1\0\2\12"+ + "\5\0\3\12\1\0\1\12\1\0\1\12\3\0\1\12"+ + "\2\0\4\12\1\0\22\12\24\0\1\13\3\0\1\13"+ + "\70\0\6\112\2\0\70\112\2\0\1\113\1\0\1\113"+ + "\1\0\1\114\5\0\2\113\1\0\1\113\1\0\1\113"+ + "\3\0\1\113\2\0\4\113\1\0\22\113\23\0\1\115"+ + "\1\0\1\115\1\0\1\116\2\0\1\117\2\0\2\115"+ + "\1\0\1\115\1\0\1\115\3\0\1\115\2\0\4\115"+ + "\1\0\22\115\33\0\1\120\21\0\1\121\26\0\1\122"+ + "\15\0\1\123\11\0\1\123\1\124\1\125\1\110\1\111"+ + "\20\0\1\111\5\0\1\125\32\0\1\126\11\0\1\126"+ + "\2\0\1\127\101\0\1\130\41\0\1\131\1\132\14\0"+ + "\7\23\1\0\12\23\1\133\1\134\54\23\24\0\1\135"+ + "\54\0\2\12\1\0\2\12\5\0\3\12\1\0\1\12"+ + "\1\0\1\12\3\0\1\12\2\0\1\12\1\136\2\12"+ + "\1\0\10\12\1\137\5\12\1\140\3\12\22\0\2\12"+ + "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ + "\3\0\1\12\2\0\3\12\1\141\1\0\2\12\1\142"+ + "\12\12\1\143\4\12\22\0\2\12\1\0\2\12\5\0"+ + "\3\12\1\0\1\12\1\0\1\12\3\0\1\144\2\0"+ + "\4\12\1\0\22\12\104\0\1\145\15\0\2\12\1\0"+ + "\2\12\5\0\3\12\1\0\1\12\1\0\1\12\3\0"+ + "\1\12\2\0\4\12\1\0\1\12\1\146\12\12\1\147"+ + "\5\12\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ + "\1\12\1\0\1\12\3\0\1\12\2\0\4\12\1\0"+ + "\11\12\1\150\10\12\22\0\2\12\1\0\2\12\5\0"+ + "\3\12\1\0\1\12\1\0\1\12\3\0\1\151\2\0"+ + "\4\12\1\0\22\12\22\0\2\12\1\0\2\12\5\0"+ + "\3\12\1\0\1\12\1\0\1\12\3\0\1\12\2\0"+ + "\4\12\1\0\14\12\1\152\5\12\22\0\2\12\1\0"+ + "\2\12\5\0\3\12\1\0\1\12\1\0\1\12\3\0"+ + "\1\12\2\0\4\12\1\0\5\12\1\153\14\12\22\0"+ + "\2\12\1\0\2\12\5\0\3\12\1\0\1\12\1\0"+ + "\1\12\3\0\1\12\2\0\3\12\1\154\1\0\22\12"+ + "\22\0\2\12\1\0\2\12\5\0\3\12\1\0\1\12"+ + "\1\0\1\12\3\0\1\12\2\0\4\12\1\0\3\12"+ + "\1\155\16\12\22\0\2\12\1\0\2\12\5\0\3\12"+ + "\1\0\1\12\1\0\1\12\3\0\1\12\2\0\4\12"+ + "\1\0\10\12\1\156\11\12\22\0\2\12\1\0\2\12"+ + "\5\0\3\12\1\0\1\12\1\0\1\12\3\0\1\12"+ + "\2\0\1\12\1\157\2\12\1\0\22\12\22\0\2\12"+ + "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ + "\3\0\1\160\2\0\4\12\1\0\1\12\1\161\3\12"+ + "\1\162\14\12\22\0\2\12\1\0\2\12\5\0\3\12"+ + "\1\0\1\12\1\0\1\12\3\0\1\12\2\0\1\12"+ + "\1\163\2\12\1\0\22\12\22\0\2\12\1\0\2\12"+ + "\5\0\3\12\1\0\1\12\1\0\1\12\3\0\1\12"+ + "\2\0\4\12\1\0\5\12\1\164\14\12\22\0\2\12"+ + "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ + "\3\0\1\12\2\0\4\12\1\0\1\12\1\165\20\12"+ + "\53\0\1\166\24\0\1\167\3\0\1\170\75\0\1\171"+ + "\1\0\1\172\75\0\1\173\1\0\1\174\76\0\1\175"+ + "\1\176\77\0\1\177\1\0\1\200\100\0\1\201\100\0"+ + "\1\202\73\0\1\203\14\0\7\71\2\0\12\71\2\0"+ + "\53\71\2\0\1\204\1\0\1\204\1\0\1\205\5\0"+ + "\2\204\1\0\1\204\1\0\1\204\3\0\1\204\1\206"+ + "\1\0\4\204\1\0\22\204\21\0\7\207\1\0\15\207"+ + "\1\210\52\207\24\0\1\211\54\0\2\100\1\0\2\100"+ + "\5\0\3\100\1\0\1\100\1\0\1\100\3\0\1\100"+ + "\2\0\4\100\1\0\22\100\21\0\6\212\2\0\70\212"+ + "\1\0\2\100\1\0\2\100\5\0\3\100\1\0\1\100"+ + "\1\0\1\100\3\0\1\100\2\0\1\100\1\213\2\100"+ + "\1\0\22\100\55\0\1\214\55\0\1\215\66\0\1\126"+ + "\11\0\1\126\2\0\1\216\62\0\1\217\11\0\1\217"+ + "\4\0\1\217\44\0\1\217\12\0\6\112\1\220\1\0"+ + "\70\112\1\0\2\113\1\0\2\113\5\0\3\113\1\0"+ + "\1\113\1\0\1\113\3\0\1\113\2\0\4\113\1\0"+ + "\22\113\21\0\6\221\2\0\70\221\1\0\2\115\1\0"+ + "\2\115\5\0\3\115\1\0\1\115\1\0\1\115\3\0"+ + "\1\115\2\0\4\115\1\0\22\115\21\0\6\222\2\0"+ + "\70\222\7\120\1\0\70\120\34\0\1\223\44\0\1\123"+ + "\11\0\1\123\2\0\1\224\1\111\20\0\1\111\40\0"+ + "\2\124\10\0\1\124\1\0\1\124\1\225\1\124\1\0"+ + "\1\226\13\0\1\124\2\0\1\124\1\226\1\124\3\0"+ + "\1\124\3\0\1\124\3\0\1\124\22\0\1\125\11\0"+ + "\1\125\2\0\1\227\62\0\1\126\11\0\1\126\3\0"+ + "\1\111\20\0\1\111\37\0\7\23\1\0\70\23\24\0"+ + "\1\230\54\0\2\12\1\0\2\12\5\0\3\12\1\0"+ + "\1\12\1\0\1\12\3\0\1\12\2\0\2\12\1\231"+ + "\1\12\1\0\10\12\1\232\11\12\22\0\2\12\1\0"+ + "\2\12\5\0\3\12\1\0\1\12\1\0\1\12\3\0"+ + "\1\233\2\0\4\12\1\0\5\12\1\234\10\12\1\235"+ + "\3\12\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ + "\1\12\1\0\1\12\3\0\1\12\2\0\4\12\1\0"+ + "\4\12\1\236\15\12\22\0\2\12\1\0\2\12\5\0"+ + "\3\12\1\0\1\12\1\0\1\12\3\0\1\12\2\0"+ + "\4\12\1\0\4\12\1\237\15\12\22\0\2\12\1\0"+ + "\2\12\5\0\3\12\1\0\1\12\1\0\1\12\3\0"+ + "\1\12\2\0\4\12\1\0\2\12\1\240\17\12\22\0"+ + "\2\12\1\0\2\12\5\0\3\12\1\0\1\12\1\0"+ + "\1\12\3\0\1\12\2\0\4\12\1\0\5\12\1\241"+ + "\14\12\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ + "\1\12\1\0\1\12\3\0\1\12\2\0\4\12\1\0"+ + "\12\12\1\242\7\12\22\0\2\12\1\0\2\12\5\0"+ + "\3\12\1\0\1\12\1\0\1\12\3\0\1\12\2\0"+ + "\4\12\1\0\14\12\1\243\5\12\22\0\2\12\1\0"+ + "\2\12\5\0\3\12\1\0\1\12\1\0\1\12\3\0"+ + "\1\12\2\0\3\12\1\244\1\0\22\12\22\0\2\12"+ + "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ + "\3\0\1\12\2\0\4\12\1\0\1\245\21\12\22\0"+ + "\2\12\1\0\2\12\5\0\3\12\1\0\1\12\1\0"+ + "\1\12\3\0\1\12\2\0\4\12\1\0\22\12\5\0"+ + "\1\246\14\0\2\12\1\0\2\12\5\0\3\12\1\0"+ + "\1\12\1\0\1\12\3\0\1\12\2\0\1\247\3\12"+ + "\1\0\22\12\22\0\2\12\1\0\2\12\5\0\3\12"+ + "\1\0\1\12\1\0\1\12\3\0\1\12\2\0\4\12"+ + "\1\0\3\12\1\250\16\12\22\0\2\12\1\0\2\12"+ + "\5\0\3\12\1\0\1\12\1\0\1\12\3\0\1\12"+ + "\2\0\2\12\1\251\1\12\1\0\3\12\1\252\16\12"+ + "\22\0\2\12\1\0\2\12\5\0\3\12\1\0\1\12"+ + "\1\0\1\12\3\0\1\12\2\0\4\12\1\0\2\12"+ + "\1\253\17\12\22\0\2\12\1\0\2\12\5\0\3\12"+ + "\1\0\1\12\1\0\1\12\3\0\1\12\2\0\4\12"+ + "\1\0\10\12\1\254\11\12\22\0\2\12\1\0\2\12"+ + "\5\0\3\12\1\0\1\12\1\0\1\12\3\0\1\12"+ + "\2\0\4\12\1\0\14\12\1\255\5\12\22\0\2\12"+ + "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ + "\3\0\1\12\2\0\2\12\1\256\1\12\1\0\22\12"+ + "\22\0\2\12\1\0\2\12\5\0\3\12\1\0\1\12"+ + "\1\0\1\12\3\0\1\12\2\0\4\12\1\0\10\12"+ + "\1\257\3\12\1\260\5\12\54\0\1\261\3\0\1\262"+ + "\123\0\1\263\74\0\1\264\101\0\1\265\100\0\1\266"+ + "\15\0\2\204\1\0\2\204\5\0\3\204\1\0\1\204"+ + "\1\0\1\204\3\0\1\204\2\0\4\204\1\0\22\204"+ + "\21\0\6\267\2\0\70\267\1\0\2\270\10\0\1\270"+ + "\1\0\1\270\1\0\1\270\15\0\1\270\2\0\1\270"+ + "\1\0\1\270\3\0\1\270\3\0\1\270\3\0\1\270"+ + "\45\0\1\75\53\0\6\212\1\271\1\0\70\212\1\0"+ + "\2\100\1\0\2\100\5\0\3\100\1\0\1\100\1\0"+ + "\1\100\3\0\1\100\2\0\2\100\1\272\1\100\1\0"+ + "\22\100\22\0\1\217\11\0\1\217\64\0\6\221\1\273"+ + "\1\0\70\221\6\222\1\274\1\0\70\222\12\0\1\275"+ + "\66\0\1\126\11\0\1\126\65\0\2\276\10\0\1\276"+ + "\1\0\1\276\1\216\1\276\15\0\1\276\2\0\1\276"+ + "\1\0\1\276\3\0\1\276\3\0\1\276\3\0\1\276"+ + "\22\0\1\217\11\0\1\217\4\0\1\277\44\0\1\277"+ + "\30\0\1\216\62\0\2\12\1\0\2\12\5\0\3\12"+ + "\1\0\1\12\1\0\1\12\3\0\1\12\2\0\3\12"+ + "\1\300\1\0\22\12\22\0\2\12\1\0\2\12\5\0"+ + "\3\12\1\0\1\12\1\0\1\12\3\0\1\12\2\0"+ + "\4\12\1\0\1\12\1\301\20\12\22\0\2\12\1\0"+ + "\2\12\5\0\3\12\1\0\1\12\1\0\1\12\3\0"+ + "\1\12\2\0\4\12\1\0\3\12\1\302\16\12\22\0"+ + "\2\12\1\0\2\12\5\0\3\12\1\0\1\12\1\0"+ + "\1\12\3\0\1\12\2\0\2\12\1\303\1\12\1\0"+ + "\22\12\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ + "\1\12\1\0\1\12\3\0\1\12\2\0\4\12\1\0"+ + "\3\12\1\304\16\12\22\0\2\12\1\0\2\12\5\0"+ + "\3\12\1\0\1\12\1\0\1\12\3\0\1\12\2\0"+ + "\4\12\1\0\3\12\1\305\16\12\22\0\2\12\1\0"+ + "\2\12\5\0\3\12\1\0\1\12\1\0\1\12\3\0"+ + "\1\12\2\0\1\306\3\12\1\0\22\12\22\0\2\12"+ + "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ + "\3\0\1\12\2\0\3\12\1\307\1\0\22\12\22\0"+ + "\2\12\1\0\2\12\5\0\3\12\1\0\1\12\1\0"+ + "\1\12\3\0\1\12\2\0\4\12\1\0\3\12\1\310"+ + "\16\12\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ + "\1\12\1\0\1\12\3\0\1\12\2\0\4\12\1\0"+ + "\14\12\1\311\5\12\22\0\2\12\1\0\2\12\5\0"+ + "\3\12\1\0\1\12\1\0\1\12\3\0\1\12\2\0"+ + "\4\12\1\0\3\12\1\312\16\12\22\0\2\12\1\0"+ + "\2\12\5\0\3\12\1\0\1\12\1\0\1\12\3\0"+ + "\1\12\2\0\4\12\1\0\6\12\1\313\13\12\22\0"+ + "\2\12\1\0\2\12\5\0\3\12\1\0\1\12\1\0"+ + "\1\12\3\0\1\314\2\0\4\12\1\0\22\12\22\0"+ + "\2\12\1\0\2\12\5\0\3\12\1\0\1\12\1\0"+ + "\1\12\3\0\1\12\2\0\4\12\1\0\5\12\1\315"+ + "\14\12\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ + "\1\12\1\0\1\12\3\0\1\12\2\0\4\12\1\0"+ + "\14\12\1\316\5\12\22\0\2\12\1\0\2\12\5\0"+ + "\3\12\1\0\1\12\1\0\1\12\3\0\1\12\2\0"+ + "\4\12\1\0\2\12\1\317\17\12\22\0\2\12\1\0"+ + "\2\12\5\0\3\12\1\0\1\12\1\0\1\12\3\0"+ + "\1\12\2\0\3\12\1\320\1\0\22\12\22\0\2\12"+ + "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ + "\3\0\1\12\2\0\3\12\1\321\1\0\22\12\22\0"+ + "\2\322\1\0\2\322\5\0\3\322\1\0\1\322\1\0"+ + "\1\322\3\0\1\322\2\0\4\322\1\0\22\322\21\0"+ + "\6\267\1\323\1\0\70\267\1\0\2\324\10\0\1\324"+ + "\1\0\1\324\1\0\1\324\15\0\1\324\2\0\1\324"+ + "\1\0\1\324\3\0\1\324\3\0\1\324\3\0\1\324"+ + "\22\0\2\100\1\0\2\100\5\0\3\100\1\0\1\100"+ + "\1\0\1\100\3\0\1\100\2\0\3\100\1\325\1\0"+ + "\22\100\22\0\2\276\10\0\1\276\1\0\1\276\1\0"+ + "\1\276\1\0\1\226\13\0\1\276\2\0\1\276\1\226"+ + "\1\276\3\0\1\276\3\0\1\276\3\0\1\276\22\0"+ + "\2\12\1\0\2\12\5\0\3\12\1\0\1\12\1\0"+ + "\1\12\3\0\1\12\2\0\4\12\1\0\13\12\1\326"+ + "\6\12\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ + "\1\12\1\0\1\12\3\0\1\12\2\0\1\327\3\12"+ + "\1\0\22\12\22\0\2\12\1\0\2\12\5\0\3\12"+ + "\1\0\1\12\1\0\1\12\3\0\1\12\2\0\4\12"+ + "\1\0\10\12\1\330\11\12\22\0\2\12\1\0\2\12"+ + "\5\0\3\12\1\0\1\12\1\0\1\12\3\0\1\12"+ + "\2\0\2\12\1\331\1\12\1\0\22\12\22\0\2\12"+ + "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ + "\3\0\1\12\2\0\3\12\1\332\1\0\22\12\22\0"+ + "\2\12\1\0\2\12\5\0\3\12\1\0\1\12\1\0"+ + "\1\12\3\0\1\12\2\0\4\12\1\0\1\333\21\12"+ + "\22\0\2\12\1\0\2\12\5\0\3\12\1\0\1\12"+ + "\1\0\1\12\3\0\1\12\2\0\4\12\1\0\5\12"+ + "\1\334\14\12\22\0\2\12\1\0\2\12\5\0\3\12"+ + "\1\0\1\12\1\0\1\12\3\0\1\12\2\0\4\12"+ + "\1\0\10\12\1\335\11\12\22\0\2\12\1\0\2\12"+ + "\5\0\3\12\1\0\1\12\1\0\1\12\3\0\1\12"+ + "\2\0\4\12\1\0\6\12\1\336\13\12\22\0\2\12"+ + "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ + "\3\0\1\12\2\0\4\12\1\0\3\12\1\337\16\12"+ + "\22\0\2\12\1\0\2\12\5\0\3\12\1\0\1\12"+ + "\1\0\1\12\3\0\1\12\2\0\4\12\1\0\3\12"+ + "\1\340\16\12\22\0\2\341\10\0\1\341\1\0\1\341"+ + "\1\0\1\341\15\0\1\341\2\0\1\341\1\0\1\341"+ + "\3\0\1\341\3\0\1\341\3\0\1\341\22\0\2\12"+ + "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ + "\3\0\1\12\2\0\4\12\1\0\2\12\1\342\17\12"+ + "\22\0\2\12\1\0\2\12\5\0\3\12\1\0\1\12"+ + "\1\0\1\12\3\0\1\12\2\0\1\343\3\12\1\0"+ + "\22\12\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ + "\1\12\1\0\1\12\3\0\1\12\2\0\4\12\1\0"+ + "\7\12\1\344\12\12\22\0\2\12\1\0\2\12\5\0"+ + "\3\12\1\0\1\12\1\0\1\12\3\0\1\12\2\0"+ + "\4\12\1\0\2\12\1\345\17\12\22\0\2\207\10\0"+ + "\1\207\1\0\1\207\1\0\1\207\15\0\1\207\2\0"+ + "\1\207\1\0\1\207\3\0\1\207\3\0\1\207\3\0"+ + "\1\207\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ + "\1\12\1\0\1\12\3\0\1\346\2\0\4\12\1\0"+ + "\22\12\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ + "\1\12\1\0\1\12\3\0\1\12\2\0\4\12\1\0"+ + "\3\12\1\347\16\12\22\0\2\12\1\0\2\12\5\0"+ + "\3\12\1\0\1\12\1\0\1\12\3\0\1\12\2\0"+ + "\4\12\1\0\3\12\1\350\16\12\21\0"; private static int [] zzUnpackTrans() { - int [] result = new int[9472]; + int [] result = new int[9536]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; @@ -517,19 +520,19 @@ class _JetLexer implements FlexLexer { private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\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\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\11"+ - "\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"; + "\5\0\1\10\1\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\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\11\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\1\4\0\1\11\15\1\1\11"+ + "\14\1\4\11\2\0\1\11\1\1\3\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[230]; + int [] result = new int[232]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; @@ -883,27 +886,27 @@ class _JetLexer implements FlexLexer { case 3: { return JetTokens.IDENTIFIER; } - case 104: break; + case 105: break; case 10: { pushState(STRING); return JetTokens.OPEN_QUOTE; } - case 105: break; + case 106: break; case 53: { return JetTokens.EXCLEXCL ; } - case 106: break; + case 107: break; case 75: { return JetTokens.FOR_KEYWORD ; } - case 107: break; - case 101: + case 108: break; + case 102: { return JetTokens.RETURN_KEYWORD ; } - case 108: break; - case 87: + case 109: break; + case 88: { return JetTokens.NULL_KEYWORD ; } - case 109: break; + case 110: break; case 35: { if (lBraceCount == 0) { popState(); @@ -912,159 +915,159 @@ class _JetLexer implements FlexLexer { lBraceCount--; return JetTokens.RBRACE; } - case 110: break; + case 111: break; case 15: { return JetTokens.LT ; } - case 111: break; + case 112: break; case 52: { return JetTokens.DO_KEYWORD ; } - case 112: break; + case 113: break; case 20: { return JetTokens.PLUS ; } - case 113: break; + case 114: break; case 59: { return JetTokens.PLUSEQ ; } - case 114: break; - case 92: + case 115: break; + case 93: { popState(); return JetTokens.THIS_KEYWORD; } - case 115: break; + case 116: break; case 28: { return JetTokens.COMMA ; } - case 116: break; + case 117: break; case 17: { return JetTokens.GT ; } - case 117: break; + case 118: break; case 4: { return JetTokens.WHITE_SPACE; } - case 118: break; + case 119: break; case 25: { return JetTokens.RPAR ; } - case 119: break; + case 120: break; case 57: { return JetTokens.DOUBLE_ARROW; } - case 120: break; - case 85: + case 121: break; + case 86: { return JetTokens.TRUE_KEYWORD ; } - case 121: break; + case 122: break; case 81: { return JetTokens.IDE_TEMPLATE_START ; } - case 122: break; + case 123: break; case 37: { return JetTokens.FIELD_IDENTIFIER; } - case 123: break; + case 124: break; case 61: { return JetTokens.ANDAND ; } - case 124: break; + case 125: break; case 65: { pushState(LONG_TEMPLATE_ENTRY); return JetTokens.LONG_TEMPLATE_ENTRY_START; } - case 125: break; + case 126: break; case 36: { return JetTokens.FLOAT_LITERAL; } - case 126: break; + case 127: break; case 40: { return JetTokens.EOL_COMMENT; } - case 127: break; - case 89: + case 128: break; + case 90: { return JetTokens.WHEN_KEYWORD ; } - case 128: break; + case 129: break; case 71: { pushState(RAW_STRING); return JetTokens.OPEN_QUOTE; } - case 129: break; + case 130: break; case 26: { return JetTokens.COLON ; } - case 130: break; + case 131: break; case 55: { return JetTokens.LTEQ ; } - case 131: break; + case 132: break; case 45: { return JetTokens.ARROW ; } - case 132: break; + case 133: break; case 32: { popState(); return JetTokens.IDENTIFIER; } - case 133: break; + case 134: break; case 22: { return JetTokens.LBRACKET ; } - case 134: break; + case 135: break; case 69: { yypushback(2); return JetTokens.INTEGER_LITERAL; } - case 135: break; + case 136: break; case 9: { return JetTokens.CHARACTER_LITERAL; } - case 136: break; + case 137: break; case 76: { return JetTokens.VAR_KEYWORD ; } - case 137: break; + case 138: break; case 56: { return JetTokens.GTEQ ; } - case 138: break; + case 139: break; case 2: { return JetTokens.INTEGER_LITERAL; } - case 139: break; + case 140: break; case 12: { return JetTokens.RBRACE ; } - case 140: break; - case 96: + case 141: break; + case 97: { return JetTokens.CLASS_KEYWORD ; } - case 141: break; + case 142: break; case 72: { return JetTokens.TRY_KEYWORD ; } - case 142: break; + case 143: break; case 14: { return JetTokens.EXCL ; } - case 143: break; + case 144: break; case 54: { return JetTokens.EXCLEQ ; } - case 144: break; + case 145: break; case 46: { return JetTokens.MINUSEQ ; } - case 145: break; - case 102: + case 146: break; + case 103: { return JetTokens.PACKAGE_KEYWORD ; } - case 146: break; - case 93: + case 147: break; + case 94: { return JetTokens.THROW_KEYWORD ; } - case 147: break; - case 95: + case 148: break; + case 96: { return JetTokens.SUPER_KEYWORD ; } - case 148: break; + case 149: break; case 68: { if (commentDepth > 0) { commentDepth--; @@ -1076,52 +1079,46 @@ class _JetLexer implements FlexLexer { return commentStateToTokenType(state); } } - case 149: break; - case 98: + case 150: break; + case 99: { return JetTokens.WHILE_KEYWORD ; } - case 150: break; + case 151: break; case 44: { return JetTokens.MINUSMINUS; } - case 151: break; - case 103: + case 152: break; + case 104: { return JetTokens.CONTINUE_KEYWORD ; } - case 152: break; + case 153: break; case 79: { return JetTokens.NOT_IN; } - case 153: break; + case 154: break; case 39: { return JetTokens.ATAT ; } - case 154: break; + case 155: break; case 6: { return JetTokens.DIV ; } - case 155: break; + case 156: break; case 82: { return JetTokens.IDE_TEMPLATE_END ; } - case 156: break; + case 157: break; case 38: { return JetTokens.LABEL_IDENTIFIER; } - case 157: break; + case 158: break; case 29: { return JetTokens.REGULAR_STRING_PART; } - case 158: break; + case 159: break; case 19: { return JetTokens.QUEST ; } - case 159: break; - case 70: - { pushState(DOC_COMMENT); - commentDepth = 0; - commentStart = getTokenStart(); - } case 160: break; case 62: { return JetTokens.OROR ; @@ -1175,7 +1172,7 @@ class _JetLexer implements FlexLexer { commentStart = getTokenStart(); } case 172: break; - case 84: + case 85: { return JetTokens.THIS_KEYWORD ; } case 173: break; @@ -1187,130 +1184,141 @@ class _JetLexer implements FlexLexer { { return JetTokens.SEMICOLON ; } case 175: break; + case 70: + { // pushState(DOC_COMMENT_START); + pushState(DOC_COMMENT); + commentDepth = 0; + commentStart = getTokenStart(); + } + case 176: break; case 49: { return JetTokens.IF_KEYWORD ; } - case 176: break; + case 177: break; case 66: { return JetTokens.ESCAPE_SEQUENCE; } - case 177: break; + case 178: break; case 31: { popState(); return JetTokens.CLOSING_QUOTE; } - case 178: break; + case 179: break; case 18: { return JetTokens.EQ ; } - case 179: break; + case 180: break; case 5: { return JetTokens.AT ; } - case 180: break; + case 181: break; case 73: { return JetTokens.AS_SAFE; } - case 181: break; + case 182: break; case 24: { return JetTokens.LPAR ; } - case 182: break; + case 183: break; case 8: { return JetTokens.MINUS ; } - case 183: break; - case 99: + case 184: break; + case 100: { return JetTokens.FALSE_KEYWORD ; } - case 184: break; - case 86: + case 185: break; + case 87: { return JetTokens.TYPE_KEYWORD ; } - case 185: break; + case 186: break; case 67: { commentDepth++; } - case 186: break; + case 187: break; case 74: { return JetTokens.FUN_KEYWORD ; } - case 187: break; + case 188: break; case 47: { return JetTokens.IS_KEYWORD ; } - case 188: break; + case 189: break; case 30: { popState(); yypushback(1); return JetTokens.DANGLING_NEWLINE; } - case 189: break; + case 190: break; case 34: { lBraceCount++; return JetTokens.LBRACE; } - case 190: break; - case 91: + case 191: break; + case 92: { yypushback(3); return JetTokens.EXCL; } - case 191: break; + case 192: break; case 42: { return JetTokens.DIVEQ ; } - case 192: break; - case 88: + case 193: break; + case 89: { return JetTokens.ELSE_KEYWORD ; } - case 193: break; + case 194: break; case 51: { return JetTokens.AS_KEYWORD ; } - case 194: break; + case 195: break; case 48: { return JetTokens.IN_KEYWORD ; } - case 195: break; + case 196: break; case 58: { return JetTokens.EQEQ ; } - case 196: break; + case 197: break; case 83: { return JetTokens.EQEQEQ ; } - case 197: break; + case 198: break; case 77: { return JetTokens.VAL_KEYWORD ; } - case 198: break; - case 90: + case 199: break; + case 91: { return JetTokens.CAPITALIZED_THIS_KEYWORD ; } - case 199: break; + case 200: break; case 50: { return JetTokens.MULTEQ ; } - case 200: break; + case 201: break; case 11: { return JetTokens.LBRACE ; } - case 201: break; - case 100: + case 202: break; + case 101: { return JetTokens.OBJECT_KEYWORD ; } - case 202: break; - case 97: + case 203: break; + case 98: { return JetTokens.BREAK_KEYWORD ; } - case 203: break; - case 94: + case 204: break; + case 84: + { return JetTokens.BLOCK_COMMENT; + } + case 205: break; + case 95: { return JetTokens.TRAIT_KEYWORD ; } - case 204: break; + case 206: break; case 33: { } - case 205: break; + case 207: break; case 16: { return JetTokens.HASH ; } - case 206: break; + case 208: break; default: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { zzAtEOF = true; @@ -1322,14 +1330,14 @@ class _JetLexer implements FlexLexer { zzStartRead = commentStart; return commentStateToTokenType(state); } - case 231: break; + case 233: break; case DOC_COMMENT: { int state = yystate(); popState(); zzStartRead = commentStart; return commentStateToTokenType(state); } - case 232: break; + case 234: break; default: return null; } diff --git a/compiler/testData/psi/NestedComments.jet b/compiler/testData/psi/NestedComments.jet index a2be7763b75..a16e1e9dbb3 100644 --- a/compiler/testData/psi/NestedComments.jet +++ b/compiler/testData/psi/NestedComments.jet @@ -10,10 +10,10 @@ 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 index 7e3b37e27ba..59e29c154d8 100644 --- a/compiler/testData/psi/NestedComments.txt +++ b/compiler/testData/psi/NestedComments.txt @@ -17,11 +17,27 @@ JetFile: NestedComments.jet 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)('/') + PsiComment(BLOCK_COMMENT)('/**/') + PsiWhiteSpace('\n') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace('\n') + PsiComment(BLOCK_COMMENT)('/* */') + PsiWhiteSpace('\n') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace('\n') + PsiComment(BLOCK_COMMENT)('/*/**/*/') + PsiWhiteSpace('\n') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace('\n') + PsiComment(DOC_COMMENT)('/***/') + PsiWhiteSpace('\n') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace('\n') + PsiComment(DOC_COMMENT)('/** /***/*/') PsiWhiteSpace('\n') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') From 90e5510b5dbabfc425fcb9878417d95b1a80fe82 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Fri, 23 Mar 2012 10:41:45 +0100 Subject: [PATCH 5/6] Support !!foo as a double-negation --- .../lang/parsing/JetExpressionParsing.java | 30 +- ...SemanticWhitespaceAwarePsiBuilderImpl.java | 6 +- .../src/org/jetbrains/jet/lexer/Jet.flex | 2 +- .../org/jetbrains/jet/lexer/_JetLexer.java | 949 +++++++++--------- compiler/testData/psi/AssertNotNull.jet | 10 + compiler/testData/psi/AssertNotNull.txt | 126 +++ 6 files changed, 634 insertions(+), 489 deletions(-) create mode 100644 compiler/testData/psi/AssertNotNull.jet create mode 100644 compiler/testData/psi/AssertNotNull.txt diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java b/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java index c26a4602b9e..0ebf9560ac9 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java @@ -64,7 +64,9 @@ public class JetExpressionParsing extends AbstractJetParsing { /*package*/ static final TokenSet EXPRESSION_FIRST = TokenSet.create( // Prefix - MINUS, PLUS, MINUSMINUS, PLUSPLUS, EXCL, LBRACKET, LABEL_IDENTIFIER, AT, ATAT, + MINUS, PLUS, MINUSMINUS, PLUSPLUS, + EXCL, EXCLEXCL, // Joining complex tokens makes it necessary to put EXCLEXCL here + LBRACKET, LABEL_IDENTIFIER, AT, ATAT, // Atomic LPAR, // parenthesized @@ -325,24 +327,34 @@ public class JetExpressionParsing extends AbstractJetParsing { */ private void parsePrefixExpression() { // System.out.println("pre at " + myBuilder.getTokenText()); + if (at(LBRACKET)) { if (!parseLocalDeclaration()) { PsiBuilder.Marker expression = mark(); myJetParsing.parseAnnotations(false); parsePrefixExpression(); expression.done(ANNOTATED_EXPRESSION); - } else { + } + else { return; } - } else if (atSet(Precedence.PREFIX.getOperations())) { - PsiBuilder.Marker expression = mark(); + } + else { + myBuilder.disableJoiningComplexTokens(); + if (atSet(Precedence.PREFIX.getOperations())) { + PsiBuilder.Marker expression = mark(); - parseOperationReference(); + parseOperationReference(); - parsePrefixExpression(); - expression.done(PREFIX_EXPRESSION); - } else { - parsePostfixExpression(); + myBuilder.restoreJoiningComplexTokensState(); + + parsePrefixExpression(); + expression.done(PREFIX_EXPRESSION); + } + else { + myBuilder.restoreJoiningComplexTokensState(); + parsePostfixExpression(); + } } } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/parsing/SemanticWhitespaceAwarePsiBuilderImpl.java b/compiler/frontend/src/org/jetbrains/jet/lang/parsing/SemanticWhitespaceAwarePsiBuilderImpl.java index 3e3593b48cc..a77c7560376 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/parsing/SemanticWhitespaceAwarePsiBuilderImpl.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/parsing/SemanticWhitespaceAwarePsiBuilderImpl.java @@ -32,7 +32,7 @@ import static org.jetbrains.jet.lexer.JetTokens.*; * @author abreslav */ public class SemanticWhitespaceAwarePsiBuilderImpl extends PsiBuilderAdapter implements SemanticWhitespaceAwarePsiBuilder { - private final TokenSet complexTokens = TokenSet.create(SAFE_ACCESS, ELVIS); + private final TokenSet complexTokens = TokenSet.create(SAFE_ACCESS, ELVIS, EXCLEXCL); private final Stack joinComplexTokens = new Stack(); private final Stack newlinesEnabled = new Stack(); @@ -126,6 +126,10 @@ public class SemanticWhitespaceAwarePsiBuilderImpl extends PsiBuilderAdapter imp if (nextRawToken == DOT) return SAFE_ACCESS; if (nextRawToken == COLON) return ELVIS; } + else if (rawTokenType == EXCL) { + IElementType nextRawToken = rawLookup(rawLookupSteps); + if (nextRawToken == EXCL) return EXCLEXCL; + } return rawTokenType; } diff --git a/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex b/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex index 9e820a75db0..2b79ebc5822 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex +++ b/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex @@ -270,7 +270,7 @@ LONG_TEMPLATE_ENTRY_END=\} ">=" { return JetTokens.GTEQ ; } "==" { return JetTokens.EQEQ ; } "!=" { return JetTokens.EXCLEQ ; } -"!!" { return JetTokens.EXCLEXCL ; } +//"!!" { return JetTokens.EXCLEXCL ; } "&&" { return JetTokens.ANDAND ; } "||" { return JetTokens.OROR ; } //"?." { return JetTokens.SAFE_ACCESS;} diff --git a/compiler/frontend/src/org/jetbrains/jet/lexer/_JetLexer.java b/compiler/frontend/src/org/jetbrains/jet/lexer/_JetLexer.java index de3f95b6e4f..24111616741 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lexer/_JetLexer.java +++ b/compiler/frontend/src/org/jetbrains/jet/lexer/_JetLexer.java @@ -1,4 +1,4 @@ -/* The following code was generated by JFlex 1.4.3 on 3/23/12 9:41 AM */ +/* The following code was generated by JFlex 1.4.3 on 3/23/12 10:24 AM */ package org.jetbrains.jet.lexer; @@ -13,7 +13,7 @@ import org.jetbrains.jet.lexer.JetTokens; /** * This class is a scanner generated by * JFlex 1.4.3 - * on 3/23/12 9:41 AM from the specification file + * on 3/23/12 10:24 AM from the specification file * /Users/abreslav/work/jet/compiler/frontend/src/org/jetbrains/jet/lexer/Jet.flex */ class _JetLexer implements FlexLexer { @@ -22,11 +22,10 @@ class _JetLexer implements FlexLexer { /** lexical states */ public static final int STRING = 2; - public static final int DOC_COMMENT_START = 10; public static final int BLOCK_COMMENT = 8; public static final int YYINITIAL = 0; - public static final int LONG_TEMPLATE_ENTRY = 14; - public static final int DOC_COMMENT = 12; + 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; @@ -37,7 +36,7 @@ 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, 5, 5, 4, 4, 6, 6 + 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5 }; /** @@ -123,7 +122,7 @@ class _JetLexer implements FlexLexer { private static final int [] ZZ_ACTION = zzUnpackAction(); private static final String ZZ_ACTION_PACKED_0 = - "\7\0\1\1\1\2\1\3\1\4\2\1\1\5\1\6"+ + "\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"+ @@ -132,21 +131,20 @@ class _JetLexer implements FlexLexer { "\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\66\1\0"+ - "\1\67\1\0\1\70\1\71\1\72\1\73\1\74\1\75"+ - "\1\76\1\77\1\100\1\0\1\101\2\102\2\0\1\40"+ - "\1\103\1\104\1\105\1\44\1\3\2\0\1\106\4\0"+ - "\1\107\4\3\1\110\10\3\1\111\4\3\1\112\1\113"+ - "\2\3\1\114\1\115\1\116\1\117\1\120\1\121\1\122"+ - "\1\123\2\0\2\40\1\45\1\46\1\124\1\44\1\0"+ - "\1\125\1\3\1\126\1\3\1\127\4\3\1\130\1\131"+ - "\4\3\1\132\1\3\1\133\1\134\1\100\1\0\1\135"+ - "\1\136\1\137\1\140\1\3\1\141\3\3\1\142\1\143"+ - "\1\144\1\0\1\3\1\145\1\3\1\146\1\3\1\147"+ - "\1\150"; + "\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\123\1\44\1\0\1\124"+ + "\1\3\1\125\1\3\1\126\4\3\1\127\1\130\4\3"+ + "\1\131\1\3\1\132\1\133\1\77\1\0\1\134\1\135"+ + "\1\136\1\137\1\3\1\140\3\3\1\141\1\142\1\143"+ + "\1\0\1\3\1\144\1\3\1\145\1\3\1\146\1\147"; private static int [] zzUnpackAction() { - int [] result = new int[232]; + int [] result = new int[230]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; @@ -171,38 +169,38 @@ class _JetLexer implements FlexLexer { private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\100\0\200\0\300\0\u0100\0\u0140\0\u0180\0\u0140"+ - "\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\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\u0940\0\u0140\0\u0980\0\u09c0\0\u0140\0\u0a00\0\u0a40\0\u0a80"+ - "\0\u0ac0\0\u0140\0\u0140\0\u0140\0\u0140\0\u0140\0\u0140\0\u0140"+ - "\0\u0b00\0\u0140\0\u0b40\0\u0b80\0\u0140\0\u0140\0\u0bc0\0\u0c00"+ - "\0\u0c40\0\u0c80\0\u0140\0\u0cc0\0\u0d00\0\u0140\0\u0140\0\u0d40"+ - "\0\u0d80\0\u0dc0\0\u0e00\0\u0e40\0\u0e80\0\u0ec0\0\u0140\0\u0f00"+ - "\0\u0f40\0\u0140\0\u0f80\0\u0fc0\0\u1000\0\u1040\0\u0140\0\u0140"+ - "\0\u0140\0\u0140\0\u0140\0\u1080\0\u10c0\0\u1100\0\u1140\0\u1180"+ - "\0\u0200\0\u0200\0\u0200\0\u11c0\0\u0140\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\u0140\0\u1600"+ - "\0\u1640\0\u0140\0\u1680\0\u0140\0\u0140\0\u16c0\0\u0140\0\u0140"+ - "\0\u0140\0\u0140\0\u0140\0\u1700\0\u1740\0\u0140\0\u0140\0\u1780"+ - "\0\u17c0\0\u1800\0\u1840\0\u0140\0\u0140\0\u0140\0\u1880\0\u0140"+ - "\0\u18c0\0\u1900\0\u1940\0\u1980\0\u19c0\0\u1a00\0\u1a40\0\u0140"+ - "\0\u1a80\0\u1ac0\0\u1b00\0\u1b40\0\u0200\0\u1b80\0\u1bc0\0\u1c00"+ - "\0\u1c40\0\u1c80\0\u1cc0\0\u1d00\0\u1d40\0\u0140\0\u1d80\0\u1dc0"+ - "\0\u1e00\0\u1e40\0\u0200\0\u0200\0\u1e80\0\u1ec0\0\u0200\0\u0200"+ - "\0\u1f00\0\u1f00\0\u0140\0\u0140\0\u0140\0\u0140\0\u1f40\0\u1f80"+ - "\0\u0140\0\u1fc0\0\u0140\0\u0140\0\u0140\0\u2000\0\u1880\0\u0200"+ - "\0\u2040\0\u0200\0\u2080\0\u0200\0\u20c0\0\u2100\0\u2140\0\u2180"+ - "\0\u0200\0\u0200\0\u21c0\0\u2200\0\u2240\0\u2280\0\u0200\0\u22c0"+ - "\0\u0200\0\u0140\0\u0140\0\u2300\0\u0c00\0\u0200\0\u0200\0\u0200"+ - "\0\u2340\0\u0200\0\u2380\0\u23c0\0\u2400\0\u0200\0\u0200\0\u0200"+ - "\0\u2440\0\u2480\0\u0200\0\u24c0\0\u0200\0\u2500\0\u0200\0\u0200"; + "\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\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\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\u1940\0\u1980\0\u19c0\0\u1a00\0\u1a40\0\u0180\0\u1a80\0\u1ac0"+ + "\0\u1b00\0\u1b40\0\u0200\0\u1b80\0\u1bc0\0\u1c00\0\u1c40\0\u1c80"+ + "\0\u1cc0\0\u1d00\0\u1d40\0\u0180\0\u1d80\0\u1dc0\0\u1e00\0\u1e40"+ + "\0\u0200\0\u0200\0\u1e80\0\u1ec0\0\u0200\0\u0200\0\u1f00\0\u1f00"+ + "\0\u0180\0\u0180\0\u0180\0\u0180\0\u1f40\0\u1f80\0\u0180\0\u1fc0"+ + "\0\u0180\0\u0180\0\u0180\0\u2000\0\u1880\0\u0200\0\u2040\0\u0200"+ + "\0\u2080\0\u0200\0\u20c0\0\u2100\0\u2140\0\u2180\0\u0200\0\u0200"+ + "\0\u21c0\0\u2200\0\u2240\0\u2280\0\u0200\0\u22c0\0\u0200\0\u0180"+ + "\0\u0180\0\u2300\0\u0c00\0\u0200\0\u0200\0\u0200\0\u2340\0\u0200"+ + "\0\u2380\0\u23c0\0\u2400\0\u0200\0\u0200\0\u0200\0\u2440\0\u2480"+ + "\0\u0200\0\u24c0\0\u0200\0\u2500\0\u0200\0\u0200"; private static int [] zzUnpackRowMap() { - int [] result = new int[232]; + int [] result = new int[230]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; @@ -225,258 +223,258 @@ class _JetLexer implements FlexLexer { private static final int [] ZZ_TRANS = zzUnpackTrans(); private static final String ZZ_TRANS_PACKED_0 = - "\1\10\1\11\1\12\1\13\1\12\1\10\1\14\1\13"+ - "\1\15\1\16\1\17\1\20\2\12\1\21\1\12\1\22"+ - "\1\12\1\23\1\10\1\24\1\12\1\25\1\26\1\27"+ - "\1\12\1\30\1\31\1\32\1\33\1\34\1\35\1\36"+ - "\1\37\1\40\2\12\1\41\1\42\1\12\1\43\1\12"+ - "\1\44\1\12\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\1\70\7\71\1\72"+ - "\1\73\12\71\1\74\1\75\62\71\1\76\1\73\12\71"+ - "\1\76\1\77\53\71\2\0\1\100\1\0\1\100\1\0"+ - "\1\101\5\0\2\100\1\0\1\100\1\0\1\100\3\0"+ - "\1\100\2\0\1\102\3\100\1\0\22\100\21\0\12\103"+ - "\1\104\21\103\1\105\43\103\100\0\1\10\1\11\1\12"+ - "\1\13\1\12\1\10\1\14\1\13\1\15\1\16\1\17"+ - "\1\20\2\12\1\21\1\12\1\22\1\12\1\23\1\10"+ - "\1\24\1\12\1\106\1\107\1\27\1\12\1\30\1\31"+ - "\1\32\1\33\1\34\1\35\1\36\1\37\1\40\2\12"+ - "\1\41\1\42\1\12\1\43\1\12\1\44\1\12\1\45"+ + "\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\1\70\1\0\1\11\11\0\1\11\2\0"+ - "\1\110\1\111\20\0\1\111\40\0\2\12\1\0\2\12"+ - "\5\0\3\12\1\0\1\12\1\0\1\12\3\0\1\12"+ - "\2\0\4\12\1\0\22\12\24\0\1\13\3\0\1\13"+ - "\70\0\6\112\2\0\70\112\2\0\1\113\1\0\1\113"+ - "\1\0\1\114\5\0\2\113\1\0\1\113\1\0\1\113"+ - "\3\0\1\113\2\0\4\113\1\0\22\113\23\0\1\115"+ - "\1\0\1\115\1\0\1\116\2\0\1\117\2\0\2\115"+ - "\1\0\1\115\1\0\1\115\3\0\1\115\2\0\4\115"+ - "\1\0\22\115\33\0\1\120\21\0\1\121\26\0\1\122"+ - "\15\0\1\123\11\0\1\123\1\124\1\125\1\110\1\111"+ - "\20\0\1\111\5\0\1\125\32\0\1\126\11\0\1\126"+ - "\2\0\1\127\101\0\1\130\41\0\1\131\1\132\14\0"+ - "\7\23\1\0\12\23\1\133\1\134\54\23\24\0\1\135"+ - "\54\0\2\12\1\0\2\12\5\0\3\12\1\0\1\12"+ - "\1\0\1\12\3\0\1\12\2\0\1\12\1\136\2\12"+ - "\1\0\10\12\1\137\5\12\1\140\3\12\22\0\2\12"+ - "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ - "\3\0\1\12\2\0\3\12\1\141\1\0\2\12\1\142"+ - "\12\12\1\143\4\12\22\0\2\12\1\0\2\12\5\0"+ - "\3\12\1\0\1\12\1\0\1\12\3\0\1\144\2\0"+ - "\4\12\1\0\22\12\104\0\1\145\15\0\2\12\1\0"+ - "\2\12\5\0\3\12\1\0\1\12\1\0\1\12\3\0"+ - "\1\12\2\0\4\12\1\0\1\12\1\146\12\12\1\147"+ - "\5\12\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ - "\1\12\1\0\1\12\3\0\1\12\2\0\4\12\1\0"+ - "\11\12\1\150\10\12\22\0\2\12\1\0\2\12\5\0"+ - "\3\12\1\0\1\12\1\0\1\12\3\0\1\151\2\0"+ - "\4\12\1\0\22\12\22\0\2\12\1\0\2\12\5\0"+ - "\3\12\1\0\1\12\1\0\1\12\3\0\1\12\2\0"+ - "\4\12\1\0\14\12\1\152\5\12\22\0\2\12\1\0"+ - "\2\12\5\0\3\12\1\0\1\12\1\0\1\12\3\0"+ - "\1\12\2\0\4\12\1\0\5\12\1\153\14\12\22\0"+ - "\2\12\1\0\2\12\5\0\3\12\1\0\1\12\1\0"+ - "\1\12\3\0\1\12\2\0\3\12\1\154\1\0\22\12"+ - "\22\0\2\12\1\0\2\12\5\0\3\12\1\0\1\12"+ - "\1\0\1\12\3\0\1\12\2\0\4\12\1\0\3\12"+ - "\1\155\16\12\22\0\2\12\1\0\2\12\5\0\3\12"+ - "\1\0\1\12\1\0\1\12\3\0\1\12\2\0\4\12"+ - "\1\0\10\12\1\156\11\12\22\0\2\12\1\0\2\12"+ - "\5\0\3\12\1\0\1\12\1\0\1\12\3\0\1\12"+ - "\2\0\1\12\1\157\2\12\1\0\22\12\22\0\2\12"+ - "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ - "\3\0\1\160\2\0\4\12\1\0\1\12\1\161\3\12"+ - "\1\162\14\12\22\0\2\12\1\0\2\12\5\0\3\12"+ - "\1\0\1\12\1\0\1\12\3\0\1\12\2\0\1\12"+ - "\1\163\2\12\1\0\22\12\22\0\2\12\1\0\2\12"+ - "\5\0\3\12\1\0\1\12\1\0\1\12\3\0\1\12"+ - "\2\0\4\12\1\0\5\12\1\164\14\12\22\0\2\12"+ - "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ - "\3\0\1\12\2\0\4\12\1\0\1\12\1\165\20\12"+ - "\53\0\1\166\24\0\1\167\3\0\1\170\75\0\1\171"+ - "\1\0\1\172\75\0\1\173\1\0\1\174\76\0\1\175"+ - "\1\176\77\0\1\177\1\0\1\200\100\0\1\201\100\0"+ - "\1\202\73\0\1\203\14\0\7\71\2\0\12\71\2\0"+ - "\53\71\2\0\1\204\1\0\1\204\1\0\1\205\5\0"+ - "\2\204\1\0\1\204\1\0\1\204\3\0\1\204\1\206"+ - "\1\0\4\204\1\0\22\204\21\0\7\207\1\0\15\207"+ - "\1\210\52\207\24\0\1\211\54\0\2\100\1\0\2\100"+ - "\5\0\3\100\1\0\1\100\1\0\1\100\3\0\1\100"+ - "\2\0\4\100\1\0\22\100\21\0\6\212\2\0\70\212"+ - "\1\0\2\100\1\0\2\100\5\0\3\100\1\0\1\100"+ - "\1\0\1\100\3\0\1\100\2\0\1\100\1\213\2\100"+ - "\1\0\22\100\55\0\1\214\55\0\1\215\66\0\1\126"+ - "\11\0\1\126\2\0\1\216\62\0\1\217\11\0\1\217"+ - "\4\0\1\217\44\0\1\217\12\0\6\112\1\220\1\0"+ - "\70\112\1\0\2\113\1\0\2\113\5\0\3\113\1\0"+ - "\1\113\1\0\1\113\3\0\1\113\2\0\4\113\1\0"+ - "\22\113\21\0\6\221\2\0\70\221\1\0\2\115\1\0"+ - "\2\115\5\0\3\115\1\0\1\115\1\0\1\115\3\0"+ - "\1\115\2\0\4\115\1\0\22\115\21\0\6\222\2\0"+ - "\70\222\7\120\1\0\70\120\34\0\1\223\44\0\1\123"+ - "\11\0\1\123\2\0\1\224\1\111\20\0\1\111\40\0"+ - "\2\124\10\0\1\124\1\0\1\124\1\225\1\124\1\0"+ - "\1\226\13\0\1\124\2\0\1\124\1\226\1\124\3\0"+ - "\1\124\3\0\1\124\3\0\1\124\22\0\1\125\11\0"+ - "\1\125\2\0\1\227\62\0\1\126\11\0\1\126\3\0"+ - "\1\111\20\0\1\111\37\0\7\23\1\0\70\23\24\0"+ - "\1\230\54\0\2\12\1\0\2\12\5\0\3\12\1\0"+ - "\1\12\1\0\1\12\3\0\1\12\2\0\2\12\1\231"+ - "\1\12\1\0\10\12\1\232\11\12\22\0\2\12\1\0"+ - "\2\12\5\0\3\12\1\0\1\12\1\0\1\12\3\0"+ - "\1\233\2\0\4\12\1\0\5\12\1\234\10\12\1\235"+ - "\3\12\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ - "\1\12\1\0\1\12\3\0\1\12\2\0\4\12\1\0"+ - "\4\12\1\236\15\12\22\0\2\12\1\0\2\12\5\0"+ - "\3\12\1\0\1\12\1\0\1\12\3\0\1\12\2\0"+ - "\4\12\1\0\4\12\1\237\15\12\22\0\2\12\1\0"+ - "\2\12\5\0\3\12\1\0\1\12\1\0\1\12\3\0"+ - "\1\12\2\0\4\12\1\0\2\12\1\240\17\12\22\0"+ - "\2\12\1\0\2\12\5\0\3\12\1\0\1\12\1\0"+ - "\1\12\3\0\1\12\2\0\4\12\1\0\5\12\1\241"+ - "\14\12\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ - "\1\12\1\0\1\12\3\0\1\12\2\0\4\12\1\0"+ - "\12\12\1\242\7\12\22\0\2\12\1\0\2\12\5\0"+ - "\3\12\1\0\1\12\1\0\1\12\3\0\1\12\2\0"+ - "\4\12\1\0\14\12\1\243\5\12\22\0\2\12\1\0"+ - "\2\12\5\0\3\12\1\0\1\12\1\0\1\12\3\0"+ - "\1\12\2\0\3\12\1\244\1\0\22\12\22\0\2\12"+ - "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ - "\3\0\1\12\2\0\4\12\1\0\1\245\21\12\22\0"+ - "\2\12\1\0\2\12\5\0\3\12\1\0\1\12\1\0"+ - "\1\12\3\0\1\12\2\0\4\12\1\0\22\12\5\0"+ - "\1\246\14\0\2\12\1\0\2\12\5\0\3\12\1\0"+ - "\1\12\1\0\1\12\3\0\1\12\2\0\1\247\3\12"+ - "\1\0\22\12\22\0\2\12\1\0\2\12\5\0\3\12"+ - "\1\0\1\12\1\0\1\12\3\0\1\12\2\0\4\12"+ - "\1\0\3\12\1\250\16\12\22\0\2\12\1\0\2\12"+ - "\5\0\3\12\1\0\1\12\1\0\1\12\3\0\1\12"+ - "\2\0\2\12\1\251\1\12\1\0\3\12\1\252\16\12"+ - "\22\0\2\12\1\0\2\12\5\0\3\12\1\0\1\12"+ - "\1\0\1\12\3\0\1\12\2\0\4\12\1\0\2\12"+ - "\1\253\17\12\22\0\2\12\1\0\2\12\5\0\3\12"+ - "\1\0\1\12\1\0\1\12\3\0\1\12\2\0\4\12"+ - "\1\0\10\12\1\254\11\12\22\0\2\12\1\0\2\12"+ - "\5\0\3\12\1\0\1\12\1\0\1\12\3\0\1\12"+ - "\2\0\4\12\1\0\14\12\1\255\5\12\22\0\2\12"+ - "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ - "\3\0\1\12\2\0\2\12\1\256\1\12\1\0\22\12"+ - "\22\0\2\12\1\0\2\12\5\0\3\12\1\0\1\12"+ - "\1\0\1\12\3\0\1\12\2\0\4\12\1\0\10\12"+ - "\1\257\3\12\1\260\5\12\54\0\1\261\3\0\1\262"+ - "\123\0\1\263\74\0\1\264\101\0\1\265\100\0\1\266"+ - "\15\0\2\204\1\0\2\204\5\0\3\204\1\0\1\204"+ - "\1\0\1\204\3\0\1\204\2\0\4\204\1\0\22\204"+ - "\21\0\6\267\2\0\70\267\1\0\2\270\10\0\1\270"+ - "\1\0\1\270\1\0\1\270\15\0\1\270\2\0\1\270"+ - "\1\0\1\270\3\0\1\270\3\0\1\270\3\0\1\270"+ - "\45\0\1\75\53\0\6\212\1\271\1\0\70\212\1\0"+ - "\2\100\1\0\2\100\5\0\3\100\1\0\1\100\1\0"+ - "\1\100\3\0\1\100\2\0\2\100\1\272\1\100\1\0"+ - "\22\100\22\0\1\217\11\0\1\217\64\0\6\221\1\273"+ - "\1\0\70\221\6\222\1\274\1\0\70\222\12\0\1\275"+ - "\66\0\1\126\11\0\1\126\65\0\2\276\10\0\1\276"+ - "\1\0\1\276\1\216\1\276\15\0\1\276\2\0\1\276"+ - "\1\0\1\276\3\0\1\276\3\0\1\276\3\0\1\276"+ - "\22\0\1\217\11\0\1\217\4\0\1\277\44\0\1\277"+ - "\30\0\1\216\62\0\2\12\1\0\2\12\5\0\3\12"+ - "\1\0\1\12\1\0\1\12\3\0\1\12\2\0\3\12"+ - "\1\300\1\0\22\12\22\0\2\12\1\0\2\12\5\0"+ - "\3\12\1\0\1\12\1\0\1\12\3\0\1\12\2\0"+ - "\4\12\1\0\1\12\1\301\20\12\22\0\2\12\1\0"+ - "\2\12\5\0\3\12\1\0\1\12\1\0\1\12\3\0"+ - "\1\12\2\0\4\12\1\0\3\12\1\302\16\12\22\0"+ - "\2\12\1\0\2\12\5\0\3\12\1\0\1\12\1\0"+ - "\1\12\3\0\1\12\2\0\2\12\1\303\1\12\1\0"+ - "\22\12\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ - "\1\12\1\0\1\12\3\0\1\12\2\0\4\12\1\0"+ - "\3\12\1\304\16\12\22\0\2\12\1\0\2\12\5\0"+ - "\3\12\1\0\1\12\1\0\1\12\3\0\1\12\2\0"+ - "\4\12\1\0\3\12\1\305\16\12\22\0\2\12\1\0"+ - "\2\12\5\0\3\12\1\0\1\12\1\0\1\12\3\0"+ - "\1\12\2\0\1\306\3\12\1\0\22\12\22\0\2\12"+ - "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ - "\3\0\1\12\2\0\3\12\1\307\1\0\22\12\22\0"+ - "\2\12\1\0\2\12\5\0\3\12\1\0\1\12\1\0"+ - "\1\12\3\0\1\12\2\0\4\12\1\0\3\12\1\310"+ - "\16\12\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ - "\1\12\1\0\1\12\3\0\1\12\2\0\4\12\1\0"+ - "\14\12\1\311\5\12\22\0\2\12\1\0\2\12\5\0"+ - "\3\12\1\0\1\12\1\0\1\12\3\0\1\12\2\0"+ - "\4\12\1\0\3\12\1\312\16\12\22\0\2\12\1\0"+ - "\2\12\5\0\3\12\1\0\1\12\1\0\1\12\3\0"+ - "\1\12\2\0\4\12\1\0\6\12\1\313\13\12\22\0"+ - "\2\12\1\0\2\12\5\0\3\12\1\0\1\12\1\0"+ - "\1\12\3\0\1\314\2\0\4\12\1\0\22\12\22\0"+ - "\2\12\1\0\2\12\5\0\3\12\1\0\1\12\1\0"+ - "\1\12\3\0\1\12\2\0\4\12\1\0\5\12\1\315"+ - "\14\12\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ - "\1\12\1\0\1\12\3\0\1\12\2\0\4\12\1\0"+ - "\14\12\1\316\5\12\22\0\2\12\1\0\2\12\5\0"+ - "\3\12\1\0\1\12\1\0\1\12\3\0\1\12\2\0"+ - "\4\12\1\0\2\12\1\317\17\12\22\0\2\12\1\0"+ - "\2\12\5\0\3\12\1\0\1\12\1\0\1\12\3\0"+ - "\1\12\2\0\3\12\1\320\1\0\22\12\22\0\2\12"+ - "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ - "\3\0\1\12\2\0\3\12\1\321\1\0\22\12\22\0"+ - "\2\322\1\0\2\322\5\0\3\322\1\0\1\322\1\0"+ - "\1\322\3\0\1\322\2\0\4\322\1\0\22\322\21\0"+ - "\6\267\1\323\1\0\70\267\1\0\2\324\10\0\1\324"+ - "\1\0\1\324\1\0\1\324\15\0\1\324\2\0\1\324"+ - "\1\0\1\324\3\0\1\324\3\0\1\324\3\0\1\324"+ - "\22\0\2\100\1\0\2\100\5\0\3\100\1\0\1\100"+ - "\1\0\1\100\3\0\1\100\2\0\3\100\1\325\1\0"+ - "\22\100\22\0\2\276\10\0\1\276\1\0\1\276\1\0"+ - "\1\276\1\0\1\226\13\0\1\276\2\0\1\276\1\226"+ - "\1\276\3\0\1\276\3\0\1\276\3\0\1\276\22\0"+ - "\2\12\1\0\2\12\5\0\3\12\1\0\1\12\1\0"+ - "\1\12\3\0\1\12\2\0\4\12\1\0\13\12\1\326"+ - "\6\12\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ - "\1\12\1\0\1\12\3\0\1\12\2\0\1\327\3\12"+ - "\1\0\22\12\22\0\2\12\1\0\2\12\5\0\3\12"+ - "\1\0\1\12\1\0\1\12\3\0\1\12\2\0\4\12"+ - "\1\0\10\12\1\330\11\12\22\0\2\12\1\0\2\12"+ - "\5\0\3\12\1\0\1\12\1\0\1\12\3\0\1\12"+ - "\2\0\2\12\1\331\1\12\1\0\22\12\22\0\2\12"+ - "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ - "\3\0\1\12\2\0\3\12\1\332\1\0\22\12\22\0"+ - "\2\12\1\0\2\12\5\0\3\12\1\0\1\12\1\0"+ - "\1\12\3\0\1\12\2\0\4\12\1\0\1\333\21\12"+ - "\22\0\2\12\1\0\2\12\5\0\3\12\1\0\1\12"+ - "\1\0\1\12\3\0\1\12\2\0\4\12\1\0\5\12"+ - "\1\334\14\12\22\0\2\12\1\0\2\12\5\0\3\12"+ - "\1\0\1\12\1\0\1\12\3\0\1\12\2\0\4\12"+ - "\1\0\10\12\1\335\11\12\22\0\2\12\1\0\2\12"+ - "\5\0\3\12\1\0\1\12\1\0\1\12\3\0\1\12"+ - "\2\0\4\12\1\0\6\12\1\336\13\12\22\0\2\12"+ - "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ - "\3\0\1\12\2\0\4\12\1\0\3\12\1\337\16\12"+ - "\22\0\2\12\1\0\2\12\5\0\3\12\1\0\1\12"+ - "\1\0\1\12\3\0\1\12\2\0\4\12\1\0\3\12"+ - "\1\340\16\12\22\0\2\341\10\0\1\341\1\0\1\341"+ - "\1\0\1\341\15\0\1\341\2\0\1\341\1\0\1\341"+ - "\3\0\1\341\3\0\1\341\3\0\1\341\22\0\2\12"+ - "\1\0\2\12\5\0\3\12\1\0\1\12\1\0\1\12"+ - "\3\0\1\12\2\0\4\12\1\0\2\12\1\342\17\12"+ - "\22\0\2\12\1\0\2\12\5\0\3\12\1\0\1\12"+ - "\1\0\1\12\3\0\1\12\2\0\1\343\3\12\1\0"+ - "\22\12\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ - "\1\12\1\0\1\12\3\0\1\12\2\0\4\12\1\0"+ - "\7\12\1\344\12\12\22\0\2\12\1\0\2\12\5\0"+ - "\3\12\1\0\1\12\1\0\1\12\3\0\1\12\2\0"+ - "\4\12\1\0\2\12\1\345\17\12\22\0\2\207\10\0"+ - "\1\207\1\0\1\207\1\0\1\207\15\0\1\207\2\0"+ - "\1\207\1\0\1\207\3\0\1\207\3\0\1\207\3\0"+ - "\1\207\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ - "\1\12\1\0\1\12\3\0\1\346\2\0\4\12\1\0"+ - "\22\12\22\0\2\12\1\0\2\12\5\0\3\12\1\0"+ - "\1\12\1\0\1\12\3\0\1\12\2\0\4\12\1\0"+ - "\3\12\1\347\16\12\22\0\2\12\1\0\2\12\5\0"+ - "\3\12\1\0\1\12\1\0\1\12\3\0\1\12\2\0"+ - "\4\12\1\0\3\12\1\350\16\12\21\0"; + "\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\12\0\1\273\66\0\1\125\11\0"+ + "\1\125\65\0\2\274\10\0\1\274\1\0\1\274\1\214"+ + "\1\274\15\0\1\274\2\0\1\274\1\0\1\274\3\0"+ + "\1\274\3\0\1\274\3\0\1\274\22\0\1\215\11\0"+ + "\1\215\4\0\1\275\44\0\1\275\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\276\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\277\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\300\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\301\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\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\4\11\1\0\3\11"+ + "\1\303\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\304"+ + "\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\305\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\306\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\307\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\310\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\311\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\312"+ + "\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\313\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\314\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\315\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\316\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\317\1\0\22\11\22\0\2\320\1\0\2\320"+ + "\5\0\3\320\1\0\1\320\1\0\1\320\3\0\1\320"+ + "\2\0\4\320\1\0\22\320\21\0\6\265\1\321\1\0"+ + "\70\265\1\0\2\322\10\0\1\322\1\0\1\322\1\0"+ + "\1\322\15\0\1\322\2\0\1\322\1\0\1\322\3\0"+ + "\1\322\3\0\1\322\3\0\1\322\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\323\1\0\22\77\22\0\2\274"+ + "\10\0\1\274\1\0\1\274\1\0\1\274\1\0\1\224"+ + "\13\0\1\274\2\0\1\274\1\224\1\274\3\0\1\274"+ + "\3\0\1\274\3\0\1\274\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\324\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\325\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\326"+ + "\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\327"+ + "\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\330\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\331\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\332\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\333"+ + "\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\334\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\335\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\336\16\11\22\0"+ + "\2\337\10\0\1\337\1\0\1\337\1\0\1\337\15\0"+ + "\1\337\2\0\1\337\1\0\1\337\3\0\1\337\3\0"+ + "\1\337\3\0\1\337\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\340\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\341\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\342\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\343\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\344\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\345\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\346\16\11\21\0"; private static int [] zzUnpackTrans() { int [] result = new int[9536]; @@ -520,19 +518,19 @@ class _JetLexer implements FlexLexer { private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\5\0\1\10\1\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\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\11\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\1\4\0\1\11\15\1\1\11"+ - "\14\1\4\11\2\0\1\11\1\1\3\11\1\1\1\0"+ - "\22\1\2\11\1\0\14\1\1\0\7\1"; + "\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\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\1\4\0\1\11\15\1\1\11\14\1\4\11\2\0"+ + "\1\11\1\1\3\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[232]; + int [] result = new int[230]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; @@ -886,27 +884,23 @@ class _JetLexer implements FlexLexer { case 3: { return JetTokens.IDENTIFIER; } - case 105: break; + case 104: break; case 10: { pushState(STRING); return JetTokens.OPEN_QUOTE; } - case 106: break; - case 53: - { return JetTokens.EXCLEXCL ; - } - case 107: break; - case 75: + case 105: break; + case 74: { return JetTokens.FOR_KEYWORD ; } - case 108: break; - case 102: + case 106: break; + case 101: { return JetTokens.RETURN_KEYWORD ; } - case 109: break; - case 88: + case 107: break; + case 87: { return JetTokens.NULL_KEYWORD ; } - case 110: break; + case 108: break; case 35: { if (lBraceCount == 0) { popState(); @@ -915,160 +909,160 @@ class _JetLexer implements FlexLexer { lBraceCount--; return JetTokens.RBRACE; } - case 111: break; + case 109: break; case 15: { return JetTokens.LT ; } - case 112: break; + case 110: break; case 52: { return JetTokens.DO_KEYWORD ; } - case 113: break; + case 111: break; case 20: { return JetTokens.PLUS ; } - case 114: break; - case 59: + case 112: break; + case 58: { return JetTokens.PLUSEQ ; } - case 115: break; - case 93: + case 113: break; + case 92: { popState(); return JetTokens.THIS_KEYWORD; } - case 116: break; + case 114: break; case 28: { return JetTokens.COMMA ; } - case 117: break; + case 115: break; case 17: { return JetTokens.GT ; } - case 118: break; + case 116: break; case 4: { return JetTokens.WHITE_SPACE; } - case 119: break; + case 117: break; case 25: { return JetTokens.RPAR ; } - case 120: break; - case 57: + case 118: break; + case 56: { return JetTokens.DOUBLE_ARROW; } - case 121: break; - case 86: + case 119: break; + case 85: { return JetTokens.TRUE_KEYWORD ; } - case 122: break; - case 81: + case 120: break; + case 80: { return JetTokens.IDE_TEMPLATE_START ; } - case 123: break; + case 121: break; case 37: { return JetTokens.FIELD_IDENTIFIER; } - case 124: break; - case 61: + case 122: break; + case 60: { return JetTokens.ANDAND ; } - case 125: break; - case 65: + case 123: break; + case 64: { pushState(LONG_TEMPLATE_ENTRY); return JetTokens.LONG_TEMPLATE_ENTRY_START; } - case 126: break; + case 124: break; case 36: { return JetTokens.FLOAT_LITERAL; } - case 127: break; + case 125: break; case 40: { return JetTokens.EOL_COMMENT; } - case 128: break; - case 90: + case 126: break; + case 89: { return JetTokens.WHEN_KEYWORD ; } - case 129: break; - case 71: + case 127: break; + case 70: { pushState(RAW_STRING); return JetTokens.OPEN_QUOTE; } - case 130: break; + case 128: break; case 26: { return JetTokens.COLON ; } - case 131: break; - case 55: + case 129: break; + case 54: { return JetTokens.LTEQ ; } - case 132: break; + case 130: break; case 45: { return JetTokens.ARROW ; } - case 133: break; + case 131: break; case 32: { popState(); return JetTokens.IDENTIFIER; } - case 134: break; + case 132: break; case 22: { return JetTokens.LBRACKET ; } - case 135: break; - case 69: + case 133: break; + case 68: { yypushback(2); return JetTokens.INTEGER_LITERAL; } - case 136: break; + case 134: break; case 9: { return JetTokens.CHARACTER_LITERAL; } - case 137: break; - case 76: + case 135: break; + case 75: { return JetTokens.VAR_KEYWORD ; } - case 138: break; - case 56: + case 136: break; + case 55: { return JetTokens.GTEQ ; } - case 139: break; + case 137: break; case 2: { return JetTokens.INTEGER_LITERAL; } - case 140: break; + case 138: break; case 12: { return JetTokens.RBRACE ; } - case 141: break; - case 97: + case 139: break; + case 96: { return JetTokens.CLASS_KEYWORD ; } - case 142: break; - case 72: - { return JetTokens.TRY_KEYWORD ; - } - case 143: break; + case 140: break; case 14: { return JetTokens.EXCL ; } - case 144: break; - case 54: + case 141: break; + case 71: + { return JetTokens.TRY_KEYWORD ; + } + case 142: break; + case 53: { return JetTokens.EXCLEQ ; } - case 145: break; + case 143: break; case 46: { return JetTokens.MINUSEQ ; } - case 146: break; - case 103: + case 144: break; + case 102: { return JetTokens.PACKAGE_KEYWORD ; } - case 147: break; - case 94: + case 145: break; + case 93: { return JetTokens.THROW_KEYWORD ; } - case 148: break; - case 96: + case 146: break; + case 95: { return JetTokens.SUPER_KEYWORD ; } - case 149: break; - case 68: + case 147: break; + case 67: { if (commentDepth > 0) { commentDepth--; } @@ -1079,246 +1073,245 @@ class _JetLexer implements FlexLexer { return commentStateToTokenType(state); } } - case 150: break; - case 99: + case 148: break; + case 98: { return JetTokens.WHILE_KEYWORD ; } - case 151: break; + case 149: break; case 44: { return JetTokens.MINUSMINUS; } - case 152: break; - case 104: + case 150: break; + case 103: { return JetTokens.CONTINUE_KEYWORD ; } - case 153: break; - case 79: + case 151: break; + case 78: { return JetTokens.NOT_IN; } - case 154: break; + case 152: break; case 39: { return JetTokens.ATAT ; } - case 155: break; + case 153: break; case 6: { return JetTokens.DIV ; } - case 156: break; - case 82: + case 154: break; + case 81: { return JetTokens.IDE_TEMPLATE_END ; } - case 157: break; + case 155: break; case 38: { return JetTokens.LABEL_IDENTIFIER; } - case 158: break; + case 156: break; case 29: { return JetTokens.REGULAR_STRING_PART; } - case 159: break; + case 157: break; case 19: { return JetTokens.QUEST ; } - case 160: break; - case 62: + case 158: break; + case 69: + { pushState(DOC_COMMENT); + commentDepth = 0; + commentStart = getTokenStart(); + } + case 159: break; + case 61: { return JetTokens.OROR ; } - case 161: break; + case 160: break; case 21: { return JetTokens.PERC ; } - case 162: break; - case 80: + case 161: break; + case 79: { return JetTokens.EXCLEQEQEQ; } - case 163: break; - case 63: + case 162: break; + case 62: { return JetTokens.PERCEQ ; } - case 164: break; + case 163: break; case 43: { return JetTokens.RANGE ; } - case 165: break; + case 164: break; case 1: { return TokenType.BAD_CHARACTER; } - case 166: break; - case 64: + case 165: break; + case 63: { pushState(SHORT_TEMPLATE_ENTRY); yypushback(yylength() - 1); return JetTokens.SHORT_TEMPLATE_ENTRY_START; } - case 167: break; - case 78: + case 166: break; + case 77: { return JetTokens.NOT_IS; } - case 168: break; + case 167: break; case 13: { return JetTokens.MUL ; } - case 169: break; + case 168: break; case 23: { return JetTokens.RBRACKET ; } - case 170: break; - case 60: + case 169: break; + case 59: { return JetTokens.PLUSPLUS ; } - case 171: break; + case 170: break; case 41: { pushState(BLOCK_COMMENT); commentDepth = 0; commentStart = getTokenStart(); } - case 172: break; - case 85: + case 171: break; + case 84: { return JetTokens.THIS_KEYWORD ; } - case 173: break; + case 172: break; case 7: { return JetTokens.DOT ; } - case 174: break; + case 173: break; case 27: { return JetTokens.SEMICOLON ; } - case 175: break; - case 70: - { // pushState(DOC_COMMENT_START); - pushState(DOC_COMMENT); - commentDepth = 0; - commentStart = getTokenStart(); - } - case 176: break; + case 174: break; case 49: { return JetTokens.IF_KEYWORD ; } - case 177: break; - case 66: + case 175: break; + case 65: { return JetTokens.ESCAPE_SEQUENCE; } - case 178: break; + case 176: break; case 31: { popState(); return JetTokens.CLOSING_QUOTE; } - case 179: break; + case 177: break; case 18: { return JetTokens.EQ ; } - case 180: break; + case 178: break; case 5: { return JetTokens.AT ; } - case 181: break; - case 73: + case 179: break; + case 72: { return JetTokens.AS_SAFE; } - case 182: break; + case 180: break; case 24: { return JetTokens.LPAR ; } - case 183: break; + case 181: break; case 8: { return JetTokens.MINUS ; } - case 184: break; - case 100: + case 182: break; + case 99: { return JetTokens.FALSE_KEYWORD ; } - case 185: break; - case 87: + case 183: break; + case 86: { return JetTokens.TYPE_KEYWORD ; } - case 186: break; - case 67: + case 184: break; + case 66: { commentDepth++; } - case 187: break; - case 74: + case 185: break; + case 73: { return JetTokens.FUN_KEYWORD ; } - case 188: break; + case 186: break; case 47: { return JetTokens.IS_KEYWORD ; } - case 189: break; + case 187: break; case 30: { popState(); yypushback(1); return JetTokens.DANGLING_NEWLINE; } - case 190: break; + case 188: break; case 34: { lBraceCount++; return JetTokens.LBRACE; } - case 191: break; - case 92: + case 189: break; + case 91: { yypushback(3); return JetTokens.EXCL; } - case 192: break; + case 190: break; case 42: { return JetTokens.DIVEQ ; } - case 193: break; - case 89: + case 191: break; + case 88: { return JetTokens.ELSE_KEYWORD ; } - case 194: break; + case 192: break; case 51: { return JetTokens.AS_KEYWORD ; } - case 195: break; + case 193: break; case 48: { return JetTokens.IN_KEYWORD ; } - case 196: break; - case 58: + case 194: break; + case 57: { return JetTokens.EQEQ ; } - case 197: break; - case 83: + case 195: break; + case 82: { return JetTokens.EQEQEQ ; } - case 198: break; - case 77: + case 196: break; + case 76: { return JetTokens.VAL_KEYWORD ; } - case 199: break; - case 91: + case 197: break; + case 90: { return JetTokens.CAPITALIZED_THIS_KEYWORD ; } - case 200: break; + case 198: break; case 50: { return JetTokens.MULTEQ ; } - case 201: break; + case 199: break; case 11: { return JetTokens.LBRACE ; } - case 202: break; - case 101: + case 200: break; + case 100: { return JetTokens.OBJECT_KEYWORD ; } - case 203: break; - case 98: + case 201: break; + case 97: { return JetTokens.BREAK_KEYWORD ; } - case 204: break; - case 84: + case 202: break; + case 83: { return JetTokens.BLOCK_COMMENT; } - case 205: break; - case 95: + case 203: break; + case 94: { return JetTokens.TRAIT_KEYWORD ; } - case 206: break; + case 204: break; case 33: { } - case 207: break; + case 205: break; case 16: { return JetTokens.HASH ; } - case 208: break; + case 206: break; default: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { zzAtEOF = true; @@ -1330,14 +1323,14 @@ class _JetLexer implements FlexLexer { zzStartRead = commentStart; return commentStateToTokenType(state); } - case 233: break; + case 231: break; case DOC_COMMENT: { int state = yystate(); popState(); zzStartRead = commentStart; return commentStateToTokenType(state); } - case 234: break; + case 232: break; default: return null; } diff --git a/compiler/testData/psi/AssertNotNull.jet b/compiler/testData/psi/AssertNotNull.jet new file mode 100644 index 00000000000..1a16b34f3a0 --- /dev/null +++ b/compiler/testData/psi/AssertNotNull.jet @@ -0,0 +1,10 @@ +fun main(args : Array) { + !true; + !!true; + !!!true; + !!!!true; + true!!! + true!!!! + true!!and(false) + true!!.and(false) +} \ No newline at end of file diff --git a/compiler/testData/psi/AssertNotNull.txt b/compiler/testData/psi/AssertNotNull.txt new file mode 100644 index 00000000000..7a3090f1232 --- /dev/null +++ b/compiler/testData/psi/AssertNotNull.txt @@ -0,0 +1,126 @@ +JetFile: AssertNotNull.jet + NAMESPACE_HEADER + + FUN + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + VALUE_PARAMETER + PsiElement(IDENTIFIER)('args') + PsiWhiteSpace(' ') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('Array') + TYPE_ARGUMENT_LIST + PsiElement(LT)('<') + TYPE_PROJECTION + TYPE_REFERENCE + USER_TYPE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('String') + PsiElement(GT)('>') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + PREFIX_EXPRESSION + OPERATION_REFERENCE + PsiElement(EXCL)('!') + BOOLEAN_CONSTANT + PsiElement(true)('true') + PsiElement(SEMICOLON)(';') + PsiWhiteSpace('\n ') + PREFIX_EXPRESSION + OPERATION_REFERENCE + PsiElement(EXCL)('!') + PREFIX_EXPRESSION + OPERATION_REFERENCE + PsiElement(EXCL)('!') + BOOLEAN_CONSTANT + PsiElement(true)('true') + PsiElement(SEMICOLON)(';') + PsiWhiteSpace('\n ') + PREFIX_EXPRESSION + OPERATION_REFERENCE + PsiElement(EXCL)('!') + PREFIX_EXPRESSION + OPERATION_REFERENCE + PsiElement(EXCL)('!') + PREFIX_EXPRESSION + OPERATION_REFERENCE + PsiElement(EXCL)('!') + BOOLEAN_CONSTANT + PsiElement(true)('true') + PsiElement(SEMICOLON)(';') + PsiWhiteSpace('\n ') + PREFIX_EXPRESSION + OPERATION_REFERENCE + PsiElement(EXCL)('!') + PREFIX_EXPRESSION + OPERATION_REFERENCE + PsiElement(EXCL)('!') + PREFIX_EXPRESSION + OPERATION_REFERENCE + PsiElement(EXCL)('!') + PREFIX_EXPRESSION + OPERATION_REFERENCE + PsiElement(EXCL)('!') + BOOLEAN_CONSTANT + PsiElement(true)('true') + PsiElement(SEMICOLON)(';') + PsiWhiteSpace('\n ') + POSTFIX_EXPRESSION + BOOLEAN_CONSTANT + PsiElement(true)('true') + OPERATION_REFERENCE + PsiElement(EXCLEXCL)('!!') + PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line) + PsiElement(EXCL)('!') + PsiWhiteSpace('\n ') + POSTFIX_EXPRESSION + POSTFIX_EXPRESSION + BOOLEAN_CONSTANT + PsiElement(true)('true') + OPERATION_REFERENCE + PsiElement(EXCLEXCL)('!!') + OPERATION_REFERENCE + PsiElement(EXCLEXCL)('!!') + PsiWhiteSpace('\n ') + BINARY_EXPRESSION + POSTFIX_EXPRESSION + BOOLEAN_CONSTANT + PsiElement(true)('true') + OPERATION_REFERENCE + PsiElement(EXCLEXCL)('!!') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('and') + PARENTHESIZED + PsiElement(LPAR)('(') + BOOLEAN_CONSTANT + PsiElement(false)('false') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + DOT_QUALIFIED_EXPRESSION + POSTFIX_EXPRESSION + BOOLEAN_CONSTANT + PsiElement(true)('true') + OPERATION_REFERENCE + PsiElement(EXCLEXCL)('!!') + PsiElement(DOT)('.') + CALL_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('and') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + VALUE_ARGUMENT + BOOLEAN_CONSTANT + PsiElement(false)('false') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n') + PsiElement(RBRACE)('}') \ No newline at end of file From 4311bcc92919aaf0f999de39ea015bfe17ffec95 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Fri, 23 Mar 2012 18:36:17 +0400 Subject: [PATCH 6/6] #KT-1629 fixed Don't import jet.runtime.SharedVar.Int when typing "val a : Int = ..." Completion testing framework extended with ability to assert tail text. --- .../completion/JetCompletionContributor.java | 187 +++++++++++------- .../basic/OnlyScopedClassesWithoutExplicit.kt | 10 + .../completion/ExpectedCompletionUtils.java | 116 ++++++++++- .../completion/JetBasicCompletionTest.java | 4 + .../JetCompletionMultiTestBase.java | 37 +--- .../jet/completion/JetCompletionTestBase.java | 8 +- 6 files changed, 243 insertions(+), 119 deletions(-) create mode 100644 idea/testData/completion/basic/OnlyScopedClassesWithoutExplicit.kt diff --git a/idea/src/org/jetbrains/jet/plugin/completion/JetCompletionContributor.java b/idea/src/org/jetbrains/jet/plugin/completion/JetCompletionContributor.java index 5f57ecc2ecc..c76c78dc49a 100644 --- a/idea/src/org/jetbrains/jet/plugin/completion/JetCompletionContributor.java +++ b/idea/src/org/jetbrains/jet/plugin/completion/JetCompletionContributor.java @@ -30,8 +30,7 @@ import com.intellij.util.Consumer; import com.intellij.util.ProcessingContext; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor; -import org.jetbrains.jet.lang.descriptors.FunctionDescriptor; +import org.jetbrains.jet.lang.descriptors.*; import org.jetbrains.jet.lang.psi.*; import org.jetbrains.jet.lang.resolve.BindingContext; import org.jetbrains.jet.lexer.JetTokens; @@ -41,22 +40,27 @@ import org.jetbrains.jet.plugin.compiler.WholeProjectAnalyzerFacade; import org.jetbrains.jet.plugin.references.JetSimpleNameReference; import java.util.Collection; -import java.util.HashSet; -import java.util.Set; /** * @author Nikolay Krasko */ public class JetCompletionContributor extends CompletionContributor { + private static class CompletionSession { + public boolean isSomethingAdded = false; + public int customInvocationCount = 0; + } + public JetCompletionContributor() { extend(CompletionType.BASIC, PlatformPatterns.psiElement(), new CompletionProvider() { @Override protected void addCompletions(@NotNull CompletionParameters parameters, ProcessingContext context, @NotNull CompletionResultSet result) { + result.restartCompletionWhenNothingMatches(); - Set positions = new HashSet(); + CompletionSession session = new CompletionSession(); + session.customInvocationCount = parameters.getInvocationCount(); PsiElement position = parameters.getPosition(); if (!(position.getContainingFile() instanceof JetFile)) { @@ -65,49 +69,74 @@ public class JetCompletionContributor extends CompletionContributor { JetSimpleNameReference jetReference = getJetReference(parameters); if (jetReference != null) { + completeForReference(parameters, result, position, jetReference, session); - // Prevent from adding reference variants from standard reference contributor - result.stopHere(); - - if (isOnlyKeywordCompletion(position)) { - return; - } - - if (shouldRunTypeCompletionOnly(position, jetReference)) { - addClasses(parameters, result); - return; - } - - for (Object variant : jetReference.getVariants()) { - addReferenceVariant(result, variant, positions); - } - - String prefix = result.getPrefixMatcher().getPrefix(); - - // Try to avoid computing not-imported descriptors for empty prefix - if (prefix.isEmpty()) { - if (parameters.getInvocationCount() < 2) { - return; - } - - if (PsiTreeUtil.getParentOfType(jetReference.getElement(), JetDotQualifiedExpression.class) == null) { - return; - } - } - - if (shouldRunTopLevelCompletion(parameters, prefix)) { - addClasses(parameters, result); - addJetTopLevelFunctions(jetReference.getExpression(), result, position, positions); - } - - if (shouldRunExtensionsCompletion(parameters, prefix)) { - addJetExtensions(jetReference.getExpression(), result, position); + if (!session.isSomethingAdded && session.customInvocationCount == 0) { + // Rerun completion if nothing was found + session.customInvocationCount = 1; + completeForReference(parameters, result, position, jetReference, session); } } } }); } + private static void completeForReference( + @NotNull CompletionParameters parameters, + @NotNull CompletionResultSet result, + @NotNull PsiElement position, + @NotNull JetSimpleNameReference jetReference, + @NotNull CompletionSession session + ) { + // Prevent from adding reference variants from standard reference contributor + result.stopHere(); + + if (isOnlyKeywordCompletion(position)) { + return; + } + + if (shouldRunTypeCompletionOnly(position, jetReference)) { + if (session.customInvocationCount > 0) { + addClasses(parameters, result); + } + else { + for (Object variant : jetReference.getVariants()) { + if (isTypeDeclaration(variant)) { + addReferenceVariant(result, variant, session); + } + } + } + + return; + } + + for (Object variant : jetReference.getVariants()) { + addReferenceVariant(result, variant, session); + } + + String prefix = result.getPrefixMatcher().getPrefix(); + + // Try to avoid computing not-imported descriptors for empty prefix + if (prefix.isEmpty()) { + if (session.customInvocationCount < 2) { + return; + } + + if (PsiTreeUtil.getParentOfType(jetReference.getElement(), JetDotQualifiedExpression.class) == null) { + return; + } + } + + if (shouldRunTopLevelCompletion(parameters, session)) { + addClasses(parameters, result); + addJetTopLevelFunctions(jetReference.getExpression(), result, position, session); + } + + if (shouldRunExtensionsCompletion(parameters, prefix, session)) { + addJetExtensions(jetReference.getExpression(), result, position); + } + } + private static boolean isOnlyKeywordCompletion(PsiElement position) { return PsiTreeUtil.getParentOfType(position, JetModifierList.class) != null; } @@ -135,18 +164,32 @@ public class JetCompletionContributor extends CompletionContributor { private static void addReferenceVariant( @NotNull CompletionResultSet result, @NotNull Object variant, - @NotNull Set positions) { + @NotNull CompletionSession session) { if (variant instanceof LookupElement) { - addCompletionToResult(result, (LookupElement) variant, positions); + addCompletionToResult(result, (LookupElement) variant, session); } else { - addCompletionToResult(result, LookupElementBuilder.create(variant.toString()), positions); + addCompletionToResult(result, LookupElementBuilder.create(variant.toString()), session); } } + public static boolean isTypeDeclaration(@NotNull Object variant) { + if (variant instanceof LookupElement) { + Object object = ((LookupElement)variant).getObject(); + if (object instanceof JetLookupObject) { + DeclarationDescriptor descriptor = ((JetLookupObject) object).getDescriptor(); + return (descriptor instanceof ClassDescriptor) || + (descriptor instanceof NamespaceDescriptor) || + (descriptor instanceof TypeParameterDescriptor); + } + } + + return false; + } + private static void addJetTopLevelFunctions(JetSimpleNameExpression expression, @NotNull CompletionResultSet result, @NotNull PsiElement position, - @NotNull Set positions) { + @NotNull CompletionSession session) { String actualPrefix = result.getPrefixMatcher().getPrefix(); @@ -161,7 +204,7 @@ public class JetCompletionContributor extends CompletionContributor { for (String name : functionNames) { if (name.contains(actualPrefix)) { for (FunctionDescriptor function : namesCache.getTopLevelFunctionDescriptorsByName(name, expression, scope)) { - addCompletionToResult(result, DescriptorLookupConverter.createLookupElement(resolutionContext, function), positions); + addCompletionToResult(result, DescriptorLookupConverter.createLookupElement(resolutionContext, function), session); } } } @@ -194,8 +237,8 @@ public class JetCompletionContributor extends CompletionContributor { return false; } - private static boolean shouldRunTopLevelCompletion(@NotNull CompletionParameters parameters, String prefix) { - if (parameters.getInvocationCount() == 0 && prefix.length() < 3) { + private static boolean shouldRunTopLevelCompletion(@NotNull CompletionParameters parameters, CompletionSession session) { + if (session.customInvocationCount == 0) { return false; } @@ -212,8 +255,8 @@ public class JetCompletionContributor extends CompletionContributor { return false; } - private static boolean shouldRunExtensionsCompletion(CompletionParameters parameters, String prefix) { - if (parameters.getInvocationCount() == 0 && prefix.length() < 3) { + private static boolean shouldRunExtensionsCompletion(CompletionParameters parameters, String prefix, CompletionSession session) { + if (session.customInvocationCount == 0 && prefix.length() < 3) { return false; } @@ -243,36 +286,28 @@ public class JetCompletionContributor extends CompletionContributor { private static void addCompletionToResult( @NotNull CompletionResultSet result, @NotNull LookupElement element, - @NotNull Set positions) { + @NotNull CompletionSession session) { -// LookupPositionObject lookupPosition = getLookupPosition(element); -// if (lookupPosition != null) { -// if (!positions.contains(lookupPosition)) { -// positions.add(lookupPosition); -// result.addElement(element); -// } -// -// // There is already an element with same position - ignore duplicate -// } -// else { + if (result.getPrefixMatcher().prefixMatches(element)) { result.addElement(element); -// } + session.isSomethingAdded = true; + } } - private static LookupPositionObject getLookupPosition(LookupElement element) { - Object lookupObject = element.getObject(); - if (lookupObject instanceof PsiElement) { - return new LookupPositionObject((PsiElement) lookupObject); - } - else if (lookupObject instanceof JetLookupObject) { - PsiElement psiElement = ((JetLookupObject) lookupObject).getPsiElement(); - if (psiElement != null) { - return new LookupPositionObject(psiElement); - } - } - - return null; - } + //private static LookupPositionObject getLookupPosition(LookupElement element) { + // Object lookupObject = element.getObject(); + // if (lookupObject instanceof PsiElement) { + // return new LookupPositionObject((PsiElement) lookupObject); + // } + // else if (lookupObject instanceof JetLookupObject) { + // PsiElement psiElement = ((JetLookupObject) lookupObject).getPsiElement(); + // if (psiElement != null) { + // return new LookupPositionObject(psiElement); + // } + // } + // + // return null; + //} @Override public void beforeCompletion(@NotNull CompletionInitializationContext context) { diff --git a/idea/testData/completion/basic/OnlyScopedClassesWithoutExplicit.kt b/idea/testData/completion/basic/OnlyScopedClassesWithoutExplicit.kt new file mode 100644 index 00000000000..80dd034f048 --- /dev/null +++ b/idea/testData/completion/basic/OnlyScopedClassesWithoutExplicit.kt @@ -0,0 +1,10 @@ +package first + +fun firstFun() { + val a = In +} + +// RUNTIME: 1 +// TIME: 0 +// EXIST: Int~(jet) +// ABSENT: Int~(jet.runtime.SharedVar) \ No newline at end of file diff --git a/idea/tests/org/jetbrains/jet/completion/ExpectedCompletionUtils.java b/idea/tests/org/jetbrains/jet/completion/ExpectedCompletionUtils.java index 5b0b9b10783..a57bed3eef5 100644 --- a/idea/tests/org/jetbrains/jet/completion/ExpectedCompletionUtils.java +++ b/idea/tests/org/jetbrains/jet/completion/ExpectedCompletionUtils.java @@ -16,8 +16,13 @@ package org.jetbrains.jet.completion; +import com.google.common.base.Function; +import com.google.common.collect.Collections2; +import com.intellij.codeInsight.lookup.LookupElement; +import com.intellij.codeInsight.lookup.LookupElementPresentation; import com.intellij.openapi.util.text.StringUtil; import com.intellij.util.ArrayUtil; +import junit.framework.Assert; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -34,6 +39,39 @@ import java.util.List; * @author Nikolay Krasko */ public class ExpectedCompletionUtils { + + public static class CompletionProposal { + public static final String TAIL_FLAG = "~"; + + private final String lookupString; + private final String tailString; + + + + public CompletionProposal(@NotNull String lookupString, @Nullable String tailString) { + this.lookupString = lookupString; + this.tailString = tailString != null ? tailString.trim() : null; + } + + public boolean isSuitable(CompletionProposal proposal) { + if (proposal.tailString != null) { + if (!proposal.tailString.equals(tailString)) { + return false; + } + } + + return lookupString.equals(proposal.lookupString); + } + + @Override + public String toString() { + if (tailString != null) { + return lookupString + TAIL_FLAG + tailString; + } + + return lookupString; + } + } public static final String EXIST_LINE_PREFIX = "// EXIST:"; public static final String ABSENT_LINE_PREFIX = "// ABSENT:"; @@ -57,13 +95,30 @@ public class ExpectedCompletionUtils { } @NotNull - public String[] itemsShouldExist(String fileText) { - return findListWithPrefix(existLinePrefix, fileText); + public CompletionProposal[] itemsShouldExist(String fileText) { + return processProposalAssertions(existLinePrefix, fileText); } @NotNull - public String[] itemsShouldAbsent(String fileText) { - return findListWithPrefix(absentLinePrefix, fileText); + public CompletionProposal[] itemsShouldAbsent(String fileText) { + return processProposalAssertions(absentLinePrefix, fileText); + } + + public static CompletionProposal[] processProposalAssertions(String prefix, String fileText) { + List proposals = new ArrayList(); + for (String proposalStr : findListWithPrefix(prefix, fileText)) { + int tailChar = proposalStr.indexOf(CompletionProposal.TAIL_FLAG); + + if (tailChar > 0) { + proposals.add(new CompletionProposal(proposalStr.substring(0, tailChar), + proposalStr.substring(tailChar + 1, proposalStr.length()))); + } + else { + proposals.add(new CompletionProposal(proposalStr, null)); + } + } + + return ArrayUtil.toObjectArray(proposals, CompletionProposal.class); } @Nullable @@ -137,4 +192,57 @@ public class ExpectedCompletionUtils { return result; } + + protected static void assertContainsRenderedItems(CompletionProposal[] expected, LookupElement[] items) { + List itemsInformation = getItemsInformation(items); + + for (CompletionProposal expectedProposal : expected) { + boolean isFound = false; + + for (CompletionProposal proposal : itemsInformation) { + if (proposal.isSuitable(expectedProposal)) { + isFound = true; + break; + } + } + + Assert.assertTrue("Expected '" + expectedProposal + "' not found in " + listToString(itemsInformation), isFound); + } + } + + protected static void assertNotContainsRenderedItems(CompletionProposal[] unexpected,LookupElement[] items) { + List itemsInformation = getItemsInformation(items); + + for (CompletionProposal unexpectedProposal : unexpected) { + for (CompletionProposal proposal : itemsInformation) { + Assert.assertFalse("Unexpected '" + unexpectedProposal + "' presented in " + listToString(itemsInformation), + proposal.isSuitable(unexpectedProposal)); + } + } + } + + protected static List getItemsInformation(LookupElement[] items) { + final LookupElementPresentation presentation = new LookupElementPresentation(); + + List result = new ArrayList(); + if (items != null) { + for (LookupElement item : items) { + item.renderElement(presentation); + result.add(new ExpectedCompletionUtils.CompletionProposal(item.getLookupString(), presentation.getTailText())); + } + } + + return result; + } + + protected static String listToString(List items) { + return StringUtil.join( + Collections2.transform(items, new Function() { + @Override + public String apply(@Nullable CompletionProposal proposal) { + assert proposal != null; + return proposal.toString(); + } + }), "\n"); + } } diff --git a/idea/tests/org/jetbrains/jet/completion/JetBasicCompletionTest.java b/idea/tests/org/jetbrains/jet/completion/JetBasicCompletionTest.java index 37830db0d69..9793160dbdc 100644 --- a/idea/tests/org/jetbrains/jet/completion/JetBasicCompletionTest.java +++ b/idea/tests/org/jetbrains/jet/completion/JetBasicCompletionTest.java @@ -97,6 +97,10 @@ public class JetBasicCompletionTest extends JetCompletionTestBase { doTest(); } + public void testOnlyScopedClassesWithoutExplicit() { + doTest(); + } + public void testOverloadFunctions() { doTest(); } diff --git a/idea/tests/org/jetbrains/jet/completion/JetCompletionMultiTestBase.java b/idea/tests/org/jetbrains/jet/completion/JetCompletionMultiTestBase.java index 0d96db3f10b..370bbc30ea1 100644 --- a/idea/tests/org/jetbrains/jet/completion/JetCompletionMultiTestBase.java +++ b/idea/tests/org/jetbrains/jet/completion/JetCompletionMultiTestBase.java @@ -17,10 +17,6 @@ package org.jetbrains.jet.completion; import com.intellij.codeInsight.completion.CompletionTestCase; -import com.intellij.codeInsight.lookup.LookupElement; -import com.intellij.util.containers.HashSet; - -import java.util.Set; /** * @author Nikolay Krasko @@ -41,8 +37,8 @@ public abstract class JetCompletionMultiTestBase extends CompletionTestCase { final String fileText = getFile().getText(); final ExpectedCompletionUtils completionUtils = new ExpectedCompletionUtils(); - assertContainsItems(completionUtils.itemsShouldExist(fileText)); - assertNotContainItems(completionUtils.itemsShouldAbsent(fileText)); + ExpectedCompletionUtils.assertContainsRenderedItems(completionUtils.itemsShouldExist(fileText), myItems); + ExpectedCompletionUtils.assertNotContainsRenderedItems(completionUtils.itemsShouldAbsent(fileText), myItems); Integer itemsNumber = completionUtils.getExpectedNumber(fileText); if (itemsNumber != null) { @@ -56,33 +52,4 @@ public abstract class JetCompletionMultiTestBase extends CompletionTestCase { protected void doFileTest() { doFileTest(1); } - - // Copied from com.intellij.codeInsight.completion.LightCompletionTestCase - protected void assertContainsItems(final String... expected) { - final Set actual = getLookupStrings(); - for (String s : expected) { - assertTrue("Expected '" + s + "' not found in " + actual, - actual.contains(s)); - } - } - - // Copied from com.intellij.codeInsight.completion.LightCompletionTestCase - protected void assertNotContainItems(final String... unexpected) { - final Set actual = getLookupStrings(); - for (String s : unexpected) { - assertFalse("Unexpected '" + s + "' presented in " + actual, - actual.contains(s)); - } - } - - // Copied from com.intellij.codeInsight.completion.LightCompletionTestCase - private Set getLookupStrings() { - final Set actual = new HashSet(); - if (myItems != null) { - for (LookupElement lookupElement : myItems) { - actual.add(lookupElement.getLookupString()); - } - } - return actual; - } } diff --git a/idea/tests/org/jetbrains/jet/completion/JetCompletionTestBase.java b/idea/tests/org/jetbrains/jet/completion/JetCompletionTestBase.java index 0d8af2bd7a9..663c14df8b9 100644 --- a/idea/tests/org/jetbrains/jet/completion/JetCompletionTestBase.java +++ b/idea/tests/org/jetbrains/jet/completion/JetCompletionTestBase.java @@ -59,14 +59,14 @@ public abstract class JetCompletionTestBase extends LightCompletionTestCase { complete(completionTime == null ? 1 : completionTime); - final String[] expected = completionUtils.itemsShouldExist(fileText); - final String[] unexpected = completionUtils.itemsShouldAbsent(fileText); + ExpectedCompletionUtils.CompletionProposal[] expected = completionUtils.itemsShouldExist(fileText); + ExpectedCompletionUtils.CompletionProposal[] unexpected = completionUtils.itemsShouldAbsent(fileText); Integer itemsNumber = completionUtils.getExpectedNumber(fileText); assertTrue("Should be some assertions about completion", expected.length != 0 || unexpected.length != 0 || itemsNumber != null); - assertContainsItems(expected); - assertNotContainItems(unexpected); + ExpectedCompletionUtils.assertContainsRenderedItems(expected, myItems); + ExpectedCompletionUtils.assertNotContainsRenderedItems(unexpected, myItems); if (itemsNumber != null) { assertEquals("Invalid number of completion items", itemsNumber.intValue(), myItems.length);