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 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.183.10.133 with SMTP id ea5mr25081259obd.24.1409768891431; Wed, 03 Sep 2014 11:28:11 -0700 (PDT) Path: buffer2.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!uq10no9032847igb.0!news-out.google.com!aw9ni10257igc.0!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 03 Sep 2014 13:28:11 -0500 Date: Wed, 03 Sep 2014 14:28:07 -0400 From: Peter Chapin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Is there a way to do large block of source code comments 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> In-Reply-To: Message-ID: X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-bHwwhcd0s2PpF4/iD2/fSXOEJfWyNpVIDA1kBsyuLIH/Wh3QG+e4cyNytFwzRsvF1/OlMgKYWrcyDdu!LAUiZV4JdHd9EOd1SZB+RHcRXwso1kW5JvAAH+h58jA4oNw6rQVzk6GRQ9w5QmE= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2523 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Xref: number.nntp.dca.giganews.com comp.lang.ada:188838 Date: 2014-09-03T14:28:07-04:00 List-Id: On 2014-09-03 13:48, Georg Bauhaus wrote: > It is standard practice in original SPARK, Java, and eLisp > to parse "comment sections". Also, languages such as Python > and Ruby parse commenting strings, similar to format strings. > > They know the value of giving comments language status. In SPARK 2005 only special comments starting with --# where processed by the SPARK tools and they had a very tightly controlled syntax. Completely general comments starting with -- were still ignored. The tricky part about parsing comments is that comments are intended to be completely general and could contain arbitrary "line noise" for all the compiler knows. Looking for too much structure in a general comment could be problematic. That said it doesn't seem impossibly difficult or awkward to scan comments for sequences like "*/" or "*)" etc. I'm not sure I'd call that "parsing" exactly but that's perhaps just a matter of definition. Peter