Are you someone who really likes dealing with language grammars and understanding their corner cases? Could I interest you in giving the #kdl v2 grammar a quick look-see and seeing if there's anything particularly dysfunctional about it? We're looking ...
-
@zkat well the problem with it is that you can expand it to two consecutive commented-block instances one of which is '*' and one of which is '/'
the usual way that we see this dealt with is to write out all the combinations of ways that a * can occur that are followed by something other than slash - either a normal character, or the end of the block
but one of the cases you have to cover is where the block ends like ********/
-
@zkat also notice that (if you aren't trying to do nested ones) you can actually have a / in the middle without having to do anything special
-
@zkat anyway it's just really fiddly which is why we say to look at the C spec
-
@irenes …it looks like C just doesn’t allow nesting?
-
@zkat that is correct. you do have a harder problem there.
-
@zkat but the disallowing */ in the middle thing is a problem even without nesting
-
@irenes or I can cut the Gordian knot and just not bother supporting nested comments. It seems like a pretty rare feature in practice
-
@zkat as you say! the "ignore next expression" thing you have deals with most of the situations it would be useful in
-
@irenes which brings me to the maybe last question I have: doesn’t this problem apply to raw strings, too?
-
@zkat oh uh...
yes. oops. sorry for missing that.