Re: [fonc] Earley Parsing Explained (incomplete first draft)

2014-09-22 Thread Josh Grams
Ahhh. Now I see. Thanks. So the back-pointers are only really useful if you want the whole forest. As I think you said earlier and I didn't listen. ;) --Josh ___ fonc mailing list fonc@vpri.org http://vpri.org/mailman/listinfo/fonc

Re: [fonc] Earley Parsing Explained (incomplete first draft)

2014-09-21 Thread Loup Vaillant-David
On Sun, Sep 21, 2014 at 04:51:32PM -0400, Josh Grams wrote: > The left back pointers move back through the rule. So a pre-order > traversal will go like this (I'm using tildes because it was > annoying to copy/paste the bullet): > > A -> B C D ~ -- at this step you apply A => B C D. > A -> B C ~

Re: [fonc] Earley Parsing Explained (incomplete first draft)

2014-09-21 Thread Josh Grams
On 2014-09-20 07:59PM, Loup Vaillant-David wrote: >By default, Earley recognisers store their Earley items in such a way >that reconstruction (or back pointer following) happens from right to >left. Which means the first ambiguities will be detected at the *end* >of the parse. But a depth-first t

Re: [fonc] Earley Parsing Explained (incomplete first draft)

2014-09-20 Thread Loup Vaillant-David
On Sat, Sep 20, 2014 at 11:57:58AM -0400, Josh Grams wrote: > On 2014-09-20 02:27PM, Loup Vaillant-David wrote: > >Actually, you don't need the back pointers. Plain Earley items are > >enough. Even better, you don't need all the items. You only need the > >completed ones. > > Sure, it's just a

Re: [fonc] Earley Parsing Explained (incomplete first draft)

2014-09-20 Thread Josh Grams
On 2014-09-20 02:27PM, Loup Vaillant-David wrote: >In any case, they should come soon. First I'll finish the >recogniser (I have to correct the empty rules bug using Aycock & >Horsepool (that's easy), and optimise right recursive rules using >Leo (haven't figured that out yet). Cool. I'll look fo

Re: [fonc] Earley Parsing Explained (incomplete first draft)

2014-09-20 Thread Loup Vaillant-David
On Sat, Sep 20, 2014 at 06:58:14AM -0400, Josh Grams wrote: > How's that for coincidence? I had just finally (on the 18th) got > around to watching Ian's "Trap a Better Mouse" talk and starting > to try it myself, and then saw that you posted this. I've done > some parsing before, so you haven't (y

Re: [fonc] Earley Parsing Explained (incomplete first draft)

2014-09-20 Thread Josh Grams
On 2014-09-20 06:58AM, Josh Grams wrote: >Mainly the recognizer. Did you figure that out? I think the >important insight is that matches added by scanning and completion >operations represent a (partial) derivation step. Gah. Not scanning. What am I saying? Only completion. The completion operatio

Re: [fonc] Earley Parsing Explained (incomplete first draft)

2014-09-20 Thread Josh Grams
How's that for coincidence? I had just finally (on the 18th) got around to watching Ian's "Trap a Better Mouse" talk and starting to try it myself, and then saw that you posted this. I've done some parsing before, so you haven't (yet) covered any of the parts that I had trouble understanding. I *th

Re: [fonc] Earley Parsing Explained (incomplete first draft)

2014-09-18 Thread Julian Leviston
On 19 Sep 2014, at 7:11 am, Loup Vaillant-David wrote: > Hi, > > After spending months banging my head over Earley Parsing, I have > decided to write a tutorial. Ian once said Earley parsing is simple > and easy to implement. I agree with "simple", but not with "easy". > The required backgroun

[fonc] Earley Parsing Explained (incomplete first draft)

2014-09-18 Thread Loup Vaillant-David
Hi, After spending months banging my head over Earley Parsing, I have decided to write a tutorial. Ian once said Earley parsing is simple and easy to implement. I agree with "simple", but not with "easy". The required background knowledge is not trivial. This tutorial is an attempt to gather th