From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Creating a coding system Date: Sat, 20 Dec 2014 22:45:12 +0200 Message-ID: <83fvcaqcdj.fsf@gnu.org> References: <87ppbeitcs.fsf@fencepost.gnu.org> <87sigasa3n.fsf@igel.home> <878ui2ieu1.fsf@fencepost.gnu.org> <87k31ms3gr.fsf@igel.home> <87zjaigtkz.fsf@fencepost.gnu.org> <83tx0qqn4d.fsf@gnu.org> <87r3vugr1s.fsf@fencepost.gnu.org> <83mw6iqicx.fsf@gnu.org> <87egrugmyi.fsf@fencepost.gnu.org> <83ioh6qeci.fsf@gnu.org> <877fxmgjy2.fsf@fencepost.gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1419108365 21835 80.91.229.3 (20 Dec 2014 20:46:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Dec 2014 20:46:05 +0000 (UTC) Cc: schwab@linux-m68k.org, emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 20 21:45:58 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y2QuT-0004fA-0h for ged-emacs-devel@m.gmane.org; Sat, 20 Dec 2014 21:45:57 +0100 Original-Received: from localhost ([::1]:35774 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2QuR-0003ED-Qi for ged-emacs-devel@m.gmane.org; Sat, 20 Dec 2014 15:45:55 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2QuA-0003E0-NK for emacs-devel@gnu.org; Sat, 20 Dec 2014 15:45:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y2Qu5-0005Yp-8X for emacs-devel@gnu.org; Sat, 20 Dec 2014 15:45:38 -0500 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:54347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2Qtz-0005VO-CF; Sat, 20 Dec 2014 15:45:27 -0500 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NGW00O00EDLPV00@mtaout25.012.net.il>; Sat, 20 Dec 2014 22:41:13 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NGW00MJJESOPT40@mtaout25.012.net.il>; Sat, 20 Dec 2014 22:41:13 +0200 (IST) In-reply-to: <877fxmgjy2.fsf@fencepost.gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:180408 Archived-At: > From: David Kastrup > Cc: schwab@linux-m68k.org, emacs-devel@gnu.org > Date: Sat, 20 Dec 2014 21:11:49 +0100 > > > I might be mistaken, but this doesn't look to me like a job for a > > coding-system. You are talking about parsing input into some abstract > > notation, > > "parsing input" is sort of bombastic for interpreting a binary > representation consisting of isolated minimal words. Yes, but coding-systems machinery is not a general-purpose bytestream conversion facility. It was designed and implemented specifically for converting between known families of encodings. You might be able to tweak it enough to do what you want, eventually, but it doesn't look like a piece of cake to me. Programming in CCL is like writing assembly code in a restricted machine language, hardly something well suited to converting one complex bytestream into another. > > then generating a representation of that input in a different > > language. This is sufficiently different from converting characters > > from one encoding to another that you should perhaps look at > > cedet/semantic/ stuff instead. > > Uh, there is no grammar involved here, no context, most certainly not a > push-down stack or something. But there's definitely some kind of "lexing", no? You are talking about sequences of symbols, not about letters from some alphabet. If you try representing each sequence as an encoding of a letter, won't you get an enormously large alphabet? Then again, I might be dead wrong.