Ambrus and I were just having a discussion in IRC.  Can someone describe to me 
how special code support is implemented in the interpreter?  

In particular, at what point is special code recognized?  I thought the parser 
only looked at the top 4 tokens on the stack.  If they matched a production 
rule, they're executed to produce the proper part of speech.

If that's so, then how are special sequences longer than 4 tokens recognized?  
For example, http://www.jsoftware.com/help/dictionary/special.htm  lists:

   ;@:(<@u;.n)

which, even if  u  were a single token, is longer than 4 tokens.  Another 
obvious example is  

   ([: f g h i j k l m n o ....)

that's got "special code", too.

Can any train at all be given "special semantics"?  In particular, I'm thinking 
of juxtaposed nouns.  Could this "special sequence recognizer" be leveraged to 
assign meaning to 

   1 2 3 'hi there' a: 'these are juxtaposed nouns'

without requiring unbounded (infinite) lookahead in the interpreter?  

I'm not requesting juxtaposed nouns as a feature, I'm wondering if it's 
technically feasible.  And if not, what is the difference between the cases of 
recognizing special code and juxtaposed nouns?

-Dan

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to