I take that as placing the postfix >@ send operator (and friends) at a lower precedence than the infix form. But now I'm thinking they are all at "level 9", (or are they wedged in between at 8b)?
See the precedence chart (based on the ProIcon docs and modified) at
The @>, @>>, <@ and <<@ have problematic precedence as they are unary
prefix, unary postfix, binary and operandless. The actual design is
[x] op [y]
with both x and y optional. Hence, giving rise to unary prefix, unary
postfix, binary and operandless. Based on previous discussion (thanks
Jafar), they should be considered binary with the missing operand
defaulting to a specific value for each case. The precedence of each
operand is spread over a number of levels, more than just between expr8
and expr9 (you also need to include expr11 as well).
I, personally, think that the grammar description needs more thought and
clarification. But at this point, I am not sure what should be proposed.
I am having a look at various renderings to see what happens, but I am
not far into this process.
You are correct Bruce. I view the communication operators as binary operators, missing right operands defaults to the current thread , while missing left operand defaults to null. If I remember our initial design, the intention was all forms have the same priority with them being resolved left to right.
Cheers,
Jafar
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Of course, as you and I discussed before Bruce, default left operand make sense with @> and @>> where you just send &null. with <<@ it the left operand is a timeout of how long you are willing to block, but there is no intuitive clear meaning for <@. I have experiementd with a few but was not satisfied. If you can think if some good use for it please let me knwo.
--Jafar
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am thinking of making a change to the grammar as I sort of outlined
earlier and see what this does with the current system. But I won't be
ready for this until after I have finished the things currently on my
plate, including a new lexer sub-system for the regexp facility.
regards
Bruce Rennie
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Finally taking a more serious stab at the Operators chapter of the UP docs.
I may have read the precedence table in src/unicon/unigram.y wrong
unigram.y
I take that as placing the postfix
>@
send operator (and friends) at a lower precedence than the infix form. But now I'm thinking they are all at "level 9", (or are they wedged in between at 8b)?See the precedence chart (based on the ProIcon docs and modified) at
http://btiffin.users.sourceforge.net/up/operators.html
Is exponentiation grouped with
e1 >@
or should postifx>@
be grouped with infixe1 >@ e2
?I think I have this wrong, and could use some expert advice.
Cheers,
Brian
Good evening Brian,
The @>, @>>, <@ and <<@ have problematic precedence as they are unary
prefix, unary postfix, binary and operandless. The actual design is
[x] op [y]
with both x and y optional. Hence, giving rise to unary prefix, unary
postfix, binary and operandless. Based on previous discussion (thanks
Jafar), they should be considered binary with the missing operand
defaulting to a specific value for each case. The precedence of each
operand is spread over a number of levels, more than just between expr8
and expr9 (you also need to include expr11 as well).
I, personally, think that the grammar description needs more thought and
clarification. But at this point, I am not sure what should be proposed.
I am having a look at various renderings to see what happens, but I am
not far into this process.
One proposal so far is
exprx :
But I don't know what ramification this would have.
Jafar has clarified some questions I have had. I still don't have
enough clarity as to what is a cleaner set of productions.
regards
Bruce Rennie
Thanks, Bruce. Clarifies a little bit. I'm going to leave the chart as-is for the moment, perhaps add the exceptions in prose following the table.
Cheers,
Brian
You are correct Bruce. I view the communication operators as binary operators, missing right operands defaults to the current thread , while missing left operand defaults to null. If I remember our initial design, the intention was all forms have the same priority with them being resolved left to right.
Cheers,
Jafar
Of course, as you and I discussed before Bruce, default left operand make sense with @> and @>> where you just send &null. with <<@ it the left operand is a timeout of how long you are willing to block, but there is no intuitive clear meaning for <@. I have experiementd with a few but was not satisfied. If you can think if some good use for it please let me knwo.
--Jafar
I am thinking of making a change to the grammar as I sort of outlined
earlier and see what this does with the current system. But I won't be
ready for this until after I have finished the things currently on my
plate, including a new lexer sub-system for the regexp facility.
regards
Bruce Rennie
Great resource, Brian, thanks!
Could you put a link to your string scanning page in the "?" operator section? Thanks.
Umm, two years later, ... noticed.
Should be fixed in 0.6.148. Which might contain a few loose edges at the moment, a reindexing work is in progress.
https://unicon.sourceforge.io/up/operators.html#string-scan
Sorry, Charles, and thanks for the hint.
Have good
Last edit: Brian Tiffin 2019-10-25