The full criteria on what makes a weapon illegal to possess can be found at http://www.legislation.gov.uk/ukpga/1968/27/section/5.
The law mostly concerns itself with the length of the barrel, the firing mechanism, and the ammo cartridge size, as well as the ability to discharge noxious substances.