On the internet I've read the general meaning of the adjective lexical: the meaning of a word in relation to the physical world or to abstract concepts, without reference to any sentence in which the word may occur.
I've seen this word been used in many different contexts: lexical scope, lexical analysis, lexical constants, lexical operators etc.
Why do people choose to use the word lexical in front of something like a scope? I don't see any relation between the definition of lexical and a lexical scope. Same goes for lexical analysis, lexical constants etc.
I understand that you want to give something a name so you can reference to it more easily, but why would you name it something that doesn't make sense? If it does make sense, then could you clarify how it does?
I've seen a different thread in which someone asks what lexical means in C++: What does the term "lexical" means in C++?
The top answer on that question explains that lexical means that it is related to the source code. Then my question would be: How is anything in programming not related to the source code? Isn't every kind of scope, constant, form of code analysis related to the source code? Also, how is the definition of lexical related to that of the relation to the source code?