Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Re: CDT Parsing Callback


Cool Alain, I just wanted to know my features up front. :-)

I am unsure as to why you believe that we do not need to parse function bodies in order to provide the search feature.  Searching for references is the meat of the overall feature, in my opinion.  

Anyway, currently our parser is not structured in a way that makes the type of callback you are talking about simple.  We do not maintain an AST, so there are no "function" objects that we can pass into a requestor.  However, that is a direction we are thinking about going, since between the DOM (outside the parser) and the symbol table (inside the parser), we could have the equivalent of a full AST given a bit of refactoring.  Also, the further into the C++ grammar I get, the more ambiguities I discover, and I think it is becoming clear that the cost of backtracking out of ambiguous decisions is much more difficult to do from multiple clients. We are currently analyzing the pros and cons of moving to an AST solution.

 I am interested in providing a dead-accurate search much like the JDT; however, C++ is seriously more complex regarding how references and names are resolved at compile time ( function overloading, implicit casts, user defined conversion operators, template specializations and implicit instantiations) and there is a lot of work to be done here on the parser side.  If you have any ideas on what you would like a new callback interface to look like, feel free to send it to me, or maybe we could meet later this week to try and make sure that your indexer work is not held up by these parser work-items.

Cheers,
JohnC



"Alain Magloire" <alain@xxxxxxx>
Sent by: cdt-dev-admin@xxxxxxxxxxx

05/06/2003 05:15 PM
Please respond to cdt-dev

       
        To:        cdt-dev@xxxxxxxxxxx
        cc:        
        Subject:        Re: [cdt-dev] Re: CDT Parsing Callback



>
> This is a multipart message in MIME format.
> --=_alternative 0071003D85256D1E_=
> Content-Type: text/plain; charset="US-ASCII"
>
> I do plan to formalize some external interfaces for the work that we have
> done (and plan to do) in the next CDT release (2.0?).  That being said,
> IParserCallback is not yet near complete, as the parser still does not
> parse statements and expressions fully.
>
> Referring to internal interfaces within the CDT core is not pretty, but
> its not the end of the world either. :-)  My concern in creating an
> external interface too early is that we are still in the process of
> scoping out the work required to be done for the next release; I would be
> interested in discovering (soon!) the parser-related requirements that
> your CDT-based products (Momentics, TimeStorm, etc.), as right now we are
> focusing on getting the indexer/search enabled.
>

I was not thinking of the CDT-based products, the callback is necessary for the CDT
to get things like indexer/search/StructureCreator etc .. working.

An example, is how JDT is doing the indexer.  The callback is

                ISourceElementRequestor {
                                 void acceptImport(..);
                                 void acceptMethod(..);
                                 ...
                }

The indexer implements this and passes it to the JavaParser and when
the elements are found adds them to the index table.

The same for the JavaStructureCreator, the callback is to get the elements
and the result is shown in a visual diff.

