[Instructions] [Search] [Current] [Syllabus] [Links] [Handouts] [Outlines] [Assignments] [Labs]
Back to Discussion of Exam 2. On to Data Types.
Held Wednesday, April 14
Summary
Contents
Handouts
Notes
Exp ::= Exp AddOp Exp | Term Term ::= Term MulOp Term | (Exp) | num | id AddOp ::= plus | minus MulOp ::= times | divide
a-a-a
.
Term
.
Exp ::= Exp AddOp Term
Factor
as ``no unparenthesized multiplication
of addition''.
Term ::= Term MulOp Factor
Exp ::= Exp AddOp Term | Term Term ::= Term MulOp Factor | Factor Factor ::= '(' Exp ')' | num | id AddOp ::= plus | minus MulOp ::= times | divide
-+num
is meaningless, as is ---num
).
alpha() + beta() * gamma()
beta()
is multiplied by
the result of gamma()
and that result is then added
to alpha()
.
alpha()
, beta()
and gamma()
are evaluated in? In most languages,
the answer is ``it's up to the implementer''.
global integer x = 1; function zebra begin x = x + 1; return x; end zebra; ... y = zebra() + zebra() - zebra();
y
?
History
Back to Discussion of Exam 2. On to Data Types.
[Instructions] [Search] [Current] [Syllabus] [Links] [Handouts] [Outlines] [Assignments] [Labs]
Disclaimer Often, these pages were created ``on the fly'' with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.
This page may be found at http://www.math.grin.edu/~rebelsky/Courses/CS302/99S/Outlines/outline.29.html
Source text last modified Thu Apr 15 09:04:07 1999.
This page generated on Thu Apr 15 09:12:45 1999 by SiteWeaver. Validate this page's HTML.
Contact our webmaster at rebelsky@math.grin.edu