That's normal read-string is : 

Sequentially read and evaluate the set of forms contained in the
string


So you have to read EVERY S-expressions in a loop. BUT 1x is not an 
S-Expr... Trying a number, but x doesn't work, Trying a symbol, but 1 as 
first char doesn't work.

The best way is to read the whole input string with pattern matching :

(spaces? (((number) (symbol?)) OR (symbol)))

For each match, you get an array of two for argument, with a null string in 
the second position if no symbol, else it's an operator. In fact, you just 
tokenize. But to do that you have to precise the syntax, with an EBNF for 
example.

To see the 4 main pattern matching of Clojure (symbol, int, frac, float) 
look 
at 
https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/EdnReader.java#L28.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to