pyrser/grammar.py
def from_string(bnf: str, entry=None, *optional_inherit) -> Grammar:
    """
    Create a Grammar from a string
    """
    inherit = [Grammar] + list(optional_inherit)
    scope = {'grammar': bnf, 'entry': entry}
    return build_grammar(tuple(inherit), scope)
def from_string(bnf: str, entry=None, *optional_inherit) -> Grammar:
    inherit = [Grammar] + list(optional_inherit)
    scope = {'grammar': bnf, 'entry': entry}
    return build_grammar(tuple(inherit), scope)
def from_string ( bnf : str , entry = None , * optional_inherit ) -> Grammar : inherit = [ Grammar ] + list ( optional_inherit ) scope = { 'grammar' : bnf , 'entry' : entry } return build_grammar ( tuple ( inherit ) , scope )
Create a Grammar from a string
Create a Grammar from a string