Skip to content

CQL2 grammar: BNF definition of function #997

@dannbuckley

Description

@dannbuckley

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.

function = identifier "(" {argumentList} ")";

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:

isInListPredicate = scalarExpression ["NOT"] "IN" "(" inList ")";

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!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions