Howdy. instaparse-cljs 1.4.0.0-SNAPSHOT works with Clojure 1.7 now. Recent fixes from v1.3.5-1.4.0 haven't been ported to cljs yet.
@lucasbradstreet sweet!!! any plans to include tracing features? or is that not as applicable to cljs?
A lot of the hacky namespace reloading would probably be not doable on the cljs side. So maybe it would hit performance a little bit to include conditional tracing everywhere
Depends on how hard it is to support. I can't throw too much more time into this for now. I think it usually makes sense to dev the parser in CLJ first, though instaparse-live may have changed my mind ;)
Ah, yeah, if that's required I'll probably pass on it for now.
@lucasbradstreet: awesome. We're digging to find issues with processing certain chars or ranges in the cljs port... “%x41-57” works, but “%x41” doesn’t. “%x79-7A” doesn’t... possibly one of the char fns in instaparse.abnf (cljs) - clj version works fine.
We'll submit an issue (or hopefully PR) when we track it down.
Yeah, playing around in my REPL, the %x41 does not work for some reason.
https://github.com/lbradstreet/instaparse-cljs/blob/master/src/cljs/instaparse/abnf.cljs#L118
Should be (string (apply str (coerce-char (char-codes num1)))))
Ah cool. I won't have much time to push these changes atm but if you want to send me a PR I'll merge it.
Wow, awesome
@lucasbradstreet Actually I can't really tell what the purpose of char-codes is.
It seems to take a character (possibly unicode) and split it into two characters. but at the REPL it doesn't seem to do that.
Just off the top of my head it is to deal with multibyte chars by getting each byte (charCodeAt)
hmm.. maybe %x41-57
didn't actually work, but just didn't throw like %x41
... need to dig deeper.
The thing we're doing is generating parsers for various URI/IRI schemes from the ABNF in their respective RFCs, so we're problably hitting edge cases like crazy :simple_smile: