To my

>> Has the library a function that breaks a string to the Spad lexemes?
>> In DoCon, I use the Haskell lexemes for this and the corresponding 
>> library function for breaking to lexemes (and this also defines what 
>> is a lexeme).

Waldek Hebish wrote

> You may with to look at Lisp function READ-FROM-STRING.  One can
> use it to convert string into arbitrary Lisp data.  In particular
>
> (1) -> READ_-FROM_-STRING("(|powerProduct| 4 1 2)")$Lisp
>
>   (1)  (powerProduct 4 1 2)                        : SExpression

> that is you may easily get list of whatever entries you need.
> The return type of calls to Lisp function is SExpression, but one 
> can convert it to apropriate type.


1. I guess,  `$Lisp'  is a package calling.
   And  Browse - Lisp - packages  reports that there is no package
   named Lisp.

2.  READ_-FROM_-STRING("cons (I 23) cons (I 12) NIL")$Lisp
yields
    CONS                                Type: SExpression   

But how to part the remaining lexemes?
Rather the result needs to be 

 [CONS,  "(I 23) cons (I 12) NIL"]  
                                  Type: Product(SExpression, String).  
Am I missing something?

3. It is desirable to have a  _function from the standard Axiom library_ 
(hence, and a documented one). Because the language of Spad/Axiom is 
somehow defined (?), fixed, and announced. A lexeme notion is a part of 
the syntax, each programming language defines what is its lexeme. 
Hence it is reasonable to provide a function in the standard library 
which breaks a string into lexemes.
If  f == READ_-FROM_-STRING  is not documented as standard, then f is 
not mandatory. Then the developers may write for the next FriCAS release 
"We changed the implementation: removed such and such lexer ... and
READ_-FROM_-STRING is no longer valid". 
And the applications based on f will break and will need to change 
their code.
In this sense, how reliable are  READ_-FROM_-STRING,  and other items
from the Lisp package?
Where to find the description for these items? 

Thanks,

------
Sergei
[email protected]


-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to