Hi List,
I will release parslet 1.2 soon. The big change in this release is that
all parses return slices instead of strings as their leafs (in
intermediary tree). This means that a tree from str('a').as(:i) will
inspect as
i: "a"@0
and that you could ask that string for its line and column
(str.line_and_column). These changes are already in master; If you want
to peek into it and perhaps review master for bugs, now would be a good
time ;)
I will push out 1.2 so that I can begin merging (and working) on left
recursion. This is largely covered by stormbrews pull request
(https://github.com/kschiess/parslet/pull/30). Left recursion helps in
these situations:
rule(:expr) { expr >> str('-') >> num | num }
Currently, you can't do that (it will create a StackOverflow exception)
- and with the patches in 1.3, you will be able to. Good news!
On a related note: I am thrilled and happy to see you guys taking
interest. Please keep the contributions coming! Let's make this real good.
regards,
kaspar