-
-
Notifications
You must be signed in to change notification settings - Fork 1k
/
java.json
99 lines (99 loc) · 4.33 KB
/
java.json
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
"Program": "import org.jblas.DoubleMatrix;\nimport org.jblas.FloatMatrix;\n\nimport org.shogun.modshogun;\n$dependencies\n\nclass $programName {\nstatic {\nSystem.loadLibrary(\"modshogun\");\n}\n\npublic static void main(String argv[]) {\nmodshogun.init_shogun_with_defaults();\n\n$program\n}\n}\n",
"Dependencies": {
"IncludeAllClasses": true,
"IncludeEnums": true,
"DependencyListElement": "import org.shogun.$typeName;",
"DependencyListSeparator": "\n"
},
"Statement": "$statement;\n",
"Comment": "//$comment\n",
"Init": {
"Construct": "$typeName $name = new $typeName($arguments)",
"Copy": "$typeName $name = $expr",
"CharVector": "DoubleMatrix $name = new DoubleMatrix(1, $arguments)",
"ByteVector": "DoubleMatrix $name = new DoubleMatrix(1, $arguments)",
"WordVector": "DoubleMatrix $name = new DoubleMatrix(1, $arguments)",
"IntVector": "DoubleMatrix $name = new DoubleMatrix(1, $arguments)",
"LongIntVector": "DoubleMatrix $name = new DoubleMatrix(1, $arguments)",
"ULongIntVector": "DoubleMatrix $name = new DoubleMatrix(1, $arguments)",
"ShortRealVector": "DoubleMatrix $name = new DoubleMatrix(1, $arguments)",
"RealVector": "DoubleMatrix $name = new DoubleMatrix(1, $arguments)",
"LongRealVector": "DoubleMatrix $name = new DoubleMatrix(1, $arguments)",
"CharMatrix": "DoubleMatrix $name = new DoubleMatrix($arguments)",
"ByteMatrix": "DoubleMatrix $name = new DoubleMatrix($arguments)",
"WordMatrix": "DoubleMatrix $name = new DoubleMatrix($arguments)",
"IntMatrix": "DoubleMatrix $name = new DoubleMatrix($arguments)",
"LongIntMatrix": "DoubleMatrix $name = new DoubleMatrix($arguments)",
"ULongIntMatrix": "DoubleMatrix $name = new DoubleMatrix($arguments)",
"ShortRealMatrix": "DoubleMatrix $name = new DoubleMatrix($arguments)",
"RealMatrix": "DoubleMatrix $name = new DoubleMatrix($arguments)",
"LongRealMatrix": "DoubleMatrix $name = new DoubleMatrix($arguments)"
},
"Assign": "$identifier = $expr",
"Type": {
"Default": "$typeName",
"Math": "org.shogun.Math",
"bool": "boolean",
"int": "int",
"float": "float",
"real": "double",
"string": "String",
"char": "char",
"CharVector": "DoubleMatrix",
"ByteVector": "DoubleMatrix",
"WordVector": "DoubleMatrix",
"ShortVector": "DoubleMatrix",
"IntVector": "DoubleMatrix",
"LongIntVector": "DoubleMatrix",
"ULongIntVector": "DoubleMatrix",
"ShortRealVector": "FloatMatrix",
"RealVector": "DoubleMatrix",
"LongRealVector": "DoubleMatrix",
"ComplexVector": "DoubleMatrix",
"CharMatrix": "DoubleMatrix",
"ByteMatrix": "DoubleMatrix",
"WordMatrix": "DoubleMatrix",
"ShortMatrix": "DoubleMatrix",
"IntMatrix": "DoubleMatrix",
"LongIntMatrix": "DoubleMatrix",
"ULongIntMatrix": "DoubleMatrix",
"ShortRealMatrix": "FloatMatrix",
"RealMatrix": "DoubleMatrix",
"LongRealMatrix": "DoubleMatrix",
"ComplexMatrix": "DoubleMatrix"
},
"Expr": {
"StringLiteral": "\"$literal\"",
"CharLiteral": "'$literal'",
"BoolLiteral": {
"True": "true",
"False": "false"
},
"IntLiteral": "$number",
"RealLiteral": "$number",
"FloatLiteral": "${number}f",
"MethodCall": "$object.$method($arguments)",
"StaticCall": "$typeName.$method($arguments)",
"Identifier": "$identifier",
"Enum":"$typeName.$value"
},
"Element": {
"Access": {
"Vector": "$identifier.get($indices)",
"Matrix": "$identifier.get($indices)",
"BoolVector": "$identifier.get_element($indices)",
"BoolMatrix": "$identifier.get_element($indices)"
},
"Assign": {
"Vector": "$identifier.put($indices, $expr)",
"Matrix": "$identifier.put($indices, $expr)",
"BoolVector": "$identifier.set_element($expr, $indices)",
"BoolMatrix": "$identifier.set_element($expr, $indices)"
},
"ZeroIndexed": true
},
"Print": "System.out.println($expr)",
"OutputDirectoryName": "java",
"FileExtension": ".java"
}