instaparse

If you're not trampolining your parser, why bother getting up in the morning?
lucasbradstreet 2015-06-16T02:00:27.000016Z

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.

aengelberg 2015-06-16T02:02:15.000017Z

cc @canweriotnow

aengelberg 2015-06-16T02:02:57.000019Z

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

aengelberg 2015-06-16T02:04:41.000020Z

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

lucasbradstreet 2015-06-16T02:04:45.000021Z

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

lucasbradstreet 2015-06-16T02:05:30.000022Z

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

canweriotnow 2015-06-16T23:34:40.000025Z

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

canweriotnow 2015-06-16T23:35:01.000026Z

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

aengelberg 2015-06-16T23:39:20.000027Z

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

aengelberg 2015-06-16T23:46:36.000030Z

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

lucasbradstreet 2015-06-16T23:47:24.000031Z

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.

canweriotnow 2015-06-16T23:48:57.000032Z

Wow, awesome

aengelberg 2015-06-16T23:49:05.000033Z

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

aengelberg 2015-06-16T23:49:22.000034Z

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.

lucasbradstreet 2015-06-16T23:52:38.000035Z

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

canweriotnow 2015-06-16T23:57:43.000037Z

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

canweriotnow 2015-06-16T23:59:45.000038Z

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: