summaryrefslogtreecommitdiff
path: root/Source/Dafny
diff options
context:
space:
mode:
authorGravatar Rustan Leino <unknown>2014-02-13 17:10:36 -0800
committerGravatar Rustan Leino <unknown>2014-02-13 17:10:36 -0800
commitbb693ff8457c80451d406563a7a5146daaaefa0c (patch)
tree831a4e0857efe2572570667307e70bb0076f1246 /Source/Dafny
parentaea970484bbe0b335e19a4d51842662d526a0304 (diff)
Fixed crash in parser
Diffstat (limited to 'Source/Dafny')
-rw-r--r--Source/Dafny/Dafny.atg4
-rw-r--r--Source/Dafny/Parser.cs4
2 files changed, 4 insertions, 4 deletions
diff --git a/Source/Dafny/Dafny.atg b/Source/Dafny/Dafny.atg
index dc8b9640..a74ec21d 100644
--- a/Source/Dafny/Dafny.atg
+++ b/Source/Dafny/Dafny.atg
@@ -1370,7 +1370,7 @@ CaseStatement<out MatchCaseStmt/*!*/ c>
/*------------------------------------------------------------------------*/
AssertStmt<out Statement/*!*/ s>
= (. Contract.Ensures(Contract.ValueAtReturn(out s) != null); IToken/*!*/ x;
- Expression e = null; Attributes attrs = null;
+ Expression e = dummyExpr; Attributes attrs = null;
IToken dotdotdot = null;
.)
"assert" (. x = t; .)
@@ -1388,7 +1388,7 @@ AssertStmt<out Statement/*!*/ s>
.
AssumeStmt<out Statement/*!*/ s>
= (. Contract.Ensures(Contract.ValueAtReturn(out s) != null); IToken/*!*/ x;
- Expression e = null; Attributes attrs = null;
+ Expression e = dummyExpr; Attributes attrs = null;
IToken dotdotdot = null;
.)
"assume" (. x = t; .)
diff --git a/Source/Dafny/Parser.cs b/Source/Dafny/Parser.cs
index 07211134..57284c8e 100644
--- a/Source/Dafny/Parser.cs
+++ b/Source/Dafny/Parser.cs
@@ -1648,7 +1648,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
void AssertStmt(out Statement/*!*/ s) {
Contract.Ensures(Contract.ValueAtReturn(out s) != null); IToken/*!*/ x;
- Expression e = null; Attributes attrs = null;
+ Expression e = dummyExpr; Attributes attrs = null;
IToken dotdotdot = null;
Expect(83);
@@ -1673,7 +1673,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
void AssumeStmt(out Statement/*!*/ s) {
Contract.Ensures(Contract.ValueAtReturn(out s) != null); IToken/*!*/ x;
- Expression e = null; Attributes attrs = null;
+ Expression e = dummyExpr; Attributes attrs = null;
IToken dotdotdot = null;
Expect(72);