[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Precedences for pretty-printing
From: |
Hans Aberg |
Subject: |
Precedences for pretty-printing |
Date: |
Wed, 16 Oct 2002 18:27:12 +0200 |
Is it possible to somehow automatically retrieve the precedences
(%nonassoc, etc.) that one puts into the Bison .y grammar for use with
pretty-printing?
-- If one has those priorities it is pretty easy to write out the correct
expressions with a minimum set of needed (...): If an argument of an object
has a lower precedence than the object, it should be surrounded by "(...)".
If the precedences are equal, the argument should have "(...)" if the
objects are nonassociative, otherwise it is not necessary.
I use this to write out formulas. But now, I have to plug in the
precedences by hand, which is a pain when the grammar changes.
Hans Aberg
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Precedences for pretty-printing,
Hans Aberg <=