From 95a2be3c3dfadf796e4951d4e194da2138c2c030 Mon Sep 17 00:00:00 2001
From: Jens Bendisposto <jens@bendisposto.de>
Date: Thu, 6 Aug 2015 13:17:41 +0200
Subject: [PATCH] build script

---
 README.md    |  8 ++++++++
 build.gradle | 16 ++++++++--------
 2 files changed, 16 insertions(+), 8 deletions(-)
 create mode 100644 README.md

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..6ef97a9
--- /dev/null
+++ b/README.md
@@ -0,0 +1,8 @@
+# Rodin B AST
+
+This repository contains a standalone version of the Rodin AST. It is used within the ProB tool.
+
+No original file is changed, but we added this README and the build.gradle.
+
+Note to future Jens:
+After updating the sources the ```gradle patch``` task must be run. This modifies the sources. **Do not run the task multiple times!**
diff --git a/build.gradle b/build.gradle
index dd4f837..c649977 100644
--- a/build.gradle
+++ b/build.gradle
@@ -43,27 +43,27 @@ task tom() << {
 }
 
 task patch() << {
-  def patch_content = """
-  --- rodin-ast/src/org/eventb/internal/core/parser/SubParsers.java	2015-08-06 12:29:24.000000000 +0200
-  +++ rodin-b-sharp-rodincore/org.eventb.core.ast/src/org/eventb/internal/core/parser/SubParsers.java	2015-08-06 12:42:32.000000000 +0200
+  def patch_content = """diff --git a/src/org/eventb/internal/core/parser/SubParsers.java b/src/org/eventb/internal/core/parser/SubParsers.java
+  index e71bf08..0977da1 100644
+  --- a/src/org/eventb/internal/core/parser/SubParsers.java
+  +++ b/src/org/eventb/internal/core/parser/SubParsers.java
   @@ -492,7 +492,7 @@ public class SubParsers {
 
    	};
 
-  -	public static class BoundIdentDeclSubParser extends ValuedNudParser<org.eventb.core.ast.BoundIdentDecl> {
-  +	public static class BoundIdentDeclSubParser extends ValuedNudParser<BoundIdentDecl> {
+  -	public static class BoundIdentDeclSubParser extends ValuedNudParser<BoundIdentDecl> {
+  +	public static class BoundIdentDeclSubParser extends ValuedNudParser<org.eventb.core.ast.BoundIdentDecl> {
 
    		@Override
    		protected int getKind(AbstractGrammar grammar) {
-
-  """
+"""
   File p = file("SubParsers.patch")
+  p.delete();
   p << patch_content
   ant.patch(patchfile: 'SubParsers.patch', originalfile: 'src/org/eventb/internal/core/parser/SubParsers.java', failonerror:'true' )
 }
 
 
-
 compileJava {
   dependsOn << 'tom'
 }
-- 
GitLab