Parsing: top-down versus bottom-up

17 views
Skip to first unread message

coughl...@gmail.com

unread,
Nov 20, 2014, 2:38:13 PM11/20/14
to marpa-...@googlegroups.com
i read most of the articles you write about Marpa, although i have never actually used it.  i find your articles to be interesting and informative.

regarding your most recent article "Parsing: top-down versus bottom-up" http://blogs.perl.org/users/jeffrey_kegler/2014/11/parsing-top-down-versus-bottom-up.html,
paragraph 12 isn't english:

Simplistically, Knuth's suggestion was, instead of fully deciding the parse at every location, to create what I will call "subparses" -- pieces that embody partial decisions about the parse, which are intended to be assembled later into a larger subparses, and eventually into a full parse tree.

you lead us to believe you're going to tell us what Knuth's suggestion is, but unfortunately, you travel down a few sidestreets and never arrive.

--jake, who does not follow this Google group at all and will not see any replies...

Jeffrey Kegler

unread,
Nov 21, 2014, 5:51:32 PM11/21/14
to Marpa Parser Mailing LIst
Thanks for your interest.  You might want to read my posts on their home site.  The one we're discussing is http://jeffreykegler.github.io/Ocean-of-Awareness-blog/individual/2014/11/ll.html

The rest of that is devoted to describing Knuth's LR parsing and its direct offshoot in LALR.  Perhaps the "non-arrival" you feel is that I do *not* go into enough detail to explain how to implement an LR parser.  In particular, implementation-oriented discussions are 95% about "find the handle", and I don't even introduce the idea of what a handle is. Most discussions zoom in on this particular tree and IMHO lose the particular angle on the forest that I was trying to present.

If the issue is that you really want more detail to be comfortable with the presentation, the Web and the literature abound with careful presentation of how to write LR and LALR parsers.  The Wikipedia page I linked to is one of many places to start.

I'm not sure this answers your question, but I hope it helps.  I'm assuming somehow you'll see this reply -- the group is public, so (I believe) you don't have to sign up to read it.

-- jeffrey

--
You received this message because you are subscribed to the Google Groups "marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aristotle Pagaltzis

unread,
Nov 23, 2014, 10:38:36 AM11/23/14
to marpa-...@googlegroups.com
Hi coughlin.jake,

* coughl...@gmail.com <coughl...@gmail.com> [2014-11-21 21:10]:
> paragraph 12 isn't english:
>
> Simplistically, Knuth's suggestion was, instead of fully deciding the
> parse at every location, to create what I will call "subparses" --
> pieces that embody partial decisions about the parse, which are
> intended to be assembled later into a larger subparses, and
> eventually into a full parse tree.
>
> you lead us to believe you're going to tell us what Knuth's suggestion
> is, but unfortunately, you travel down a few sidestreets and never
> arrive.

it reads perfectly grammatical to me, but maybe to a reader not already
familiar with bottom-up parsing it is not clear at which point Jeffrey
merges from the sidestreet back onto the main road.

Let me try to copy-edit a little:

Simplistically, Knuth's suggestion was to create what I will call
"subparses": instead of fully deciding the parse at every location,
the parser should accumulate pieces that embody partial decisions
about the parse, which are intended to be assembled into larger
subparses later, repeatedly, culminating in a full parse tree.

Does this help?

Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>

Jeffrey Kegler

unread,
Nov 23, 2014, 11:25:40 AM11/23/14
to Marpa Parser Mailing LIst
@Aristotle, thanks again.

As far as my sentence being English or not, there a French saying: ce qui n'est pas clair n'est pas français, “that which is not clear is not French”.  And my sentence was certainly no model of clarity.

I decided that even those who understood me would appreciate better writing, so I rewrote that sentence in the original post.

uto...@gmail.com

unread,
Nov 24, 2014, 10:03:36 AM11/24/14
to marpa-...@googlegroups.com
I too enjoyed your recent article "Parsing: top-down versus bottom-up" http://blogs.perl.org/users/jeffrey_kegler/2014/11/parsing-top-down-versus-bottom-up.html
Just wanted to point out the last link in the article body is broken.

Jeffrey Kegler

unread,
Nov 24, 2014, 10:30:03 AM11/24/14
to Marpa Parser Mailing LIst
@utoddl: Thanks.  I went back and fixed blogs.perl.org, as well as the home site.  Caught some other typos, while I was at it.

On Mon, Nov 24, 2014 at 7:03 AM, <uto...@gmail.com> wrote:
I too enjoyed your recent article "Parsing: top-down versus bottom-up" http://blogs.perl.org/users/jeffrey_kegler/2014/11/parsing-top-down-versus-bottom-up.html
Just wanted to point out the last link in the article body is broken.

--
Reply all
Reply to author
Forward
0 new messages