Path: utzoo!attcan!uunet!ogicse!schaefer From: schaefer@ogicse.ogc.edu (Barton E. Schaefer) Newsgroups: comp.lang.c Subject: Re: Why nested comments not allowed? Message-ID: <7458@ogicse.ogc.edu> Date: 20 Feb 90 16:35:58 GMT References: <236100027@prism> <7330017@hpcllak.HP.COM> <1990Feb19.143619.17663@uncecs.edu> <1990Feb19.221039.4243@agate.berkeley.edu> Organization: Oregon Graduate Institute (formerly OGC), Beaverton, OR Lines: 25 In article <1990Feb19.221039.4243@agate.berkeley.edu> raymond@math.berkeley.edu (Raymond Chen) writes: } Dear everyone who wants to argue that nested comments are "good", "easy to } implement", "has no hidden surprises": } } Please present a coherent rule for nested comments for which the following } lines of code produce "expected" results: Actually, the cases presented are not in themselves very interesting. The interesting thing is trying to parse "code" like that after commenting it out: /* Commented out ... /* ... with extra nesting just for fun int openquote = 34; /* " */ int closequote = 34; /* Also " */ int quote = 34; /* for a good time, type printf("*/ %c",quote) */ /* int doublequote = 34; /* " */ */ /* don't need this one: '"' */ /* printf("*/ is the close-comment token\n"); printf("/* is the \"open-comment\" token\n"); */ */ end extra */ -- Bart Schaefer "February. The hangnail on the big toe of the year." -- Duffy schaefer@cse.ogi.edu (used to be cse.ogc.edu)