summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar leino <unknown>2014-11-06 14:16:25 -0800
committerGravatar leino <unknown>2014-11-06 14:16:25 -0800
commit41ae0ef413e2806e1ee753f56de2152938902fac (patch)
tree5e244485b41f61c4e1f76605920e24a87cb657ec
parentae0982daf944f7e79fc6b8d73afd1f62f943d7ed (diff)
Started fixing a number of LL(1) warnings
Disallow empty modifies/reads clauses (this eliminates some LL(1) warnings) Require modify statement to take a nonempty list of frame expressions
-rw-r--r--Source/Dafny/Dafny.atg103
-rw-r--r--Source/Dafny/Parser.cs1344
-rw-r--r--Source/Dafny/Scanner.cs162
-rw-r--r--Test/dafny0/LoopModifies.dfy10
-rw-r--r--Test/dafny0/ModifyStmt.dfy2
5 files changed, 803 insertions, 818 deletions
diff --git a/Source/Dafny/Dafny.atg b/Source/Dafny/Dafny.atg
index 690f8403..edbac407 100644
--- a/Source/Dafny/Dafny.atg
+++ b/Source/Dafny/Dafny.atg
@@ -100,16 +100,16 @@ bool IsAttribute() {
bool IsAlternative() {
Token x = scanner.Peek();
- return la.kind == _lbrace && x.val == "case";
+ return la.kind == _lbrace && x.kind == _case;
}
bool IsLoopSpec() {
- return la.val == "invariant" | la.val == "decreases" | la.val == "modifies";
+ return la.kind == _invariant | la.kind == _decreases | la.kind == _modifies;
}
bool IsLoopSpecOrAlternative() {
Token x = scanner.Peek();
- return IsLoopSpec() || (la.kind == _lbrace && x.val == "case");
+ return IsLoopSpec() || (la.kind == _lbrace && x.kind == _case);
}
bool IsParenStar() {
@@ -152,10 +152,6 @@ bool SemiFollowsCall(bool allowSemi, Expression e) {
(e is IdentifierSequence && ((IdentifierSequence)e).OpenParen != null));
}
-bool CloseOptionalParen(bool usesOptionalParen) {
- return usesOptionalParen && la.kind == _closeparen;
-}
-
bool CloseOptionalBrace(bool usesOptionalBrace) {
return usesOptionalBrace && la.kind == _rbrace;
}
@@ -224,6 +220,11 @@ TOKENS
semi = ';'.
darrow = "=>".
arrow = "->".
+ assume = "assume".
+ case = "case".
+ decreases = "decreases".
+ invariant = "invariant".
+ modifies = "modifies".
reads = "reads".
requires = "requires".
lbrace = '{'.
@@ -769,10 +770,10 @@ MethodSpec<.List<MaybeFreeExpression/*!*/>/*!*/ req, List<FrameExpression/*!*/>/
.)
SYNC
( "modifies" { IF(IsAttribute()) Attribute<ref modAttrs> }
- [ FrameExpression<out fe> (. mod.Add(fe); .)
- { "," FrameExpression<out fe> (. mod.Add(fe); .)
- }
- ] OldSemi
+ FrameExpression<out fe> (. mod.Add(fe); .)
+ { "," FrameExpression<out fe> (. mod.Add(fe); .)
+ }
+ OldSemi
| [ "free" (. isFree = true;
errors.Warning(t, "the 'free' keyword is soon to be deprecated");
.)
@@ -793,15 +794,15 @@ IteratorSpec<.List<FrameExpression/*!*/>/*!*/ reads, List<FrameExpression/*!*/>/
.)
SYNC
( "reads" { IF(IsAttribute()) Attribute<ref readsAttrs> }
- [ FrameExpression<out fe> (. reads.Add(fe); .)
- { "," FrameExpression<out fe> (. reads.Add(fe); .)
- }
- ] OldSemi
+ FrameExpression<out fe> (. reads.Add(fe); .)
+ { "," FrameExpression<out fe> (. reads.Add(fe); .)
+ }
+ OldSemi
| "modifies" { IF(IsAttribute()) Attribute<ref modAttrs> }
- [ FrameExpression<out fe> (. mod.Add(fe); .)
- { "," FrameExpression<out fe> (. mod.Add(fe); .)
- }
- ] OldSemi
+ FrameExpression<out fe> (. mod.Add(fe); .)
+ { "," FrameExpression<out fe> (. mod.Add(fe); .)
+ }
+ OldSemi
| [ "free" (. isFree = true;
errors.Warning(t, "the 'free' keyword is soon to be deprecated");
.)
@@ -904,7 +905,7 @@ TypeAndToken<out IToken tok, out Type ty>
ty = new UserDefinedType(tok, BuiltIns.TupleTypeName(dims), gt, new List<IToken>());
}
.)
- | ReferenceType<out tok, out ty>
+ | ReferenceType<out tok, out ty>
)
[ (. Type t2; .)
"->" (. tok = t; .)
@@ -1050,10 +1051,10 @@ FunctionSpec<.List<Expression/*!*/>/*!*/ reqs, List<FrameExpression/*!*/>/*!*/ r
(
SYNC
"requires" Expression<out e, false, true> OldSemi (. reqs.Add(e); .)
- | "reads" [ PossiblyWildFrameExpression<out fe> (. reads.Add(fe); .)
- { "," PossiblyWildFrameExpression<out fe> (. reads.Add(fe); .)
- }
- ] OldSemi
+ | "reads" PossiblyWildFrameExpression<out fe> (. reads.Add(fe); .)
+ { "," PossiblyWildFrameExpression<out fe> (. reads.Add(fe); .)
+ }
+ OldSemi
| "ensures" Expression<out e, false, true> OldSemi (. ens.Add(e); .)
| "decreases" (. if (decreases == null) {
SemErr(t, "'decreases' clauses are meaningless for copredicates, so they are not allowed");
@@ -1241,7 +1242,8 @@ UpdateStmt<out Statement/*!*/ s>
{ "," Rhs<out r, lhs0> (. rhss.Add(r); .)
}
| ":|" (. x = t; .)
- [ "assume" (. suchThatAssume = t; .)
+ [ IF(la.kind == _assume) /* an Expression can also begin with an "assume", so this says to resolve it to pick up any "assume" here */
+ "assume" (. suchThatAssume = t; .)
]
Expression<out suchThat, false, true>
)
@@ -1321,7 +1323,8 @@ VarDeclStatement<.out Statement/*!*/ s.>
{ "," Rhs<out r, lhs0> (. rhss.Add(r); .)
}
| ":|" (. assignTok = t; .)
- [ "assume" (. suchThatAssume = t; .)
+ [ IF(la.kind == _assume) /* an Expression can also begin with an "assume", so this says to resolve it to pick up any "assume" here */
+ "assume" (. suchThatAssume = t; .)
]
Expression<out suchThat, false, true>
]
@@ -1504,13 +1507,11 @@ MatchStmt<out Statement/*!*/ s>
.)
"match" (. x = t; .)
Expression<out e, true, true>
- [ "{" (. usesOptionalBrace = true; .)
- ]
- { CaseStatement<out c> (. cases.Add(c); .)
- }
- ( IF(CloseOptionalBrace(usesOptionalBrace))
- "}"
- | (. if (usesOptionalBrace) { SemErr(t, "expecting close curly brace"); } .)
+ ( IF(la.kind == _lbrace) /* always favor brace-enclosed match body to a case-less match */
+ "{" { CaseStatement<out c> (. cases.Add(c); .) } "}" (. usesOptionalBrace = true; .)
+ | { IF(la.kind == _case) /* let each "case" bind to the closest preceding "match" */
+ CaseStatement<out c> (. cases.Add(c); .)
+ }
)
(. s = new MatchStmt(x, t, e, cases, usesOptionalBrace); .)
.
@@ -1583,8 +1584,7 @@ PrintStmt<out Statement/*!*/ s>
ForallStmt<out Statement/*!*/ s>
= (. Contract.Ensures(Contract.ValueAtReturn(out s) != null);
IToken/*!*/ x = Token.NoToken;
- bool usesOptionalParen = false;
- List<BoundVar/*!*/> bvars = null;
+ List<BoundVar> bvars = null;
Attributes attrs = null;
Expression range = null;
var ens = new List<MaybeFreeExpression/*!*/>();
@@ -1599,20 +1599,17 @@ ForallStmt<out Statement/*!*/ s>
errors.Warning(t, "the 'parallel' keyword has been deprecated; the comprehension statement now uses the keyword 'forall' (and the parentheses around the bound variables are now optional)");
.)
)
- [ "(" (. usesOptionalParen = true; .)
- ]
- [ (. List<BoundVar/*!*/> bvarsX; Attributes attrsX; Expression rangeX; .)
- QuantifierDomain<out bvarsX, out attrsX, out rangeX>
- (. bvars = bvarsX; attrs = attrsX; range = rangeX;
- .)
- ]
- (. if (bvars == null) { bvars = new List<BoundVar>(); }
- if (range == null) { range = new LiteralExpr(x, true); }
- .)
- ( IF(CloseOptionalParen(usesOptionalParen))
- ")"
- | (. if (usesOptionalParen) { SemErr(t, "expecting close parenthesis"); } .)
+
+ ( IF(la.kind == _openparen) /* disambiguation needed, because of the possibility of a body-less forall statement */
+ "(" [ QuantifierDomain<out bvars, out attrs, out range> ] ")"
+ | [ IF(la.kind == _ident) /* disambiguation needed, because of the possibility of a body-less forall statement */
+ QuantifierDomain<out bvars, out attrs, out range>
+ ]
)
+ (. if (bvars == null) { bvars = new List<BoundVar>(); }
+ if (range == null) { range = new LiteralExpr(x, true); }
+ .)
+
{ (. isFree = false; .)
[ "free" (. isFree = true;
errors.Warning(t, "the 'free' keyword is soon to be deprecated");
@@ -1621,7 +1618,8 @@ ForallStmt<out Statement/*!*/ s>
"ensures" Expression<out e, false, true> (. ens.Add(new MaybeFreeExpression(e, isFree)); .)
OldSemi (. tok = t; .)
}
- [ BlockStmt<out block, out bodyStart, out bodyEnd>
+ [ IF(la.kind == _lbrace) /* if the input continues like a block statement, take it to be the body of the forall statement; a body-less forall statement must continue in some other way */
+ BlockStmt<out block, out bodyStart, out bodyEnd>
]
(. if (DafnyOptions.O.DisallowSoundnessCheating && block == null && 0 < ens.Count) {
SemErr(t, "a forall statement with an ensures clause must have a body");
@@ -1647,11 +1645,11 @@ ModifyStmt<out Statement s>
* 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.
*/
- [ FrameExpression<out fe> (. mod.Add(fe); .)
+ ( FrameExpression<out fe> (. mod.Add(fe); .)
{ "," FrameExpression<out fe> (. mod.Add(fe); .)
}
| "..." (. ellipsisToken = t; .)
- ]
+ )
( BlockStmt<out body, out bodyStart, out endTok>
| SYNC ";" (. endTok = t; .)
)
@@ -2543,7 +2541,8 @@ QuantifierDomain<.out List<BoundVar> bvars, out Attributes attrs, out Expression
IdentTypeOptional<out bv> (. bvars.Add(bv); .)
}
{ IF(IsAttribute()) Attribute<ref attrs> }
- [ "|"
+ [ 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<out range, true, true>
]
.
diff --git a/Source/Dafny/Parser.cs b/Source/Dafny/Parser.cs
index f990f9ff..5135712d 100644
--- a/Source/Dafny/Parser.cs
+++ b/Source/Dafny/Parser.cs
@@ -26,14 +26,19 @@ public class Parser {
public const int _semi = 10;
public const int _darrow = 11;
public const int _arrow = 12;
- public const int _reads = 13;
- public const int _requires = 14;
- public const int _lbrace = 15;
- public const int _rbrace = 16;
- public const int _openparen = 17;
- public const int _closeparen = 18;
- public const int _star = 19;
- public const int _notIn = 20;
+ public const int _assume = 13;
+ public const int _case = 14;
+ public const int _decreases = 15;
+ public const int _invariant = 16;
+ public const int _modifies = 17;
+ public const int _reads = 18;
+ public const int _requires = 19;
+ public const int _lbrace = 20;
+ public const int _rbrace = 21;
+ public const int _openparen = 22;
+ public const int _closeparen = 23;
+ public const int _star = 24;
+ public const int _notIn = 25;
public const int maxT = 133;
const bool T = true;
@@ -133,16 +138,16 @@ bool IsAttribute() {
bool IsAlternative() {
Token x = scanner.Peek();
- return la.kind == _lbrace && x.val == "case";
+ return la.kind == _lbrace && x.kind == _case;
}
bool IsLoopSpec() {
- return la.val == "invariant" | la.val == "decreases" | la.val == "modifies";
+ return la.kind == _invariant | la.kind == _decreases | la.kind == _modifies;
}
bool IsLoopSpecOrAlternative() {
Token x = scanner.Peek();
- return IsLoopSpec() || (la.kind == _lbrace && x.val == "case");
+ return IsLoopSpec() || (la.kind == _lbrace && x.kind == _case);
}
bool IsParenStar() {
@@ -185,10 +190,6 @@ bool SemiFollowsCall(bool allowSemi, Expression e) {
(e is IdentifierSequence && ((IdentifierSequence)e).OpenParen != null));
}
-bool CloseOptionalParen(bool usesOptionalParen) {
- return usesOptionalParen && la.kind == _closeparen;
-}
-
bool CloseOptionalBrace(bool usesOptionalBrace) {
return usesOptionalBrace && la.kind == _rbrace;
}
@@ -274,7 +275,7 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
TraitDecl/*!*/ trait;
Contract.Assert(defaultModule != null);
- while (la.kind == 21) {
+ while (la.kind == 26) {
Get();
Expect(7);
{
@@ -294,42 +295,42 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
}
while (StartOf(1)) {
switch (la.kind) {
- case 22: case 23: case 25: {
+ case 27: case 28: case 30: {
SubModuleDecl(defaultModule, out submodule);
defaultModule.TopLevelDecls.Add(submodule);
break;
}
- case 30: {
+ case 35: {
ClassDecl(defaultModule, out c);
defaultModule.TopLevelDecls.Add(c);
break;
}
- case 35: case 36: {
+ case 40: case 41: {
DatatypeDecl(defaultModule, out dt);
defaultModule.TopLevelDecls.Add(dt);
break;
}
- case 39: {
+ case 44: {
NewtypeDecl(defaultModule, out td);
defaultModule.TopLevelDecls.Add(td);
break;
}
- case 40: {
+ case 45: {
OtherTypeDecl(defaultModule, out td);
defaultModule.TopLevelDecls.Add(td);
break;
}
- case 42: {
+ case 47: {
IteratorDecl(defaultModule, out iter);
defaultModule.TopLevelDecls.Add(iter);
break;
}
- case 32: {
+ case 37: {
TraitDecl(defaultModule, out trait);
defaultModule.TopLevelDecls.Add(trait);
break;
}
- case 33: case 34: case 37: case 48: case 49: case 50: case 51: case 52: case 70: case 71: case 72: {
+ case 38: case 39: case 42: case 53: case 54: case 55: case 56: case 57: case 73: case 74: case 75: {
ClassMemberDecl(membersDefaultClass, false);
break;
}
@@ -362,86 +363,86 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
bool isAbstract = false;
bool opened = false;
- if (la.kind == 22 || la.kind == 23) {
- if (la.kind == 22) {
+ if (la.kind == 27 || la.kind == 28) {
+ if (la.kind == 27) {
Get();
isAbstract = true;
}
- Expect(23);
- while (la.kind == 15) {
+ Expect(28);
+ while (la.kind == 20) {
Attribute(ref attrs);
}
NoUSIdent(out id);
- if (la.kind == 24) {
+ if (la.kind == 29) {
Get();
QualifiedName(out idRefined);
}
module = new ModuleDefinition(id, id.val, isAbstract, false, idRefined == null ? null : idRefined, parent, attrs, false);
- Expect(15);
+ Expect(20);
module.BodyStartTok = t;
while (StartOf(1)) {
switch (la.kind) {
- case 22: case 23: case 25: {
+ case 27: case 28: case 30: {
SubModuleDecl(module, out sm);
module.TopLevelDecls.Add(sm);
break;
}
- case 30: {
+ case 35: {
ClassDecl(module, out c);
module.TopLevelDecls.Add(c);
break;
}
- case 32: {
+ case 37: {
TraitDecl(module, out trait);
module.TopLevelDecls.Add(trait);
break;
}
- case 35: case 36: {
+ case 40: case 41: {
DatatypeDecl(module, out dt);
module.TopLevelDecls.Add(dt);
break;
}
- case 39: {
+ case 44: {
NewtypeDecl(module, out td);
module.TopLevelDecls.Add(td);
break;
}
- case 40: {
+ case 45: {
OtherTypeDecl(module, out td);
module.TopLevelDecls.Add(td);
break;
}
- case 42: {
+ case 47: {
IteratorDecl(module, out iter);
module.TopLevelDecls.Add(iter);
break;
}
- case 33: case 34: case 37: case 48: case 49: case 50: case 51: case 52: case 70: case 71: case 72: {
+ case 38: case 39: case 42: case 53: case 54: case 55: case 56: case 57: case 73: case 74: case 75: {
ClassMemberDecl(namedModuleDefaultClassMembers, false);
break;
}
}
}
- Expect(16);
+ Expect(21);
module.BodyEndTok = t;
module.TopLevelDecls.Add(new DefaultClassDecl(module, namedModuleDefaultClassMembers));
submodule = new LiteralModuleDecl(module, parent);
- } else if (la.kind == 25) {
+ } else if (la.kind == 30) {
Get();
- if (la.kind == 26) {
+ if (la.kind == 31) {
Get();
opened = true;
}
NoUSIdent(out id);
- if (la.kind == 27 || la.kind == 28) {
- if (la.kind == 27) {
+ if (la.kind == 32 || la.kind == 33) {
+ if (la.kind == 32) {
Get();
QualifiedName(out idPath);
submodule = new AliasModuleDecl(idPath, id, parent, opened);
} else {
Get();
QualifiedName(out idPath);
- if (la.kind == 29) {
+ if (la.kind == 34) {
Get();
QualifiedName(out idAssignment);
}
@@ -471,25 +472,25 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
List<MemberDecl/*!*/> members = new List<MemberDecl/*!*/>();
IToken bodyStart;
- while (!(la.kind == 0 || la.kind == 30)) {SynErr(136); Get();}
- Expect(30);
- while (la.kind == 15) {
+ while (!(la.kind == 0 || la.kind == 35)) {SynErr(136); Get();}
+ Expect(35);
+ while (la.kind == 20) {
Attribute(ref attrs);
}
NoUSIdent(out id);
- if (la.kind == 46) {
+ if (la.kind == 51) {
GenericParameters(typeArgs);
}
- if (la.kind == 31) {
+ if (la.kind == 36) {
Get();
QualifiedName(out traitId);
}
- Expect(15);
+ Expect(20);
bodyStart = t;
while (StartOf(2)) {
ClassMemberDecl(members, true);
}
- Expect(16);
+ Expect(21);
c = new ClassDecl(id, id.val, module, typeArgs, members, attrs, traitId);
c.BodyStartTok = bodyStart;
c.BodyEndTok = t;
@@ -506,21 +507,21 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
IToken bodyStart = Token.NoToken; // dummy assignment
bool co = false;
- while (!(la.kind == 0 || la.kind == 35 || la.kind == 36)) {SynErr(137); Get();}
- if (la.kind == 35) {
+ while (!(la.kind == 0 || la.kind == 40 || la.kind == 41)) {SynErr(137); Get();}
+ if (la.kind == 40) {
Get();
- } else if (la.kind == 36) {
+ } else if (la.kind == 41) {
Get();
co = true;
} else SynErr(138);
- while (la.kind == 15) {
+ while (la.kind == 20) {
Attribute(ref attrs);
}
NoUSIdent(out id);
- if (la.kind == 46) {
+ if (la.kind == 51) {
GenericParameters(typeArgs);
}
- Expect(27);
+ Expect(32);
bodyStart = t;
DatatypeMemberDecl(ctors);
while (la.kind == 9) {
@@ -548,12 +549,12 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
Type baseType = null;
Expression wh;
- Expect(39);
- while (la.kind == 15) {
+ Expect(44);
+ while (la.kind == 20) {
Attribute(ref attrs);
}
NoUSIdent(out id);
- Expect(27);
+ Expect(32);
if (IsIdentColonOrBar()) {
NoUSIdent(out bvId);
if (la.kind == 8) {
@@ -578,24 +579,24 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
td = null;
Type ty;
- Expect(40);
- while (la.kind == 15) {
+ Expect(45);
+ while (la.kind == 20) {
Attribute(ref attrs);
}
NoUSIdent(out id);
- if (la.kind == 17) {
+ if (la.kind == 22) {
Get();
- Expect(41);
- Expect(18);
+ Expect(46);
+ Expect(23);
eqSupport = TypeParameter.EqualitySupportValue.Required;
- if (la.kind == 46) {
+ if (la.kind == 51) {
GenericParameters(typeArgs);
}
} else if (StartOf(4)) {
- if (la.kind == 46) {
+ if (la.kind == 51) {
GenericParameters(typeArgs);
}
- if (la.kind == 27) {
+ if (la.kind == 32) {
Get();
Type(out ty);
td = new TypeSynonymDecl(id, id.val, typeArgs, module, ty, attrs);
@@ -634,19 +635,19 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
IToken bodyStart = Token.NoToken;
IToken bodyEnd = Token.NoToken;
- while (!(la.kind == 0 || la.kind == 42)) {SynErr(143); Get();}
- Expect(42);
- while (la.kind == 15) {
+ while (!(la.kind == 0 || la.kind == 47)) {SynErr(143); Get();}
+ Expect(47);
+ while (la.kind == 20) {
Attribute(ref attrs);
}
NoUSIdent(out id);
- if (la.kind == 17 || la.kind == 46) {
- if (la.kind == 46) {
+ if (la.kind == 22 || la.kind == 51) {
+ if (la.kind == 51) {
GenericParameters(typeArgs);
}
Formals(true, true, ins);
- if (la.kind == 43 || la.kind == 44) {
- if (la.kind == 43) {
+ if (la.kind == 48 || la.kind == 49) {
+ if (la.kind == 48) {
Get();
} else {
Get();
@@ -654,14 +655,14 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
}
Formals(false, true, outs);
}
- } else if (la.kind == 45) {
+ } else if (la.kind == 50) {
Get();
signatureEllipsis = t;
} else SynErr(144);
while (StartOf(5)) {
IteratorSpec(reads, mod, decreases, req, ens, yieldReq, yieldEns, ref readsAttrs, ref modAttrs, ref decrAttrs);
}
- if (la.kind == 15) {
+ if (la.kind == 20) {
BlockStmt(out body, out bodyStart, out bodyEnd);
}
iter = new IteratorDecl(id, id.val, module, typeArgs, ins, outs,
@@ -684,21 +685,21 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
List<MemberDecl/*!*/> members = new List<MemberDecl/*!*/>();
IToken bodyStart;
- while (!(la.kind == 0 || la.kind == 32)) {SynErr(145); Get();}
- Expect(32);
- while (la.kind == 15) {
+ while (!(la.kind == 0 || la.kind == 37)) {SynErr(145); Get();}
+ Expect(37);
+ while (la.kind == 20) {
Attribute(ref attrs);
}
NoUSIdent(out id);
- if (la.kind == 46) {
+ if (la.kind == 51) {
GenericParameters(typeArgs);
}
- Expect(15);
+ Expect(20);
bodyStart = t;
while (StartOf(2)) {
ClassMemberDecl(members, true);
}
- Expect(16);
+ Expect(21);
trait = new TraitDecl(id, id.val, module, typeArgs, members, attrs);
trait.BodyStartTok = bodyStart;
trait.BodyEndTok = t;
@@ -711,8 +712,8 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
Function/*!*/ f;
MemberModifiers mmod = new MemberModifiers();
- while (la.kind == 33 || la.kind == 34) {
- if (la.kind == 33) {
+ while (la.kind == 38 || la.kind == 39) {
+ if (la.kind == 38) {
Get();
mmod.IsGhost = true;
} else {
@@ -720,9 +721,9 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
mmod.IsStatic = true;
}
}
- if (la.kind == 37) {
+ if (la.kind == 42) {
FieldDecl(mmod, mm);
- } else if (la.kind == 70 || la.kind == 71 || la.kind == 72) {
+ } else if (la.kind == 73 || la.kind == 74 || la.kind == 75) {
FunctionDecl(mmod, out f);
mm.Add(f);
} else if (StartOf(6)) {
@@ -732,9 +733,9 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
}
void Attribute(ref Attributes attrs) {
- Expect(15);
+ Expect(20);
AttributeBody(ref attrs);
- Expect(16);
+ Expect(21);
}
void NoUSIdent(out IToken/*!*/ x) {
@@ -751,7 +752,7 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
IToken id; IToken idPrime; ids = new List<IToken>();
Ident(out id);
ids.Add(id);
- while (la.kind == 69) {
+ while (la.kind == 72) {
IdentOrDigitsSuffix(out id, out idPrime);
ids.Add(id);
if (idPrime != null) { ids.Add(idPrime); }
@@ -770,7 +771,7 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
x = Token.NoToken;
y = null;
- Expect(69);
+ Expect(72);
if (la.kind == 1) {
Get();
x = t;
@@ -798,10 +799,10 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
}
}
- } else if (la.kind == 14) {
+ } else if (la.kind == 19) {
Get();
x = t;
- } else if (la.kind == 13) {
+ } else if (la.kind == 18) {
Get();
x = t;
} else SynErr(147);
@@ -812,29 +813,29 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
IToken/*!*/ id;
TypeParameter.EqualitySupportValue eqSupport;
- Expect(46);
+ Expect(51);
NoUSIdent(out id);
eqSupport = TypeParameter.EqualitySupportValue.Unspecified;
- if (la.kind == 17) {
+ if (la.kind == 22) {
Get();
- Expect(41);
- Expect(18);
+ Expect(46);
+ Expect(23);
eqSupport = TypeParameter.EqualitySupportValue.Required;
}
typeArgs.Add(new TypeParameter(id, id.val, eqSupport));
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
NoUSIdent(out id);
eqSupport = TypeParameter.EqualitySupportValue.Unspecified;
- if (la.kind == 17) {
+ if (la.kind == 22) {
Get();
- Expect(41);
- Expect(18);
+ Expect(46);
+ Expect(23);
eqSupport = TypeParameter.EqualitySupportValue.Required;
}
typeArgs.Add(new TypeParameter(id, id.val, eqSupport));
}
- Expect(47);
+ Expect(52);
}
void FieldDecl(MemberModifiers mmod, List<MemberDecl/*!*/>/*!*/ mm) {
@@ -842,16 +843,16 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
Attributes attrs = null;
IToken/*!*/ id; Type/*!*/ ty;
- while (!(la.kind == 0 || la.kind == 37)) {SynErr(148); Get();}
- Expect(37);
+ while (!(la.kind == 0 || la.kind == 42)) {SynErr(148); Get();}
+ Expect(42);
if (mmod.IsStatic) { SemErr(t, "fields cannot be declared 'static'"); }
- while (la.kind == 15) {
+ while (la.kind == 20) {
Attribute(ref attrs);
}
FIdentType(out id, out ty);
mm.Add(new Field(id, id.val, mmod.IsGhost, ty, attrs));
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
FIdentType(out id, out ty);
mm.Add(new Field(id, id.val, mmod.IsGhost, ty, attrs));
@@ -878,48 +879,48 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
IToken signatureEllipsis = null;
bool missingOpenParen;
- if (la.kind == 70) {
+ if (la.kind == 73) {
Get();
- if (la.kind == 48) {
+ if (la.kind == 53) {
Get();
isFunctionMethod = true;
}
if (mmod.IsGhost) { SemErr(t, "functions cannot be declared 'ghost' (they are ghost by default)"); }
- while (la.kind == 15) {
+ while (la.kind == 20) {
Attribute(ref attrs);
}
NoUSIdent(out id);
- if (la.kind == 17 || la.kind == 46) {
- if (la.kind == 46) {
+ if (la.kind == 22 || la.kind == 51) {
+ if (la.kind == 51) {
GenericParameters(typeArgs);
}
Formals(true, isFunctionMethod, formals);
Expect(8);
Type(out returnType);
- } else if (la.kind == 45) {
+ } else if (la.kind == 50) {
Get();
signatureEllipsis = t;
} else SynErr(149);
- } else if (la.kind == 71) {
+ } else if (la.kind == 74) {
Get();
isPredicate = true;
- if (la.kind == 48) {
+ if (la.kind == 53) {
Get();
isFunctionMethod = true;
}
if (mmod.IsGhost) { SemErr(t, "predicates cannot be declared 'ghost' (they are ghost by default)"); }
- while (la.kind == 15) {
+ while (la.kind == 20) {
Attribute(ref attrs);
}
NoUSIdent(out id);
if (StartOf(7)) {
- if (la.kind == 46) {
+ if (la.kind == 51) {
GenericParameters(typeArgs);
}
missingOpenParen = true;
- if (la.kind == 17) {
+ if (la.kind == 22) {
Formals(true, isFunctionMethod, formals);
missingOpenParen = false;
}
@@ -928,25 +929,25 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
Get();
SemErr(t, "predicates do not have an explicitly declared return type; it is always bool");
}
- } else if (la.kind == 45) {
+ } else if (la.kind == 50) {
Get();
signatureEllipsis = t;
} else SynErr(150);
- } else if (la.kind == 72) {
+ } else if (la.kind == 75) {
Get();
isCoPredicate = true;
if (mmod.IsGhost) { SemErr(t, "copredicates cannot be declared 'ghost' (they are ghost by default)"); }
- while (la.kind == 15) {
+ while (la.kind == 20) {
Attribute(ref attrs);
}
NoUSIdent(out id);
if (StartOf(7)) {
- if (la.kind == 46) {
+ if (la.kind == 51) {
GenericParameters(typeArgs);
}
missingOpenParen = true;
- if (la.kind == 17) {
+ if (la.kind == 22) {
Formals(true, isFunctionMethod, formals);
missingOpenParen = false;
}
@@ -955,7 +956,7 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
Get();
SemErr(t, "copredicates do not have an explicitly declared return type; it is always bool");
}
- } else if (la.kind == 45) {
+ } else if (la.kind == 50) {
Get();
signatureEllipsis = t;
} else SynErr(151);
@@ -964,7 +965,7 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
while (StartOf(8)) {
FunctionSpec(reqs, reads, ens, decreases);
}
- if (la.kind == 15) {
+ if (la.kind == 20) {
FunctionBody(out body, out bodyStart, out bodyEnd);
}
if (DafnyOptions.O.DisallowSoundnessCheating && body == null && ens.Count > 0 && !Attributes.Contains(attrs, "axiom") && !Attributes.Contains(attrs, "imported")) {
@@ -1015,20 +1016,20 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
IToken bodyEnd = Token.NoToken;
while (!(StartOf(9))) {SynErr(153); Get();}
- if (la.kind == 48) {
+ if (la.kind == 53) {
Get();
- } else if (la.kind == 49) {
+ } else if (la.kind == 54) {
Get();
isLemma = true;
- } else if (la.kind == 50) {
+ } else if (la.kind == 55) {
Get();
isCoLemma = true;
- } else if (la.kind == 51) {
+ } else if (la.kind == 56) {
Get();
isCoLemma = true;
errors.Warning(t, "the 'comethod' keyword has been deprecated; it has been renamed to 'colemma'");
- } else if (la.kind == 52) {
+ } else if (la.kind == 57) {
Get();
if (allowConstructor) {
isConstructor = true;
@@ -1055,7 +1056,7 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
}
}
- while (la.kind == 15) {
+ while (la.kind == 20) {
Attribute(ref attrs);
}
if (la.kind == 1) {
@@ -1069,24 +1070,24 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
}
}
- if (la.kind == 17 || la.kind == 46) {
- if (la.kind == 46) {
+ if (la.kind == 22 || la.kind == 51) {
+ if (la.kind == 51) {
GenericParameters(typeArgs);
}
Formals(true, !mmod.IsGhost, ins);
- if (la.kind == 44) {
+ if (la.kind == 49) {
Get();
if (isConstructor) { SemErr(t, "constructors cannot have out-parameters"); }
Formals(false, !mmod.IsGhost, outs);
}
- } else if (la.kind == 45) {
+ } else if (la.kind == 50) {
Get();
signatureEllipsis = t;
} else SynErr(155);
while (StartOf(10)) {
MethodSpec(req, mod, ens, dec, ref decAttrs, ref modAttrs);
}
- if (la.kind == 15) {
+ if (la.kind == 20) {
BlockStmt(out body, out bodyStart, out bodyEnd);
}
if (DafnyOptions.O.DisallowSoundnessCheating && body == null && ens.Count > 0 && !Attributes.Contains(attrs, "axiom") && !Attributes.Contains(attrs, "imported") && !Attributes.Contains(attrs, "decl") && theVerifyThisFile) {
@@ -1118,11 +1119,11 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
IToken/*!*/ id;
List<Formal/*!*/> formals = new List<Formal/*!*/>();
- while (la.kind == 15) {
+ while (la.kind == 20) {
Attribute(ref attrs);
}
NoUSIdent(out id);
- if (la.kind == 17) {
+ if (la.kind == 22) {
FormalsOptionalIds(formals);
}
ctors.Add(new DatatypeCtor(id, id.val, formals, attrs));
@@ -1130,17 +1131,17 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
void FormalsOptionalIds(List<Formal/*!*/>/*!*/ formals) {
Contract.Requires(cce.NonNullElements(formals)); IToken/*!*/ id; Type/*!*/ ty; string/*!*/ name; bool isGhost;
- Expect(17);
+ Expect(22);
if (StartOf(11)) {
TypeIdentOptional(out id, out name, out ty, out isGhost);
formals.Add(new Formal(id, name, ty, true, isGhost));
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
TypeIdentOptional(out id, out name, out ty, out isGhost);
formals.Add(new Formal(id, name, ty, true, isGhost));
}
}
- Expect(18);
+ Expect(23);
}
void FIdentType(out IToken/*!*/ id, out Type/*!*/ ty) {
@@ -1187,7 +1188,7 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
Contract.Ensures(Contract.ValueAtReturn(out id)!=null);
Contract.Ensures(Contract.ValueAtReturn(out ty)!=null);
isGhost = false;
- if (la.kind == 33) {
+ if (la.kind == 38) {
Get();
if (allowGhostKeyword) { isGhost = true; } else { SemErr(t, "formal cannot be declared 'ghost' in this context"); }
}
@@ -1239,7 +1240,7 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
Contract.Ensures(Contract.ValueAtReturn(out ty)!=null);
Contract.Ensures(Contract.ValueAtReturn(out identName)!=null);
string name = null; id = Token.NoToken; ty = new BoolType()/*dummy*/; isGhost = false;
- if (la.kind == 33) {
+ if (la.kind == 38) {
Get();
isGhost = true;
}
@@ -1276,35 +1277,35 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
List<Type> gt = null;
switch (la.kind) {
- case 58: {
+ case 61: {
Get();
tok = t;
break;
}
- case 59: {
+ case 62: {
Get();
tok = t; ty = new CharType();
break;
}
- case 60: {
+ case 63: {
Get();
tok = t; ty = new NatType();
break;
}
- case 61: {
+ case 64: {
Get();
tok = t; ty = new IntType();
break;
}
- case 62: {
+ case 65: {
Get();
tok = t; ty = new RealType();
break;
}
- case 63: {
+ case 66: {
Get();
tok = t; gt = new List<Type/*!*/>();
- if (la.kind == 46) {
+ if (la.kind == 51) {
GenericInstantiation(gt);
}
if (gt.Count > 1) {
@@ -1314,10 +1315,10 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
break;
}
- case 64: {
+ case 67: {
Get();
tok = t; gt = new List<Type/*!*/>();
- if (la.kind == 46) {
+ if (la.kind == 51) {
GenericInstantiation(gt);
}
if (gt.Count > 1) {
@@ -1327,10 +1328,10 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
break;
}
- case 65: {
+ case 68: {
Get();
tok = t; gt = new List<Type/*!*/>();
- if (la.kind == 46) {
+ if (la.kind == 51) {
GenericInstantiation(gt);
}
if (gt.Count > 1) {
@@ -1340,15 +1341,15 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
break;
}
- case 66: {
+ case 69: {
Get();
tok = t; ty = new UserDefinedType(tok, tok.val, new List<Type>(), new List<IToken>());
break;
}
- case 67: {
+ case 70: {
Get();
tok = t; gt = new List<Type/*!*/>();
- if (la.kind == 46) {
+ if (la.kind == 51) {
GenericInstantiation(gt);
}
if (gt.Count == 0) {
@@ -1362,19 +1363,19 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
break;
}
- case 17: {
+ case 22: {
Get();
tok = t; gt = new List<Type>();
if (StartOf(3)) {
Type(out ty);
gt.Add(ty);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
Type(out ty);
gt.Add(ty);
}
}
- Expect(18);
+ Expect(23);
if (gt.Count == 1) {
// just return the type 'ty'
} else {
@@ -1386,7 +1387,7 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
break;
}
- case 1: case 5: case 68: {
+ case 1: case 5: case 71: {
ReferenceType(out tok, out ty);
break;
}
@@ -1408,17 +1409,17 @@ bool CloseOptionalBrace(bool usesOptionalBrace) {
void Formals(bool incoming, bool allowGhostKeyword, List<Formal> formals) {
Contract.Requires(cce.NonNullElements(formals)); IToken id; Type ty; bool isGhost;
- Expect(17);
- if (la.kind == 1 || la.kind == 33) {
+ Expect(22);
+ if (la.kind == 1 || la.kind == 38) {
GIdentType(allowGhostKeyword, out id, out ty, out isGhost);
formals.Add(new Formal(id, id.val, ty, incoming, isGhost));
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
GIdentType(allowGhostKeyword, out id, out ty, out isGhost);
formals.Add(new Formal(id, id.val, ty, incoming, isGhost));
}
}
- Expect(18);
+ Expect(23);
}
void IteratorSpec(List<FrameExpression/*!*/>/*!*/ reads, List<FrameExpression/*!*/>/*!*/ mod, List<Expression/*!*/> decreases,
@@ -1428,48 +1429,44 @@ ref Attributes readsAttrs, ref Attributes modAttrs, ref Attributes decrAttrs) {
Expression/*!*/ e; FrameExpression/*!*/ fe; bool isFree = false; bool isYield = false; Attributes ensAttrs = null;
while (!(StartOf(12))) {SynErr(160); Get();}
- if (la.kind == 13) {
+ if (la.kind == 18) {
Get();
while (IsAttribute()) {
Attribute(ref readsAttrs);
}
- if (StartOf(13)) {
+ FrameExpression(out fe);
+ reads.Add(fe);
+ while (la.kind == 43) {
+ Get();
FrameExpression(out fe);
reads.Add(fe);
- while (la.kind == 38) {
- Get();
- FrameExpression(out fe);
- reads.Add(fe);
- }
}
OldSemi();
- } else if (la.kind == 53) {
+ } else if (la.kind == 17) {
Get();
while (IsAttribute()) {
Attribute(ref modAttrs);
}
- if (StartOf(13)) {
+ FrameExpression(out fe);
+ mod.Add(fe);
+ while (la.kind == 43) {
+ Get();
FrameExpression(out fe);
mod.Add(fe);
- while (la.kind == 38) {
- Get();
- FrameExpression(out fe);
- mod.Add(fe);
- }
}
OldSemi();
- } else if (StartOf(14)) {
- if (la.kind == 54) {
+ } else if (StartOf(13)) {
+ if (la.kind == 58) {
Get();
isFree = true;
errors.Warning(t, "the 'free' keyword is soon to be deprecated");
}
- if (la.kind == 57) {
+ if (la.kind == 60) {
Get();
isYield = true;
}
- if (la.kind == 14) {
+ if (la.kind == 19) {
Get();
Expression(out e, false, true);
OldSemi();
@@ -1479,7 +1476,7 @@ ref Attributes readsAttrs, ref Attributes modAttrs, ref Attributes decrAttrs) {
req.Add(new MaybeFreeExpression(e, isFree));
}
- } else if (la.kind == 55) {
+ } else if (la.kind == 59) {
Get();
while (IsAttribute()) {
Attribute(ref ensAttrs);
@@ -1493,7 +1490,7 @@ ref Attributes readsAttrs, ref Attributes modAttrs, ref Attributes decrAttrs) {
}
} else SynErr(161);
- } else if (la.kind == 56) {
+ } else if (la.kind == 15) {
Get();
while (IsAttribute()) {
Attribute(ref decrAttrs);
@@ -1507,12 +1504,12 @@ ref Attributes readsAttrs, ref Attributes modAttrs, ref Attributes decrAttrs) {
Contract.Ensures(Contract.ValueAtReturn(out block) != null);
List<Statement/*!*/> body = new List<Statement/*!*/>();
- Expect(15);
+ Expect(20);
bodyStart = t;
- while (StartOf(15)) {
+ while (StartOf(14)) {
Stmt(body);
}
- Expect(16);
+ Expect(21);
bodyEnd = t;
block = new BlockStmt(bodyStart, bodyEnd, body);
}
@@ -1522,35 +1519,33 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Contract.Requires(cce.NonNullElements(req)); Contract.Requires(cce.NonNullElements(mod)); Contract.Requires(cce.NonNullElements(ens)); Contract.Requires(cce.NonNullElements(decreases));
Expression/*!*/ e; FrameExpression/*!*/ fe; bool isFree = false; Attributes ensAttrs = null;
- while (!(StartOf(16))) {SynErr(163); Get();}
- if (la.kind == 53) {
+ while (!(StartOf(15))) {SynErr(163); Get();}
+ if (la.kind == 17) {
Get();
while (IsAttribute()) {
Attribute(ref modAttrs);
}
- if (StartOf(13)) {
+ FrameExpression(out fe);
+ mod.Add(fe);
+ while (la.kind == 43) {
+ Get();
FrameExpression(out fe);
mod.Add(fe);
- while (la.kind == 38) {
- Get();
- FrameExpression(out fe);
- mod.Add(fe);
- }
}
OldSemi();
- } else if (la.kind == 14 || la.kind == 54 || la.kind == 55) {
- if (la.kind == 54) {
+ } else if (la.kind == 19 || la.kind == 58 || la.kind == 59) {
+ if (la.kind == 58) {
Get();
isFree = true;
errors.Warning(t, "the 'free' keyword is soon to be deprecated");
}
- if (la.kind == 14) {
+ if (la.kind == 19) {
Get();
Expression(out e, false, true);
OldSemi();
req.Add(new MaybeFreeExpression(e, isFree));
- } else if (la.kind == 55) {
+ } else if (la.kind == 59) {
Get();
while (IsAttribute()) {
Attribute(ref ensAttrs);
@@ -1559,7 +1554,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
OldSemi();
ens.Add(new MaybeFreeExpression(e, isFree, ensAttrs));
} else SynErr(164);
- } else if (la.kind == 56) {
+ } else if (la.kind == 15) {
Get();
while (IsAttribute()) {
Attribute(ref decAttrs);
@@ -1576,16 +1571,16 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
string fieldName = null; IToken feTok = null;
fe = null;
- if (StartOf(17)) {
+ if (StartOf(16)) {
Expression(out e, false, false);
feTok = e.tok;
- if (la.kind == 73) {
+ if (la.kind == 76) {
Get();
Ident(out id);
fieldName = id.val; feTok = id;
}
fe = new FrameExpression(feTok, e, fieldName);
- } else if (la.kind == 73) {
+ } else if (la.kind == 76) {
Get();
Ident(out id);
fieldName = id.val;
@@ -1602,7 +1597,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
decreases.Add(e);
}
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
PossiblyWildExpression(out e);
if (!allowWildcard && e is WildcardExpr) {
@@ -1616,15 +1611,15 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
void GenericInstantiation(List<Type/*!*/>/*!*/ gt) {
Contract.Requires(cce.NonNullElements(gt)); Type/*!*/ ty;
- Expect(46);
+ Expect(51);
Type(out ty);
gt.Add(ty);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
Type(out ty);
gt.Add(ty);
}
- Expect(47);
+ Expect(52);
}
void ReferenceType(out IToken/*!*/ tok, out Type/*!*/ ty) {
@@ -1633,13 +1628,13 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
List<Type> gt;
List<IToken> path;
- if (la.kind == 68) {
+ if (la.kind == 71) {
Get();
tok = t; ty = new ObjectType();
} else if (la.kind == 5) {
Get();
tok = t; gt = new List<Type>();
- if (la.kind == 46) {
+ if (la.kind == 51) {
GenericInstantiation(gt);
}
int dims = tok.val.Length == 5 ? 1 : int.Parse(tok.val.Substring(5));
@@ -1649,12 +1644,12 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Ident(out tok);
gt = new List<Type>();
path = new List<IToken>();
- while (la.kind == 69) {
+ while (la.kind == 72) {
path.Add(tok);
Get();
Ident(out tok);
}
- if (la.kind == 46) {
+ if (la.kind == 51) {
GenericInstantiation(gt);
}
ty = new UserDefinedType(tok, tok.val, gt, path);
@@ -1666,30 +1661,28 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Contract.Requires(cce.NonNullElements(reads));
Contract.Requires(decreases == null || cce.NonNullElements(decreases));
Expression/*!*/ e; FrameExpression/*!*/ fe;
- if (la.kind == 14) {
- while (!(la.kind == 0 || la.kind == 14)) {SynErr(168); Get();}
+ if (la.kind == 19) {
+ while (!(la.kind == 0 || la.kind == 19)) {SynErr(168); Get();}
Get();
Expression(out e, false, true);
OldSemi();
reqs.Add(e);
- } else if (la.kind == 13) {
+ } else if (la.kind == 18) {
Get();
- if (StartOf(18)) {
+ PossiblyWildFrameExpression(out fe);
+ reads.Add(fe);
+ while (la.kind == 43) {
+ Get();
PossiblyWildFrameExpression(out fe);
reads.Add(fe);
- while (la.kind == 38) {
- Get();
- PossiblyWildFrameExpression(out fe);
- reads.Add(fe);
- }
}
OldSemi();
- } else if (la.kind == 55) {
+ } else if (la.kind == 59) {
Get();
Expression(out e, false, true);
OldSemi();
ens.Add(e);
- } else if (la.kind == 56) {
+ } else if (la.kind == 15) {
Get();
if (decreases == null) {
SemErr(t, "'decreases' clauses are meaningless for copredicates, so they are not allowed");
@@ -1703,19 +1696,19 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
void FunctionBody(out Expression/*!*/ e, out IToken bodyStart, out IToken bodyEnd) {
Contract.Ensures(Contract.ValueAtReturn(out e) != null); e = dummyExpr;
- Expect(15);
+ Expect(20);
bodyStart = t;
Expression(out e, true, true);
- Expect(16);
+ Expect(21);
bodyEnd = t;
}
void PossiblyWildFrameExpression(out FrameExpression/*!*/ fe) {
Contract.Ensures(Contract.ValueAtReturn(out fe) != null); fe = dummyFrameExpr;
- if (la.kind == 19) {
+ if (la.kind == 24) {
Get();
fe = new FrameExpression(t, new WildcardExpr(t), null);
- } else if (StartOf(13)) {
+ } else if (StartOf(17)) {
FrameExpression(out fe);
} else SynErr(170);
}
@@ -1723,8 +1716,8 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
void LambdaSpec(out Expression req, List<FrameExpression> reads) {
Contract.Requires(reads != null);
Expression e; req = null; FrameExpression fe;
- while (la.kind == 13 || la.kind == 14) {
- if (la.kind == 14) {
+ while (la.kind == 18 || la.kind == 19) {
+ if (la.kind == 19) {
Get();
Expression(out e, false, false);
if (req == null) {
@@ -1744,10 +1737,10 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
void PossiblyWildExpression(out Expression/*!*/ e) {
Contract.Ensures(Contract.ValueAtReturn(out e)!=null);
e = dummyExpr;
- if (la.kind == 19) {
+ if (la.kind == 24) {
Get();
e = new WildcardExpr(t);
- } else if (StartOf(17)) {
+ } else if (StartOf(16)) {
Expression(out e, false, false);
} else SynErr(171);
}
@@ -1766,9 +1759,9 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
IToken bodyStart, bodyEnd;
int breakCount;
- while (!(StartOf(19))) {SynErr(172); Get();}
+ while (!(StartOf(18))) {SynErr(172); Get();}
switch (la.kind) {
- case 15: {
+ case 20: {
BlockStmt(out bs, out bodyStart, out bodyEnd);
s = bs;
break;
@@ -1777,7 +1770,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
AssertStmt(out s);
break;
}
- case 80: {
+ case 13: {
AssumeStmt(out s);
break;
}
@@ -1785,19 +1778,19 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
PrintStmt(out s);
break;
}
- case 1: case 2: case 3: case 4: case 6: case 7: case 9: case 17: case 61: case 62: case 120: case 121: case 122: case 123: case 124: case 125: {
+ case 1: case 2: case 3: case 4: case 6: case 7: case 9: case 22: case 64: case 65: case 120: case 121: case 122: case 123: case 124: case 125: {
UpdateStmt(out s);
break;
}
- case 33: case 37: {
+ case 38: case 42: {
VarDeclStatement(out s);
break;
}
- case 84: {
+ case 86: {
IfStmt(out s);
break;
}
- case 87: {
+ case 88: {
WhileStmt(out s);
break;
}
@@ -1817,7 +1810,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
ModifyStmt(out s);
break;
}
- case 74: {
+ case 77: {
Get();
x = t;
NoUSIdent(out id);
@@ -1826,14 +1819,14 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
s.Labels = new LList<Label>(new Label(x, id.val), s.Labels);
break;
}
- case 75: {
+ case 78: {
Get();
x = t; breakCount = 1; label = null;
if (la.kind == 1) {
NoUSIdent(out id);
label = id.val;
- } else if (la.kind == 10 || la.kind == 75) {
- while (la.kind == 75) {
+ } else if (la.kind == 10 || la.kind == 78) {
+ while (la.kind == 78) {
Get();
breakCount++;
}
@@ -1843,11 +1836,11 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
s = label != null ? new BreakStmt(x, t, label) : new BreakStmt(x, t, breakCount);
break;
}
- case 57: case 78: {
+ case 60: case 81: {
ReturnStmt(out s);
break;
}
- case 45: {
+ case 50: {
SkeletonStmt(out s);
break;
}
@@ -1865,9 +1858,9 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
while (IsAttribute()) {
Attribute(ref attrs);
}
- if (StartOf(17)) {
+ if (StartOf(16)) {
Expression(out e, false, true);
- } else if (la.kind == 45) {
+ } else if (la.kind == 50) {
Get();
dotdotdot = t;
} else SynErr(176);
@@ -1885,14 +1878,14 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Expression e = dummyExpr; Attributes attrs = null;
IToken dotdotdot = null;
- Expect(80);
+ Expect(13);
x = t;
while (IsAttribute()) {
Attribute(ref attrs);
}
- if (StartOf(17)) {
+ if (StartOf(16)) {
Expression(out e, false, true);
- } else if (la.kind == 45) {
+ } else if (la.kind == 50) {
Get();
dotdotdot = t;
} else SynErr(177);
@@ -1913,7 +1906,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
x = t;
AttributeArg(out arg, false);
args.Add(arg);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
AttributeArg(out arg, false);
args.Add(arg);
@@ -1934,34 +1927,34 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Lhs(out e);
x = e.tok;
- if (la.kind == 10 || la.kind == 15) {
- while (la.kind == 15) {
+ if (la.kind == 10 || la.kind == 20) {
+ while (la.kind == 20) {
Attribute(ref attrs);
}
Expect(10);
endTok = t; rhss.Add(new ExprRhs(e, attrs));
- } else if (la.kind == 38 || la.kind == 77 || la.kind == 79) {
+ } else if (la.kind == 43 || la.kind == 80 || la.kind == 82) {
lhss.Add(e); lhs0 = e;
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
Lhs(out e);
lhss.Add(e);
}
- if (la.kind == 77) {
+ if (la.kind == 80) {
Get();
x = t;
Rhs(out r, lhs0);
rhss.Add(r);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
Rhs(out r, lhs0);
rhss.Add(r);
}
- } else if (la.kind == 79) {
+ } else if (la.kind == 82) {
Get();
x = t;
- if (la.kind == 80) {
- Get();
+ if (la.kind == _assume) {
+ Expect(13);
suchThatAssume = t;
}
Expression(out suchThat, false, true);
@@ -1995,34 +1988,34 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Attributes attrs = null;
IToken endTok;
- if (la.kind == 33) {
+ if (la.kind == 38) {
Get();
isGhost = true; x = t;
}
- Expect(37);
+ Expect(42);
if (!isGhost) { x = t; }
- while (la.kind == 15) {
+ while (la.kind == 20) {
Attribute(ref attrs);
}
LocalIdentTypeOptional(out d, isGhost);
lhss.Add(d); d.Attributes = attrs; attrs = null;
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
- while (la.kind == 15) {
+ while (la.kind == 20) {
Attribute(ref attrs);
}
LocalIdentTypeOptional(out d, isGhost);
lhss.Add(d); d.Attributes = attrs; attrs = null;
}
- if (la.kind == 77 || la.kind == 79) {
- if (la.kind == 77) {
+ if (la.kind == 80 || la.kind == 82) {
+ if (la.kind == 80) {
Get();
assignTok = t;
lhs0 = new IdentifierExpr(lhss[0].Tok, lhss[0].Name);
Rhs(out r, lhs0);
rhss.Add(r);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
Rhs(out r, lhs0);
rhss.Add(r);
@@ -2030,8 +2023,8 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
} else {
Get();
assignTok = t;
- if (la.kind == 80) {
- Get();
+ if (la.kind == _assume) {
+ Expect(13);
suchThatAssume = t;
}
Expression(out suchThat, false, true);
@@ -2070,13 +2063,13 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
List<GuardedAlternative> alternatives;
ifStmt = dummyStmt; // to please the compiler
- Expect(84);
+ Expect(86);
x = t;
if (IsAlternative()) {
AlternativeBlock(out alternatives, out endTok);
ifStmt = new AlternativeStmt(x, endTok, alternatives);
- } else if (StartOf(20)) {
- if (StartOf(21)) {
+ } else if (StartOf(19)) {
+ if (StartOf(20)) {
Guard(out guard);
} else {
Get();
@@ -2084,12 +2077,12 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
}
BlockStmt(out thn, out bodyStart, out bodyEnd);
endTok = thn.EndTok;
- if (la.kind == 85) {
+ if (la.kind == 87) {
Get();
- if (la.kind == 84) {
+ if (la.kind == 86) {
IfStmt(out s);
els = s; endTok = s.EndTok;
- } else if (la.kind == 15) {
+ } else if (la.kind == 20) {
BlockStmt(out bs, out bodyStart, out bodyEnd);
els = bs; endTok = bs.EndTok;
} else SynErr(180);
@@ -2117,14 +2110,14 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
stmt = dummyStmt; // to please the compiler
bool isDirtyLoop = true;
- Expect(87);
+ Expect(88);
x = t;
if (IsLoopSpecOrAlternative()) {
LoopSpec(out invariants, out decreases, out mod, ref decAttrs, ref modAttrs);
AlternativeBlock(out alternatives, out endTok);
stmt = new AlternativeLoopStmt(x, endTok, invariants, new Specification<Expression>(decreases, decAttrs), new Specification<FrameExpression>(mod, modAttrs), alternatives);
- } else if (StartOf(20)) {
- if (StartOf(21)) {
+ } else if (StartOf(19)) {
+ if (StartOf(20)) {
Guard(out guard);
Contract.Assume(guard == null || cce.Owner.None(guard));
} else {
@@ -2132,8 +2125,8 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
guardEllipsis = t;
}
LoopSpec(out invariants, out decreases, out mod, ref decAttrs, ref modAttrs);
- if (la.kind == 15 || la.kind == 45) {
- if (la.kind == 15) {
+ if (la.kind == 20 || la.kind == 50) {
+ if (la.kind == 20) {
BlockStmt(out body, out bodyStart, out bodyEnd);
endTok = body.EndTok; isDirtyLoop = false;
} else {
@@ -2170,18 +2163,19 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Expect(89);
x = t;
Expression(out e, true, true);
- if (la.kind == 15) {
- Get();
+ if (la.kind == _lbrace) {
+ Expect(20);
+ while (la.kind == 14) {
+ CaseStatement(out c);
+ cases.Add(c);
+ }
+ Expect(21);
usesOptionalBrace = true;
- }
- while (la.kind == 86) {
- CaseStatement(out c);
- cases.Add(c);
- }
- if (CloseOptionalBrace(usesOptionalBrace)) {
- Expect(16);
- } else if (StartOf(22)) {
- if (usesOptionalBrace) { SemErr(t, "expecting close curly brace"); }
+ } else if (StartOf(21)) {
+ while (la.kind == _case) {
+ CaseStatement(out c);
+ cases.Add(c);
+ }
} else SynErr(183);
s = new MatchStmt(x, t, e, cases, usesOptionalBrace);
}
@@ -2189,8 +2183,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
void ForallStmt(out Statement/*!*/ s) {
Contract.Ensures(Contract.ValueAtReturn(out s) != null);
IToken/*!*/ x = Token.NoToken;
- bool usesOptionalParen = false;
- List<BoundVar/*!*/> bvars = null;
+ List<BoundVar> bvars = null;
Attributes attrs = null;
Expression range = null;
var ens = new List<MaybeFreeExpression/*!*/>();
@@ -2209,39 +2202,35 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
errors.Warning(t, "the 'parallel' keyword has been deprecated; the comprehension statement now uses the keyword 'forall' (and the parentheses around the bound variables are now optional)");
} else SynErr(184);
- if (la.kind == 17) {
- Get();
- usesOptionalParen = true;
- }
- if (la.kind == 1) {
- List<BoundVar/*!*/> bvarsX; Attributes attrsX; Expression rangeX;
- QuantifierDomain(out bvarsX, out attrsX, out rangeX);
- bvars = bvarsX; attrs = attrsX; range = rangeX;
-
- }
+ if (la.kind == _openparen) {
+ Expect(22);
+ if (la.kind == 1) {
+ QuantifierDomain(out bvars, out attrs, out range);
+ }
+ Expect(23);
+ } else if (StartOf(22)) {
+ if (la.kind == _ident) {
+ QuantifierDomain(out bvars, out attrs, out range);
+ }
+ } else SynErr(185);
if (bvars == null) { bvars = new List<BoundVar>(); }
if (range == null) { range = new LiteralExpr(x, true); }
- if (CloseOptionalParen(usesOptionalParen)) {
- Expect(18);
- } else if (StartOf(23)) {
- if (usesOptionalParen) { SemErr(t, "expecting close parenthesis"); }
- } else SynErr(185);
- while (la.kind == 54 || la.kind == 55) {
+ while (la.kind == 58 || la.kind == 59) {
isFree = false;
- if (la.kind == 54) {
+ if (la.kind == 58) {
Get();
isFree = true;
errors.Warning(t, "the 'free' keyword is soon to be deprecated");
}
- Expect(55);
+ Expect(59);
Expression(out e, false, true);
ens.Add(new MaybeFreeExpression(e, isFree));
OldSemi();
tok = t;
}
- if (la.kind == 15) {
+ if (la.kind == _lbrace) {
BlockStmt(out block, out bodyStart, out bodyEnd);
}
if (DafnyOptions.O.DisallowSoundnessCheating && block == null && 0 < ens.Count) {
@@ -2271,7 +2260,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Expect(95);
x = t;
- if (StartOf(24)) {
+ if (StartOf(23)) {
CalcOp(out opTok, out calcOp);
maybeOp = calcOp.ResultOp(calcOp); // guard against non-transitive calcOp (like !=)
if (maybeOp == null) {
@@ -2280,12 +2269,12 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
resOp = calcOp;
}
- Expect(15);
- while (StartOf(17)) {
+ Expect(20);
+ while (StartOf(16)) {
Expression(out e, false, true);
lines.Add(e); stepOp = calcOp; danglingOperator = null;
Expect(10);
- if (StartOf(24)) {
+ if (StartOf(23)) {
CalcOp(out opTok, out op);
maybeOp = resOp.ResultOp(op);
if (maybeOp == null) {
@@ -2303,7 +2292,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
if (h.Body.Count != 0) { danglingOperator = null; }
}
- Expect(16);
+ Expect(21);
if (danglingOperator != null) {
SemErr(danglingOperator, "a calculation cannot end with an operator");
}
@@ -2327,27 +2316,25 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
while (IsAttribute()) {
Attribute(ref attrs);
}
- if (StartOf(25)) {
- if (StartOf(13)) {
+ if (StartOf(17)) {
+ FrameExpression(out fe);
+ mod.Add(fe);
+ while (la.kind == 43) {
+ Get();
FrameExpression(out fe);
mod.Add(fe);
- while (la.kind == 38) {
- Get();
- FrameExpression(out fe);
- mod.Add(fe);
- }
- } else {
- Get();
- ellipsisToken = t;
}
- }
- if (la.kind == 15) {
+ } else if (la.kind == 50) {
+ Get();
+ ellipsisToken = t;
+ } else SynErr(186);
+ if (la.kind == 20) {
BlockStmt(out body, out bodyStart, out endTok);
} else if (la.kind == 10) {
- while (!(la.kind == 0 || la.kind == 10)) {SynErr(186); Get();}
+ while (!(la.kind == 0 || la.kind == 10)) {SynErr(187); Get();}
Get();
endTok = t;
- } else SynErr(187);
+ } else SynErr(188);
s = new ModifyStmt(tok, endTok, mod, attrs, body);
if (ellipsisToken != null) {
s = new SkeletonStatement(s, ellipsisToken, null);
@@ -2361,17 +2348,17 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
AssignmentRhs r;
bool isYield = false;
- if (la.kind == 78) {
+ if (la.kind == 81) {
Get();
returnTok = t;
- } else if (la.kind == 57) {
+ } else if (la.kind == 60) {
Get();
returnTok = t; isYield = true;
- } else SynErr(188);
- if (StartOf(26)) {
+ } else SynErr(189);
+ if (StartOf(24)) {
Rhs(out r, null);
rhss = new List<AssignmentRhs>(); rhss.Add(r);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
Rhs(out r, null);
rhss.Add(r);
@@ -2391,22 +2378,22 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
List<Expression> exprs = null;
IToken tok, dotdotdot, whereTok;
Expression e;
- Expect(45);
+ Expect(50);
dotdotdot = t;
- if (la.kind == 76) {
+ if (la.kind == 79) {
Get();
names = new List<IToken>(); exprs = new List<Expression>(); whereTok = t;
Ident(out tok);
names.Add(tok);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
Ident(out tok);
names.Add(tok);
}
- Expect(77);
+ Expect(80);
Expression(out e, false, true);
exprs.Add(e);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
Expression(out e, false, true);
exprs.Add(e);
@@ -2430,29 +2417,29 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
r = dummyRhs; // to please compiler
Attributes attrs = null;
- if (la.kind == 81) {
+ if (la.kind == 83) {
Get();
newToken = t;
TypeAndToken(out x, out ty);
- if (la.kind == 17 || la.kind == 69 || la.kind == 82) {
- if (la.kind == 82) {
+ if (la.kind == 22 || la.kind == 72 || la.kind == 84) {
+ if (la.kind == 84) {
Get();
ee = new List<Expression>();
Expressions(ee);
- Expect(83);
+ Expect(85);
var tmp = theBuiltIns.ArrayType(ee.Count, new IntType(), true);
} else {
x = null; args = new List<Expression/*!*/>();
- if (la.kind == 69) {
+ if (la.kind == 72) {
Get();
Ident(out x);
}
- Expect(17);
- if (StartOf(17)) {
+ Expect(22);
+ if (StartOf(16)) {
Expressions(args);
}
- Expect(18);
+ Expect(23);
}
}
if (ee != null) {
@@ -2463,14 +2450,14 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
r = new TypeRhs(newToken, ty);
}
- } else if (la.kind == 19) {
+ } else if (la.kind == 24) {
Get();
r = new HavocRhs(t);
- } else if (StartOf(17)) {
+ } else if (StartOf(16)) {
Expression(out e, false, true);
r = new ExprRhs(e);
- } else SynErr(189);
- while (la.kind == 15) {
+ } else SynErr(190);
+ while (la.kind == 20) {
Attribute(ref attrs);
}
r.Attributes = attrs;
@@ -2481,24 +2468,24 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
if (la.kind == 1) {
DottedIdentifiersAndFunction(out e, false, false);
- while (la.kind == 69 || la.kind == 82) {
+ while (la.kind == 72 || la.kind == 84) {
Suffix(ref e);
}
ApplySuffix(ref e);
- } else if (StartOf(27)) {
+ } else if (StartOf(25)) {
ConstAtomExpression(out e, false, false);
Suffix(ref e);
- while (la.kind == 69 || la.kind == 82) {
+ while (la.kind == 72 || la.kind == 84) {
Suffix(ref e);
}
- } else SynErr(190);
+ } else SynErr(191);
}
void Expressions(List<Expression/*!*/>/*!*/ args) {
Contract.Requires(cce.NonNullElements(args)); Expression/*!*/ e;
Expression(out e, true, true);
args.Add(e);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
Expression(out e, true, true);
args.Add(e);
@@ -2511,36 +2498,36 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Expression e;
List<Statement> body;
- Expect(15);
- while (la.kind == 86) {
+ Expect(20);
+ while (la.kind == 14) {
Get();
x = t;
Expression(out e, true, false);
Expect(11);
body = new List<Statement>();
- while (StartOf(15)) {
+ while (StartOf(14)) {
Stmt(body);
}
alternatives.Add(new GuardedAlternative(x, e, body));
}
- Expect(16);
+ Expect(21);
endTok = t;
}
void Guard(out Expression e) {
Expression/*!*/ ee; e = null;
- if (la.kind == 19) {
+ if (la.kind == 24) {
Get();
e = null;
} else if (IsParenStar()) {
- Expect(17);
- Expect(19);
- Expect(18);
+ Expect(22);
+ Expect(24);
+ Expect(23);
e = null;
- } else if (StartOf(17)) {
+ } else if (StartOf(16)) {
Expression(out ee, true, true);
e = ee;
- } else SynErr(191);
+ } else SynErr(192);
}
void LoopSpec(out List<MaybeFreeExpression/*!*/> invariants, out List<Expression/*!*/> decreases, out List<FrameExpression/*!*/> mod, ref Attributes decAttrs, ref Attributes modAttrs) {
@@ -2550,13 +2537,13 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
decreases = new List<Expression/*!*/>();
mod = null;
- while (StartOf(28)) {
- if (la.kind == 54 || la.kind == 88) {
+ while (StartOf(26)) {
+ if (la.kind == 16 || la.kind == 58) {
Invariant(out invariant);
OldSemi();
invariants.Add(invariant);
- } else if (la.kind == 56) {
- while (!(la.kind == 0 || la.kind == 56)) {SynErr(192); Get();}
+ } else if (la.kind == 15) {
+ while (!(la.kind == 0 || la.kind == 15)) {SynErr(193); Get();}
Get();
while (IsAttribute()) {
Attribute(ref decAttrs);
@@ -2564,16 +2551,16 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
DecreasesList(decreases, true);
OldSemi();
} else {
- while (!(la.kind == 0 || la.kind == 53)) {SynErr(193); Get();}
+ while (!(la.kind == 0 || la.kind == 17)) {SynErr(194); Get();}
Get();
while (IsAttribute()) {
Attribute(ref modAttrs);
}
mod = mod ?? new List<FrameExpression>();
- if (StartOf(13)) {
+ if (StartOf(17)) {
FrameExpression(out fe);
mod.Add(fe);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
FrameExpression(out fe);
mod.Add(fe);
@@ -2586,14 +2573,14 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
void Invariant(out MaybeFreeExpression/*!*/ invariant) {
bool isFree = false; Expression/*!*/ e; List<string> ids = new List<string>(); invariant = null; Attributes attrs = null;
- while (!(la.kind == 0 || la.kind == 54 || la.kind == 88)) {SynErr(194); Get();}
- if (la.kind == 54) {
+ while (!(la.kind == 0 || la.kind == 16 || la.kind == 58)) {SynErr(195); Get();}
+ if (la.kind == 58) {
Get();
isFree = true;
errors.Warning(t, "the 'free' keyword is soon to be deprecated");
}
- Expect(88);
+ Expect(16);
while (IsAttribute()) {
Attribute(ref attrs);
}
@@ -2608,22 +2595,22 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
BoundVar/*!*/ bv;
List<Statement/*!*/> body = new List<Statement/*!*/>();
- Expect(86);
+ Expect(14);
x = t;
Ident(out id);
- if (la.kind == 17) {
+ if (la.kind == 22) {
Get();
IdentTypeOptional(out bv);
arguments.Add(bv);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
IdentTypeOptional(out bv);
arguments.Add(bv);
}
- Expect(18);
+ Expect(23);
}
Expect(11);
- while (StartOf(15)) {
+ while (StartOf(14)) {
Stmt(body);
}
c = new MatchCaseStmt(x, id.val, arguments, body);
@@ -2643,7 +2630,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
IdentTypeOptional(out bv);
bvars.Add(bv);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
IdentTypeOptional(out bv);
bvars.Add(bv);
@@ -2651,8 +2638,8 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
while (IsAttribute()) {
Attribute(ref attrs);
}
- if (la.kind == 9) {
- Get();
+ if (la.kind == _verticalbar) {
+ Expect(9);
Expression(out range, true, true);
}
}
@@ -2663,23 +2650,23 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
x = null;
switch (la.kind) {
- case 41: {
+ case 46: {
Get();
x = t; binOp = BinaryExpr.Opcode.Eq;
if (la.kind == 96) {
Get();
- Expect(82);
+ Expect(84);
Expression(out k, true, true);
- Expect(83);
+ Expect(85);
}
break;
}
- case 46: {
+ case 51: {
Get();
x = t; binOp = BinaryExpr.Opcode.Lt;
break;
}
- case 47: {
+ case 52: {
Get();
x = t; binOp = BinaryExpr.Opcode.Gt;
break;
@@ -2729,7 +2716,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
x = t; binOp = BinaryExpr.Opcode.Exp;
break;
}
- default: SynErr(195); break;
+ default: SynErr(196); break;
}
if (k == null) {
op = new Microsoft.Dafny.CalcStmt.BinaryCalcOp(binOp);
@@ -2748,8 +2735,8 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Token x = la;
IToken endTok = x;
- while (la.kind == 15 || la.kind == 95) {
- if (la.kind == 15) {
+ while (la.kind == 20 || la.kind == 95) {
+ if (la.kind == 20) {
BlockStmt(out block, out bodyStart, out bodyEnd);
endTok = block.EndTok; subhints.Add(block);
} else {
@@ -2766,7 +2753,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Get();
} else if (la.kind == 104) {
Get();
- } else SynErr(196);
+ } else SynErr(197);
}
void ImpliesOp() {
@@ -2774,7 +2761,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Get();
} else if (la.kind == 106) {
Get();
- } else SynErr(197);
+ } else SynErr(198);
}
void ExpliesOp() {
@@ -2782,7 +2769,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Get();
} else if (la.kind == 108) {
Get();
- } else SynErr(198);
+ } else SynErr(199);
}
void EquivExpression(out Expression e0, bool allowSemi, bool allowLambda) {
@@ -2799,7 +2786,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
void ImpliesExpliesExpression(out Expression e0, bool allowSemi, bool allowLambda) {
Contract.Ensures(Contract.ValueAtReturn(out e0) != null); IToken/*!*/ x; Expression/*!*/ e1;
LogicalExpression(out e0, allowSemi, allowLambda);
- if (StartOf(29)) {
+ if (StartOf(27)) {
if (la.kind == 105 || la.kind == 106) {
ImpliesOp();
x = t;
@@ -2823,7 +2810,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
void LogicalExpression(out Expression e0, bool allowSemi, bool allowLambda) {
Contract.Ensures(Contract.ValueAtReturn(out e0) != null); IToken/*!*/ x; Expression/*!*/ e1;
RelationalExpression(out e0, allowSemi, allowLambda);
- if (StartOf(30)) {
+ if (StartOf(28)) {
if (la.kind == 109 || la.kind == 110) {
AndOp();
x = t;
@@ -2877,7 +2864,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Term(out e0, allowSemi, allowLambda);
e = e0;
- if (StartOf(31)) {
+ if (StartOf(29)) {
RelOp(out x, out op, out k);
firstOpTok = x;
Term(out e1, allowSemi, allowLambda);
@@ -2890,7 +2877,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
e = new TernaryExpr(x, op == BinaryExpr.Opcode.Eq ? TernaryExpr.Opcode.PrefixEqOp : TernaryExpr.Opcode.PrefixNeqOp, k, e0, e1);
}
- while (StartOf(31)) {
+ while (StartOf(29)) {
if (chain == null) {
chain = new List<Expression>();
ops = new List<BinaryExpr.Opcode>();
@@ -2967,7 +2954,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Get();
} else if (la.kind == 110) {
Get();
- } else SynErr(199);
+ } else SynErr(200);
}
void OrOp() {
@@ -2975,7 +2962,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Get();
} else if (la.kind == 112) {
Get();
- } else SynErr(200);
+ } else SynErr(201);
}
void Term(out Expression e0, bool allowSemi, bool allowLambda) {
@@ -2995,23 +2982,23 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
k = null;
switch (la.kind) {
- case 41: {
+ case 46: {
Get();
x = t; op = BinaryExpr.Opcode.Eq;
if (la.kind == 96) {
Get();
- Expect(82);
+ Expect(84);
Expression(out k, true, true);
- Expect(83);
+ Expect(85);
}
break;
}
- case 46: {
+ case 51: {
Get();
x = t; op = BinaryExpr.Opcode.Lt;
break;
}
- case 47: {
+ case 52: {
Get();
x = t; op = BinaryExpr.Opcode.Gt;
break;
@@ -3031,9 +3018,9 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
x = t; op = BinaryExpr.Opcode.Neq;
if (la.kind == 96) {
Get();
- Expect(82);
+ Expect(84);
Expression(out k, true, true);
- Expect(83);
+ Expect(85);
}
break;
}
@@ -3042,7 +3029,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
x = t; op = BinaryExpr.Opcode.In;
break;
}
- case 20: {
+ case 25: {
Get();
x = t; op = BinaryExpr.Opcode.NotIn;
break;
@@ -3080,14 +3067,14 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
x = t; op = BinaryExpr.Opcode.Ge;
break;
}
- default: SynErr(201); break;
+ default: SynErr(202); break;
}
}
void Factor(out Expression e0, bool allowSemi, bool allowLambda) {
Contract.Ensures(Contract.ValueAtReturn(out e0) != null); IToken/*!*/ x; Expression/*!*/ e1; BinaryExpr.Opcode op;
UnaryExpression(out e0, allowSemi, allowLambda);
- while (la.kind == 19 || la.kind == 117 || la.kind == 118) {
+ while (la.kind == 24 || la.kind == 117 || la.kind == 118) {
MulOp(out x, out op);
UnaryExpression(out e1, allowSemi, allowLambda);
e0 = new BinaryExpr(x, op, e0, e1);
@@ -3102,7 +3089,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
} else if (la.kind == 116) {
Get();
x = t; op = BinaryExpr.Opcode.Sub;
- } else SynErr(202);
+ } else SynErr(203);
}
void UnaryExpression(out Expression e, bool allowSemi, bool allowLambda) {
@@ -3122,61 +3109,61 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
e = new UnaryOpExpr(x, UnaryOpExpr.Opcode.Not, e);
break;
}
- case 33: case 37: case 63: case 74: case 80: case 84: case 89: case 90: case 92: case 95: case 128: case 129: case 130: {
+ case 13: case 38: case 42: case 66: case 77: case 86: case 89: case 90: case 92: case 95: case 128: case 129: case 130: {
EndlessExpression(out e, allowSemi, allowLambda);
break;
}
case 1: {
DottedIdentifiersAndFunction(out e, allowSemi, allowLambda);
- while (la.kind == 69 || la.kind == 82) {
+ while (la.kind == 72 || la.kind == 84) {
Suffix(ref e);
}
ApplySuffix(ref e);
break;
}
- case 15: case 82: {
+ case 20: case 84: {
DisplayExpr(out e);
- while (la.kind == 69 || la.kind == 82) {
+ while (la.kind == 72 || la.kind == 84) {
Suffix(ref e);
}
break;
}
- case 64: {
+ case 67: {
MultiSetExpr(out e);
- while (la.kind == 69 || la.kind == 82) {
+ while (la.kind == 72 || la.kind == 84) {
Suffix(ref e);
}
break;
}
- case 67: {
+ case 70: {
Get();
x = t;
- if (la.kind == 82) {
+ if (la.kind == 84) {
MapDisplayExpr(x, out e);
- while (la.kind == 69 || la.kind == 82) {
+ while (la.kind == 72 || la.kind == 84) {
Suffix(ref e);
}
} else if (la.kind == 1) {
MapComprehensionExpr(x, out e, allowSemi);
- } else if (StartOf(32)) {
+ } else if (StartOf(30)) {
SemErr("map must be followed by literal in brackets or comprehension.");
- } else SynErr(203);
+ } else SynErr(204);
break;
}
- case 2: case 3: case 4: case 6: case 7: case 9: case 17: case 61: case 62: case 120: case 121: case 122: case 123: case 124: case 125: {
+ case 2: case 3: case 4: case 6: case 7: case 9: case 22: case 64: case 65: case 120: case 121: case 122: case 123: case 124: case 125: {
ConstAtomExpression(out e, allowSemi, allowLambda);
- while (la.kind == 69 || la.kind == 82) {
+ while (la.kind == 72 || la.kind == 84) {
Suffix(ref e);
}
break;
}
- default: SynErr(204); break;
+ default: SynErr(205); break;
}
}
void MulOp(out IToken x, out BinaryExpr.Opcode op) {
Contract.Ensures(Contract.ValueAtReturn(out x) != null); x = Token.NoToken; op = BinaryExpr.Opcode.Add/*(dummy)*/;
- if (la.kind == 19) {
+ if (la.kind == 24) {
Get();
x = t; op = BinaryExpr.Opcode.Mul;
} else if (la.kind == 117) {
@@ -3185,7 +3172,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
} else if (la.kind == 118) {
Get();
x = t; op = BinaryExpr.Opcode.Mod;
- } else SynErr(205);
+ } else SynErr(206);
}
void NegOp() {
@@ -3193,7 +3180,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Get();
} else if (la.kind == 119) {
Get();
- } else SynErr(206);
+ } else SynErr(207);
}
void EndlessExpression(out Expression e, bool allowSemi, bool allowLambda) {
@@ -3203,13 +3190,13 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
e = dummyExpr;
switch (la.kind) {
- case 84: {
+ case 86: {
Get();
x = t;
Expression(out e, true, true);
Expect(126);
Expression(out e0, true, true);
- Expect(85);
+ Expect(87);
Expression(out e1, allowSemi, allowLambda);
e = new ITEExpr(x, e, e0, e1);
break;
@@ -3222,25 +3209,25 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
QuantifierGuts(out e, allowSemi, allowLambda);
break;
}
- case 63: {
+ case 66: {
ComprehensionExpr(out e, allowSemi, allowLambda);
break;
}
- case 80: case 90: case 95: {
+ case 13: case 90: case 95: {
StmtInExpr(out s);
Expression(out e, allowSemi, allowLambda);
e = new StmtExpr(s.Tok, s, e);
break;
}
- case 33: case 37: {
+ case 38: case 42: {
LetExpr(out e, allowSemi, allowLambda);
break;
}
- case 74: {
+ case 77: {
NamedExpr(out e, allowSemi, allowLambda);
break;
}
- default: SynErr(207); break;
+ default: SynErr(208); break;
}
}
@@ -3253,28 +3240,28 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Ident(out id);
idents.Add(id);
- while (la.kind == 69) {
+ while (la.kind == 72) {
IdentOrDigitsSuffix(out id, out idPrime);
idents.Add(id);
if (idPrime != null) { idents.Add(idPrime); id = idPrime; }
}
- if (la.kind == 17 || la.kind == 96) {
+ if (la.kind == 22 || la.kind == 96) {
args = new List<Expression>();
if (la.kind == 96) {
Get();
id.val = id.val + "#"; Expression k;
- Expect(82);
+ Expect(84);
Expression(out k, true, true);
- Expect(83);
+ Expect(85);
args.Add(k);
}
- Expect(17);
+ Expect(22);
openParen = t;
- if (StartOf(17)) {
+ if (StartOf(16)) {
Expressions(args);
}
- Expect(18);
+ Expect(23);
}
if (IsLambda(allowLambda)) {
Expression body = null;
@@ -3311,7 +3298,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
List<Expression> multipleIndices = null;
bool func = false;
- if (la.kind == 69) {
+ if (la.kind == 72) {
IdentOrDigitsSuffix(out id, out x);
if (x != null) {
// process id as a Suffix in its own right
@@ -3319,43 +3306,43 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
id = x; // move to the next Suffix
}
- if (la.kind == 17 || la.kind == 96) {
+ if (la.kind == 22 || la.kind == 96) {
args = new List<Expression/*!*/>(); func = true;
if (la.kind == 96) {
Get();
id.val = id.val + "#"; Expression k;
- Expect(82);
+ Expect(84);
Expression(out k, true, true);
- Expect(83);
+ Expect(85);
args.Add(k);
}
- Expect(17);
+ Expect(22);
IToken openParen = t;
- if (StartOf(17)) {
+ if (StartOf(16)) {
Expressions(args);
}
- Expect(18);
+ Expect(23);
e = new FunctionCallExpr(id, id.val, e, openParen, args);
}
if (!func) { e = new ExprDotName(id, e, id.val); }
- } else if (la.kind == 82) {
+ } else if (la.kind == 84) {
Get();
x = t;
- if (StartOf(17)) {
+ if (StartOf(16)) {
Expression(out ee, true, true);
e0 = ee;
if (la.kind == 127) {
Get();
anyDots = true;
- if (StartOf(17)) {
+ if (StartOf(16)) {
Expression(out ee, true, true);
e1 = ee;
}
- } else if (la.kind == 77) {
+ } else if (la.kind == 80) {
Get();
Expression(out ee, true, true);
e1 = ee;
- } else if (la.kind == 8 || la.kind == 83) {
+ } else if (la.kind == 8 || la.kind == 85) {
while (la.kind == 8) {
Get();
if (multipleLengths == null) {
@@ -3364,15 +3351,15 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
}
takeRest = true;
- if (StartOf(17)) {
+ if (StartOf(16)) {
Expression(out ee, true, true);
multipleLengths.Add(ee);
takeRest = false;
}
}
- } else if (la.kind == 38 || la.kind == 83) {
- while (la.kind == 38) {
+ } else if (la.kind == 43 || la.kind == 85) {
+ while (la.kind == 43) {
Get();
Expression(out ee, true, true);
if (multipleIndices == null) {
@@ -3382,15 +3369,15 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
multipleIndices.Add(ee);
}
- } else SynErr(208);
+ } else SynErr(209);
} else if (la.kind == 127) {
Get();
anyDots = true;
- if (StartOf(17)) {
+ if (StartOf(16)) {
Expression(out ee, true, true);
e1 = ee;
}
- } else SynErr(209);
+ } else SynErr(210);
if (multipleIndices != null) {
e = new MultiSelectExpr(x, e, multipleIndices);
// make sure an array class with this dimensionality exists
@@ -3430,19 +3417,19 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
}
}
- Expect(83);
- } else SynErr(210);
+ Expect(85);
+ } else SynErr(211);
ApplySuffix(ref e);
}
void ApplySuffix(ref Expression e) {
- while (la.kind == 17) {
+ while (la.kind == 22) {
Get();
IToken openParen = t; var args = new List<Expression>();
- if (StartOf(17)) {
+ if (StartOf(16)) {
Expressions(args);
}
- Expect(18);
+ Expect(23);
e = new ApplyExpr(e.tok, openParen, e, args);
}
}
@@ -3452,23 +3439,23 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
IToken/*!*/ x = null; List<Expression/*!*/>/*!*/ elements;
e = dummyExpr;
- if (la.kind == 15) {
+ if (la.kind == 20) {
Get();
x = t; elements = new List<Expression/*!*/>();
- if (StartOf(17)) {
+ if (StartOf(16)) {
Expressions(elements);
}
e = new SetDisplayExpr(x, elements);
- Expect(16);
- } else if (la.kind == 82) {
+ Expect(21);
+ } else if (la.kind == 84) {
Get();
x = t; elements = new List<Expression/*!*/>();
- if (StartOf(17)) {
+ if (StartOf(16)) {
Expressions(elements);
}
e = new SeqDisplayExpr(x, elements);
- Expect(83);
- } else SynErr(211);
+ Expect(85);
+ } else SynErr(212);
}
void MultiSetExpr(out Expression e) {
@@ -3476,25 +3463,25 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
IToken/*!*/ x = null; List<Expression/*!*/>/*!*/ elements;
e = dummyExpr;
- Expect(64);
+ Expect(67);
x = t;
- if (la.kind == 15) {
+ if (la.kind == 20) {
Get();
elements = new List<Expression/*!*/>();
- if (StartOf(17)) {
+ if (StartOf(16)) {
Expressions(elements);
}
e = new MultiSetDisplayExpr(x, elements);
- Expect(16);
- } else if (la.kind == 17) {
+ Expect(21);
+ } else if (la.kind == 22) {
Get();
x = t; elements = new List<Expression/*!*/>();
Expression(out e, true, true);
e = new MultiSetFormingExpr(x, e);
- Expect(18);
- } else if (StartOf(32)) {
+ Expect(23);
+ } else if (StartOf(30)) {
SemErr("multiset must be followed by multiset literal or expression to coerce in parentheses.");
- } else SynErr(212);
+ } else SynErr(213);
}
void MapDisplayExpr(IToken/*!*/ mapToken, out Expression e) {
@@ -3502,12 +3489,12 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
List<ExpressionPair/*!*/>/*!*/ elements= new List<ExpressionPair/*!*/>() ;
e = dummyExpr;
- Expect(82);
- if (StartOf(17)) {
+ Expect(84);
+ if (StartOf(16)) {
MapLiteralExpressions(out elements);
}
e = new MapDisplayExpr(mapToken, elements);
- Expect(83);
+ Expect(85);
}
void MapComprehensionExpr(IToken mapToken, out Expression e, bool allowSemi) {
@@ -3581,18 +3568,18 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
case 124: {
Get();
x = t;
- Expect(17);
+ Expect(22);
Expression(out e, true, true);
- Expect(18);
+ Expect(23);
e = new UnaryOpExpr(x, UnaryOpExpr.Opcode.Fresh, e);
break;
}
case 125: {
Get();
x = t;
- Expect(17);
+ Expect(22);
Expression(out e, true, true);
- Expect(18);
+ Expect(23);
e = new OldExpr(x, e);
break;
}
@@ -3604,25 +3591,25 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Expect(9);
break;
}
- case 61: case 62: {
- if (la.kind == 61) {
+ case 64: case 65: {
+ if (la.kind == 64) {
Get();
x = t; toType = new IntType();
} else {
Get();
x = t; toType = new RealType();
}
- Expect(17);
+ Expect(22);
Expression(out e, true, true);
- Expect(18);
+ Expect(23);
e = new ConversionExpr(x, e, toType);
break;
}
- case 17: {
+ case 22: {
ParensExpression(out e, allowSemi, allowLambda);
break;
}
- default: SynErr(213); break;
+ default: SynErr(214); break;
}
}
@@ -3651,7 +3638,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
n = BigInteger.Zero;
}
- } else SynErr(214);
+ } else SynErr(215);
}
void Dec(out Basetypes.BigDec d) {
@@ -3676,18 +3663,18 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Type tt;
bool isLambda = false;
- Expect(17);
+ Expect(22);
x = t;
- if (StartOf(17)) {
+ if (StartOf(16)) {
OptTypedExpr(out ee, out tt, true);
args.Add(ee); types.Add(tt);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
OptTypedExpr(out ee, out tt, true);
args.Add(ee); types.Add(tt);
}
}
- Expect(18);
+ Expect(23);
if (IsLambda(allowLambda)) {
Expression body = null;
Expression req = null;
@@ -3741,13 +3728,13 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
if (!isLambda && args.Count == 1 && la.kind == _openparen) {
IToken openParen;
- while (la.kind == 17) {
+ while (la.kind == 22) {
Get();
openParen = t; args = new List<Expression>();
- if (StartOf(17)) {
+ if (StartOf(16)) {
Expressions(args);
}
- Expect(18);
+ Expect(23);
e = new ApplyExpr(x, openParen, e, args);
}
}
@@ -3761,7 +3748,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
} else if (la.kind == 12) {
Get();
oneShot = true;
- } else SynErr(215);
+ } else SynErr(216);
}
void OptTypedExpr(out Expression e, out Type tt, bool allowSemi) {
@@ -3777,13 +3764,13 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Expression/*!*/ d, r;
elements = new List<ExpressionPair/*!*/>();
Expression(out d, true, true);
- Expect(77);
+ Expect(80);
Expression(out r, true, true);
elements.Add(new ExpressionPair(d,r));
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
Expression(out d, true, true);
- Expect(77);
+ Expect(80);
Expression(out r, true, true);
elements.Add(new ExpressionPair(d,r));
}
@@ -3794,7 +3781,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Get();
} else if (la.kind == 132) {
Get();
- } else SynErr(216);
+ } else SynErr(217);
}
void MatchExpression(out Expression e, bool allowSemi, bool allowLambda) {
@@ -3805,19 +3792,19 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Expect(89);
x = t;
Expression(out e, allowSemi, true);
- if (la.kind == 15) {
+ if (la.kind == 20) {
Get();
usesOptionalBrace = true;
}
- while (la.kind == 86) {
+ while (la.kind == 14) {
CaseExpression(out c, allowSemi, usesOptionalBrace || allowLambda);
cases.Add(c);
}
if (CloseOptionalBrace(usesOptionalBrace)) {
- Expect(16);
- } else if (StartOf(32)) {
+ Expect(21);
+ } else if (StartOf(30)) {
if (usesOptionalBrace) { SemErr(t, "expecting close curly brace"); }
- } else SynErr(217);
+ } else SynErr(218);
e = new MatchExpr(x, e, cases, usesOptionalBrace);
}
@@ -3835,7 +3822,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
} else if (la.kind == 129 || la.kind == 130) {
Exists();
x = t;
- } else SynErr(218);
+ } else SynErr(219);
QuantifierDomain(out bvars, out attrs, out range);
QSep();
Expression(out body, allowSemi, allowLambda);
@@ -3855,11 +3842,11 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Expression range;
Expression body = null;
- Expect(63);
+ Expect(66);
x = t;
IdentTypeOptional(out bv);
bvars.Add(bv);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
IdentTypeOptional(out bv);
bvars.Add(bv);
@@ -3879,11 +3866,11 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
s = dummyStmt;
if (la.kind == 90) {
AssertStmt(out s);
- } else if (la.kind == 80) {
+ } else if (la.kind == 13) {
AssumeStmt(out s);
} else if (la.kind == 95) {
CalcStmt(out s);
- } else SynErr(219);
+ } else SynErr(220);
}
void LetExpr(out Expression e, bool allowSemi, bool allowLambda) {
@@ -3895,26 +3882,26 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
bool exact = true;
e = dummyExpr;
- if (la.kind == 33) {
+ if (la.kind == 38) {
Get();
isGhost = true; x = t;
}
- Expect(37);
+ Expect(42);
if (!isGhost) { x = t; }
CasePattern(out pat);
if (isGhost) { pat.Vars.Iter(bv => bv.IsGhost = true); }
letLHSs.Add(pat);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
CasePattern(out pat);
if (isGhost) { pat.Vars.Iter(bv => bv.IsGhost = true); }
letLHSs.Add(pat);
}
- if (la.kind == 77) {
+ if (la.kind == 80) {
Get();
- } else if (la.kind == 79) {
+ } else if (la.kind == 82) {
Get();
exact = false;
foreach (var lhs in letLHSs) {
@@ -3923,10 +3910,10 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
}
}
- } else SynErr(220);
+ } else SynErr(221);
Expression(out e, false, true);
letRHSs.Add(e);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
Expression(out e, false, true);
letRHSs.Add(e);
@@ -3941,7 +3928,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
e = dummyExpr;
Expression expr;
- Expect(74);
+ Expect(77);
x = t;
NoUSIdent(out d);
Expect(8);
@@ -3957,24 +3944,24 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
if (IsIdentParen()) {
Ident(out id);
- Expect(17);
+ Expect(22);
arguments = new List<CasePattern>();
if (la.kind == 1) {
CasePattern(out pat);
arguments.Add(pat);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
CasePattern(out pat);
arguments.Add(pat);
}
}
- Expect(18);
+ Expect(23);
pat = new CasePattern(id, id.val, arguments);
} else if (la.kind == 1) {
IdentTypeOptional(out bv);
pat = new CasePattern(bv.tok, bv);
- } else SynErr(221);
+ } else SynErr(222);
if (pat == null) {
pat = new CasePattern(t, "_ParseError", new List<CasePattern>());
}
@@ -3987,19 +3974,19 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
BoundVar/*!*/ bv;
Expression/*!*/ body;
- Expect(86);
+ Expect(14);
x = t;
Ident(out id);
- if (la.kind == 17) {
+ if (la.kind == 22) {
Get();
IdentTypeOptional(out bv);
arguments.Add(bv);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
IdentTypeOptional(out bv);
arguments.Add(bv);
}
- Expect(18);
+ Expect(23);
}
Expect(11);
Expression(out body, allowSemi, allowLambda);
@@ -4011,7 +3998,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Get();
} else if (la.kind == 128) {
Get();
- } else SynErr(222);
+ } else SynErr(223);
}
void Exists() {
@@ -4019,7 +4006,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Get();
} else if (la.kind == 130) {
Get();
- } else SynErr(223);
+ } else SynErr(224);
}
void AttributeBody(ref Attributes attrs) {
@@ -4030,10 +4017,10 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
Expect(8);
Expect(1);
aName = t.val;
- if (StartOf(17)) {
+ if (StartOf(16)) {
AttributeArg(out aArg, true);
aArgs.Add(aArg);
- while (la.kind == 38) {
+ while (la.kind == 43) {
Get();
AttributeArg(out aArg, true);
aArgs.Add(aArg);
@@ -4055,39 +4042,37 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
}
static readonly bool[,]/*!*/ set = {
- {T,T,T,T, T,x,T,T, x,T,T,x, x,T,T,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,T,x,T, T,T,x,x, x,x,T,x, x,T,x,x, T,T,T,T, T,T,T,T, T,T,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,T,x, T,x,x,x, T,x,x,T, T,T,T,T, T,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, T,T,x,x, x,x,x,x, x,x,x},
- {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,T,x,x, x,x,T,x, T,T,T,T, T,T,x,T, T,x,T,x, x,x,x,x, T,T,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
- {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, T,T,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
- {x,T,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
- {T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, T,x,x,x, x,x,T,T, x,T,x,T, x,x,T,x, T,T,T,T, T,T,x,T, T,x,T,x, x,x,T,x, T,T,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
- {x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
- {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
- {T,x,x,x, x,x,x,x, T,x,x,x, x,T,T,T, T,T,x,x, x,x,T,T, x,T,x,x, x,x,T,x, T,T,T,T, T,T,x,T, T,x,T,x, x,x,T,x, T,T,T,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
- {x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
- {T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
- {x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
- {x,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
- {T,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
- {x,T,T,T, T,x,T,T, x,T,x,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,x,x,T, x,x,x,x, x,T,T,x, x,x,x,x, T,x,T,x, T,x,x,x, x,T,T,x, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,T, T,T,T,T, T,T,x,x, T,T,T,x, x,x,x},
- {x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
- {x,T,T,T, T,x,T,T, x,T,x,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,T,x, T,x,x,x, T,x,x,T, x,T,T,T, T,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, T,T,x,x, x,x,x,x, x,x,x},
- {T,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
- {x,T,T,T, T,x,T,T, x,T,x,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,x,x,T, x,x,x,x, x,x,T,x, x,x,x,x, T,x,T,x, T,x,x,x, x,T,T,x, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,T, T,T,T,T, T,T,x,x, T,T,T,x, x,x,x},
- {x,T,T,T, T,x,T,T, x,T,x,x, x,x,x,T, x,T,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,x,x,T, x,x,x,x, x,T,T,x, x,x,x,x, T,x,T,x, T,x,x,x, x,T,T,x, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,T, T,T,T,T, T,T,x,x, T,T,T,x, x,x,x},
- {T,T,T,T, T,x,T,T, x,T,x,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,T,x, T,x,x,x, T,x,x,T, x,T,T,T, T,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, T,T,x,x, x,x,x,x, x,x,x},
- {x,T,T,T, T,x,T,T, x,T,x,x, x,x,x,T, x,T,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,x,x,T, x,x,x,x, x,x,T,x, x,x,x,x, T,x,T,x, T,x,x,x, x,T,T,x, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,T, T,T,T,T, T,T,x,x, T,T,T,x, x,x,x},
- {x,T,T,T, T,x,T,T, x,T,x,x, x,x,x,T, x,T,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,x,x,T, x,x,x,x, x,x,T,x, x,x,x,x, T,x,T,x, T,x,x,x, x,T,T,x, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,T, T,T,T,T, T,T,x,x, T,T,T,x, x,x,x},
- {x,T,T,T, T,x,T,T, x,T,x,x, x,x,x,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,T,x, T,x,x,x, T,x,T,T, x,T,T,T, T,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, T,T,x,x, x,x,x,x, x,x,x},
- {x,T,T,T, T,x,T,T, x,T,x,x, x,x,x,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,T,T, x,T,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,T,x, T,x,x,x, T,x,T,T, x,T,T,T, T,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, T,T,x,x, x,x,x,x, x,x,x},
- {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,T,T,T, T,T,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
- {x,T,T,T, T,x,T,T, x,T,x,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,x,x,T, x,x,x,x, x,T,T,x, x,x,x,x, T,x,T,x, T,x,x,x, x,T,T,x, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,T, T,T,T,T, T,T,x,x, T,T,T,x, x,x,x},
- {x,T,T,T, T,x,T,T, x,T,x,x, x,x,x,T, x,T,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,x,x,T, x,x,x,x, x,x,T,x, x,x,x,x, T,T,T,x, T,x,x,x, x,T,T,x, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,T, T,T,T,T, T,T,x,x, T,T,T,x, x,x,x},
- {x,x,T,T, T,x,T,T, x,T,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, T,T,x,x, x,x,x,x, x,x,x},
- {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
+ {T,T,T,T, T,x,T,T, x,T,T,x, x,T,x,T, T,T,T,T, T,x,T,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,T,x, T,T,T,x, x,x,x,T, x,x,T,x, x,T,T,T, T,T,T,T, T,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,T,x,x, x,x,T,x, T,T,T,T, T,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, T,T,x,x, x,x,x,x, x,x,x},
+ {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,T,x, x,x,x,T, x,T,T,T, T,T,T,x, T,T,x,T, x,x,x,x, x,T,T,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
+ {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,T,x, x,x,x,x, x,x,x,x, x,T,T,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
+ {x,T,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,T,T,T, T,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
+ {T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, T,x,T,x, T,x,x,T, x,T,T,T, T,T,T,x, T,T,x,T, x,x,x,T, x,T,T,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
+ {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
+ {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
+ {T,x,x,x, x,x,x,x, T,x,x,x, x,x,x,T, x,x,T,T, T,T,T,x, x,x,x,T, T,x,T,x, x,x,x,T, x,T,T,T, T,T,T,x, T,T,x,T, x,x,x,T, x,T,T,T, T,T,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
+ {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
+ {T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
+ {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
+ {x,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,T,T,T, T,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
+ {T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
+ {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
+ {x,T,T,T, T,x,T,T, x,T,x,x, x,T,x,x, x,x,x,x, T,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, T,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,T,x,x, x,x,T,x, T,T,T,T, T,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, T,T,x,x, x,x,x,x, x,x,x},
+ {T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
+ {x,T,T,T, T,x,T,T, x,T,x,x, x,T,x,x, x,x,x,x, T,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, T,x,T,x, x,T,T,x, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,T, T,T,T,T, T,T,x,x, T,T,T,x, x,x,x},
+ {x,T,T,T, T,x,T,T, x,T,x,x, x,T,x,x, x,x,x,x, T,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, x,x,T,x, x,x,x,x, T,T,x,x, x,x,x,x, T,x,T,x, x,T,T,x, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,T, T,T,T,T, T,T,x,x, T,T,T,x, x,x,x},
+ {T,T,T,T, T,x,T,T, x,T,x,x, x,T,x,x, x,x,x,x, T,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, T,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,T,x,x, x,x,T,x, T,T,T,T, T,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, T,T,x,x, x,x,x,x, x,x,x},
+ {x,T,T,T, T,x,T,T, x,T,x,x, x,T,x,x, x,x,x,x, T,x,T,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, T,x,T,x, x,T,T,x, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,T, T,T,T,T, T,T,x,x, T,T,T,x, x,x,x},
+ {x,T,T,T, T,x,T,T, x,T,x,x, x,T,x,x, x,x,x,x, T,x,T,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, T,x,T,x, x,T,T,x, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,T, T,T,T,T, T,T,x,x, T,T,T,x, x,x,x},
+ {x,T,T,T, T,x,T,T, x,T,x,x, x,T,T,x, x,x,x,x, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, T,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,T,x,x, x,x,T,x, T,T,T,T, T,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, T,T,x,x, x,x,x,x, x,x,x},
+ {x,T,T,T, T,x,T,T, x,T,x,x, x,T,T,x, x,x,x,x, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,T,T, T,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,T,x,x, x,x,T,x, T,T,T,T, T,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, T,T,x,x, x,x,x,x, x,x,x},
+ {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,T,T,T, T,T,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
+ {x,T,T,T, T,x,T,T, x,T,x,x, x,T,x,x, x,x,x,x, T,x,T,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,T, T,x,T,x, x,T,T,x, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,T, T,T,T,T, T,T,x,x, T,T,T,x, x,x,x},
+ {x,x,T,T, T,x,T,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,T,T, T,T,x,x, x,x,x,x, x,x,x},
+ {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
- {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,T,T,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
- {T,T,T,T, T,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,T,T, x,T,x,x, x,x,T,x, T,T,T,T, T,T,T,T, T,T,T,x, x,T,T,T, T,T,T,T, T,T,T,T, T,T,x,x, x,T,T,x, x,x,x,x, x,T,T,T, T,T,T,T, x,T,T,T, T,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,x, T,T,T,T, T,T,T,T, x,x,x,T, T,x,x}
+ {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,T, T,T,T,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
+ {T,T,T,T, T,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,x,T, T,x,T,x, x,x,x,T, x,T,T,T, T,T,T,T, T,T,T,T, x,x,T,T, T,T,T,T, T,T,T,T, T,x,x,x, T,T,x,x, x,x,x,x, T,T,T,T, T,T,T,x, T,T,T,x, T,T,T,T, T,T,T,T, T,T,T,T, x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,x, T,T,T,T, T,T,T,T, x,x,x,T, T,x,x}
};
} // end Parser
@@ -4125,82 +4110,82 @@ public class Errors {
case 10: s = "semi expected"; break;
case 11: s = "darrow expected"; break;
case 12: s = "arrow expected"; break;
- case 13: s = "reads expected"; break;
- case 14: s = "requires expected"; break;
- case 15: s = "lbrace expected"; break;
- case 16: s = "rbrace expected"; break;
- case 17: s = "openparen expected"; break;
- case 18: s = "closeparen expected"; break;
- case 19: s = "star expected"; break;
- case 20: s = "notIn expected"; break;
- case 21: s = "\"include\" expected"; break;
- case 22: s = "\"abstract\" expected"; break;
- case 23: s = "\"module\" expected"; break;
- case 24: s = "\"refines\" expected"; break;
- case 25: s = "\"import\" expected"; break;
- case 26: s = "\"opened\" expected"; break;
- case 27: s = "\"=\" expected"; break;
- case 28: s = "\"as\" expected"; break;
- case 29: s = "\"default\" expected"; break;
- case 30: s = "\"class\" expected"; break;
- case 31: s = "\"extends\" expected"; break;
- case 32: s = "\"trait\" expected"; break;
- case 33: s = "\"ghost\" expected"; break;
- case 34: s = "\"static\" expected"; break;
- case 35: s = "\"datatype\" expected"; break;
- case 36: s = "\"codatatype\" expected"; break;
- case 37: s = "\"var\" expected"; break;
- case 38: s = "\",\" expected"; break;
- case 39: s = "\"newtype\" expected"; break;
- case 40: s = "\"type\" expected"; break;
- case 41: s = "\"==\" expected"; break;
- case 42: s = "\"iterator\" expected"; break;
- case 43: s = "\"yields\" expected"; break;
- case 44: s = "\"returns\" expected"; break;
- case 45: s = "\"...\" expected"; break;
- case 46: s = "\"<\" expected"; break;
- case 47: s = "\">\" expected"; break;
- case 48: s = "\"method\" expected"; break;
- case 49: s = "\"lemma\" expected"; break;
- case 50: s = "\"colemma\" expected"; break;
- case 51: s = "\"comethod\" expected"; break;
- case 52: s = "\"constructor\" expected"; break;
- case 53: s = "\"modifies\" expected"; break;
- case 54: s = "\"free\" expected"; break;
- case 55: s = "\"ensures\" expected"; break;
- case 56: s = "\"decreases\" expected"; break;
- case 57: s = "\"yield\" expected"; break;
- case 58: s = "\"bool\" expected"; break;
- case 59: s = "\"char\" expected"; break;
- case 60: s = "\"nat\" expected"; break;
- case 61: s = "\"int\" expected"; break;
- case 62: s = "\"real\" expected"; break;
- case 63: s = "\"set\" expected"; break;
- case 64: s = "\"multiset\" expected"; break;
- case 65: s = "\"seq\" expected"; break;
- case 66: s = "\"string\" expected"; break;
- case 67: s = "\"map\" expected"; break;
- case 68: s = "\"object\" expected"; break;
- case 69: s = "\".\" expected"; break;
- case 70: s = "\"function\" expected"; break;
- case 71: s = "\"predicate\" expected"; break;
- case 72: s = "\"copredicate\" expected"; break;
- case 73: s = "\"`\" expected"; break;
- case 74: s = "\"label\" expected"; break;
- case 75: s = "\"break\" expected"; break;
- case 76: s = "\"where\" expected"; break;
- case 77: s = "\":=\" expected"; break;
- case 78: s = "\"return\" expected"; break;
- case 79: s = "\":|\" expected"; break;
- case 80: s = "\"assume\" expected"; break;
- case 81: s = "\"new\" expected"; break;
- case 82: s = "\"[\" expected"; break;
- case 83: s = "\"]\" expected"; break;
- case 84: s = "\"if\" expected"; break;
- case 85: s = "\"else\" expected"; break;
- case 86: s = "\"case\" expected"; break;
- case 87: s = "\"while\" expected"; break;
- case 88: s = "\"invariant\" expected"; break;
+ case 13: s = "assume expected"; break;
+ case 14: s = "case expected"; break;
+ case 15: s = "decreases expected"; break;
+ case 16: s = "invariant expected"; break;
+ case 17: s = "modifies expected"; break;
+ case 18: s = "reads expected"; break;
+ case 19: s = "requires expected"; break;
+ case 20: s = "lbrace expected"; break;
+ case 21: s = "rbrace expected"; break;
+ case 22: s = "openparen expected"; break;
+ case 23: s = "closeparen expected"; break;
+ case 24: s = "star expected"; break;
+ case 25: s = "notIn expected"; break;
+ case 26: s = "\"include\" expected"; break;
+ case 27: s = "\"abstract\" expected"; break;
+ case 28: s = "\"module\" expected"; break;
+ case 29: s = "\"refines\" expected"; break;
+ case 30: s = "\"import\" expected"; break;
+ case 31: s = "\"opened\" expected"; break;
+ case 32: s = "\"=\" expected"; break;
+ case 33: s = "\"as\" expected"; break;
+ case 34: s = "\"default\" expected"; break;
+ case 35: s = "\"class\" expected"; break;
+ case 36: s = "\"extends\" expected"; break;
+ case 37: s = "\"trait\" expected"; break;
+ case 38: s = "\"ghost\" expected"; break;
+ case 39: s = "\"static\" expected"; break;
+ case 40: s = "\"datatype\" expected"; break;
+ case 41: s = "\"codatatype\" expected"; break;
+ case 42: s = "\"var\" expected"; break;
+ case 43: s = "\",\" expected"; break;
+ case 44: s = "\"newtype\" expected"; break;
+ case 45: s = "\"type\" expected"; break;
+ case 46: s = "\"==\" expected"; break;
+ case 47: s = "\"iterator\" expected"; break;
+ case 48: s = "\"yields\" expected"; break;
+ case 49: s = "\"returns\" expected"; break;
+ case 50: s = "\"...\" expected"; break;
+ case 51: s = "\"<\" expected"; break;
+ case 52: s = "\">\" expected"; break;
+ case 53: s = "\"method\" expected"; break;
+ case 54: s = "\"lemma\" expected"; break;
+ case 55: s = "\"colemma\" expected"; break;
+ case 56: s = "\"comethod\" expected"; break;
+ case 57: s = "\"constructor\" expected"; break;
+ case 58: s = "\"free\" expected"; break;
+ case 59: s = "\"ensures\" expected"; break;
+ case 60: s = "\"yield\" expected"; break;
+ case 61: s = "\"bool\" expected"; break;
+ case 62: s = "\"char\" expected"; break;
+ case 63: s = "\"nat\" expected"; break;
+ case 64: s = "\"int\" expected"; break;
+ case 65: s = "\"real\" expected"; break;
+ case 66: s = "\"set\" expected"; break;
+ case 67: s = "\"multiset\" expected"; break;
+ case 68: s = "\"seq\" expected"; break;
+ case 69: s = "\"string\" expected"; break;
+ case 70: s = "\"map\" expected"; break;
+ case 71: s = "\"object\" expected"; break;
+ case 72: s = "\".\" expected"; break;
+ case 73: s = "\"function\" expected"; break;
+ case 74: s = "\"predicate\" expected"; break;
+ case 75: s = "\"copredicate\" expected"; break;
+ case 76: s = "\"`\" expected"; break;
+ case 77: s = "\"label\" expected"; break;
+ case 78: s = "\"break\" expected"; break;
+ case 79: s = "\"where\" expected"; break;
+ case 80: s = "\":=\" expected"; break;
+ case 81: s = "\"return\" expected"; break;
+ case 82: s = "\":|\" expected"; break;
+ case 83: s = "\"new\" expected"; break;
+ case 84: s = "\"[\" expected"; break;
+ case 85: s = "\"]\" expected"; break;
+ case 86: s = "\"if\" expected"; break;
+ case 87: s = "\"else\" expected"; break;
+ case 88: s = "\"while\" expected"; break;
case 89: s = "\"match\" expected"; break;
case 90: s = "\"assert\" expected"; break;
case 91: s = "\"print\" expected"; break;
@@ -4298,44 +4283,45 @@ public class Errors {
case 183: s = "invalid MatchStmt"; break;
case 184: s = "invalid ForallStmt"; break;
case 185: s = "invalid ForallStmt"; break;
- case 186: s = "this symbol not expected in ModifyStmt"; break;
- case 187: s = "invalid ModifyStmt"; break;
- case 188: s = "invalid ReturnStmt"; break;
- case 189: s = "invalid Rhs"; break;
- case 190: s = "invalid Lhs"; break;
- case 191: s = "invalid Guard"; break;
- case 192: s = "this symbol not expected in LoopSpec"; break;
+ case 186: s = "invalid ModifyStmt"; break;
+ case 187: s = "this symbol not expected in ModifyStmt"; break;
+ case 188: s = "invalid ModifyStmt"; break;
+ case 189: s = "invalid ReturnStmt"; break;
+ case 190: s = "invalid Rhs"; break;
+ case 191: s = "invalid Lhs"; break;
+ case 192: s = "invalid Guard"; break;
case 193: s = "this symbol not expected in LoopSpec"; break;
- case 194: s = "this symbol not expected in Invariant"; break;
- case 195: s = "invalid CalcOp"; break;
- case 196: s = "invalid EquivOp"; break;
- case 197: s = "invalid ImpliesOp"; break;
- case 198: s = "invalid ExpliesOp"; break;
- case 199: s = "invalid AndOp"; break;
- case 200: s = "invalid OrOp"; break;
- case 201: s = "invalid RelOp"; break;
- case 202: s = "invalid AddOp"; break;
- case 203: s = "invalid UnaryExpression"; break;
+ case 194: s = "this symbol not expected in LoopSpec"; break;
+ case 195: s = "this symbol not expected in Invariant"; break;
+ case 196: s = "invalid CalcOp"; break;
+ case 197: s = "invalid EquivOp"; break;
+ case 198: s = "invalid ImpliesOp"; break;
+ case 199: s = "invalid ExpliesOp"; break;
+ case 200: s = "invalid AndOp"; break;
+ case 201: s = "invalid OrOp"; break;
+ case 202: s = "invalid RelOp"; break;
+ case 203: s = "invalid AddOp"; break;
case 204: s = "invalid UnaryExpression"; break;
- case 205: s = "invalid MulOp"; break;
- case 206: s = "invalid NegOp"; break;
- case 207: s = "invalid EndlessExpression"; break;
- case 208: s = "invalid Suffix"; break;
+ case 205: s = "invalid UnaryExpression"; break;
+ case 206: s = "invalid MulOp"; break;
+ case 207: s = "invalid NegOp"; break;
+ case 208: s = "invalid EndlessExpression"; break;
case 209: s = "invalid Suffix"; break;
case 210: s = "invalid Suffix"; break;
- case 211: s = "invalid DisplayExpr"; break;
- case 212: s = "invalid MultiSetExpr"; break;
- case 213: s = "invalid ConstAtomExpression"; break;
- case 214: s = "invalid Nat"; break;
- case 215: s = "invalid LambdaArrow"; break;
- case 216: s = "invalid QSep"; break;
- case 217: s = "invalid MatchExpression"; break;
- case 218: s = "invalid QuantifierGuts"; break;
- case 219: s = "invalid StmtInExpr"; break;
- case 220: s = "invalid LetExpr"; break;
- case 221: s = "invalid CasePattern"; break;
- case 222: s = "invalid Forall"; break;
- case 223: s = "invalid Exists"; break;
+ case 211: s = "invalid Suffix"; break;
+ case 212: s = "invalid DisplayExpr"; break;
+ case 213: s = "invalid MultiSetExpr"; break;
+ case 214: s = "invalid ConstAtomExpression"; break;
+ case 215: s = "invalid Nat"; break;
+ case 216: s = "invalid LambdaArrow"; break;
+ case 217: s = "invalid QSep"; break;
+ case 218: s = "invalid MatchExpression"; break;
+ case 219: s = "invalid QuantifierGuts"; break;
+ case 220: s = "invalid StmtInExpr"; break;
+ case 221: s = "invalid LetExpr"; break;
+ case 222: s = "invalid CasePattern"; break;
+ case 223: s = "invalid Forall"; break;
+ case 224: s = "invalid Exists"; break;
default: s = "error " + n; break;
}
diff --git a/Source/Dafny/Scanner.cs b/Source/Dafny/Scanner.cs
index 06493434..d52709e3 100644
--- a/Source/Dafny/Scanner.cs
+++ b/Source/Dafny/Scanner.cs
@@ -495,64 +495,64 @@ public class Scanner {
void CheckLiteral() {
switch (t.val) {
- case "reads": t.kind = 13; break;
- case "requires": t.kind = 14; break;
- case "include": t.kind = 21; break;
- case "abstract": t.kind = 22; break;
- case "module": t.kind = 23; break;
- case "refines": t.kind = 24; break;
- case "import": t.kind = 25; break;
- case "opened": t.kind = 26; break;
- case "as": t.kind = 28; break;
- case "default": t.kind = 29; break;
- case "class": t.kind = 30; break;
- case "extends": t.kind = 31; break;
- case "trait": t.kind = 32; break;
- case "ghost": t.kind = 33; break;
- case "static": t.kind = 34; break;
- case "datatype": t.kind = 35; break;
- case "codatatype": t.kind = 36; break;
- case "var": t.kind = 37; break;
- case "newtype": t.kind = 39; break;
- case "type": t.kind = 40; break;
- case "iterator": t.kind = 42; break;
- case "yields": t.kind = 43; break;
- case "returns": t.kind = 44; break;
- case "method": t.kind = 48; break;
- case "lemma": t.kind = 49; break;
- case "colemma": t.kind = 50; break;
- case "comethod": t.kind = 51; break;
- case "constructor": t.kind = 52; break;
- case "modifies": t.kind = 53; break;
- case "free": t.kind = 54; break;
- case "ensures": t.kind = 55; break;
- case "decreases": t.kind = 56; break;
- case "yield": t.kind = 57; break;
- case "bool": t.kind = 58; break;
- case "char": t.kind = 59; break;
- case "nat": t.kind = 60; break;
- case "int": t.kind = 61; break;
- case "real": t.kind = 62; break;
- case "set": t.kind = 63; break;
- case "multiset": t.kind = 64; break;
- case "seq": t.kind = 65; break;
- case "string": t.kind = 66; break;
- case "map": t.kind = 67; break;
- case "object": t.kind = 68; break;
- case "function": t.kind = 70; break;
- case "predicate": t.kind = 71; break;
- case "copredicate": t.kind = 72; break;
- case "label": t.kind = 74; break;
- case "break": t.kind = 75; break;
- case "where": t.kind = 76; break;
- case "return": t.kind = 78; break;
- case "assume": t.kind = 80; break;
- case "new": t.kind = 81; break;
- case "if": t.kind = 84; break;
- case "else": t.kind = 85; break;
- case "case": t.kind = 86; break;
- case "while": t.kind = 87; break;
- case "invariant": t.kind = 88; break;
+ case "assume": t.kind = 13; break;
+ case "case": t.kind = 14; break;
+ case "decreases": t.kind = 15; break;
+ case "invariant": t.kind = 16; break;
+ case "modifies": t.kind = 17; break;
+ case "reads": t.kind = 18; break;
+ case "requires": t.kind = 19; break;
+ case "include": t.kind = 26; break;
+ case "abstract": t.kind = 27; break;
+ case "module": t.kind = 28; break;
+ case "refines": t.kind = 29; break;
+ case "import": t.kind = 30; break;
+ case "opened": t.kind = 31; break;
+ case "as": t.kind = 33; break;
+ case "default": t.kind = 34; break;
+ case "class": t.kind = 35; break;
+ case "extends": t.kind = 36; break;
+ case "trait": t.kind = 37; break;
+ case "ghost": t.kind = 38; break;
+ case "static": t.kind = 39; break;
+ case "datatype": t.kind = 40; break;
+ case "codatatype": t.kind = 41; break;
+ case "var": t.kind = 42; break;
+ case "newtype": t.kind = 44; break;
+ case "type": t.kind = 45; break;
+ case "iterator": t.kind = 47; break;
+ case "yields": t.kind = 48; break;
+ case "returns": t.kind = 49; break;
+ case "method": t.kind = 53; break;
+ case "lemma": t.kind = 54; break;
+ case "colemma": t.kind = 55; break;
+ case "comethod": t.kind = 56; break;
+ case "constructor": t.kind = 57; break;
+ case "free": t.kind = 58; break;
+ case "ensures": t.kind = 59; break;
+ case "yield": t.kind = 60; break;
+ case "bool": t.kind = 61; break;
+ case "char": t.kind = 62; break;
+ case "nat": t.kind = 63; break;
+ case "int": t.kind = 64; break;
+ case "real": t.kind = 65; break;
+ case "set": t.kind = 66; break;
+ case "multiset": t.kind = 67; break;
+ case "seq": t.kind = 68; break;
+ case "string": t.kind = 69; break;
+ case "map": t.kind = 70; break;
+ case "object": t.kind = 71; break;
+ case "function": t.kind = 73; break;
+ case "predicate": t.kind = 74; break;
+ case "copredicate": t.kind = 75; break;
+ case "label": t.kind = 77; break;
+ case "break": t.kind = 78; break;
+ case "where": t.kind = 79; break;
+ case "return": t.kind = 81; break;
+ case "new": t.kind = 83; break;
+ case "if": t.kind = 86; break;
+ case "else": t.kind = 87; break;
+ case "while": t.kind = 88; break;
case "match": t.kind = 89; break;
case "assert": t.kind = 90; break;
case "print": t.kind = 91; break;
@@ -705,15 +705,15 @@ public class Scanner {
case 31:
{t.kind = 12; break;}
case 32:
- {t.kind = 15; break;}
+ {t.kind = 20; break;}
case 33:
- {t.kind = 16; break;}
+ {t.kind = 21; break;}
case 34:
- {t.kind = 17; break;}
+ {t.kind = 22; break;}
case 35:
- {t.kind = 18; break;}
+ {t.kind = 23; break;}
case 36:
- {t.kind = 19; break;}
+ {t.kind = 24; break;}
case 37:
if (ch == 'n') {AddCh(); goto case 38;}
else {goto case 0;}
@@ -724,7 +724,7 @@ public class Scanner {
{
tlen -= apx;
SetScannerBehindT();
- t.kind = 20; break;}
+ t.kind = 25; break;}
case 40:
recEnd = pos; recKind = 2;
if (ch >= '0' && ch <= '9') {AddCh(); goto case 40;}
@@ -813,19 +813,19 @@ public class Scanner {
else if (ch >= '0' && ch <= '9') {AddCh(); goto case 57;}
else {t.kind = 5; break;}
case 58:
- {t.kind = 38; break;}
+ {t.kind = 43; break;}
case 59:
- {t.kind = 45; break;}
+ {t.kind = 50; break;}
case 60:
- {t.kind = 73; break;}
+ {t.kind = 76; break;}
case 61:
- {t.kind = 77; break;}
+ {t.kind = 80; break;}
case 62:
- {t.kind = 79; break;}
- case 63:
{t.kind = 82; break;}
+ case 63:
+ {t.kind = 84; break;}
case 64:
- {t.kind = 83; break;}
+ {t.kind = 85; break;}
case 65:
{t.kind = 96; break;}
case 66:
@@ -886,10 +886,10 @@ public class Scanner {
if (ch == '|') {AddCh(); goto case 79;}
else {t.kind = 9; break;}
case 91:
- recEnd = pos; recKind = 27;
+ recEnd = pos; recKind = 32;
if (ch == '>') {AddCh(); goto case 30;}
else if (ch == '=') {AddCh(); goto case 97;}
- else {t.kind = 27; break;}
+ else {t.kind = 32; break;}
case 92:
recEnd = pos; recKind = 116;
if (ch == '>') {AddCh(); goto case 31;}
@@ -900,21 +900,21 @@ public class Scanner {
else if (ch == '=') {AddCh(); goto case 67;}
else {t.kind = 114; break;}
case 94:
- recEnd = pos; recKind = 69;
+ recEnd = pos; recKind = 72;
if (ch == '.') {AddCh(); goto case 98;}
- else {t.kind = 69; break;}
+ else {t.kind = 72; break;}
case 95:
- recEnd = pos; recKind = 46;
+ recEnd = pos; recKind = 51;
if (ch == '=') {AddCh(); goto case 99;}
- else {t.kind = 46; break;}
+ else {t.kind = 51; break;}
case 96:
- recEnd = pos; recKind = 47;
+ recEnd = pos; recKind = 52;
if (ch == '=') {AddCh(); goto case 66;}
- else {t.kind = 47; break;}
+ else {t.kind = 52; break;}
case 97:
- recEnd = pos; recKind = 41;
+ recEnd = pos; recKind = 46;
if (ch == '>') {AddCh(); goto case 73;}
- else {t.kind = 41; break;}
+ else {t.kind = 46; break;}
case 98:
recEnd = pos; recKind = 127;
if (ch == '.') {AddCh(); goto case 59;}
diff --git a/Test/dafny0/LoopModifies.dfy b/Test/dafny0/LoopModifies.dfy
index 5c258fde..7cf62e32 100644
--- a/Test/dafny0/LoopModifies.dfy
+++ b/Test/dafny0/LoopModifies.dfy
@@ -43,7 +43,7 @@ method Testing3(a: array<int>)
var i := 0;
while(i < 10)
invariant 0 <= i <= 10;
- modifies;
+ modifies {};
{
a[0] := i; // ERROR
i := i + 1;
@@ -58,7 +58,7 @@ method Testing4(a: array<int>)
var i := 0;
while(i < 10)
invariant 0 <= i <= 10;
- modifies;
+ modifies {};
{
a[0] := i; // ERROR
i := i + 1;
@@ -70,7 +70,7 @@ method Testing4(a: array<int>)
// modifies not a subset:
method Testing5(a: array<int>)
requires a != null && a.Length > 0;
- modifies;
+ modifies {};
{
var i := 0;
while(i < 10) // ERROR
@@ -249,14 +249,14 @@ method Testing11()
var arr := new int[1];
while(i < 10)
invariant 0 <= i <= 10;
- modifies;
+ modifies {};
{
arr := new int[1];
arr[0] := 1;
var j := 0;
while(j < 10)
invariant 0 <= j <= 10;
- modifies;
+ modifies {};
{
// can't touch arr in here.
j := j + 1;
diff --git a/Test/dafny0/ModifyStmt.dfy b/Test/dafny0/ModifyStmt.dfy
index 6d041b43..00b39e7a 100644
--- a/Test/dafny0/ModifyStmt.dfy
+++ b/Test/dafny0/ModifyStmt.dfy
@@ -16,7 +16,7 @@ class MyClass {
modify {this}, this, {this}, S;
modify this;
modify {:myAttribute} {:another true} {this}, this, S;
- modify ;
+ modify {} ;
}
method N()