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: Sun, 13 Oct 2013 12:29:25 +0530 Message-ID: References: <87haclhdnz.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1381647590 9380 80.91.229.3 (13 Oct 2013 06:59:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Oct 2013 06:59:50 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 13 08:59:55 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 1VVFed-00064y-AG for ged-emacs-devel@m.gmane.org; Sun, 13 Oct 2013 08:59:55 +0200 Original-Received: from localhost ([::1]:60526 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVFec-0004Xx-TH for ged-emacs-devel@m.gmane.org; Sun, 13 Oct 2013 02:59:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVFeZ-0004Xe-0l for emacs-devel@gnu.org; Sun, 13 Oct 2013 02:59:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VVFeX-0002Yc-Rr for emacs-devel@gnu.org; Sun, 13 Oct 2013 02:59:50 -0400 Original-Received: from mail-pd0-x229.google.com ([2607:f8b0:400e:c02::229]:41841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVFeX-0002YB-D9 for emacs-devel@gnu.org; Sun, 13 Oct 2013 02:59:49 -0400 Original-Received: by mail-pd0-f169.google.com with SMTP id r10so6099348pdi.14 for ; Sat, 12 Oct 2013 23:59:46 -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=NHa3E7hcyA+9PlASvop/9fLW9J45QM4gmxUqw8D45pI=; b=EqALBF9eNFqobc/LIYU0lwtJiKnYvUn0o6s1gAtsElu4YG0rxa3he3fwMvxiYVnLIL 9hDxBo8/+Y/kcPND4y1HWttvR05LyyanipYv3P3pocf5zvjFtmts9Nsxqwrol9yRnBQ2 qcjl79yDD+u9JpPeIYGlRyYVlpkAEcKrILtaPJ1rAgGmUy6iRi/jOTspYur2tfQo8RTW jQNuCs5rTuY0fFdyZko5w7pRXCNHSu3O5inO+odRhfhtJbuzOR2K+D+iwSD7BaSXwx87 Wg6zJCrbR4/EJrNASMXglDDIn6JPZtH+84ottWjjwcCVkcezDHSKq4uYDxF+byjkn2+O Z97w== X-Received: by 10.67.30.70 with SMTP id kc6mr30404406pad.32.1381647586213; Sat, 12 Oct 2013 23:59:46 -0700 (PDT) Original-Received: by 10.68.133.198 with HTTP; Sat, 12 Oct 2013 23:59:25 -0700 (PDT) In-Reply-To: <87haclhdnz.fsf@uwakimon.sk.tsukuba.ac.jp> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c02::229 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:164168 Archived-At: On Sun, Oct 13, 2013 at 12:15 PM, Stephen J. Turnbull wrote: > Rustom Mody writes: > > On Sat, Oct 12, 2013 at 7:56 PM, Stefan Monnier wrote: > >> RM wrote: > > >>> What does sexp mean for non-lisp languages like C etc? > > >> It means "a subtree in the abstract syntax tree". > > > In principle, that's fine. However in practice there are things like > [...] > > c. (most important) emacs doesnt really do a full-scale context > > free grammar analysis does it? > > If you use the semantic package, it can. Most simple modes don't, > although use of semantic is becoming more common. My choice is to preferably stay simple even if that means not covering 20% of odd/corner cases. Not to say that I am afraid of CFGs -- more afraid of regexps with 16 backslashes in a row!! > > So I guess I am asking: Emacs uses regular exps to fudge a > > semblance of context free structure. How does it do this? > > Either it uses semantic, or it mixes regexp "parsing" with use of > regexps to match lexical tokens and custom lisp to parse. > Can you point me to somewhere to read as example? I looked at C mode(s) but there is so much file-level structure I could not figure out where the action is happening. General note: As a language, APL is probably quite simple if not trivial -- function definitions contain lines contain expressions. No control structures, classes etc etc. Rusi -- http://blog.languager.org