示例#1
0
文件: tool.py 项目: neogeny/TatSu
def to_python_sourcecode(grammar,
                         name=None,
                         filename=None,
                         config: ParserConfig = None,
                         **settings):
    model = compile(grammar,
                    name=name,
                    filename=filename,
                    config=config,
                    **settings)
    return pythoncg(model)
示例#2
0
def to_python_sourcecode(grammar, name=None, filename=None, **kwargs):
    model = compile(grammar, name=name, filename=filename, **kwargs)
    return pythoncg(model)
示例#3
0
def to_python_sourcecode(grammar, name=None, filename=None, **kwargs):
    model = compile(grammar, name=name, filename=filename, **kwargs)
    return pythoncg(model)