Skip to content
Snippets Groups Projects
Commit 8245e24b authored by viniciusmioto's avatar viniciusmioto
Browse files

verifica parametros (constade e referencia)

parent a75825f5
Branches
No related tags found
No related merge requests found
......@@ -15,6 +15,10 @@ R00: NADA
ARMZ 0,0
CREN 0,0
CRCT 2
SOMA
CRCT 2
CRCT 3
SOMA
CHPR R01,0
DMEM 0
PARA
......@@ -441,7 +441,11 @@ fator: IDENT {
| NUMERO {
// Empilha constante
char buffer[50];
if (val_ou_ref == VLR)
sprintf(buffer, "CRCT %s", token);
else {
yyerror("Erro: passagem de constante por REFERENCIA.\n");
}
geraCodigo(NULL, buffer);
};
......
......@@ -8,5 +8,5 @@ program proc1 (input, output);
end;
begin
x := 8;
p(x, 2);
p(x, 2+3);
end.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment