Is the notion of a squatter defined as a legal concept anywhere in the law? My understanding was always that it is legally defined as one who resides in a premise who had initially entered as a trespasser. Now the notion of a trespasser is a well established legal concept but where in the law of the idea of a squatter to be found with a definition?
"Squatter" is not a precisely defined legal term. It is often used to describe someone who is claiming to have a right to adverse possession. One legal dictionary defines "squatter" as "a person who has taken possession of a piece of land and occupied it by buildings or by cultivation and has by so taking possession of it asserted a right to it" (Stroud's Judicial Dictionary, "squatter"), cited in Spy Hill (Rural Municipality) v. Bradshaw (1912), 7 DLR 941 (Sask K.B.) at para 7).
See also David Hoggan v The Esquimalt and Nanaimo Railway Company (Canada)  UKPC 29 (3 May 1894):
The term "squatter" is of course well known, and commonly used. It refers to a person who has taken possession of a piece of land and occupied it by buildings or by cultivation, and has by so taking possession of it asserted a right to it; and in the present case, where the possession has been exercised continuously for the period named in the section, the Act converts the possession into a right.