Lines Matching refs:file
28 file = kwargs.pop('file',sys.stdout)
30 file.write(' '.join(str(arg) for arg in args))
31 file.write(end)
60 """Set the file handle to log either or both warnings and diagnostics to.
80 file = kwargs.pop('file', diagFile)
82 if file is not None:
83 file.write(logHeader('DIAG') + ' '.join(str(arg) for arg in args))
84 file.write(end)
87 file = kwargs.pop('file', warnFile)
89 if file is not None:
90 file.write(logHeader('WARN') + ' '.join(str(arg) for arg in args))
91 file.write(end)
94 file = kwargs.pop('file', errFile)
101 if file is not None:
102 file.write(strfile.getvalue())
110 """Information about a ref page relative to the file it is extracted from."""
160 def printPageInfoField(desc, line, file):
165 - file - indexed by line"""
167 logDiag(desc + ':', line + 1, '\t-> ', file[line], end='')
171 def printPageInfo(pi, file):
175 - file - indexed by pageInfo"""
182 printPageInfoField('BEGIN ', pi.begin, file)
183 printPageInfoField('INCLUDE ', pi.include, file)
184 printPageInfoField('PARAM ', pi.param, file)
185 printPageInfoField('BODY ', pi.body, file)
186 printPageInfoField('VALIDITY', pi.validity, file)
187 printPageInfoField('END ', pi.end, file)
190 def prevPara(file, line):
197 - file is an array of strings
200 while (line >= 0 and not isempty(file[line])):
203 while (line >= 0 and isempty(file[line])):
206 while (line >= 1 and not isempty(file[line-1])):
210 def nextPara(file, line):
217 - file is an array of strings
219 maxLine = len(file) - 1
221 while (line != maxLine and not isempty(file[line])):
224 while (line != maxLine and isempty(file[line])):
239 """Load a file into a list of strings. Return the (list, newline_string) or (None, None) on failure"""
250 logWarn('Cannot open file', filename, ':', sys.exc_info()[0])
269 def fixupRefs(pageMap, specFile, file):
275 - file - list of strings making up the file, indexed by pageInfo"""
326 pi.param = nextPara(file, pi.include)
328 pi.body = nextPara(file, pi.param)
331 pi.body = nextPara(file, pi.include)
344 printPageInfo(pi, file)
368 printPageInfo(pi, file)
369 printPageInfo(embed, file)
397 # Patterns used to recognize interesting lines in an asciidoc source file.
408 # It looks for various generated file conventions, and for the api/validity
416 def findRefs(file, filename):
438 numLines = len(file)
451 matches = beginPat.search(file[line])
518 if file[line].rstrip() == '--':
547 matches = INCLUDE.search(file[line])
594 matches = endifPat.search(file[line])
605 matches = bodyPat.search(file[line])
619 matches = errorPat.search(file[line])