You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regexes stand out to me as the slang: a special-purpose DSL within 007/Perl 6 for matching strings. With its own closed universe of Q nodes and its own execution semantics (backtracking). Furthermore, values enter and values leave. It screams slang.
Because of that, I think it'd be good for us to make it a slang early, simply because it's the most obvious one. Use cases that are helpful to the regex slang are likely to be helpful to other slangs too.
The text was updated successfully, but these errors were encountered:
I figure it'd still need to come pre-loaded with the default 007. That's not a big problem; I mainly want to explore as soon as possible how we can make slangs support the needs of the regex syntax.
Coming back to this issue, the work I'm doing right now on #293 has made me realize how "there's not just one parser"; what we thought of as the OpScope abstraction is actually the parser's current repertiore of statements, operators, etc in all the different categories. Instead of OpScopes forming a stack that follows the program's block structure, we'll have parsers forming that stack.
Usually, two parsers adjacent on the stack will either be equivalent, or differ only in a few extra definitions. But a slang distinguishes itself by bringing in a fresh parser from somewhere else with its own ruleset. Evolution vs revolution.
(Of course, slangs also want to "escape" back out into their "parent parser", at which point things work very much like in the non-slangy case — except instead of parsers stacking (A)(A'), the slang's parser is sandwiched in the middle: (A)(B)(A').)
Regexes stand out to me as the slang: a special-purpose DSL within 007/Perl 6 for matching strings. With its own closed universe of Q nodes and its own execution semantics (backtracking). Furthermore, values enter and values leave. It screams slang.
Because of that, I think it'd be good for us to make it a slang early, simply because it's the most obvious one. Use cases that are helpful to the regex slang are likely to be helpful to other slangs too.
The text was updated successfully, but these errors were encountered: