From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: W Dan Meyer Newsgroups: gmane.emacs.help Subject: Re: how to use parsing expressing grammar Date: Tue, 03 Mar 2009 23:52:25 +0000 Organization: Aioe.org NNTP Server Message-ID: <87fxhukvuu.fsf@gmail.com> References: <6b8a1070-1a89-48b0-9287-343b673b5758@a29g2000pra.googlegroups.com> <098ddc5b-7074-41fb-a921-caee3bddddff@t39g2000prh.googlegroups.com> <91fa65a0-a7e7-4374-8f96-5786c8908615@w24g2000prd.googlegroups.com> <067151a4-b892-4e9a-8600-e2dcd92cb0ad@v18g2000pro.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1236147932 32264 80.91.229.12 (4 Mar 2009 06:25:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Mar 2009 06:25:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 04 07:26:47 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LekYx-0005jB-MW for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Mar 2009 07:26:40 +0100 Original-Received: from localhost ([127.0.0.1]:36490 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LekXc-0005vX-4N for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Mar 2009 01:25:16 -0500 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!aioe.org!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs,comp.lang.lisp Original-Lines: 38 Original-NNTP-Posting-Host: SzaqlAEO6bbHF9XXoMT3gw.user.aioe.org Original-X-Complaints-To: abuse@aioe.org Original-NNTP-Posting-Date: Tue, 3 Mar 2009 23:52:59 +0000 (UTC) X-Notice: Filtered by postfilter v. 0.7.7 Cancel-Lock: sha1:nllXLFziTD1vR/6KeaWeZZRxmiA= sha1:yoVZVxROJrMEOHYruSn9Z1NvcY8= User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.90 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:167270 comp.emacs:97916 comp.lang.lisp:262168 X-Mailman-Approved-At: Wed, 04 Mar 2009 01:20:43 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:62570 Archived-At: Xah Lee writes: > On Mar 3, 9:59 am, Mike Mattie wrote: >> On Tue, 03 Mar 2009 17:34:41 +0000 >> >> Leo wrote: >> > On 2008-12-21 09:49 +0000, Helmut Eller wrote: >> > >> I'm pretty sure if you create it, more and more people will join >> > >> it. I'm very interested in PEG and think it is of critical >> > >> importance. >> >> > > I'll try to set up project at savannah. >> >> > I have seen the project on >> >http://savannah.nongnu.org/projects/emacs-peg. I wonder it might be a >> > good idea to make a newsgroup on gmane to link to the mailing list. It >> > will make more Emacs users subscribe to it. >> >> > Best wishes, >> >> I was working on a PEG/CFG parser compiler:http://www.emacswiki.org/cgi-bin/wiki/ParserCompiler >> >> I will be resuming the development soon. Please keep me in the loop on such efforts. Are we talking about memoising PEG (e.g Packrat) in elisp? There might be more people interested. I do realise that Emacs doesn't have decent parsing facility and it makes it's regular expression based engine in more complex areas useless (mentioned nested tags). Since it's automata based you cannot go beyond simple patterns. That means also that everybody is reinventing a wheel with implanting all those recursive decent parsers when it comes to analyse, pretty print, syntax highlight of such modes like Haskell one. Packrat parser is the best option out there currently because it recognises much complex grammar then LALR(1), and it has no ambiguities with expressing these grammars. Works well also as a standalone combinator based solution rather then a parser generator, plus it is lex-less e.g allow to recognise several different languages in _one_go_ and one context without marking them explicitly! cheers Dan W