Loosely used to mean "in accordance with all the relevant rules", especially in connection with some set of constraints defined by software. "The older =+ alternate for += is no longer legal syntax in ANSI C." "This parser processes each line of legal input the moment it sees the trailing linefeed." Hackers often model their work as a sort of game played with the environment in which the objective is to maneuver through the thicket of "natural laws" to achieve a desired objective. Their use of "legal" is flavoured as much by this game-playing sense as by the more conventional one having to do with courts and lawyers. Compare language lawyer, legalese.
Try this search on Wikipedia, OneLook, Google
Nearby terms: legacy code « legacy software « legacy system « legal » legalese » LEGOL » Le-Lisp