
26 An Introduction to Compiler Construction in a Java World
Exercise 1.14. Write a j-- program Palindrome.java that accepts a string as input, and
outputs the string if it is a palindrome (a string that reads the same in either direction),
and outputs nothing if it is not. The program should be case-insensitive to the input. For
example
17
:
> java P alindrom e Malay a l a m
should output:
> Malayala m
Exercise 1.15. Suggest enhancements to the j-- language that would simplify the imple-
mentation of the programs described in the previous exercises (1.10 through 1.14).
Exercise 1.16. For each of the j-- programs described in Exercises 1.10 through 1.14, ...