[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Structural regular expressions
From: |
tomas |
Subject: |
Re: Structural regular expressions |
Date: |
Sat, 11 Sep 2010 10:33:18 +0200 |
User-agent: |
Mutt/1.5.15+20070412 (2007-04-11) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sat, Sep 11, 2010 at 08:58:04AM +0100, Wojciech Meyer wrote:
> Miles Bader <address@hidden> writes:
>
> > "Drew Adams" <address@hidden> writes:
> >> That's the real point, I believe: the paper touts the use of regexps
> >> to divide text into chunks that match - chunks that are not
> >> necessarily lines, in order to then act on those chunks in some way.
> >
> > Not a good base, I think -- regexps are not really powerful enough to do
> > the job well.
>
> Yes regexp are quite limited.
> Maybe a simple PEG parser based on packrat, with a syntax sugar for
> defining one line set of rules?
While PEG is interesting in itself (and I think Emacs should have
something like that, just to test its strengths/weaknesses wrt regex), I
think Drew is right: A way, *any* way to define a "buffer subset", maybe
partitioned into "chunks" is useful here. So at this level, I'd think
concentrating on interface design (user & programmer) makes most sense,
abstracting from possible implementations (regex, peg, font-lock,
hand-built parser).
The (possible) implementations should (I think) just guide the design of
the interfaces (as examples). In the ideal case, it should be possible
to use whatever implementation is most helpful (or combine them: union,
intersection, symmetric difference).
Just dreaming?
Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFMiz7OBcgs9XrR2kYRAjZvAJ9Hzc4Dk2Z4t3wohMQJX/8544MvIQCffrxr
WKNM0E3e/fJ3UF61J4Ez7c4=
=tDCG
-----END PGP SIGNATURE-----
- Re: Structural regular expressions, (continued)
- Re: Structural regular expressions, Davis Herring, 2010/09/09
- Re: Structural regular expressions, Lennart Borgman, 2010/09/09
- Re: Structural regular expressions, Stefan Monnier, 2010/09/10
- Re: Structural regular expressions, Richard Stallman, 2010/09/10
- Re: Structural regular expressions, David House, 2010/09/10
- Message not available
- Re: Structural regular expressions, Tom, 2010/09/10
- RE: Structural regular expressions, Drew Adams, 2010/09/10
- Re: Structural regular expressions, Miles Bader, 2010/09/10
- Re: Structural regular expressions, Tom, 2010/09/11
- Re: Structural regular expressions, Wojciech Meyer, 2010/09/11
- Re: Structural regular expressions,
tomas <=
- RE: Structural regular expressions, Drew Adams, 2010/09/11
- Re: Structural regular expressions, Richard Stallman, 2010/09/11
- Re: Structural regular expressions, Stefan Monnier, 2010/09/12
- Re: Structural regular expressions, Lennart Borgman, 2010/09/12
- RE: Structural regular expressions, Drew Adams, 2010/09/12
- Re: Structural regular expressions, Lennart Borgman, 2010/09/12
- RE: Structural regular expressions, Drew Adams, 2010/09/12
- Re: Structural regular expressions, Tom, 2010/09/09
- Re: Structural regular expressions, Lennart Borgman, 2010/09/09
- Re: Structural regular expressions, Tom, 2010/09/09