Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] help

Hi,


as often this depends on your use case, e.g. what c++ version you want to parse, if you want to utilize the index etc.

Using the cdt parser in general works very well (with and without the index).

An alternative would be to use the clangd language server, which has an extension[1]  to query the AST.


Best regards,

Dominic


[1] https://clangd.llvm.org/extensions#ast


On 10/6/23 13:31, Philip Schroeder via cdt-dev wrote:
Hello,
I do not know about anything but would be interested in the solution as well.
What I found on the internet was the following:
https://wiki.eclipse.org/CDT/designs/Overview_of_Parsing

Me personally, I am normally using bison for parsing:

https://www.gnu.org/software/bison/manual/html_node/A-Simple-C_002b_002b-Example.html

Good luck and best regards

Philip.

On Fri, Oct 6, 2023 at 12:35 PM Promod Kumar via cdt-dev <cdt-dev@xxxxxxxxxxx> wrote:

Hi all,

 

I am currently working on a project where I need to parse C, C++, and Assembly code to extract the executable lines, excluding commented lines. To achieve this, I have started experimenting with the ASTParser, Is there a better approach to this?

 

Regards,

Promodkumar

 

 

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Back to the top