Ok, I've sent a pull request that detects infinite loops. . Basically within a repeat atom, where there is no max specified, if you get an iteration of the 'repeat' that matches a zero length, nothing will stop you doing that again on the next iteration, so you are in an infinite loop.
It would be nice to detect it statically, but at least this way while unit testing you should spot the problem. Cheers Nigel --- "Man, I'm going to have so many chickens when this lot hatch!" On Wed, Jun 4, 2014 at 1:59 PM, Nigel Thorne <[email protected]> wrote: > Sure. That sounds very possible. > On 4 Jun 2014 01:48, "Kaspar Schiess" <[email protected]> wrote: > >> > >> > I have seen people monkey patch the parser to get a trace of the parse >> as >> > it runs.. so you can see where your grammar gets stuck. >> > That sounds like it might help. >> > >> >> We could detect loops.. contributions welcome ;) >> >> (Like in 'debug' mode, for speed reasons) >> >> kaspar >> >
