Thomas A. Schmitz wrote:
Hi Aditya,
now I need to apologize for being so slow to reply: thanks a lot, this looks really fascinating! I don't know how many things I've read on the web to understand if regexps can handle nested delimiters or not (I think the long and short of it was that on some mathematical principle it just isn't possible); there is some pretty obscure perl stuff that might be able to do it but is highly experimental. If gema really can do this, it should be a godsend for processing TeX files. I have it installed now on my OS X box (but couldn't build the gel binary) and am looking forward to experimenting with it.
lua's pattern matcher can hanle nested {} (syntax: %b{} and such) more clever things can be done with lpeg, bla {bla\{bla} and such if you're up to date you may try mtxrun --script check sometexfile.tex this is a (for the mooment simple) syntax checker i wrote a while ago which shows the principles Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------