My opinion is that we probably do not need to drill inside the blocks(well
we'll have to reevaluate for Code Assist/Completion ...) at the moment, meaning we
do not need the entire AST, no need for statements/expressions etc ..

What the new parser is currently providing is enough.  What it does not provide
is a way to get the elements:

                ICSourceElementRequestor {
                                 void acceptInclude(...);
                                 void acceptFunction(...);
                }


We used to have a IParserCallBack, but it is inadequate/incomplete to be
of real use.

> BTW, Sebastien, are we having a conference call tomorrow?
>
> JohnC
>
>
>
>
>
> "Douglas Schaefer" <dschaefe@xxxxxxxxxx>
> 05/06/2003 11:31 AM
> Please respond to cdt-dev
>  
>         To:     cdt-dev@xxxxxxxxxxx
>         cc:
>         Subject:        [cdt-dev] Re: CDT Parsing Callback
>
>
> Moving to dev list.
>
> We basically put the interfaces in internal because we didn't feel they
> were ready to make public.  We should start moving them now as they start
> to mature.  I'll let John C handle the details.
>
> Cheers,
> Doug Schaefer
> Rational Software - IBM Software Group
> Ottawa, Ontario, Canada
>
>
>
>
> "Alain Magloire" <alain@xxxxxxx>
> 05/06/2003 10:26 AM
>  
>         To:     jcamelon@xxxxxxxxxxxx, hamer@xxxxxxxxxxxx
>         cc:     Douglas Schaefer/Ottawa/IBM@IBMCA, dinglis@xxxxxxx
>         Subject:        CDT Parsing Callback
>
>
>
> Bonjour
>
>                  The new parser does not provide a visible(1) callback
> mechanism.
> The old callback provided by the old parser was not extensible enough.
> Any ideas on where to start.
>
>
> (1) visible: meaning it is public an not under a org.eclipse.*.internal.*
> The *internal* package name is reserve fo the implementation see eclipse
> coding
> conventions.
>
>
> P.S.:  I was not sure if you folks wanted to start this in the cdt-*
> mailing list.
> If you prefer, I can resend this email to the cdt-core-dev.
>
>
>
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/cdt-dev
>
>
> --=_alternative 0071003D85256D1E_=
> Content-Type: text/html; charset="US-ASCII"
>
>
> <br><font size=2 face="Courier New">I do plan to formalize some external
> interfaces for the work that we have done (and plan to do) in the next
> CDT release (2.0?). &nbsp;That being said, IParserCallback is not yet near
> complete, as the parser still does not parse statements and expressions
> fully. </font>
> <br>
> <br><font size=2 face="Courier New">Referring to internal interfaces within
> the CDT core is not pretty, but its not the end of the world either. :-)
> &nbsp;My concern in creating an external interface too early is that we
> are still in the process of scoping out the work required to be done for
> the next release; I would be interested in discovering (soon!) the parser-related
> requirements that your CDT-based products (Momentics, TimeStorm, etc.),
> as right now we are focusing on getting the indexer/search enabled.</font>
> <br>
> <br><font size=2 face="Courier New">BTW, Sebastien, are we having a conference
> call tomorrow?</font>
> <br>
> <br><font size=2 face="Courier New">JohnC</font>
> <br>
> <br>
> <br>
> <br>
> <table width=100%>
> <tr valign=top>
> <td>
> <td><font size=1 face="sans-serif"><b>&quot;Douglas Schaefer&quot; &lt;dschaefe@xxxxxxxxxx&gt;</b></font>
> <p><font size=1 face="sans-serif">05/06/2003 11:31 AM</font>
> <br><font size=1 face="sans-serif">Please respond to cdt-dev</font>
> <td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
> <br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To:
> &nbsp; &nbsp; &nbsp; &nbsp;cdt-dev@xxxxxxxxxxx</font>
> <br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc:
> &nbsp; &nbsp; &nbsp; &nbsp;</font>
> <br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject:
> &nbsp; &nbsp; &nbsp; &nbsp;[cdt-dev] Re: CDT Parsing Callback </font></table>
> <br>
> <br>
> <br><font size=2><tt>Moving to dev list.<br>
> <br>
> We basically put the interfaces in internal because we didn't feel they
> <br>
> were ready to make public. &nbsp;We should start moving them now as they
> start <br>
> to mature. &nbsp;I'll let John C handle the details.<br>
> <br>
> Cheers,<br>
> Doug Schaefer<br>
> Rational Software - IBM Software Group<br>
> Ottawa, Ontario, Canada<br>
> <br>
> <br>
> <br>
> <br>
> &quot;Alain Magloire&quot; &lt;alain@xxxxxxx&gt;<br>
> 05/06/2003 10:26 AM<br>
>  <br>
>  &nbsp; &nbsp; &nbsp; &nbsp;To: &nbsp; &nbsp; jcamelon@xxxxxxxxxxxx, hamer@xxxxxxxxxxxx<br>
>  &nbsp; &nbsp; &nbsp; &nbsp;cc: &nbsp; &nbsp; Douglas Schaefer/Ottawa/IBM@IBMCA,
> dinglis@xxxxxxx<br>
>  &nbsp; &nbsp; &nbsp; &nbsp;Subject: &nbsp; &nbsp; &nbsp; &nbsp;CDT Parsing
> Callback<br>
> <br>
> <br>
> <br>
> Bonjour<br>
> <br>
>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; The new parser
> does not provide a visible(1) callback <br>
> mechanism.<br>
> The old callback provided by the old parser was not extensible enough.<br>
> Any ideas on where to start.<br>
> <br>
> <br>
> (1) visible: meaning it is public an not under a org.eclipse.*.internal.*<br>
> The *internal* package name is reserve fo the implementation see eclipse
> <br>
> coding<br>
> conventions.<br>
> <br>
> <br>
> P.S.: &nbsp;I was not sure if you folks wanted to start this in the cdt-*
> <br>
> mailing list.<br>
> If you prefer, I can resend this email to the cdt-core-dev.<br>
> <br>
> <br>
> <br>
> _______________________________________________<br>
> cdt-dev mailing list<br>
> cdt-dev@xxxxxxxxxxx<br>
> http://dev.eclipse.org/mailman/listinfo/cdt-dev<br>
> </tt></font>
> <br>
> --=_alternative 0071003D85256D1E_=--
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/cdt-dev
>


--
au revoir, alain
----
Aussi haut que l'on soit assis, on est toujours assis que sur son cul !!!

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top