pyebnf/compiler.py
def directives_from_comment(cls, comment):
    """A directive is a line in a comment that begins with '!'."""
    comment_contents = comment.value[2:-2].strip()
    comment_lines = (l.strip() for l in comment_contents.split("\n"))
    directives = (l[1:].strip() for l in comment_lines if l.startswith("!"))

    for directive_def in directives:
      yield cls.parse_directive_def(directive_def)
def directives_from_comment(cls, comment):
    comment_contents = comment.value[2:-2].strip()
    comment_lines = (l.strip() for l in comment_contents.split("\n"))
    directives = (l[1:].strip() for l in comment_lines if l.startswith("!"))

    for directive_def in directives:
      yield cls.parse_directive_def(directive_def)
def directives_from_comment ( cls , comment ) : comment_contents = comment . value [ 2 : - 2 ] . strip ( ) comment_lines = ( l . strip ( ) for l in comment_contents . split ( "\n" ) ) directives = ( l [ 1 : ] . strip ( ) for l in comment_lines if l . startswith ( "!" ) ) for directive_def in directives : yield cls . parse_directive_def ( directive_def )
A directive is a line in a comment that begins with '!'.
A directive is a line in a comment that begins with ! .