🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #98371

re-search fails on long matching strings

#98371
From: Gernot Heiser
Date: Wed, 28 Aug 1991 03:40
58 lines
3242 bytes
Emacs version 18.57 running on a Sun-3 under Sun-OS 4.1 (and similarly
on an Apollo under Domain/OS 10.3):

(re-search-forward regex (point-max) t), where regex is
"^[ 	]*\\(@[A-Za-z]+\\)[ 	]*[({]\\([A-Za-z][---A-Za-z0-9:_+]*\\)\\([ 	
]*,[ 	
]*\\([A-Za-z][---A-Za-z0-9:_+]*\\)[ 	
]*=[ 	
]*\\(\"[^\"\\\\]*\\(\\\\.[^\"\\\\]*\\)*\"\\|\"\"\\|[0-9A-Za-z][---A-Za-z0-9:_+]*\\)\\)*[ 	
]*[})]"
fails on the following file:

---- test file begins after this line ----
@Article{Andrews_91,
  author = 	"Gregory R. Andrews",
  title = 	"Paradigms for Process Interaction in Distributed
		 Programs",
  journal = 	acmcs,
  year = 	1991,
  volume = 	23,
  pages = 	"49--90",
  keywords = 	"logical clocks",
  abstract = 	"Distributed computations are concurrent programs in
		 which processes communicate by message passing. Such
		 programs typically execute on network architectures
		 such as networks of workstations or distributed
		 memory parallel machintes (i.e. multicomputers such
		 as hypercubes). Several paradigms---examples or
		 models---for process interaction in ditributed
		 computations are described. These include network of
		 filters, clients and servers, heartbeat algorithms,
		 probe/echo algorithms, broadcast algorithms,
		 token-passing algorithms, decentralized servers, and
		 bags of tasks. These paradigms are applicable to
		 various practical problems. They are illustrated by
		 solving problems, including parallel sorting, file
		 servers, computing the topology of a network,
		 distributed termination detection, replicated
		 databases, and parallel adaptive quadrature.
		 Solutions to all problems are derived in a step-wise
		 fashion from a general specification of the problem
		 to a concrete solution. The derivations illustrate
		 techniques for developing distributed algorithms."
}
---- test file ends before this line ----

The search is successful, however, if _any_ line in the "abstract"
section is removed. (Well, I didn't try them all, but I tried several
and it always worked.) This is obvioulsy some limitation in the length
of a string that can match a particular regex. The phenomenon seems to
be independent on host hard- and software, and on the current mode (I
found the problem in bibtex-mode and reproduced it in fundamental mode
after starting emacs (under x-windows) with "emacs -q".

Gernot Heiser
School of Computer Science & Engineering  Phone:  +61 2 697 4758
University of NSW, P.O. Box 1		  Fax:	  +61 2 313 7987
Kensington NSW, Australia 2033		  E-mail: gernot@spectrum.cs.unsw.oz.au
Technical Details
Message-ID: <9108270644.2548@munnari.oz.au>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!spectrum.cs.unsw.oz.au!gernot

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,fdf284896b19c89c,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1991-08-27 20:40:18 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!spectrum.cs.unsw.oz.au!gernot
From: gernot@spectrum.cs.unsw.oz.au (Gernot Heiser)
Newsgroups: gnu.emacs.bug
Subject: re-search fails on long matching strings
Message-ID: <9108270644.2548@munnari.oz.au>
Date: 28 Aug 91 03:40:18 GMT
Sender: gnulists@ai.mit.edu
Distribution: gnu
Organization: University of NSW Computer Science
Lines: 58
Approved: bug-gnu-emacs@prep.ai.mit.edu