|
home—lectures—recipe—exams—hws—D2L—breeze (snow day; distance)
Expr ::= Num | ParenExpr | BinExpr | ParityExpr ParenExpr ::= [[ Expr ]] BinExpr ::= ( Expr BinOp Expr ) ParityExpr ::= parity Expr even: Expr odd: Expr ; BinOp ::= add | sub | mul |
Note:Download the racket files, and then choose Open… from DrRacket. Do not copy/paste into an empty DrRacket window, since that window is probably using a student-language, and some of the files below use full racket.
This is so we can just use our language's built-in number-parsing functions,
without getting bogged down in tokening input.
So racket implementations will allow exactly those strings recognized by
Similarly, if using Java, the semantics of Q0's arithmetic will be similar to IEEE floating point arithmetic (rather than perfectly-correct arithmetic).
Don't confuse Q0's class
home—lectures—recipe—exams—hws—D2L—breeze (snow day; distance)
©2015, Ian Barland, Radford University Last modified 2016.Jul.10 (Sun) |
Please mail any suggestions (incl. typos, broken links) to ibarlandradford.edu |