Commit 25aef927 authored by Johannes Mey's avatar Johannes Mey
Browse files

add tests for NTAs for !13

parent 8a5cec44
Pipeline #6278 passed with stage
in 2 minutes and 36 seconds
import java.util.ArrayList;
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;
// there are not Opt-NTAs like /[NT8:A]/ /[A]/
// // E ::= ... /[NT8:A]/ ... ;
// syn Opt<A> E.getNT8() = new Opt<A>();
//
// // E ::= ... /[A]/ ... ;
// syn Opt<A> E.getA() = new Opt<A>();
// E ::= ... /NT10:A*/ ... ;
syn List<A> E.getNT10List() = new List<A>();
// E ::= ... /B*/ ... ;
syn List<B> E.getBList() = new List<B>();
}
......@@ -49,11 +49,13 @@ C ;
D ::= SingleA:A ListOfA:A* [OptionalA:A] /NTAA:A/ ;
// production with tokens, nonterminal-tokens, multi-line
// there are not Opt-NTAs like /[NT8:A]/ /[A]/
E ::= <T1> <T2:String> <T3:boolean> <T4:int> <T5:float> <T6:double> <T7:long>
<T8:java.lang.Object> <T9:ArrayList<String>> <T10:java.util.ArrayList<java.lang.String>>
/<NT2:String>/ /<NT3:boolean>/ /<NT4:int>/ /<NT5:float>/ /<NT6:double>/ /<NT7:long>/ ;
/<NT1>/ /<NT2:String>/ /<NT3:boolean>/ /<NT4:int>/ /<NT5:float>/ /<NT6:double>/ /<NT7:long>/
/NT10:A*/ /B*/;
rel E.NT1 -> A ;
rel E.R1 -> A ;
// inheritance and empty
F : A ;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment