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. And I a bit affraid that this can have undesirable conseqences in other places. > Would I only have to change the value in s-parser.boot? > > https://github.com/hemmecke/fricas-svn/blob/master/src/interp/s-parser.boot#L54 > > 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. > > With which values could I experiment? > > My guess would be that > > [":", 1005, 1006] > > should work, but I'm not sure. That is opposite of what you want, with such precedence you would write: (x :(X) foo y :(Y)) : Z > Or maybe [":", 123, 123] so that it binds just a little higher than "=="? > Certainly bigger than precedence of ':='. Also unequal values seem more reasonable: you want more on the left, while the same on the right. 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). -- Waldek Hebisch [email protected] -- 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.
