Closed YannCaron closed 8 years ago
See http://tratt.net/laurie/research/pubs/html/tratt__direct_left_recursive_parsing_expression_grammars/ and https://fr.wikipedia.org/wiki/Analyseur_LR and http://web.cs.wpi.edu/~kal/PLT/PLT4.1.2.html (important) and http://www.d.umn.edu/~hudson/5641/l11m.pdf / http://www.d.umn.edu/~hudson/5641/
R → R a | b
becomes
R → b R′ R′→ a R′ | ε
Thus
E → E + E | E * E | Num | ( E )
E -> Num E' | ( E ) E' E' -> + E E' | * E E' | ε
Done
See http://tratt.net/laurie/research/pubs/html/tratt__direct_left_recursive_parsing_expression_grammars/ and https://fr.wikipedia.org/wiki/Analyseur_LR and http://web.cs.wpi.edu/~kal/PLT/PLT4.1.2.html (important) and http://www.d.umn.edu/~hudson/5641/l11m.pdf / http://www.d.umn.edu/~hudson/5641/
becomes
Thus
becomes