Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] some questions about CDT c/cpp parsing


hi,

 I've a few questions about how the CDT parser code is organised that I was hoping people on this list might be able to help with. I'm aware that there has been an active history in this area of code (?), so if some of the questions below are too broad brush to make sense then please say.


(a) is the parser(s) compliant with a particular standard?

(b) I've only heard of dom in the context of xml, but the code mentions both ast and dom. Is dom being used here in the same sense as ast? and just to confirm, in the pdom context its being used in a different context where it really is a higher-level representation than the ast?

(c) is there a way to tell which code on HEAD belongs to the current parser(s), and which is unused or to be phased out? e.g. by package?

(d) is there a way to hook into the parser to allow for vendor specific language customizations? (or at least tell the parser some sections are safe to ignore)

(e) the CModel also seems to store information about entities from the ast, is this something worth knowing more about when getting an overview of the source code parsing, or can it be considered independent? Maybe a better question is whether the pdom entities would replace some of the cmodel entities in the future?

(f) my understanding is that, at least in theory, you can't parse a c/cpp source file without specifying a set of macros which apply. How is this addressed by the parser, and also the pdom?

(g) are there different levels of parsing, for picking up a summary of the members of a source file? (I've seen there are constants for not following includes, but not e.g. skipping parsing the body of a function, assuming this is feasible)


I have attempted to answer some questions myself from the source code, but have been getting a little overwhelmed, so any help would be appreciated :).
thanks,
Andrew




*******************************************************************
*** Symbian Software Ltd is a company registered in England and
Wales with registered number 4190020 and registered office at 2-6
Boundary Row, Southwark, London, SE1 8HP, UK. This message is
intended only for use by the named addressee and may contain
privileged and/or confidential information. If you are not the
named addressee you should not disseminate, copy or take any action
in reliance on it. If you have received this message in error
please notify postmaster@xxxxxxxxxxx and delete the message and any
attachments accompanying it immediately. Neither Symbian nor any of
its Affiliates accepts liability for any corruption, interception,
amendment, tampering or viruses occurring to this message in
transit or for any message sent by its employees which is not in
compliance with Symbian corporate policy. *************************
*********************************************


Back to the top