logoalt Hacker News

zelphirkalttoday at 8:41 AM1 replyview on HN

Isn't using regex in this space kinda shunned, when you can easily write a grammar and parse things more reliably that way? Surprised to read that any books do that.


Replies

sievetoday at 9:33 AM

Every single book starts with regexes and DFA/NFA for lexical analysis. Too much ceremony for something you can write in 30 minutes and 300 lines