DDC-1947: Update EBNF with arbitrary joins #2456

Closed
opened 2026-01-22 13:53:58 +01:00 by admin · 8 comments
Owner

Originally created by @doctrinebot on GitHub (Jul 26, 2012).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user @ocramius:

Arbitrary joins need to be documented in EBNF

Originally created by @doctrinebot on GitHub (Jul 26, 2012). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user @ocramius: Arbitrary joins need to be documented in EBNF
admin added the Documentation label 2026-01-22 13:53:58 +01:00
admin closed this issue 2026-01-22 13:53:58 +01:00
Author
Owner

@SenseException commented on GitHub (May 10, 2018):

What does EBNF mean?

@SenseException commented on GitHub (May 10, 2018): What does EBNF mean?
Author
Owner

@Ocramius commented on GitHub (May 10, 2018):

@SenseException Extended Backus–Naur form

It's a notation used to describe a grammar.

@Ocramius commented on GitHub (May 10, 2018): @SenseException [Extended Backus–Naur form](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) It's a notation used to describe a grammar.
Author
Owner

@SenseException commented on GitHub (May 10, 2018):

Currently only WITH, which is also used for the arbitrary joins in the documentation, is listed at the EBNF part of the documentation, but not mentioned in there with the name "arbitrary joins".

https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/dql-doctrine-query-language.html#from-join-and-index-by

Arbitrary joins are mentioned with an example outside of EBNF though: https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/dql-doctrine-query-language.html#dql-select-examples (at the bottom)

@SenseException commented on GitHub (May 10, 2018): Currently only `WITH`, which is also used for the arbitrary joins in the documentation, is listed at the EBNF part of the documentation, but not mentioned in there with the name "arbitrary joins". https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/dql-doctrine-query-language.html#from-join-and-index-by Arbitrary joins are mentioned with an example outside of EBNF though: https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/dql-doctrine-query-language.html#dql-select-examples (at the bottom)
Author
Owner

@Majkl578 commented on GitHub (May 10, 2018):

Out of sync EBNF is going to be an issue during DQL parser rewrite. I already ran into some places where EBNF and parser differ, but afaik also parser comments didn't match actual code.
If you are aware of some issues, please send PR to fix those issues. 😊
I'm not sure whether ORM 3 will stick with EBNF (there is no reason to not to), but it will definitely need to be revised and synced with new parser & language definition.

@Majkl578 commented on GitHub (May 10, 2018): Out of sync EBNF is going to be an issue during DQL parser rewrite. I already ran into some places where EBNF and parser differ, but afaik also parser comments didn't match actual code. If you are aware of some issues, please send PR to fix those issues. 😊 I'm not sure whether ORM 3 will stick with EBNF (there is no reason to not to), but it will definitely need to be revised and synced with new parser & language definition.
Author
Owner

@Ocramius commented on GitHub (May 10, 2018):

I'm not sure whether ORM 3 will stick with EBNF

If we're going with the Hoa parsers, then their parser is actually generated from a BNF-alike syntax ;-)

@Ocramius commented on GitHub (May 10, 2018): > I'm not sure whether ORM 3 will stick with EBNF If we're going with the Hoa parsers, then their parser is actually generated from a BNF-alike syntax ;-)
Author
Owner

@Majkl578 commented on GitHub (May 10, 2018):

Yup, the PP language. But EBNF is imho more readable for casual consumers. PP, and especially its namespaces, is a bit more complicated. I already have some DQL prototype in it, based on EBNF. :)

@Majkl578 commented on GitHub (May 10, 2018): Yup, the [PP language](https://hoa-project.net/En/Literature/Hack/Compiler.html#PP_language). But EBNF is imho more readable for casual consumers. PP, and especially its namespaces, is a bit more complicated. I already have some DQL prototype in it, based on EBNF. :)
Author
Owner

@Ocramius commented on GitHub (May 10, 2018):

The readability issue is secondary here, IMO: having a centralized definition of the language should be the first aim. Once we obtained that, we can likely ask our @doctrine/team-orm-documentation on how to proceed.

@Ocramius commented on GitHub (May 10, 2018): The readability issue is secondary here, IMO: having a centralized definition of the language should be the first aim. Once we obtained that, we can likely ask our @doctrine/team-orm-documentation on how to proceed.
Author
Owner

@stof commented on GitHub (Oct 7, 2025):

I'm closing this as arbitrary joins are already documented in the EBNF (that's what RangeVariableDeclaration is about in the Join production).

@stof commented on GitHub (Oct 7, 2025): I'm closing this as arbitrary joins are already documented in the EBNF (that's what `RangeVariableDeclaration` is about in the `Join` production).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2456