yurug/unofficial-menhir — pull request #1 by def-lkb (2014-02-20 23:22:26+00:00)
Title: (Cleanup whitespaces +) Add explicit partial ordering of tokens

We already discussed this feature in private.

The following patches add a ```%priorities ``` declaration in input grammars. The purpose is to separate the specification of priority from the specification of associativity, inherited from yacc-style ```%left```, ```%right``` and ```%nonassoc```.

This allows a finer specification of the ordering, making the user intent explicit, potentially catching mistakes in the grammar.

Usage: ```%priorities A B C``` means that ```A < B < C```
Use multiple ```%priorities``` to specify the whole relation. If a cycle is detected, an error is printed and menhir aborts.