lib/scripts/convert.pl
changeset 11271 b2a1d9c20df7
parent 11263 e502756bcb11
child 11272 165405d911f1
equal deleted inserted replaced
11270:a315a3862bb4 11271:b2a1d9c20df7
    18 }
    18 }
    19 
    19 
    20 sub subst_RS {
    20 sub subst_RS {
    21   s/ RS ([\w\'\.]+)/ [THEN $1]/g;
    21   s/ RS ([\w\'\.]+)/ [THEN $1]/g;
    22   s/ RS \((.+?)\)/ [THEN $1]/g;
    22   s/ RS \((.+?)\)/ [THEN $1]/g;
       
    23   s/\(([\w\'\.]+ \[THEN [\w\'\.]+\])\)/$1/g;
    23   s/\] \[THEN /, /g;
    24   s/\] \[THEN /, /g;
    24   s/THEN sym\b/symmetric/g;
    25   s/THEN sym\b/symmetric/g;
    25 }
    26 }
    26 
    27 
    27 sub subst_RS_standard {
    28 sub subst_RS_standard {
    57   s/\( /\(/g; s/ \)/\)/g; # remove leading and trailing space inside parentheses
    58   s/\( /\(/g; s/ \)/\)/g; # remove leading and trailing space inside parentheses
    58   s/\[ /\[/g; s/ \]/\]/g; # remove leading and trailing space inside sq brackets
    59   s/\[ /\[/g; s/ \]/\]/g; # remove leading and trailing space inside sq brackets
    59   s/ ?\( ?\)/\(\)/g;      # remove space before and inside empty tuples
    60   s/ ?\( ?\)/\(\)/g;      # remove space before and inside empty tuples
    60   s/\(\)([^ ])/\(\) $1/g; # possibly add space after empty tuples
    61   s/\(\)([^ ])/\(\) $1/g; # possibly add space after empty tuples
    61 
    62 
       
    63   if(s/^\(EVERY\'\[(.*?)\]\s*(\d+)\)$/\($1 $2\)/) {
       
    64     $goal = $2;
       
    65     s/,/ $goal,/g;
       
    66   }
    62   s/Blast_tac 1/blast/g;
    67   s/Blast_tac 1/blast/g;
    63   s/^Blast_tac (\d+)/{$prefer="prefer $1 "; "blast"}/e;
    68   s/^Blast_tac (\d+)/{$prefer="prefer $1 "; "blast"}/e;
    64   s/Fast_tac 1/fast/g;
    69   s/Fast_tac 1/fast/g;
    65   s/^Fast_tac (\d+)/{$prefer="prefer $1 "; "fast"}/e;
    70   s/^Fast_tac (\d+)/{$prefer="prefer $1 "; "fast"}/e;
    66   s/Slow_tac 1/slow/g;
    71   s/Slow_tac 1/slow/g;