[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Inverse CHRTRN -- sorry, GLS, you're way off!



Not so! Let's suppose we downcase on input. Then

	Input		Internal	Output

	FOO		foo		foo
	foo		foo		foo
	|FOO|		FOO		|FOO|

but if you downcase only on output then you get

	Input		Internal	Output

	FOO		FOO		foo
	foo		foo		foo
	|FOO|		FOO		foo

Ie, you lose the information that something was |...|'d on input. That
information should not get stored with the token as what needs to be
/'d or |...|'d may change if reader syntax changes between input and output.
The only right time that this decision can be made is at input. What is
stored internally must be exactly reflected in the output -- it's too late
to make a case decision at print time. It must be made at read time.
or you'll get the bug on line 3 of my second example.

-kmp