Returning partly to an older model of parser input processing: the
parser::input_contents goes back to a plain string, which may be
modified gradually by $/@ expansion etc. While string_refs cannot be
made based on that, they don't need to be either, since the
input_contents is a temporary member variable and will be disposed of
when the parser dies.
So we switch back to the prior general logic of
lexer::input_{put,get,peek}, which worked OK. To populate token
content string_refs, we use a global stringtable (a *set<string>)
against which long-lived string_refs may be issued with a new intern()
call. The input file contents are amongst those strings interned.
(Many other repeated string uses in the translator could probably
benefit from intern/string_ref'ing, and there are optimization
opportunities within the stringtable implementation proper.)
(While en route, mass-dropped a bunch of unnecessary namespace
prefixes in some affected files. Sorry for the diff noise.)