Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!clyde!cbatt!ucbvax!renoir.Berkeley.EDU!farnum From: farnum@renoir.Berkeley.EDU (Charles D. Farnum) Newsgroups: comp.lang.modula2 Subject: Re: FYI: M2 Comments Message-ID: <17769@ucbvax.BERKELEY.EDU> Date: Tue, 10-Mar-87 13:46:54 EST Article-I.D.: ucbvax.17769 Posted: Tue Mar 10 13:46:54 1987 Date-Received: Wed, 11-Mar-87 05:10:05 EST References: <8703101615.AA14931@frey.olsen.uucp> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: farnum@renoir.Berkeley.EDU (Charles D. Farnum) Distribution: world Organization: University of California, Berkeley Lines: 19 In article <8703101615.AA14931@frey.olsen.uucp> nagler@seismo.CSS.GOV@olsen.UUCP (Robert Nagler) writes: >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. You'll also notice that spaces, tabs, and newlines aren't included in the syntax descriptions. Doing so would be very tedious --- a comment can appear between any two symbols of the program. Some heirarchy is generally imposed to keep things manageable, both in the descriptions and in compilers; at the syntactic level, details concerning the composition of individual tokens and whitespace (blanks, tabs, newlines, comments, etc) are generally ignored, having already been covered in some lexical description. Wirth does include the spelling of numeric constants and identifiers in his ``syntax description'', but this is not normal. The definition of comments, including the fact that they nest, is in section 3, part 5 of the Report (bottom of page 145 in the 3rd edition of PIM-2). /charlie