On 16 Mar 2009, at 11:01, Édouard Gilbert wrote:
[...] Watch out for grammar bugs, however. It’s easy to make TM crash if you write things like:
begin = '(?=a)' end = '(?=b)'
because neither expression consume a character. [...]
For the records, you’d need to make it:
begin = '(?=a)' end = '(?=a)'
Here, if the ‘patterns’ active between begin/end do not consume anything, we have the infinite loop. In your example the parser would have advanced to “just before b”, so the same rule would not be applicable at the same position.