Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: Something new in C syntax Keywords: ifdefs comments Message-ID: <15681@mimsy.UUCP> Date: 28 Jan 89 06:27:02 GMT References: <4586@bunker.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 19 In article <4586@bunker.UUCP> allen@bunker.UUCP (C. Allen Grabert) writes: >... I have since decided that the ifdef's do NOT remove the action >of the comment delimiters. (correct) >... Anyone like to comment on why it works the way it does?? Because dmr did it that way. More realistically: the preprocessor elides comments, and also must scan the contents of false `#if' controls to keep track of nesting. The most obvious way to do this is to have a lexical scanner that deletes comments, and a parser that parses `#' control lines, and to continue to delete comments even when parsing only to find the matching `#endif'. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris