p j wrote:
> Another way to describe the process below is scan
> leftward from a conjunction until you reach one of:
...
There is another case, which has to do with
right parenthesis.
> pc =: 2 : '&'
> pv=: 2 : 'smoutput u'
> 2 'n' pc 'n' [EMAIL PROTECTED] pv 'nil'
With redundant parenthesis, this is
2 ('n' pc 'n') (([EMAIL PROTECTED]) pv 'nil')
> The above shows that when N V or V V pattern comes up,
> the verb phrase stops, but hopefully the line below is
> a bug in J:
>
> ('n' pc 'n') [EMAIL PROTECTED] pv 'nil'
>|syntax error
That is not a bug. Conjunctions are resolved from
left to right, and you only get free parenthesis
around a conjunction's right hand noun or verb when
the conjunction itself is derived by another conjunction.
Without any explicit parenthesis, you get the effect
of a parenthesis around ([EMAIL PROTECTED] pv 'nil') because the
parser sees the noun 'n'.
With the parenthesis you've inserted, that's no longer
the case -- the parser sees C V C N (shift) instead of
N V C N (Conj).
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm