Looks like you found the pull request<https://github.com/kschiess/parslet/pull/51#issuecomment-8085375>on left-recursion. Probably the best course would be to rewrite your grammar as right-recursive and then transform it after the parse. Supposedly transforming right recursion makes your life easier even if Parslet had support for left recursion. I've never needed it, so I'd best leave it to someone else to help you implement that.
Jason On Mon, Aug 27, 2012 at 7:42 AM, Greg Hazel <[email protected]> wrote: > Hi, > > I'm trying to parse a simple situation as you might see in Python: > "f()()()" where the "f" function return a callable which is called which is > called. I've written the most obvious implementation, but it gets a "stack > level too deep" error. Parsing the same thing in reverse ("()()()f") works > if I form my parser backwards, and if I use obvious nesting "(((f)))". > > How can I parse "f()()()" to have the same nested result? > > Here's my attempt: https://gist.github.com/0b0b302c2c1271b85b8b > > -Greg > >
