User loginNavigation 
Eliminating left recursionDoes anyone have a reference to a correct algorithm which eliminates left recursion from a grammar? The one in Wikipedia is incorrect. Lots of youtube videos and lecture notes Google finds are also incorrect. All make the same mistake, they forget that a production A = N A X is left recursive if N is nullable. Requiring the grammar to be null free would be absurd since the algorithm itself inserts epsilon productions. I also wish to extend the requirement to an attribute grammar of the form usually used in practice, with an extra symbol kind for AST construction, etc, which cannot be eliminated and yet recognises the empty string. BTW: I'm looking for the basic algorithm. Lost my copy of the Dragon Book ;( By skaller at 20161202 17:31  LtU Forum  previous forum topic  next forum topic  other blogs  5437 reads

Browse archivesActive forum topics 
Recent comments
1 hour 17 min ago
1 hour 54 min ago
4 hours 5 min ago
8 hours 40 min ago
8 hours 59 min ago
9 hours 50 min ago
10 hours 47 min ago
1 day 4 hours ago
1 day 23 hours ago
2 days 15 min ago