I am writing a compiler, and would like to support internationalisation. I was pondering the possibility of interpreting format strings differently than the way provided by the ocaml compiler.
In particular, supporting things like
%1s which would reference the first argument provided when printing something using this format.
It would be convenient to override the default parser provided by the compiler.
Is there a way to do just that? What would you recommend doing?