summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/Core/BoogiePL.atg10
-rw-r--r--Source/Core/Parser.cs8
2 files changed, 17 insertions, 1 deletions
diff --git a/Source/Core/BoogiePL.atg b/Source/Core/BoogiePL.atg
index a44bbbff..132dfcbb 100644
--- a/Source/Core/BoogiePL.atg
+++ b/Source/Core/BoogiePL.atg
@@ -40,7 +40,15 @@ Contract.Requires(cce.NonNullElements(defines,true));
FileStream stream = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read);
+ return Parse(stream, filename, defines, out program);
+}
+
+public static int Parse (Stream stream, string/*!*/ filename, /*maybe null*/ List<string/*!*/> defines, out /*maybe null*/ Program program) /* throws System.IO.IOException */ {
+Contract.Requires(stream != null);
+Contract.Requires(filename != null);
+Contract.Requires(cce.NonNullElements(defines,true));
+
if (defines == null) {
defines = new List<string/*!*/>();
}
@@ -1456,4 +1464,4 @@ BvLit<out BigNum n, out int m>
}
.)
.
-END BoogiePL. \ No newline at end of file
+END BoogiePL.
diff --git a/Source/Core/Parser.cs b/Source/Core/Parser.cs
index 0fedc95f..98b1a7f9 100644
--- a/Source/Core/Parser.cs
+++ b/Source/Core/Parser.cs
@@ -59,6 +59,14 @@ Contract.Requires(cce.NonNullElements(defines,true));
FileStream stream = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read);
+ return Parse(stream, filename, defines, out program);
+}
+
+
+public static int Parse(Stream stream, string/*!*/ filename, /*maybe null*/ List<string/*!*/> defines, out /*maybe null*/ Program program) /* throws System.IO.IOException */ {
+ Contract.Requires(stream != null);
+ Contract.Requires(filename != null);
+ Contract.Requires(cce.NonNullElements(defines, true));
if (defines == null) {
defines = new List<string/*!*/>();