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
Ambiguous 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!
=== Trivial language === The simplest example is the following ambiguous grammar (with start symbol A) for the trivial language that consists of only the empty string: : A β A | Ξ΅ ... meaning that the nonterminal A can be derived to either itself again, or to the empty string. Thus the empty string has leftmost derivations of length 1, 2, 3, and indeed of any length, depending on how many times the rule A β A is used. This language also has an unambiguous grammar, consisting of a single [[Production rule (formal languages)|production rule]]: : A β Ξ΅ ... meaning that the unique production can produce only the empty string, which is the unique string in the language. In the same way, any grammar for a non-empty language can be made ambiguous by adding duplicates.
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)