Skip to content

ClassInstanceCreation.sdf3

pdmosses/java-front/lang.java/syntax/java/expressions/ClassInstanceCreation.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
module 

// 15.9. Class Instance Creation Expressions

imports
  java/names/Names
  java/lexical/Identifiers
  java/interfaces/Annotations
  java/types/ParameterizedTypes
  java/classes/ClassDeclarations

context-free sorts

  
  
  

context-free syntax

                = UnqualifiedInstance
  .QualifiedInstance = <<Expression>.<UnqualifiedInstance>>

  .NewInstance = <
  new <TypeArguments?> <{Annotation " "}*> <Id> <QualifiedId*> <TypeArgumentsOrDiamond?>(<{Expression ","}*>) >

  .NewInstance = <  
  new <TypeArguments?> <{Annotation " "}*> <Id> <QualifiedId*> <TypeArgumentsOrDiamond?>(<{Expression ","}*>) {
    <{ClassBodyDeclaration "\n"}*>
  }>

  .QualifiedId = <.<{Annotation " "}*> <Id>>

           = TypeArguments
  .Diamond = [<>]

template options  

  tokenize : "<"