comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: gnat compiler hanging
Date: Sat, 26 Aug 2017 00:40:09 -0700 (PDT)
Date: 2017-08-26T00:40:09-07:00	[thread overview]
Message-ID: <204596d8-d925-4642-be20-6a274f1682c8@googlegroups.com> (raw)
In-Reply-To: <ly4lswysae.fsf@pushface.org>

On Friday, August 25, 2017 at 3:18:20 AM UTC-5, Simon Wright wrote:
> Stephen Leake <stephen_leake@stephe-leake.org> 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.


  reply	other threads:[~2017-08-26  7:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24 22:16 gnat compiler hanging Stephen Leake
2017-08-24 22:36 ` Stephen Leake
2017-08-25  8:18   ` Simon Wright
2017-08-26  7:40     ` Stephen Leake [this message]
2017-08-26 21:03 ` Lucretia
2017-08-27  1:49   ` Anh Vo
2017-08-27  5:44     ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox