> I don't know the specific technology in Parslet, but if it's a typical > recursive descent parser, you have to write your rules for lists a particular > way, otherwise they become infinite recursion. > > The two ways are: > > list ::= word | word list > > and > > list ::= word | list word
I followed the parslet convention of 'consuming first', which is what your saying there I think. I worked around it by simply removing the recursion, not as fancy but it works. I'll optimize it later. > Which ever one you are using, try the other. And try to reduce your grammar > to the smallest piece that breaks, and then work with it until it doesn't. > > I have been using Ruby and Rails for over 5 years and I have yet to see a > stack overflow that wasn't infinite recursion. > > HTH, > Jeffrey -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.