opengeospatial / opengeospatial/ogcapi-features
CQL2 grammar: BNF definition of function
@pvretano is already working on this.
Since Aug 11, 2025.
- Dominant language
- CSS
- Stars
- 386
- Forks
- 92
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 15
Description
Hello,
I am currently building an implementation of the CQL2-Text spec and had a question about the current definition of the function rule in the BNF schema.
Based on the rest of the schema, you seem to be using the { ... } brace syntax to signify "1 or more". So, from my current understanding, wouldn't the current rule imply that something like function(arga1, arga2, arga3 <space> argb1, argb2, ...) is valid, with more than one argument list provided?
The closest similar rule I could find is isInListPredicate:
Here, the inList rule appears without braces and the resulting rule when substituted would be a single instance of scalarExpression [ {"," scalarExpression} ]
I'm wondering whether the argumentList in function should have its braces removed, giving something like:
- function = identifier "(" {argumentList} ")";
+ function = identifier "(" argumentList ")";
# When substituted, this gives:
function = identifier "(" argument [ { "," argument } ] ")";
Thanks in advance!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.