Skip to content

ReferenceTypes.sdf3

pdmosses/java-front/lang.java/syntax/java/types/ReferenceTypes.sdf3

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
module 

// 4.3. Reference Types and Values

imports
  java/lexical/Identifiers
  java/types/PrimitiveTypes
  java/types/ParameterizedTypes
  java/interfaces/Annotations

context-free sorts

  
  
  TypeVariable
  
  
  
  

context-free syntax

   = ClassType
   = ArrayType

  .ClassType                  = <<{Annotation " "}*> <Id><TypeArguments?>>
  .ClassOrInterfaceTypeMember = <<ClassType>.<{Annotation " "}*> <Id><TypeArguments?>>

  // The interfaceTypeMember will be ambiguous with ClassTypeMember
  // ClassType.InterfaceTypeMember = <<InterfaceType>.<{Annotation " "}*> <Id><TypeArguments?>>
  // ReferenceType = InterfaceType  
  // InterfaceType.InterfaceType   = ClassType

  // Ambiguous with ClassType.ClassType
  TypeVariable.TypeVar = <<{Annotation " "}*> <Id>>

  .ArrayTypePrimitive = <<PrimitiveType> <AnnotatedDims>>
  .ArrayTypeClassType = <<ClassType> <AnnotatedDims>>
        = <<{AnnotatedDim " "}+>>
   = <<{AnnotatedDim " "}*>>
  .AnnotateDim = <<{Annotation " "}*> []>

template options

  tokenize : "["