The electronic structure of graphene tuned by hexagonal boron nitrogen layers: Semimetal–semiconductor transition