Lets say I have a REPL ./repl, which reads a line from the user, evaluates it, prints it and then repeats.
I have a .vim file that does syntax highlighting for this language in my .vim/syntax directory and I want to use this file to highlight the repl input (and if possible output).
How can I do this using vim or a other programming knowing vim syntax files?