From: Hannu Niemistö Date: Tue, 26 Sep 2017 11:17:47 +0000 (+0300) Subject: New type class MonadE and corresponding monad syntax with edo keyword X-Git-Tag: v1.31.0~167 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=82a87b8535628d47d9c381e1a3a2296fb67c7fd0;p=simantics%2Fplatform.git New type class MonadE and corresponding monad syntax with edo keyword Utilizing edo in GShow, also possibleCurrentModel in DB. refs #7508 Change-Id: I9d1fd551ef61dc7f81f74203bf83017b40dc9664 --- diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/common/names/Names.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/common/names/Names.java index 183d85796..ba78a3548 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/common/names/Names.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/common/names/Names.java @@ -33,6 +33,7 @@ public class Names { public static final Name Prelude_any = Name.create("Prelude", "any"); public static final Name Prelude_appendList = Name.create("Prelude", "appendList"); public static final Name Prelude_bind = Name.create("Prelude", ">>="); + public static final Name Prelude_bindE = Name.create("Prelude", "bindE"); public static final Name Prelude_build = Name.create("Prelude", "build"); public static final Name Prelude_concatMap = Name.create("Prelude", "concatMap"); public static final Name Prelude_dollar = Name.create("Prelude", "$"); diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/contexts/TranslationContext.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/contexts/TranslationContext.java index b533e922d..aeeb4cb55 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/contexts/TranslationContext.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/contexts/TranslationContext.java @@ -514,13 +514,6 @@ public class TranslationContext extends TypeTranslationContext implements Enviro Locations.combine(definitions.get(0).location, definitions.get(definitions.size()-1).location), cases); } - - public SCLValue getBindFunction() { - if(bindFunction == null) { - bindFunction = getEnvironment().getValue(Names.Prelude_bind); - } - return bindFunction; - } public SCLRelation resolveRelation(long location, String name) { SCLRelation relation = relations.get(name); diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EBind.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EBind.java index 5c4a729e2..c72776b35 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EBind.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EBind.java @@ -1,10 +1,12 @@ package org.simantics.scl.compiler.elaboration.expressions; import org.simantics.scl.compiler.common.exceptions.InternalCompilerError; +import org.simantics.scl.compiler.common.names.Names; import org.simantics.scl.compiler.compilation.CompilationContext; import org.simantics.scl.compiler.elaboration.contexts.SimplificationContext; import org.simantics.scl.compiler.elaboration.contexts.TranslationContext; import org.simantics.scl.compiler.elaboration.contexts.TypingContext; +import org.simantics.scl.compiler.elaboration.expressions.block.BlockType; import org.simantics.scl.compiler.elaboration.modules.SCLValue; import org.simantics.scl.compiler.errors.Locations; import org.simantics.scl.compiler.internal.codegen.references.IVal; @@ -16,25 +18,28 @@ import org.simantics.scl.compiler.types.exceptions.UnificationException; import org.simantics.scl.compiler.types.kinds.Kinds; public class EBind extends SimplifiableExpression { + BlockType blockType; public Expression pattern; public Expression value; public Expression in; public EVariable monadEvidence; - SCLValue bindFunction; Type monadType; + Type effect; Type valueContentType; Type inContentType; - public EBind(long loc, Expression pattern, Expression value, Expression in) { + public EBind(long loc, BlockType blockType, Expression pattern, Expression value, Expression in) { super(loc); + this.blockType = blockType; this.pattern = pattern; this.value = value; this.in = in; } - public EBind(long loc, Expression pattern, Expression value, Expression in, + public EBind(long loc, BlockType blockType, Expression pattern, Expression value, Expression in, SCLValue bindFunction) { super(loc); + this.blockType = blockType; this.pattern = pattern; this.value = value; this.in = in; @@ -58,7 +63,7 @@ public class EBind extends SimplifiableExpression { } Variable variable = new Variable("monadEvidence"); - variable.setType(Types.pred(Types.MONAD, monadType)); + variable.setType(Types.pred(blockType == BlockType.MonadE ? Types.MONAD_E : Types.MONAD, monadType)); monadEvidence = new EVariable(getLocation(), variable); monadEvidence.setType(variable.getType()); context.addConstraintDemand(monadEvidence); @@ -66,7 +71,9 @@ public class EBind extends SimplifiableExpression { pattern = pattern.checkTypeAsPattern(context, Types.metaVar(Kinds.STAR)); valueContentType = pattern.getType(); value = value.checkType(context, Types.apply(monadType, valueContentType)); + context.pushEffectUpperBound(location, blockType == BlockType.Monad ? Types.NO_EFFECTS : Types.metaVar(Kinds.EFFECT)); in = in.checkType(context, requiredType); + effect = context.popEffectUpperBound(); Type inType = in.getType(); setType(inType); return this; @@ -87,8 +94,15 @@ public class EBind extends SimplifiableExpression { pattern = pattern.simplify(context); long loc = getLocation(); + monadType = Types.canonical(monadType); + valueContentType = Types.canonical(valueContentType); + effect = Types.canonical(effect); + inContentType = Types.canonical(inContentType); + Type[] types = blockType == BlockType.MonadE + ? new Type[] {monadType, valueContentType, effect, inContentType} + : new Type[] {monadType, valueContentType, inContentType}; Expression simplified = new EApply(loc, - new EConstant(loc, bindFunction, Types.canonical(monadType), Types.canonical(valueContentType), Types.canonical(inContentType)), + new EConstant(loc, context.getValue(blockType == BlockType.MonadE ? Names.Prelude_bindE : Names.Prelude_bind), types), monadEvidence, value, new ELambda(loc, new Case[] { @@ -108,8 +122,6 @@ public class EBind extends SimplifiableExpression { in = in.resolve(context); context.popFrame(); - bindFunction = context.getBindFunction(); - return this; } diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EBlock.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EBlock.java index 50f299651..c21732557 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EBlock.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EBlock.java @@ -8,6 +8,7 @@ import org.simantics.scl.compiler.elaboration.chr.CHRRuleset; import org.simantics.scl.compiler.elaboration.chr.ast.CHRQueryTranslationMode; import org.simantics.scl.compiler.elaboration.chr.translation.CHRTranslation; import org.simantics.scl.compiler.elaboration.contexts.TranslationContext; +import org.simantics.scl.compiler.elaboration.expressions.block.BlockType; import org.simantics.scl.compiler.elaboration.expressions.block.CHRStatement; import org.simantics.scl.compiler.elaboration.expressions.block.ConstraintStatement; import org.simantics.scl.compiler.elaboration.expressions.block.GuardStatement; @@ -21,19 +22,20 @@ import org.simantics.scl.compiler.errors.Locations; public class EBlock extends ASTExpression { public ArrayList statements = new ArrayList(); - boolean monadic; + BlockType blockType = BlockType.Normal; public EBlock() { + this.blockType = blockType; + } + + public void setBlockType(BlockType blockType) { + this.blockType = blockType; } public void addStatement(Statement statement) { statements.add(statement); } - public void setMonadic(boolean monadic) { - this.monadic = monadic; - } - public ArrayList getStatements() { return statements; } @@ -64,7 +66,7 @@ public class EBlock extends ASTExpression { Statement cur = statements.get(i); StatementGroup group = cur.getStatementGroup(); if(group == null) - in = cur.toExpression(context, monadic, in); + in = cur.toExpression(context, blockType, in); else { int endId = i+1; while(i>0 && statements.get(i-1).getStatementGroup() == group) @@ -146,7 +148,7 @@ public class EBlock extends ASTExpression { @Override public int getSyntacticFunctionArity() { - if(monadic) + if(blockType != BlockType.Normal) return 0; Statement lastStatement = statements.get(statements.size()-1); if(!(lastStatement instanceof GuardStatement)) diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/BindStatement.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/BindStatement.java index 654ff1093..22f7f3907 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/BindStatement.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/BindStatement.java @@ -17,10 +17,8 @@ public class BindStatement extends Statement { } @Override - public Expression toExpression(EnvironmentalContext context, boolean monadic, Expression in) { - //if(!monadic) - // context.getErrorLog().log(location, "Bind statements are allowed only in mdo-blocks."); - return new EBind(location, pattern, value, in); + public Expression toExpression(EnvironmentalContext context, BlockType blockType, Expression in) { + return new EBind(location, blockType, pattern, value, in); } @Override diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/BlockType.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/BlockType.java new file mode 100644 index 000000000..1e2d2dc94 --- /dev/null +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/BlockType.java @@ -0,0 +1,7 @@ +package org.simantics.scl.compiler.elaboration.expressions.block; + +public enum BlockType { + Normal, + Monad, + MonadE +} diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/CHRStatement.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/CHRStatement.java index 0c41b513a..dbfdf18b6 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/CHRStatement.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/CHRStatement.java @@ -17,7 +17,7 @@ public class CHRStatement extends Statement { } @Override - public Expression toExpression(EnvironmentalContext context, boolean monadic, Expression in) { + public Expression toExpression(EnvironmentalContext context, BlockType blockType, Expression in) { throw new UnsupportedOperationException(); } diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/ConstraintStatement.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/ConstraintStatement.java index 4cccf2f46..6ff4c4877 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/ConstraintStatement.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/ConstraintStatement.java @@ -33,7 +33,7 @@ public class ConstraintStatement extends Statement { } @Override - public Expression toExpression(EnvironmentalContext context, boolean monadic, Expression in) { + public Expression toExpression(EnvironmentalContext context, BlockType blockType, Expression in) { throw new UnsupportedOperationException(); } diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/GuardStatement.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/GuardStatement.java index 557dbbc88..0089e9359 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/GuardStatement.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/GuardStatement.java @@ -18,10 +18,10 @@ public class GuardStatement extends Statement { } @Override - public Expression toExpression(EnvironmentalContext context, boolean monadic, Expression in) { - if(monadic) { + public Expression toExpression(EnvironmentalContext context, BlockType blockType, Expression in) { + if(blockType != BlockType.Normal) { Variable var = new Variable("_"); - return new EBind(location, new EVariable(location, var), value, in); + return new EBind(location, blockType, new EVariable(location, var), value, in); } else return new ESimpleLet(location, null, value, in); diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/IncludeStatement.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/IncludeStatement.java index 52152b137..889e2a584 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/IncludeStatement.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/IncludeStatement.java @@ -39,7 +39,7 @@ public class IncludeStatement extends Statement implements ValRefBinder { } @Override - public Expression toExpression(EnvironmentalContext context, boolean monadic, Expression in) { + public Expression toExpression(EnvironmentalContext context, BlockType blockType, Expression in) { throw new UnsupportedOperationException(); } diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/LetStatement.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/LetStatement.java index 302d0cf34..3fcd023a5 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/LetStatement.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/LetStatement.java @@ -20,7 +20,7 @@ public class LetStatement extends Statement { } @Override - public Expression toExpression(EnvironmentalContext context, boolean monadic, Expression in) { + public Expression toExpression(EnvironmentalContext context, BlockType blockType, Expression in) { if(pattern instanceof EVariable) return new ESimpleLet(((EVariable)pattern).getVariable(), value, in); else diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/RuleStatement.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/RuleStatement.java index c704497fd..62af8e5f9 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/RuleStatement.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/RuleStatement.java @@ -18,8 +18,7 @@ public class RuleStatement extends Statement { } @Override - public Expression toExpression(EnvironmentalContext context, boolean monadic, - Expression in) { + public Expression toExpression(EnvironmentalContext context, BlockType blockType, Expression in) { throw new UnsupportedOperationException(); } diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/Statement.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/Statement.java index 637b5981d..7bc415a91 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/Statement.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/block/Statement.java @@ -9,7 +9,7 @@ import org.simantics.scl.compiler.internal.parsing.Symbol; public abstract class Statement extends Symbol { - public abstract Expression toExpression(EnvironmentalContext context, boolean monadic, Expression in); + public abstract Expression toExpression(EnvironmentalContext context, BlockType blockType, Expression in); public abstract void setLocationDeep(long loc); public abstract void resolvePattern(TranslationContext context); public abstract boolean mayBeRecursive(); diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/elaboration/transformations/TransformationBuilder.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/elaboration/transformations/TransformationBuilder.java index 50958221c..a9d4c3e03 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/elaboration/transformations/TransformationBuilder.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/elaboration/transformations/TransformationBuilder.java @@ -18,6 +18,7 @@ import org.simantics.scl.compiler.elaboration.expressions.Expression; import org.simantics.scl.compiler.elaboration.expressions.Expressions; import org.simantics.scl.compiler.elaboration.expressions.Variable; import org.simantics.scl.compiler.elaboration.expressions.VariableProcedure; +import org.simantics.scl.compiler.elaboration.expressions.block.BlockType; import org.simantics.scl.compiler.elaboration.expressions.block.GuardStatement; import org.simantics.scl.compiler.elaboration.expressions.block.LetStatement; import org.simantics.scl.compiler.elaboration.expressions.block.Statement; @@ -109,7 +110,7 @@ public class TransformationBuilder { private static Expression statementsToExpression(EnvironmentalContext context, List statements, Expression in) { for(int i=statements.size()-1;i>=0;--i) - in = statements.get(i).toExpression(context, false, in); + in = statements.get(i).toExpression(context, BlockType.Normal, in); return in; } diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCL.grammar b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCL.grammar index b7bb1924c..e17b5e70f 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCL.grammar +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCL.grammar @@ -133,7 +133,7 @@ lexp = faexp+ # Apply, shift ID, shift LAMBDA, shift LAMBDA_MATCH, shift LET, shift INTEGER, shift BEGIN_STRING, shift IF, shift MATCH, shift DO, - shift MDO, shift ENFORCE, shift BLANK, + shift MDO, shift EDO, shift ENFORCE, shift BLANK, shift FLOAT, shift LPAREN, shift LBRACKET, shift ESCAPED_SYMBOL, shift CHAR, shift LBRACE, shift WHEN, shift ATTACHED_HASH, @@ -158,7 +158,7 @@ aexp | IF exp THEN exp (ELSE exp)? # If, shift HASTYPE, shift ELSE | MATCH exp WITH LBRACE case (SEMICOLON case)* RBRACE # Match - | (DO | MDO) statements # Do + | (DO | MDO | EDO) statements # Do | (SELECT | SELECT_FIRST | SELECT_DISTINCT) exp WHERE queryBlock # Select | CHR_SELECT diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLLexer.flex b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLLexer.flex index 1277ffe7b..0aafe2872 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLLexer.flex +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLLexer.flex @@ -105,6 +105,7 @@ char_literal = "'" ([^'\\\ufffd] | "\\" [^\ufffd]) "'" do { return sym(SCLTerminals.DO); } eq { return sym(options.supportEq ? SCLTerminals.EQ : SCLTerminals.ID); } mdo { return sym(SCLTerminals.MDO); } + edo { return sym(SCLTerminals.EDO); } class { return sym(SCLTerminals.CLASS); } effect { return sym(SCLTerminals.EFFECT); } match { return sym(SCLTerminals.MATCH); } diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLLexer.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLLexer.java index e3efc28dd..fb9eb54d5 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLLexer.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLLexer.java @@ -12,7 +12,7 @@ import gnu.trove.list.array.TIntArrayList; /** * This class is a scanner generated by * JFlex 1.6.1 - * from the specification file C:/Simugawa.git/git/platform/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLLexer.flex + * from the specification file C:/GamsGui/git/platform/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLLexer.flex */ public class SCLLexer { @@ -69,25 +69,25 @@ public class SCLLexer { "\1\33\1\13\1\34\1\35\1\36\1\0\1\37\1\36"+ "\1\40\2\35\2\40\5\0\1\4\1\41\1\42\1\43"+ "\3\0\1\2\4\0\1\4\1\44\1\45\1\46\1\4"+ - "\2\0\2\2\1\47\2\2\1\50\1\51\11\2\1\52"+ + "\2\0\2\2\1\47\2\2\1\50\1\51\12\2\1\52"+ "\3\2\1\53\2\2\1\54\4\2\1\55\1\56\1\57"+ "\1\0\1\60\1\61\1\62\1\63\1\64\1\60\1\65"+ "\2\0\2\66\1\0\1\67\1\70\1\2\1\0\1\71"+ - "\2\0\2\72\1\0\1\4\1\0\3\2\1\73\25\2"+ - "\1\74\1\75\1\0\1\76\2\0\1\46\1\0\1\2"+ - "\1\77\6\2\1\100\1\101\2\2\1\102\3\2\1\103"+ - "\1\2\1\104\2\2\1\105\3\2\1\0\1\46\1\0"+ - "\3\2\1\106\11\2\1\107\1\2\1\110\1\2\1\111"+ - "\1\2\1\0\1\112\1\113\2\2\1\114\1\115\2\2"+ - "\1\116\1\2\1\117\1\120\2\2\1\121\3\2\1\122"+ - "\1\123\2\2\1\124\2\2\1\125\1\126\1\0\4\2"+ - "\1\127\2\2\2\0\1\2\1\130\2\0\2\2\2\0"+ - "\1\2\2\0\1\131\1\2\2\0\1\132\2\0\1\2"+ - "\4\0\1\2\1\133\2\0\1\134\1\2\2\0\1\135"+ - "\2\0\1\136\1\0\1\137"; + "\2\0\2\72\1\0\1\4\1\0\3\2\1\73\14\2"+ + "\1\74\11\2\1\75\1\76\1\0\1\77\2\0\1\46"+ + "\1\0\1\2\1\100\6\2\1\101\1\102\2\2\1\103"+ + "\3\2\1\104\1\2\1\105\2\2\1\106\3\2\1\0"+ + "\1\46\1\0\3\2\1\107\11\2\1\110\1\2\1\111"+ + "\1\2\1\112\1\2\1\0\1\113\1\114\2\2\1\115"+ + "\1\116\2\2\1\117\1\2\1\120\1\121\2\2\1\122"+ + "\3\2\1\123\1\124\2\2\1\125\2\2\1\126\1\127"+ + "\1\0\4\2\1\130\2\2\2\0\1\2\1\131\2\0"+ + "\2\2\2\0\1\2\2\0\1\132\1\2\2\0\1\133"+ + "\2\0\1\2\4\0\1\2\1\134\2\0\1\135\1\2"+ + "\2\0\1\136\2\0\1\137\1\0\1\140"; private static int [] zzUnpackAction() { - int [] result = new int[296]; + int [] result = new int[298]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; @@ -124,34 +124,35 @@ public class SCLLexer { "\0\u0cd6\0\u0d14\0\u0d52\0\u0d90\0\u0dce\0\u0e0c\0\u0e4a\0\u01b2"+ "\0\u01b2\0\u0e88\0\u0ec6\0\u0f04\0\u0f42\0\u0f80\0\u0fbe\0\370"+ "\0\u0ffc\0\u103a\0\370\0\u1078\0\u10b6\0\u10f4\0\u1132\0\u1170"+ - "\0\u11ae\0\u11ec\0\u122a\0\u1268\0\u12a6\0\370\0\u12e4\0\u1322"+ - "\0\u1360\0\370\0\u139e\0\u13dc\0\370\0\u141a\0\u1458\0\u1496"+ - "\0\u14d4\0\u01b2\0\u01b2\0\u01b2\0\u1512\0\272\0\272\0\272"+ - "\0\272\0\272\0\u1550\0\272\0\u158e\0\u02e8\0\u15cc\0\u160a"+ - "\0\u160a\0\272\0\272\0\272\0\u1648\0\272\0\u1686\0\u16c4"+ - "\0\272\0\u01b2\0\u1702\0\u1740\0\u177e\0\u17bc\0\u17fa\0\u1838"+ - "\0\370\0\u1876\0\u18b4\0\u18f2\0\u1930\0\u196e\0\u19ac\0\u19ea"+ - "\0\u1a28\0\u1a66\0\u1aa4\0\u1ae2\0\u1b20\0\u1b5e\0\u1b9c\0\u1bda"+ - "\0\u1c18\0\u1c56\0\u1c94\0\u1cd2\0\u1d10\0\u1d4e\0\370\0\272"+ - "\0\u1d8c\0\272\0\u1dca\0\u1e08\0\u01b2\0\u1e46\0\u1e84\0\u1ec2"+ - "\0\u1f00\0\u1f3e\0\u1f7c\0\u1fba\0\u1ff8\0\u2036\0\370\0\370"+ - "\0\u2074\0\u20b2\0\370\0\u20f0\0\u212e\0\u216c\0\370\0\u21aa"+ - "\0\370\0\u21e8\0\u2226\0\370\0\u2264\0\u22a2\0\u22e0\0\u231e"+ - "\0\272\0\u235c\0\u239a\0\u23d8\0\u2416\0\u2454\0\u2492\0\u24d0"+ - "\0\u250e\0\u254c\0\u258a\0\u25c8\0\u2606\0\u2644\0\u2682\0\370"+ - "\0\u26c0\0\370\0\u26fe\0\370\0\u273c\0\u277a\0\272\0\370"+ - "\0\u27b8\0\u27f6\0\370\0\370\0\u2834\0\u2872\0\u28b0\0\u28ee"+ - "\0\370\0\370\0\u292c\0\u296a\0\u29a8\0\u29e6\0\u2a24\0\u2a62"+ - "\0\272\0\370\0\u2aa0\0\u2ade\0\370\0\u2b1c\0\u2b5a\0\370"+ - "\0\370\0\u2b98\0\u2bd6\0\u2c14\0\u2c52\0\u2c90\0\370\0\u2cce"+ - "\0\u2d0c\0\u2d4a\0\u2d88\0\u2dc6\0\370\0\u2e04\0\u2e42\0\u2e80"+ - "\0\u2ebe\0\u2efc\0\u2f3a\0\u2f78\0\u2fb6\0\u2ff4\0\370\0\u3032"+ - "\0\u3070\0\u30ae\0\370\0\u30ec\0\u312a\0\u3168\0\u31a6\0\u31e4"+ - "\0\u3222\0\u3260\0\u329e\0\272\0\u32dc\0\u331a\0\272\0\u3358"+ - "\0\u3396\0\u33d4\0\370\0\u3412\0\u3450\0\272\0\u348e\0\272"; + "\0\u11ae\0\u11ec\0\u122a\0\u1268\0\u12a6\0\u12e4\0\370\0\u1322"+ + "\0\u1360\0\u139e\0\370\0\u13dc\0\u141a\0\370\0\u1458\0\u1496"+ + "\0\u14d4\0\u1512\0\u01b2\0\u01b2\0\u01b2\0\u1550\0\272\0\272"+ + "\0\272\0\272\0\272\0\u158e\0\272\0\u15cc\0\u02e8\0\u160a"+ + "\0\u1648\0\u1648\0\272\0\272\0\272\0\u1686\0\272\0\u16c4"+ + "\0\u1702\0\272\0\u01b2\0\u1740\0\u177e\0\u17bc\0\u17fa\0\u1838"+ + "\0\u1876\0\370\0\u18b4\0\u18f2\0\u1930\0\u196e\0\u19ac\0\u19ea"+ + "\0\u1a28\0\u1a66\0\u1aa4\0\u1ae2\0\u1b20\0\u1b5e\0\370\0\u1b9c"+ + "\0\u1bda\0\u1c18\0\u1c56\0\u1c94\0\u1cd2\0\u1d10\0\u1d4e\0\u1d8c"+ + "\0\370\0\272\0\u1dca\0\272\0\u1e08\0\u1e46\0\u01b2\0\u1e84"+ + "\0\u1ec2\0\u1f00\0\u1f3e\0\u1f7c\0\u1fba\0\u1ff8\0\u2036\0\u2074"+ + "\0\370\0\370\0\u20b2\0\u20f0\0\370\0\u212e\0\u216c\0\u21aa"+ + "\0\370\0\u21e8\0\370\0\u2226\0\u2264\0\370\0\u22a2\0\u22e0"+ + "\0\u231e\0\u235c\0\272\0\u239a\0\u23d8\0\u2416\0\u2454\0\u2492"+ + "\0\u24d0\0\u250e\0\u254c\0\u258a\0\u25c8\0\u2606\0\u2644\0\u2682"+ + "\0\u26c0\0\370\0\u26fe\0\370\0\u273c\0\370\0\u277a\0\u27b8"+ + "\0\272\0\370\0\u27f6\0\u2834\0\370\0\370\0\u2872\0\u28b0"+ + "\0\u28ee\0\u292c\0\370\0\370\0\u296a\0\u29a8\0\u29e6\0\u2a24"+ + "\0\u2a62\0\u2aa0\0\272\0\370\0\u2ade\0\u2b1c\0\370\0\u2b5a"+ + "\0\u2b98\0\370\0\370\0\u2bd6\0\u2c14\0\u2c52\0\u2c90\0\u2cce"+ + "\0\370\0\u2d0c\0\u2d4a\0\u2d88\0\u2dc6\0\u2e04\0\370\0\u2e42"+ + "\0\u2e80\0\u2ebe\0\u2efc\0\u2f3a\0\u2f78\0\u2fb6\0\u2ff4\0\u3032"+ + "\0\370\0\u3070\0\u30ae\0\u30ec\0\370\0\u312a\0\u3168\0\u31a6"+ + "\0\u31e4\0\u3222\0\u3260\0\u329e\0\u32dc\0\272\0\u331a\0\u3358"+ + "\0\272\0\u3396\0\u33d4\0\u3412\0\370\0\u3450\0\u348e\0\272"+ + "\0\u34cc\0\272"; private static int [] zzUnpackRowMap() { - int [] result = new int[296]; + int [] result = new int[298]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; @@ -223,240 +224,242 @@ public class SCLLexer { "\4\6\2\0\1\76\12\0\1\6\6\0\5\6\1\141"+ "\22\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ "\1\6\6\0\1\142\3\6\1\143\4\6\1\144\5\6"+ - "\1\145\4\6\1\146\3\6\11\0\1\6\4\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\10\6\1\147\17\6"+ - "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\5\6\1\150\1\6\1\151\20\6\11\0\1\6"+ - "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\26\6"+ - "\1\152\1\6\11\0\1\6\4\0\4\6\2\0\1\76"+ - "\12\0\1\6\6\0\1\6\1\153\2\6\1\154\23\6"+ - "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\1\6\1\155\1\6\1\156\4\6\1\157\17\6"+ - "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\3\6\1\160\14\6\1\161\7\6\11\0\1\6"+ - "\10\0\2\11\1\0\1\11\6\0\2\11\1\162\1\0"+ - "\1\11\1\0\2\11\1\0\1\11\34\0\2\11\1\0"+ - "\1\11\12\0\2\11\1\0\1\11\6\0\3\11\1\0"+ - "\1\163\1\0\2\11\1\0\1\11\34\0\1\11\1\164"+ - "\1\0\1\11\76\0\1\165\4\0\15\64\1\0\11\64"+ - "\2\0\40\64\1\0\2\64\1\0\1\64\74\0\1\70"+ - "\1\0\4\166\1\167\4\166\1\170\3\166\1\0\12\166"+ - "\1\167\2\166\1\171\3\166\1\172\2\166\1\75\2\166"+ - "\1\173\23\166\1\167\1\166\2\0\1\166\74\0\1\75"+ - "\12\0\1\174\155\0\1\175\5\0\1\6\1\0\1\6"+ - "\10\0\1\176\5\0\1\6\6\0\30\6\11\0\1\6"+ - "\5\0\1\177\75\0\1\200\20\0\1\201\56\0\1\202"+ - "\71\0\27\101\1\0\46\101\15\0\1\103\6\0\1\103"+ - "\47\0\1\103\16\0\1\105\6\0\1\105\47\0\1\105"+ - "\2\0\4\106\15\0\1\106\6\0\30\106\11\0\1\106"+ - "\10\0\2\107\1\0\1\107\2\0\1\203\3\0\3\107"+ - "\1\0\1\107\1\0\2\107\1\0\1\107\34\0\2\107"+ - "\1\0\1\107\20\0\1\203\74\0\1\111\1\204\63\0"+ - "\4\112\15\0\1\112\6\0\30\112\11\0\1\112\4\0"+ - "\4\113\2\0\1\205\6\0\1\206\3\0\1\113\6\0"+ - "\30\113\11\0\1\113\15\0\1\207\64\0\1\210\1\0"+ - "\1\210\16\0\1\210\6\0\30\210\11\0\1\210\24\0"+ - "\1\211\61\0\2\11\1\0\1\11\6\0\2\11\1\212"+ - "\1\0\1\11\1\0\2\11\1\0\1\11\34\0\2\11"+ - "\1\0\1\11\5\0\15\122\1\0\56\122\1\0\1\122"+ - "\5\213\2\123\1\213\1\123\6\213\3\123\1\213\1\123"+ - "\1\213\1\123\1\214\1\213\1\123\34\213\2\123\1\213"+ - "\1\123\5\213\24\0\1\124\25\0\1\125\57\0\1\215"+ - "\42\0\4\6\2\0\1\76\12\0\1\6\6\0\2\6"+ - "\1\216\25\6\11\0\1\6\4\0\4\6\2\0\1\76"+ - "\12\0\1\6\6\0\4\6\1\217\23\6\11\0\1\6"+ - "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\12\6"+ - "\1\220\15\6\11\0\1\6\4\0\4\6\2\0\1\76"+ - "\12\0\1\6\6\0\6\6\1\221\21\6\11\0\1\6"+ - "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\1\222"+ - "\11\6\1\223\3\6\1\224\11\6\11\0\1\6\4\0"+ - "\4\6\2\0\1\76\12\0\1\6\6\0\22\6\1\225"+ - "\5\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ - "\1\6\6\0\3\6\1\226\24\6\11\0\1\6\4\0"+ - "\4\6\2\0\1\76\12\0\1\6\6\0\10\6\1\227"+ + "\1\145\1\146\3\6\1\147\3\6\11\0\1\6\4\0"+ + "\4\6\2\0\1\76\12\0\1\6\6\0\10\6\1\150"+ "\17\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ - "\1\6\6\0\22\6\1\230\5\6\11\0\1\6\4\0"+ - "\4\6\2\0\1\76\12\0\1\6\6\0\20\6\1\231"+ - "\7\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ - "\1\6\6\0\1\232\27\6\11\0\1\6\4\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\12\6\1\233\15\6"+ - "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\1\234\27\6\11\0\1\6\4\0\4\6\2\0"+ - "\1\76\12\0\1\6\6\0\6\6\1\235\21\6\11\0"+ - "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+ - "\4\6\1\236\23\6\11\0\1\6\4\0\4\6\2\0"+ - "\1\76\12\0\1\6\6\0\6\6\1\237\21\6\11\0"+ - "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+ - "\10\6\1\240\17\6\11\0\1\6\4\0\4\6\2\0"+ - "\1\76\12\0\1\6\6\0\11\6\1\241\16\6\11\0"+ + "\1\6\6\0\5\6\1\151\1\6\1\152\20\6\11\0"+ "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+ - "\3\6\1\242\24\6\11\0\1\6\4\0\4\6\2\0"+ - "\1\76\12\0\1\6\6\0\6\6\1\243\21\6\11\0"+ - "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+ - "\2\6\1\244\25\6\11\0\1\6\4\0\4\6\2\0"+ - "\1\76\12\0\1\6\6\0\6\6\1\245\13\6\1\246"+ - "\5\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ - "\1\6\6\0\1\6\1\247\26\6\11\0\1\6\74\0"+ - "\1\250\6\0\2\251\16\0\1\251\6\0\1\251\2\0"+ - "\1\251\4\0\1\251\4\0\2\251\1\0\1\251\115\0"+ - "\1\252\6\0\1\177\17\0\1\100\16\0\1\100\36\0"+ - "\1\200\74\0\1\113\1\0\1\113\10\0\1\115\5\0"+ - "\1\113\6\0\30\113\11\0\1\113\15\0\1\207\1\253"+ - "\63\0\4\210\11\0\1\206\3\0\1\210\6\0\30\210"+ - "\11\0\1\210\3\0\26\213\1\254\54\213\2\123\1\213"+ - "\1\123\6\213\3\123\1\213\1\123\1\213\1\255\1\214"+ - "\1\213\1\123\34\213\2\123\1\213\1\123\5\213\37\0"+ - "\1\256\37\0\4\6\2\0\1\76\12\0\1\6\6\0"+ - "\3\6\1\257\24\6\11\0\1\6\4\0\4\6\2\0"+ - "\1\76\12\0\1\6\6\0\10\6\1\260\17\6\11\0"+ - "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+ - "\6\6\1\261\21\6\11\0\1\6\4\0\4\6\2\0"+ - "\1\76\12\0\1\6\6\0\5\6\1\262\22\6\11\0"+ - "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+ - "\6\6\1\263\21\6\11\0\1\6\4\0\4\6\2\0"+ - "\1\76\12\0\1\6\6\0\4\6\1\264\23\6\11\0"+ - "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+ - "\1\6\1\265\26\6\11\0\1\6\4\0\4\6\2\0"+ - "\1\76\12\0\1\6\6\0\11\6\1\266\16\6\11\0"+ - "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+ - "\11\6\1\267\16\6\11\0\1\6\4\0\4\6\2\0"+ - "\1\76\12\0\1\6\6\0\10\6\1\270\17\6\11\0"+ - "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+ - "\5\6\1\271\22\6\11\0\1\6\4\0\4\6\2\0"+ - "\1\76\12\0\1\6\6\0\10\6\1\272\17\6\11\0"+ - "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+ - "\10\6\1\273\17\6\11\0\1\6\4\0\4\6\2\0"+ - "\1\76\12\0\1\6\6\0\1\6\1\274\26\6\11\0"+ + "\26\6\1\153\1\6\11\0\1\6\4\0\4\6\2\0"+ + "\1\76\12\0\1\6\6\0\1\6\1\154\2\6\1\155"+ + "\23\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\1\6\1\156\1\6\1\157\4\6\1\160"+ + "\17\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\3\6\1\161\14\6\1\162\7\6\11\0"+ + "\1\6\10\0\2\11\1\0\1\11\6\0\2\11\1\163"+ + "\1\0\1\11\1\0\2\11\1\0\1\11\34\0\2\11"+ + "\1\0\1\11\12\0\2\11\1\0\1\11\6\0\3\11"+ + "\1\0\1\164\1\0\2\11\1\0\1\11\34\0\1\11"+ + "\1\165\1\0\1\11\76\0\1\166\4\0\15\64\1\0"+ + "\11\64\2\0\40\64\1\0\2\64\1\0\1\64\74\0"+ + "\1\70\1\0\4\167\1\170\4\167\1\171\3\167\1\0"+ + "\12\167\1\170\2\167\1\172\3\167\1\173\2\167\1\75"+ + "\2\167\1\174\23\167\1\170\1\167\2\0\1\167\74\0"+ + "\1\75\12\0\1\175\155\0\1\176\5\0\1\6\1\0"+ + "\1\6\10\0\1\177\5\0\1\6\6\0\30\6\11\0"+ + "\1\6\5\0\1\200\75\0\1\201\20\0\1\202\56\0"+ + "\1\203\71\0\27\101\1\0\46\101\15\0\1\103\6\0"+ + "\1\103\47\0\1\103\16\0\1\105\6\0\1\105\47\0"+ + "\1\105\2\0\4\106\15\0\1\106\6\0\30\106\11\0"+ + "\1\106\10\0\2\107\1\0\1\107\2\0\1\204\3\0"+ + "\3\107\1\0\1\107\1\0\2\107\1\0\1\107\34\0"+ + "\2\107\1\0\1\107\20\0\1\204\74\0\1\111\1\205"+ + "\63\0\4\112\15\0\1\112\6\0\30\112\11\0\1\112"+ + "\4\0\4\113\2\0\1\206\6\0\1\207\3\0\1\113"+ + "\6\0\30\113\11\0\1\113\15\0\1\210\64\0\1\211"+ + "\1\0\1\211\16\0\1\211\6\0\30\211\11\0\1\211"+ + "\24\0\1\212\61\0\2\11\1\0\1\11\6\0\2\11"+ + "\1\213\1\0\1\11\1\0\2\11\1\0\1\11\34\0"+ + "\2\11\1\0\1\11\5\0\15\122\1\0\56\122\1\0"+ + "\1\122\5\214\2\123\1\214\1\123\6\214\3\123\1\214"+ + "\1\123\1\214\1\123\1\215\1\214\1\123\34\214\2\123"+ + "\1\214\1\123\5\214\24\0\1\124\25\0\1\125\57\0"+ + "\1\216\42\0\4\6\2\0\1\76\12\0\1\6\6\0"+ + "\2\6\1\217\25\6\11\0\1\6\4\0\4\6\2\0"+ + "\1\76\12\0\1\6\6\0\4\6\1\220\23\6\11\0"+ "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+ - "\10\6\1\275\17\6\11\0\1\6\4\0\4\6\2\0"+ - "\1\76\12\0\1\6\6\0\10\6\1\276\17\6\11\0"+ + "\12\6\1\221\15\6\11\0\1\6\4\0\4\6\2\0"+ + "\1\76\12\0\1\6\6\0\6\6\1\222\21\6\11\0"+ "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+ - "\7\6\1\277\20\6\11\0\1\6\4\0\4\6\2\0"+ - "\1\76\12\0\1\6\6\0\2\6\1\300\6\6\1\301"+ - "\16\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ - "\1\6\6\0\12\6\1\302\15\6\11\0\1\6\4\0"+ - "\4\6\2\0\1\76\12\0\1\6\6\0\12\6\1\303"+ + "\1\223\11\6\1\224\3\6\1\225\11\6\11\0\1\6"+ + "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\22\6"+ + "\1\226\5\6\11\0\1\6\4\0\4\6\2\0\1\76"+ + "\12\0\1\6\6\0\3\6\1\227\24\6\11\0\1\6"+ + "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\10\6"+ + "\1\230\17\6\11\0\1\6\4\0\4\6\2\0\1\76"+ + "\12\0\1\6\6\0\22\6\1\231\5\6\11\0\1\6"+ + "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\20\6"+ + "\1\232\7\6\11\0\1\6\4\0\4\6\2\0\1\76"+ + "\12\0\1\6\6\0\1\233\27\6\11\0\1\6\4\0"+ + "\4\6\2\0\1\76\12\0\1\6\6\0\12\6\1\234"+ "\15\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ - "\1\6\6\0\3\6\1\304\24\6\11\0\1\6\4\0"+ - "\4\6\2\0\1\76\12\0\1\6\6\0\5\6\1\305"+ - "\22\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ - "\1\6\6\0\16\6\1\306\11\6\11\0\1\6\4\0"+ - "\4\6\2\0\1\76\12\0\1\6\6\0\22\6\1\307"+ - "\5\6\11\0\1\6\5\0\2\310\16\0\1\310\6\0"+ - "\1\310\2\0\1\310\4\0\1\310\4\0\2\310\1\0"+ - "\1\310\42\0\1\206\57\0\25\213\1\311\1\254\47\213"+ - "\47\0\1\312\27\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\4\6\1\313\23\6\11\0\1\6\4\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\12\6\1\314\15\6"+ + "\1\6\6\0\1\235\27\6\11\0\1\6\4\0\4\6"+ + "\2\0\1\76\12\0\1\6\6\0\6\6\1\236\21\6"+ "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\2\6\1\315\25\6\11\0\1\6\4\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\17\6\1\316\10\6"+ + "\6\0\1\6\1\237\26\6\11\0\1\6\4\0\4\6"+ + "\2\0\1\76\12\0\1\6\6\0\4\6\1\240\23\6"+ "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\3\6\1\317\24\6\11\0\1\6\4\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\14\6\1\320\13\6"+ + "\6\0\6\6\1\241\21\6\11\0\1\6\4\0\4\6"+ + "\2\0\1\76\12\0\1\6\6\0\10\6\1\242\17\6"+ "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\2\6\1\321\25\6\11\0\1\6\4\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\12\6\1\322\15\6"+ + "\6\0\11\6\1\243\16\6\11\0\1\6\4\0\4\6"+ + "\2\0\1\76\12\0\1\6\6\0\3\6\1\244\24\6"+ "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\11\6\1\323\16\6\11\0\1\6\4\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\16\6\1\324\11\6"+ + "\6\0\6\6\1\245\21\6\11\0\1\6\4\0\4\6"+ + "\2\0\1\76\12\0\1\6\6\0\2\6\1\246\25\6"+ "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\2\6\1\325\25\6\11\0\1\6\4\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\11\6\1\326\16\6"+ + "\6\0\6\6\1\247\13\6\1\250\5\6\11\0\1\6"+ + "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\1\6"+ + "\1\251\26\6\11\0\1\6\74\0\1\252\6\0\2\253"+ + "\16\0\1\253\6\0\1\253\2\0\1\253\4\0\1\253"+ + "\4\0\2\253\1\0\1\253\115\0\1\254\6\0\1\200"+ + "\17\0\1\100\16\0\1\100\36\0\1\201\74\0\1\113"+ + "\1\0\1\113\10\0\1\115\5\0\1\113\6\0\30\113"+ + "\11\0\1\113\15\0\1\210\1\255\63\0\4\211\11\0"+ + "\1\207\3\0\1\211\6\0\30\211\11\0\1\211\3\0"+ + "\26\214\1\256\54\214\2\123\1\214\1\123\6\214\3\123"+ + "\1\214\1\123\1\214\1\257\1\215\1\214\1\123\34\214"+ + "\2\123\1\214\1\123\5\214\37\0\1\260\37\0\4\6"+ + "\2\0\1\76\12\0\1\6\6\0\3\6\1\261\24\6"+ "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\16\6\1\327\11\6\11\0\1\6\4\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\10\6\1\330\17\6"+ + "\6\0\10\6\1\262\17\6\11\0\1\6\4\0\4\6"+ + "\2\0\1\76\12\0\1\6\6\0\6\6\1\263\21\6"+ "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\6\6\1\331\21\6\11\0\1\6\4\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\12\6\1\332\15\6"+ + "\6\0\5\6\1\264\22\6\11\0\1\6\4\0\4\6"+ + "\2\0\1\76\12\0\1\6\6\0\6\6\1\265\21\6"+ "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\25\6\1\333\2\6\11\0\1\6\4\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\7\6\1\334\20\6"+ + "\6\0\4\6\1\266\23\6\11\0\1\6\4\0\4\6"+ + "\2\0\1\76\12\0\1\6\6\0\1\6\1\267\26\6"+ "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\5\6\1\335\22\6\11\0\1\6\5\0\2\336"+ - "\16\0\1\336\6\0\1\336\2\0\1\336\4\0\1\336"+ - "\4\0\2\336\1\0\1\336\64\0\1\337\36\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\4\6\1\340\23\6"+ + "\6\0\11\6\1\270\16\6\11\0\1\6\4\0\4\6"+ + "\2\0\1\76\12\0\1\6\6\0\11\6\1\271\16\6"+ "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\10\6\1\341\17\6\11\0\1\6\4\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\3\6\1\342\24\6"+ + "\6\0\10\6\1\272\17\6\11\0\1\6\4\0\4\6"+ + "\2\0\1\76\12\0\1\6\6\0\5\6\1\273\22\6"+ "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\2\6\1\343\1\6\1\344\23\6\11\0\1\6"+ - "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\11\6"+ - "\1\345\16\6\11\0\1\6\4\0\4\6\2\0\1\76"+ - "\12\0\1\6\6\0\20\6\1\346\7\6\11\0\1\6"+ - "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\6\6"+ - "\1\347\21\6\11\0\1\6\4\0\4\6\2\0\1\76"+ - "\12\0\1\6\6\0\1\350\27\6\11\0\1\6\4\0"+ - "\4\6\2\0\1\76\12\0\1\6\6\0\23\6\1\351"+ - "\4\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ - "\1\6\6\0\6\6\1\352\21\6\11\0\1\6\4\0"+ - "\4\6\2\0\1\76\12\0\1\6\6\0\16\6\1\353"+ + "\6\0\10\6\1\274\17\6\11\0\1\6\4\0\4\6"+ + "\2\0\1\76\12\0\1\6\6\0\10\6\1\275\17\6"+ + "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ + "\6\0\1\6\1\276\26\6\11\0\1\6\4\0\4\6"+ + "\2\0\1\76\12\0\1\6\6\0\10\6\1\277\17\6"+ + "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ + "\6\0\10\6\1\300\17\6\11\0\1\6\4\0\4\6"+ + "\2\0\1\76\12\0\1\6\6\0\7\6\1\301\20\6"+ + "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ + "\6\0\2\6\1\302\6\6\1\303\16\6\11\0\1\6"+ + "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\12\6"+ + "\1\304\15\6\11\0\1\6\4\0\4\6\2\0\1\76"+ + "\12\0\1\6\6\0\12\6\1\305\15\6\11\0\1\6"+ + "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\3\6"+ + "\1\306\24\6\11\0\1\6\4\0\4\6\2\0\1\76"+ + "\12\0\1\6\6\0\5\6\1\307\22\6\11\0\1\6"+ + "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\16\6"+ + "\1\310\11\6\11\0\1\6\4\0\4\6\2\0\1\76"+ + "\12\0\1\6\6\0\22\6\1\311\5\6\11\0\1\6"+ + "\5\0\2\312\16\0\1\312\6\0\1\312\2\0\1\312"+ + "\4\0\1\312\4\0\2\312\1\0\1\312\42\0\1\207"+ + "\57\0\25\214\1\313\1\256\47\214\47\0\1\314\27\0"+ + "\4\6\2\0\1\76\12\0\1\6\6\0\4\6\1\315"+ + "\23\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\12\6\1\316\15\6\11\0\1\6\4\0"+ + "\4\6\2\0\1\76\12\0\1\6\6\0\2\6\1\317"+ + "\25\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\17\6\1\320\10\6\11\0\1\6\4\0"+ + "\4\6\2\0\1\76\12\0\1\6\6\0\3\6\1\321"+ + "\24\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\14\6\1\322\13\6\11\0\1\6\4\0"+ + "\4\6\2\0\1\76\12\0\1\6\6\0\2\6\1\323"+ + "\25\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\12\6\1\324\15\6\11\0\1\6\4\0"+ + "\4\6\2\0\1\76\12\0\1\6\6\0\11\6\1\325"+ + "\16\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\16\6\1\326\11\6\11\0\1\6\4\0"+ + "\4\6\2\0\1\76\12\0\1\6\6\0\2\6\1\327"+ + "\25\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\11\6\1\330\16\6\11\0\1\6\4\0"+ + "\4\6\2\0\1\76\12\0\1\6\6\0\16\6\1\331"+ "\11\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ - "\1\6\6\0\20\6\1\354\7\6\11\0\1\6\4\0"+ - "\4\6\2\0\1\76\12\0\1\6\6\0\6\6\1\355"+ + "\1\6\6\0\10\6\1\332\17\6\11\0\1\6\4\0"+ + "\4\6\2\0\1\76\12\0\1\6\6\0\6\6\1\333"+ "\21\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ - "\1\6\6\0\2\6\1\356\25\6\11\0\1\6\4\0"+ - "\4\6\2\0\1\76\12\0\1\6\6\0\5\6\1\357"+ - "\22\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ - "\1\6\6\0\11\6\1\360\16\6\11\0\1\6\5\0"+ - "\2\361\16\0\1\361\6\0\1\361\2\0\1\361\4\0"+ - "\1\361\4\0\2\361\1\0\1\361\25\0\4\6\2\0"+ - "\1\76\12\0\1\6\6\0\6\6\1\362\21\6\11\0"+ + "\1\6\6\0\12\6\1\334\15\6\11\0\1\6\4\0"+ + "\4\6\2\0\1\76\12\0\1\6\6\0\25\6\1\335"+ + "\2\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\7\6\1\336\20\6\11\0\1\6\4\0"+ + "\4\6\2\0\1\76\12\0\1\6\6\0\5\6\1\337"+ + "\22\6\11\0\1\6\5\0\2\340\16\0\1\340\6\0"+ + "\1\340\2\0\1\340\4\0\1\340\4\0\2\340\1\0"+ + "\1\340\64\0\1\341\36\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\4\6\1\342\23\6\11\0\1\6\4\0"+ + "\4\6\2\0\1\76\12\0\1\6\6\0\10\6\1\343"+ + "\17\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\3\6\1\344\24\6\11\0\1\6\4\0"+ + "\4\6\2\0\1\76\12\0\1\6\6\0\2\6\1\345"+ + "\1\6\1\346\23\6\11\0\1\6\4\0\4\6\2\0"+ + "\1\76\12\0\1\6\6\0\11\6\1\347\16\6\11\0"+ "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+ - "\16\6\1\363\11\6\11\0\1\6\4\0\4\6\2\0"+ - "\1\76\12\0\1\6\6\0\16\6\1\364\11\6\11\0"+ + "\20\6\1\350\7\6\11\0\1\6\4\0\4\6\2\0"+ + "\1\76\12\0\1\6\6\0\6\6\1\351\21\6\11\0"+ "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+ - "\10\6\1\365\17\6\11\0\1\6\4\0\4\6\2\0"+ - "\1\76\12\0\1\6\6\0\27\6\1\366\11\0\1\6"+ - "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\1\6"+ - "\1\367\26\6\11\0\1\6\4\0\4\6\2\0\1\76"+ - "\12\0\1\6\6\0\10\6\1\370\17\6\11\0\1\6"+ - "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\12\6"+ - "\1\371\15\6\11\0\1\6\4\0\4\6\2\0\1\76"+ - "\12\0\1\6\1\0\1\372\4\0\30\6\11\0\1\6"+ - "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\3\6"+ - "\1\373\24\6\11\0\1\6\4\0\4\6\2\0\1\76"+ - "\12\0\1\6\6\0\11\6\1\374\16\6\11\0\1\6"+ - "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\23\6"+ - "\1\375\4\6\11\0\1\6\4\0\4\6\2\0\1\76"+ - "\12\0\1\6\6\0\6\6\1\376\21\6\11\0\1\6"+ - "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\10\6"+ - "\1\377\17\6\11\0\1\6\4\0\4\6\2\0\1\76"+ - "\12\0\1\6\6\0\3\6\1\u0100\24\6\11\0\1\6"+ + "\1\352\27\6\11\0\1\6\4\0\4\6\2\0\1\76"+ + "\12\0\1\6\6\0\23\6\1\353\4\6\11\0\1\6"+ + "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\6\6"+ + "\1\354\21\6\11\0\1\6\4\0\4\6\2\0\1\76"+ + "\12\0\1\6\6\0\16\6\1\355\11\6\11\0\1\6"+ + "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\20\6"+ + "\1\356\7\6\11\0\1\6\4\0\4\6\2\0\1\76"+ + "\12\0\1\6\6\0\6\6\1\357\21\6\11\0\1\6"+ "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\2\6"+ - "\1\u0101\25\6\11\0\1\6\27\0\1\372\4\0\1\u0102"+ - "\17\0\1\u0103\25\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\5\6\1\u0104\22\6\11\0\1\6\4\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\23\6\1\u0105\4\6"+ + "\1\360\25\6\11\0\1\6\4\0\4\6\2\0\1\76"+ + "\12\0\1\6\6\0\5\6\1\361\22\6\11\0\1\6"+ + "\4\0\4\6\2\0\1\76\12\0\1\6\6\0\11\6"+ + "\1\362\16\6\11\0\1\6\5\0\2\363\16\0\1\363"+ + "\6\0\1\363\2\0\1\363\4\0\1\363\4\0\2\363"+ + "\1\0\1\363\25\0\4\6\2\0\1\76\12\0\1\6"+ + "\6\0\6\6\1\364\21\6\11\0\1\6\4\0\4\6"+ + "\2\0\1\76\12\0\1\6\6\0\16\6\1\365\11\6"+ "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ - "\1\0\1\u0106\4\0\30\6\11\0\1\6\4\0\4\6"+ - "\2\0\1\76\12\0\1\6\1\0\1\u0107\4\0\30\6"+ + "\6\0\16\6\1\366\11\6\11\0\1\6\4\0\4\6"+ + "\2\0\1\76\12\0\1\6\6\0\10\6\1\367\17\6"+ "\11\0\1\6\4\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\25\6\1\u0108\2\6\11\0\1\6\4\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\21\6\1\u0109\6\6"+ - "\11\0\1\6\41\0\1\u010a\75\0\1\u010b\40\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\11\6\1\u010c\16\6"+ - "\11\0\1\6\27\0\1\u0106\6\0\1\u010d\66\0\1\u0107"+ - "\6\0\1\u010e\43\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\3\6\1\u010f\24\6\11\0\1\6\4\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\3\6\1\u0110\24\6"+ - "\11\0\1\6\36\0\1\u0111\105\0\1\u0112\33\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\6\6\1\u0113\21\6"+ - "\11\0\1\6\44\0\1\u0114\101\0\1\u0115\31\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\6\6\1\u0116\21\6"+ - "\11\0\1\6\46\0\1\u0117\71\0\1\u0118\73\0\1\u0119"+ - "\75\0\1\u011a\41\0\4\6\2\0\1\76\12\0\1\6"+ - "\6\0\5\6\1\u011b\22\6\11\0\1\6\42\0\1\u011c"+ - "\74\0\1\u011d\73\0\1\u011e\102\0\1\u011f\35\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\1\6\1\u0120\26\6"+ - "\11\0\1\6\45\0\1\u0121\72\0\1\u0122\37\0\4\6"+ - "\2\0\1\76\12\0\1\6\6\0\11\6\1\u0123\16\6"+ - "\11\0\1\6\52\0\1\u0124\64\0\1\u0125\76\0\1\u0126"+ - "\70\0\1\u0127\105\0\1\u0128\33\0"; + "\6\0\27\6\1\370\11\0\1\6\4\0\4\6\2\0"+ + "\1\76\12\0\1\6\6\0\1\6\1\371\26\6\11\0"+ + "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+ + "\10\6\1\372\17\6\11\0\1\6\4\0\4\6\2\0"+ + "\1\76\12\0\1\6\6\0\12\6\1\373\15\6\11\0"+ + "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\1\0"+ + "\1\374\4\0\30\6\11\0\1\6\4\0\4\6\2\0"+ + "\1\76\12\0\1\6\6\0\3\6\1\375\24\6\11\0"+ + "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+ + "\11\6\1\376\16\6\11\0\1\6\4\0\4\6\2\0"+ + "\1\76\12\0\1\6\6\0\23\6\1\377\4\6\11\0"+ + "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+ + "\6\6\1\u0100\21\6\11\0\1\6\4\0\4\6\2\0"+ + "\1\76\12\0\1\6\6\0\10\6\1\u0101\17\6\11\0"+ + "\1\6\4\0\4\6\2\0\1\76\12\0\1\6\6\0"+ + "\3\6\1\u0102\24\6\11\0\1\6\4\0\4\6\2\0"+ + "\1\76\12\0\1\6\6\0\2\6\1\u0103\25\6\11\0"+ + "\1\6\27\0\1\374\4\0\1\u0104\17\0\1\u0105\25\0"+ + "\4\6\2\0\1\76\12\0\1\6\6\0\5\6\1\u0106"+ + "\22\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\23\6\1\u0107\4\6\11\0\1\6\4\0"+ + "\4\6\2\0\1\76\12\0\1\6\1\0\1\u0108\4\0"+ + "\30\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ + "\1\6\1\0\1\u0109\4\0\30\6\11\0\1\6\4\0"+ + "\4\6\2\0\1\76\12\0\1\6\6\0\25\6\1\u010a"+ + "\2\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\21\6\1\u010b\6\6\11\0\1\6\41\0"+ + "\1\u010c\75\0\1\u010d\40\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\11\6\1\u010e\16\6\11\0\1\6\27\0"+ + "\1\u0108\6\0\1\u010f\66\0\1\u0109\6\0\1\u0110\43\0"+ + "\4\6\2\0\1\76\12\0\1\6\6\0\3\6\1\u0111"+ + "\24\6\11\0\1\6\4\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\3\6\1\u0112\24\6\11\0\1\6\36\0"+ + "\1\u0113\105\0\1\u0114\33\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\6\6\1\u0115\21\6\11\0\1\6\44\0"+ + "\1\u0116\101\0\1\u0117\31\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\6\6\1\u0118\21\6\11\0\1\6\46\0"+ + "\1\u0119\71\0\1\u011a\73\0\1\u011b\75\0\1\u011c\41\0"+ + "\4\6\2\0\1\76\12\0\1\6\6\0\5\6\1\u011d"+ + "\22\6\11\0\1\6\42\0\1\u011e\74\0\1\u011f\73\0"+ + "\1\u0120\102\0\1\u0121\35\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\1\6\1\u0122\26\6\11\0\1\6\45\0"+ + "\1\u0123\72\0\1\u0124\37\0\4\6\2\0\1\76\12\0"+ + "\1\6\6\0\11\6\1\u0125\16\6\11\0\1\6\52\0"+ + "\1\u0126\64\0\1\u0127\76\0\1\u0128\70\0\1\u0129\105\0"+ + "\1\u012a\33\0"; private static int [] zzUnpackTrans() { - int [] result = new int[13516]; + int [] result = new int[13578]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; @@ -497,9 +500,9 @@ public class SCLLexer { "\3\0\1\10\1\11\10\1\2\11\10\1\1\11\17\1"+ "\4\11\2\1\1\11\3\1\2\11\2\1\1\0\2\11"+ "\4\1\1\11\5\0\1\1\1\11\2\1\3\0\1\1"+ - "\4\0\5\1\2\0\37\1\1\0\5\11\1\1\1\11"+ + "\4\0\5\1\2\0\40\1\1\0\5\11\1\1\1\11"+ "\2\0\2\1\1\0\3\11\1\0\1\11\2\0\1\11"+ - "\1\1\1\0\1\1\1\0\32\1\1\11\1\0\1\11"+ + "\1\1\1\0\1\1\1\0\33\1\1\11\1\0\1\11"+ "\2\0\1\1\1\0\31\1\1\0\1\11\1\0\23\1"+ "\1\0\1\11\21\1\1\11\10\1\1\0\7\1\2\0"+ "\2\1\2\0\2\1\2\0\1\1\2\0\2\1\2\0"+ @@ -507,7 +510,7 @@ public class SCLLexer { "\1\1\2\0\1\1\2\0\1\11\1\0\1\11"; private static int [] zzUnpackAttribute() { - int [] result = new int[296]; + int [] result = new int[298]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; @@ -922,11 +925,11 @@ public class SCLLexer { case STRING: { throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Unclosed string literal."); } - case 297: break; + case 299: break; case LONG_STRING: { throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Unclosed string literal."); } - case 298: break; + case 300: break; default: { return sym(SCLTerminals.EOF); } @@ -937,39 +940,39 @@ public class SCLLexer { case 1: { throw new SCLSyntaxErrorException(Locations.location(yychar, yychar+1), "Illegal character '" + yytext() + "'."); } - case 96: break; + case 97: break; case 2: { return sym(SCLTerminals.ID); } - case 97: break; + case 98: break; case 3: { return sym(SCLTerminals.INTEGER); } - case 98: break; + case 99: break; case 4: { return sym(SCLTerminals.SYMBOL, yytext().trim()); } - case 99: break; + case 100: break; case 5: { return sym(SCLTerminals.ATTACHED_HASH, "#"); } - case 100: break; + case 101: break; case 6: { return sym(SCLTerminals.ATTACHED_DOT, "."); } - case 101: break; + case 102: break; case 7: { return sym(SCLTerminals.AT); } - case 102: break; + case 103: break; case 8: { ++parenCount; return sym(SCLTerminals.LPAREN); } - case 103: break; + case 104: break; case 9: { return sym(SCLTerminals.COMMA); } - case 104: break; + case 105: break; case 10: { --parenCount; if(parenCount == 0 && !parenCountStack.isEmpty()) { @@ -982,164 +985,164 @@ public class SCLLexer { else return sym(SCLTerminals.RPAREN); } - case 105: break; + case 106: break; case 11: { return new Token(SCLTerminals.EOL, yychar, yychar+yylength(), ""); } - case 106: break; + case 107: break; case 12: { return sym(SCLTerminals.LESS, "<"); } - case 107: break; + case 108: break; case 13: { return sym(SCLTerminals.GREATER, ">"); } - case 108: break; + case 109: break; case 14: { return sym(SCLTerminals.MINUS, "-"); } - case 109: break; + case 110: break; case 15: { } - case 110: break; + case 111: break; case 16: { throw new SCLSyntaxErrorException(Locations.location(yychar, yychar+1), "Character does not conform to UTF-8 encoding."); } - case 111: break; + case 112: break; case 17: { return sym(SCLTerminals.LAMBDA); } - case 112: break; + case 113: break; case 18: { return sym(SCLTerminals.LBRACE); } - case 113: break; + case 114: break; case 19: { return sym(SCLTerminals.RBRACE); } - case 114: break; + case 115: break; case 20: { return sym(SCLTerminals.LBRACKET); } - case 115: break; + case 116: break; case 21: { return sym(SCLTerminals.RBRACKET); } - case 116: break; + case 117: break; case 22: { return sym(SCLTerminals.EQUALS); } - case 117: break; + case 118: break; case 23: { return sym(SCLTerminals.COLON); } - case 118: break; + case 119: break; case 24: { return sym(SCLTerminals.SEMICOLON); } - case 119: break; + case 120: break; case 25: { return sym(SCLTerminals.BAR); } - case 120: break; + case 121: break; case 26: { string.setLength(0); stringStart=yychar; yybegin(STRING); return sym(SCLTerminals.BEGIN_STRING); } - case 121: break; + case 122: break; case 27: { return sym(SCLTerminals.BLANK); } - case 122: break; + case 123: break; case 28: { throw new SCLSyntaxErrorException(Locations.location(yychar, yychar+1), "Tabulator is not allowed except inside string literals."); } - case 123: break; + case 124: break; case 29: { string.append( yytext() ); } - case 124: break; + case 125: break; case 30: { throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Unclosed string literal."); } - case 125: break; + case 126: break; case 31: { yybegin(YYINITIAL); return new Token(SCLTerminals.END_STRING, stringStart, yychar+1, string.toString()); } - case 126: break; + case 127: break; case 32: { string.append('\n'); } - case 127: break; + case 128: break; case 33: { return sym(SCLTerminals.DOTDOT, "."); } - case 128: break; + case 129: break; case 34: { return sym(SCLTerminals.SEPARATED_DOT, "."); } - case 129: break; + case 130: break; case 35: { return sym(SCLTerminals.ANNOTATION_ID); } - case 130: break; + case 131: break; case 36: { return sym(SCLTerminals.BINDS); } - case 131: break; + case 132: break; case 37: { return sym(SCLTerminals.ARROW); } - case 132: break; + case 133: break; case 38: { return sym(SCLTerminals.COMMENT); } - case 133: break; + case 134: break; case 39: { return sym(SCLTerminals.AS); } - case 134: break; + case 135: break; case 40: { return sym(SCLTerminals.IF); } - case 135: break; + case 136: break; case 41: { return sym(SCLTerminals.IN); } - case 136: break; + case 137: break; case 42: { return sym(options.supportEq ? SCLTerminals.EQ : SCLTerminals.ID); } - case 137: break; + case 138: break; case 43: { return sym(SCLTerminals.BY); } - case 138: break; + case 139: break; case 44: { return sym(SCLTerminals.DO); } - case 139: break; + case 140: break; case 45: { return sym(SCLTerminals.IMPLIES); } - case 140: break; + case 141: break; case 46: { return sym(SCLTerminals.FOLLOWS); } - case 141: break; + case 142: break; case 47: { return sym(SCLTerminals.HASTYPE); } - case 142: break; + case 143: break; case 48: { throw new SCLSyntaxErrorException(Locations.location(stringStart, yychar), "Illegal string escape character."); } - case 143: break; + case 144: break; case 49: { string.append(yytext().substring(1)); } - case 144: break; + case 145: break; case 50: { parenCountStack.add(parenCount); parenCount = 1; @@ -1147,15 +1150,15 @@ public class SCLLexer { yybegin(YYINITIAL); return new Token(SCLTerminals.SUSPEND_STRING, stringStart, yychar+1, string.toString()); } - case 145: break; + case 146: break; case 51: { string.append('\r'); } - case 146: break; + case 147: break; case 52: { string.append('\t'); } - case 147: break; + case 148: break; case 53: { parenCountStack.add(parenCount); parenCount = 1; @@ -1163,178 +1166,182 @@ public class SCLLexer { yybegin(YYINITIAL); return new Token(SCLTerminals.SUSPEND_STRING, stringStart, yychar+1, string.toString()); } - case 148: break; + case 149: break; case 54: { return sym(SCLTerminals.FLOAT); } - case 149: break; + case 150: break; case 55: { return sym(SCLTerminals.CHAR); } - case 150: break; + case 151: break; case 56: { String text = yytext(); return sym(SCLTerminals.ID, text.substring(1, text.length()-1)); } - case 151: break; + case 152: break; case 57: { String text = yytext(); return sym(SCLTerminals.SYMBOL, text.substring(1, text.length()-1)); } - case 152: break; + case 153: break; case 58: { return sym(SCLTerminals.QUERY_OP); } - case 153: break; + case 154: break; case 59: { return sym(SCLTerminals.LET); } - case 154: break; + case 155: break; case 60: - { return sym(SCLTerminals.MDO); + { return sym(SCLTerminals.EDO); } - case 155: break; + case 156: break; case 61: - { string.setLength(0); stringStart=yychar; yybegin(LONG_STRING); return sym(SCLTerminals.BEGIN_STRING); + { return sym(SCLTerminals.MDO); } - case 156: break; + case 157: break; case 62: + { string.setLength(0); stringStart=yychar; yybegin(LONG_STRING); return sym(SCLTerminals.BEGIN_STRING); + } + case 158: break; + case 63: { yybegin(YYINITIAL); return new Token(SCLTerminals.END_STRING, stringStart, yychar+3, string.toString()); } - case 157: break; - case 63: + case 159: break; + case 64: { return sym(supportCHR() ? SCLTerminals.ID : SCLTerminals.RULE); } - case 158: break; - case 64: + case 160: break; + case 65: { return sym(SCLTerminals.THEN); } - case 159: break; - case 65: + case 161: break; + case 66: { return sym(SCLTerminals.TYPE); } - case 160: break; - case 66: + case 162: break; + case 67: { return sym(SCLTerminals.ELSE); } - case 161: break; - case 67: + case 163: break; + case 68: { return sym(SCLTerminals.WITH); } - case 162: break; - case 68: + case 164: break; + case 69: { return sym(SCLTerminals.WHEN); } - case 163: break; - case 69: + case 165: break; + case 70: { return sym(SCLTerminals.DATA); } - case 164: break; - case 70: + case 166: break; + case 71: { return sym(SCLTerminals.INFIX); } - case 165: break; - case 71: + case 167: break; + case 72: { return sym(SCLTerminals.WHERE); } - case 166: break; - case 72: + case 168: break; + case 73: { return sym(SCLTerminals.CLASS); } - case 167: break; - case 73: + case 169: break; + case 74: { return sym(SCLTerminals.MATCH); } - case 168: break; - case 74: + case 170: break; + case 75: { return sym(SCLTerminals.LAMBDA_MATCH); } - case 169: break; - case 75: + case 171: break; + case 76: { return sym(SCLTerminals.FORALL); } - case 170: break; - case 76: + case 172: break; + case 77: { return sym(SCLTerminals.INFIXR); } - case 171: break; - case 77: + case 173: break; + case 78: { return sym(SCLTerminals.INFIXL); } - case 172: break; - case 78: + case 174: break; + case 79: { return sym(SCLTerminals.IMPORT); } - case 173: break; - case 79: + case 175: break; + case 80: { return sym(SCLTerminals.HIDING); } - case 174: break; - case 80: + case 176: break; + case 81: { return sym(SCLTerminals.EFFECT); } - case 175: break; - case 81: + case 177: break; + case 82: { return sym(supportCHR() ? SCLTerminals.CHR_SELECT : SCLTerminals.SELECT); } - case 176: break; - case 82: + case 178: break; + case 83: { string.append((char)Integer.parseInt(yytext().substring(2), 16)); } - case 177: break; - case 83: + case 179: break; + case 84: { return sym(supportCHR() ? SCLTerminals.RULESET : SCLTerminals.ID); } - case 178: break; - case 84: + case 180: break; + case 85: { return sym(SCLTerminals.INCLUDE); } - case 179: break; - case 85: + case 181: break; + case 86: { return sym(SCLTerminals.ENFORCE); } - case 180: break; - case 86: + case 182: break; + case 87: { return sym(SCLTerminals.EXTENDS); } - case 181: break; - case 87: + case 183: break; + case 88: { return sym(SCLTerminals.INSTANCE); } - case 182: break; - case 88: + case 184: break; + case 89: { return sym(SCLTerminals.DERIVING); } - case 183: break; - case 89: + case 185: break; + case 90: { return sym(SCLTerminals.IMPORTJAVA); } - case 184: break; - case 90: + case 186: break; + case 91: { return sym(SCLTerminals.CONSTRAINT); } - case 185: break; - case 91: + case 187: break; + case 92: { return sym(SCLTerminals.SELECT_FIRST); } - case 186: break; - case 92: + case 188: break; + case 93: { return sym(SCLTerminals.ABSTRACT_RULE); } - case 187: break; - case 93: + case 189: break; + case 94: { return sym(supportCHR() ? SCLTerminals.ID : SCLTerminals.TRANSFORMATION); } - case 188: break; - case 94: + case 190: break; + case 95: { return sym(SCLTerminals.SELECT_DISTINCT); } - case 189: break; - case 95: + case 191: break; + case 96: { return sym(SCLTerminals.MAPPING_RELATION); } - case 190: break; + case 192: break; default: zzScanError(ZZ_NO_MATCH); } diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLParser.dat b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLParser.dat index 3d4d50962..59f0f80fc 100644 Binary files a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLParser.dat and b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLParser.dat differ diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLParser.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLParser.java index 3e857b7f1..1a163b3b9 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLParser.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLParser.java @@ -14,14 +14,14 @@ public abstract class SCLParser { private static final int INITIAL_CAPACITY = 16; private static final int STATE_COUNT = 362; - private static final int TERMINAL_COUNT = 85; + private static final int TERMINAL_COUNT = 86; private static final int NONTERMINAL_COUNT = 52; private static final int PRODUCT_COUNT = 138; private static final int[] ACTION_ROW_ID = new int[STATE_COUNT]; private static final int[] ACTION_COLUMN_ID = new int[TERMINAL_COUNT]; private static final short[] ACTION_TABLE = new short[6832]; - private static final int[] ERROR_TABLE = new int[962]; + private static final int[] ERROR_TABLE = new int[973]; private static final int[] GOTO_ROW_ID = new int[STATE_COUNT]; private static final int[] GOTO_COLUMN_ID = new int[NONTERMINAL_COUNT]; private static final short[] GOTO_TABLE = new short[1953]; @@ -86,6 +86,7 @@ public abstract class SCLParser { "MATCH", "DO", "MDO", + "EDO", "ENFORCE", "BLANK", "FLOAT", @@ -931,7 +932,7 @@ public abstract class SCLParser { */ protected abstract Object reduceMatch(); /** - * aexp ::= (DO | MDO) statements + * aexp ::= (DO | MDO | EDO) statements */ protected abstract Object reduceDo(); /** diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLParserImpl.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLParserImpl.java index bda298bd6..a29368c2a 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLParserImpl.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLParserImpl.java @@ -57,6 +57,7 @@ import org.simantics.scl.compiler.elaboration.expressions.accessor.FieldAccessor import org.simantics.scl.compiler.elaboration.expressions.accessor.IdAccessor; import org.simantics.scl.compiler.elaboration.expressions.accessor.StringAccessor; import org.simantics.scl.compiler.elaboration.expressions.block.BindStatement; +import org.simantics.scl.compiler.elaboration.expressions.block.BlockType; import org.simantics.scl.compiler.elaboration.expressions.block.CHRStatement; import org.simantics.scl.compiler.elaboration.expressions.block.ConstraintStatement; import org.simantics.scl.compiler.elaboration.expressions.block.GuardStatement; @@ -761,7 +762,14 @@ public class SCLParserImpl extends SCLParser { protected Object reduceDo() { EBlock block = (EBlock)get(1); Token doToken = (Token)get(0); - block.setMonadic( doToken.text.equals("mdo") ); + switch(doToken.text) { + case "mdo": + block.setBlockType(BlockType.Monad); + break; + case "edo": + block.setBlockType(BlockType.MonadE); + break; + } block.location = Locations.location(Locations.beginOf(doToken.location), Locations.endOf(block.location)); return block; } diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLPostLexer.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLPostLexer.java index a2253d8b7..9598f49d5 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLPostLexer.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLPostLexer.java @@ -30,6 +30,7 @@ public class SCLPostLexer { INDENTABLE.add(SCLTerminals.WITH); INDENTABLE.add(SCLTerminals.DO); INDENTABLE.add(SCLTerminals.MDO); + INDENTABLE.add(SCLTerminals.EDO); INDENTABLE.add(SCLTerminals.LET); INDENTABLE.add(SCLTerminals.ENFORCE); INDENTABLE.add(SCLTerminals.WHEN); diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLTerminals.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLTerminals.java index 6aab6c4b6..76850ca9f 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLTerminals.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLTerminals.java @@ -52,38 +52,39 @@ public interface SCLTerminals { public static final int MATCH = 48; public static final int DO = 49; public static final int MDO = 50; - public static final int ENFORCE = 51; - public static final int BLANK = 52; - public static final int FLOAT = 53; - public static final int LBRACKET = 54; - public static final int ESCAPED_SYMBOL = 55; - public static final int CHAR = 56; - public static final int WHEN = 57; - public static final int ATTACHED_HASH = 58; - public static final int SELECT = 59; - public static final int SELECT_FIRST = 60; - public static final int SELECT_DISTINCT = 61; - public static final int TRANSFORMATION = 62; - public static final int EQ = 63; - public static final int CHR_SELECT = 64; - public static final int ATTACHED_DOT = 65; - public static final int IN = 66; - public static final int THEN = 67; - public static final int ELSE = 68; - public static final int WITH = 69; - public static final int RBRACKET = 70; - public static final int DOTDOT = 71; - public static final int AT = 72; - public static final int SUSPEND_STRING = 73; - public static final int CONTINUE_STRING = 74; - public static final int BINDS = 75; - public static final int IMPLIES = 76; - public static final int THEN_AFTER_WHEN = 77; - public static final int CONSTRAINT = 78; - public static final int BY = 79; - public static final int QUERY_OP = 80; - public static final int FORALL = 81; - public static final int COMMENT = 82; - public static final int EOL = 83; - public static final int EOF = 84; + public static final int EDO = 51; + public static final int ENFORCE = 52; + public static final int BLANK = 53; + public static final int FLOAT = 54; + public static final int LBRACKET = 55; + public static final int ESCAPED_SYMBOL = 56; + public static final int CHAR = 57; + public static final int WHEN = 58; + public static final int ATTACHED_HASH = 59; + public static final int SELECT = 60; + public static final int SELECT_FIRST = 61; + public static final int SELECT_DISTINCT = 62; + public static final int TRANSFORMATION = 63; + public static final int EQ = 64; + public static final int CHR_SELECT = 65; + public static final int ATTACHED_DOT = 66; + public static final int IN = 67; + public static final int THEN = 68; + public static final int ELSE = 69; + public static final int WITH = 70; + public static final int RBRACKET = 71; + public static final int DOTDOT = 72; + public static final int AT = 73; + public static final int SUSPEND_STRING = 74; + public static final int CONTINUE_STRING = 75; + public static final int BINDS = 76; + public static final int IMPLIES = 77; + public static final int THEN_AFTER_WHEN = 78; + public static final int CONSTRAINT = 79; + public static final int BY = 80; + public static final int QUERY_OP = 81; + public static final int FORALL = 82; + public static final int COMMENT = 83; + public static final int EOL = 84; + public static final int EOF = 85; } diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java index a3db2df52..1a6bdc257 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java @@ -93,6 +93,7 @@ public class Types { public static final TCon ADDITIVE = con("Prelude", "Additive"); public static final TCon MONAD = con("Prelude", "Monad"); + public static final TCon MONAD_E = con("Prelude", "MonadE"); public static final TCon INTEGRAL = con("Prelude", "Integral"); public static final TCon RING = con("Prelude", "Ring"); public static final TCon ORDERED_RING = con("Prelude", "OrderedRing"); diff --git a/bundles/org.simantics.scl.db/scl/Simantics/DB.scl b/bundles/org.simantics.scl.db/scl/Simantics/DB.scl index 702c710c8..b24df17f8 100644 --- a/bundles/org.simantics.scl.db/scl/Simantics/DB.scl +++ b/bundles/org.simantics.scl.db/scl/Simantics/DB.scl @@ -428,6 +428,10 @@ currentModel = match activeModel (currentProject ()) with Just model -> model Nothing -> fail "No active model." +"Gives the current active model if it exists or Nothing otherwise." +possibleCurrentModel :: Maybe Resource +possibleCurrentModel = activeModel (currentProject ()) + startUndoPoint :: String -> () startUndoPoint string = do markUndoPoint () diff --git a/bundles/org.simantics.scl.db/scl/Simantics/GShow.scl b/bundles/org.simantics.scl.db/scl/Simantics/GShow.scl index 5ef2bad1b..693e3e31f 100644 --- a/bundles/org.simantics.scl.db/scl/Simantics/GShow.scl +++ b/bundles/org.simantics.scl.db/scl/Simantics/GShow.scl @@ -89,21 +89,21 @@ resourceId ctx r = loop r `morelse` (guard (r == getRootLibrary ()) >> return (AbsoluteUri "http:/")) `morelse` - (mdo + (edo (p,rel) <- getPrimaryFunctionalReference r path <- loop p relName <- possibleNameOf rel return $ simplifyResourceIdHead $ PropertyOf path relName ) `morelse` - (mdo + (edo p <- possibleObject r L0.PartOf path <- loop p name <- possibleNameOf r return $ simplifyResourceIdHead $ NamedChildOf path name ) `morelse` - (mdo + (edo (p,rel) <- getSecondaryFunctionalReference r path <- loop p relName <- possibleNameOf rel diff --git a/bundles/org.simantics.scl.runtime/scl/Prelude.scl b/bundles/org.simantics.scl.runtime/scl/Prelude.scl index 05b5f2785..907d6e00d 100644 --- a/bundles/org.simantics.scl.runtime/scl/Prelude.scl +++ b/bundles/org.simantics.scl.runtime/scl/Prelude.scl @@ -1088,6 +1088,22 @@ class (Functor f) => FunctorM f where sequence :: Monad m => f (m a) -> m (f a) mapM f l = sequence (fmap f l) +/// MonadE /// + +class (FunctorE m, Monad m) => MonadE m where + bindE :: m a -> (a -> m b) -> m b + +instance MonadE Maybe where + bindE Nothing _ = Nothing + bindE (Just v) f = f v + +instance MonadE (Either a) where + bindE (Left v) _ = Left v + bindE (Right v) f = f v + +instance MonadE [] where + bindE l f = concatMap f l + /// Category /// "Identity function." diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/ModuleRegressionTests.java b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/ModuleRegressionTests.java index 9eb49d2f7..95cbcd2e3 100644 --- a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/ModuleRegressionTests.java +++ b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/ModuleRegressionTests.java @@ -180,6 +180,7 @@ public class ModuleRegressionTests extends TestBase { @Test public void MonadBug1() { test(); } @Test public void Monads1() { test(); } @Test public void MonadSyntax1() { test(); } + @Test public void MonadSyntax3() { test(); } @Test public void NoDefinitionErrorMessage() { test(); } @Test public void NoInstance() { test(); } @Test public void NoInstance2() { test(); } diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/TestBase.java b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/TestBase.java index fa90f524c..a662791dd 100644 --- a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/TestBase.java +++ b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/TestBase.java @@ -1,5 +1,6 @@ package org.simantics.scl.compiler.tests; +import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -122,6 +123,8 @@ public class TestBase { private String[] readTestParts(String testPath) throws IOException { InputStream stream = getClass().getResourceAsStream(testPath); + if(stream == null) + throw new FileNotFoundException(testPath); try { byte[] buffer = new byte[1024]; int pos = 0; diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/InvalidLambda.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/InvalidLambda.scl index 3cf6ed74b..d82500e4a 100644 --- a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/InvalidLambda.scl +++ b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/InvalidLambda.scl @@ -1,4 +1,4 @@ main = \ /* no parameters */ -> 3 -- -2:30-2:32: Unexpected token '->' (ARROW). Expected one of ATTACHED_HASH, BEGIN_STRING, BLANK, CHAR, CHR_SELECT, DO, ENFORCE, EQ, ESCAPED_SYMBOL, FLOAT, ID, IF, INTEGER, LAMBDA, LAMBDA_MATCH, LBRACKET, LET, LPAREN, MATCH, MDO, SELECT, SELECT_DISTINCT, SELECT_FIRST, TRANSFORMATION. \ No newline at end of file +2:30-2:32: Unexpected token '->' (ARROW). Expected one of ATTACHED_HASH, BEGIN_STRING, BLANK, CHAR, CHR_SELECT, DO, EDO, ENFORCE, EQ, ESCAPED_SYMBOL, FLOAT, ID, IF, INTEGER, LAMBDA, LAMBDA_MATCH, LBRACKET, LET, LPAREN, MATCH, MDO, SELECT, SELECT_DISTINCT, SELECT_FIRST, TRANSFORMATION. \ No newline at end of file diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/MonadSyntax3.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/MonadSyntax3.scl new file mode 100644 index 000000000..fa36d0e95 --- /dev/null +++ b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/MonadSyntax3.scl @@ -0,0 +1,18 @@ +import "Prelude" + +a = ["a", "b"] +b = [1, 2] + +main = edo + x <- a + return $ print x + y <- b + return $ print y +-- +a +1 +2 +b +1 +2 +[(), (), (), ()] \ No newline at end of file diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/UnexpectedToken.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/UnexpectedToken.scl index 45f6b0853..6c54d94a1 100644 --- a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/UnexpectedToken.scl +++ b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/UnexpectedToken.scl @@ -1,4 +1,4 @@ a = = b = 4 -- -1:5-1:6: Unexpected token '=' (EQUALS). Expected one of ATTACHED_HASH, BEGIN_STRING, BLANK, CHAR, CHR_SELECT, DO, ENFORCE, EQ, ESCAPED_SYMBOL, FLOAT, ID, IF, INTEGER, LAMBDA, LAMBDA_MATCH, LBRACKET, LET, LPAREN, MATCH, MDO, MINUS, SELECT, SELECT_DISTINCT, SELECT_FIRST, TRANSFORMATION. \ No newline at end of file +1:5-1:6: Unexpected token '=' (EQUALS). Expected one of ATTACHED_HASH, BEGIN_STRING, BLANK, CHAR, CHR_SELECT, DO, EDO, ENFORCE, EQ, ESCAPED_SYMBOL, FLOAT, ID, IF, INTEGER, LAMBDA, LAMBDA_MATCH, LBRACKET, LET, LPAREN, MATCH, MDO, MINUS, SELECT, SELECT_DISTINCT, SELECT_FIRST, TRANSFORMATION. \ No newline at end of file