blob: c8ad61571c1dc8a22c39620d3f7f58e2ed3e2978 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#!/bin/bash
#
# mkkind
# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
#
# The purpose of this script is to create kind.h from a prologue,
# middle, epilogue, and a list of theory kinds.
#
# Invocation:
#
# mkkind prologue-file middle-file epilogue-file theory-kind-files...
#
# Output is to standard out.
#
cat <<EOF
/********************* -*- C++ -*- */
/** kind.h
**
** Copyright 2009, 2010 The AcSys Group, New York University, and as below.
**
** This header file automatically generated by:
**
** $0 $@
**
** for the CVC4 project.
**
**/
EOF
prologue=$1; shift
middle=$1; shift
epilogue=$1; shift
cases=
cat "$prologue"
while [ $# -gt 0 ]; do
b=$(basename $(dirname "$1"))
echo
echo " /* from $b */"
cases="$cases
/* from $b */
"
for r in `cat "$1"`; do
echo " $r,"
cases="$cases case $r: out << \"$r\"; break;
"
done
shift
done
cat "$middle"
echo "$cases"
cat "$epilogue"
|