ESCJ 6: Java's type system specification

This document was derived partly by cut-and-paste from "The Java Language Specification." The document provides a somewhat more consise and accessible description of Java's type system that that provided in "The Java Language Specification". It is organized  along the lines of the LALR(1) grammar described in chapter 19 of that specification. Each production rule in the grammar is annotated with additional typing conditions. Each production rule also has the implicit condition that the left-hand-side of the rule is ok (ie passes the type system) only if each of the non-temrinals on the right-hand-side are also ok.

1. Productions from §2.3: The Syntactic Grammar

2. Productions from §7: Packages

3. Productions from §8: Classes

3.1 Productions from §8.1: Class Declaration

3.2 Productions from §8.3: Field Declarations

3.3 Productions from §8.4: Method Declarations

3.3.1 Method Headers

3.3.2 Method Bodies

3.4 Productions from §8.5: Static Initializers

3.5 Productions from §8.6: Constructor Declarations

4. Productions from §9: Interfaces

4.1 Productions from §9.1: Interface Declarations

5. Productions from §10: Arrays

6. Productions Used Only in the LALR(1) Grammar

        No duplicate Modifiers allowed.
        At most one of the access modifiers (public, protected, private) allowed.

7. Productions from §14: Blocks and Statements

8. Productions from §15: Expressions

8.1 Sub-Catagories of Expressions

8.2 Conversions and Promotions

8.2.1 Unary Numeric Promotion

8.2.2 Binary Numeric Promotion

8.2.3 String Conversion

9. Productions from §4: Types, Values, and Variables

10. Productions from §6: Names

11. Productions from §3: Lexical Structure



 

Legal Statement Privacy Statement