3 ms·
Why is it that I find it much easier to just build a lexer/parser than I do using regex? Something about my brain, every time I see them I usually do everything
by nickstinemates 13y ago
Why is it that I find it much easier to just build a lexer/parser than I do using regex? Something about my brain, every time I see them I usually do everything in my power to not have to try to understand them.
On the other hand, I've worked with some regex ninjas who appear to just innately get it.
Maybe it's like cilantro, separating us by genetics.
- agumonkey 13y agoIIRC yacc's documentation advocates its use for tasks where people would go regex only. I guess in the old days yacc got more light, now it's an obscure beast for compiler writers ... not F5 to refresh the webpage things.
- omegote 13y agoWell I think you're in the "good" side of the discussion. Sometimes whenever people learn regular expressions, they try to solve everything with them, but for any kind or medium sized problem or DSLs, writing a custom parser is a better option.