Lines Matching +defs:name +defs:pos
14 # function, and adding generation of a function (with the original name) which
29 pos = 0
30 while pos < len(lst):
32 s = lst[pos:].index(1) # look for start of next range
35 pos += s # pointer to start of possible range
37 e = lst[pos:].index(0) # look for end of range
38 e += pos
41 ret.append((pos, e-1)) # append range tuple to list
42 pos = e + 1 # ready to check for next range
52 # dictionary of functions, key=name, element contains char-map and range-list
65 # name: Defines a new function block
82 # name line:
88 if fields[0] == 'name':
89 name = fields[1]
91 print "'name' %s found before previous name" \
95 if Functs.has_key(name):
96 print "name '%s' already present - may give" \
97 " wrong results" % (name)
100 Functs[name] = [ [], [] ]
102 Functs[name][0].append(0)
105 # validate there was a preceding function name line
122 raise ValidationError, "'ur' found outside of 'name' block"
124 pos = string.find(el, '..')
125 # pos <=0 means not a range, so must be individual value
126 if pos <= 0:
136 ' name %s' % (el,name)
140 # pos > 0 means this is a range, so isolate/validate
166 if Functs[name][0][ch]:
167 msg = "Duplicate ch value '%s' for name '%s'" % (el, name)
169 Functs[name][0][ch] = 1
171 if currange in Functs[name][1]:
175 Functs[name][1].append(currange)
356 # 'ntab' is number of tabs needed to position to col. 33 from name end