a.py #!/usr/bin/env python class Parser(object): def __init__(self): self.parse1 = self.parse_main self.items = [] self.item = '' return def feed(self, text): i = 0 while i < len(text): (self.parse1, i) = self.parse1(text, i) return def parse_main(self, text, i): c = text[i] if c == ',': self.finish_item() return (self.parse_main, i+1) elif c == '"': return (self.parse_quote, i+1) elif c == '\\':