REs are level 3 https://en.wikipedia.org/wiki/Chomsky_hierarchy
REs are level 3 https://en.wikipedia.org/wiki/Chomsky_hierarchy
The upside is that they are more expressive, but the downside is that it's no longer O(n) to parse a string.
Worst case for some regexes can be exponential, never run untrusted regexes on your server unless you use a safe implementation like re2 which was developed for Google Code Search.
Similar to, "What's Cascading about Cascading Style Sheets?"
If I were to make up history, I would say "oh, regular refers to finite state machines, so a regular language is a language recognizable by a finite state machine," but it appears my made-up history does not exactly match reality. This is not too far off, though, since in the paper he shows that regular events are exactly the kinds of events his nerve networks recognize, and there appears to be something about finite automata in the last section.
They could have been called "rational languages" instead, because of a connection with rational functions. In fact, there are manipulations of rational series in Kleene's paper to prove some things about the languages.
(I don't get the joke myself --- unless the joke is that you can't take the "regular" out of "regular language.")
You mean "context-free" not "regular" here, but either way, I believe that C is actually context-sensitive:
(a)(b);
Is this:1. Evaluating "b" and casting it to type "a"?
2. Evaluating the parenthesized expression "a" which yields a function, and then calling it, passing in "b"?
The only way to distinguish the two is by knowing whether "a" is a type or not.
You could argue that as long as the parser produces a suitably vague AST, it doesn't need to know the distinction and can pass it on to later phases. I think that might work because I don't know of cases where the syntax actually diverges based on the type of a symbol.
But in practice, I think most parsers want to produce a more precise AST that distinguishes cast expressions from function calls.
[0] http://eli.thegreenplace.net/2007/11/24/the-context-sensitiv...