boto/jmespath — pull request #7 by jamesls (2013-07-07 22:25:53+00:00)
Title: Support root level wildcards

Fixes #4

This PR also cleans up some of the grammar and fixes some of the quirky parts of the AST. The simplified subexpression grammar is roughly:

```
expression : subexpression
: STAR

subexpression : expression DOT expression
````

I also removed the `ElementsBranch` and `ValuesBranch` which was unnecessary. The parsing rules have been unified to just used subexpressions so instead of `ElementsBranch(Field(foo))` it's just `SubExpression(Field(foo), WildcardIndex())` for `foo[*]`. Similar thing for `WildcardValues`. This means that root level wildcards (in the case of a subexpression) is just `SubExpression(WildcardValues(), Field(foo))` which has a nice symmetry to the now simplified inverted rule for `field.*`: `SubExpression(Field(foo), WildcardValues())`