diff --git a/Source/Dafny/Cloner.cs b/Source/Dafny/Cloner.cs index 1cc5b604035..fc8dbea31ce 100644 --- a/Source/Dafny/Cloner.cs +++ b/Source/Dafny/Cloner.cs @@ -249,7 +249,7 @@ public Attributes CloneAttributes(Attributes attrs) { return CloneAttributes(attrs.Prev); } else if (attrs is UserSuppliedAttributes) { var usa = (UserSuppliedAttributes)attrs; - return new UserSuppliedAttributes(Tok(usa.tok), Tok(usa.OpenBrace), Tok(usa.Colon), Tok(usa.CloseBrace), attrs.Args.ConvertAll(CloneExpr), CloneAttributes(attrs.Prev)); + return new UserSuppliedAttributes(Tok(usa.tok), Tok(usa.OpenBrace), Tok(usa.CloseBrace), attrs.Args.ConvertAll(CloneExpr), CloneAttributes(attrs.Prev)); } else { return new Attributes(attrs.Name, attrs.Args.ConvertAll(CloneExpr), CloneAttributes(attrs.Prev)); } diff --git a/Source/Dafny/Dafny.atg b/Source/Dafny/Dafny.atg index be2140d660f..dd5f9daf890 100644 --- a/Source/Dafny/Dafny.atg +++ b/Source/Dafny/Dafny.atg @@ -187,11 +187,6 @@ public Parser(Scanner/*!*/ scanner, Errors/*!*/ errors, Include include, ModuleD theVerifyThisFile = verifyThisFile; } -bool IsAttribute() { - IToken x = scanner.Peek(); - return la.kind == _lbrace && x.kind == _colon; -} - bool IsLabel(bool allowLabel) { if (!allowLabel) { return false; @@ -220,18 +215,15 @@ bool IsGets() { // an existential guard starts with an identifier and is then followed by // * a colon (if the first identifier is given an explicit type), -// * a comma (if there's a list a bound variables and the first one is not given an explicit type), +// * a comma (if there's a list of bound variables and the first one is not given an explicit type), // * a start-attribute (if there's one bound variable and it is not given an explicit type and there are attributes), or // * a bored smiley (if there's one bound variable and it is not given an explicit type). bool IsExistentialGuard() { scanner.ResetPeek(); if (la.kind == _ident) { Token x = scanner.Peek(); - if (x.kind == _colon || x.kind == _comma || x.kind == _boredSmiley) { + if (x.kind == _colon || x.kind == _comma || x.kind == _boredSmiley || x.kind == _lbracecolon) { return true; - } else if (x.kind == _lbrace) { - x = scanner.Peek(); - return x.kind == _colon; } } return false; @@ -773,6 +765,7 @@ TOKENS ensures = "ensures". ghost = "ghost". witness = "witness". + lbracecolon = "{:". lbrace = '{'. rbrace = '}'. lbracket = '['. @@ -1593,7 +1586,7 @@ MethodSpec<.List req, List mod, List } + ( "modifies" { Attribute } FrameExpression (. Util.AddFrameExpression(mod, fe, performThisDeprecatedCheck, errors); .) { "," FrameExpression (. Util.AddFrameExpression(mod, fe, performThisDeprecatedCheck, errors); .) } @@ -1603,16 +1596,16 @@ MethodSpec<.List req, List mod, List } + { Attribute } [ IF(IsLabel(true)) LabelIdent ":" ] Expression OldSemi (. req.Add(new MaybeFreeExpression(e, isFree, lbl == null ? null : new AssertLabel(lbl, lbl.val), reqAttrs)); .) | "ensures" - { IF(IsAttribute()) Attribute } + { Attribute } Expression OldSemi (. ens.Add(new MaybeFreeExpression(e, isFree, ensAttrs)); .) ) - | "decreases" { IF(IsAttribute()) Attribute } DecreasesList OldSemi + | "decreases" { Attribute } DecreasesList OldSemi ) . IteratorSpec<.List/*!*/ reads, List/*!*/ mod, List decreases, @@ -1623,12 +1616,12 @@ IteratorSpec<.List/*!*/ reads, List/ IToken lbl = null; .) SYNC - ( "reads" { IF(IsAttribute()) Attribute } + ( "reads" { Attribute } FrameExpression (. reads.Add(fe); .) { "," FrameExpression (. reads.Add(fe); .) } OldSemi - | "modifies" { IF(IsAttribute()) Attribute } + | "modifies" { Attribute } FrameExpression (. mod.Add(fe); .) { "," FrameExpression (. mod.Add(fe); .) } @@ -1650,7 +1643,7 @@ IteratorSpec<.List/*!*/ reads, List/ req.Add(new MaybeFreeExpression(e, isFree, al, null)); } .) - | "ensures" { IF(IsAttribute()) Attribute } + | "ensures" { Attribute } Expression OldSemi (. if (isYield) { yieldEns.Add(new MaybeFreeExpression(e, isFree, ensAttrs)); } else { @@ -1658,7 +1651,7 @@ IteratorSpec<.List/*!*/ reads, List/ } .) ) - | "decreases" { IF(IsAttribute()) Attribute } DecreasesList OldSemi + | "decreases" { Attribute } DecreasesList OldSemi ) . Formals<.bool incoming, bool allowGhostKeyword, bool allowNewKeyword, List formals.> @@ -2009,7 +2002,7 @@ FunctionSpec<.List/*!*/ reqs, List } + { Attribute } Expression OldSemi (. reqs.Add(new MaybeFreeExpression(e, false, reqAttrs)); .) | "reads" PossiblyWildFrameExpression (. reads.Add(fe); .) @@ -2017,7 +2010,7 @@ FunctionSpec<.List/*!*/ reqs, List } + { Attribute } Expression OldSemi (. ens.Add(new MaybeFreeExpression(e, false, ensAttrs)); .) | "decreases" (. if (decreases == null) { SemErr(t, "'decreases' clauses are meaningless for copredicates, so they are not allowed"); @@ -2503,15 +2496,15 @@ LoopSpec<.List invariants, List decreases, ref [ "free" (. isFree = true; errors.Deprecated(t, "the 'free' keyword is soon to be deprecated"); .) ] "invariant" - { IF(IsAttribute()) Attribute } + { Attribute } Expression (. invariants.Add(new MaybeFreeExpression(e, isFree, attrs)); .) OldSemi | SYNC "decreases" - { IF(IsAttribute()) Attribute } + { Attribute } DecreasesList OldSemi | SYNC "modifies" (. mod = mod ?? new List(); .) - { IF(IsAttribute()) Attribute } + { Attribute } FrameExpression (. mod.Add(fe); .) { "," FrameExpression (. mod.Add(fe); .) } @@ -2618,7 +2611,7 @@ AssertStmt IToken lbl = null; .) "assert" (. x = t; .) - { IF(IsAttribute()) Attribute } + { Attribute } ( [ IF(IsLabel(!inExprContext)) LabelIdent ":" ] @@ -2643,7 +2636,7 @@ AssumeStmt IToken dotdotdot = null; .) "assume" (. x = t; .) - { IF(IsAttribute()) Attribute } + { Attribute } ( Expression | "..." (. dotdotdot = t; .) ) @@ -2737,7 +2730,7 @@ ModifyStmt IToken ellipsisToken = null; .) "modify" (. tok = t; .) - { IF(IsAttribute()) Attribute } + { Attribute } /* Note, there is an ambiguity here, because a curly brace may look like a FrameExpression and * may also look like a BlockStmt. We're happy to parse the former, because if the user intended * the latter, then an explicit FrameExpression of {} could be given. @@ -2771,7 +2764,7 @@ CalcStmt IToken danglingOperator = null; .) "calc" (. x = t; .) - { IF(IsAttribute()) Attribute } + { Attribute } [ CalcOp (. if (userSuppliedOp.ResultOp(userSuppliedOp) == null) { // guard against non-transitive calcOp (like !=) SemErr(opTok, "the main operator of a calculation must be transitive"); } else { @@ -3836,7 +3829,7 @@ QuantifierDomain<.out List bvars, out Attributes attrs, out Expression { "," IdentTypeOptional (. bvars.Add(bv); .) } - { IF(IsAttribute()) Attribute } + { Attribute } [ IF(la.kind == _verticalbar) /* Coco complains about this ambiguity, thinking that a "|" can follow a body-less forall statement; I don't see how that's possible, but this IF is good and suppresses the reported ambiguity */ "|" Expression @@ -3877,17 +3870,16 @@ Expressions<.List args.> . /*------------------------------------------------------------------------*/ Attribute -= (. IToken openBrace, colon, closeBrace; += (. IToken openBrace, closeBrace; IToken x = null; var args = new List(); .) - "{" (. openBrace = t; .) - ":" (. colon = t; .) + "{:" (. openBrace = t; .) (. ConvertKeywordTokenToIdent(); .) NoUSIdent [ Expressions ] "}" (. closeBrace = t; .) - (. attrs = new UserSuppliedAttributes(x, openBrace, colon, closeBrace, args, attrs); .) + (. attrs = new UserSuppliedAttributes(x, openBrace, closeBrace, args, attrs); .) . /*------------------------------------------------------------------------*/ Ident diff --git a/Source/Dafny/DafnyAst.cs b/Source/Dafny/DafnyAst.cs index 99a81f6c087..4fed615f885 100644 --- a/Source/Dafny/DafnyAst.cs +++ b/Source/Dafny/DafnyAst.cs @@ -516,19 +516,16 @@ public class UserSuppliedAttributes : Attributes { public readonly IToken tok; // may be null, if the attribute was constructed internally public readonly IToken OpenBrace; - public readonly IToken Colon; public readonly IToken CloseBrace; public bool Recognized; // set to true to indicate an attribute that is processed by some part of Dafny; this allows it to be colored in the IDE - public UserSuppliedAttributes(IToken tok, IToken openBrace, IToken colon, IToken closeBrace, List args, Attributes prev) + public UserSuppliedAttributes(IToken tok, IToken openBrace, IToken closeBrace, List args, Attributes prev) : base(tok.val, args, prev) { Contract.Requires(tok != null); Contract.Requires(openBrace != null); - Contract.Requires(colon != null); Contract.Requires(closeBrace != null); Contract.Requires(args != null); this.tok = tok; OpenBrace = openBrace; - Colon = colon; CloseBrace = closeBrace; } } @@ -6210,9 +6207,8 @@ public override IEnumerable SubStatements { public void AddCustomizedErrorMessage(IToken tok, string s) { var args = new List() { new StringLiteralExpr(tok, s, true) }; IToken openBrace = tok; - IToken colon = new Token(tok.line, tok.col + 1); IToken closeBrace = new Token(tok.line, tok.col + 7 + s.Length + 1); // where 7 = length(":error ") - this.Attributes = new UserSuppliedAttributes(tok, openBrace, colon, closeBrace, args, this.Attributes); + this.Attributes = new UserSuppliedAttributes(tok, openBrace, closeBrace, args, this.Attributes); } } @@ -10719,9 +10715,8 @@ public MaybeFreeExpression(Expression e, bool isFree, AssertLabel/*?*/ label, At public void AddCustomizedErrorMessage(IToken tok, string s) { var args = new List() { new StringLiteralExpr(tok, s, true) }; IToken openBrace = tok; - IToken colon = new Token(tok.line, tok.col + 1); IToken closeBrace = new Token(tok.line, tok.col + 7 + s.Length + 1); // where 7 = length(":error ") - this.Attributes = new UserSuppliedAttributes(tok, openBrace, colon, closeBrace, args, this.Attributes); + this.Attributes = new UserSuppliedAttributes(tok, openBrace, closeBrace, args, this.Attributes); } } diff --git a/Source/Dafny/Parser.cs b/Source/Dafny/Parser.cs index f282832cc9f..c018d81c233 100644 --- a/Source/Dafny/Parser.cs +++ b/Source/Dafny/Parser.cs @@ -93,22 +93,23 @@ public class Parser { public const int _ensures = 71; public const int _ghost = 72; public const int _witness = 73; - public const int _lbrace = 74; - public const int _rbrace = 75; - public const int _lbracket = 76; - public const int _rbracket = 77; - public const int _openparen = 78; - public const int _closeparen = 79; - public const int _openAngleBracket = 80; - public const int _closeAngleBracket = 81; - public const int _eq = 82; - public const int _neq = 83; - public const int _neqAlt = 84; - public const int _star = 85; - public const int _notIn = 86; - public const int _ellipsis = 87; - public const int _reveal = 88; - public const int maxT = 155; + public const int _lbracecolon = 74; + public const int _lbrace = 75; + public const int _rbrace = 76; + public const int _lbracket = 77; + public const int _rbracket = 78; + public const int _openparen = 79; + public const int _closeparen = 80; + public const int _openAngleBracket = 81; + public const int _closeAngleBracket = 82; + public const int _eq = 83; + public const int _neq = 84; + public const int _neqAlt = 85; + public const int _star = 86; + public const int _notIn = 87; + public const int _ellipsis = 88; + public const int _reveal = 89; + public const int maxT = 156; const bool _T = true; const bool _x = false; @@ -294,11 +295,6 @@ public Parser(Scanner/*!*/ scanner, Errors/*!*/ errors, Include include, ModuleD theVerifyThisFile = verifyThisFile; } -bool IsAttribute() { - IToken x = scanner.Peek(); - return la.kind == _lbrace && x.kind == _colon; -} - bool IsLabel(bool allowLabel) { if (!allowLabel) { return false; @@ -327,18 +323,15 @@ bool IsGets() { // an existential guard starts with an identifier and is then followed by // * a colon (if the first identifier is given an explicit type), -// * a comma (if there's a list a bound variables and the first one is not given an explicit type), +// * a comma (if there's a list of bound variables and the first one is not given an explicit type), // * a start-attribute (if there's one bound variable and it is not given an explicit type and there are attributes), or // * a bored smiley (if there's one bound variable and it is not given an explicit type). bool IsExistentialGuard() { scanner.ResetPeek(); if (la.kind == _ident) { Token x = scanner.Peek(); - if (x.kind == _colon || x.kind == _comma || x.kind == _boredSmiley) { + if (x.kind == _colon || x.kind == _comma || x.kind == _boredSmiley || x.kind == _lbracecolon) { return true; - } else if (x.kind == _lbrace) { - x = scanner.Peek(); - return x.kind == _colon; } } return false; @@ -825,7 +818,7 @@ void Dafny() { // theModule should be a DefaultModuleDecl (actually, the singular DefaultModuleDecl) Contract.Assert(defaultModule != null); - while (la.kind == 89) { + while (la.kind == 90) { Get(); Expect(24); { @@ -870,7 +863,7 @@ void TopDecl(ModuleDefinition module, List membersDefaultClass, DeclModifier(ref dmod); } switch (la.kind) { - case 54: case 55: case 91: { + case 54: case 55: case 92: { SubModuleDecl(dmod, module, out submodule); var litmod = submodule as LiteralModuleDecl; if (litmod != null && litmod.ModuleDef.PrefixIds.Count != 0) { @@ -911,17 +904,17 @@ void TopDecl(ModuleDefinition module, List membersDefaultClass, module.TopLevelDecls.Add(trait); break; } - case 46: case 47: case 48: case 49: case 50: case 51: case 60: case 61: case 65: case 66: case 67: case 104: { + case 46: case 47: case 48: case 49: case 50: case 51: case 60: case 61: case 65: case 66: case 67: case 105: { ClassMemberDecl(dmod, membersDefaultClass, false, true, !DafnyOptions.O.AllowGlobals, !isTopLevel && DafnyOptions.O.IronDafny && isAbstract); break; } - default: SynErr(156); break; + default: SynErr(157); break; } } void DeclModifier(ref DeclModifierData dmod) { - if (la.kind == 90) { + if (la.kind == 91) { Get(); dmod.IsAbstract = true; CheckAndSetToken(ref dmod.AbstractToken); } else if (la.kind == 72) { @@ -933,7 +926,7 @@ void DeclModifier(ref DeclModifierData dmod) { } else if (la.kind == 53) { Get(); dmod.IsProtected = true; CheckAndSetToken(ref dmod.ProtectedToken); - } else SynErr(157); + } else SynErr(158); } void SubModuleDecl(DeclModifierData dmod, ModuleDefinition parent, out ModuleDecl submodule) { @@ -948,7 +941,7 @@ void SubModuleDecl(DeclModifierData dmod, ModuleDefinition parent, out ModuleDec bool opened = false; CheckDeclModifiers(dmod, "Modules", AllowedDeclModifiers.Abstract | AllowedDeclModifiers.Protected); - if (la.kind == 91) { + if (la.kind == 92) { Get(); while (la.kind == 74) { Attribute(ref attrs); @@ -959,23 +952,23 @@ void SubModuleDecl(DeclModifierData dmod, ModuleDefinition parent, out ModuleDec Get(); NoUSIdent(out id); } - if (la.kind == 92) { + if (la.kind == 93) { Get(); ModuleName(out idRefined); } module = new ModuleDefinition(id, id.val, prefixIds, isAbstract, isProtected, false, idRefined, parent, attrs, false); module.IsToBeVerified = theVerifyThisFile; - Expect(74); + Expect(75); module.BodyStartTok = t; while (StartOf(1)) { TopDecl(module, namedModuleDefaultClassMembers, /* isTopLevel */ false, isAbstract); } - Expect(75); + Expect(76); module.BodyEndTok = t; module.TopLevelDecls.Add(new DefaultClassDecl(module, namedModuleDefaultClassMembers)); submodule = new LiteralModuleDecl(module, parent); } else if (la.kind == 54) { Get(); - if (la.kind == 93) { + if (la.kind == 94) { Get(); opened = true; } @@ -990,7 +983,7 @@ void SubModuleDecl(DeclModifierData dmod, ModuleDefinition parent, out ModuleDec idPath.Insert(0, id); submodule = new AliasModuleDecl(idPath, id, parent, opened, idExports); - } else if (la.kind == 94) { + } else if (la.kind == 95) { Get(); QualifiedModuleExport(out idPath, out idExports); submodule = new AliasModuleDecl(idPath, id, parent, opened, idExports); @@ -998,9 +991,9 @@ void SubModuleDecl(DeclModifierData dmod, ModuleDefinition parent, out ModuleDec Get(); QualifiedModuleExport(out idPath, out idExports); submodule = new ModuleFacadeDecl(idPath, id, parent, opened, idExports); - } else SynErr(158); + } else SynErr(159); if (la.kind == 34) { - while (!(la.kind == 0 || la.kind == 34)) {SynErr(159); Get();} + while (!(la.kind == 0 || la.kind == 34)) {SynErr(160); Get();} Get(); errors.Deprecated(t, "the semi-colon that used to terminate a sub-module declaration has been deprecated; in the new syntax, just leave off the semi-colon"); } @@ -1018,8 +1011,8 @@ void SubModuleDecl(DeclModifierData dmod, ModuleDefinition parent, out ModuleDec if (la.kind == 1 || la.kind == 2) { ExportIdent(out exportId); } - while (la.kind == 95 || la.kind == 96 || la.kind == 97) { - if (la.kind == 95) { + while (la.kind == 96 || la.kind == 97 || la.kind == 98) { + if (la.kind == 96) { Get(); if (la.kind == 1 || la.kind == 2) { ModuleExportSignature(true, out exsig); @@ -1029,11 +1022,11 @@ void SubModuleDecl(DeclModifierData dmod, ModuleDefinition parent, out ModuleDec ModuleExportSignature(true, out exsig); exports.Add(exsig); } - } else if (la.kind == 85) { + } else if (la.kind == 86) { Get(); provideAll = true; - } else SynErr(160); - } else if (la.kind == 96) { + } else SynErr(161); + } else if (la.kind == 97) { Get(); if (la.kind == 1 || la.kind == 2) { ModuleExportSignature(false, out exsig); @@ -1043,10 +1036,10 @@ void SubModuleDecl(DeclModifierData dmod, ModuleDefinition parent, out ModuleDec ModuleExportSignature(false, out exsig); exports.Add(exsig); } - } else if (la.kind == 85) { + } else if (la.kind == 86) { Get(); revealAll = true; - } else SynErr(161); + } else SynErr(162); } else { Get(); ExportIdent(out id); @@ -1063,7 +1056,7 @@ void SubModuleDecl(DeclModifierData dmod, ModuleDefinition parent, out ModuleDec } submodule = new ModuleExportDecl(exportId, parent, exports, extends, provideAll, revealAll, isDefault); - } else SynErr(162); + } else SynErr(163); } void ClassDecl(DeclModifierData dmodClass, ModuleDefinition/*!*/ module, out ClassDecl/*!*/ c) { @@ -1079,16 +1072,16 @@ void ClassDecl(DeclModifierData dmodClass, ModuleDefinition/*!*/ module, out Cla CheckDeclModifiers(dmodClass, "Classes", AllowedDeclModifiers.None); DeclModifierData dmod; - while (!(la.kind == 0 || la.kind == 56)) {SynErr(163); Get();} + while (!(la.kind == 0 || la.kind == 56)) {SynErr(164); Get();} Expect(56); while (la.kind == 74) { Attribute(ref attrs); } NoUSIdent(out id); - if (la.kind == 80) { + if (la.kind == 81) { GenericParameters(typeArgs, true); } - if (la.kind == 97) { + if (la.kind == 98) { Get(); Type(out trait); traits.Add(trait); @@ -1098,7 +1091,7 @@ void ClassDecl(DeclModifierData dmodClass, ModuleDefinition/*!*/ module, out Cla traits.Add(trait); } } - Expect(74); + Expect(75); bodyStart = t; while (StartOf(4)) { dmod = new DeclModifierData(); @@ -1107,7 +1100,7 @@ void ClassDecl(DeclModifierData dmodClass, ModuleDefinition/*!*/ module, out Cla } ClassMemberDecl(dmod, members, true, false, false, false); } - Expect(75); + Expect(76); c = new ClassDecl(id, id.val, module, typeArgs, members, attrs, traits); c.BodyStartTok = bodyStart; c.BodyEndTok = t; @@ -1126,21 +1119,21 @@ void DatatypeDecl(DeclModifierData dmod, ModuleDefinition/*!*/ module, out Datat CheckDeclModifiers(dmod, "Datatypes or codatatypes", AllowedDeclModifiers.None); var members = new List(); - while (!(la.kind == 0 || la.kind == 58 || la.kind == 59)) {SynErr(164); Get();} + while (!(la.kind == 0 || la.kind == 58 || la.kind == 59)) {SynErr(165); Get();} if (la.kind == 58) { Get(); } else if (la.kind == 59) { Get(); co = true; - } else SynErr(165); + } else SynErr(166); while (la.kind == 74) { Attribute(ref attrs); } NoUSIdent(out id); - if (la.kind == 80) { + if (la.kind == 81) { GenericParameters(typeArgs, true); } - Expect(94); + Expect(95); bodyStart = t; if (la.kind == 27) { Get(); @@ -1150,7 +1143,7 @@ void DatatypeDecl(DeclModifierData dmod, ModuleDefinition/*!*/ module, out Datat Get(); DatatypeMemberDecl(ctors); } - if (la.kind == 74) { + if (la.kind == 75) { TypeMembers(module, members); } if (co) { @@ -1179,7 +1172,7 @@ void NewtypeDecl(DeclModifierData dmod, ModuleDefinition module, out TopLevelDec Attribute(ref attrs); } NoUSIdent(out id); - Expect(94); + Expect(95); if (IsIdentColonOrBar()) { NoUSIdent(out bvId); if (la.kind == 25) { @@ -1197,7 +1190,7 @@ void NewtypeDecl(DeclModifierData dmod, ModuleDefinition module, out TopLevelDec Expect(73); Expression(out witness, false, true); } - if (la.kind == 74) { + if (la.kind == 75) { TypeMembers(module, members); } var witnessKind = witness == null ? SubsetTypeDecl.WKind.None : @@ -1205,11 +1198,11 @@ void NewtypeDecl(DeclModifierData dmod, ModuleDefinition module, out TopLevelDec td = new NewtypeDecl(id, id.val, module, new BoundVar(bvId, bvId.val, baseType), constraint, witnessKind, witness, members, attrs); } else if (StartOf(5)) { Type(out baseType); - if (la.kind == 74) { + if (la.kind == 75) { TypeMembers(module, members); } td = new NewtypeDecl(id, id.val, module, baseType, members, attrs); - } else SynErr(166); + } else SynErr(167); } void OtherTypeDecl(DeclModifierData dmod, ModuleDefinition module, out TopLevelDecl td) { @@ -1229,13 +1222,13 @@ void OtherTypeDecl(DeclModifierData dmod, ModuleDefinition module, out TopLevelD Attribute(ref attrs); } NoUSIdent(out id); - while (la.kind == 78) { + while (la.kind == 79) { TypeParameterCharacteristics(ref characteristics); } - if (la.kind == 80) { + if (la.kind == 81) { GenericParameters(typeArgs, true); } - if (la.kind == 94) { + if (la.kind == 95) { Get(); if (IsIdentColonOrBar()) { NoUSIdent(out bvId); @@ -1264,7 +1257,7 @@ void OtherTypeDecl(DeclModifierData dmod, ModuleDefinition module, out TopLevelD td = new TypeSynonymDecl(id, id.val, characteristics, typeArgs, module, ty, attrs); kind = "Type synonym"; - } else SynErr(167); + } else SynErr(168); } if (td == null) { if (module is DefaultModuleDecl) { @@ -1276,7 +1269,7 @@ void OtherTypeDecl(DeclModifierData dmod, ModuleDefinition module, out TopLevelD CheckDeclModifiers(dmod, kind, AllowedDeclModifiers.None); if (la.kind == 34) { - while (!(la.kind == 0 || la.kind == 34)) {SynErr(168); Get();} + while (!(la.kind == 0 || la.kind == 34)) {SynErr(169); Get();} Get(); errors.Deprecated(t, "the semi-colon that used to terminate an opaque-type declaration has been deprecated; in the new syntax, just leave off the semi-colon"); } @@ -1306,19 +1299,19 @@ void IteratorDecl(DeclModifierData dmod, ModuleDefinition module, out IteratorDe IToken bodyEnd = Token.NoToken; CheckDeclModifiers(dmod, "Iterators", AllowedDeclModifiers.None); - while (!(la.kind == 0 || la.kind == 64)) {SynErr(169); Get();} + while (!(la.kind == 0 || la.kind == 64)) {SynErr(170); Get();} Expect(64); while (la.kind == 74) { Attribute(ref attrs); } NoUSIdent(out id); - if (la.kind == 78 || la.kind == 80) { - if (la.kind == 80) { + if (la.kind == 79 || la.kind == 81) { + if (la.kind == 81) { GenericParameters(typeArgs, true); } Formals(true, true, false, ins); - if (la.kind == 99 || la.kind == 100) { - if (la.kind == 99) { + if (la.kind == 100 || la.kind == 101) { + if (la.kind == 100) { Get(); } else { Get(); @@ -1326,14 +1319,14 @@ void IteratorDecl(DeclModifierData dmod, ModuleDefinition module, out IteratorDe } Formals(false, true, false, outs); } - } else if (la.kind == 87) { + } else if (la.kind == 88) { Get(); signatureEllipsis = t; - } else SynErr(170); + } else SynErr(171); while (StartOf(6)) { IteratorSpec(reads, mod, decreases, req, ens, yieldReq, yieldEns, ref readsAttrs, ref modAttrs, ref decrAttrs); } - if (la.kind == 74) { + if (la.kind == 75) { BlockStmt(out body, out bodyStart, out bodyEnd); } iter = new IteratorDecl(id, id.val, module, typeArgs, ins, outs, @@ -1358,16 +1351,16 @@ void TraitDecl(DeclModifierData dmodIn, ModuleDefinition/*!*/ module, out TraitD IToken bodyStart; DeclModifierData dmod; - while (!(la.kind == 0 || la.kind == 57)) {SynErr(171); Get();} + while (!(la.kind == 0 || la.kind == 57)) {SynErr(172); Get();} Expect(57); while (la.kind == 74) { Attribute(ref attrs); } NoUSIdent(out id); - if (la.kind == 80) { + if (la.kind == 81) { GenericParameters(typeArgs, true); } - Expect(74); + Expect(75); bodyStart = t; while (StartOf(4)) { dmod = new DeclModifierData(); @@ -1376,7 +1369,7 @@ void TraitDecl(DeclModifierData dmodIn, ModuleDefinition/*!*/ module, out TraitD } ClassMemberDecl(dmod, members, true, false, false, false); } - Expect(75); + Expect(76); trait = new TraitDecl(id, id.val, module, typeArgs, members, attrs); trait.BodyStartTok = bodyStart; trait.BodyEndTok = t; @@ -1413,26 +1406,24 @@ void ClassMemberDecl(DeclModifierData dmod, List mm, bool allowConst MethodDecl(dmod, allowConstructors, isWithinAbstractModule, out m); mm.Add(m); - } else SynErr(172); + } else SynErr(173); } void Attribute(ref Attributes attrs) { - IToken openBrace, colon, closeBrace; + IToken openBrace, closeBrace; IToken x = null; var args = new List(); Expect(74); openBrace = t; - Expect(25); - colon = t; ConvertKeywordTokenToIdent(); NoUSIdent(out x); if (StartOf(8)) { Expressions(args); } - Expect(75); + Expect(76); closeBrace = t; - attrs = new UserSuppliedAttributes(x, openBrace, colon, closeBrace, args, attrs); + attrs = new UserSuppliedAttributes(x, openBrace, closeBrace, args, attrs); } void NoUSIdent(out IToken/*!*/ x) { @@ -1465,7 +1456,7 @@ void QualifiedModuleExportSuffix(List ids, List exports) { if (la.kind == 1 || la.kind == 2) { ExportIdent(out id); exports.Add(id); - } else if (la.kind == 74) { + } else if (la.kind == 75) { Get(); ExportIdent(out id); exports.Add(id); @@ -1474,9 +1465,9 @@ void QualifiedModuleExportSuffix(List ids, List exports) { ExportIdent(out id); exports.Add(id); } - Expect(75); - } else SynErr(173); - } else SynErr(174); + Expect(76); + } else SynErr(174); + } else SynErr(175); } void QualifiedModuleExport(out List ids, out List exports) { @@ -1518,7 +1509,7 @@ void TypeNameOrCtorSuffix(out IToken id) { } else if (la.kind == 2) { Get(); id = t; - } else SynErr(175); + } else SynErr(176); } void Ident(out IToken/*!*/ x) { @@ -1534,13 +1525,13 @@ void GenericParameters(List/*!*/ typeArgs, bool allowVarianc TypeParameter.TPVarianceSyntax variance = TypeParameter.TPVarianceSyntax.NonVariant_Strict; // assignment is to please compiler characteristics = new TypeParameter.TypeParameterCharacteristics(false); - Expect(80); + Expect(81); if (StartOf(9)) { Variance(out variance); if (!allowVariance) { SemErr(t, "type-parameter variance is not allowed to be specified in this context"); } } NoUSIdent(out id); - while (la.kind == 78) { + while (la.kind == 79) { TypeParameterCharacteristics(ref characteristics); } typeArgs.Add(new TypeParameter(id, id.val, variance, characteristics)); @@ -1554,12 +1545,12 @@ void GenericParameters(List/*!*/ typeArgs, bool allowVarianc if (!allowVariance) { SemErr(t, "type-parameter variance is not allowed to be specified in this context"); } } NoUSIdent(out id); - while (la.kind == 78) { + while (la.kind == 79) { TypeParameterCharacteristics(ref characteristics); } typeArgs.Add(new TypeParameter(id, id.val, variance, characteristics)); } - Expect(81); + Expect(82); } void Type(out Type ty) { @@ -1577,7 +1568,7 @@ void FieldDecl(DeclModifierData dmod, bool isValueType, List mm) { mm = new List(); } - while (!(la.kind == 0 || la.kind == 60)) {SynErr(176); Get();} + while (!(la.kind == 0 || la.kind == 60)) {SynErr(177); Get();} Expect(60); if (isValueType) { SemErr(t, "mutable fields are now allowed in value types"); @@ -1607,7 +1598,7 @@ void ConstantFieldDecl(DeclModifierData dmod, List/*!*/ mm, boo } CheckDeclModifiers(dmod, "Fields", AllowedDeclModifiers.Ghost | AllowedDeclModifiers.Static); - while (!(la.kind == 0 || la.kind == 61)) {SynErr(177); Get();} + while (!(la.kind == 0 || la.kind == 61)) {SynErr(178); Get();} Expect(61); while (la.kind == 74) { Attribute(ref attrs); @@ -1672,14 +1663,14 @@ void FunctionDecl(DeclModifierData dmod, bool isWithinAbstractModule, out Functi Attribute(ref attrs); } FuMe_Ident(out id); - if (la.kind == 78 || la.kind == 80) { - if (la.kind == 80) { + if (la.kind == 79 || la.kind == 81) { + if (la.kind == 81) { GenericParameters(typeArgs, false); } Formals(true, isFunctionMethod, isTwoState, formals); Expect(25); if (FollowedByColon()) { - Expect(78); + Expect(79); IToken resultId; Type ty; bool isGhost; @@ -1689,14 +1680,14 @@ void FunctionDecl(DeclModifierData dmod, bool isWithinAbstractModule, out Functi Contract.Assert(!isGhost && !isOld); result = new Formal(resultId, resultId.val, ty, false, false, false); - Expect(79); + Expect(80); } else if (StartOf(5)) { Type(out returnType); - } else SynErr(178); - } else if (la.kind == 87) { + } else SynErr(179); + } else if (la.kind == 88) { Get(); signatureEllipsis = t; - } else SynErr(179); + } else SynErr(180); } else if (la.kind == 47) { Get(); isPredicate = true; @@ -1719,11 +1710,11 @@ void FunctionDecl(DeclModifierData dmod, bool isWithinAbstractModule, out Functi } NoUSIdent(out id); if (StartOf(10)) { - if (la.kind == 80) { + if (la.kind == 81) { GenericParameters(typeArgs, false); } missingOpenParen = true; - if (la.kind == 78) { + if (la.kind == 79) { Formals(true, isFunctionMethod, isTwoState, formals); missingOpenParen = false; } @@ -1732,10 +1723,10 @@ void FunctionDecl(DeclModifierData dmod, bool isWithinAbstractModule, out Functi Get(); SemErr(t, "predicates do not have an explicitly declared return type; it is always bool"); } - } else if (la.kind == 87) { + } else if (la.kind == 88) { Get(); signatureEllipsis = t; - } else SynErr(180); + } else SynErr(181); } else if (la.kind == 48) { Contract.Assert(!isTwoState); // the IsFunctionDecl check checks that "twostate" is not followed by "inductive" @@ -1749,11 +1740,11 @@ void FunctionDecl(DeclModifierData dmod, bool isWithinAbstractModule, out Functi Attribute(ref attrs); } FuMe_Ident(out id); - if (la.kind == 76 || la.kind == 78 || la.kind == 80) { - if (la.kind == 80) { + if (la.kind == 77 || la.kind == 79 || la.kind == 81) { + if (la.kind == 81) { GenericParameters(typeArgs, false); } - if (la.kind == 76) { + if (la.kind == 77) { KType(ref kType); } Formals(true, isFunctionMethod, false, formals); @@ -1761,10 +1752,10 @@ void FunctionDecl(DeclModifierData dmod, bool isWithinAbstractModule, out Functi Get(); SemErr(t, "inductive predicates do not have an explicitly declared return type; it is always bool"); } - } else if (la.kind == 87) { + } else if (la.kind == 88) { Get(); signatureEllipsis = t; - } else SynErr(181); + } else SynErr(182); } else if (la.kind == 50) { Contract.Assert(!isTwoState); // the IsFunctionDecl check checks that "twostate" is not followed by "copredicate" @@ -1777,11 +1768,11 @@ void FunctionDecl(DeclModifierData dmod, bool isWithinAbstractModule, out Functi Attribute(ref attrs); } NoUSIdent(out id); - if (la.kind == 76 || la.kind == 78 || la.kind == 80) { - if (la.kind == 80) { + if (la.kind == 77 || la.kind == 79 || la.kind == 81) { + if (la.kind == 81) { GenericParameters(typeArgs, false); } - if (la.kind == 76) { + if (la.kind == 77) { KType(ref kType); } Formals(true, isFunctionMethod, false, formals); @@ -1789,16 +1780,16 @@ void FunctionDecl(DeclModifierData dmod, bool isWithinAbstractModule, out Functi Get(); SemErr(t, "copredicates do not have an explicitly declared return type; it is always bool"); } - } else if (la.kind == 87) { + } else if (la.kind == 88) { Get(); signatureEllipsis = t; - } else SynErr(182); - } else SynErr(183); + } else SynErr(183); + } else SynErr(184); decreases = isIndPredicate || isCoPredicate ? null : new List(); while (StartOf(11)) { FunctionSpec(reqs, reads, ens, decreases); } - if (la.kind == 74) { + if (la.kind == 75) { FunctionBody(out body, out bodyStart, out bodyEnd); } if (!isWithinAbstractModule && DafnyOptions.O.DisallowSoundnessCheating && body == null && ens.Count > 0 && @@ -1863,7 +1854,7 @@ void MethodDecl(DeclModifierData dmod, bool allowConstructor, bool isWithinAbstr string caption = ""; FixpointPredicate.KType kType = FixpointPredicate.KType.Unspecified; - while (!(StartOf(12))) {SynErr(184); Get();} + while (!(StartOf(12))) {SynErr(185); Get();} switch (la.kind) { case 65: { Get(); @@ -1885,7 +1876,7 @@ void MethodDecl(DeclModifierData dmod, bool allowConstructor, bool isWithinAbstr | AllowedDeclModifiers.Protected; break; } - case 104: { + case 105: { Get(); isCoLemma = true; caption = "Comethods"; allowed = AllowedDeclModifiers.AlreadyGhost | AllowedDeclModifiers.Static @@ -1921,7 +1912,7 @@ void MethodDecl(DeclModifierData dmod, bool allowConstructor, bool isWithinAbstr break; } - default: SynErr(185); break; + default: SynErr(186); break; } keywordToken = t; CheckDeclModifiers(dmod, caption, allowed); @@ -1939,29 +1930,29 @@ void MethodDecl(DeclModifierData dmod, bool allowConstructor, bool isWithinAbstr } } - if (la.kind == 76 || la.kind == 78 || la.kind == 80) { - if (la.kind == 80) { + if (la.kind == 77 || la.kind == 79 || la.kind == 81) { + if (la.kind == 81) { GenericParameters(typeArgs, false); } - if (la.kind == 76) { + if (la.kind == 77) { KType(ref kType); if (!(isCoLemma || isIndLemma)) { SemErr(t, "type of _k can only be specified for inductive lemmas and co-lemmas"); } } var isCompilable = (isPlainOlMethod && !dmod.IsGhost) || isConstructor; Formals(true, isCompilable, isTwoStateLemma, ins); - if (la.kind == 100) { + if (la.kind == 101) { Get(); if (isConstructor) { SemErr(t, "constructors cannot have out-parameters"); } Formals(false, isCompilable, false, outs); } - } else if (la.kind == 87) { + } else if (la.kind == 88) { Get(); signatureEllipsis = t; - } else SynErr(186); + } else SynErr(187); while (StartOf(13)) { MethodSpec(req, mod, ens, dec, ref decAttrs, ref modAttrs, caption, isConstructor); } - if (la.kind == 74) { + if (la.kind == 75) { if (isConstructor) { DividedBlockStmt dividedBody; DividedBlockStmt(out dividedBody, out bodyStart, out bodyEnd); @@ -2010,7 +2001,7 @@ void DatatypeMemberDecl(List/*!*/ ctors) { Attribute(ref attrs); } NoUSIdent(out id); - if (la.kind == 78) { + if (la.kind == 79) { FormalsOptionalIds(formals); } ctors.Add(new DatatypeCtor(id, id.val, formals, attrs)); @@ -2019,7 +2010,7 @@ void DatatypeMemberDecl(List/*!*/ ctors) { void TypeMembers(ModuleDefinition/*!*/ module, List members ) { DeclModifierData dmod; - Expect(74); + Expect(75); while (StartOf(4)) { dmod = new DeclModifierData(); while (StartOf(2)) { @@ -2027,12 +2018,12 @@ void TypeMembers(ModuleDefinition/*!*/ module, List members ) { } ClassMemberDecl(dmod, members, false, true, false, module.IsAbstract); } - Expect(75); + Expect(76); } void FormalsOptionalIds(List/*!*/ formals) { Contract.Requires(cce.NonNullElements(formals)); IToken/*!*/ id; Type/*!*/ ty; string/*!*/ name; bool isGhost; - Expect(78); + Expect(79); if (StartOf(14)) { TypeIdentOptional(out id, out name, out ty, out isGhost); formals.Add(new Formal(id, name, ty, true, isGhost)); @@ -2042,7 +2033,7 @@ void FormalsOptionalIds(List/*!*/ formals) { formals.Add(new Formal(id, name, ty, true, isGhost)); } } - Expect(79); + Expect(80); } void FIdentType(out IToken/*!*/ id, out Type/*!*/ ty) { @@ -2054,14 +2045,14 @@ void FIdentType(out IToken/*!*/ id, out Type/*!*/ ty) { } else if (la.kind == 2) { Get(); id = t; - } else SynErr(187); + } else SynErr(188); Expect(25); Type(out ty); } void OldSemi() { if (la.kind == 34) { - while (!(la.kind == 0 || la.kind == 34)) {SynErr(188); Get();} + while (!(la.kind == 0 || la.kind == 34)) {SynErr(189); Get();} Get(); errors.DeprecatedStyle(t, "deprecated style: a semi-colon is not needed here"); } @@ -2077,7 +2068,7 @@ void CIdentType(out IToken/*!*/ id, out Type ty) { } else if (la.kind == 2) { Get(); id = t; - } else SynErr(189); + } else SynErr(190); if (la.kind == 25) { Get(); Type(out ty); @@ -2099,20 +2090,20 @@ void Expression(out Expression e, bool allowSemi, bool allowLambda, bool allowBi } void TypeParameterCharacteristics(ref TypeParameter.TypeParameterCharacteristics characteristics) { - Expect(78); + Expect(79); TPCharOption(ref characteristics); while (la.kind == 26) { Get(); TPCharOption(ref characteristics); } - Expect(79); + Expect(80); } void GIdentType(bool allowGhostKeyword, bool allowNewKeyword, out IToken/*!*/ id, out Type/*!*/ ty, out bool isGhost, out bool isOld) { Contract.Ensures(Contract.ValueAtReturn(out id)!=null); Contract.Ensures(Contract.ValueAtReturn(out ty)!=null); isGhost = false; isOld = allowNewKeyword; - while (la.kind == 72 || la.kind == 98) { + while (la.kind == 72 || la.kind == 99) { if (la.kind == 72) { Get(); if (allowGhostKeyword) { isGhost = true; } else { SemErr(t, "formal cannot be declared 'ghost' in this context"); } @@ -2191,7 +2182,7 @@ void TypeIdentOptional(out IToken/*!*/ id, out string/*!*/ identName, out Type/* id = t; name = id.val; Expect(25); Type(out ty); - } else SynErr(190); + } else SynErr(191); if (name != null) { identName = name; } else { @@ -2354,7 +2345,7 @@ void TypeAndToken(out IToken tok, out Type ty, bool inExpressionContext) { break; } - case 78: { + case 79: { Get(); tok = t; tupleArgTypes = new List(); if (StartOf(5)) { @@ -2366,7 +2357,7 @@ void TypeAndToken(out IToken tok, out Type ty, bool inExpressionContext) { tupleArgTypes.Add(ty); } } - Expect(79); + Expect(80); if (tupleArgTypes.Count == 1) { // just return the type 'ty' } else { @@ -2391,16 +2382,16 @@ void TypeAndToken(out IToken tok, out Type ty, bool inExpressionContext) { ty = new UserDefinedType(e.tok, e); break; } - default: SynErr(191); break; + default: SynErr(192); break; } - if (la.kind == 107 || la.kind == 108 || la.kind == 109) { + if (la.kind == 108 || la.kind == 109 || la.kind == 110) { int arrowKind = 0; /* 0: any, 1: partial, 2: total */ Type t2; - if (la.kind == 107) { + if (la.kind == 108) { Get(); tok = t; arrowKind = 0; - } else if (la.kind == 108) { + } else if (la.kind == 109) { Get(); tok = t; arrowKind = 1; } else { @@ -2436,8 +2427,8 @@ void Formals(bool incoming, bool allowGhostKeyword, bool allowNewKeyword, List/*!*/ reads, List/*!*/ mod, List decreases, @@ -2456,10 +2447,10 @@ void IteratorSpec(List/*!*/ reads, List/*!*/ reads, List/*!*/ reads, List/*!*/ reads, List/*!*/ reads, List body = new List(); - Expect(74); + Expect(75); bodyStart = t; while (StartOf(17)) { Stmt(body); } - Expect(75); + Expect(76); bodyEnd = t; block = new BlockStmt(bodyStart, bodyEnd, body); } @@ -2550,23 +2541,23 @@ void BlockStmt(out BlockStmt/*!*/ block, out IToken bodyStart, out IToken bodyEn void Variance(out TypeParameter.TPVarianceSyntax variance) { variance = TypeParameter.TPVarianceSyntax.NonVariant_Strict; // never used; here just to please the C# compiler - if (la.kind == 85) { + if (la.kind == 86) { Get(); variance = TypeParameter.TPVarianceSyntax.Covariant_Permissive; - } else if (la.kind == 101) { + } else if (la.kind == 102) { Get(); variance = TypeParameter.TPVarianceSyntax.Covariant_Strict; - } else if (la.kind == 102) { + } else if (la.kind == 103) { Get(); variance = TypeParameter.TPVarianceSyntax.NonVariant_Permissive; - } else if (la.kind == 103) { + } else if (la.kind == 104) { Get(); variance = TypeParameter.TPVarianceSyntax.Contravariance; - } else SynErr(195); + } else SynErr(196); } void TPCharOption(ref TypeParameter.TypeParameterCharacteristics characteristics) { - if (la.kind == 82) { + if (la.kind == 83) { Get(); characteristics.EqualitySupport = TypeParameter.EqualitySupportValue.Required; } else if (la.kind == 2) { @@ -2577,11 +2568,11 @@ void TPCharOption(ref TypeParameter.TypeParameterCharacteristics characteristics SemErr(t, "unexpected TPCharOption"); } - } else if (la.kind == 102) { + } else if (la.kind == 103) { Get(); - Expect(98); + Expect(99); characteristics.DisallowReferenceTypes = true; - } else SynErr(196); + } else SynErr(197); } void FuMe_Ident(out IToken id) { @@ -2591,19 +2582,19 @@ void FuMe_Ident(out IToken id) { } else if (la.kind == 2) { Get(); id = t; - } else SynErr(197); + } else SynErr(198); } void KType(ref FixpointPredicate.KType kType) { - Expect(76); + Expect(77); if (la.kind == 11) { Get(); kType = FixpointPredicate.KType.Nat; } else if (la.kind == 13) { Get(); kType = FixpointPredicate.KType.ORDINAL; - } else SynErr(198); - Expect(77); + } else SynErr(199); + Expect(78); } void MethodSpec(List req, List mod, List ens, @@ -2615,10 +2606,10 @@ void MethodSpec(List req, List mod, List req, List mod, List req, List mod, List req, List mod, List bodyProper = new List(); - Expect(74); + Expect(75); bodyStart = t; while (StartOf(17)) { Stmt(bodyInit); } - if (la.kind == 98) { + if (la.kind == 99) { Get(); separatorTok = t; Expect(34); @@ -2686,7 +2677,7 @@ void DividedBlockStmt(out DividedBlockStmt body, out IToken bodyStart, out IToke Stmt(bodyProper); } } - Expect(75); + Expect(76); bodyEnd = t; body = new DividedBlockStmt(bodyStart, bodyEnd, bodyInit, separatorTok, bodyProper); } @@ -2712,7 +2703,7 @@ void FrameExpression(out FrameExpression fe, bool allowSemi, bool allowLambda) { Ident(out id); fieldName = id.val; fe = new FrameExpression(id, new ImplicitThisExpr(id), fieldName); - } else SynErr(202); + } else SynErr(203); } void LabelIdent(out IToken id) { @@ -2722,7 +2713,7 @@ void LabelIdent(out IToken id) { } else if (la.kind == 2) { Get(); id = t; - } else SynErr(203); + } else SynErr(204); } void DecreasesList(List decreases, bool allowWildcard, bool allowLambda) { @@ -2764,7 +2755,7 @@ void NameSegmentForTypeName(out Expression e, bool inExpressionContext) { void GenericInstantiation(List gt) { Contract.Requires(cce.NonNullElements(gt)); Type/*!*/ ty; - Expect(80); + Expect(81); Type(out ty); gt.Add(ty); while (la.kind == 26) { @@ -2772,7 +2763,7 @@ void GenericInstantiation(List gt) { Type(out ty); gt.Add(ty); } - Expect(81); + Expect(82); } void FunctionSpec(List/*!*/ reqs, List/*!*/ reads, List/*!*/ ens, List decreases) { @@ -2781,10 +2772,10 @@ void FunctionSpec(List/*!*/ reqs, List/*!*/ reqs, List/*!*/ reqs, List/*!*/ ss) { @@ -2864,14 +2855,14 @@ void OneStmt(out Statement/*!*/ s) { IToken bodyStart, bodyEnd; int breakCount; - while (!(StartOf(21))) {SynErr(208); Get();} + while (!(StartOf(21))) {SynErr(209); Get();} switch (la.kind) { - case 74: { + case 75: { BlockStmt(out bs, out bodyStart, out bodyEnd); s = bs; break; } - case 117: { + case 118: { AssertStmt(out s, false); break; } @@ -2879,15 +2870,15 @@ void OneStmt(out Statement/*!*/ s) { AssumeStmt(out s); break; } - case 118: { + case 119: { PrintStmt(out s); break; } - case 88: { + case 89: { RevealStmt(out s); break; } - case 1: case 2: case 3: case 4: case 10: case 12: case 23: case 24: case 27: case 78: case 145: case 146: case 147: case 148: case 149: case 150: case 151: case 153: { + case 1: case 2: case 3: case 4: case 10: case 12: case 23: case 24: case 27: case 79: case 146: case 147: case 148: case 149: case 150: case 151: case 152: case 154: { UpdateStmt(out s); break; } @@ -2895,19 +2886,19 @@ void OneStmt(out Statement/*!*/ s) { VarDeclStatement(out s); break; } - case 114: { + case 115: { IfStmt(out s); break; } - case 115: { + case 116: { WhileStmt(out s); break; } - case 116: { + case 117: { MatchStmt(out s); break; } - case 119: case 120: { + case 120: case 121: { ForallStmt(out s); break; } @@ -2915,11 +2906,11 @@ void OneStmt(out Statement/*!*/ s) { CalcStmt(out s); break; } - case 121: { + case 122: { ModifyStmt(out s); break; } - case 110: { + case 111: { Get(); LabelIdent(out id); Expect(25); @@ -2927,32 +2918,32 @@ void OneStmt(out Statement/*!*/ s) { s.Labels = new LList