Extract list of elements and attributes from the grammar