Lines Matching refs:j
48 def updatepos(self, i, j): argument
49 if i >= j:
50 return j
52 nlines = rawdata.count("\n", i, j)
55 pos = rawdata.rindex("\n", i, j) # Should not fail
56 self.offset = j-(pos+1)
58 self.offset = self.offset + j-i
59 return j
76 j = i + 2
77 assert rawdata[i:j] == "<!", "unexpected call to parse_declaration"
78 if rawdata[j:j+1] == ">":
80 return j + 1
81 if rawdata[j:j+1] in ("-", ""):
87 if rawdata[j:j+2] == '--': #comment
90 elif rawdata[j] == '[': #marked section
97 decltype, j = self._scan_name(j, i)
98 if j < 0:
99 return j
102 while j < n:
103 c = rawdata[j]
106 data = rawdata[i+2:j]
115 return j + 1
117 m = _declstringlit_match(rawdata, j)
120 j = m.end()
122 name, j = self._scan_name(j, i)
124 j = j + 1
128 j = self._parse_doctype_subset(j + 1, i)
139 "unexpected %r char in declaration" % rawdata[j])
140 if j < 0:
141 return j
149 sectName, j = self._scan_name( i+3, i )
150 if j < 0:
151 return j
159 self.error('unknown status keyword %r in marked section' % rawdata[i+3:j])
163 j = match.start(0)
164 self.unknown_decl(rawdata[i+3: j])
176 j = match.start(0)
177 self.handle_comment(rawdata[i+4: j])
185 j = i
186 while j < n:
187 c = rawdata[j]
189 s = rawdata[j:j+2]
194 self.updatepos(declstartpos, j + 1)
196 if (j + 2) == n:
199 if (j + 4) > n:
202 if rawdata[j:j+4] == "<!--":
203 j = self.parse_comment(j, report=0)
204 if j < 0:
205 return j
207 name, j = self._scan_name(j + 2, declstartpos)
208 if j == -1:
211 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