The mad beggar rambling in the graveyard is based on the character of Tom O'Bedlam (actually Edgar, son of the Earl of Gloucester) from the William Shakespeare play King Lear.
The Mad Begger is played by Tony Aitken who was also Merry Balladeer the Minsterel who appears during the end credits of every episode of the series.