> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-server/10.6/extension-guide/developing-a-plugin/supporting-new-languages.md).

# Supporting new languages

Six steps to support new languages in SonarQube Server 10.6.

{% hint style="info" %}
**For AI agents:** You're in the SonarQube Server 10.6 documentation. For a list of all 10.6 pages, see the [SonarQube Server 10.6 page index](https://3001318305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVhGCsZJo9Ao0Jjyhvpxl%2Fuploads%2Ff9vLtbQH3RPKLlpDPMG5%2Fsonarqube-server-10.6-llms.txt?alt=media). For the whole site, see the [page index](https://docs.sonarsource.com/llms.txt) or the [full text](https://docs.sonarsource.com/llms-full.txt). For another version, replace 10.6 in the URL with that version. The [latest version](https://docs.sonarsource.com/sonarqube-server/) has no version number in its URL.
{% endhint %}

The steps to cover a new programming language are:

1. Write the grammar. This is the hardest part.
2. Write a parser (a parser simply parses an input based on your grammar to yield a parse tree).
3. Test your grammar, to ensure it is able to parse real-life language files.
4. Write a few parse tree visitors. Some visitors will compute metrics such as [Executable lines](/sonarqube-server/10.6/extension-guide/developing-a-plugin/executable-lines.md), while others will enforce [Adding coding rules](/sonarqube-server/10.6/extension-guide/adding-coding-rules.md). A dozen or so visitors are sufficient for an initial release.
5. Write a scanner Sensor, in a SonarQube Server plugin, to launch the visitors.
6. Compute
   1. issues
   2. raw measures
   3. code duplications
   4. syntax highlighting
   5. symbol table
   6. coverage information (lines/branches to cover, line/branch hits)

In fulfilling these steps, the [Sonar Language Recognizer (SSLR)](https://github.com/SonarSource/sslr) can be an important resource.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/sonarqube-server/10.6/extension-guide/developing-a-plugin/supporting-new-languages.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
