# Is there a publicly available grammar for the DQL language?

**URL:** https://discuss.dgraph.io/t/is-there-a-publicly-available-grammar-for-the-dql-language/19290
**Category:** App Development
**Tags:** dql
**Created:** [April 19, 2024, 10:53am UTC](https://discuss.dgraph.io/t/is-there-a-publicly-available-grammar-for-the-dql-language/19290 "2024-04-19T10:53:28Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![omarfres](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/omarfres/32/11596_2.png) [@omarfres](https://discuss.dgraph.io/u/omarfres)
#### Post date: [April 19, 2024, 10:53am UTC](https://discuss.dgraph.io/t/is-there-a-publicly-available-grammar-for-the-dql-language/19290/1 "2024-04-19T10:53:28Z")

</div>

Hello everyone,

I have been looking for a formal specification of the DQL language in the form of a context-free grammar (for example, in EBNF notation), but I haven’t found it yet. Is there any document or file where I can find it? Could anyone provide it to me?

I noticed that since the beginnings of Dgraph there have been some comments about this (see [ANTLR for parsing languages and specs](https://discuss.hypermode.com/t/antlr-for-parsing-languages-and-specs/1097), and I haven’t found anything in the repository regarding this (although I have found the parser, but I want to avoid reverse engineering to deduce the grammar, as well as automatic grammar inference from examples in the language).

Thank you very much.

Regards,  
Omar.

---

<div class="post-metadata">

### Author: ![Damon](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/damon/32/8589_2.png) [@Damon](https://discuss.dgraph.io/u/Damon)
#### Post date: [April 19, 2024, 1:24pm UTC](https://discuss.dgraph.io/t/is-there-a-publicly-available-grammar-for-the-dql-language/19290/2 "2024-04-19T13:24:26Z")

</div>

Regrettably there is not. When DQL was first developed, the golang ecosystem lacked BNF-based or similar tooling to leverage a formal grammar, so it was developed differently.

Can you let us know what you would like to use the grammar for? We may be able to suggest workarounds.
