On 01/10/2012 06:27 PM, Waldek Hebisch wrote:
Ralf Hemmecke wrote:

Hi Waldek,

do you see hope to weaken the precedence of : so that I would be
able to write

(x: X) foo (y: Y): Z == ....

instead of

((x: X) foo (y: Y)): Z == ....


AFAICS now you can write:

(x: X foo y: Y): Z ==

I probably would like you precendence more then current one, but
other folks may have different opinions.

OK. But *who* are these people? In case someone strictly prefers the
current version, he/she should speak up *now*!
I really really want that change!

And I a bit affraid that this can have undesirable conseqences in
other places.

OK, maybe one has to modify some .spad files in certain places, but I'm
willing to do this on a branch and see how far I can get.
(Maybe I should first restart my testsuite stuff, though.)

Is this file for the SPAD parser or also the parser for the
Interpreter language?

Currently only for Spad parser -- in interpreter precedences are
hardcoded.

That's a pitty that it's hardcoded in the interpreter, but IIUC you
wanted the unify the parsers anyway, so it's only a matter of time.

With which values could I experiment? Or maybe [":", 123, 123] so
that it binds just a little higher than "=="?

Certainly bigger than precedence of ':='.

Yes, of course.

Also unequal values seem more reasonable: you want more on the left,
while the same on the right.

I have no real idea what theas number actually mean wrt left and right.

I'll try [":", 130, 129].

For experiments try:

)boot $RawParseOnly := true

this will print just the output of Spad parser (and you can just have
expression you want without other stuff).

I don't really understand what you mean by that. Since the precedence values are for spad, I expect the change only to be visible when I compile a .spad file. You seem to say that I should do something else?

Or did you just mean

)boot $RawParseOnly := true
)compile somesimplecode.spad

?

Ralf

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to