This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-05
Channels
- # admin-announcements (10)
- # beginners (18)
- # boot (29)
- # capetown (2)
- # cider (46)
- # cljs-dev (1)
- # cljsrn (69)
- # clojure (126)
- # clojure-android (9)
- # clojure-gamedev (3)
- # clojure-greece (16)
- # clojure-poland (13)
- # clojure-russia (45)
- # clojure-spec (27)
- # clojure-uk (21)
- # clojurescript (99)
- # cursive (1)
- # datascript (1)
- # datomic (42)
- # functionalprogramming (10)
- # hoplon (47)
- # instaparse (12)
- # jobs (5)
- # jobs-rus (9)
- # keechma (22)
- # lein-figwheel (8)
- # leiningen (5)
- # luminus (1)
- # mount (7)
- # off-topic (1)
- # om (15)
- # onyx (47)
- # other-languages (14)
- # planck (28)
- # proton (8)
- # re-frame (30)
- # reagent (15)
- # remote-jobs (3)
- # slack-help (2)
- # untangled (9)
- # yada (6)
@aengelberg: I'm trying to make blank lines in one parser flag as :blank
, but they're staying as empty seqs.
Parser: http://sprunge.us/RcOf
Tester: http://sprunge.us/GGdK
currently that parser doesn't account for any newlines (`\n`) between the lines / blank lines, is that intentional?
The library I'm modifying reads the file into a line-seq initially, so I'm mostly just going with that.
@aengelberg: Think it would be easier if it was parsing the original, and not a line-seq?
it may be useful to, instead of line-seq, use a different parser on the original input that identifies the sections / subsections but not the inline syntax.
Yeah. I'm already splitting it into multiple instaparsers. I take it insta can handle multi-line input?
yeah, just make sure all your strings / regexes handle them. All characters are equal citizens in instaparse input, it's up to the grammar to handle what it wants to handle. And make sure the grammar handles CRLFs (`\r\n`) which may appear.
@aengelberg: So make sure my regexps are multi-line and whatnot?
e.g. .
inside a regex matches any non-newline character
also, \s
inside a regex handles any kind of whitespace (including newlines)