Re: new experimental C++ parser (branch)
Stefan Seefeld <[email protected]>
| Newsgroups | gmane.comp.documentation.synopsis |
|---|---|
| Message-ID | <[email protected]> |
Roman Yakovenko wrote: > On 10/24/05, Stefan Seefeld <[email protected]> wrote: > >>Roman Yakovenko wrote: >> >>>Why not to take C++ parser from gcc? >> >>There are a number of reasons: >> >>1) The generated intermediate representation is quite different >> from the one synopsis is using. > > > May be I wrong, but it seems to me that it should not be too difficult > to move from > one intermediate representation to an other The parser would need to be designed with such a requirement in mind. As it stands, changing IRs incures a lot of changes. Besides, the parser closely interacts with the lexer, symbol table, etc. >>2) It is written in C. > > > What wrong with it? You can't take advantage of some C++ features if half of the code is written in C (exception handling, notably). >>3) It is released under the GPL and thus not compatible with >> synopsis' LGPL. > > > That is really problem, but may be some parts of your code/product > could be released > under different license? Not really. If a central piece such as the parser is released under GPL, all code linking to it needs to, too. >>However, there is a big deal of inspiration I get from the gcc C++ >>parser, notably its handling of tentative parsing. > > > Are you going to build something similar to boost.wave ? It would be > nice to have > standard intermediate representation. While I'm obviously aiming at a good and generally useful set of representations, I'm not sure whether it is possible to come up with a one-size-fits-all representation. Finally, don't forget that I'm not rewriting synopsis. I'm just replacing the C++ parser code, making small adjustments to the rest. Regards, Stefan