Fixing indentation
This commit is contained in:
parent
75ff95bf4a
commit
b4fdf5e12a
48
a1/program.c
48
a1/program.c
@ -85,100 +85,100 @@ void read_input(LinkedNode** head){
|
||||
{
|
||||
if (popped == '[' && buff[i] == '>')
|
||||
{
|
||||
printf("Read: %s\n", buff);
|
||||
printf("Read: %s", buff);
|
||||
printf("Crossed bracket %c", buff[i]);
|
||||
printf(" in %d,", i);
|
||||
printf(" expected ]");
|
||||
printf(" expected ]\n");
|
||||
return;
|
||||
}
|
||||
if (popped == '(' && buff[i] == '>')
|
||||
{
|
||||
printf("Read: %s\n", buff);
|
||||
printf("Read: %s", buff);
|
||||
printf("Crossed bracket %c", buff[i]);
|
||||
printf(" in %d,", i);
|
||||
printf(" expected )");
|
||||
printf(" expected )\n");
|
||||
return;
|
||||
}
|
||||
if (popped == '{' && buff[i] == '>')
|
||||
{
|
||||
printf("Read: %s\n", buff);
|
||||
printf("Read: %s", buff);
|
||||
printf("Crossed bracket %c", buff[i]);
|
||||
printf(" in %d,", i);
|
||||
printf(" expected }");
|
||||
printf(" expected }\n");
|
||||
return;
|
||||
}
|
||||
if (popped == '<' && buff[i] == ']')
|
||||
{
|
||||
printf("Read: %s\n", buff);
|
||||
printf("Read: %s", buff);
|
||||
printf("Crossed bracket %c", buff[i]);
|
||||
printf(" in %d,", i);
|
||||
printf(" expected >");
|
||||
printf(" expected >\n");
|
||||
return;
|
||||
}
|
||||
if (popped == '(' && buff[i] == ']')
|
||||
{
|
||||
printf("Read: %s\n", buff);
|
||||
printf("Read: %s", buff);
|
||||
printf("Crossed bracket %c", buff[i]);
|
||||
printf(" in %d,", i);
|
||||
printf(" expected )");
|
||||
printf(" expected )\n");
|
||||
return;
|
||||
}
|
||||
if (popped == '{' && buff[i] == ']')
|
||||
{
|
||||
printf("Read: %s\n", buff);
|
||||
printf("Read: %s", buff);
|
||||
printf("Crossed bracket %c", buff[i]);
|
||||
printf(" in %d,", i);
|
||||
printf(" expected }");
|
||||
printf(" expected }\n");
|
||||
return;
|
||||
}
|
||||
if (popped == '<' && buff[i] == ')')
|
||||
{
|
||||
printf("Read: %s\n", buff);
|
||||
printf("Read: %s", buff);
|
||||
printf("Crossed bracket %c", buff[i]);
|
||||
printf(" in %d,", i);
|
||||
printf(" expected >");
|
||||
printf(" expected >\n");
|
||||
return;
|
||||
}
|
||||
if (popped == '[' && buff[i] == ')')
|
||||
{
|
||||
printf("Read: %s\n", buff);
|
||||
printf("Read: %s", buff);
|
||||
printf("Crossed bracket %c", buff[i]);
|
||||
printf(" in %d,", i);
|
||||
printf(" expected ]");
|
||||
printf(" expected ]\n");
|
||||
return;
|
||||
}
|
||||
if (popped == '{' && buff[i] == ')')
|
||||
{
|
||||
printf("Read: %s\n", buff);
|
||||
printf("Read: %s", buff);
|
||||
printf("Crossed bracket %c", buff[i]);
|
||||
printf(" in %d,", i);
|
||||
printf(" expected }");
|
||||
printf(" expected }\n");
|
||||
return;
|
||||
}
|
||||
if (popped == '<' && buff[i] == '}')
|
||||
{
|
||||
printf("Read: %s\n", buff);
|
||||
printf("Read: %s", buff);
|
||||
printf("Crossed bracket %c", buff[i]);
|
||||
printf(" in %d,", i);
|
||||
printf(" expected >");
|
||||
printf(" expected >\n");
|
||||
return;
|
||||
|
||||
}
|
||||
if (popped == '(' && buff[i] == '}')
|
||||
{
|
||||
printf("Read: %s\n", buff);
|
||||
printf("Read: %s", buff);
|
||||
printf("Crossed bracket %c", buff[i]);
|
||||
printf(" in %d,", i);
|
||||
printf(" expected )");
|
||||
printf(" expected )\n");
|
||||
return;
|
||||
|
||||
}
|
||||
if (popped == '[' && buff[i] == '}')
|
||||
{
|
||||
printf("Read: %s\n", buff);
|
||||
printf("Read: %s", buff);
|
||||
printf("Crossed bracket %c", buff[i]);
|
||||
printf(" in %d,", i);
|
||||
printf(" expected ]");
|
||||
printf(" expected ]\n");
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user