User loginNavigation |
archivesEliminating 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 ;( |
Browse archivesActive forum topics |
Recent comments
14 hours 15 min ago
16 hours 3 min ago
17 weeks 5 days ago
17 weeks 5 days ago
17 weeks 5 days ago
23 weeks 5 days ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 34 weeks ago