Fork me on GitHub
#instaparse
<
2015-06-16
>
lucasbradstreet02:06:27

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.

aengelberg02:06:57

@lucasbradstreet sweet!!! any plans to include tracing features? or is that not as applicable to cljs?

aengelberg02:06:41

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

lucasbradstreet02:06:45

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 ;)

lucasbradstreet02:06:30

Ah, yeah, if that's required I'll probably pass on it for now.

canweriotnow23:06:40

@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.

canweriotnow23:06:01

We'll submit an issue (or hopefully PR) when we track it down.

aengelberg23:06:20

Yeah, playing around in my REPL, the %x41 does not work for some reason.

aengelberg23:06:36

Should be (string (apply str (coerce-char (char-codes num1)))))

lucasbradstreet23:06:24

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.

aengelberg23:06:05

@lucasbradstreet Actually I can't really tell what the purpose of char-codes is.

aengelberg23:06:22

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.

lucasbradstreet23:06:38

Just off the top of my head it is to deal with multibyte chars by getting each byte (charCodeAt)

canweriotnow23:06:43

hmm.. maybe %x41-57 didn't actually work, but just didn't throw like %x41... need to dig deeper.

canweriotnow23:06:45

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