Example #1
0
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)
Example #2
0
def make_loader(**options):
    ApacheConfigLexer = make_lexer(**options)
    ApacheConfigParser = make_parser(**options)

    yield ApacheConfigLoader(ApacheConfigParser(ApacheConfigLexer()), **options)