basic hierarchy parsing (part of #4)