On 14 Feb 2007, at 17:08, Basile STARYNKEVITCH wrote:
I want to use bison with a semantic value stack which is garbage collected. For example, I'm hacking inside GCC and using its GGC garbage collector (with GTY-ed stuff see http://gcc.gnu.org/onlinedocs/gccint/Type-Information.html for more) - and I'm using bison to parse some data read by some GCC (sort of) optimisation pass I am working on. So I need to have my own version of push a semantic value & pop a semantic value and get the n-th semantic value (for GCC hackers something similar to the gcc/vec.h macros to push, pop, get-nth ...) I see several ways of achieving this 1. provide a yyoverflow and a %initial-action which #define yyvs (ugly) 2. writing my own skeleton file. (undocumented) 3. generating only the action table %no-parser Any clues?
I do not see exactly what you are out for, but you can easily modify the skeleton file into your own, and invoke it using --skeleton or % skeleton (see Bison manual). Just check what Bison writes, and identify the segments in the skeleton files that need modification. If you find something that is interesting, you might report back to the Bug-Bison list to get it integrated.
Hans Aberg _______________________________________________ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison