In linguistics and theoretical computer science, literal movement grammars (LMGs) are a grammar formalism intended to characterize certain extraposition phenomena of natural language such as topicalization and cross-serial dependency. LMGs extend the class of context free grammars (CFGs) by adding introducing pattern-matched function-like rewrite semantics, as well as the operations of variable binding and slash deletion. LMGs were introduced by A.V. Groenink in 1995.[1]
S\to\alpha
S
\alpha
X(x1,...,xn)\to\alpha
\alpha
xi
f(xy)
f(ab)
x=\epsilon, y=ab; x=a, y=b; x=ab, y=\epsilon
An "item" in a literal movement grammar is one of
f(x1,\ldots,xn)
x:f(x1,\ldots,xn)
f(x1,...,xn)
f(x1,\ldots,xn)/\alpha
f(x1,...,xn)
\alpha
In a rule like
f(x1,...,xm)\to\alpha y:g(z1,...zn) \beta
\alpha
\beta
\alpha
\beta
An item
x/y
\epsilon
g(y1,...,yn)=z
LMGs can characterize the non-CF language
\{anbncn:n\geq1\}
S\tox:A B(x)
A\toa A
A\to\epsilon
B(xy)\toa/x b B(y)c
B(\epsilon)\to\epsilon
The derivation for , using parentheses also for grouping, is therefore
S\tox:A B(x)\tox:(a A) B(x)\tox:(aa A) B(x)\tox:aa B(x)\toaa B(aa)
\toaa a/a b B(a) c\toaab B(a) c\toaab a/a b B cc\toaabb B cc \toaabbcc
Languages generated by LMGs contain the context-free languages as a proper subset, as every CFG is an LMG where all predicates have arity 0 and no production rule contains variable bindings or slash deletions.