-
-
Notifications
You must be signed in to change notification settings - Fork 1k
/
ruby.json
73 lines (73 loc) · 2.89 KB
/
ruby.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
{
"Program": "require 'shogun'\n\n$dependencies$program",
"Statement": "$statement\n",
"Comment": "#$comment\n",
"Init": {
"Construct": "$name = Shogun::$typeName.new($arguments)$kwargs",
"Copy": "$name = $expr$kwargs",
"KeywordArguments": {
"List": "\n$elements",
"Element": "$name.put(\"$keyword\", $expr)",
"Separator": "\n",
"InitialSeperatorWhenArgs>0": false
},
"CharVector": "$name = NArray.byte($arguments)",
"ByteVector": "$name = NArray.byte($arguments)",
"WordVector": "$name = NArray.byte($arguments)",
"IntVector": "$name = NArray.sint($arguments)",
"LongIntVector": "$name = NArray.int($arguments)",
"ULongIntVector": "$name = NArray.int($arguments)",
"ShortRealVector": "$name = NArray.sfloat($arguments)",
"RealVector": "$name = NArray.float($arguments)",
"LongRealVector": "$name = NArray.float($arguments)",
"ComplexVector": "$name = NArray.scomplex($arguments)",
"CharMatrix": "$name = NMatrix.float($arguments)",
"ByteMatrix": "$name = NMatrix.byte($arguments)",
"WordMatrix": "$name = NMatrix.byte($arguments)",
"IntMatrix": "$name = NMatrix.sint($arguments)",
"LongIntMatrix": "$name = NMatrix.int($arguments)",
"ULongIntMatrix": "$name = NMatrix.int($arguments)",
"ShortRealMatrix": "$name = NMatrix.sfloat($arguments)",
"RealMatrix": "$name = NMatrix.float($arguments)",
"LongRealMatrix": "$name = NMatrix.float($arguments)",
"ComplexMatrix": "$name = NMatrix.scomplex($arguments)"
},
"Assign": "$identifier = $expr",
"Type": {
"Default": "$typeName"
},
"Expr": {
"StringLiteral": "\"$literal\"",
"CharLiteral": "'$literal'",
"BoolLiteral": {
"True": "true",
"False": "false"
},
"IntLiteral": "$number",
"RealLiteral": "$number",
"FloatLiteral": "$number",
"MethodCall": "$object.$method($arguments)",
"StaticCall": "Shogun::$typeName.$method($arguments)",
"GlobalCall": "Shogun::$method($arguments)",
"Identifier": "$identifier",
"Enum":"Shogun::$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": "puts($expr)",
"OutputDirectoryName": "ruby",
"FileExtension": ".rb"
}