I get only syntax errors for these expressions on
   JVERSION
Engine: j803/2014-10-19-11:11:11
Library: 8.04.15
Platform: Win 64
Installer: J804 install
InstallPath: e:/users/devonmcc/j64-804
Contact: www.jsoftware.com


On Thu, Dec 6, 2018 at 2:31 PM Ric Sherlock <[email protected]> wrote:

> Hi Ryan,
> I can't reproduce the behaviour you describe. What version are you using?
>    (++
> |syntax error
> |   (++
>    (@
> |syntax error
> |   (@
>    (@:
> |syntax error
> |   (@:
>    (\\.
> |syntax error
> |   (\\.
>    ]a=. 1 + 2
> 3
>    ]a=. (1 + 2
> |syntax error
> |   ]a=:(1+2
>    ]a =. (1 + 2 +
> |syntax error
> |   ]a=:(    1+2+
>    JVERSION
> Engine: j807/j64/linux
> Release: commercial/2018-10-04T15:00:41
> Library: 8.07.20
> Platform: Linux 64
> Installer: J807 install
> InstallPath: /opt/j/j64_807
> Contact: www.jsoftware.com
>
> On Wed, Dec 5, 2018 at 5:50 PM 'Ryan H' via General <[email protected]
> >
> wrote:
>
> > Hi everyone,
> >
> > While randomly entering expressions, I came across strange behavior in
> the
> > parser. An unmatched left parentheses followed by certain parts of speech
> > will not cause a syntax error. Instead, nothing will be printed:
> >
> >    (++             NB. these all print nothing
> >    (@
> >    (@:
> >    (\\.
> >    ]a =.  1 + 2    NB. working correctly
> > 3
> >    ]a =. (1 + 2    NB. prints nothing
> >    ]a =. (1 + 2 +  NB. errors
> > |syntax error
> > |   ]a=:(1+    2+
> >
> > As you can see from the last example, though, syntax errors are still
> > thrown when the expression on the right is invalid. But, if the
> expression
> > on the right is valid, the left parentheses seems to "eat" it and cause
> the
> > whole sentence to do nothing.
> >
> > I don't know the internals of the parser, but the "trace" utility seems
> to
> > confirm that something is wrong here:
> >
> >    trace '(++'
> >  --------------- 6 Bident -----
> >  +
> >  +
> >  + +
> > |assertion failure: parse
> > |       *(mark+cavn,0)bwand>(<1 2;0){stack['stack must be empty or has a
> > single noun, verb, adverb, or conj'
> >
> > I hope this is helpful. J is a great language and I want to see it get
> > even better.
> >
> > Best,
> > Ryan
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm



-- 

Devon McCormick, CFA

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

Reply via email to