OP wants to shift phase of a 50 Hz signal. So we have two signals, one
50 Hz considered reference signal, so its phase is ZERO.
Take a PWM, feed it a clock of 5000 Hz, set its duty cycle at 50 %, its now
creating a signal same as reference. Now change the comparator register
for duty cycle, freq stays the same, edge moves, eg, PHASE CHANGE.
This is used extensively for all kinds of phase related generation/clocking.
In fact one can do a strictly software PWM and preserve duty cycle while
shifting phase. I think I have seen PWMs that even have register control
over both edges to effect duty cycle preservation.
Easy to implement synchronous designs as well.
But as I originally posted, I think this meets his analog only criteria -
Use an all pass to shift a sine followed by a comparator to convert it to a square wave.....
Regards, Dana.