help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sample functions for String Parsers in Lisp


From: Andreas Politz
Subject: Re: Sample functions for String Parsers in Lisp
Date: Wed, 14 Oct 2009 01:18:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Nordlöw <per.nordlow@gmail.com> writes:

> Reason: I am writing a parser that converts Emacs regexps (back) into
> rx expressions. I need this for my file magic pattern matcher in order
> to read as little data as possible from the file (locality) and do
> several matchings in parallel.
>
[...]

> Any suggestions?,
> Nordlöw

Yes, save yourself the headache and make the assumption, that all magic
pattern are fully contained in the first n bytes of the file.

-ap





reply via email to

[Prev in Thread] Current Thread [Next in Thread]