parrt/antlr4 — pull request #96 by sharwell (2012-10-08 12:41:38+00:00)
Title: Fix parent pointers when building trees for recursive rules

Invalid trees were being produced by `pushNewRecursionContext`. This addresses the following:

* The `invokingState` field is now kept in a consistent state
* `pushNewRecursionContext` correctly adds the previous recursion context as a child of the new context (but only calls `addChild` if `_buildParseTrees` is `true`).
* Add a new method `enterRecursionContext` that is called instead of `pushNewRecursionContext` at the beginning of an LR rule because in that case the invoking context is not moved to be a child of the new context.