mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1947: Update EBNF with arbitrary joins #2456
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
@SenseException commented on GitHub (May 10, 2018):
What does EBNF mean?
@Ocramius commented on GitHub (May 10, 2018):
@SenseException Extended Backus–Naur form
It's a notation used to describe a grammar.
@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)
@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.
@Ocramius commented on GitHub (May 10, 2018):
If we're going with the Hoa parsers, then their parser is actually generated from a BNF-alike syntax ;-)
@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. :)
@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.
@stof commented on GitHub (Oct 7, 2025):
I'm closing this as arbitrary joins are already documented in the EBNF (that's what
RangeVariableDeclarationis about in theJoinproduction).