def parse_group_ref(source, info):
 source.expect('<')
 saved_pos = source.pos
 name = parse_name(source, True)
 source.expect('>')
 if info.is_open_group(name):
  raise error('cannot refer to an open group', source.string, source.pos)
 return make_ref_group(info, name, saved_pos)

def parse_group_ref ( source , info ) : source . expect ( '<' ) saved_pos = source . pos name = parse_name ( source , True ) source . expect ( '>' ) if info . is_open_group ( name ) : raise error ( 'cannot refer to an open group' , source . string , source . pos ) return make_ref_group ( info , name , saved_pos )
parses a group reference .