News for hackers. Stuff that matters.
Re:Designing a Good DSL by Twisol on Tuesday July 17, 2018 @06:02PM (#17553852)
Minor nitpick: A{2,4} becomes AA(|A|AA), not AA(A|AA).
Re:Designing a Good DSL by jrochkind1 on Tuesday July 17, 2018 @06:51PM (#17554211)
`AA(|A|AA)` is valid regexp syntax?

Holy moly it is! I had no idea you could put a | right after parens like that! I guess (|A) is nothing or A? Woah.

Re:Designing a Good DSL by Twisol on Tuesday July 17, 2018 @07:06PM (#17554306)
Yep! It's equivalent to `AA(A|AA)?`, by way of the parent's reduction for `?`, but it's a nice option when you want to emphasize some kind of symmetry.
Re:Designing a Good DSL by jmts on Tuesday July 17, 2018 @07:09PM (#17554317)
Well spotted. Thanks for providing the correct derivation.