In Algol 68, I can declare the priority (precedence) of an operator-symbol:
prio @ = 5;
(Higher number means higher precedence).
I can apparently redefine the priorities of built-in operators:
begin
prio + = 7, x = 6;
print(2+3x4)
end
This should result in printing the value 20, rather than the 14 that a standard parse would give.
Did actual implementations actually behave that way? With a quick scan, I see nothing in either the Informal Introduction to ALGOL 68 nor the ALGOL 68-R Users Guide to say it wouldn't. Still, I find that mutability to be a strange feature.
(I should try it and see but I don't have an ALGOL 68 system at my fingertips right now).