Blame view

tools/swigra/parser/birnam_dcg2pl 408 Bytes
Jan Lupa authored
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /bin/bash
#
# Author: Marcin WoliƄski
# This file is in the public domain.

name=`basename $1 .dcg`
tmpname=mkdgm-$$.pl

echo Converting $name.dcg to $name.pl:

cat <<EOF >$tmpname
:-[birnam_genparser,birnam_translate,birnam_sequences].
:-translate('$name.dcg','$name.pl').
:-halt.
EOF

swipl --tradtional -s $tmpname
rm $tmpname

### Local Variables: 
### coding: utf-8
### mode: shell-script
### End: