Thank you but it's still confusing. 2007/1/19, bill lam <[EMAIL PROTECTED]>:
afaiu, "the first four elements " should be read as "at most" 4 elements,
Then what is the minimum number of elements to match? I'll use vertical bar(|) to denote the boundary between the queue and the stack, as in the dictionary section E.
MARK NAME ASGN VERB ADV VERB VERB ADV
MARK NAME ASGN VERB ADV | VERB VERB ADV Now apply pattern "3 Adverb"? It's EDGE+AVN VERB+NOUN ADV ANY 3 Adverb There are only 3 elements in the stack, but somehow it's applied as you suggested. (maybe ANY could be the "bottom of the stack"?)
reduce to (adverb) MARK NAME ASGN VERB ADV VERB VERB1
When do we match the patterns? MARK NAME ASGN VERB ADV | VERB VERB1 MARK NAME ASGN VERB | ADV VERB VERB1 MARK NAME ASGN | VERB ADV VERB VERB1 MARK NAME | ASGN VERB ADV VERB VERB1 It seems like I have to assume the last is the case. (3 Adverb pattern)
reduce to (adverb) MARK NAME ASGN VERB2 VERB VERB1
MARK NAME | ASGN VERB2 VERB VERB1 It's obvious that 5 Trident pattern is applied.
reduce to (trident) MARK NAME ASGN VERB3
MARK NAME | ASGN VERB3 MARK | NAME ASGN VERB3 When are the patterns matched? I think I should suppose the last. However, there are only 3 elements and "7 Is" pattern has 4 elements(the last term being ANY). If I assume: * "bottom of the stack"(nothing) is considered as one element and belongs to the ANY class and to no other classes. * the patterns are checked when there are at least four elements in the stack * when checked, the patterns are scanned through to match with the top four elements Then I can understand the mechanism(even in the case of "- 1"). Are those right?
June Kim wrote: > At the near bottom of E. Parsing and Execution at > system\extras\help\dictionary\dicte.htm , there is the precise rule > for parsing and execution for J sentences. > > However, I don't understand its effects when applied to the following > sentence. > > f=: >./ , <./ > > The classes are, > > MARK NAME ASGN VERB ADV VERB VERB ADV > > The stack just adds up and does nothing until four elements are filled > in. After that, the first four elements of the stack(A V V A) should > match one of the patterns. Which one? > > What happens when the sentence is simply "- 1"? There won't be four > elements to match. Which patterns are applied in sequence? > > Could anyone help me understanding it? > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- regards, bill ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
