concept context - sensitive parser in category functional programming

appears as: context-sensitive parser, context-sensitive parsers
Functional Programming with Kotlin

This is an excerpt from Manning's book Functional Programming with Kotlin.

Using flatMap and any other combinators, write the context-sensitive parser we couldn’t express earlier. The result should be a Parser<Int> that returns the number of characters read. You can make use of a new primitive called regex to parse digits, which promotes a regular expression String to a Parser<String>.