Mixing Left and Right Regular Rules
If mixing of left-regular and right-regular rules is allowed, we still have a linear grammar, but not necessarily a regular one. What is more, such a grammar need not generate a regular language: all linear grammars can be easily brought into this form, and hence, such grammars can generate exactly all linear languages, including nonregular ones.
For instance, the grammar G with N = {S, A}, Σ = {a, b}, P with start symbol S and rules
- S → aA
- A → Sb
- S → ε
generates, the paradigmatic non-regular linear language.
Read more about this topic: Regular Grammar
Famous quotes containing the words mixing, left, regular and/or rules:
“Give me Catholicism every time. Father Cheeryble with his thurible; Father Chatterjee with his liturgy. What fun they have with all their charades and conundrums! If it werent for the Christianity they insist on mixing in with it, Id be converted tomorrow.”
—Aldous Huxley (18941963)
“Somewhere slightly before or after the close of our second decade, we reach a momentous milestonechildhoods end. We have left a safe place and cant go home again. We have moved into a world where life isnt fair, where life is rarely what it should be.”
—Judith Viorst (20th century)
“He hung out of the window a long while looking up and down the street. The worlds second metropolis. In the brick houses and the dingy lamplight and the voices of a group of boys kidding and quarreling on the steps of a house opposite, in the regular firm tread of a policeman, he felt a marching like soldiers, like a sidewheeler going up the Hudson under the Palisades, like an election parade, through long streets towards something tall white full of colonnades and stately. Metropolis.”
—John Dos Passos (18961970)
“The rules of drinking games are taken more serious than the rules of war.”
—Chinese proverb.