This post is meant as a long-overdue reply to u/PitifulTheme411's question on this topic. The length is unfortunate, but I wanted to be sure that I was explaining the algorithm in detail so that it could be reproduced.
This algorithm supports defining mixfix operators with different parsing behavior based on context: possible contexts include expressions, patterns, types, and top-level declarations. A total order of precedence is assumed, but is not required. This algorithm also does not correspond to any formalism that I am aware of, so it's going to be the only thing that can parse your files if you use it.
Declarations of syntax within the file being parsed are not supported: they're relatively easy to analyze and provide IDE support for (both the file with the definitions and the file b