I managed to get it working. The trick was parsing line breaks separately so they could be used to delimit lines (imagine that). I couldn't just parse :line_break.as(:character) since a line break could be "\r\n" and that is two characters.
Thanks for your help. Everything is merged into master, and I deleted the heredoc branch. On Wed, May 22, 2013 at 11:21 AM, Kaspar Schiess <[email protected]>wrote: > On 22.05.13 16:34, Thomas Ingram wrote: > > Doh! The feature is in a branch: `git checkout heredoc`. > > Thanks. This is what I come up with - Obviously breaking some other > specs - but I think those might be fixable: > https://gist.github.com/kschiess/f66505e0465715de06b9 > > Also: I suggest you test your parser rules in isolation, as demonstrated > - error messages become much more useful. > > Honestly, this is a translation from english to parslet, I wasn't able > to fix your code. Someone else up to the task? > > regards, > kaspar > > > > -- Thomas Ingram
