I would like to throw the discussion open to ways to generalize FSM,
perhaps by invoking a user-defined emit verb.
Henry Rich
On 3/23/2017 5:10 PM, 'Pascal Jasmin' via Programming wrote:
I understand that current behaviour is to crash with index error if an ew
action is invoked while j=_1
It would actually be extremely convenient to emit an empty box (word) instead.
I'm unsure that a crash is helpful.
One use case is splitting words by parentheses groups (without the outter
parentheses), such that only odd indexes are paren groups. The workaround is
to append an empty box if leading char is (, and to replace ')(' (consecutive
close then open) strings with a sequence of nulls long enough to not have
likely occurred with natural probability.
setting j=0 on start is not allowed, because it must be smaller than i.
ew on first char ( (empty word) would work well. Because I wish to discard
closing ), ew on immediately following ( (again empty word) with a (
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm