mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-22 04:13:33 +01:00
Added subroutine dependencies
Version:1.1.38 Version:1.1.38
This commit is contained in:
parent
50e2bfb3a7
commit
45ddcdec01
@ -122,17 +122,16 @@ def get_parsed_text():
|
|||||||
error.fail(line,"Variable %s is unknown"%(v))
|
error.fail(line,"Variable %s is unknown"%(v))
|
||||||
result.append( (l,Simple_line(line.i,"!%s"%(line.text),line.filename)) )
|
result.append( (l,Simple_line(line.i,"!%s"%(line.text),line.filename)) )
|
||||||
elif isinstance(line,Call):
|
elif isinstance(line,Call):
|
||||||
|
l = find_variables_in_line(line)
|
||||||
|
l = filter(lambda x: x not in varlist, l)
|
||||||
sub = find_subroutine_in_line(line)
|
sub = find_subroutine_in_line(line)
|
||||||
if sub not in subroutines:
|
if sub not in subroutines:
|
||||||
t = Simple_line
|
t = Simple_line
|
||||||
|
result.append( (l,Simple_line(line.i,line.text,line.filename)) )
|
||||||
else:
|
else:
|
||||||
if subroutines[sub].touches == []:
|
result.append( (l,line) )
|
||||||
t = Simple_line
|
if subroutines[sub].touches != []:
|
||||||
else:
|
result.append( ([],Provide_all(line.i,"",line.filename)) )
|
||||||
t = Provide_all
|
|
||||||
l = find_variables_in_line(line)
|
|
||||||
l = filter(lambda x: x not in varlist, l)
|
|
||||||
result.append( (l,t(line.i,line.text,line.filename)) )
|
|
||||||
elif isinstance(line,Free):
|
elif isinstance(line,Free):
|
||||||
vars = line.text.split()
|
vars = line.text.split()
|
||||||
if len(vars) < 2:
|
if len(vars) < 2:
|
||||||
@ -383,7 +382,6 @@ def find_vars_from_functions():
|
|||||||
return main_result
|
return main_result
|
||||||
|
|
||||||
parsed_text = find_vars_from_functions()
|
parsed_text = find_vars_from_functions()
|
||||||
parsed_text = move_variables()
|
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
def build_needs():
|
def build_needs():
|
||||||
@ -439,7 +437,7 @@ parsed_text = result
|
|||||||
######################################################################
|
######################################################################
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
for i in range(len(parsed_text)):
|
for i in range(len(parsed_text)):
|
||||||
if parsed_text[i][0] == 'jastrow.irp.f':
|
if parsed_text[i][0] == 'orbitalJastrow.irp.f':
|
||||||
print '!-------- %s -----------'%(parsed_text[i][0])
|
print '!-------- %s -----------'%(parsed_text[i][0])
|
||||||
for line in parsed_text[i][1]:
|
for line in parsed_text[i][1]:
|
||||||
print line[1]
|
print line[1]
|
||||||
|
@ -71,11 +71,7 @@ def find_subname(line):
|
|||||||
if not buffer.endswith(')'):
|
if not buffer.endswith(')'):
|
||||||
buffer += "()"
|
buffer += "()"
|
||||||
buffer = buffer.split('(')
|
buffer = buffer.split('(')
|
||||||
if len(buffer) > 1:
|
buffer = buffer[0].lower().split()
|
||||||
buffer = " ".join(buffer[:-1])
|
|
||||||
else:
|
|
||||||
buffer = buffer[0]
|
|
||||||
buffer = buffer.lower().split()
|
|
||||||
if len(buffer) < 2:
|
if len(buffer) < 2:
|
||||||
error.fail(line,"Syntax Error")
|
error.fail(line,"Syntax Error")
|
||||||
return buffer[-1]
|
return buffer[-1]
|
||||||
|
@ -1 +1 @@
|
|||||||
version = "1.1.35"
|
version = "1.1.38"
|
||||||
|
Loading…
Reference in New Issue
Block a user