Advertisement
Guest User

Untitled

a guest
Mar 6th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.61 KB | None | 0 0
  1.  
  2. for i in $(egrep -o 'abstract_fn [^[:space:]]+ [[:digit:]]+ [[:digit:]]+' ./ir/stdlib.ir | sed -r -e 's/abstract_fn ([^[:space:]]+) [[:digit:]]+ ([[:digit:]]+)/\1;\2/g'); do
  3.         IN_VARS=(${i//;/ });
  4.         PATT=${IN_VARS[0]}; PATT=${PATT//\$/\\\$};
  5.         for nt in $(egrep -o "1 $PATT (0|[^0]+(( r_[^[:space:]]+)+)) [[:digit:]]+" ir/stdlib.ir | sed -r -e 's/^.+ ([[:digit:]]+)$/\1/g'); do
  6.                 if [ $nt -ne ${IN_VARS[1]} ]; then
  7.                         echo "FAILED FOR ${IN_VARS[0]}: $nt ${IN_VARS[1]}";
  8.                 else echo "everything is okay";
  9.                 fi;
  10.         done;
  11. done;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement