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.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, STOX_REPLY_TYPE,TVD_FINGER_02 autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 5b1e799cdb,3ef3e78eacf6f938 X-Google-Attributes: gid5b1e799cdb,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!cyclone01.ams2.highwinds-media.com!news.highwinds-media.com!pe1.news.blueyonder.co.uk!blueyonder!text.news.virginmedia.com!53ab2750!not-for-mail From: "bartc" Newsgroups: comp.lang.eiffel,comp.lang.ada,comp.lang.modula3,comp.lang.pascal.misc,comp.programming References: <4a6a2335.7649091@news.individual.net> In-Reply-To: <4a6a2335.7649091@news.individual.net> Subject: Re: Alternatives to C: ObjectPascal, Eiffel, Ada or Modula-3? MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6000.16480 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16669 Message-ID: Date: Fri, 24 Jul 2009 22:29:35 GMT NNTP-Posting-Host: 82.42.208.18 X-Complaints-To: http://netreport.virginmedia.com X-Trace: text.news.virginmedia.com 1248474575 82.42.208.18 (Fri, 24 Jul 2009 23:29:35 BST) NNTP-Posting-Date: Fri, 24 Jul 2009 23:29:35 BST Xref: g2news2.google.com comp.lang.eiffel:419 comp.lang.ada:7333 comp.lang.modula3:103 comp.lang.pascal.misc:309 comp.programming:12028 Date: 2009-07-24T22:29:35+00:00 List-Id: "Wolfgang Ehrhardt" wrote in message news:4a6a2335.7649091@news.individual.net... > On Fri, 24 Jul 2009 00:26:11 -0700 (PDT), tm > wrote: > >>I once met somebody, who wrote the front end of an Ada compiler, and >>he told me a different story. E.g.: He said that a special function >>needs to read ahead just to find out the semantic of a parenthesis. >>In Pascal such read ahead is not necessary. > > Of course a read ahead is necessary in Pascal (at least in a one-pass > compiler), otherwise the following would give an error: > > procedure test (*comment*) (x: integer); I think Pascal doesn't need lookahead if it's dealing with symbols rather than characters. Even with characters only a single character lookahead is needed. Possibly Ada may need to read multiple symbols ahead. The Pascal design is elegant but I've done parsers where potentially thousands of tokens need to be processed after a parenthesis before it knows exactly what it's dealing with. It's not a problem. -- Bart