Zach, Thanks for the tip about ruby-prof; I've never used it before, but it was really easy to set up. I ended up using ruby-prof to find a method in parslet (Parslet::Atoms::Context#lookup) to hack to output what rule was being tried. This prompted me to refactor many of the tests to fix incorrect/inconsistent expectations.
Kaspar, (I'm not sure what you have in mind, so I'll try to be thorough.) I have isolated two tests with :focus and pushed to GitHub (lines 530 and 608 in spec/rip/compiler/parser_spec.rb). These tests are operating on `0.one().two.three()` and `1 + 2 + 3 + 4`, respectively (but without backticks). The problem seems to be originating in the Rip::Compiler::Parser#phrase set of rules (line 64 in lib/rip/compiler/parser.rb). Thank you so much for taking a look at this. Let me know if you need any more information. On Sun, Mar 24, 2013 at 11:34 AM, Kaspar Schiess <[email protected]> wrote: > On 22.03.13 01:49, 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! > Hei Thomas, > > Help us help you: post an instance of a problem that goes StackError and > we'll be surely able to figure out why. Then lather, rinse, repeat :) > > kaspar > > > > -- Thomas Ingram
