#
# KEHOME/bin/cycbind2column
# Sep/12/2003

# convert CycL bind list to column
# input format: one list per line
#	...
#	(((?x . value1)) ... ((?x . valuen)))
#	:EXHAUST ...
# output format: one value per line, sorted
#	valuei
#	someFn valuej
#	...

#column2line		|  # fix broken lines
sed 's/:EXHAUST.*$//'	|  # delete trailing junk
sed 's/^  *//'    	|  # delete leading  blanks
sed 's/  *$//'    	|  # delete trailing blanks
sed 's/ ((/))\n((/g'	|  # change interior blanks to newline
grep '^(.*)$'		|  # delete other junk
sed 's/^((*//'    	|  # delete leading  "("
sed 's/))*$//'    	|  # delete trailing ")"
sed 's/^\?. //'		|  # delete leading "?x "
sed 's/^\. //'		|  # delete leading ". "
#cat			   # for debugging
 sort -uf		   # sort, delete duplicates

#