• Home
  • Raw
  • Download

Lines Matching refs:j

44     def updatepos(self, i, j):  argument
45 if i >= j:
46 return j
48 nlines = rawdata.count("\n", i, j)
51 pos = rawdata.rindex("\n", i, j) # Should not fail
52 self.offset = j-(pos+1)
54 self.offset = self.offset + j-i
55 return j
72 j = i + 2
73 assert rawdata[i:j] == "<!", "unexpected call to parse_declaration"
74 if rawdata[j:j+1] == ">":
76 return j + 1
77 if rawdata[j:j+1] in ("-", ""):
83 if rawdata[j:j+2] == '--': #comment
86 elif rawdata[j] == '[': #marked section
93 decltype, j = self._scan_name(j, i)
94 if j < 0:
95 return j
98 while j < n:
99 c = rawdata[j]
102 data = rawdata[i+2:j]
111 return j + 1
113 m = _declstringlit_match(rawdata, j)
116 j = m.end()
118 name, j = self._scan_name(j, i)
120 j = j + 1
124 j = self._parse_doctype_subset(j + 1, i)
134 raise AssertionError("unexpected %r char in declaration" % rawdata[j])
135 if j < 0:
136 return j
144 sectName, j = self._scan_name( i+3, i )
145 if j < 0:
146 return j
155 'unknown status keyword %r in marked section' % rawdata[i+3:j]
160 j = match.start(0)
161 self.unknown_decl(rawdata[i+3: j])
173 j = match.start(0)
174 self.handle_comment(rawdata[i+4: j])
182 j = i
183 while j < n:
184 c = rawdata[j]
186 s = rawdata[j:j+2]
191 self.updatepos(declstartpos, j + 1)
195 if (j + 2) == n:
198 if (j + 4) > n:
201 if rawdata[j:j+4] == "<!--":
202 j = self.parse_comment(j, report=0)
203 if j < 0:
204 return j
206 name, j = self._scan_name(j + 2, declstartpos)
207 if j == -1:
210 self.updatepos(declstartpos, j + 2)
216 j = meth(j, declstartpos)
217 if j < 0:
218 return j
221 if (j + 1) == n:
224 s, j = self._scan_name(j + 1, declstartpos)
225 if j < 0:
226 return j
227 if rawdata[j] == ";":
228 j = j + 1
230 j = j + 1
231 while j < n and rawdata[j].isspace():
232 j = j + 1
233 if j < n:
234 if rawdata[j] == ">":
235 return j
236 self.updatepos(declstartpos, j)
241 j = j + 1
243 self.updatepos(declstartpos, j)
250 name, j = self._scan_name(i, declstartpos)
251 if j == -1:
255 if '>' in rawdata[j:]:
256 return rawdata.find(">", j) + 1
262 name, j = self._scan_name(i, declstartpos)
263 c = rawdata[j:j+1]
267 return j + 1
271 name, j = self._scan_name(j, declstartpos)
272 if j < 0:
273 return j
274 c = rawdata[j:j+1]
279 if ")" in rawdata[j:]:
280 j = rawdata.find(")", j) + 1
283 while rawdata[j:j+1].isspace():
284 j = j + 1
285 if not rawdata[j:]:
289 name, j = self._scan_name(j, declstartpos)
290 c = rawdata[j:j+1]
294 m = _declstringlit_match(rawdata, j)
296 j = m.end()
299 c = rawdata[j:j+1]
303 if rawdata[j:] == "#":
306 name, j = self._scan_name(j + 1, declstartpos)
307 if j < 0:
308 return j
309 c = rawdata[j:j+1]
314 return j + 1
318 name, j = self._scan_name(i, declstartpos)
319 if j < 0:
320 return j
323 c = rawdata[j:j+1]
328 return j + 1
330 m = _declstringlit_match(rawdata, j)
333 j = m.end()
335 name, j = self._scan_name(j, declstartpos)
336 if j < 0:
337 return j
343 j = i + 1
345 c = rawdata[j:j+1]
349 j = j + 1
353 j = i
354 name, j = self._scan_name(j, declstartpos)
355 if j < 0:
356 return j
358 c = self.rawdata[j:j+1]
362 m = _declstringlit_match(rawdata, j)
364 j = m.end()
368 return j + 1
370 name, j = self._scan_name(j, declstartpos)
371 if j < 0:
372 return j