Created
October 24, 2011 08:58
-
-
Save MohamedIBrahim/1308626 to your computer and use it in GitHub Desktop.
Simple Parse and Translate an Expression
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { Parse and Translate an Expression } | |
| procedure Expression; | |
| begin | |
| Term; | |
| EmitLn('MOVE D0,D1'); | |
| case Look of | |
| '+': Add; | |
| '-': Subtract; | |
| else Expected('Addop'); | |
| end; | |
| end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment