all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Colascione <dancol@dancol.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Regexps and strings once again
Date: Sun, 14 Sep 2014 20:41:23 -0700	[thread overview]
Message-ID: <54165FE3.40307@dancol.org> (raw)
In-Reply-To: <jwviokpd49p.fsf-monnier+emacs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1368 bytes --]

On 09/14/2014 07:14 PM, Stefan Monnier wrote:
>> 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 <dancol@dancol.org> 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?

Actual NFAs --- the kinda-sorta working code is in the Jezebel repo;
I've been adding arbitrary predicate support. DFA construction just
produces an NFA object that happens not to contain any ambiguity, which
recognizer generators can treat specially. I haven't actually
implemented intersection yet, although I suspect the dumb union-negation
algorithm should be good enough after DFA construction and minimization.
If it isn't, I'll just see what Ragel does and do that.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-09-15  3:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-14 23:27 Regexps and strings once again Lars Magne Ingebrigtsen
2014-09-15  0:50 ` Daniel Colascione
2014-09-15  2:14   ` Stefan Monnier
2014-09-15  3:41     ` Daniel Colascione [this message]
2014-09-15 12:52       ` Stefan Monnier
2014-09-15 10:04     ` Lars Magne Ingebrigtsen
2014-09-15 10:26       ` Andreas Schwab
2014-09-15 10:33         ` Lars Magne Ingebrigtsen
2014-09-15 12:56       ` Stefan Monnier
2014-09-15  6:39   ` Lars Magne Ingebrigtsen
2014-09-15  7:08     ` Daniel Colascione
2014-09-15  1:38 ` Yuri Khan
2014-09-15  9:22   ` Andreas Schwab
2014-09-15 10:12     ` Eric Abrahamsen
2014-09-15 10:22       ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54165FE3.40307@dancol.org \
    --to=dancol@dancol.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.