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
No related branches found
No related tags found
No related merge requests found
......@@ -97,8 +97,6 @@ sub study{
$href->{indent}=" ";
}
if($type_def) {
# $href->{content}='typedef';
}
......@@ -326,7 +324,7 @@ CRACK: {
$exec=0;
$decl=1;
}
#print "cont $content \n \n";
#print STDERR "cont $content \n \n";
# print "BB $unit_count $content $_";
if($content eq 'unknown') {
print STDERR "Failed to crack statement starting at line $href->{first_line}",
......@@ -577,18 +575,37 @@ sub study_exec{
elsif(/^$name\s*%\s*$name\s*=/o) { #ZMYTYPE%ICOMP = .....
$$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 = .....
$$content='array_assign';
}
elsif(/^$name\s*%\s*$name\s*$nest_par\s*=/o) { #ZMYTYPE%ICOMP(JL) = .....
$$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) = ...
$$content='array_assign';
}
elsif(/^$name\s*($nest_par)($nest_par)\s*=/o) { #CLNAME(JK)(1:5) = ......
$$content='array_assign';
}
}
}
#===================================================================================
#sub get_indent {
......@@ -1839,13 +1856,13 @@ sub parse_prog_unit {
my $tstatm=$_;
$tstatm=~ s/\!.*\n/\n/g;
$tstatm=~s/\s//g;
#print "ok1\n",$tstatm,"\n";
#print STDERR "ok1\n",$tstatm,"\n";
if (/.+\((.+)\).+\((.+)\)/) {
#print "block1\n";
# print STDERR "block1\n";
$tstatm=~s/.+\((.+)\).+\((.+)\)/$1,$2/;
}
else {
# print "block2\n";
# print STDERR "block2\n";
$tstatm=~s/.+\((.+)\)/$1/;
}
# $tstatm=~s/.+\((.+)\)/$1/;
......@@ -2169,7 +2186,7 @@ sub create_interface_block {
}
}
else{
if (/^USEMODD_TYPE/ || /^USEMODD_FMDECLAR/) {
if (/^USEMODD_TYPE/ || /^USEMODD_FMDECLAR/ || /^USELFI_/) {
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 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
......
......@@ -65,7 +65,7 @@ if [ "`echo $BASENAME | egrep -i $FILE_WITHOUT_INTERFACE_NEDEED `" = "" ]
then
for sfile in `cat liste_file`
do
if [ "`egrep -ia '^ *module|^ *program' $sfile`" = "" ]
if [ "`egrep -i '^ *module|^ *program' $sfile`" = "" ]
then
if [ "$SUF" = "f90" ]
then
......@@ -91,7 +91,7 @@ then
fi
fi
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
......@@ -133,8 +133,8 @@ then
cp $spllfile $DIRNAME/$spllfile
touch $DIRNAME/$BASENAME2.D
fi
dep=`egrep -ia "^[[: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 `
dep=`egrep -i "^[[:space:]]*use " $spllfile | sed -e 's/,/ /g' | awk '{ print '${TOCASE}'($2)".mod"}' | sort -u `
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 $spllbase.o : $spllfile $dep >> $DIRNAME/$BASENAME2.D
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment