[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Finding C style comments using isearch-forward-regexp
From: |
Stefan Monnier <address@hidden> |
Subject: |
Re: Finding C style comments using isearch-forward-regexp |
Date: |
20 Feb 2003 18:52:52 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
>> It will avoid matching past the comment-end, but it doesn't prevent the
>> regexp routines from pushing stuff on the stack in case we need
>> to backtrack (the routines are not clever enough).
> Hm. Does that mean that even, say, .* on a file with a single very
> long line will put too much stuff on the stack?
Depends. ".*\n" or ".*$" will not because the regexp routines recognize
this case and don't push anything on the stack for it, but
".*(" will definitely push stuff and will thus lead to the same
error if the line is long enough.
> Is there a way to tell the routines to never backtrack? I think
> there is a way for Perl, and Perlish things went into the Emacs
> regexp engine...
Perl has a way to throw away part of the stack frames (it's basically
equivalent to the `!' construct of Prolog, a.k.a. cut).
It's not implemented in Emacs.
Stefan
- Finding C style comments using isearch-forward-regexp, Timur Aydin, 2003/02/19
- Re: Finding C style comments using isearch-forward-regexp, Kai Großjohann, 2003/02/19
- Re: Finding C style comments using isearch-forward-regexp, Timur Aydin, 2003/02/19
- Re: Finding C style comments using isearch-forward-regexp, Stefan Monnier <address@hidden>, 2003/02/19
- Re: Finding C style comments using isearch-forward-regexp, Kai Großjohann, 2003/02/20
- Re: Finding C style comments using isearch-forward-regexp, Stefan Monnier <address@hidden>, 2003/02/20
- Re: Finding C style comments using isearch-forward-regexp, Kai Großjohann, 2003/02/20
- Re: Finding C style comments using isearch-forward-regexp,
Stefan Monnier <address@hidden> <=
- Re: Finding C style comments using isearch-forward-regexp, Kevin Dziulko, 2003/02/21
Re: Finding C style comments using isearch-forward-regexp, Kai Großjohann, 2003/02/19