From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Regexps and strings once again Date: Sun, 14 Sep 2014 22:14:31 -0400 Message-ID: References: <541637C4.8050502@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1410747306 1585 80.91.229.3 (15 Sep 2014 02:15:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Sep 2014 02:15:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 15 04:14:59 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 1XTLof-0007VZ-JU for ged-emacs-devel@m.gmane.org; Mon, 15 Sep 2014 04:14:57 +0200 Original-Received: from localhost ([::1]:56864 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTLof-0008No-3F for ged-emacs-devel@m.gmane.org; Sun, 14 Sep 2014 22:14:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTLoN-0008Nf-PH for emacs-devel@gnu.org; Sun, 14 Sep 2014 22:14:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTLoH-0005PC-AE for emacs-devel@gnu.org; Sun, 14 Sep 2014 22:14:39 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:33694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTLoH-0005P6-6E for emacs-devel@gnu.org; Sun, 14 Sep 2014 22:14:33 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNFpZEG/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCwsOChwSFBgNJBOHcQjSGReOegeEOASpGYFqg0wh X-IPAS-Result: ArUGAIDvNVNFpZEG/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCwsOChwSFBgNJBOHcQjSGReOegeEOASpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="89688859" Original-Received: from 69-165-145-6.dsl.teksavvy.com (HELO ceviche.home) ([69.165.145.6]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Sep 2014 22:14:31 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 10FE2660D3; Sun, 14 Sep 2014 22:14:31 -0400 (EDT) In-Reply-To: <541637C4.8050502@dancol.org> (Daniel Colascione's message of "Sun, 14 Sep 2014 17:50:12 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.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:174306 > On 09/14/2014 04:27 PM, Lars Magne Ingebrigtsen wrote: >> (dom-by-id dom (regexp "I \\(couldn't\\)?haz new syntax")) `regexp' could just as well take a new syntax. And it doesn't have to return a string with a funny text-property but can really return a new kind of object. I think it could be fairly elegant. >>>>> "Daniel" == Daniel Colascione writes: > I've been working on an NFA combinator facility lately. The basic idea > is that you don't work in terms of regular expressions per se, but in > terms of state-matching machines (like the ones Ragel has) that you can > combine using the standard union, repeat, negative, and intersection > operators. Do you really mean NFA or are you actually manipulating DFAs? If NFAs, how do you implement intersection? > Stefan has something similar in ELPA --- lex.el --- except his code > seems to do the conversion in one shot instead of supporting the > incremental building of matching machines. Indeed. Stefan