On 13 Aug 2012, at 16:02, Ashish Mahamuni wrote: > I have got my own "my_malloc" and "my_free" methods. > I would like Bison to invoke those for memory allocation and to free the > memory. > > Basically, something similar to lex, where I can specify noyyalloc, > noyyfree and provide my own definitions. > > I tried #define YYMALLOC, but it did not work. > > is this possible with Bison?
Looking into the parser file, it defines macros YYSTACK_ALLOC and YYSTACK_FREE, which should be possible to set. However, they are not documented, making it a fragile hack. Akim and Paul, should this not be a supported feature? Hans _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison