Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving from Eclipse CDT to tree-sitter #608

Open
1 of 3 tasks
oxisto opened this issue Nov 10, 2021 · 4 comments
Open
1 of 3 tasks

Moving from Eclipse CDT to tree-sitter #608

oxisto opened this issue Nov 10, 2021 · 4 comments
Assignees
Labels
cxx Related to C/C++ language parsing

Comments

@oxisto
Copy link
Member

oxisto commented Nov 10, 2021

We want to deprecate Eclipse CDT for various reasons and replace it with tree-sitter.

We will first build up the new frontend in parallel to the old one and then deprecate and replace the old one.

Should also fix

Depends on

@oxisto oxisto added the cxx Related to C/C++ language parsing label Nov 10, 2021
@peckto
Copy link
Collaborator

peckto commented Apr 22, 2022

I just noticed, that tree-sitter is also not resolving everything correctly:
tree-sitter/tree-sitter-c#99

Did you also come along similar problems?
I'm still not sure, if this is a bug or intended limitation of tree-sitter.
If this is a limitation, we need to solve this in the cpg our own.

@oxisto
Copy link
Member Author

oxisto commented Apr 22, 2022

I just noticed, that tree-sitter is also not resolving everything correctly: tree-sitter/tree-sitter-c#99

Did you also come along similar problems? I'm still not sure, if this is a bug or intended limitation of tree-sitter. If this is a limitation, we need to solve this in the cpg our own.

Just to be aware: we are using https://github.com/tree-sitter/tree-sitter-cpp

@peckto
Copy link
Collaborator

peckto commented Apr 22, 2022

This does also apply to the cpp parser.

@oxisto
Copy link
Member Author

oxisto commented Apr 23, 2022

I am beginning to think that hooking into LLVM / libclang is becoming a more and more viable option. It seems that there is a class called https://clang.llvm.org/doxygen/classclang_1_1ExternalSemaSource.html which can be hooked into to create (missing) variable declarations and types on the fly. It would however mean that we would need some kind of C++ frontend written in C++ that sort of hooks back into the JVM; not sure about this. I will try to get a mini sample running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cxx Related to C/C++ language parsing
Projects
None yet
Development

No branches or pull requests

3 participants