How to Implement a Ruby Hash Like Grammar in Parslet, Part 2

See the original posting on DZone Python

Welcome back! If you missed Part 1, you can check it out here.

Transformers – Abstract Syntax Trees in Disguise

I mentioned transformers previously, but they’re such an abstract concept that it helps to look at an example. Think of them as a way to reduce leaf nodes on our tree so that they make more sense. One way to represent our current parse tree is this: