General concepts of grammar and file-parsing
Sebastian Gsänger <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <CAORbcvS98LCLkemVg5c99cq3OALs4TT-=-at+D1pSxT+-9uUdA@mail.gmail.com> |
Hello, I'm new to spirit and have the growing feeling that I'm missing some key-points in understanding the architecture. I wrote a (so far, working) grammar for xyz-files. Now i'm stuck in integrating this with the actual file-handling. I figured, the stream-interface would be preferable to the iterator-interface as it's not only less verbose than phrase_parse, but should work on both ifstreams and stringstreams. But now i don't get it to accept my grammar (which has, in fact, a mandatory iterator-argument), and am wondering if this is intentional... So my main questions are: Are the two interfaces even meant to be interchangeable? Is there a different way to create and compose rules? Or is it preferable to utilize a modified iterator as in http://boost-spirit.com/home/2010/01/05/stream-based-parsing-made-easy/ ? And - somewhat unrelated - is it possible to embed rules with a skipper inside rules or a grammar without a skipper? Respectively, utilize skipping rules inside the context of qi::parse? Thank you for your help, Sebastian ------------------------------------------------------------------------------ _______________________________________________ Spirit-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spirit-general