IO 6 - precedence! Therefore a + b + c is interpreted as (a...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Operator specifiers Operator position: Prefix: fx, fy Postfix: xf, yf Infix: xfx, xfy, yfx, yfy Operator associativity x on this position a term with precedence class strictly lower to the precedence of the operator should occur y on this position a term with precedence class lower or equal to the precedence of the operator should occur York University- CSE 3401- V. Movahedi 08_IO 26
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Example (1) Operator + is defined as yfx a + b + c (a + b) + c or a + (b + c) yfx the argument on the right can not have the same
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: precedence! Therefore a + b + c is interpreted as (a + b) + c ( left associative ) York University- CSE 3401- V. Movahedi 08_IO 27 Argument containing an operator with the same precedence Example (2) What is the specifier for not if we want to allow: not not a Prefix fx or fy We want not not a to be interpreted as not (not a) Therefore the specifier is fy York University- CSE 3401- V. Movahedi 08_IO 28 Argument containing an operator with the same precedence...
View Full Document

Page1 / 3

IO 6 - precedence! Therefore a + b + c is interpreted as (a...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online