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: a07f3367d7,4fd338e56f592cfb X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 X-Received: by 10.180.12.200 with SMTP id a8mr2935049wic.1.1367665876242; Sat, 04 May 2013 04:11:16 -0700 (PDT) Path: p18ni66813wiv.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.83.MISMATCH!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!backlog2.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!nrc-news.nrc.ca!News.Dal.Ca!news.litech.org!news.stack.nl!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: LALR parser question Date: Tue, 30 Apr 2013 20:52:05 +0200 Organization: Ada @ Home Message-ID: References: <85sj2aydwi.fsf@stephe-leake.org> NNTP-Posting-Host: gFlCVqYhFMvL17n7JqXJeg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.15 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 2641 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2013-04-30T20:52:05+02:00 List-Id: Le Tue, 30 Apr 2013 19:51:13 +0200, Shark8 a = = =C3=A9crit: >> I think the parser should read >> as the humans read, and humans, the most of the time, start looking a= t = >> the >> tiny parts (the bottom) and goes bottom-up, and just occasionally go >> top-down, and so just when there is a clear marker for this, like a >> heading title in a text as an example and any other marker which only= >> appears at the top of a construct. > > Really, I thought they read in a more top-down manner, with perhaps = > things front-loaded [i.e. forward-declared] as in sections and a TOC. To be more precise I would say the reader go top=E2=80=91down when he/sh= e know = what he/she is looking for (top=E2=80=91down for seeking), and bottom=E2= =80=91up when = he/she do not see the big lines and try to figure what he/she is reading= = (bottom=E2=80=91up for figuring); as the latter is the case of each new = things, = which in turn is the case when parsing something, I am favouring bottom=E2= =80=91up. That's oversimplified, I know, I just tried to tell my average though. I have another reason for my preference for bottom=E2=80=91up, which is = for better = error =E2=80=9Crecovering=E2=80=9D. For that matter, I agree with GNAT's= authors wording. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity