Artifact 23c6336384f143a0a3998b9fdae9aa9ece29d9b6d3be3953811e48cc49fea4cd:


#! /bin/sh

sed 's/begin / /' |\
sed 's/end / /' |\
sed 's/\[\([0-9,]*\)\]/(\1)/g' |\
sed 's/:=/ = /' |\
sed 's/\*\*/\^/g' |\
sed 's/mtt\([a-z]*\)\([0-9]\)\([0-9]*\)/mtt\1(\2\3)/g' |\
awk '{
  sub(/^[\ ]*/, "", $0)
  sub(/\$$/, ";", $0)
  
  if (match($NF,"[;\#\.\%]$")==0){
    Previous[++i] = $0
  }
  else {
    for (j=1;j<=i;j++) printf("%s", Previous[j]);
    printf("%s\n", $0) 
    i=0;
  }
}' |\
sed 's/#/%/g'


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]