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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Interesting article on ARG work Date: Mon, 9 Apr 2018 19:45:26 +0300 Organization: Tidorum Ltd Message-ID: References: <1b44444f-c1b3-414e-84fb-8798961487c3@googlegroups.com> <62ee0aac-49da-4925-b9aa-a16695b3fc45@googlegroups.com> <9879872e-c18a-4667-afe5-41ce0f54559f@googlegroups.com> <80db2d05-744f-4201-ba1b-4436f8040491@googlegroups.com> <59f9ab6d-d6ba-45ff-a6f0-c5699983d9e8@googlegroups.com> <1a390e22-f49f-4028-8e58-ca4d0f51e4b6@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net OBzFnJhvfV6vmHAK7CvnlA6JfXwPdPRXFRC0xJj8ICIR1IZxOD Cancel-Lock: sha1:M4QD/8sxByFmmeKnCQOQ0PkkeSQ= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: Xref: reader02.eternal-september.org comp.lang.ada:51418 Date: 2018-04-09T19:45:26+03:00 List-Id: On 18-04-09 19:30 , Dmitry A. Kazakov wrote: > On 2018-04-09 18:12, Niklas Holsti wrote: > >> For example, the text >> >> if Foo then >> Bar; >> @ else >> @ Baz; >> end if; >> >> would be parsed in four ways, according to the four combinations of >> choices (enabled/disabled) for the two @ signs: > > [...] > > It is a trivial recursive-descent parser. "else" cannot follow "@", > because there is no statement starting with "else". Full stop. > > You compile all code, always, taking choices at the stage of code > generation. Simple as tooth powder. I was only commenting on the inapplicability of a GLR parser for this problem. You seem to be suggesting a specific way to use "@" to include/exclude entire statements (not text lines) from the effective code. Could you please make your suggestion explicit? For example, with regard to the need (or perhaps not) to have at least a "null;" statement in each branch. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .