I wrote that sentence before I added the 5!:6 content to the message,
and I didn't think to rebuild it afterwards, even though the
parenthesis in the 5!:6 result sufficiently illustrate that aspect of
the grammar (and do a better job of describing that aspect than that
"grammar rules" quip).
Also, I guess the relevance which I was trying to raise was the
semantics which are a consequence of applying the grammar rules,
rather than the syntax of the grammar rules. (Being computer
programmers we probably think of grammar as purely syntactic, but in
the english language, grammar is also about the many definitions of
our small joining words, since that's what we use to organize the
reconstruction of meaning(s) from a sentence.)
But, let's run through this again, just in case. These are equivalent:
(-.&;:)&'-' 'start-A'
'start-A' (-.&;:) '-' NB. bond
(;:'start-A') -. (;:'-') NB. compose
('start';(,'-');,'A') -. ,<,'-' NB. words
'start';,'A' NB. less
Dictionary references:
bond jsoftware.com/help/dictionary/d630n.htm
compose jsoftware.com/help/dictionary/d630v.htm
words jsoftware.com/help/dictionary/d332.htm
less jsoftware.com/help/dictionary/d121.htm
I hope I am making sense...
--
Raul
On Sun, Jan 2, 2022 at 4:01 PM Brian Schott <[email protected]> wrote:
>
> Raul,
>
> Thanks for the explanation.
>
> But you do not explicitly clarify in the following how the grammar rules do
> the expansion.
>
> ************unexplained part below**************
> But let's break this down formally. The sentence in question is formed
> using conjunctions.
>
> In other words, we could expand it using J's grammar rules to this:
> (;: 7{.S) -. ;:'-'
>
> or, this:
>
> (;:'start-A') -. ;:'-'
> ************unexplained part above**************
>
> I got a little further with the following, but even `trace` skips over the
> same *LAST* part where the primitive Less (-.) miraculously gets between
> the other 2 pieces in your final step. So what is that final parsing rule,
> please?
>
> trace'(-.&;:)&''-'' ''start-A'''
> --------------- 4 Conj -------
> -.
> &
> ;:
> -.&;:
> --------------- 8 Paren ------
> (
> -.&;:
> )
> -.&;:
> --------------- 4 Conj -------
> -.&;:
> &
> '-'
> -.&;:&'-'
> --------------- 0 Monad ------
> -.&;:&'-'
> 'start-A'
> ┌─────┬─┐
> │start│A│
> └─────┴─┘
> ==============================
> ┌─────┬─┐
> │start│A│
> └─────┴─┘
>
>
>
>
>
>
>
> On Sun, Jan 2, 2022 at 2:53 PM Raul Miller <[email protected]> wrote:
> [snip]
>
> >
> > But let's break this down formally. The sentence in question is formed
> > using conjunctions.
> >
> > In other words, we could expand it using J's grammar rules to this:
> > (;: 7{.S) -. ;:'-'
> >
> > or, this:
> >
> > (;:'start-A') -. ;:'-'
> > +-----+-+
> > |start|A|
> > +-----+-+
> >
> > [snip]
>
> >
> > Thanks for the question,
> >
> > --
> > Raul
> >
> > --
> (B=)
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm