catseye / The-Swallows

Novel-generator and generated novels for NaNoGenMo 2013
http://catseye.tc/node/The%20Swallows
Other
34 stars 6 forks source link

Rewrite Editor to use multiple passes over a paragraph #5

Closed catseye closed 10 years ago

catseye commented 10 years ago

The first version of the Editor did look a lot like a peephole optimizer, but modern compilers are often written in a "broad" fashion, where (with the benefit of lots of resources like memory) they make multiple passes over the code, with each pass focusing on one particular transformation. The Editor could really use the same approach, since efficiency is not really an issue, and the current code is really pretty confusing, as it tries to make several transformations in a single pass.

catseye commented 10 years ago

Done. The code is a little bit clearer, and adding new transformation passes should be easier.