Every person who goes upon or boards any railroad train, car or engine, with the intention of robbing any passenger or other person on such train, car or engine, of any personal property thereon in the possession or care or under the control of any such passenger or other person, or who interferes in any manner with any switch, rail, sleeper, viaduct, culvert, embankment, structure or appliance pertaining to or connected with any railroad, or places any dynamite or other explosive substance or material upon or near the track of any railroad, or who sets fire to any railroad bridge or trestle, or who shows, masks, extinguishes or alters any light or other signal, or exhibits or compels any other person to exhibit any false light or signal, or who stops any such train, car or engine, or slackens the speed thereof, or who compels or attempts to compel any person in charge or control thereof to stop any such train, car or engine, or slacken the speed thereof, with the intention of robbing any passenger or other person on such train, car or engine, of any personal property thereon in the possession or charge or under the control of any such passenger or other person, is guilty of a felony.