Havvy/FTL — pull request #16 by r3 (2012-11-22 10:08:59+00:00)
Title: Substantial Refactoring

Changed iteration over characters from a stream to iteration over lines from that stream. Improves performance and simplifies the process of lexing. Allows a simple regex for the variable token (which has been simplified).

Renamed 'parser.py' to 'nodes.py' as that's all there is in there for now. We already split tokens out from the parser, so I assume that it's not a bad idea to do the same here. We'll start a new parser module once we've got a solid start on the nodes, which should probably be the next thing to tackle.

Modfied nodes.ALL class such that testing for membership of a Node's legal_children will now respond properly (always True if the legal_children contains nodes.ALL).

Additionally, some winter cleaning of cruft. I removed some unidentified code from the parser (now nodes) module and added it to a new module: abandoned. I didn't want to delete it, but I didn't want to leave it cluttering things up either.