BSD-like,

see the head of 'analyse.py' for details.
