I have the following fastparse parser named "variable":
val alphabet = 'A' to 'z'
val variable: Parser[String] = P(CharsWhileIn(alphabet).!)
I would like for this parser to fail on a specific word like "end", while still returning a Parser[String].
Try with negative lookahead:
where this will succeed:
but this won't: