parser.Parser.parse_string

Here are the examples of the python api parser.Parser.parse_string taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

Example 1

Project: Gelatin Source File: util.py
def compile_string(syntax):
    """
    Builds a converter from the given syntax and returns it.

    @type  syntax: str
    @param syntax: A Gelatin syntax.
    @rtype:  compiler.Context
    @return: The compiled converter.
    """
    return Parser().parse_string(syntax, SyntaxCompiler())