A tool/library for building an abstract representation of a CSS file as a set of pairs (selector, declaration) with an ordering (representing the order selectors must appear in the CSS file to maintain the overriding semantics). Can also be used to test whether two selectors may match the same node in some DOM.
(Possibly a superset)
Borrowed and modified code from
python main.py --help
where "python" is your python 2.7 command.