So, ok... Adverb *trains* get created by "6 Bident".
Adverb *application* gets handled by "3 Adverb". And, yes, this includes the application of adverb trains. And, yes, the dictionary's coverage of the behavior adverb trains is pretty much just a few examples. And, more generally, error cases can be reimplemented to do something other than produce an error. There's some room for small bits of linguistic drift. That said, there's the question of usefulness. If you defined adverb train behavior such that v (A1 A2) where v A1 produces an adverb to be an adverb result of the form ((v A1) A2), we could do that, and that would prevent the error from being a syntax error. But that would also mean that if someone accidentally wrote (A1 A2) but meant to write something else they would not get an error. But both of those seem to be rather unlikely. So, are there any motivating useful examples which would make this particular change worth including in the official interpreter? (And, yes, that is a really tough question. But I think it's a fair question.) Thanks, -- Raul On Tue, Mar 15, 2016 at 5:42 PM, Thomas Costigliola <[email protected]> wrote: > This is getting off course, but I will try to clarify. Here are the current > parsing rules: > > EDGE VERB NOUN ANY 0 Monad > EDGE+AVN VERB VERB NOUN 1 Monad > EDGE+AVN NOUN VERB NOUN 2 Dyad > EDGE+AVN VERB+NOUN ADV ANY 3 Adverb > EDGE+AVN VERB+NOUN CONJ VERB+NOUN 4 Conj > EDGE+AVN VERB+NOUN VERB VERB 5 Fork > EDGE CAVN CAVN ANY 6 Bident > NAME+NOUN ASGN CAVN ANY 7 Is > LPAR CAVN RPAR ANY 8 Paren > > As I have been saying, there is no additional parsing that takes place for > adverb trains, all that happens is that the rule or "action" in the fourth > row, called "3 Adverb", is applied. That is, the adverb (created from a > train) is applied to it's argument and the result returned. However, I don't > see a precise definition anywhere of what an adverb train does, in the sense > that there is a precise definition of what the adverb / does (I have not > scoured the dictionary for it though, so correct me if I am wrong.) SO, if > you were to re-specify somehow the behavior of adverb trains as it applies > to parsing (I don't see a rule in that table) you could avoid speaking about > what happens in the "action" and explicitly state what happens in the parse > table thus avoiding the current implementations behavior of trying to "apply > an adverb to an adverb". > > One way to do it perhaps is by stating that an adverb train applies its > leading adverb to its argument and places the result back in the queue in > place of the argument while removing the leading adverb from the train and > continues parsing. I think that would result in the behavior that is being > proposed. > > Maybe some other description of the behavior makes it more explicitly > evident that a syntax error should follow. > > But all in all, that description eludes me. > > > On 03/15/2016 05:01 PM, Raul Miller wrote: >> >> I am trying to make sense of this proposal: >> >>> change the parsing rules so that the application of adverb trains >>> are part of parsing and not built in to action "3 Adverb". >> >> What does this even mean? >> >> The "3 Adverb" action is a parsing action. >> >> So it's sort of like you are saying "the application of adverbs should >> not be a part of parsing but should instead be a part of parsing". >> >> But that doesn't make any sense to me. >> >> So, I guess maybe what you are proposing is to get rid of the parser >> described by http://www.jsoftware.com/help/dictionary/dicte.htm and >> replace it with an entirely different parser which works almost >> exactly the same except that it does something different? >> > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
