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.101.90.203 with SMTP id d11mr710112pgt.105.1503733212756; Sat, 26 Aug 2017 00:40:12 -0700 (PDT) X-Received: by 10.36.110.208 with SMTP id w199mr38048itc.1.1503733209542; Sat, 26 Aug 2017 00:40:09 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.unit0.net!peer01.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!y192no464884itb.0!news-out.google.com!191ni806itx.0!nntp.google.com!y192no464880itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 26 Aug 2017 00:40:09 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.218.37.33; posting-account=W2gdXQoAAADxIuhBWhPFjUps3wUp4RhQ NNTP-Posting-Host: 76.218.37.33 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <204596d8-d925-4642-be20-6a274f1682c8@googlegroups.com> Subject: Re: gnat compiler hanging From: Stephen Leake Injection-Date: Sat, 26 Aug 2017 07:40:12 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Body-CRC: 3456836858 X-Received-Bytes: 2672 Xref: news.eternal-september.org comp.lang.ada:47812 Date: 2017-08-26T00:40:09-07:00 List-Id: On Friday, August 25, 2017 at 3:18:20 AM UTC-5, Simon Wright wrote: > Stephen Leake writes: > > > On Thursday, August 24, 2017 at 5:16:10 PM UTC-5, Stephen Leake wrote: > >> I've got a file, which is probably bad Ada, that causes the gnat > >> compiler to hang (or at least, take _much_ longer than normal for > >> this file). > [...] > > > > I found the problem, and a workaround: > > > > -- WORKAROUND: GNAT GPL 2016 compiler hangs on this: > > -- for Pattern of Table.McKenzie.Patterns loop > > -- Indent_Line ("Table.Mckenzie.patterns.Append (" & Pattern.Image & ");"); > > -- end loop; > > declare > > use WisiToken.Parser.LR.Patterns; > > I : Cursor := Table.McKenzie.Patterns.First; > > begin > > loop > > exit when I = No_Element; > > Indent_Line > > ("Table.Mckenzie.patterns.Append (" & Element (I).Image & ");"); > > Next (I); > > end loop; > > end; > > Could you have used the generalized iterator? > > for I in Table.McKenzie.Patterns.Iterate loop > Indent_Line > ("Table.Mckenzie.patterns.Append (" > & Table.Mckenzie.patterns.Element (I).Image > & ");"); > end loop; > > (not syntax-checked, of course) That gave the same symptom.