comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: LALR parser question
Date: Tue, 30 Apr 2013 15:09:03 -0700 (PDT)
Date: 2013-04-30T15:09:03-07:00	[thread overview]
Message-ID: <c77d95bb-bdd8-4e71-8164-e91472e72d32@googlegroups.com> (raw)
In-Reply-To: <nvdeh8sgvzht$.10jzjery3u3v$.dlg@40tude.net>

On Tuesday, April 30, 2013 3:18:56 PM UTC-6, Dmitry A. Kazakov wrote:
> On Tue, 30 Apr 2013 09:06:53 -0700 (PDT), Shark8 wrote:
> 
> 
> The way humans parse texts and consequently grammars of programming are
> uncorrelated to the classes of formal grammars.

That's part of why they're interesting.

> This is why formal grammars proved to be quite useless for compiler construction.

They're not the only thing that could be defined to be parsed w/ a grammar though -- a configuration formulation, or a DB-dump, or as part of a distributed system's serialize/deserialize specification could all benefit from being defined in a formal grammar (as opposed to an ad-hoc/"grown" method).

> Practically there is no language for which recursive descent parser would not work, provided that literals, identifiers and expressions are parsed by other means.

Perhaps; but this doesn't mean that recursive-decent is the best in every situation. After all, just because there is no collection of sortable items that can't be sorted via Bubblesort doesn't mean that that's the suitable method for the problem.

> Specifically, parsing Ada imposes no problems at all.

*nod* -- I didn't think there was. I was talking more on the general subject.



  reply	other threads:[~2013-04-30 22:09 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)
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 [this message]
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