Skip to content
Snippets Groups Projects
Commit 2eab6e92 authored by Gaelle TANGUY's avatar Gaelle TANGUY
Browse files

Gaelle 23/06/2016 : surfex V8

parent cd49a0dd
Branches
Tags
No related merge requests found
...@@ -97,8 +97,6 @@ sub study{ ...@@ -97,8 +97,6 @@ sub study{
$href->{indent}=" "; $href->{indent}=" ";
} }
if($type_def) { if($type_def) {
# $href->{content}='typedef'; # $href->{content}='typedef';
} }
...@@ -326,7 +324,7 @@ CRACK: { ...@@ -326,7 +324,7 @@ CRACK: {
$exec=0; $exec=0;
$decl=1; $decl=1;
} }
#print "cont $content \n \n"; #print STDERR "cont $content \n \n";
# print "BB $unit_count $content $_"; # print "BB $unit_count $content $_";
if($content eq 'unknown') { if($content eq 'unknown') {
print STDERR "Failed to crack statement starting at line $href->{first_line}", print STDERR "Failed to crack statement starting at line $href->{first_line}",
...@@ -577,18 +575,37 @@ sub study_exec{ ...@@ -577,18 +575,37 @@ sub study_exec{
elsif(/^$name\s*%\s*$name\s*=/o) { #ZMYTYPE%ICOMP = ..... elsif(/^$name\s*%\s*$name\s*=/o) { #ZMYTYPE%ICOMP = .....
$$content='scal_assign'; $$content='scal_assign';
} }
elsif(/^$name\s*%\s*$name\s*%\s*$name\s*=/o) { #ZMYTYPE%ICOMP = .....
$$content='scal_assign';
}
elsif(/^$name\s*%\s*$name\s*%\s*$name\s*%\s*$name\s*=/o) { #ZMYTYPE%ICOMP = .....
$$content='scal_assign';
}
elsif(/^$name\s*%\s*$name\s*%\s*$name\s*%\s*$name\s*%\s*$name\s*=/o) { #ZMYTYPE%ICOMP = .....
$$content='scal_assign';
}
elsif(/^$name\s*$nest_par\s*%\s*$name\s*=/o) { #ZMYTYPE(JK)%ICOMP = ..... elsif(/^$name\s*$nest_par\s*%\s*$name\s*=/o) { #ZMYTYPE(JK)%ICOMP = .....
$$content='array_assign'; $$content='array_assign';
} }
elsif(/^$name\s*%\s*$name\s*$nest_par\s*=/o) { #ZMYTYPE%ICOMP(JL) = ..... elsif(/^$name\s*%\s*$name\s*$nest_par\s*=/o) { #ZMYTYPE%ICOMP(JL) = .....
$$content='array_assign'; $$content='array_assign';
} }
elsif(/^$name\s*%\s*$name\s*%\s*$name\s*$nest_par\s*=/o) { #ZMYTYPE%ICOMP(JL) = .....
$$content='array_assign';
}
elsif(/^$name\s*%\s*$name\s*%\s*$name\s*%\s*$name\s*$nest_par\s*=/o) { #ZMYTYPE%ICOMP(JL) = .....
$$content='array_assign';
}
elsif(/^$name\s*%\s*$name\s*%\s*$name\s*%\s*$name\s*%\s*$name\s*$nest_par\s*=/o) { #ZMYTYPE%ICOMP(JL) = .....
$$content='array_assign';
}
elsif(/^($name\s*($nest_par)*\s*%\s*$name\s*($nest_par)* *)+=/o) { #ZMYTYPE(JK)%ICOMP(JL) = ... elsif(/^($name\s*($nest_par)*\s*%\s*$name\s*($nest_par)* *)+=/o) { #ZMYTYPE(JK)%ICOMP(JL) = ...
$$content='array_assign'; $$content='array_assign';
} }
elsif(/^$name\s*($nest_par)($nest_par)\s*=/o) { #CLNAME(JK)(1:5) = ...... elsif(/^$name\s*($nest_par)($nest_par)\s*=/o) { #CLNAME(JK)(1:5) = ......
$$content='array_assign'; $$content='array_assign';
} }
} }
#=================================================================================== #===================================================================================
#sub get_indent { #sub get_indent {
...@@ -1839,13 +1856,13 @@ sub parse_prog_unit { ...@@ -1839,13 +1856,13 @@ sub parse_prog_unit {
my $tstatm=$_; my $tstatm=$_;
$tstatm=~ s/\!.*\n/\n/g; $tstatm=~ s/\!.*\n/\n/g;
$tstatm=~s/\s//g; $tstatm=~s/\s//g;
#print "ok1\n",$tstatm,"\n"; #print STDERR "ok1\n",$tstatm,"\n";
if (/.+\((.+)\).+\((.+)\)/) { if (/.+\((.+)\).+\((.+)\)/) {
#print "block1\n"; # print STDERR "block1\n";
$tstatm=~s/.+\((.+)\).+\((.+)\)/$1,$2/; $tstatm=~s/.+\((.+)\).+\((.+)\)/$1,$2/;
} }
else { else {
# print "block2\n"; # print STDERR "block2\n";
$tstatm=~s/.+\((.+)\)/$1/; $tstatm=~s/.+\((.+)\)/$1/;
} }
# $tstatm=~s/.+\((.+)\)/$1/; # $tstatm=~s/.+\((.+)\)/$1/;
...@@ -2169,7 +2186,7 @@ sub create_interface_block { ...@@ -2169,7 +2186,7 @@ sub create_interface_block {
} }
} }
else{ else{
if (/^USEMODD_TYPE/ || /^USEMODD_FMDECLAR/) { if (/^USEMODD_TYPE/ || /^USEMODD_FMDECLAR/ || /^USELFI_/) {
push(@$interface_block,$myhref); # Always include USE without ONLY for safety push(@$interface_block,$myhref); # Always include USE without ONLY for safety
} }
}} }}
......
#!/usr/bin/perl #!/usr/bin/env perl
#SURFEX_LIC Copyright 1994-2014 Meteo-France #SURFEX_LIC Copyright 1994-2014 Meteo-France
#SURFEX_LIC This is part of the SURFEX software governed by the CeCILL-C licence #SURFEX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
#SURFEX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt #SURFEX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
......
...@@ -65,7 +65,7 @@ if [ "`echo $BASENAME | egrep -i $FILE_WITHOUT_INTERFACE_NEDEED `" = "" ] ...@@ -65,7 +65,7 @@ if [ "`echo $BASENAME | egrep -i $FILE_WITHOUT_INTERFACE_NEDEED `" = "" ]
then then
for sfile in `cat liste_file` for sfile in `cat liste_file`
do do
if [ "`egrep -ia '^ *module|^ *program' $sfile`" = "" ] if [ "`egrep -i '^ *module|^ *program' $sfile`" = "" ]
then then
if [ "$SUF" = "f90" ] if [ "$SUF" = "f90" ]
then then
...@@ -91,7 +91,7 @@ then ...@@ -91,7 +91,7 @@ then
fi fi
fi fi
ls -1 $TMP > liste_file ls -1 $TMP > liste_file
egrep -va "liste_file" liste_file > liste_file2 egrep -v "liste_file" liste_file > liste_file2
) )
# #
# génération des dependances # génération des dependances
...@@ -133,8 +133,8 @@ then ...@@ -133,8 +133,8 @@ then
cp $spllfile $DIRNAME/$spllfile cp $spllfile $DIRNAME/$spllfile
touch $DIRNAME/$BASENAME2.D touch $DIRNAME/$BASENAME2.D
fi fi
dep=`egrep -ia "^[[:space:]]*use " $spllfile | sed -e 's/,/ /g' | awk '{ print '${TOCASE}'($2)".mod"}' | sort -u ` dep=`egrep -i "^[[:space:]]*use " $spllfile | sed -e 's/,/ /g' | awk '{ print '${TOCASE}'($2)".mod"}' | sort -u `
mod=`egrep -ia "^[[:space:]]*module " $spllfile | sed -e 's/,/ /g' | awk '{ print '${TOCASE}'($2)".mod"}' | sort -u | grep -iv procedure ` mod=`egrep -i "^[[:space:]]*module " $spllfile | sed -e 's/,/ /g' | awk '{ print '${TOCASE}'($2)".mod"}' | sort -u | grep -iv procedure `
echo $mod : $spllbase.o >> $DIRNAME/$BASENAME2.D echo $mod : $spllbase.o >> $DIRNAME/$BASENAME2.D
echo $spllbase.o : $spllfile $dep >> $DIRNAME/$BASENAME2.D echo $spllbase.o : $spllfile $dep >> $DIRNAME/$BASENAME2.D
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment