mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-21 11:53:32 +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))
|
||||
result.append( (l,Simple_line(line.i,"!%s"%(line.text),line.filename)) )
|
||||
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)
|
||||
if sub not in subroutines:
|
||||
t = Simple_line
|
||||
result.append( (l,Simple_line(line.i,line.text,line.filename)) )
|
||||
else:
|
||||
if subroutines[sub].touches == []:
|
||||
t = Simple_line
|
||||
else:
|
||||
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)) )
|
||||
result.append( (l,line) )
|
||||
if subroutines[sub].touches != []:
|
||||
result.append( ([],Provide_all(line.i,"",line.filename)) )
|
||||
elif isinstance(line,Free):
|
||||
vars = line.text.split()
|
||||
if len(vars) < 2:
|
||||
@ -383,7 +382,6 @@ def find_vars_from_functions():
|
||||
return main_result
|
||||
|
||||
parsed_text = find_vars_from_functions()
|
||||
parsed_text = move_variables()
|
||||
|
||||
######################################################################
|
||||
def build_needs():
|
||||
@ -439,7 +437,7 @@ parsed_text = result
|
||||
######################################################################
|
||||
if __name__ == '__main__':
|
||||
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])
|
||||
for line in parsed_text[i][1]:
|
||||
print line[1]
|
||||
|
@ -71,11 +71,7 @@ def find_subname(line):
|
||||
if not buffer.endswith(')'):
|
||||
buffer += "()"
|
||||
buffer = buffer.split('(')
|
||||
if len(buffer) > 1:
|
||||
buffer = " ".join(buffer[:-1])
|
||||
else:
|
||||
buffer = buffer[0]
|
||||
buffer = buffer.lower().split()
|
||||
buffer = buffer[0].lower().split()
|
||||
if len(buffer) < 2:
|
||||
error.fail(line,"Syntax Error")
|
||||
return buffer[-1]
|
||||
|
@ -1 +1 @@
|
||||
version = "1.1.35"
|
||||
version = "1.1.38"
|
||||
|
Loading…
Reference in New Issue
Block a user