summaryrefslogtreecommitdiff
path: root/contrib/gnunet-tree-builder/regenerate
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gnunet-tree-builder/regenerate')
-rwxr-xr-xcontrib/gnunet-tree-builder/regenerate20
1 files changed, 20 insertions, 0 deletions
diff --git a/contrib/gnunet-tree-builder/regenerate b/contrib/gnunet-tree-builder/regenerate
new file mode 100755
index 000000000..fd5696a2a
--- /dev/null
+++ b/contrib/gnunet-tree-builder/regenerate
@@ -0,0 +1,20 @@
+#!/bin/sh
+# MAINDIR: Environment Variable for GNUnet workspace
+# Note: The script will generate the grammar file C.out.jj under src/monkey
+
+rm -f *.java
+mkdir -p org/gnunet/monkey/parser
+cd org/gnunet/monkey/parser
+jtb -printer -jd -np org.gnunet.monkey.parser.nodes -vp org.gnunet.monkey.parser.visitors -o $MAINDIR/src/monkey/C.out.jj $MAINDIR/src/monkey/C.jj
+javacc -STATIC=false $MAINDIR/src/monkey/C.out.jj
+
+echo 'package org.gnunet.monkey.parser;' > PACKAGE
+for n in *.java
+do
+ cat $n >> PACKAGE
+ mv PACKAGE $n
+ echo 'package org.gnunet.monkey.parser;' > PACKAGE
+done
+
+rm -f PACKAGE
+ \ No newline at end of file