Lines Matching refs:line
42 def setLogLine(line):
44 logLine = line
47 """Generate prefix for a diagnostic line using metadata and severity"""
56 msg = msg + ' line ' + str(logLine)
131 """index of first line of the page (heuristic or // refBegin)"""
134 """index of include:: line defining the page"""
137 """index of first line of parameter/member definitions"""
140 """index of first line of body text"""
146 """index of last line of the page (heuristic validity include, or // refEnd)"""
152 """cross-references on // refEnd line, if supplied"""
160 def printPageInfoField(desc, line, file):
164 - line - field value or None
165 - file - indexed by line"""
166 if line is not None:
167 logDiag(desc + ':', line + 1, '\t-> ', file[line], end='')
169 logDiag(desc + ':', line)
190 def prevPara(file, line):
191 """Go back one paragraph from the specified line and return the line number
192 of the first line of that paragraph.
195 current line is the first line of a paragraph.
198 - line is the starting point (zero-based)"""
200 while (line >= 0 and not isempty(file[line])):
201 line = line - 1
203 while (line >= 0 and isempty(file[line])):
204 line = line - 1
205 # Skip to first line of previous paragraph
206 while (line >= 1 and not isempty(file[line-1])):
207 line = line - 1
208 return line
210 def nextPara(file, line):
211 """Go forward one paragraph from the specified line and return the line
212 number of the first line of that paragraph.
215 current line is standalone (which is bogus).
218 - line is the starting point (zero-based)"""
221 while (line != maxLine and not isempty(file[line])):
222 line = line + 1
224 while (line != maxLine and isempty(file[line])):
225 line = line + 1
226 return line
255 def clampToBlock(line, minline, maxline):
256 """Clamp a line number to be in the range [minline,maxline].
258 If the line number is None, just return it.
260 if line is None:
261 return line
262 if minline and line < minline:
264 if line > maxline:
267 return line
282 # # If nothing is found but an include line with no begin, validity,
284 # # line to the include line, so autogeneration can at least
367 'in', specFile, 'at line', pi.include )
375 'in', specFile, 'at line', pi.include )
382 'at line', pi.include)
424 # skip past the '--' block delimiter on the next line; and identify the
430 # 'start' - have found the '[open...]' line
431 # 'inside' - have found the following '--' line
434 # Dictionary of interesting line numbers and strings related to an API
439 line = 0
444 while (line < numLines):
445 setLogLine(line)
451 matches = beginPat.search(file[line])
458 logErr('Nested open block starting at line', line, 'of',
514 line = line + 1
518 if file[line].rstrip() == '--':
529 pi.begin = line + 1
536 pi.end = line - 1
544 line = line + 1
547 matches = INCLUDE.search(file[line])
562 pi.validity = line
565 logWarn('validity include:: line NOT inside block')
567 line = line + 1
579 pi.include = line
582 logWarn('interface include:: line NOT inside block')
584 line = line + 1
587 logDiag('ignoring unrecognized include line ', matches.group())
592 # This looks for endif:: immediately following an include:: line
593 # and, if found, moves the include boundary to this line.
594 matches = endifPat.search(file[line])
596 if pi.include == line - 1:
598 pi.include = line
602 line = line + 1
605 matches = bodyPat.search(file[line])
609 pi.body = line
612 logWarn('// refBody line NOT inside block')
614 line = line + 1
619 matches = errorPat.search(file[line])
623 pi.validity = line
626 logWarn('// refError line NOT inside block')
628 line = line + 1
631 line = line + 1