Skip to content

Fix AASQL grammar bugs #433, #434, #435 #436

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

Merged
merged 6 commits into from
Apr 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ The content and structure of the AAS Query Language is defined in the context-fr

This is the combined grammar for the AAS Query Language and the AAS Access Rules defined by the AAS Security specification xref:bibliography.adoc#bib3[[3\]].


include::./grammar.adoc[]


[source,bnf,linenums]
----
include::partial$bnf/grammar.bnf[]
----

== Select Expression

Expand Down Expand Up @@ -234,7 +234,7 @@ The following example is used to illustrate the comparisons. The following Asset
}
]
}
],
]
}
----

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
....
<grammar> ::= <query> | <AllAccessPermissionRules>

<query> ::= <selectStatement>? <logicalExpression>
Expand All @@ -24,8 +23,8 @@
<allComparisons> ::= ( "$eq" | "$ne" | "$gt" | "$lt" | "$ge" | "$le" )

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

Expand Down Expand Up @@ -88,14 +87,14 @@
"time" <ws> "(" <ws> ( <stringOperand> | <dateTimeOperand> ) <ws> ")" <ws>

<AllAccessPermissionRules> ::=
( "DEFATTRIBUTES" <ws> <StringLiteral> <ws> <AttributeGroup> <ws> )*

Check warning on line 90 in documentation/IDTA-01002-3/modules/ROOT/partials/bnf/grammar.bnf

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'DEFATTRIBUTES'
( "DEFACLS" <ws> <StringLiteral> <ws> <ACL> <ws> )*
( "DEFOBJECTS" <ws> <StringLiteral> <ws> <ObjectGroup> <ws> )*
( "DEFFORMULAS" <ws> <StringLiteral> <ws> <Condition> <ws> )*

Check warning on line 93 in documentation/IDTA-01002-3/modules/ROOT/partials/bnf/grammar.bnf

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'DEFFORMULAS'
( <AccessPermissionRule> <ws> )*

<AccessPermissionRule> ::=
"ACCESSRULE:" <ws>

Check warning on line 97 in documentation/IDTA-01002-3/modules/ROOT/partials/bnf/grammar.bnf

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'ACCESSRULE'
( <ACL> | <UseACL> ) <ws>
"OBJECTS:" <ws>
( <SingleObject> <ws> )*
Expand Down Expand Up @@ -127,7 +126,7 @@
"CLAIM" <ws> "(" <ws> <ClaimLiteral> <ws> ")"

<GlobalAttribute> ::=
"GLOBAL" <ws> "(" <ws> ( "LOCALNOW" | "UTCNOW" | "CLIENTNOW" | "ANONYMOUS" ) <ws> ")"

Check warning on line 129 in documentation/IDTA-01002-3/modules/ROOT/partials/bnf/grammar.bnf

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'LOCALNOW'

Check warning on line 129 in documentation/IDTA-01002-3/modules/ROOT/partials/bnf/grammar.bnf

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'UTCNOW'

<ReferenceAttribute> ::=
"REFERENCE" <ws> "(" <ws> <ReferenceLiteral> <ws> ")"
Expand All @@ -137,7 +136,7 @@
( <UseAttributeGroup> <ws> )*

<UseAttributeGroup> ::=
"USEATTRIBUTES" <ws> <StringLiteral> <ws>

Check warning on line 139 in documentation/IDTA-01002-3/modules/ROOT/partials/bnf/grammar.bnf

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'USEATTRIBUTES'

<SingleObject> ::=
<RouteObject> | <IdentifiableObject> | <ReferableObject> | <FragmentObject> | <DescriptorObject>
Expand All @@ -162,10 +161,10 @@
| ( <UseObjectGroup> <ws> )*

<UseObjectGroup> ::=
"USEOBJECTS" <ws> <StringLiteral> <ws>

