Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to support queries for a new language #15177

Sucan2 started this conversation in General
Discussion options

If I want to support querying a new language X, what kind of adaptations and modifications do I need to make in which modules or subfolders? Are there any development manuals and documentation?

You must be logged in to vote

Replies: 1 comment 5 replies

Comment options

Creating an extractor for a new language is not a simple process. We currently don't have any documentation on how to do this. You would need to:

  • Create an extractor pack that converts source code into TRAP files
  • Define a db scheme that determines how the TRAP files are put into database tables
  • Define a core set of queries to work with the new language.

What is the language you want to do this for and what is your use case?

You must be logged in to vote
5 replies
Comment options

I want to combine CodeQL with CPG, so I would like to know the principles of CodeQL when performing queries and which interfaces and methods are called during the query execution.

Comment options

Comment options

Thank you for your reply. yes, I've read QL language reference recently, and I've written a few queries and checked the query logs, but I don't have any idea of using codeql ql to query CPG(Code Property Graph), what should I do?

Comment options

We don't have any public documentation on how to create an extractor for a new language. Though, I'm not exactly sure what you are trying to do. It sounds like you have Code Property Graph data for a program that you want to add to a database? Which language are you working in?

Comment options

I want to store CPG of multiple languages into the database and then perform queries through QL. I came to know that due to the unavailability of the parsing engine part as open source in Codeql, this task can not be achieved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /