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
LL parser
(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!
==== Left recursion removal ==== : ''See <ref>[https://books.google.com/books?id=zkpFTBtK7a4C&q=%22left+recursion%22 Modern Compiler Design], Grune, Bal, Jacobs and Langendoen</ref>'' For a general method, see [[Left recursion#Removing left recursion|removing left recursion]]. A simple example for left recursion removal: The following production rule has left recursion on E E -> E '+' T E -> T This rule is nothing but list of Ts separated by '+'. In a regular expression form T ('+' T)*. So the rule could be rewritten as E -> T Z Z -> '+' T Z Z -> Ξ΅ Now there is no left recursion and no conflicts on either of the rules. However, not all context-free grammars have an equivalent LL(k)-grammar, e.g.: S -> A | B A -> 'a' A 'b' | Ξ΅ B -> 'a' B 'b' 'b' | Ξ΅ It can be shown that there does not exist any LL(k)-grammar accepting the language generated by this grammar.
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)