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
The current bracket matching code only counts the number of [ and ]. An invalid BF submission can pass this check, but it will receive a weird compile error message.
For example, this BF submission: ++++++]-----[++++
will receive this compile error:
tletestc.c:23:36: error: expected identifier or ‘(’ before ‘--’ token
++*p;++*p;++*p;++*p;++*p;++*p;}--*p;--*p;--*p;--*p;--*p;while(*p){++*p;++*p;++*p;++*p;
^~
tletestc.c:23:41: error: expected identifier or ‘(’ before ‘--’ token
++*p;++*p;++*p;++*p;++*p;++*p;}--*p;--*p;--*p;--*p;--*p;while(*p){++*p;++*p;++*p;++*p;
^~
tletestc.c:23:46: error: expected identifier or ‘(’ before ‘--’ token
++*p;++*p;++*p;++*p;++*p;++*p;}--*p;--*p;--*p;--*p;--*p;while(*p){++*p;++*p;++*p;++*p;
^~
tletestc.c:23:51: error: expected identifier or ‘(’ before ‘--’ token
++*p;++*p;++*p;++*p;++*p;++*p;}--*p;--*p;--*p;--*p;--*p;while(*p){++*p;++*p;++*p;++*p;
^~
tletestc.c:23:56: error: expected identifier or ‘(’ before ‘--’ token
++*p;++*p;++*p;++*p;++*p;++*p;}--*p;--*p;--*p;--*p;--*p;while(*p){++*p;++*p;++*p;++*p;
^~
tletestc.c:23:61: error: expected identifier or ‘(’ before ‘while’
++*p;++*p;++*p;++*p;++*p;++*p;}--*p;--*p;--*p;--*p;--*p;while(*p){++*p;++*p;++*p;++*p;
^~~~~
The expected error message is: Unmatched brackets
The text was updated successfully, but these errors were encountered:
The current bracket matching code only counts the number of
[
and]
. An invalid BF submission can pass this check, but it will receive a weird compile error message.For example, this BF submission:
++++++]-----[++++
will receive this compile error:
The expected error message is:
Unmatched brackets
The text was updated successfully, but these errors were encountered: