[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Inverse CHRTRN -- sorry, GLS, you're way off!
- To: GLS at MIT-MC
- Subject: Inverse CHRTRN -- sorry, GLS, you're way off!
- From: KMP at MIT-MC (Kent M. Pitman)
- Date: Tue, 15 Apr 80 04:42:00 GMT
- Cc: (BUG LISP) at MIT-MC, Dave.Touretzky at CMU-10A
- Original-date: 14 APR 1980 2342-EST
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