opengeospatial / opengeospatial/ogcapi-features

CQL2 grammar: BNF definition of function

Open
#997 2 comments 0 reactions 1 assignee View on GitHub

@pvretano is already working on this.

Since Aug 11, 2025.

CQL2
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.

https://github.com/opengeospatial/ogcapi-features/blob/64e26b624a052510b7d10e93b304cad0e5b30194/cql2/standard/schema/cql2.bnf#L355

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:

https://github.com/opengeospatial/ogcapi-features/blob/64e26b624a052510b7d10e93b304cad0e5b30194/cql2/standard/schema/cql2.bnf#L101

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.