def METHOD_NAME(self):
    def to_directive(name, attrs):
        return Directive(name=name.value, attrs=attrs, lineno=name.lineno, src=self)
    def to_directive_noval(name, sep):
        return Directive(name=name.value, attrs=[], lineno=name.lineno, src=self)
    def to_section(name, attrs, body):
        return Section(name=name.value, attrs=attrs, children=body, lineno=name.lineno, src=self)
    sep_chars = set("=")
    Sep = InSet(sep_chars, "Sep")
    name_chars = string.ascii_letters + "_/"
    Name = Many(WSChar) >> PosMarker(String(name_chars) | EmptyQuotedString(name_chars)) << Many(WSChar)
    BareStringDir = String(set(string.printable) - set("\r\n"))
    BareStringBlk = String(set(string.printable) - (set(string.whitespace) | set("{}'\"")))
    BlockBeg = Many(WSChar) >> LeftCurly << WS
    BlockEnd = Many(WSChar) >> RightCurly << (EOL | EOF)
    Comment = OneLineComment("#").map(lambda x: None) << (EOL | EOF)
    Stmt = Forward()
    _AttrDir = Many(WSChar) >> (BareStringDir | QuotedString)
    AttrDir = Sep >> Many(_AttrDir)
    AttrDirNoVal = Sep << Many(WSChar)
    Dir = (Lift(to_directive) * Name * AttrDir) << (EOL | EOF)
    DirNoVal = (Lift(to_directive_noval) * Name * AttrDirNoVal) << (EOL | EOF)
    _AttrBlk = Many(WSChar) >> (BareStringBlk | QuotedString)
    AttrsBlk = Many(_AttrBlk)
    BlockBody = BlockBeg >> Many(Stmt).map(skip_none) << BlockEnd
    Block = (Lift(to_section) * Name * AttrsBlk * BlockBody)
    Stmt <= WS >> (Block | Dir | DirNoVal | Comment) << WS
    Doc = Many(Stmt).map(skip_none)
    Top = Doc + EOF
    return Top