How would the infix and stack priorities be extended to include the operators <
, >
, <=
, >=
, ==
, !=
, !
, &&
, and ||
?
When parsing an infix expression, for example: P + (Q – F) / Y#
, each symbol has a priority which is relevant to their order of operation. /
and *
have a higher priority than +
and -
.
Here are the priorities I have/understand:
Priority * / + - ( ) #
Infix 2 2 1 1 3 0 0
Stack 2 2 1 1 0 n/a 0