swaroopch / edn_format

EDN reader and writer implementation in Python, using PLY (lex, yacc)
https://swaroopch.com/2012/12/24/edn-format-python/
Other
131 stars 31 forks source link

Add edn_format.loads_all to parse all expressions in a string #60

Closed bfontaine closed 4 years ago

bfontaine commented 4 years ago

This mirrors clojure.edn/read-string’ that returns nil on empty strings, instead of failing on an EOF error.

As I understand the edn spec, the input can (should?) be treated as a stream of values rather than only a single value:

A use of edn might be a stream or file containing elements […].

There is no enclosing element at the top level. Thus edn is suitable for streaming and interactive applications.

bfontaine commented 4 years ago

I added one example line in the README.