-
-
Notifications
You must be signed in to change notification settings - Fork 1k
/
csharp.json
101 lines (101 loc) · 3.93 KB
/
csharp.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
100
101
{
"Program": "using System;\n\npublic class Application {\npublic static void Main() {\nshogun.init_shogun_with_defaults();\n\n$program\n}\n}\n",
"Statement": "$statement;\n",
"Comment": "//$comment\n",
"Init": {
"Construct": "$typeName $name = new $typeName($arguments)$kwargs",
"Copy": "$typeName $name = $expr$kwargs",
"KeywordArguments": {
"List": ";\n$elements",
"Element": "$name.put(\"$keyword\", $expr)",
"Separator": ";\n",
"InitialSeperatorWhenArgs>0": false
},
"CharVector": "var $name = new char[$arguments]",
"ByteVector": "var $name = new byte[$arguments]",
"WordVector": "var $name = new ushort[$arguments]",
"IntVector": "var $name = new int[$arguments]",
"LongIntVector": "var $name = new long[$arguments]",
"ULongIntVector": "var $name = new ulongint[$arguments]",
"ShortRealVector": "var $name = new float[$arguments]",
"RealVector": "var $name = new double[$arguments]",
"LongRealVector": "var $name = new double[$arguments]",
"ComplexVector": "var $name = new Complex[$arguments]",
"CharMatrix": "var $name = new char[$arguments]",
"ByteMatrix": "var $name = new byte[$arguments]",
"WordMatrix": "var $name = new ushort[$arguments]",
"IntMatrix": "var $name = new int[$arguments]",
"LongIntMatrix": "var $name = new long[$arguments]",
"ULongIntMatrix": "var $name = new ulongint[$arguments]",
"ShortRealMatrix": "var $name = new float[$arguments]",
"RealMatrix": "var $name = new double[$arguments]",
"LongRealMatrix": "var $name = new double[$arguments]",
"ComplexMatrix": "var $name = new Complex[$arguments]"
},
"Assign": "$identifier = $expr",
"Type": {
"Default": "$typeName",
"bool": "bool",
"string": "String",
"char": "char",
"int": "int",
"float": "float",
"real": "double",
"CharVector": "char[]",
"ByteVector": "byte[]",
"WordVector": "ushort[]",
"ShortVector": "short[]",
"IntVector": "int[]",
"LongIntVector": "long[]",
"ULongIntVector": "ulongint[]",
"ShortRealVector": "float[]",
"RealVector": "double[]",
"LongRealVector": "double[]",
"ComplexVector": "Complex[]",
"CharMatrix": "char[,]",
"ByteMatrix": "byte[,]",
"WordMatrix": "ushort[,]",
"ShortMatrix": "short[,]",
"IntMatrix": "int[,]",
"LongIntMatrix": "long[,]",
"ULongIntMatrix": "ulongint[,]",
"ShortRealMatrix": "float[,]",
"RealMatrix": "double[,]",
"LongRealMatrix": "double[,]",
"ComplexMatrix": "Complex[,]"
},
"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)",
"GlobalCall": "shogun.$method($arguments)",
"Identifier": "$identifier",
"Enum":"$typeName.$value"
},
"Element": {
"Access": {
"Vector": "$identifier[$indices]",
"Matrix": "$identifier[$indices]",
"BoolVector": "$identifier.get_element($indices)",
"BoolMatrix": "$identifier.get_element($indices)"
},
"Assign": {
"Vector": "$identifier[$indices] = $expr",
"Matrix": "$identifier[$indices] = $expr",
"BoolVector": "$identifier.set_element($expr, $indices)",
"BoolMatrix": "$identifier.set_element($expr, $indices)"
},
"ZeroIndexed": true
},
"Print": "Console.Write($expr)",
"OutputDirectoryName": "csharp",
"FileExtension": ".cs"
}