Skip to content

Wrong ReGex for iterables in the grammar for the AAS Query Language #433

@zrgt

Description

@zrgt

What happens?

SpecificAssetIdsClause is defined as folllowing in the grammar:
<SpecificAssetIdsClause> ::= ( "specificAssetIds" ( "[" ( [0-9]* ) "]" )? ( ".name" | ".value" | ".externalSubjectId" | ".externalSubjectId." <ReferenceClause> ) )

Why is this wrong?

According to the current grammar not giving an index with brackets is possible e.g.: specificAssetIds.name.
This is wrong because it points to the not given attribute "name" of a list.

How should it be fixed?

The brackets must be mandatory.
Fixed grammar:
<SpecificAssetIdsClause> ::= ( "specificAssetIds" ( "[" ( [0-9]* ) "]" ) ( ".name" | ".value" | ".externalSubjectId" | ".externalSubjectId." <ReferenceClause> ) )

Other items to fix

The same should be done for the following clauses:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions