Fork me on GitHub
#instaparse
<
2016-07-05
>
seylerius00:07:38

@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

aengelberg00:07:18

currently that parser doesn't account for any newlines (`\n`) between the lines / blank lines, is that intentional?

seylerius00:07:42

The library I'm modifying reads the file into a line-seq initially, so I'm mostly just going with that.

seylerius19:07:37

@aengelberg: Think it would be easier if it was parsing the original, and not a line-seq?

aengelberg19:07:27

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.

seylerius19:07:11

Yeah. I'm already splitting it into multiple instaparsers. I take it insta can handle multi-line input?

aengelberg19:07:03

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.

seylerius22:07:16

@aengelberg: So make sure my regexps are multi-line and whatnot?

aengelberg22:07:44

e.g. . inside a regex matches any non-newline character

aengelberg22:07:52

also, \s inside a regex handles any kind of whitespace (including newlines)

seylerius22:07:54

Good caveats to know, thanks