Skip to content

Comment on Ask HN: What does a developer need to know to build their own Lisp from scratch?parent

Comments

It's funny that paren matching used to be an example of why you needed to use a push down automata instead of a regular language.

Expressions with parentheses are not a regular language; expressions which can match them are not regular expressions, even if they extend regular expression syntax.

"Regular expression" became the name of a software feature, which retained its name as it was extended beyond regular sets.

Just like "web browser" became the name of a kind of program, and that name still sticks even though it's now a monstrous application platform, not just for browsing.

I honestly can't tell if you intentionally take stuff out of context so you can argue against it, or if your reading comprehension and logic skills are really just that bad.

I said, "instead of a regular language". You even quoted it. You don't even read the bits that you cut and paste to argue against.

expressions which can match them are not regular expressions

And that's the damned point. Modern "regular expressions" aren't just "regular" any more. They've had back references and other extensions for a while now:

https://www.regular-expressions.info/balancing.html

https://www.regular-expressions.info/recurse.html

https://www.regular-expressions.info/backref.html

Please - don't reply to me until you take the time to read and understand what I've said.

If "paren matching used to be an example of why you needed to use a push down automata instead of a regular language", isn't that intended to say that this is not the case today? If we change "language" to "expression", then I agree and don't have anything to add. The scope of "regular expression" has increased, in informal usage, but (I strongly suspect) "regular language" still means the same thing as before.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.