Skip to content

Redundant in the AAS Query Language grammar #434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zrgt opened this issue Apr 13, 2025 · 0 comments
Closed

Redundant in the AAS Query Language grammar #434

zrgt opened this issue Apr 13, 2025 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@zrgt
Copy link
Contributor

zrgt commented Apr 13, 2025

What happens?

The following definitions of possible string comparisons on lines 29 and 30 are redundant to the line 28, as FieldIdentifierString is also a stringOperand

<stringComparison> ::=
( ( "$starts-with" | "ends-with" | "$contains" | "$regex") <ws> "(" <ws> <stringOperand> <ws> "," <ws> <stringOperand> <ws> ")" <ws> ) |
( <stringOperand> <ws> <allComparisons> <ws> <stringOperand> <ws> ) |
( <stringOperand> <ws> <allComparisons> <ws> <FieldIdentifierString> <ws> ) |
( <FieldIdentifierString> <ws> <allComparisons> <ws> <stringOperand> <ws> )

Why is this wrong?

  • The definition is redundant
  • A user might think, that in a comparison only one FieldIdentifier is allowed, if he doesn't check the definition of stringOperand

How should it be fixed?

Remove redundant lines 29 and 30

  • [x ] I have signed the required Developer Certificate of Origin (DCO) already.
@zrgt zrgt added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request labels Apr 13, 2025
@sebbader-sap sebbader-sap removed the bug Something isn't working label Apr 17, 2025
@sebbader-sap sebbader-sap added this to the 3.x milestone Apr 17, 2025
zrgt added a commit that referenced this issue Apr 19, 2025
zrgt added a commit to admin-shell-io/aas-specs-security that referenced this issue Apr 19, 2025
sebbader-sap added a commit that referenced this issue Apr 19, 2025
* Use partials for bnf

Before the bnf grammar was in an .adoc file.
In this commit we place it in .bnf file in partials
similar as in aas-specs-security repo.

* Small fix

* Add missing $ for ends-with

Fixes #435

* Set brackets mandatory for items in iterables

Fixes #433

* Remove redundancy in `stringComparison`


---------

Co-authored-by: sebbader-sap <107036549+sebbader-sap@users.noreply.github.com>
sebbader-sap added a commit that referenced this issue Apr 19, 2025
* Use partials for bnf

Before the bnf grammar was in an .adoc file.
In this commit we place it in .bnf file in partials
similar as in aas-specs-security repo.

* Small fix

* Add missing $ for ends-with

Fixes #435

* Set brackets mandatory for items in iterables

Fixes #433

* Remove redundancy in `stringComparison`

Fixes #434

* undo changes in stringComparison clause

* correct cardinality for whitespaces in the query grammar

---------

Co-authored-by: zrgt <garmaev@gmx.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants