On Wed, 2 Dec 2020 at 17:22, Elias Mårtenson <loke...@gmail.com> wrote: > > On Thu, 3 Dec 2020 at 00:41, Jay Foad <jay.f...@gmail.com> wrote: >> >> Great, this sounds like exactly the right thing to do if you're aiming >> for APL2 compatibility. >> >> Dyalog has to jump through some hoops when it parses 2//B, to treat >> the first / as a function but the second / as an operator. APL2's >> parsing rules are much simpler. > > > I'm not sure it has to jump through any hoops. My experimental APL parser > returns the same result as Dyalog, and its parser is probably as simple as it > gets. It's a simple left-to-right recursive descent parser with one token > lookahead. In fact, I think achieving GNU APL's new parsing style would be > much more difficult. > > In GNU APL's case, it's probably the right way to go because APL2 > compatibility is an important feature, but I don't think it's a simpler > approach.
In an APL2 parser the slashes are parsed exactly the same as any other monadic operator like Each. In Dyalog, they're different: they don't parse exactly like monadic operators, or exactly like functions. That's why I say it's a more complicated system. Jay.