summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/scheme
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/modules/scheme')
-rw-r--r--sca-cpp/trunk/modules/scheme/json-value.cpp3
-rw-r--r--sca-cpp/trunk/modules/scheme/primitive.hpp16
-rw-r--r--sca-cpp/trunk/modules/scheme/value-json.cpp2
-rw-r--r--sca-cpp/trunk/modules/scheme/value-xml.cpp2
-rw-r--r--sca-cpp/trunk/modules/scheme/xml-value.cpp2
5 files changed, 15 insertions, 10 deletions
diff --git a/sca-cpp/trunk/modules/scheme/json-value.cpp b/sca-cpp/trunk/modules/scheme/json-value.cpp
index 0ab9c85854..d7ffc2b37b 100644
--- a/sca-cpp/trunk/modules/scheme/json-value.cpp
+++ b/sca-cpp/trunk/modules/scheme/json-value.cpp
@@ -39,8 +39,7 @@ int jsonValue() {
cerr << reason(lv);
return 1;
}
- const value v = elementsToValues(content(lv));
- cout << writeValue(v);
+ cout << writeValue(content(lv));
return 0;
}
diff --git a/sca-cpp/trunk/modules/scheme/primitive.hpp b/sca-cpp/trunk/modules/scheme/primitive.hpp
index 6f3f71f4cd..899d6f83da 100644
--- a/sca-cpp/trunk/modules/scheme/primitive.hpp
+++ b/sca-cpp/trunk/modules/scheme/primitive.hpp
@@ -145,26 +145,30 @@ const value uuidProc(unused const list<value>& args) {
return mkuuid();
}
-const value cadrProc(unused const list<value>& args) {
+const value cadrProc(const list<value>& args) {
return cadr((list<value> )car(args));
}
-const value caddrProc(unused const list<value>& args) {
+const value caddrProc(const list<value>& args) {
return caddr((list<value> )car(args));
}
-const value cadddrProc(unused const list<value>& args) {
+const value cadddrProc(const list<value>& args) {
return cadddr((list<value> )car(args));
}
-const value cddrProc(unused const list<value>& args) {
+const value cddrProc(const list<value>& args) {
return cddr((list<value> )car(args));
}
-const value cdddrProc(unused const list<value>& args) {
+const value cdddrProc(const list<value>& args) {
return cdddr((list<value> )car(args));
}
+const value appendProc(const list<value>& args) {
+ return append((list<value> )car(args), (list<value>)cadr(args));
+}
+
const value startProc(unused const list<value>& args) {
return lambda<value(const list<value>&)>();
}
@@ -222,6 +226,7 @@ const list<value> primitiveProcedureNames() {
+ "cadddr"
+ "cddr"
+ "cdddr"
+ + "append"
+ "display"
+ "log"
+ "uuid"
@@ -247,6 +252,7 @@ const list<value> primitiveProcedureObjects() {
+ primitiveProcedure(cadddrProc)
+ primitiveProcedure(cddrProc)
+ primitiveProcedure(cdddrProc)
+ + primitiveProcedure(appendProc)
+ primitiveProcedure(displayProc)
+ primitiveProcedure(logProc)
+ primitiveProcedure(uuidProc)
diff --git a/sca-cpp/trunk/modules/scheme/value-json.cpp b/sca-cpp/trunk/modules/scheme/value-json.cpp
index 40cc8891dd..5045226db9 100644
--- a/sca-cpp/trunk/modules/scheme/value-json.cpp
+++ b/sca-cpp/trunk/modules/scheme/value-json.cpp
@@ -34,7 +34,7 @@ namespace scheme {
int valueJSON() {
const js::JSContext cx;
- failable<list<string> > s = json::writeJSON(valuesToElements(readValue(cin)), cx);
+ failable<list<string> > s = json::writeJSON(readValue(cin), cx);
if (!hasContent(s)) {
cerr << reason(s);
return 1;
diff --git a/sca-cpp/trunk/modules/scheme/value-xml.cpp b/sca-cpp/trunk/modules/scheme/value-xml.cpp
index 1508f7b516..7091d5c8ba 100644
--- a/sca-cpp/trunk/modules/scheme/value-xml.cpp
+++ b/sca-cpp/trunk/modules/scheme/value-xml.cpp
@@ -33,7 +33,7 @@ namespace tuscany {
namespace scheme {
int valueXML() {
- failable<list<string> > s = writeXML(valuesToElements(readValue(cin)));
+ failable<list<string> > s = writeXML(readValue(cin));
if (!hasContent(s)) {
cerr << reason(s);
return 1;
diff --git a/sca-cpp/trunk/modules/scheme/xml-value.cpp b/sca-cpp/trunk/modules/scheme/xml-value.cpp
index 0b95174e33..d88f754aa5 100644
--- a/sca-cpp/trunk/modules/scheme/xml-value.cpp
+++ b/sca-cpp/trunk/modules/scheme/xml-value.cpp
@@ -33,7 +33,7 @@ namespace tuscany {
namespace scheme {
int xmlValue() {
- const value v = elementsToValues(readXML(streamList(cin)));
+ const value v = readXML(streamList(cin));
cout << writeValue(v);
return 0;
}