def doMain(args): # Parse all legacy files. import seqan.dddoc.core as core app = core.App() for path in args.legacy_doc_dirs: print 'Scanning %s...' % path app.loadFiles(path) migrated_doc = raw_doc.RawDoc() if args.legacy_doc_dirs: app.loadingComplete() migrated_doc.entries = migration.migrate(app.dddoc_tree) print 'migrated_doc.entries', [e.name.text for e in migrated_doc.entries] # Parse all normal input files. fmgr = file_mgr.FileManager() master_doc = raw_doc.RawDoc() master_doc.merge(migrated_doc) fns = FileNameSource(args.inputs) for filename in fns.generate(): if args.debug: print 'Processing %s' % filename the_file = fmgr.loadFile(filename) lex = lexer.Lexer(dox_tokens.LEXER_TOKENS, skip_whitespace=False) for comment in the_file.comments: # TODO(holtgrew): Also give offset. lex.input(comment.text, filename, comment.line, comment.col, comment.offset_col) parser = dox_parser.Parser() try: parser.parse(lex) except dox_parser.ParserError, e: dox_parser.printParserError(e) return 1 master_doc.merge(parser.documentation)
def setUp(self): self.base_dir = os.path.dirname(os.path.realpath(__file__)) self.mgr = file_mgr.FileManager()