Skip to content

Commit 41df8ca

Browse files
committed
'Expr' is more appropriate than 'Id' now that instantiation can be involved
1 parent d27f84e commit 41df8ca

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

docs/codeql/ql-language-reference/ql-language-specification.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,12 @@ An import directive refers to a module identifier:
208208

209209
::
210210

211-
import ::= annotations "import" importModuleId ("as" modulename)?
211+
import ::= annotations "import" importModuleExpr ("as" modulename)?
212212

213213
qualId ::= simpleId | qualId "." simpleId
214214

215-
importModuleId ::= qualId
216-
| importModuleId "::" simpleId
215+
importModuleExpr ::= qualId
216+
| importModuleExpr "::" simpleId
217217

218218
An import directive may optionally name the imported module using an ``as`` declaration. If a name is defined, then the import directive adds to the declared module environment of the current module a mapping from the name to the declaration of the imported module. Otherwise, the current module *directly imports* the imported module.
219219

@@ -280,9 +280,9 @@ With the exception of class domain types and character types (which cannot be re
280280

281281
::
282282

283-
type ::= (moduleId "::")? classname | dbasetype | "boolean" | "date" | "float" | "int" | "string"
283+
type ::= (moduleExpr "::")? classname | dbasetype | "boolean" | "date" | "float" | "int" | "string"
284284

285-
moduleId ::= simpleId | moduleId "::" simpleId
285+
moduleExpr ::= simpleId | moduleExpr "::" simpleId
286286

287287
A type reference is resolved to a type as follows:
288288

@@ -597,7 +597,7 @@ Identifiers are used in following syntactic constructs:
597597
modulename ::= simpleId
598598
classname ::= upperId
599599
dbasetype ::= atLowerId
600-
predicateRef ::= (moduleId "::")? literalId
600+
predicateRef ::= (moduleExpr "::")? literalId
601601
predicateName ::= lowerId
602602
varname ::= lowerId
603603
literalId ::= lowerId | atLowerId
@@ -1615,7 +1615,7 @@ Aliases define new names for existing QL entities.
16151615

16161616
alias ::= qldoc? annotations "predicate" literalId "=" predicateRef "/" int ";"
16171617
| qldoc? annotations "class" classname "=" type ";"
1618-
| qldoc? annotations "module" modulename "=" moduleId ";"
1618+
| qldoc? annotations "module" modulename "=" moduleExpr ";"
16191619

16201620

16211621
An alias introduces a binding from the new name to the entity referred to by the right-hand side in the current module's declared predicate, type, or module environment respectively.
@@ -2068,12 +2068,12 @@ The complete grammar for QL is as follows:
20682068

20692069
moduleBody ::= (import | predicate | class | module | alias | select)*
20702070

2071-
import ::= annotations "import" importModuleId ("as" modulename)?
2071+
import ::= annotations "import" importModuleExpr ("as" modulename)?
20722072

20732073
qualId ::= simpleId | qualId "." simpleId
20742074

2075-
importModuleId ::= qualId
2076-
| importModuleId "::" simpleId
2075+
importModuleExpr ::= qualId
2076+
| importModuleExpr "::" simpleId
20772077

20782078
select ::= ("from" var_decls)? ("where" formula)? "select" as_exprs ("order" "by" orderbys)?
20792079

@@ -2120,15 +2120,15 @@ The complete grammar for QL is as follows:
21202120

21212121
field ::= qldoc? annotations var_decl ";"
21222122

2123-
moduleId ::= simpleId | moduleId "::" simpleId
2123+
moduleExpr ::= simpleId | moduleExpr "::" simpleId
21242124

2125-
type ::= (moduleId "::")? classname | dbasetype | "boolean" | "date" | "float" | "int" | "string"
2125+
type ::= (moduleExpr "::")? classname | dbasetype | "boolean" | "date" | "float" | "int" | "string"
21262126

21272127
exprs ::= expr ("," expr)*
21282128

21292129
alias ::= qldoc? annotations "predicate" literalId "=" predicateRef "/" int ";"
21302130
| qldoc? annotations "class" classname "=" type ";"
2131-
| qldoc? annotations "module" modulename "=" moduleId ";"
2131+
| qldoc? annotations "module" modulename "=" moduleExpr ";"
21322132

21332133
var_decls ::= (var_decl ("," var_decl)*)?
21342134

@@ -2249,7 +2249,7 @@ The complete grammar for QL is as follows:
22492249

22502250
dbasetype ::= atLowerId
22512251

2252-
predicateRef ::= (moduleId "::")? literalId
2252+
predicateRef ::= (moduleExpr "::")? literalId
22532253

22542254
predicateName ::= lowerId
22552255

0 commit comments

Comments
 (0)