help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with $$, maybe bug??


From: Hans Aberg
Subject: Re: problem with $$, maybe bug??
Date: Thu, 11 Aug 2005 00:59:37 +0200


On 10 Aug 2005, at 21:18, Roberto Mandall wrote:

hi there, i´m using last version of bison on windows xp., bison 1.875
i have come up with a problem which is just dirving my crazy, see the code here:
function_designator : identifier {
dir=BuscarSimb(TablaActual,$1,
&veces);
$$=malloc(sizeof(struct RecordGCI));
$$->tipo=dir->tipo;
$$->texto=malloc(strlen($1)+1);
$$->texto=strcpy($$->texto,$1);
$$->tiporet=dir->tipo_retorno;
$$->numparam=dir->n_param;
strcpy(nomfungu,$1);
nodolistaauxiliar.paramlleva=numparamllevo;
nodolistaauxiliar.parammax=numparamreal;
nodolistaauxiliar.sigparam=puntiparam;
nodolistaauxiliar.ptrbu=$$;
strcpy(nodolistaauxiliar.nomfun,nomfungu);
Insert1(nodolistaauxiliar,listaauxiliar);
numparamllevo=0;
CuantosNormal++;
FunDesigIden();
}
params {
FunDesigParams($$);
};

ok, so the big problem is that after params , when calling FunDesigParams($$),
the pointer has changed its value but i can assure you that i do not
touch that $$ any other place but here, and still do not change it at
that Macro(fundesigparams)

In the $$ value of the first action is named $2 in the last action. Is that your problem?

  Hans Aberg






reply via email to

[Prev in Thread] Current Thread [Next in Thread]