You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My question pertains to the ordering of the math operations and their interior Exp references.
For a piece of code like 3 ** 4 + 5 this ordering of Grammar means the result is (** 3 (+ 4 5)). Would it make more sense for it to be (+ (** 3 4) 5) so if you wanted (** 3 (+ 4 5)) you'd have to do 3 ** (4 + 5). If the later is the case, does that mean that instead of putting Exp8 above Exp5 we should instead replace the Exp5 reference within Exp8 to Exp9, aka make Exp8:
Exp8 ::= Exp9 ('**' Exp9)?
I'm also wondering if Exp7 should be placed below Exp8. Under the current ordering, -3 ** -4 creates (UnaryOp - (BinaryOp ** 3 (UnaryOp - 4))) Switching as suggested would hopefully create (BinaryOp ** (UnaryOp - 3) (UnaryOp - 4)).
Any comments on these subjects?
The text was updated successfully, but these errors were encountered:
As it stands right now, this is our order of Exp:
My question pertains to the ordering of the math operations and their interior Exp references.
For a piece of code like
3 ** 4 + 5
this ordering of Grammar means the result is(** 3 (+ 4 5))
. Would it make more sense for it to be(+ (** 3 4) 5)
so if you wanted(** 3 (+ 4 5))
you'd have to do3 ** (4 + 5)
. If the later is the case, does that mean that instead of puttingExp8
aboveExp5
we should instead replace theExp5
reference withinExp8
toExp9
, aka makeExp8
:I'm also wondering if
Exp7
should be placed belowExp8
. Under the current ordering,-3 ** -4
creates(UnaryOp - (BinaryOp ** 3 (UnaryOp - 4)))
Switching as suggested would hopefully create(BinaryOp ** (UnaryOp - 3) (UnaryOp - 4))
.Any comments on these subjects?
The text was updated successfully, but these errors were encountered: