As it's explained in the comments, $M$ and $N$ are know as metavariables. More importantly, this kind of definition is known as an inductive definition, that is, you start with very basic elements (symbols belonging to the set $\mathcal{V}$) and build up more complex things from there.
For instance, let $\mathcal{V} = \{v_0, v_1, \ldots, v_{1001}, \ldots\}$. In the BNF definition:
$$ M,N ::= x \mid (M N) \mid (\lambda x.M) $$
- $x$ can be any of the $\{v_0, v_1, v_2, \ldots \}$. That means any symbol from $\mathcal{V}$ can be considered a $\lambda$-term, a most basic of rules.
- $M$, $N$ are structures already known to be $\lambda$-terms, so from the previous example we can build expressions like $(v_0 ~ v_1)$, $(v_{100} ~ (v_{0} ~ v_{1}))$, $((v_{100} ~ (v_{0} ~ v_{1})) ~ v_2) $ and so on.
- With the previous two rules you can now build more complex expressions like $(\lambda v_{100}. (v_0 ~ v_1))$, since all previous terms made by combining the two previous rules are known to be $\lambda$-terms.
- Now you can mix all three rules, like in $(v_0 ~ (\lambda v_9.(v_9 ~ v_{999})))$
x
which is an object variable and part of the syntax of the language we're defining. $\endgroup$x
is a part ofM
andN
? Please explain with an example. I am absolute beginner $\endgroup$M
stands for a chunk of syntax. Any chunk of syntax that we can build up with these operators.x
is a particular piece of syntax soM
could stand forx
certainly. It could stand for(x x) x
as well. Or\x. x x
. $\endgroup$x
is the syntax for variables in the language we're defining.M
is a variable that ranges over a piece of syntax. $\endgroup$M
can be anything built up from the operators variables application and abstraction. $\endgroup$