State.dump_rules takes a formatter and has a test suite
Without IO lexer
Nothing but indenting while reading Counter