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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,50e705cdf2767cc6 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Parser interface design Date: Fri, 08 Apr 2011 20:59:14 +0100 Organization: A noiseless patient Spider Message-ID: References: <4d9c8c19$0$6769$9b4e6d93@newsspool3.arcor-online.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="17470"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+dVScV5IS6vBgc6B97KCuD+YcPw2vzZp8=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:YqNXa7Y8h9CuADD2spaFjnSPBJA= sha1:XjjGdoNrjzE8kE5oLmtkGw3R63U= Xref: g2news2.google.com comp.lang.ada:19697 Date: 2011-04-08T20:59:14+01:00 List-Id: Natasha Kerensikova writes: >> Don't see what's wrong with providing a No_Op function which returns its >> input unchanged? unless you do something specific for a null? > > Yes, as I said in my reply to Dmitry, I thought of disabling in the > parser the feature associated to a callback set to null. In the > "foo *bar* baz" example I provided, using a No_Op for Emphasis would > result in "

foo baz

", while disabling the emphasis feature means > considering the star as an inactive character, resulting in > "

foo *bar* baz

". I had in mind more that using my No_Op (I think it was Georg who used the better name Identity) would result in "

foo bar baz

". In other words, HTML.Emphasize ("bar") would return "bar", but No_Op ("bar") would just return "bar".