mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-21 11:53:32 +01:00
Introduced nodep
Version:1.1.64
This commit is contained in:
parent
4bf8e74490
commit
cdab9bb2c0
@ -284,6 +284,12 @@ class Provide(Line):
|
||||
def __repr__(self):
|
||||
return "%20s:%5d : %s"%("Provide",self.i,self.text)
|
||||
|
||||
class NoDep(Line):
|
||||
def __init__(self,i,text,filename):
|
||||
Line.__init__(self,i,text,filename)
|
||||
def __repr__(self):
|
||||
return "%20s:%5d : %s"%("NoDep",self.i,self.text)
|
||||
|
||||
class Return (Line):
|
||||
def __init__(self,i,text,filename):
|
||||
Line.__init__(self,i,text,filename)
|
||||
|
@ -169,6 +169,13 @@ def get_parsed_text():
|
||||
if v not in variables.keys():
|
||||
error.fail(line,"Variable %s is unknown"%(v))
|
||||
append( (l,Simple_line(line.i,"!%s"%(line.text),line.filename)) )
|
||||
elif type(line) == NoDep:
|
||||
l = line.lower.split()[1:]
|
||||
for v in l:
|
||||
if v not in variables.keys():
|
||||
error.fail(line,"Variable %s is unknown"%(v))
|
||||
l = map(lambda x: "-%s"%(x), l)
|
||||
append( (l,Simple_line(line.i,"!%s"%(line.text),line.filename)) )
|
||||
elif type(line) in [ Touch, SoftTouch ]:
|
||||
vars = line.lower.split()
|
||||
if len(vars) < 2:
|
||||
@ -244,7 +251,7 @@ parsed_text = get_parsed_text()
|
||||
|
||||
def move_to_top(text,t):
|
||||
assert type(text) == list
|
||||
assert t in [ Declaration, Implicit, Use, Cont_provider ]
|
||||
assert t in [ NoDep, Declaration, Implicit, Use, Cont_provider ]
|
||||
|
||||
inside = False
|
||||
for i in range(len(text)):
|
||||
@ -264,6 +271,7 @@ def move_to_top(text,t):
|
||||
|
||||
result = []
|
||||
for filename,text in parsed_text:
|
||||
text = move_to_top(text,NoDep)
|
||||
text = move_to_top(text,Declaration)
|
||||
text = move_to_top(text,Implicit)
|
||||
text = move_to_top(text,Use)
|
||||
@ -396,6 +404,10 @@ def move_variables():
|
||||
elif type(line) in [ End_provider, End ]:
|
||||
assert old_varlist == []
|
||||
varlist = []
|
||||
for v in vars[:]:
|
||||
if v[0] == '-':
|
||||
vars.remove(v)
|
||||
vars.remove(v[1:])
|
||||
result.append( (vars,line) )
|
||||
return result
|
||||
|
||||
@ -462,6 +474,7 @@ build_needs()
|
||||
|
||||
result = []
|
||||
for filename,text in parsed_text:
|
||||
text = move_to_top(text,NoDep)
|
||||
text = move_to_top(text,Declaration)
|
||||
text = move_to_top(text,Implicit)
|
||||
text = move_to_top(text,Use)
|
||||
@ -494,7 +507,7 @@ check_opt()
|
||||
######################################################################
|
||||
if __name__ == '__main__':
|
||||
for i in range(len(parsed_text)):
|
||||
if parsed_text[i][0] == 'eplf_function.irp.f':
|
||||
if parsed_text[i][0] == 'mo.irp.f':
|
||||
print '!-------- %s -----------'%(parsed_text[i][0])
|
||||
for line in parsed_text[i][1]:
|
||||
print line[1]
|
||||
|
@ -59,6 +59,7 @@ simple_dict = {
|
||||
"touch": Touch ,
|
||||
"soft_touch": SoftTouch ,
|
||||
"provide": Provide ,
|
||||
"no_dep": NoDep ,
|
||||
"free": Free ,
|
||||
"irp_if": Irp_If ,
|
||||
"irp_else": Irp_Else ,
|
||||
|
@ -1 +1 @@
|
||||
version = "1.1.63"
|
||||
version = "1.1.64"
|
||||
|
Loading…
Reference in New Issue
Block a user