From: Simon Wright <simon@pushface.org>
Subject: Re: gnat compiler hanging
Date: Fri, 25 Aug 2017 09:18:17 +0100
Date: 2017-08-25T09:18:17+01:00 [thread overview]
Message-ID: <ly4lswysae.fsf@pushface.org> (raw)
In-Reply-To: c1766fc5-f9ab-423e-ba5c-6a6f50f75fe3@googlegroups.com
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)
next prev parent reply other threads:[~2017-08-25 8:18 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 [this message]
2017-08-26 7:40 ` Stephen Leake
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