> I know it is possible, because Haskell does it already! In Haskell we can
> define novel infix operators on the fly, including their precedence
> relative to each other.
> I don't know how, though, so that's my question.
You might like to look at
https://en.wikipedia.org/wiki/Operator-precedence_grammar
Stefan