What’s wrong with regex?
-
-
-
Basic regex are awesomely compact, but readability falls apart with named captures, and composability is troublesome with string interpolation. Though parser combinators are far more verbose, they definitely scale much better, e.g. to entire programming language parsers.
- 1 more reply
New conversation -
-
-
Lua’s LPEG library is an interesting take: http://www.inf.puc-rio.br/~roberto/lpeg/
-
Yep, and it's worth reading the companion paper. Like most things by the Lua folks, there's a lot of careful engineering and it's more than just yet another PEG library.
End of conversation
New conversation -
-
-
Perl6 has this https://docs.perl6.org/language/grammars … which is quite interesting.
- End of conversation
New conversation -
-
-
One other proposed answer to this question is Rosie:https://www.thestrangeloop.com/2018/rosie-pattern-language-improving-on-50-year-old-regular-expression-technology.html …
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
This Tweet is unavailable.
-
I think node based coding or any coding with searchable blocks can aide in the "three times a year" situation.
End of conversation
-
-
-
Regular expressions are the right level of expressiveness for many problems, and can be implemented more efficiently than PEGs. I think you just need a good way of composing them. Lexer generators usually provide a way to name and reference subexpressions.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.