Check warning on line 164 in documentation/IDTA-01002-3/modules/ROOT/partials/bnf/grammar.bnf

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'USEOBJECTS'

<UseFormula> ::=
"USEFORMULAS" <ws> <StringLiteral> <ws>

Check warning on line 167 in documentation/IDTA-01002-3/modules/ROOT/partials/bnf/grammar.bnf

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'USEFORMULAS'

<Condition> ::= <logicalExpression> <ws>

Expand Down Expand Up @@ -201,16 +200,15 @@
<FieldIdentifierSM> ::= "$sm#" ( <SemanticIdClause> | "idShort" | "id" )
<FieldIdentifierSME> ::= "$sme" ( "." <idShortPath> )? "#" ( <SemanticIdClause> | "idShort" | "value" | "valueType" | "language" )
<FieldIdentifierCD> ::= "$cd#" ( "idShort" | "id" ) <ws>
<FieldIdentifierAasDescriptor> ::= "$aasdesc#" ( "idShort" | "id" | "assetKind" | "assetType" | "globalAssetId" | <SpecificAssetIdsClause> | "endpoints" ( "[" ( [0-9]* ) "]" )? "." <EndpointClause> | "submodelDescriptors" ( "[" ( [0-9]* ) "]" )? "." <SmDescriptorClause> )
<FieldIdentifierAasDescriptor> ::= "$aasdesc#" ( "idShort" | "id" | "assetKind" | "assetType" | "globalAssetId" | <SpecificAssetIdsClause> | "endpoints" ( "[" ( [0-9]* ) "]" ) "." <EndpointClause> | "submodelDescriptors" ( "[" ( [0-9]* ) "]" ) "." <SmDescriptorClause> )

Check warning

Code scanning / QDJVMC

Typo Warning documentation

Typo: In word 'aasdesc'
<FieldIdentifierSmDescriptor> ::= "$smdesc#" <SmDescriptorClause>

Check warning on line 204 in documentation/IDTA-01002-3/modules/ROOT/partials/bnf/grammar.bnf

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'smdesc'
<SmDescriptorClause> ::= ( <SemanticIdClause> | "idShort" | "id" | "endpoints" ( "[" ( [0-9]* ) "]" )? "." <EndpointClause> )
<SmDescriptorClause> ::= ( <SemanticIdClause> | "idShort" | "id" | "endpoints" ( "[" ( [0-9]* ) "]" ) "." <EndpointClause> )
<EndpointClause> ::= "interface" | "protocolinformation.href"

Check warning on line 206 in documentation/IDTA-01002-3/modules/ROOT/partials/bnf/grammar.bnf

View workflow job for this annotation

GitHub Actions / qodana

Typo

Typo: In word 'protocolinformation'

<ReferenceClause> ::= ( "type" | "keys" ( "[" ( [0-9]* ) "]" )? ( ".type" | ".value" ) )
<ReferenceClause> ::= ( "type" | "keys" ( "[" ( [0-9]* ) "]" ) ( ".type" | ".value" ) )
<SemanticIdClause> ::= ( "semanticId" | "semanticId." <ReferenceClause> )
<SpecificAssetIdsClause> ::= ( "specificAssetIds" ( "[" ( [0-9]* ) "]" )? ( ".name" | ".value" | ".externalSubjectId" | ".externalSubjectId." <ReferenceClause> ) )
<SpecificAssetIdsClause> ::= ( "specificAssetIds" ( "[" ( [0-9]* ) "]" ) ( ".name" | ".value" | ".externalSubjectId" | ".externalSubjectId." <ReferenceClause> ) )
<idShortPath> ::= ( <idShort> ("[" ( [0-9]* ) "]" )? ( "." <idShortPath> )* )
<idShort> ::= ( ( [a-z] | [A-Z] ) ( [a-z] | [A-Z] | [0-9] | "_" )* )

<ws> ::= ( " " | "\t" | "\r" | "\n" )*
....
Loading