In formal language theory, a sequence of words of the form
(for notation
see semi-Thue system). For a context-free grammar, such a sequence is
leftmost (or
rightmost) if,
wi+1 is obtained from
wi by rewriting the leftmost (or rightmost) nonterminal in
wi. Such sequences exist for all derivable words.