Just for the record...
> 1) What would be the boot code to write out doclist into a file?
> 2) Can FriCAS make it the default to write that file into the respective
> .NRLIB directory?
> 3) How to read that file from within .spad code to optain an
> SExpression?
Obviously, it's easier than I first thought.
After
)read docprint.input
)compile fricas/src/algebra/catdef.spad
s := RHXREAD("SetCategory")$Lisp
destruct s
I get what I want.
Ralf
[
(constructor
("++ Author:" "++ Basic Functions:" "++ Related Constructors:"
"++ Also See:" "++ AMS Classifications:" "++ Keywords:"
"++ References:" "++ Description:"
"++ \spadtype{SetCategory} is the basic category for describing
a colle
ction"
"++ of elements with \spadop{=} (equality) and \spadfun{coerce}
to outp
ut form."
"++" "++ Conditional Attributes:"
"++ canonical\tab{15}data structure equality is the same as
\spadop{
=}"
)
)
,
((hash ((SingleInteger) %))
" ++ hash(s) calculates a hash code for s.")
,
((hashUpdate! ((HashState) (HashState) %))
" ++ hashUpdate!(hs, s) computes new HashState from old and s"
" ++ used for incremental computation of hash values."
" ++ hashUpdate! might destructively work on its first
argument.")
,
((latex ((String) %))
" ++ latex(s) returns a LaTeX-printable output"
" ++ representation of s.")
]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/4adb8cef-7fc6-933c-2cee-ee2e1f31fdda%40hemmecke.org.
For more options, visit https://groups.google.com/d/optout.
)lisp (defun rhxwrite (op doclist) (with-open-file (stream (concat op ".rhx")
:direction :output :if-exists :overwrite :if-does-not-exist :create) (prin1
doclist stream) (close stream)))
)lisp (defun rhxread (op) (with-open-file (stream (concat op ".rhx") :direction
:input) (setq rhx (read stream)) (close stream) rhx))
)read ../docprint.boot
transDocList($constructorName,doclist) == --returns ((key line)...)
--called ONLY by finalizeDocumentation
--if $exposeFlag then messages go to file $outStream; flag=nil by default
sayBrightly ['" Processing ",$constructorName,'" for Browser database:"]
RHXWRITE(PNAME $op, REVERSE doclist)
commentList := transDoc($constructorName,doclist)
acc := nil
for entry in commentList repeat
entry is ['constructor,x] =>
conEntry => checkDocError ['"Spurious comments: ",x]
conEntry := entry
acc := [entry,:acc]
conEntry => [conEntry,:acc]
checkDocError1 ['"Missing Description"]
acc