From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: LALR parser question
Date: Tue, 30 Apr 2013 20:52:05 +0200
Date: 2013-04-30T20:52:05+02:00 [thread overview]
Message-ID: <op.wwdao3dnule2fv@cardamome> (raw)
In-Reply-To: a4a20b36-421c-4d21-bba8-083ba6371bca@googlegroups.com
Le Tue, 30 Apr 2013 19:51:13 +0200, Shark8 <onewingedshark@gmail.com> a
écrit:
>> I think the parser should read
>> as the humans read, and humans, the most of the time, start looking at
>> 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‑down when he/she know
what he/she is looking for (top‑down for seeking), and bottom‑up when
he/she do not see the big lines and try to figure what he/she is reading
(bottom‑up 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‑up.
That's oversimplified, I know, I just tried to tell my average though.
I have another reason for my preference for bottom‑up, which is for better
error “recovering”. For that matter, I agree with GNAT's authors wording.
--
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University
next prev parent reply other threads:[~2013-04-30 18:52 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-28 13:37 LALR parser question Stephen Leake
2013-04-28 14:43 ` Dmitry A. Kazakov
2013-04-30 1:19 ` Yannick Duchêne (Hibou57)
2013-04-30 2:03 ` John B. Matthews
2013-04-30 4:11 ` Yannick Duchêne (Hibou57)
2013-04-30 11:55 ` Peter C. Chapin
2013-04-30 13:14 ` john
2013-04-30 14:14 ` Dmitry A. Kazakov
2013-05-01 11:33 ` Peter C. Chapin
2013-04-30 16:06 ` Shark8
2013-04-30 17:15 ` Yannick Duchêne (Hibou57)
2013-04-30 17:51 ` Shark8
2013-04-30 18:52 ` Yannick Duchêne (Hibou57) [this message]
2013-05-01 12:31 ` Stephen Leake
2013-05-01 13:57 ` Shark8
2013-04-30 21:18 ` Dmitry A. Kazakov
2013-04-30 22:09 ` Shark8
2013-05-02 1:49 ` Randy Brukardt
2013-05-02 2:39 ` Yannick Duchêne (Hibou57)
2013-05-02 21:57 ` Randy Brukardt
2013-05-06 18:25 ` Oliver Kellogg
2013-05-03 9:45 ` Stephen Leake
2013-05-03 22:57 ` Randy Brukardt
2013-05-06 9:45 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox