Differences From Artifact [7206315b5e]:

To Artifact [9cd1ab95be]:


70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#Extract Type info
echo '/* Types */'                >> $sys_rep.cc
grep typedef $sys_rep.C              >> $sys_rep.cc

#Extract the rep code converting [] to () and deleting mtt variables etc
#The awk part detects the begin and end of the relevant code.
echo "/* Representation $rep information */" >> $sys_rep.cc
awk '{
  if ( (match($1,"}")==1)&&(NF>1)) writing=0;
  if ( (writing) && !(match($2,"mtt[a-z]")==1) ) print $0;
  if (match($1,"{")==1) writing=1;
}' <$sys_rep.C |\
sed 's/\[\([a-z0-9_]*\)\]\[\([a-z0-9_]*\)\]/(\1,\2)/g' |\
sed 's/\[\([a-z_0-9]*\)\]/(\1)/g' >> $sys_rep.cc








|







70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#Extract Type info
echo '/* Types */'                >> $sys_rep.cc
grep typedef $sys_rep.C              >> $sys_rep.cc

#Extract the rep code converting [] to () and deleting mtt variables etc
#The awk part detects the begin and end of the relevant code.
echo "/* Representation $rep information */" >> $sys_rep.cc
gawk '{
  if ( (match($1,"}")==1)&&(NF>1)) writing=0;
  if ( (writing) && !(match($2,"mtt[a-z]")==1) ) print $0;
  if (match($1,"{")==1) writing=1;
}' <$sys_rep.C |\
sed 's/\[\([a-z0-9_]*\)\]\[\([a-z0-9_]*\)\]/(\1,\2)/g' |\
sed 's/\[\([a-z_0-9]*\)\]/(\1)/g' >> $sys_rep.cc


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