I've never used ruby-prof before, so I'll have to find documentation. I thought about hacking Parslet like you said, but didn't want to if it already has an option. Any hints on where I should start? Thank you!
On Fri, Mar 22, 2013 at 9:49 AM, Zach Moazeni <[email protected]>wrote: > I've noticed that following a .maybe with .repeat would take my parser > into a tailspin (kinda makes sense). I took cursory look at your code and > didn't spot any of those though. > > Is it possible to use ruby-prof and kill mid-stream? Does that print out > the traces before it is killed? That may be one way to track it down. > > Other than that, I would clone the parslet repo, point your Gemfile to the > local path, and litter the parslet codebase with print statements. It's > crude, but it will get you what you are looking for. (And it won't leave > code turds in your installed gems as opposed to `bundle open parslet`) > > Good luck, > > -Zach > > On Mar 21, 2013, at 8:49 PM, Thomas Ingram wrote: > > > I am working on a new programming language ( > https://github.com/rip-lang/rip/tree/take-two), and I'm having trouble > getting to the bottom of some infinite loops. Is there a way to print out > each rule as it gets called, such that I can see the rules that are > recursing? I've tried walking through the code in my head, and I just don't > see it. Any help would be much appreciated. Thank you and thank you so much > for Parslet! > > > > -- > > Thomas Ingram > > -- Thomas Ingram
