dad3367e9e
It's a bit funny, the motivation for a new Parser class came from the success of simple regex + space munching in csv.py, but adopting Parser in csv.py makes sense for a couple reasons: - Consistency and better code sharing with other scripts that need to parse things (stack.py, prettyasserts.py?). - Should be more efficient, since we avoid copying the entire string every time we chomp/slice. Though I don't think this really matters for the size of csv.py's exprs... - No need to write every regex twice! Since Parser remembers the last match.