Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Regular grammar
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Strictly regular grammars == A '''right-regular grammar''' (also called [[Linear Grammar#Right-Linear Grammars|right-linear grammar]]) is a formal grammar (''N'', Ξ£, ''P'', ''S'') in which all production rules in ''P'' are of one of the following forms: # ''A'' β ''a'' # ''A'' β ''aB'' # ''A'' β Ξ΅ where ''A'', ''B'', ''S'' β ''N'' are non-terminal symbols, ''a'' β Ξ£ is a terminal symbol, and Ξ΅ denotes the [[empty string]], i.e. the string of length 0. ''S'' is called the start symbol. In a '''left-regular grammar''', (also called [[Linear Grammar#Left-Linear Grammars|left-linear grammar]]), all rules obey the forms # ''A'' β ''a'' # ''A'' β ''Ba'' # ''A'' β Ξ΅ The language described by a given grammar is the set of all strings that contain only terminal symbols and can be derived from the start symbol by repeated application of production rules. Two grammars are called [[weak equivalence (formal languages)|weakly equivalent]] if they describe the same language. Rules of both kinds must not be mixed; for example, the grammar with rule set { ''S''β''aT'', ''T''β''Sb'', SβΞ΅ } is not regular, and describes the language <math>\{ a^i b^i : i \in \mathbb{N} \}</math>, which is not regular, either. Some textbooks and articles disallow empty production rules, and assume that the empty string is not present in languages.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)