From 7ace4cd43e464b141af0f9cb2c32a57ce122d64b Mon Sep 17 00:00:00 2001 From: Philip Ginsbach Date: Mon, 22 May 2023 11:25:25 +0100 Subject: [PATCH] add rule for module signature names (differing from module names) --- .../ql-language-specification.rst | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/docs/codeql/ql-language-reference/ql-language-specification.rst b/docs/codeql/ql-language-reference/ql-language-specification.rst index f1d452624fb..2a1fbde097e 100644 --- a/docs/codeql/ql-language-reference/ql-language-specification.rst +++ b/docs/codeql/ql-language-reference/ql-language-specification.rst @@ -351,7 +351,7 @@ A QL signature definition has the following syntax: typeSignature ::= qldoc? annotations "signature" "class" upperId ("extends" type ("," type)*)? (";" | "{" signaturePredicate* "}") - moduleSignature ::= qldoc? annotation* "signature" "module" upperId parameters? "{" moduleSignatureBody "}" + moduleSignature ::= qldoc? annotation* "signature" "module" moduleSignatureName parameters? "{" moduleSignatureBody "}" moduleSignatureBody ::= (signaturePredicate | defaultPredicate | signatureType)* @@ -632,14 +632,15 @@ Identifiers are used in following syntactic constructs: :: - simpleId ::= lowerId | upperId - modulename ::= simpleId - classname ::= upperId - dbasetype ::= atLowerId - predicateRef ::= (moduleExpr "::")? literalId - predicateName ::= lowerId - varname ::= lowerId - literalId ::= lowerId | atLowerId + simpleId ::= lowerId | upperId + modulename ::= simpleId + moduleSignatureName ::= upperId + classname ::= upperId + dbasetype ::= atLowerId + predicateRef ::= (moduleExpr "::")? literalId + predicateName ::= lowerId + varname ::= lowerId + literalId ::= lowerId | atLowerId Integer literals (int) ~~~~~~~~~~~~~~~~~~~~~~ @@ -2127,7 +2128,7 @@ The complete grammar for QL is as follows: typeSignature ::= qldoc? annotations "signature" "class" upperId ("extends" type ("," type)*)? (";" | "{" signaturePredicate* "}") - moduleSignature ::= qldoc? annotation* "signature" "module" upperId parameters? "{" moduleSignatureBody "}" + moduleSignature ::= qldoc? annotation* "signature" "module" moduleSignatureName parameters? "{" moduleSignatureBody "}" moduleSignatureBody ::= (signaturePredicate | defaultPredicate | signatureType)* @@ -2184,7 +2185,7 @@ The complete grammar for QL is as follows: moduleExpr ::= simpleId arguments? | moduleExpr "::" simpleId arguments? - moduleSignatureExpr ::= (moduleExpr "::")? upperId arguments? + moduleSignatureExpr ::= (moduleExpr "::")? moduleSignatureName arguments? signatureExpr : (moduleExpr "::")? simpleId ("/" Integer | arguments)?; @@ -2311,6 +2312,8 @@ The complete grammar for QL is as follows: modulename ::= simpleId + moduleSignatureName ::= upperId + classname ::= upperId dbasetype ::= atLowerId