re-entrant recursively implementation

The `o` char chain is stored in `g.q` and nullified in the end, so that this `g` can be invoked multiple times.