Commit c8bd9760 authored by vgsb18's avatar vgsb18 🦍

so falta terminar

parent 2110e29d
No preview for this file type
a
b
a
c
a
t
e
(
[
{
}
]
)
0
\ No newline at end of file
......@@ -85,7 +85,7 @@ char repetidor(char rep, int *val)
}
return y;
}
char identifica_mark(mark,dmark)
char identifica_mark(char mark, char dmark)
{
if (mark == '(')
dmark = ')';
......@@ -100,14 +100,26 @@ int avalia_sequencia(tad_pilha *p)
{
int i;
int tr1, tr2, tr3 = 0;
int global = 1;
char mark1, mark2, mark3;
char dmark1, dmark2, dmark3;
for( i = 1; i < p -> tam; i++)
char dmark1 ='0', dmark2 = '0', dmark3 = '0';
mark1 = '(';
dmark1 = identifica_mark(mark1,dmark1);
mark2 = '[';
dmark2 = identifica_mark(mark2,dmark2);
mark3 = '{';
dmark3 = identifica_mark(mark3,dmark3);
for( i = 0; i < p -> tam; i++)
{
printf("%c\n",p -> v[i] );
}
return 1;
}
tad_pilha *empilhadeira(tad_pilha *p)
{
char x;
......
......@@ -23,7 +23,7 @@ int desempilha(char *t, tad_pilha *p);
char repetidor(char rep, int *val);
char identifica_mark(mark,dmark)
char identifica_mark(char mark, char dmark);
tad_pilha *empilhadeira(tad_pilha *p);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment