* Regular Expression Parser in Emacs Lisp
@ 2009-09-25 12:01 Nordlöw
2009-09-25 12:08 ` Joost Kremers
2009-09-29 9:42 ` Ilya Zakharevich
0 siblings, 2 replies; 5+ messages in thread
From: Nordlöw @ 2009-09-25 12:01 UTC (permalink / raw)
To: help-gnu-emacs
Has any body any reflections, ideas or even code snippets that could
be used to implement a regular expression parser in Emacs-Lisp?
My highest prio is supporting emacs-style regexps.
Thanks in advance,
Nordlöw
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Regular Expression Parser in Emacs Lisp
2009-09-25 12:01 Regular Expression Parser in Emacs Lisp Nordlöw
@ 2009-09-25 12:08 ` Joost Kremers
2009-09-25 12:17 ` Nordlöw
2009-09-29 9:42 ` Ilya Zakharevich
1 sibling, 1 reply; 5+ messages in thread
From: Joost Kremers @ 2009-09-25 12:08 UTC (permalink / raw)
To: help-gnu-emacs
Nordlöw wrote:
> Has any body any reflections, ideas or even code snippets that could
> be used to implement a regular expression parser in Emacs-Lisp?
> My highest prio is supporting emacs-style regexps.
and why don't you use the one that's built into emacs?
--
Joost Kremers joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Regular Expression Parser in Emacs Lisp
2009-09-25 12:08 ` Joost Kremers
@ 2009-09-25 12:17 ` Nordlöw
2009-09-25 12:27 ` Joost Kremers
0 siblings, 1 reply; 5+ messages in thread
From: Nordlöw @ 2009-09-25 12:17 UTC (permalink / raw)
To: help-gnu-emacs
On Sep 25, 2:08 pm, Joost Kremers <joostkrem...@yahoo.com> wrote:
> Nordlöw wrote:
> > Has any body any reflections, ideas or even code snippets that could
> > be used to implement a regular expression parser in Emacs-Lisp?
> > My highest prio is supporting emacs-style regexps.
>
> and why don't you use the one that's built into emacs?
>
> --
> Joost Kremers joostkrem...@yahoo.com
> Selbst in die Unterwelt dringt durch Spalten Licht
> EN:SiS(9)
My motivation:
I am currently implementing (in Emacs-Lisp) a sort of database layer
for file types based on both file name and contents patterns (compare
with file and libmagic) that are preferrably specified using regular
expressions. But to make this reasonably fast I need a way to figure
out if a regexp has a maximum match length and if so what that length
is.
This because I want to perform memory-local scanning of file contents
and only want to load as much of the file that I actually need.
/Nordlöw
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Regular Expression Parser in Emacs Lisp
2009-09-25 12:17 ` Nordlöw
@ 2009-09-25 12:27 ` Joost Kremers
0 siblings, 0 replies; 5+ messages in thread
From: Joost Kremers @ 2009-09-25 12:27 UTC (permalink / raw)
To: help-gnu-emacs
Nordlöw wrote:
> I need a way to figure
> out if a regexp has a maximum match length and if so what that length
> is.
do you need a full-blown regexp parser for that? AFAICT the regexp syntax
defines precisely which tokens may match more than one character, and in those
cases, the maximum number of characters matched is not given, so that the
maximum length is not defined.
--
Joost Kremers joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Regular Expression Parser in Emacs Lisp
2009-09-25 12:01 Regular Expression Parser in Emacs Lisp Nordlöw
2009-09-25 12:08 ` Joost Kremers
@ 2009-09-29 9:42 ` Ilya Zakharevich
1 sibling, 0 replies; 5+ messages in thread
From: Ilya Zakharevich @ 2009-09-29 9:42 UTC (permalink / raw)
To: help-gnu-emacs
On 2009-09-25, Nordlöw <per.nordlow@gmail.com> wrote:
> Has any body any reflections, ideas or even code snippets that could
> be used to implement a regular expression parser in Emacs-Lisp?
> My highest prio is supporting emacs-style regexps.
There is one cperl-mode.el. But IIRC it might be inlined, not in a
separate function... Hmm, maybe it IS separated - I got conflicting
memories of that...
Hope this helps,
Ilya
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-09-29 9:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-25 12:01 Regular Expression Parser in Emacs Lisp Nordlöw
2009-09-25 12:08 ` Joost Kremers
2009-09-25 12:17 ` Nordlöw
2009-09-25 12:27 ` Joost Kremers
2009-09-29 9:42 ` Ilya Zakharevich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).