Relations.jrag 797 Bytes
Newer Older
1
import java.util.ArrayList;
Johannes Mey's avatar
Johannes Mey committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

aspect NTA {

  // E ::= ... /<NT1>/ ... ;
  syn String E.getNT1() = "";

  // E ::= ... /<NT2:String>/ ... ;
  syn String E.getNT2() = "";

  // E ::= ... /<NT3:boolean>/ ... ;
  syn boolean E.getNT3() = false;

  // E ::= ... /<NT4:int>/ ... ;
  syn int E.getNT4() = 1;

  // E ::= ... /<NT5:float>/ ... ;
  syn float E.getNT5() = 1.0f;

  // E ::= ... /<NT6:double>/ ... ;
  syn double E.getNT6() = 1.0d;

  // E ::= ... /<NT7:long>/ ... ;
  syn long E.getNT7() = 1l;

Johannes Mey's avatar
Johannes Mey committed
26
27
28
29
30
  // E ::= ... /[NT8:A]/ ... ;
  syn Opt<A> E.getNT8Opt() = new Opt<A>();

  // E ::= ... /[A]/ ... ;
  syn Opt<A> E.getAOpt() = new Opt<A>();
Johannes Mey's avatar
Johannes Mey committed
31
32
33
34
35
36
37
38

  // E ::= ... /NT10:A*/ ... ;
  syn List<A> E.getNT10List() = new List<A>();

  // E ::= ... /B*/ ... ;
  syn List<B> E.getBList() = new List<B>();

}