mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-09-02 01:33:42 +02:00
Fixed Bug introduced in version 1.1.49
Version:1.1.56
This commit is contained in:
parent
5565591b8f
commit
b3474f293c
@ -32,17 +32,23 @@ mandir = "IRPF90_man/"
|
|||||||
class Line(object):
|
class Line(object):
|
||||||
def __init__(self,i,text,filename):
|
def __init__(self,i,text,filename):
|
||||||
self.i = i
|
self.i = i
|
||||||
self.text = text
|
self._text = None
|
||||||
self.lower = text.lower()
|
|
||||||
self.filename = filename
|
self.filename = filename
|
||||||
self._lower = None
|
self._lower = None
|
||||||
|
self.set_text(text)
|
||||||
|
|
||||||
|
def get_text(self):
|
||||||
|
return self._text
|
||||||
|
|
||||||
|
def set_text(self,value):
|
||||||
|
self._text = value
|
||||||
|
self._lower = value.lower()
|
||||||
|
|
||||||
def get_lower(self):
|
def get_lower(self):
|
||||||
if self._lower is None:
|
|
||||||
self._lower = self.text.lower()
|
|
||||||
return self._lower
|
return self._lower
|
||||||
|
|
||||||
text_lower = property(fget=get_lower)
|
text = property(fget=get_text, fset=set_text)
|
||||||
|
lower = property(fget=get_lower)
|
||||||
|
|
||||||
class Empty_line(Line):
|
class Empty_line(Line):
|
||||||
def __init__(self,i,text,filename):
|
def __init__(self,i,text,filename):
|
||||||
|
@ -43,7 +43,7 @@ def find_variables_in_line(line):
|
|||||||
assert isinstance(line,Line)
|
assert isinstance(line,Line)
|
||||||
result = []
|
result = []
|
||||||
sub_done = False
|
sub_done = False
|
||||||
buffer = line.text_lower
|
buffer = line.lower
|
||||||
ap = result.append
|
ap = result.append
|
||||||
for v,same_as,regexp in vtuple:
|
for v,same_as,regexp in vtuple:
|
||||||
if v in buffer:
|
if v in buffer:
|
||||||
@ -59,7 +59,7 @@ def find_funcs_in_line(line):
|
|||||||
result = []
|
result = []
|
||||||
append = result.append
|
append = result.append
|
||||||
sub_done = False
|
sub_done = False
|
||||||
buffer = line.text_lower
|
buffer = line.lower
|
||||||
for s,regexp in stuple:
|
for s,regexp in stuple:
|
||||||
if s in buffer:
|
if s in buffer:
|
||||||
if regexp.search(buffer) is not None:
|
if regexp.search(buffer) is not None:
|
||||||
@ -94,7 +94,7 @@ def update_variables():
|
|||||||
for filename,text in preprocessed_text:
|
for filename,text in preprocessed_text:
|
||||||
|
|
||||||
for line in filter(lambda x: type(x) in [ Touch, SoftTouch ], text):
|
for line in filter(lambda x: type(x) in [ Touch, SoftTouch ], text):
|
||||||
vars = line.text_lower.split()
|
vars = line.lower.split()
|
||||||
if len(vars) < 2:
|
if len(vars) < 2:
|
||||||
error.fail(line,"Syntax error")
|
error.fail(line,"Syntax error")
|
||||||
for v in vars[1:]:
|
for v in vars[1:]:
|
||||||
@ -103,7 +103,7 @@ def update_variables():
|
|||||||
variables[v]._is_touched = True
|
variables[v]._is_touched = True
|
||||||
|
|
||||||
for line in filter(lambda x: type(x) == Free,text):
|
for line in filter(lambda x: type(x) == Free,text):
|
||||||
vars = line.text_lower.split()
|
vars = line.lower.split()
|
||||||
if len(vars) < 2:
|
if len(vars) < 2:
|
||||||
error.fail(line,"Syntax error")
|
error.fail(line,"Syntax error")
|
||||||
for v in vars[1:]:
|
for v in vars[1:]:
|
||||||
@ -148,7 +148,7 @@ def get_parsed_text():
|
|||||||
elif type(line) in [ Begin_provider, Cont_provider ]:
|
elif type(line) in [ Begin_provider, Cont_provider ]:
|
||||||
if type(line) == Begin_provider:
|
if type(line) == Begin_provider:
|
||||||
varlist = []
|
varlist = []
|
||||||
buffer = map(strip,line.text_lower.replace(']','').split(','))
|
buffer = map(strip,line.lower.replace(']','').split(','))
|
||||||
assert len(buffer) > 1
|
assert len(buffer) > 1
|
||||||
v = buffer[1]
|
v = buffer[1]
|
||||||
varlist.append(v)
|
varlist.append(v)
|
||||||
@ -163,14 +163,14 @@ def get_parsed_text():
|
|||||||
varlist = []
|
varlist = []
|
||||||
append( ([],line) )
|
append( ([],line) )
|
||||||
elif type(line) == Provide:
|
elif type(line) == Provide:
|
||||||
l = line.text_lower.split()[1:]
|
l = line.lower.split()[1:]
|
||||||
l = filter(lambda x: x not in varlist, l)
|
l = filter(lambda x: x not in varlist, l)
|
||||||
for v in l:
|
for v in l:
|
||||||
if v not in variables.keys():
|
if v not in variables.keys():
|
||||||
error.fail(line,"Variable %s is unknown"%(v))
|
error.fail(line,"Variable %s is unknown"%(v))
|
||||||
append( (l,Simple_line(line.i,"!%s"%(line.text),line.filename)) )
|
append( (l,Simple_line(line.i,"!%s"%(line.text),line.filename)) )
|
||||||
elif type(line) in [ Touch, SoftTouch ]:
|
elif type(line) in [ Touch, SoftTouch ]:
|
||||||
vars = line.text_lower.split()
|
vars = line.lower.split()
|
||||||
if len(vars) < 2:
|
if len(vars) < 2:
|
||||||
error.fail(line,"Syntax error")
|
error.fail(line,"Syntax error")
|
||||||
vars = vars[1:]
|
vars = vars[1:]
|
||||||
@ -209,7 +209,7 @@ def get_parsed_text():
|
|||||||
if subroutines[sub].touches != []:
|
if subroutines[sub].touches != []:
|
||||||
append( ([],Provide_all(line.i,"",line.filename)) )
|
append( ([],Provide_all(line.i,"",line.filename)) )
|
||||||
elif type(line) == Free:
|
elif type(line) == Free:
|
||||||
vars = line.text_lower.split()
|
vars = line.lower.split()
|
||||||
vars = vars[1:]
|
vars = vars[1:]
|
||||||
append( ([],Simple_line(line.i,"!%s"%(line.text),line.filename)) )
|
append( ([],Simple_line(line.i,"!%s"%(line.text),line.filename)) )
|
||||||
use = map(lambda x: " use %s"%(variables[x].fmodule),vars)
|
use = map(lambda x: " use %s"%(variables[x].fmodule),vars)
|
||||||
@ -414,7 +414,7 @@ def build_needs():
|
|||||||
var = None
|
var = None
|
||||||
for vars,line in text:
|
for vars,line in text:
|
||||||
if type(line) == Begin_provider:
|
if type(line) == Begin_provider:
|
||||||
buffer = map(strip,line.text_lower.replace(']',',').split(','))
|
buffer = map(strip,line.lower.replace(']',',').split(','))
|
||||||
var = variables[buffer[1]]
|
var = variables[buffer[1]]
|
||||||
var.needs = []
|
var.needs = []
|
||||||
var.to_provide = vars
|
var.to_provide = vars
|
||||||
|
@ -69,7 +69,7 @@ def build_dim_colons(v):
|
|||||||
|
|
||||||
import error
|
import error
|
||||||
def find_subname(line):
|
def find_subname(line):
|
||||||
buffer = line.text_lower
|
buffer = line.lower
|
||||||
if not buffer.endswith(')'):
|
if not buffer.endswith(')'):
|
||||||
buffer += "()"
|
buffer += "()"
|
||||||
buffer = buffer.split('(')
|
buffer = buffer.split('(')
|
||||||
|
Loading…
Reference in New Issue
Block a user