atsds-bnf 0.0.9-alpha1 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ print(ds_output)
|
|
|
50
50
|
# c
|
|
51
51
|
|
|
52
52
|
# Unparse: Convert from DS format to readable Dsp
|
|
53
|
-
ds_input = "a\nb\n----\nc"
|
|
53
|
+
ds_input = "a\nb\n----\nc\n"
|
|
54
54
|
dsp_output = unparse(ds_input)
|
|
55
55
|
print(dsp_output)
|
|
56
56
|
# Output: a, b -> c
|
|
@@ -72,7 +72,7 @@ console.log(ds_output);
|
|
|
72
72
|
// c
|
|
73
73
|
|
|
74
74
|
// Unparse: Convert from DS format to readable Dsp
|
|
75
|
-
const ds_input = "a\nb\n----\nc";
|
|
75
|
+
const ds_input = "a\nb\n----\nc\n";
|
|
76
76
|
const dsp_output = unparse(ds_input);
|
|
77
77
|
console.log(dsp_output);
|
|
78
78
|
// Output: a, b -> c
|
|
@@ -115,13 +115,13 @@ For structured terms:
|
|
|
115
115
|
|
|
116
116
|
| Description | Dsp Format (parse input / unparse output) | Ds Format |
|
|
117
117
|
|-------------|-------------------|-------------------|
|
|
118
|
-
| Simple rule | `a, b -> c` | `a\nb\n----\nc` |
|
|
119
|
-
| Axiom | `a` | `----\na` |
|
|
120
|
-
| Function call | `f(a, b) -> c` | `(function f a b)\n----------------\nc` |
|
|
121
|
-
| Subscript | `a[i, j] -> b` | `(subscript a i j)\n-----------------\nb` |
|
|
122
|
-
| Binary operator | `(a + b) -> c` | `(binary + a b)\n--------------\nc` |
|
|
123
|
-
| Unary operator | `~ a -> b` | `(unary ~ a)\n-----------\nb` |
|
|
124
|
-
| Complex expression | `((a + b) * c), d[i] -> f(g, h)` | `(binary * (binary + a b) c)\n(subscript d i)\n---------------------------\n(function f g h)` |
|
|
118
|
+
| Simple rule | `a, b -> c` | `a\nb\n----\nc\n` |
|
|
119
|
+
| Axiom | `a` | `----\na\n` |
|
|
120
|
+
| Function call | `f(a, b) -> c` | `(function f a b)\n----------------\nc\n` |
|
|
121
|
+
| Subscript | `a[i, j] -> b` | `(subscript a i j)\n-----------------\nb\n` |
|
|
122
|
+
| Binary operator | `(a + b) -> c` | `(binary + a b)\n--------------\nc\n` |
|
|
123
|
+
| Unary operator | `~ a -> b` | `(unary ~ a)\n-----------\nb\n` |
|
|
124
|
+
| Complex expression | `((a + b) * c), d[i] -> f(g, h)` | `(binary * (binary + a b) c)\n(subscript d i)\n---------------------------\n(function f g h)\n` |
|
|
125
125
|
|
|
126
126
|
## Building from Source
|
|
127
127
|
|
package/package.json
CHANGED