src/Tools/expandshort
author oheimb
Wed, 12 Nov 1997 12:34:43 +0100
changeset 4206 688050e83d89
parent 4163 a42fc09bca25
permissions -rwxr-xr-x
restored last version
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3329
7b43a1e74930 Now a Perl script. No longer requires commands to be at the beginnings of
paulson
parents: 3022
diff changeset
     1
#! /usr/bin/perl -pi~~
819
8928f1c44d80 Added comments and Id: marker.
lcp
parents: 96
diff changeset
     2
# $Id$
8928f1c44d80 Added comments and Id: marker.
lcp
parents: 96
diff changeset
     3
#Shell script to expand shorthand goal commands
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     4
#  ALSO contracts uses of resolve_tac, dresolve_tac, eresolve_tac,
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     5
#     rewrite_goals_tac on 1-element lists
3329
7b43a1e74930 Now a Perl script. No longer requires commands to be at the beginnings of
paulson
parents: 3022
diff changeset
     6
#  [Tabs are forbidden in strings.  Use "expand" or "untabify" in emacs".]
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     7
#
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
# Usage:
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     9
#    expandshort FILE1 ... FILEn
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    10
#
819
8928f1c44d80 Added comments and Id: marker.
lcp
parents: 96
diff changeset
    11
#Renames old versions of the files as FILE1~~ ... FILEn~~
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    12
#
4163
a42fc09bca25 Now introduces Safe_tac
paulson
parents: 3329
diff changeset
    13
s/\bsafe_tac *\(claset *\( *\) *\)/Safe_tac/;
a42fc09bca25 Now introduces Safe_tac
paulson
parents: 3329
diff changeset
    14
s/ *\(Safe_tac\) *([0-9]+)/ Safe_tac \1/;
a42fc09bca25 Now introduces Safe_tac
paulson
parents: 3329
diff changeset
    15
s/ *\(Safe_tac\)/ Safe_tac/;
3329
7b43a1e74930 Now a Perl script. No longer requires commands to be at the beginnings of
paulson
parents: 3022
diff changeset
    16
s/\bby\(/by (/;
7b43a1e74930 Now a Perl script. No longer requires commands to be at the beginnings of
paulson
parents: 3022
diff changeset
    17
s/\bba\b *(\d+);/by (assume_tac \1);/;
7b43a1e74930 Now a Perl script. No longer requires commands to be at the beginnings of
paulson
parents: 3022
diff changeset
    18
s/\bbr\b *([^;]*) (\d+);/by (rtac \1 \2);/;
7b43a1e74930 Now a Perl script. No longer requires commands to be at the beginnings of
paulson
parents: 3022
diff changeset
    19
s/\bbrs\b *([^;]*) (\d+);/by (resolve_tac \1 \2);/;
7b43a1e74930 Now a Perl script. No longer requires commands to be at the beginnings of
paulson
parents: 3022
diff changeset
    20
s/\bbd\b *([^;]*) (\d+);/by (dtac \1 \2);/;
7b43a1e74930 Now a Perl script. No longer requires commands to be at the beginnings of
paulson
parents: 3022
diff changeset
    21
s/\bbds\b *([^;]*) (\d+);/by (dresolve_tac \1 \2);/;
7b43a1e74930 Now a Perl script. No longer requires commands to be at the beginnings of
paulson
parents: 3022
diff changeset
    22
s/\bbe\b *([^;]*) (\d+);/by (etac \1 \2);/;
7b43a1e74930 Now a Perl script. No longer requires commands to be at the beginnings of
paulson
parents: 3022
diff changeset
    23
s/\bbes\b *([^;]*) (\d+);/by (eresolve_tac \1 \2);/;
7b43a1e74930 Now a Perl script. No longer requires commands to be at the beginnings of
paulson
parents: 3022
diff changeset
    24
s/\bbw\b *([^;]*);/by (rewtac \1);/;
7b43a1e74930 Now a Perl script. No longer requires commands to be at the beginnings of
paulson
parents: 3022
diff changeset
    25
s/\bbws\b *([^;]*);/by (rewrite_goals_tac \1);/;
7b43a1e74930 Now a Perl script. No longer requires commands to be at the beginnings of
paulson
parents: 3022
diff changeset
    26
s/\bauto *\(\)/by (Auto_tac())/;
7b43a1e74930 Now a Perl script. No longer requires commands to be at the beginnings of
paulson
parents: 3022
diff changeset
    27
s/dresolve_tac *\[(\w+)\] */dtac \1 /g;
7b43a1e74930 Now a Perl script. No longer requires commands to be at the beginnings of
paulson
parents: 3022
diff changeset
    28
s/eresolve_tac *\[(\w+)\] */etac \1 /g;
7b43a1e74930 Now a Perl script. No longer requires commands to be at the beginnings of
paulson
parents: 3022
diff changeset
    29
s/resolve_tac *\[(\w+)\] */rtac \1 /g;
7b43a1e74930 Now a Perl script. No longer requires commands to be at the beginnings of
paulson
parents: 3022
diff changeset
    30
s/rewrite_goals_tac *\[(\w+)\]( *)/rewtac \1\2/g;
7b43a1e74930 Now a Perl script. No longer requires commands to be at the beginnings of
paulson
parents: 3022
diff changeset
    31
s/rtac *\((\w+)\s+RS\s+ssubst\)\s+/stac \1 /g;