From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Compiled files without sources???? Date: Sun, 31 Jul 2011 20:14:37 -0400 Message-ID: <87y5zeng2a.fsf@stupidchicken.com> References: <87ei1bzjwg.fsf@fencepost.gnu.org> <4E3133CE.7010101@cs.ucla.edu> <4E31F0B3.3030505@cs.ucla.edu> <87mxfw90oo.fsf@stupidchicken.com> <87r558ms8j.fsf@stupidchicken.com> <87zkjv33w3.fsf@stupidchicken.com> <87sjpn8if0.fsf@ambire.localdomain> <87sjpm7lvt.fsf@fencepost.gnu.org> <878vrepc6g.fsf@uwakimon.sk.tsukuba.ac.jp> <87mxfunx4h.fsf@gnus.org> <877h6yp652.fsf@uwakimon.sk.tsukuba.ac.jp> <87tya2qg0x.fsf@engster.org> <87hb625b7r.fsf@fencepost.gnu.org> <87pqkqqbyc.fsf@engster.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1312157692 19475 80.91.229.12 (1 Aug 2011 00:14:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 1 Aug 2011 00:14:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 01 02:14:48 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qng9d-00040k-Ga for ged-emacs-devel@m.gmane.org; Mon, 01 Aug 2011 02:14:45 +0200 Original-Received: from localhost ([::1]:39267 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qng9c-0006Qx-5T for ged-emacs-devel@m.gmane.org; Sun, 31 Jul 2011 20:14:44 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qng9a-0006Qm-32 for emacs-devel@gnu.org; Sun, 31 Jul 2011 20:14:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qng9Y-0003zZ-Dp for emacs-devel@gnu.org; Sun, 31 Jul 2011 20:14:42 -0400 Original-Received: from vm-emlprdomr-03.its.yale.edu ([130.132.50.144]:36270) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qng9Y-0003zT-A9 for emacs-devel@gnu.org; Sun, 31 Jul 2011 20:14:40 -0400 Original-Received: from furball (c-76-28-93-216.hsd1.ct.comcast.net [76.28.93.216]) (authenticated bits=0) by vm-emlprdomr-03.its.yale.edu (8.14.4/8.14.4) with ESMTP id p710EcfO012039 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Sun, 31 Jul 2011 20:14:39 -0400 In-Reply-To: <87pqkqqbyc.fsf@engster.org> (David Engster's message of "Mon, 01 Aug 2011 01:15:07 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.144 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.132.50.144 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:142616 Archived-At: David Engster writes: >> So what would be entailed to let upstream CEDET generate compiled >> grammars directly usable in Emacs? Why don't they work out of the box >> when the parser runtime is ostensibly what is present in upstream >> CEDET? Can the differences be factored out into variables? > > The most important change is the 8+3 file renaming; this is replicated > in the file-rename branch. Also, the CEDET compilation process was > complicated and dependant on autoloads from EIEIO classes and methods, > which Emacs doesn't support and which therefore was also removed; Llu=C3= =ADs > has written a completely new Makefile for that. It's actually not as complicated as that. The major changes between the compiled grammars and the files actually included in Emacs are (i) renaming of the files, (ii) fixed-up copyright headers, (iii) changes in the `feature' keyword of the file plus the filename, and (iv) re-ordering of some code chunks in the file to avoid some byte compilation warnings (IIRC). These changes are not really practical to do except by hand. Here is an example, comparing the compiled from etc/grammars/make.by to lisp/cedet/semantic/bovine/make-by.el on the trunk. (The bovine parser generator is currently broken on the trunk, because of a bug related to the "backquote not followed by a space" change, so generation was actually done with Emacs 23.) *** trunk/etc/grammars/semantic-make-by.el 2011-07-31 19:58:28.774752136 -0= 400 --- trunk/lisp/cedet/semantic/bovine/make-by.el 2011-07-30 20:08:50.9877840= 21 -0400 *************** *** 1,36 **** ! ;;; semantic-make-by.el --- Generated parser support file =20=20 ! ;; Copyright (C) 1999-2011 Free Software Foundation, Inc. =20=20 ! ;; Author: Chong Yidong ! ;; Created: 2011-07-31 19:58:28-0400 ! ;; Keywords: syntax ! ;; X-RCS: $Id$ =20=20 ! ;; This file is not part of GNU Emacs. =20=20 ! ;; This program is free software; you can redistribute it and/or ! ;; modify it under the terms of the GNU General Public License as ! ;; published by the Free Software Foundation, either version 3 of ! ;; the License, or (at your option) any later version. !=20 ! ;; This software is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ! ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! ;; General Public License for more details. ! ;; ;; You should have received a copy of the GNU General Public License ! ;; along with this program. If not, see . =20=20 ;;; Commentary: ;; ! ;; PLEASE DO NOT MANUALLY EDIT THIS FILE! It is automatically ! ;; generated from the grammar file make.by. !=20 ! ;;; History: ! ;; =20=20 ;;; Code: ;;; Prologue ;; --- 1,31 ---- ! ;;; semantic/bovine/make-by.el --- Generated parser support file =20=20 ! ;; Copyright (C) 1999-2004, 2008-2011 Free Software Foundation, Inc. =20=20 ! ;; This file is part of GNU Emacs. =20=20 ! ;; GNU Emacs is free software: you can redistribute it and/or modify ! ;; it under the terms of the GNU General Public License as published by ! ;; the Free Software Foundation, either version 3 of the License, or ! ;; (at your option) any later version. =20=20 ! ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ! ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! ;; GNU General Public License for more details. !=20 ;; You should have received a copy of the GNU General Public License ! ;; along with GNU Emacs. If not, see . =20=20 ;;; Commentary: ;; ! ;; This file was generated from etc/grammars/make.by. =20=20 ;;; Code: +=20 + (require 'semantic/lex) + (eval-when-compile (require 'semantic/bovine)) +=20 ;;; Prologue ;; *************** *** 70,76 **** =20=20 (defconst semantic-make-by--parse-table `( ! (bovine-toplevel=20 (Makefile) ) ;; end bovine-toplevel =20=20 --- 65,71 ---- =20=20 (defconst semantic-make-by--parse-table `( ! (bovine-toplevel (Makefile) ) ;; end bovine-toplevel =20=20 *************** *** 385,399 **** semantic-flex-keywords-obarray semantic-make-by--keyword-table )) =20=20 ! ! ;;; Analyzers ! ;; ! (require 'semantic-lex) !=20 ! ! ;;; Epilogue ! ;; !=20 ! (provide 'semantic-make-by) =20=20 ! ;;; semantic-make-by.el ends here --- 380,385 ---- semantic-flex-keywords-obarray semantic-make-by--keyword-table )) =20=20 ! (provide 'semantic/bovine/make-by) =20=20 ! ;;; semantic/bovine/make-by.el ends here