#!/bin/sh
#   Title: 	get-rulenames  (see also make-rulenames)
#   Author: 	Larry Paulson, Cambridge University Computer Laboratory
#   Copyright   1990  University of Cambridge
#
#shell script for generating  val  declarations 
#  usage:  make-rulenames  <file>
#
#Each rule name xyz must appear on a line that begins
#        <spaces> ("xyz"
# ENSURE THAT THE FIRST RULE LINE DOES NOT CONTAIN A "[" CHARACTER!
#Output lines have the form
#        val Eq_comp = ax"Eq_comp";
#
sed -n -e 's/^ *("\([^"]*\)".*$/val \1 = ax"\1";/p' $1

