Re:Advanced Compilers: Self-Guided Online Course
by mhh__ on Friday December 11, 2020 @12:41PM
(#25388387)
The simplest case where they prove useful is usually when your regex is longest than 20 characters. Write a parser once, and it'll be readable to people other than yourself (if it isn't your schema is bad)
[ Parent
| on HN ]
Re:Advanced Compilers: Self-Guided Online Course
by MaxBarraclough on Friday December 11, 2020 @02:24PM
(#25389644)
Seems a pity to throw out the various advantages of the high-level solution just because your regex engine doesn't support a scalable syntax.
Advanced regex systems such as the Ragel parser-generator support a composition-friendly syntax, [0] but the average regex system doesn't, and I guess there's no quick fix for that.
[0] http://thingsaaronmade.com/blog/a-simple-intro-to-writing-a-...