Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ihnp4!kaiser!tla From: tla@kaiser.UUCP Newsgroups: comp.lang.modula2 Subject: Re: FYI: M2 Comments Message-ID: <568@kaiser.UUCP> Date: Fri, 13-Mar-87 11:20:13 EST Article-I.D.: kaiser.568 Posted: Fri Mar 13 11:20:13 1987 Date-Received: Sat, 14-Mar-87 09:38:19 EST References: <8703101615.AA14931@frey.olsen.uucp> Distribution: world Organization: AT&T Bell Laboratories, Liberty Corner Lines: 46 > Did any language implementers out there ever notice that > Wirth does not define the syntax of a "comment" in the > "Syntax of Modula-2" in the back of PIM2. They don't > appear in the railroad diagrams, either. He mentions > them on page 16 (3rd edition), but even there he > doesn't mention that they can be nested. I realized this > after playing with EBNF for some language stuff and found > it very difficult to describe "arbitrary sequences of > characters" in EBNF. > > My question is: "Was it an oversight or was it intentionally > avoided?" > > Rob > > PS. Don't bother looking in the index, they aren't mentioned > there. There is one more reference, (ed 3) page 145, where it IS stated that comments CAN be nested. And both ARE in my index under "comment". You may have missed it because of its being in the second column or maybe is was missing from the older first printing (mine is the "Third, corrected edition". I find the odd ordering of the index annoying ie a b c d e f rather than a d b e c f The columns are toooo far apart for the first ordering to be easy to use. Does anyone LIKE it? Back to comments, I imagine they are missing from the syntax (both EBNF and railroad) because they are not considered a part of the "language" ie they are removed and replaced by white space during lexical analysis and not seen by the parser. -- Terry L Anderson AT&T Bell Laboratories -- Liberty Corners UUCP: ...!ihnp4!daimler!kaiser!tla TeleMail: Terry.Anderson (201) 580-4428