← every case · 3000 · escapes and the closing quote

3010-escaped_quote_before_comment

an escaped quote does not close the string, so the /* after it opens a real comment. A counter that ends the string at the escaped quote opens another at the last one, which hides the opener whether its strings end with the line or run on, and the second line of the comment comes out as code

read ascloc.defaultcloc.docstring-as-codecodestats.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.c
1codechar *s = "a \" b"; /* the escaped quote does not close the string
2commentsso this comment is real */
3codeint x = 1;

stringcommentthe tag around another language

What each tool answered

cloc.default ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

cloc --json --config /tmp/linejudge-empty-file cases/3000-escapes_and_the_closing_quote/3010-escaped_quote_before_comment/input.c

cloc.default ✓ agrees

--strip-str-comments

the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

cloc --json --config /tmp/linejudge-empty-file cases/3000-escapes_and_the_closing_quote/3010-escaped_quote_before_comment/input.c --strip-str-comments

cloc.docstring-as-code ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

cloc --json --config /tmp/linejudge-empty-file cases/3000-escapes_and_the_closing_quote/3010-escaped_quote_before_comment/input.c --docstring-as-code

codestats.default ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

codestats cases/3000-escapes_and_the_closing_quote/3010-escaped_quote_before_comment/input.c --output json-compact --include-generated --no-gitignore --hidden --no-config

mezura.content ✓ agrees
the rules ask3 lines · 2 code · 1 comments · 0 extra
it answers3 lines · 2 code · 1 comments · 0 extra

mezura cases/3000-escapes_and_the_closing_quote/3010-escaped_quote_before_comment/input.c --output json --hide timing --no-default-config --no-local --counting content

mezura.region ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

mezura cases/3000-escapes_and_the_closing_quote/3010-escaped_quote_before_comment/input.c --output json --hide timing --no-default-config --no-local --counting region

scc.default ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

scc --format json --no-config cases/3000-escapes_and_the_closing_quote/3010-escaped_quote_before_comment/input.c

tokei.default ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

tokei --output json cases/3000-escapes_and_the_closing_quote/3010-escaped_quote_before_comment/input.c