summaryrefslogtreecommitdiff
path: root/contrib/gnunet-tree-builder/regenerate
blob: fd5696a2a3e09829882754a5672bd41717d45de0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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