Java Expressions and Assignments

profilevhramu223


1. Finish documenting the provided source code.

2. Extend the scanner to support comments. Design your own form of comment.

3. The grammar specifies that a program is exactly one assignment statement. However, main interprets each of its arguments as a separate program, trying to modify variable values, in the Environment object, accordingly. Change the interpreter so this works correctly. Eventually, we will change the grammar to allow a program to be multiple statements.

4. Add a prefix unary minus operator. This is a grammatical change; simply allowing negative number is insufficient.

5. The interpreter currently supports only integer values. Change it to instead support double values.

  • 9 years ago
  • 10
Answer(1)

Purchase the answer to view it

blurred-text
  • attachment
    Java12.zip