2009/3/31 john skaller <skal...@users.sourceforge.net>

>
> On 01/04/2009, at 12:52 AM, Emmanuel Onzon wrote:
>
>
>> Suppose you have + < ^  (addition less than
>> exponentiation) and you want to add multiplication:
>>
>>       + < *
>>       * < ^
>>
>> then since Dypgen relations are not transitive you have to *remove* the
>> relation
>>
>>       + < ^
>>
>> to build a strict chain.
>>
>> No you don't have to remove it. Making a relations transitive
>> is not mandatory but it is not forbidden either.
>> You can even introduce the transitive closure of the relation
>> for a list of priorities with:
>>      Relation [["p1";"p2";"p3";"p4"]]
>>
>> If you remove + < ^ then you lose the precedence
>> of ^ over + and the expression:
>>
>>      a ^ b + c
>>
>> become ambiguous.
>>
>
> Exactly what is desired by a "strict chain". Here you wish
> to force the user to write
>
>        (a ^ b) + c
>
> i..e. to put brackets in.  Example is artificial though :)
>

So you mean: if there is a precedence between two already
existing operators (say ^ and +) then when adding a new
operator (say *) the precedence between the first two
operators should disappear ?
I don't understand why this behavior is better than keeping
the precedence. The user can still use the parenthesis if
he means something different.
If you want to force the user to use parenthesis, why
using precedences (and priorities) at all?
------------------------------------------------------------------------------
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to