Hacker News new | past | comments | ask | show | jobs | submit login

Perl6 (ie raku) did do this. Sort of. They made them look a bit more like bnf grammars (or at least the way those grammars are typically written).

They ignored whitespace (and allowed them to be written over multiple lines, with comments) which made them more readable and allowed referencing regexps (stored in variables) directly within a regexp. I think they also made some of the syntax nicer (eg non capturing groups or lookaheads), and added notation for common things (e.g. like X* except everything is separated by commas) and long names for things like character classes.




The /x modifier in Perl 5 allows for comments and ignores whitespace. Things like [[:upper:]] are also in Perl 5.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: