On Mon, 20 Dec 2010, Derek M Jones wrote:

> Julia,
> 
> > Thanks for the links.  There do seem to be some C++ parsers out there in
> > addition to clang, which was already mentioned.  For the moment, I don't
> > really know the problems in parsing C++ well enough to appreciate the
> > solutions...
> 
> Parsing C++ is very hard because not only does a symbol table have
> to be built but the what symbols get created depends on the
> construct being parsed, which might depend on what's in the symbol
> table ... see:
> http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.27.1117
> 
> Some good examples of the problems are discussed in this thesis:
> http://www.computing.surrey.ac.uk/research/dsrg/fog/fog/fog/v1/FogThesis.pdf

Thanks.  Just from lookingat the abstract, I was indeed thinking that 
perhaps some of the problems would be better resolved during type 
checking.  That is, one could parse something in one probable way, and 
then if the types didn't work out, rearrange the abstract syntax tree in 
some way that would type check.  Since we are making a complete system, 
we don't need a standalone parser that always does the right thing.  But I 
am only talking about the difference between templates and < ...

julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to