what is best way to save variable in compiler : i want save variable in bison and don't know what is best way to save variable.

value is string or int.


parser :

    ....
    assignment : '$' identifier '=' exp                     {updateSymbolVal($2,$4); }
    ...

 
function :

    void updateSymbolVal(char symbol,int val)
    {
        int bucket = computeSymbolIndex(symbol);
        symbols[bucket] = val;
        ////printf("\n is: %s",symbols[bucket]);
    }


how fix them to can give big string ?

please help me

tank you.