From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rustom Mody Newsgroups: gmane.emacs.devel Subject: Re: APL mode Date: Sat, 12 Oct 2013 21:39:24 +0530 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8ff1c0ac95f91f04e88d76be X-Trace: ger.gmane.org 1381594188 17816 80.91.229.3 (12 Oct 2013 16:09:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Oct 2013 16:09:48 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 12 18:09:51 2013 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 1VV1lG-0008Sx-Vk for ged-emacs-devel@m.gmane.org; Sat, 12 Oct 2013 18:09:51 +0200 Original-Received: from localhost ([::1]:58741 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VV1lG-0002Ix-4E for ged-emacs-devel@m.gmane.org; Sat, 12 Oct 2013 12:09:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VV1lC-0002If-NU for emacs-devel@gnu.org; Sat, 12 Oct 2013 12:09:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VV1lB-0006Eu-I4 for emacs-devel@gnu.org; Sat, 12 Oct 2013 12:09:46 -0400 Original-Received: from mail-pd0-x22e.google.com ([2607:f8b0:400e:c02::22e]:57230) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VV1lB-0006Em-Ab for emacs-devel@gnu.org; Sat, 12 Oct 2013 12:09:45 -0400 Original-Received: by mail-pd0-f174.google.com with SMTP id y13so5557276pdi.5 for ; Sat, 12 Oct 2013 09:09:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=GuDNLOCiXqWH1kxb1Q/EvuejGVeP9RCmWuJDXxXzrlw=; b=ZCyY2N+KggyST2thMxp7b0yRLSRPcziQLBV7FLXoFD0EijgTiYNgfO5p8feZL9yql7 XZf4Lj6osxk9MG/wTaTcYA658Wmork6nxyqFWtirX5pwGXcatg7dWQzobCzwmLoo6F+p x/9r8a3nPvoQMnlx9kMpI2b4cgbujlDaqUY1vNb+EngA/VtcdMwz62pa5vm7ARA+Oeop PhSBnLfLZLRsocLYzafbummRzO6ro2EIOqo3JffHnmqS129H7QiiATVkSn9aLhDWq0NP nKB3ymo10Dh/lTGnmXqd1zo7OIt0DdLU0VlTWaeUHNb6PjsQYPapdwpLILzrpO4UclQL +PzQ== X-Received: by 10.68.190.162 with SMTP id gr2mr822307pbc.196.1381594184412; Sat, 12 Oct 2013 09:09:44 -0700 (PDT) Original-Received: by 10.68.133.198 with HTTP; Sat, 12 Oct 2013 09:09:24 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c02::22e 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:164151 Archived-At: --e89a8ff1c0ac95f91f04e88d76be Content-Type: text/plain; charset=ISO-8859-1 On Sat, Oct 12, 2013 at 7:56 PM, Stefan Monnier wrote: >> What does sexp mean for non-lisp languages like C etc? >> (Needed for functions like forward-sexp) > > It means "a subtree in the abstract syntax tree". In principle, that's fine. However in practice there are things like a. comments which do not exist in the AST b. preprocessor commands that appear and disappear before ASTs are on the scene c. (most important) emacs doesnt really do a full-scale context free grammar analysis does it? So I guess I am asking: Emacs uses regular exps to fudge a semblance of context free structure. How does it do this? Rusi -- http://www.the-magus.in http://blog.languager.org --e89a8ff1c0ac95f91f04e88d76be Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


On Sat, Oct 12, 2013 at 7:56 PM, Stefan Monni= er <monnier@iro.umontreal.ca= > wrote:
>> What does sexp mean for non-lisp languages like= C etc?
>> (Needed for functions like forward-sexp)
>
> It means = "a subtree in the abstract syntax tree".

In principle, tha= t's fine. However in practice there are things like
a. comments whic= h do not exist in the AST
b. preprocessor commands that appear and disappear before ASTs are on the s= cene
c. (most important) emacs doesnt really do a full-scale context fre= e grammar analysis does it?

So I guess I am asking: Emacs uses regul= ar exps to fudge a semblance of context free structure. How does it do this= ?

Rusi
--e89a8ff1c0ac95f91f04e88d76be--