For reference: this is basically a followup question of Troubles using Bison\'s recursive rules, and storing values using it.
I am trying to make a flex+bison scanner