Tags: jpraher/parsimonious
Tags
Speed up grammar compilation by 100x. Close erikrose#62. Bump version… … to 0.6.2. Avoid redundant work in the reference resolver. Lift the set of exprs that have already been resolved up beyond the scope of just _resolve_refs(). This avoids forgetting all that experience on each loop around the list comp of rules in visit_rules(). For grammars with hundreds of rules, this can be the difference between 13s and 95ms compilation times. Keeping an explicit set of done exprs means we no longer need the members=() trick anymore. Perhaps the trick would continue to save us a few calls, but it's worth those to keep the code simple.
Fix bug which made the default rule of a grammar invalid when it cont… …ained a forward reference. Bump version to 0.6.1. Fix erikrose#61. Previously, the default rule was ending up a LazyReference, and so Grammar.parse() would explode.
PreviousNext