mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-09-01 09:13:40 +02:00
Corrected bug in IRP_READ/IRP_WRITE
Version:1.1.26
This commit is contained in:
parent
80ffdded64
commit
413a934889
@ -2,6 +2,6 @@ program irp_example2
|
||||
print *, "Example 2"
|
||||
print *, 't = ', t
|
||||
|
||||
! IRP_WRITE t
|
||||
IRP_WRITE t
|
||||
|
||||
end
|
||||
|
@ -133,10 +133,10 @@ def get_parsed_text():
|
||||
result += map(lambda x: ([],Simple_line(line.i,x,line.filename)),
|
||||
variables[var].free)
|
||||
elif isinstance(line,Irp_read):
|
||||
variables[line.filename].is_read = True
|
||||
variables[line.filename]._is_read = True
|
||||
result.append( ([],Simple_line(line.i,"!%s"%(line.text),line.filename)) )
|
||||
elif isinstance(line,Irp_write):
|
||||
variables[line.filename].is_written = True
|
||||
variables[line.filename]._is_written = True
|
||||
result.append( ([],Simple_line(line.i,"!%s"%(line.text),line.filename)) )
|
||||
elif isinstance(line,Touch):
|
||||
vars = line.text.split()
|
||||
|
@ -352,11 +352,11 @@ def irp_simple_statements(text):
|
||||
f = line.filename
|
||||
txt = line.text.lstrip()
|
||||
result = [
|
||||
Simple_line(i,"!",f),
|
||||
Empty_line(i,"!",f),
|
||||
t(i,"! >>> %s"%(txt,),variable ),
|
||||
Provide_all(i," call %ser_%s('%s')"%(rw,variable,num),f),
|
||||
Simple_line(i,"! >>> END %s "%(txt,),f ),
|
||||
Simple_line(line.i,"!",f),
|
||||
Empty_line(i,"! >>> END %s "%(txt,),f ),
|
||||
Empty_line(line.i,"!",f),
|
||||
]
|
||||
return result
|
||||
|
||||
@ -403,8 +403,8 @@ def irp_simple_statements(text):
|
||||
f = line.filename
|
||||
txt = line.text.strip()
|
||||
result = [
|
||||
Simple_line(i, "!", f),
|
||||
Simple_line(i, "! >>> %s"%(txt,), f),
|
||||
Empty_line(i, "!", f),
|
||||
Empty_line(i, "! >>> %s"%(txt,), f),
|
||||
If (i, " if (.not.%s) then"%(condition,), f),
|
||||
Simple_line(i, " call irp_trace", f),
|
||||
Simple_line(i, " print *, irp_here//': Assert failed:'", f),
|
||||
@ -413,8 +413,8 @@ def irp_simple_statements(text):
|
||||
] + debug_conditions(line) + [
|
||||
Simple_line(i, " stop 1", f),
|
||||
Endif (i, " endif", f),
|
||||
Simple_line(i, "! <<< END %s"%(txt,), f),
|
||||
Simple_line(i, "!", f)
|
||||
Empty_line(i, "! <<< END %s"%(txt,), f),
|
||||
Empty_line(i, "!", f)
|
||||
]
|
||||
else:
|
||||
result = []
|
||||
|
@ -40,15 +40,12 @@ class Variable(object):
|
||||
self.text = text
|
||||
if name is not None:
|
||||
self._name = name.lower()
|
||||
self.is_read = False
|
||||
self.is_written = False
|
||||
|
||||
############################################################
|
||||
def is_touched(self):
|
||||
'''Name is lowercase'''
|
||||
if '_is_touched' not in self.__dict__:
|
||||
from variables import variables
|
||||
result = False
|
||||
result = self.is_read
|
||||
for i in self.children:
|
||||
if variables[i].is_touched:
|
||||
result = True
|
||||
@ -57,9 +54,34 @@ class Variable(object):
|
||||
return self._is_touched
|
||||
is_touched = property(is_touched)
|
||||
|
||||
############################################################
|
||||
def is_written(self):
|
||||
if '_is_written' not in self.__dict__:
|
||||
from variables import variables
|
||||
result = False
|
||||
for i in self.parents:
|
||||
if variables[i].is_written:
|
||||
result = True
|
||||
break
|
||||
self._is_written = result
|
||||
return self._is_written
|
||||
is_written = property(is_written)
|
||||
|
||||
############################################################
|
||||
def is_read(self):
|
||||
if '_is_read' not in self.__dict__:
|
||||
from variables import variables
|
||||
result = False
|
||||
for i in self.parents:
|
||||
if variables[i].is_read:
|
||||
result = True
|
||||
break
|
||||
self._is_read = result
|
||||
return self._is_read
|
||||
is_read = property(is_read)
|
||||
|
||||
############################################################
|
||||
def is_main(self):
|
||||
'''Name is lowercase'''
|
||||
if '_is_main' not in self.__dict__:
|
||||
self._is_main = (self.name == self.same_as)
|
||||
return self._is_main
|
||||
|
@ -1 +1 @@
|
||||
version = "1.1.25"
|
||||
version = "1.1.26"
|
||||
|
Loading…
Reference in New Issue
Block a user