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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,64d33c985c8959f0 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.73.233 with SMTP id o9mr6356700pbv.8.1320312431279; Thu, 03 Nov 2011 02:27:11 -0700 (PDT) Path: p6ni65900pbn.0!nntp.google.com!news2.google.com!postnews.google.com!q13g2000vbd.googlegroups.com!not-for-mail From: AdaMagica Newsgroups: comp.lang.ada Subject: Re: How does Ada.Text_IO.Enumeration_IO work? Date: Thu, 3 Nov 2011 02:27:10 -0700 (PDT) Organization: http://groups.google.com Message-ID: <6aee33b9-c387-4a5f-a311-f2b3e05fba1c@q13g2000vbd.googlegroups.com> References: <865d6298-5a0b-45c5-b0fc-372d6222752f@z22g2000prd.googlegroups.com> NNTP-Posting-Host: 91.7.65.104 Mime-Version: 1.0 X-Trace: posting.google.com 1320312431 28203 127.0.0.1 (3 Nov 2011 09:27:11 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 3 Nov 2011 09:27:11 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q13g2000vbd.googlegroups.com; posting-host=91.7.65.104; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.0; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,gzip(gfe) Xref: news2.google.com comp.lang.ada:14284 Content-Type: text/plain; charset=ISO-8859-1 Date: 2011-11-03T02:27:10-07:00 List-Id: A.10.10(8) ...reads an identifier according to the syntax of this lexical element... This means that reading stops as soon as a character is met that does not belong to the syntax of enumerations. This means that reading must use a look ahead. Otherwise it could not successfully read an input string like Monday, Here, reading stops after the character y, leaving the comma in the input stream. Thus in your loop, after having read and output Monday, reading begins with the comma and immediately stops again, raising the exception, ad infinitum...