4 ms·
Recursive descend is imperative, while regex is declarative. Regex may be ugly, but you lose something important when you move from declarative to imperative.
by DenisM 12y ago
Recursive descend is imperative, while regex is declarative.
Regex may be ugly, but you lose something important when you move from declarative to imperative.
- jerf 12y ago"Recursive descent" has that name precisely because it is not the only parsing alternative, hence we can not simply call it "parsing".
- raiph 12y agoPerl 6 unifies "regexes" and recursive descent. See https://news.ycombinator.com/item?id=9039680 https://news.ycombinator.com/item?id=9039680 or, say, https://github.com/Mouq/json5/blob/master/lib/JSON5/Tiny/Grammar.pm6 https://github.com/Mouq/json5/blob/master/lib/JSON5/Tiny/Gra...