|
|
|
|
|
by Maxatar
185 days ago
|
|
You're going to have a very hard time parsing a language using recursive descent if you don't understand some formal language theory. Recursive descent algorithms have a lot of trouble with left-recursion, and can result in arbitrary backtracking if you're not careful, which can blow up memory and time. To fix left-recursion you need to rewrite your grammar, which means familiarity with formal language theory. To avoid backtracking you typically use an LL(N) or variations thereof, which once again require having a pretty good understanding of formal language theory. |
|
(Left-recursion? Use a while loop! Mutable state is a pathway to many abilities functional programmers consider unnatural.)