Here's a more concise explanation:

In http://www.jsoftware.com/help/dictionary/dicte.htm the phrase "and
eventually executing some eligible portion of the stack and replacing
it by the result of the execution" describes the same thing that
"reduce" describes what "reduce" would be in a shift-reduce parser
explanation.  Basically, that "reduce" might also be described as "a
step of evaluation".

"Shifting", on the other hand, is taking another token (or word) from
the parsing queue - that's another kind of evaluation step, but it
doesn't reduce the number of items in the parse representation.

But it really helps if you see it in action - it's such a simple
concept that it's slippery to think about if you never see it
happening.

(Perhaps also worth noting that verb definitions are only extracted
from their name during J's "parser reduce" steps while other named
entities have their names extracted from their names during J's
"parser shift"? This is an important distinction because of how
locales are implemented, and it's also why undefined names are treated
like verbs in tacit definitions, That said, note that names are not
always undefined and this can be a source of confusion when using a
script with forward verb references.)

Thanks,

-- 
Raul
On Wed, Dec 12, 2018 at 11:18 AM Raul Miller <[email protected]> wrote:
>
> These look like decent explanations:
>
> http://www.cs.binghamton.edu/~zdu/parsdemo/srintro.html
>
> or, if you prefer a video presentation:
>
> https://www.youtube.com/watch?v=Ga9b_E85Lwc
>
> Mind you, the examples are for parsers left-to-right parsers
> (indicated by LR in the alphabet soup used to label the things), while
> J's parser is a right-to-left parser (which would probably be labeled
> by RL along with some other bits of alphabet soup to describe the four
> token pattern matching that it uses to decide what reduce action to
> take).
>
> Thanks,
>
> --
> Raul
>
> On Wed, Dec 12, 2018 at 10:55 AM Jose Mario Quintana
> <[email protected]> wrote:
> >
> > Why?  Can you elaborate?
> >
> > On Wed, Dec 12, 2018 at 10:07 AM Raul Miller <[email protected]> wrote:
> >
> > > Yes.
> > >
> > > Thanks,
> > >
> > > —
> > > Raul
> > >
> > >
> > > On Tuesday, December 11, 2018, Jose Mario Quintana <
> > > [email protected]> wrote:
> > >
> > > > It seems to be just academic now.  Nevertheless, does your 
> > > > interpretation
> > > > imply that,
> > > >
> > > >    5"
> > > > 5"
> > > >
> > > > is not "reduced" but,
> > > >
> > > >    5}
> > > > 5}
> > > >
> > > > is "reduced" in the context of shift-reduce parsers?
> > > >
> > > >
> > > > On Mon, Dec 10, 2018 at 10:43 AM Raul Miller <[email protected]>
> > > > wrote:
> > > >
> > > > > On Fri, Dec 7, 2018 at 7:53 PM Henry Rich <[email protected]>
> > > wrote:
> > > > > > What Ken meant by "resolve" is not clear to me.
> > > > >
> > > > > I expect he meant what people working with shift-reduce parsers would
> > > > > call "reduce". (But Ken would not be inclined to call it that, I
> > > > > imagine, because reduce was a similar/different well defined APL
> > > > > operation.)
> > > > >
> > > > > Thanks,
> > > > >
> > > > > --
> > > > > Raul
> > > > > ----------------------------------------------------------------------
> > > > > For information about J forums see http://www.jsoftware.com/forums.htm
> > > > ----------------------------------------------------------------------
> > > > For information about J forums see http://www.jsoftware.com/forums.htm
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to