CPSC 355 Chapter : Assignment5.wiz

410 views4 pages

Document Summary

Part a: recursion, global variables and separate compilation. Arithmetic expressions can be translated into postfix form using recursion given the following rules: Translation is done by creating an individual conversion function for each of the syntactic constructs expression, term, and factor. As these syntactic constructs are defined recursively, their corresponding procedures are also structured recursively. Given the expressions: (note: the period terminates output) (a + c d the program should translate this input to a postfix output: Translate the functions find(), expression(), term(), and factor() into assembly language, and put these into a separate . m file. These functions will be called from the main() function given above, which will be in its own . c file. Your functions will call the library routines scanf(), exit(), and printf(). Input will be redirected from standard input; capture the program output using script. Your ta will give you input expressions to translate. Part b: external pointer arrays and command-line arguments.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents