<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body ocsi="0" fpstyle="1" bgcolor="#FFFFFF">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Dear colleagues,<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt"><br>
We are open to scientific collaborations or to engage a (paid) consultant for a clang project, in the wider context of the VINCIA collaboration for LHC Physics (vincia.hepforge.org).<br>
<br>
Basically, we want to extract special comments from the clang AST together with their context (where are they?). That information will be used to generate a high-level (human-like) flowchart of our code. It is a similar spirit to Doxygen, but here we want activity
 diagrams as the outcome.<br>
<br>
The most complete visual presentation of the project is here:<br>
https://dl.dropboxusercontent.com/u/36372825/current/index.html<br>
<br>
I can also quote a specific example, which illustrates the kind of difficulties that we face:<br>
<br>
========<br>
[file test.cpp]<br>
<br>
int main () {<br>
<br>
      /// [condition A]      <br>
      if(conditionStatement) {  <br>
      /// action 1<br>
      code<br>
      /// action 2           <br>
      code<br>
      }<br>
      /// [condition B]<br>
      else if(conditionStatement) {  <br>
      /// action 3<br>
      code<br>
      }<br>
      /// [condition C]<br>
      else{<br>
      code<br>
      }<br>
<br>
  return 0;<br>
} <br>
<br>
<br>
For this test source file, we would like to get the attached diagram [IFstatement.jpg]<br>
<br>
------<br>
<br>
Consider a (doxygen-like) comment such as "///action 2".<br>
We have to associate somehow this comment with the compound statement inside the if statement in the AST. The problem is that clang won't store in general that information. Only some comments before certain declarations / statements get properly stored in the
 AST. <br>
We can use a method such as RawCommentList to retrieve all the comments in a Translation Unit. Then, we would have to play with the source positions in the SourceManager to place these comments by hand inside the AST.<br>
<br>
Do you have any idea how to do this in practice?<br>
<br>
=========<br>
<br>
I'm looking forward to hearing your thoughts. Best regards,<br>
<br>
Juan J. Lopez-Villarejo<br>
on behalf of the VINCIA Collaboration<br>
</div>
</div>
</div>
</div>
</body>
</html>