[Haskell-cafe] Re: Automatic fixity allocation for symbolic
nicolas.frisby at gmail.com
Mon Oct 16 15:02:38 EDT 2006
I would imagine (reading into Jon Fairbairn's note) that the
difficulty is in combining it with the traditional handling of
precedences in parsing systems, as Bulat was describing. AFAIK, which
is not much on this topic, the notion of precedence in traditional LR
spewers is strictly tied to numeric precedences that are known pretty
much a priori.
Since mapping all the way to numbers seems like overkill to resolve
such infix ambiguities, I'd expect such an adjustment to parser
generators wouldn't be horrific--it may even be more natural on the
On 10/16/06, Arie Peterson <ariep at xs4all.nl> wrote:
> Good evening,
> Bulat Ziganshin wrote:
> > but when you want to have user-defined operators, that will mean that
> > you need either to define precedences to all other operators
> > (including those from other libs), or sometimes user programs will not
> > compile because they used combination of operators with undefined
> > precedence
> > good for making good headache :)
> Why is that?
> A library would indeed only declare the relative precedence of its
> operators with respect to operators that 1) it knows of; and 2) are
> related (or general) enough so that there is a reasonable choice of
> precedence. I think it is even good to force the user to declare any
> other, more uncommon, precedences; better than the current situation,
> where the relative precedence of operators from unrelated libraries is
> fixed pretty much arbitrarily, as an artefact of the imposed total order.
> Mr. Pelican Shit may be Willy.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe