> From: Dan Bron
> 
> 
> My gut says that the role of  .  in control words is different and more
> akin to (A), but I don't know if I could support such an argument.  But
> I do know that if I were writing a J interpreter, I would have separate
> rules for primaries and control words.  In broad strokes, something
> like
> 
>     primitive =: '[:graphic:]|([:graphic:]|[:alphanum:][.:]+)'
>     control_word =:  '[:alpha:]{2,}\.'
> 
> The latter could have been rendered '[:alpha:][:alpha:]+\.' But the key
> thing is that control words have 2 or more chars before the inflexion,
> and anything with a single char and and inflexion is a primary by
> definition (and of course primaries can be uninflected or inflected
> differently (using colon or multiple inflections), and control words
> are only recognized by the explicit interpreter, always end only with a
> single .  , are always lowercase except for user-defined parts of them,
> etc etc etc).  

Note that although there are currently no such primitives, the dictionary 
doesn't preclude primitives from having more than one character before the 
inflection, so I'm not sure that the distinction noted above between control 
words and primitives should be relied upon:

Names (used for pronouns and other surrogates, 
and assigned referents by the copula, as in 
prices=: 4.5 12) begin with a letter and may 
continue with letters, underlines, and digits.

A primary may also be an inflected name, as 
in e. and o. for membership and pi times.

http://www.jsoftware.com/help/dictionary/dict1.htm

In fact by that definition perhaps Control words are just a special case of 
primitive that are treated as punctuation in an explicit definition?

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

Reply via email to