Depends a bit on what you mean by "trip". Do you want the Overvoltage to trip a breaker, or crowbar the line? For the undervoltage, I assume that you want to generate a signal that warns some circuit that the power is either going away, or has drooped too far to use.
To generate OV and UV signals, you just rectify and smooth the input, divide it down with a resistor divider, and put it into two comparator circuits with the appropriate reference voltages. You could also do a cycle-by-cycle check instead, where you sense the value of each peak of the AC waveform, and do a similar divide and compare circuit (cycle-by-cycle would give you faster information, compared to the rectify and smooth version).