It's certainly a member of the leguminosae, but since that is the 3rd largest family of flowering plants, I guess that doesn't help much .
It looks a little like Sophora microphylla but fairly sure it isn't.
your rather flamboyant flowering tree is Caesalpinia gilliesii - the Yellow Bird of Paradise tree which I believe is native to Argentina but is widely grown in warmer mediterranean climates.
Thank you so much. This is definitely what we saw in Lesbos while eating a leisurely lunch at a remote taverna in the north of Lesbos in late September. I turned round to look at the scenery and was visually assaulted by this beauty - at eye level about ten feet away. The taverna owner had them growing in what goes for a front garden in those parts. I got up and took some pictures of it only to find the taverna owner pressing some seed pods into my hand. Needless to say. there are now three very healthy specimens growing in our conservatory in temperatures reaching 40C + during the last week. I hope it will flower next year.