From: Stefan S. <se...@sy...> - 2006-07-24 18:15:17
|
skaller wrote: > On Mon, 2006-07-24 at 10:13 -0400, Stefan Seefeld wrote: >> Grzegorz Jakacki wrote: >>> This is a problem with template parsing in OpenC++. No easy fix at the >>> moment, sorry. >> As some readers here know, this quite fundamental limitation of the OpenC++ >> parser has let me to rewrite the C++ parser / frontend from scratch as >> part of the Synopsis (http://synopsis.fresco.org) project. >> Since Synopsis started a couple of years ago from the same code base as >> OpenC++, its design is quite similar. (The first internal representation >> being built during parsing is a parse tree, for example.) >> >> The rewrite isn't complete yet, as there isn't any support for type analysis >> yet (which is required for correct parsing of non-trivial template declarations). >> However, since there hasn't been much development going on inside OpenC++ over the >> last couple of years, this may be a viable alternative for people interested >> into a free, iso-conformant C++ parser frontend. > > FWIW the Scott McPeak's Elsa, based on Elkhound, claims > full ISO C++ conformance except for template templates. Right. Elsa uses some interesting alternative approach (retaining all possible parse subtrees until at a later stage of semantic analysis the wrong ones can be eliminated). However, Synopsis, given its history, shares with OpenC++ one particular feature: the input data are fully preserved, thus making it particularly easy to write a 'minimally intrusive' and non-lossy source-to-source translator, since, after local modifications are applied to the parse tree / buffer, the latter is reserialized to a file. With other parsers you would have to generate the new code from scratch. Of course, that may not be a feature you are particularly interested in. Regards, Stefan -- ...ich hab' noch einen Koffer in Berlin... |