On 31/03/2009, at 6:40 PM, Emmanuel Onzon wrote:
>
> Having priorities allows this because you can insert one between
> two others, Hmm. Note this required deleting a priority and adding two
> more if they're not transitive .. hmmm ...
>
> Adding new priorities is not a problem, but deleting them
> is currently not possible (except when going out of scope).
> Could you give me an example where you need to delete
> a priority to insert a new operator in the grammar ?
>
Ooops, bad language .. I meant "priority relations".
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. Felix doesn't need a strict chain usually.
However there's
a nasty case which should use one:
e ^ - 2
Say this shouldn't be allowed even though it unambiguously means
e ^ ( -2 )
because
- e ^ 2
actually means
- (e ^ 2)
and not
(-e) ^ 2
Felix actually allows e ^ -2, but the grammar is quite confusing, it
allows this too:
e ^ sin x
which could mean
(e ^ sin) x
if you didn't know better. I've been caught by this myself. Anyhow, an
example where
one wants to *use* the non-transitivity, which requires removing a
previously
existing relation (but not the priority itself).
--
john skaller
[email protected]
------------------------------------------------------------------------------
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language