A special combination will always include a (possibly invisible) modifier, and is recognized when that modifier is executed (during parsing).

For example,

i.&1@:>

is detected when @: is executed with its u= i.&1 and its v= > .  The values of u and v are inspected.  Seeing that they have the form for an SC, the interpreter alters the routine-address from the normal handler for @:, to proceed instead to the code performing the SC.

Henry Rich

On 7/30/2023 10:13 PM, Ak O wrote:
What system currently governs Syntax Highlighting in the editor?
     By example:
If you start typing  a number you get a certain colour.
If you type a letter you get another colour.

Also, how are Special Combinations currently triggered by the parser?


AO.






On Sun., Jul. 30, 2023, 11:51 Raul Miller, <rauldmil...@gmail.com> wrote:

I see two possible ways to implement this sort of functionality.

(A) Create a duplicate copy of J's parser, which would run in the
highlighting environment, to identify regions corresponding to
"special code", or

(B) Update J itself to provide a "dry run" mechanism to identify these
regions in a potential sentence (if and only if the sentence was
valid, though maybe that could be relaxed to "has a valid suffix").

Neither task is trivial. Either approach would require creating a
well-defined interface for this process.

--
Raul

On Sun, Jul 30, 2023 at 1:41 PM Hauke Rehr <hauke.r...@uni-jena.de> wrote:
my 2 cents

I’m quite satisfied with the highlight I get when
writing J in Vim; and with the highlight I get when
typesetting J in TeX with minted. Neither do custom
handling of Special Combinations, though.

IIRC, Michal rolled his own for his jprez stuff
(editor part).
@Michal: Did you consider highlighting SCs differently?
Any thoughts?

I’d be glad to have a visual indication that would
let me learn to use them without always having to
look them up (I still don’t grok even -:J).

Hauke


Am 30.07.23 um 19:17 schrieb Henry Rich:
What a great idea!  I know nothing about Syntax Highlighting but I
would
love to see it in the display.

There will be a problem keeping the highlighting up to date with the
evolving support for special combinations.

Henry Rich

On 7/30/2023 12:59 PM, Ak O wrote:
Hi all, I hope you are all well.

Two questions.

1. Is there a way to include Special Combinations in Syntax
Highlighting?
Meaning some visual indicator that an arrangement of Operators
triggers a
Special Combination.

2. What page should I be looking up to understand the significance of
Syntax Highlights.
I am not sure what exactly that is called.

For example:
Something(...)          NB. Colour change to 'Something'
Vs.
Something   (...)       NB. No Colour changes to 'Something'

Which page do I find that type of information?


Thank you,

AO.
----------------------------------------------------------------------
For information about J forums see
http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
----------------------
mail written using NEO
neo-layout.org
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

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

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

Reply via email to