Reentrant scanner.