Hi all, I want to parse a stream of text which comes from a java.io.Reader with https://github.com/Engelberg/instaparse.
But the stream of text will only start with what can be parsed by my grammar. The rest of the text stream must be consumed/parsed with some other grammar. I know of instparse's :total parse which can be used to "parse as much as possible" and it will give you what could not be parsed. But the text comes from a stream. And further processing will consume this (statefull) stream/Reader. I cannot just slurp the Reader, give instaparse the String and then process the String for the not-parsed-part. And I cannot unread that much (it's a PushbackReader). So my question is: is there a way to use instaparse with a Reader/Stream in such a way, that instaparse will consume exactly those Chars/Bytes that are "covered" by the resulting parse-tree and leave any following data un-read in the Reader? (Since it is a PushbackReader with buffersize=1 I could accept a "1-char-lookahead" read) Any idea? Henrik -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.