Re: Overcoming AST forward declaration (includes online example)
Michael Powell <[email protected]> Fri, 2 Nov 2018 20:25:17 -0400
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <CAMEoF_E9vvG-3u8fg5pG3a2Mowfz6Xjm_pcupx_uUiAqqmGQ8A@mail.gmail.com> |
On Fri, Nov 2, 2018 at 7:41 PM Larry Evans <[email protected]> wrote: > > On 11/2/18 5:56 PM, Michael Powell wrote: > [snip] > > Much of which is simply drawn from the Protobuf v2 specification on > > its face. If there's a more elegant or better way to do that, I'm open > > to suggestions. > > > > > https://developers.google.com/protocol-buffers/docs/reference/proto2-spec#fields > > > > The goal of the suggested simplification is not to solve, > immediately, your ultimate goal of a parser for the > proto2-spec#fields, it is to understand why the qi parser is > failing to compile the current version of a necessarily > complicated grammar for the proto2-spec#fields. By doing > the suggested simplification and trying to compile the > simplifications, you'll narrow down the cause of the problem > for the full grammar and, hopefully, you might be able to > see a solution. > > The problem solution method of simplifying the grammar has > been suggested many times before on this mailing list. > > > But this is not my block right now. My block is the MessageBlock > > forward declaration, or, rather, how to solve that issue. > > You'd have a better chance of removing that block if you > narrowed down the cause of the block by simplifying the > grammar to the smallest subgrammar that reproduces the > problem. Look, I do not need the lecture on grammar simplification. I get it re: troubleshooting *grammar*. This is not my question; my question is to do with the AST itself, and how good, better, best to work through, under, around, over, whatever, the MessageBody (AST) forward declaration issue. As for grammar simplifications, I'm working pretty much from the specification on its face, with a couple of "simplifications" around author laziness, i.e. trivial things like "quot proto quot", where: quot= "\'" | "\"". But this is not the scope of my question. > -regards, > Larry Thanks for the tips. Anyone else with tips germane to the question? > _______________________________________________ > Spirit-general mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/spirit-general