You suggested earlier that a stacktrace I was getting might have been caused by bad parser design. Here is a similar, simpler parser that fails, although this one just runs forever. The problem seems to arise when a pattern with a ".rep" is nested in another with a ".rep".
import $ivy.`com.lihaoyi::fastparse:3.0.2`
import fastparse._, NoWhitespace._
def lots[$: P] = P( CharPred('X' == _).rep).log. // remove this ".rep" and it finishes
def manyLots[$: P] = P( (lots).rep )
parse("", manyLots(_) )
You suggested earlier that a stacktrace I was getting might have been caused by bad parser design. Here is a similar, simpler parser that fails, although this one just runs forever. The problem seems to arise when a pattern with a ".rep" is nested in another with a ".rep".
result: