Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!uhura.cc.rochester.edu!ur-valhalla!badri From: badri@valhalla.ee.rochester.edu (Badri Lokanathan) Newsgroups: comp.lang.c Subject: Re: Statement terminators Message-ID: <2179@valhalla.ee.rochester.edu> Date: 9 May 89 03:58:31 GMT References: <41117@oliveb.olivetti.com> <225800165@uxe.cso.uiuc.edu> <1273@l.cc.purdue.edu> <2296@mit-caf.MIT.EDU> <1843@ubu.warwick.UUCP> Reply-To: badri@ee.rochester.edu (Badri Lokanathan) Organization: UR Dept. of Electrical Engg, Rochester NY 14627 Lines: 26 >In article <2296@mit-caf.MIT.EDU> vlcek@mit-caf.MIT.EDU (Jim Vlcek) writes: >> In fact, I myself would lean the other direction and prefer that >> macros not follow the strict ``to the next newline'' rule, but rather >> have a more explicit means of terminating the definition body. In article <1843@ubu.warwick.UUCP> geoff@cs.warwick.ac.uk (Geoff Rimmer) writes: >I agree that it can be *very* annoying having to backquote all the >newlines in macros (take a look at "putc" in stdio.h !) But how else >could cpp be designed so it knows when to stop? By matching the >parentheses/ brackets & braces? One could have a default set of delimiters that can be modified on the fly (as in sed pattern matching, for instance) Say the default is ^ #define Foo ^your macro^ But if your macro contains ^, then modify by #define Foo @your macro@ cpp can easily be designed to recognize the first non-white character as a delimiter ... -- "I care about my fellow man {) badri@ee.rochester.edu Being taken for a ride, //\\ {ames,cmcl2,columbia,cornell, I care that things start changing ///\\\ garp,harvard,ll-xn,rutgers}! But there's no one on my side."-UB40 _||_ rochester!ur-valhalla!badri