try1
This commit is contained in:
parent
a4eb45cd82
commit
559203566a
@ -80,11 +80,7 @@ int main() {
|
|||||||
}
|
}
|
||||||
char c = input[err - 1];
|
char c = input[err - 1];
|
||||||
if (c == ')' || c == ']' || c == '}' || c == '>') {
|
if (c == ')' || c == ']' || c == '}' || c == '>') {
|
||||||
if (top == -1) {
|
printf("Crossed bracket %c in %d, expected %c\n", c, err-1, getExpectedClosing(stack[top]));
|
||||||
printf("Unexpected closing bracket %c in %d\n", c, err-1);
|
|
||||||
} else {
|
|
||||||
printf("Crossed bracket %c in %d, expected %c\n", c, err-1, getExpectedClosing(stack[top]));
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
printf("Unclosed bracket %c in %d\n", stack[top], err-1);
|
printf("Unclosed bracket %c in %d\n", stack[top], err-1);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user