[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] 20080917.02.wsp.patch (mkfunc.spad add parse function)
From: |
daly |
Subject: |
[Axiom-developer] 20080917.02.wsp.patch (mkfunc.spad add parse function) |
Date: |
Thu, 18 Sep 2008 00:31:37 -0500 |
Add the parse function to InputForm domain.
======================================================================
diff --git a/changelog b/changelog
index 29c2f46..c184379 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080917 wsp src/algebra/mkfunc.spad add parse to InputForm
20080917 tpd books/bookvol10.2 remove duplicate function def in FLAGG
20080916 tpd books/ps/v102streamaggregate.ps
20080916 tpd books/ps/v102listaggregate.ps
diff --git a/src/algebra/mkfunc.spad.pamphlet b/src/algebra/mkfunc.spad.pamphlet
index 6a34b58..6f7c67a 100644
--- a/src/algebra/mkfunc.spad.pamphlet
+++ b/src/algebra/mkfunc.spad.pamphlet
@@ -68,6 +68,8 @@ InputForm():
++ unparse(f) returns a string s such that the parser
++ would transform s to f.
++ Error: if f is not the parsed form of a string.
+ parse : String -> %
+ ++ parse is the inverse of unparse. It parses a string to InputForm.
declare : List % -> Symbol
++ declare(t) returns a name f such that f has been
++ declared to the interpreter to be of type t, but has
@@ -139,6 +141,9 @@ InputForm():
atom?(s:% := form2String(x)$Lisp) => strsym s
concat [strsym a for a in destruct s]
+ parse(s:String):% ==
+ ncParseFromString(s)$Lisp
+
declare signature ==
declare(name := new()$Symbol, signature)$Lisp
name
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Axiom-developer] 20080917.02.wsp.patch (mkfunc.spad add parse function),
daly <=