From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.245.134 with SMTP id xo6mr24259388obc.40.1409770378496; Wed, 03 Sep 2014 11:52:58 -0700 (PDT) X-Received: by 10.50.66.135 with SMTP id f7mr11682igt.3.1409770378379; Wed, 03 Sep 2014 11:52:58 -0700 (PDT) Path: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!r2no13740034igi.0!news-out.google.com!aw9ni0igc.0!nntp.google.com!uq10no9047157igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 3 Sep 2014 11:52:57 -0700 (PDT) In-Reply-To: <1409759532.7121.252.camel@obry.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=KSa2aQoAAACOxnC0usBJYX8NE3x3a1Xq NNTP-Posting-Host: 66.126.103.122 References: <8fd27434-43c2-4bd1-b72b-dd7a0ef5af75@googlegroups.com> <4407fc6e-a3a6-47d6-8f49-a5a0a1e8e0c4@googlegroups.com> <1409734659.7121.231.camel@obry.net> <1409759532.7121.252.camel@obry.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <766dc3c7-916b-488c-813c-8aee8b05ca0f@googlegroups.com> Subject: Re: Is there a way to do large block of source code comments From: Adam Beneschan Injection-Date: Wed, 03 Sep 2014 18:52:58 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: number.nntp.dca.giganews.com comp.lang.ada:188839 Date: 2014-09-03T11:52:57-07:00 List-Id: On Wednesday, September 3, 2014 8:52:12 AM UTC-7, Pascal Obry wrote: > > That posting quoted my suggestion to introduce block comments where the= =20 > > opening bracket inside a block comment is plainly prohibited. I.e., the= =20 > > compiler would reject your above example with a syntax error in line 3. >=20 > Parsing a comment section???? Strange idea, I doubt this is reasonable.= =20 I don't see why not. The language designers would have to come up with som= e simple rules, but this isn't hard: The sequence (*, if not in a conventional comment, starts a block comment. = The comment ends with the next occurrence of the sequence *) that is not i= n a conventional comment. Within a block comment, it is illegal for the se= quence (* to appear except in a conventional comment. A character sequence= is "in a conventional comment" if it occurs anywhere between the sequence = -- and the nearest subsequent end-of-line character.=20 Maybe that's not exactly how it would be worded, but this rule would be cle= ar and unambiguous, and it would be simple to implement. Not that I'm saying it's a good idea. I don't want to see this feature add= ed to Ada. -- Adam