10
0
mirror of https://gitlab.com/scemama/irpf90.git synced 2024-07-05 19:05:51 +02:00

Bug with parentheses

This commit is contained in:
Anthony Scemama 2012-11-15 12:00:43 +01:00
parent a0fb70b15f
commit f08f90321b
2 changed files with 4 additions and 3 deletions

View File

@ -545,5 +545,5 @@ if __name__ == '__main__':
for line in parsed_text[i][1]: for line in parsed_text[i][1]:
print line[1] print line[1]
print line[0], line[1].filename print line[0], line[1].filename
for i in subroutines: #for i in subroutines:
print i, subroutines[i].needs, subroutines[i].to_provide # print i, subroutines[i].needs, subroutines[i].to_provide

View File

@ -107,7 +107,7 @@ def get_type (i, filename, line, is_doc):
lower_line = re_endif.sub("endif",lower_line) lower_line = re_endif.sub("endif",lower_line)
lower_line = re_endselect.sub("endselect",lower_line) lower_line = re_endselect.sub("endselect",lower_line)
for c in """()'"[]""": for c in """()'"[]""":
lower_line = lower_line.replace(c," ") lower_line = lower_line.replace(c," "+c+" ")
buffer = lower_line.split() buffer = lower_line.split()
if len(buffer) == 0: if len(buffer) == 0:
@ -854,6 +854,7 @@ preprocessed_text = parallel_loop( lambda x,y: create_preprocessed_text(x), \
###################################################################### ######################################################################
def debug(): def debug():
for filename, txt in preprocessed_text: for filename, txt in preprocessed_text:
if filename == 'jastrow_large.irp.f':
print "=== "+filename+" ===" print "=== "+filename+" ==="
for line in txt: for line in txt:
print line print line