That’s not as exciting inside as the title makes it sound. Should be reproducible in any language that allows you to run code very early in compilation phase. You just inject a syntax error after checking for your triggering condition.
C preprocessor is a good example that will allow you to replicate this easily.
Yeah, although this one does use an interestingly “Perlish” way to break.
In the Friday case where f is prototyped with (), you have f() / 1 followed by a comment.
f() / 1
In the non-Friday case where f has no prototype, you have f( /1;#/ +, where /1;#/ is a regex literal, and then we’re trying to + something and… nope, EOF.
f( /1;#/ +
So it’s dependent on / being both a binop when the parser is looking for an operator, and a quotelike when the parser is looking for a term, and also dependent on the fun ways that prototypes influence the parsing of function calls.
So… anything with full macros, too, since macros are just compiler extensions.