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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,c689b55786a9f2bd X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!feeder.news-service.com!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: for S'Image use Func?? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4be417b4$0$6992$9b4e6d93@newsspool4.arcor-online.net> <1qcb6z4i20dyb.1dz2hd4c0vx69.dlg@40tude.net> Date: Tue, 11 May 2010 18:59:51 +0200 Message-ID: <1nasjrt7bl8zk.1iwj0omqmovss$.dlg@40tude.net> NNTP-Posting-Date: 11 May 2010 18:59:48 CEST NNTP-Posting-Host: f8a27047.newsspool2.arcor-online.net X-Trace: DXC=895KC6iZ]763A9EHlD;3Yc24Fo<]lROoR18kFCOgUkn_?_Y?ek]<0mGF5o3E]S`O^^4>;7 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:11509 Date: 2010-05-11T18:59:48+02:00 List-Id: On Tue, 11 May 2010 17:23:44 +0200, Yannick Duch�ne (Hibou57) wrote: > Le Tue, 11 May 2010 10:26:02 +0200, Dmitry A. Kazakov > a �crit: >>> But you have no way to know when you've read >>> a empty line in a lexer routine that is reading >>> character by character. >> >> A lexer routine shall never do that. You either read lines and then parse >> them, or else you do stream input and the line end is to be determined by >> the lexer (i.e. by the language being parsed). > With all due respect, really don't agree with that. A lexer is not > required to be line oriented. Most languages I know are line oriented. Ada is, C++ is. Even bash is. If the language had no lines, no comments like //, ignored LF, how would you report errors? As numbers of Unicode code points from the beginning of the source file? BTW, a pure stream lacks not only EOL, but also EOF. So a truly stream-oriented program must be infinite. (:-)) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de