Quoting PsiPro <[email protected]>: > Hello all, > > I am using parslet to do some log-file parsing and have run into the > "stack level too deep" error, and I am only half-way though with > writing the rules for a single line to be parsed. >
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 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

