[v6.x backport] repl: refactor LineParser
implementation
#15773
Closed
LineParser
implementation
#15773