bug-grep
[Top][All Lists]
Advanced

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

bug#16581: suggested code simplification in dfa.c


From: Paul Eggert
Subject: bug#16581: suggested code simplification in dfa.c
Date: Tue, 28 Jan 2014 22:48:16 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Aharon Robbins wrote:
that exclusive-ORing looks a little scary to me.

It is derived from a coding hack that I picked up from Dijkstra back in the 1970s. He gave the most boring computer-science lecture I have ever attended -- so boring that Kit Fine walked out a few minutes into it -- but I stubbornly stayed through to the end and I've never forgotten the hack.

The hack works everywhere, including platforms that use EBCDIC, shift-JIS, DBCS, etc., because it doesn't rely on the encoding scheme at all. Attached is a revised patch that adds some commentary and breaks the hack into some functions that I hope help explain things. Sorry, I don't know how to break this into smaller patches that would be easier to understand.

Attachment: 0001-Simplify-handling-of-letter-case.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]