def expr(klass): parts = [i.expr() for i in klass.comps] atom = pp.MatchFirst(parts) resp = pp.And( [Method.expr(), Sep, Path.expr(), pp.ZeroOrMore(Sep + atom)]) return resp
def expr(klass): parts = [i.expr() for i in klass.comps] atom = pp.MatchFirst(parts) resp = pp.And([ pp.MatchFirst([ WS.expr() + pp.Optional(Sep + Code.expr()), Code.expr(), ]), pp.ZeroOrMore(Sep + atom) ]) resp = resp.setParseAction(klass) return resp
def expr(klass): parts = [i.expr() for i in klass.comps] atom = pp.MatchFirst(parts) resp = pp.And([WF.expr(), Sep, pp.ZeroOrMore(Sep + atom)]) resp = resp.setParseAction(klass) return resp