News for hackers. Stuff that matters.
Re:Solving the regex of madness, and snarky answers on Stack... by goto11 on Monday May 10, 2021 @04:46AM (#27103948)
The point is that a parser could very well use regexes under the hood to perform the tokenization. Because it is the right tool for the job. A language without regex-support might use something like lex to compile a lexer. Of course you can write a character-by-character lexer by hand, but this is just equivalent to what a regex would generate.

So saying "this is not possible, use a parser instead" is completely misunderstanding the relationship between lexing and parsing. I wonder how these people think a parser works?

There are no comments on this comment yet.