Interesting! Thanks for sharing.
This is related to something that I've been planning to explore for a while now: using iterators themselves and their associated coroutines accessed via `iter.Pull`, to do parsing. That is, instead of gaining access to the underlying coroutine machinery by use of "go:linkname", perhaps we can get a bunch of the same advantages by using the more structured form already provided by the standard library.
I suspect that the feedback from parser to scanner you describe can be implemented by allowing the parser to invoke methods on the iteration values (tokens) returned by the scanner.
I wonder if the result might actually be nicer (easier to understand and better structured) than the direct use of coroutines, which personally I find quite hard to "get".
rog.