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=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 Received: by 10.42.133.135 with SMTP id h7mr10349582ict.4.1320315974423; Thu, 03 Nov 2011 03:26:14 -0700 (PDT) Path: p6ni66054pbn.0!nntp.google.com!news1.google.com!postnews.google.com!x36g2000prb.googlegroups.com!not-for-mail From: Jerry Newsgroups: comp.lang.ada Subject: Re: How does Ada.Text_IO.Enumeration_IO work? Date: Thu, 3 Nov 2011 03:18:59 -0700 (PDT) Organization: http://groups.google.com Message-ID: <2f763bf9-7be8-4c44-9d50-3578d1652c5e@x36g2000prb.googlegroups.com> References: <865d6298-5a0b-45c5-b0fc-372d6222752f@z22g2000prd.googlegroups.com> <6aee33b9-c387-4a5f-a311-f2b3e05fba1c@q13g2000vbd.googlegroups.com> NNTP-Posting-Host: 97.117.196.229 Mime-Version: 1.0 X-Trace: posting.google.com 1320315974 31753 127.0.0.1 (3 Nov 2011 10:26:14 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 3 Nov 2011 10:26:14 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x36g2000prb.googlegroups.com; posting-host=97.117.196.229; posting-account=x5rpZwoAAABMN2XPwcebPWPkebpwQNJG User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HLUARECNK X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4,gzip(gfe) Xref: news1.google.com comp.lang.ada:18800 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2011-11-03T03:18:59-07:00 List-Id: On Nov 3, 2:27=A0am, AdaMagica wrote: > 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 > =A0 =A0Monday, > 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... Actually, the input Monday, is read correctly and the program terminates normally, apparently because it found a correct element before having to deal with the comma. Jerry