Previous    Next

Appendix A: MiniJava Language Reference Manual

MiniJava is a subset of Java. The meaning of a MiniJava program is given by its meaning as a Java program. Overloading is not allowed in MiniJava. The MiniJava statement System.out.println( …); can only print integers. The MiniJava expression e.length only applies to expressions of type int[].


Identifiers: An identifier is a sequence of letters, digits, and underscores, starting with a letter. Uppercase letters are distinguished from lowercase. In this appendix the symbol id stands for an identifier. Integer literals: A sequence of decimal digits is an integer constant that denotes the corresponding integer value. In this appendix the symbol INTEGER_LITERAL stands for an integer constant. Binary operators: A binary operator is one of

&& < + - *

In this appendix the symbol op stands for a binary operator.

Comments: A comment may appear between any two tokens. There are two forms of comments: One starts with /*, ends with */, and may be nested; another begins with // and goes to the end of the line.

JaVaScreenshot Previous    Next