On Tue, Jan 12, 2010 at 5:49 PM, Sherlock, Ric
<[email protected]> wrote:
> I am working with the maintainer of GeSHi (syntax highlighter used on Rosetta 
> Code) to improve support for J.
>
> As part of that process I'm seeking clarification of the role of the fullstop 
> character (.) as it appears in J words, eg:  (do.) (for.) (p.) (p..) (*.) (.) 
> (.:) (..)
>
> Is the fullstop
>  A) a symbol to control language flow,
>  B) an integral part of the word,
>  C) some other better description?
>
> Or slightly differently:
> Is the fullstop
>  A) syntax/punctuation,
>  B) spelling,
>  C) sometimes one, sometimes the other?

The easy answer to the question of "how does J form words" involves
passing the string in question to ;:

    ;: 'do. for. p. p.. *. . .: ..'
+---+----+--+---+--+-+--+--+
|do.|for.|p.|p..|*.|.|.:|..|
+---+----+--+---+--+-+--+--+

Personally, I would classify . in tokens pretty much
the same way I would classify it in numbers.   Except,
of course, numbers typically continue on when other
kinds of words would end.

-- 
Raul

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

Reply via email to