def make_loader(writable=False, **options): ApacheConfigLexer = make_lexer(**options) ApacheConfigParser = make_parser(**options) if writable: options["preservewhitespace"] = True yield ApacheConfigWritableLoader( ApacheConfigParser(ApacheConfigLexer(), start='contents'), **options) else: yield ApacheConfigLoader(ApacheConfigParser(ApacheConfigLexer()), **options)
def make_loader(**options): ApacheConfigLexer = make_lexer(**options) ApacheConfigParser = make_parser(**options) yield ApacheConfigLoader(ApacheConfigParser(ApacheConfigLexer()), **options)