Question: parsing multi-line strings
maryrosecook opened this issue · 4 comments
Hiya. Really enjoying using parsley. I've got a grammar up and running that can parse a number of different expressions. However, I'm struggling with defining the rules to allow lists of expressions where each expression is separated by a new line. For example:
"a\na\na\n"
I thought this grammar would parse the string above:
(def parse (parser { :main :block, :space :ws?, :root-tag :root }
:block [#"i" #"\n" :+]
:ws #"[ \t\r]+"
))
But I get a shift/reduce error. Could you offer me any pointers?
Thanks a lot.
Hi Mary-Rose,
It's #1 on my todo list. Technically Parsley has no lookup so blocks need an end delimiter.
I've got the relevant paper at hand, I just need time.
Sorry for the answer.
Ah, OK. Thanks. It's good to know I wasn't going crazy! Thank you for the prompt reply.
FWIW, I'd love to see handling for such cases included. I know you've been busy with other projects the last several months, but is there still a chance this will make it into parsley at some point?
Thanks for all your work!
Is this issue closed ?