home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gossip.pyramid.com!olivea!sgigate!odin!news.csd.sgi.com!iceskate.csd.sgi.com!krishna
- From: krishna@shamu.csd.sgi.com (Krishna Sethuraman)
- Newsgroups: comp.lang.perl
- Subject: Re: String matching with matching delimiters
- Message-ID: <KRISHNA.92Sep1122512@shamu.csd.sgi.com>
- Date: 1 Sep 92 17:25:12 GMT
- References: <59999@mimsy.umd.edu>
- Sender: news@news.csd.sgi.com (Net News)
- Distribution: usa
- Organization: /usr/people/krishna/.organization
- Lines: 17
- In-Reply-To: folta@cs.umd.edu's message of 31 Aug 92 21: 30:16 GMT
-
-
- I had this exact problem when I was trying to write something that would
- convert from ATK BE2 datastream format into LaTeX (specifically, to convert
- `eq' files to LaTeX - instant pub-domain wysiwyg equation editor!)
-
- Regexps are not powerful enough to do arbitrary nesting. A push-down automaton
- could do it, but that's my computability/complexity/automata course remnants
- swimming around in my brain (which I could never put into Perl code). Anycase,
- I gave up eventually and used emacs-lisp code (forward-sexp, backward-sexp,
- and kill-sexp) for what I needed.
-
- If someone has code for this, I'd like to look at it both so I can write an
- eq2latex.pl, and for the perl example experience. Please mail me if you have
- any replies.
-
- Krishna Sethuraman
- krishna@sgi.com
-