def ne(line): if ':' in line: ls = line.split(':') isexist1 = False isexist2 = False for vn in varnlist: if ls[0] == vn.getName(): isexist1 = True vl = vn.getValue() if vl == -1 or vl == -2 or vl == 1: for vf in varflist: if ls[1] == vf.getName(): isexist2 = True lk.link(vf.getFile(), 0) break else: isexist2 = True break if not isexist1: print('\nVARN Error: \n >> ' + ls[0] + ' << don\'t exist\n') else: if not isexist2: print('\nVARF Error: \n >> ' + ls[1] + ' << don\'t exist\n') else: print('\nNE Error: missing \':\'')
def fcall(line): if len(line) > 0: isexist = False for vf in varflist: if line == vf.getName(): isexist = True lk.link(vf.getFile(), 0) break if not isexist: print('\nVARF Error: \n >> ' + line + ' << don\'t exist\n') else: print('\nFCALL Error: specify a file')
def loop(line): if ':' in line: ls = line.split(':') isexist1 = False isexist2 = False for vn in varnlist: if ls[0] == vn.getName(): isexist1 = True for vf in varflist: if ls[1] == vf.getName(): isexist2 = True lk.link(vf.getFile(), 1, int(vn.getValue())) break break if not isexist1: print('\nVARN Error: \n >> ' + ls[0] + ' << don\'t exist\n') else: if not isexist2: print('\nVARF Error: \n >> ' + ls[1] + ' << don\'t exist\n') else: print('\nLOOP Error: missing \':\'')