@@ -178,7 +178,7 @@ A QL module definition has the following syntax:
178
178
179
179
module ::= annotation* "module" modulename parameters? implements? "{" moduleBody "}"
180
180
181
- parameters ::= "<" signatureExpr simpleId ("," signatureExpr simpleId )* ">"
181
+ parameters ::= "<" signatureExpr parameterName ("," signatureExpr parameterName )* ">"
182
182
183
183
implements ::= "implements" moduleSignatureExpr ("," moduleSignatureExpr)*
184
184
@@ -216,7 +216,7 @@ An import directive refers to a module identifier:
216
216
217
217
qualId ::= simpleId | qualId "." simpleId
218
218
219
- importModuleExpr ::= qualId | importModuleExpr "::" simpleId arguments?
219
+ importModuleExpr ::= qualId | importModuleExpr "::" modulename arguments?
220
220
221
221
arguments ::= "<" argument ("," argument)* ">"
222
222
@@ -289,7 +289,7 @@ With the exception of class domain types and character types (which cannot be re
289
289
290
290
type ::= (moduleExpr "::")? classname | dbasetype | "boolean" | "date" | "float" | "int" | "string"
291
291
292
- moduleExpr ::= simpleId arguments? | moduleExpr "::" simpleId arguments?
292
+ moduleExpr ::= modulename arguments? | moduleExpr "::" modulename arguments?
293
293
294
294
A type reference is resolved to a type as follows:
295
295
@@ -349,17 +349,17 @@ A QL signature definition has the following syntax:
349
349
350
350
predicateSignature ::= qldoc? annotations "signature" head ";"
351
351
352
- typeSignature ::= qldoc? annotations "signature" "class" upperId ("extends" type ("," type)*)? (";" | "{" signaturePredicate* "}")
352
+ typeSignature ::= qldoc? annotations "signature" "class" classname ("extends" type ("," type)*)? (";" | "{" signaturePredicate* "}")
353
353
354
- moduleSignature ::= qldoc? annotation* "signature" "module" upperId parameters? "{" moduleSignatureBody "}"
354
+ moduleSignature ::= qldoc? annotation* "signature" "module" moduleSignatureName parameters? "{" moduleSignatureBody "}"
355
355
356
356
moduleSignatureBody ::= (signaturePredicate | defaultPredicate | signatureType)*
357
357
358
358
signaturePredicate ::= qldoc? annotations head ";"
359
359
360
360
defaultPredicate ::= qldoc? annotations "default" head "{" formula "}"
361
361
362
- signatureType ::= qldoc? annotations "class" upperId ("extends" type ("," type)*)? "{" signaturePredicate* "}"
362
+ signatureType ::= qldoc? annotations "class" classname ("extends" type ("," type)*)? "{" signaturePredicate* "}"
363
363
364
364
365
365
A predicate signature definition extends the current module's declared predicate signature environment with a mapping from the predicate signature name and arity to the predicate signature definition.
@@ -628,20 +628,21 @@ There are several kinds of identifiers:
628
628
629
629
- ``atLowerId ``: an identifier that starts with an "@" sign and then a lower-case letter.
630
630
631
- - ``atUpperId ``: an identifier that starts with an "@" sign and then an upper-case letter.
632
-
633
631
Identifiers are used in following syntactic constructs:
634
632
635
633
::
636
634
637
- simpleId ::= lowerId | upperId
638
- modulename ::= simpleId
639
- classname ::= upperId
640
- dbasetype ::= atLowerId
641
- predicateRef ::= (moduleExpr "::")? literalId
642
- predicateName ::= lowerId
643
- varname ::= lowerId
644
- literalId ::= lowerId | atLowerId
635
+ simpleId ::= lowerId | upperId
636
+ modulename ::= simpleId
637
+ moduleSignatureName ::= upperId
638
+ classname ::= upperId
639
+ dbasetype ::= atLowerId
640
+ predicateRef ::= (moduleExpr "::")? literalId
641
+ signatureExpr ::= (moduleExpr "::")? simpleId ("/" Integer | arguments)?;
642
+ predicateName ::= lowerId
643
+ parameterName ::= simpleId
644
+ varname ::= lowerId
645
+ literalId ::= lowerId | atLowerId
645
646
646
647
Integer literals (int)
647
648
~~~~~~~~~~~~~~~~~~~~~~
@@ -2107,7 +2108,7 @@ The complete grammar for QL is as follows:
2107
2108
2108
2109
module ::= annotation* "module" modulename parameters? implements? "{" moduleBody "}"
2109
2110
2110
- parameters ::= "<" signatureExpr simpleId ("," signatureExpr simpleId )* ">"
2111
+ parameters ::= "<" signatureExpr parameterName ("," signatureExpr parameterName )* ">"
2111
2112
2112
2113
implements ::= "implements" moduleSignatureExpr ("," moduleSignatureExpr)*
2113
2114
@@ -2117,7 +2118,7 @@ The complete grammar for QL is as follows:
2117
2118
2118
2119
qualId ::= simpleId | qualId "." simpleId
2119
2120
2120
- importModuleExpr ::= qualId | importModuleExpr "::" simpleId arguments?
2121
+ importModuleExpr ::= qualId | importModuleExpr "::" modulename arguments?
2121
2122
2122
2123
arguments ::= "<" argument ("," argument)* ">"
2123
2124
@@ -2127,17 +2128,17 @@ The complete grammar for QL is as follows:
2127
2128
2128
2129
predicateSignature ::= qldoc? annotations "signature" head ";"
2129
2130
2130
- typeSignature ::= qldoc? annotations "signature" "class" upperId ("extends" type ("," type)*)? (";" | "{" signaturePredicate* "}")
2131
+ typeSignature ::= qldoc? annotations "signature" "class" classname ("extends" type ("," type)*)? (";" | "{" signaturePredicate* "}")
2131
2132
2132
- moduleSignature ::= qldoc? annotation* "signature" "module" upperId parameters? "{" moduleSignatureBody "}"
2133
+ moduleSignature ::= qldoc? annotation* "signature" "module" moduleSignatureName parameters? "{" moduleSignatureBody "}"
2133
2134
2134
2135
moduleSignatureBody ::= (signaturePredicate | defaultPredicate | signatureType)*
2135
2136
2136
2137
signaturePredicate ::= qldoc? annotations head ";"
2137
2138
2138
2139
defaultPredicate ::= qldoc? annotations "default" head "{" formula "}"
2139
2140
2140
- signatureType ::= qldoc? annotations "class" upperId ("extends" type ("," type)*)? "{" signaturePredicate* "}"
2141
+ signatureType ::= qldoc? annotations "class" classname ("extends" type ("," type)*)? "{" signaturePredicate* "}"
2141
2142
2142
2143
select ::= ("from" var_decls)? ("where" formula)? "select" as_exprs ("order" "by" orderbys)?
2143
2144
@@ -2184,9 +2185,9 @@ The complete grammar for QL is as follows:
2184
2185
2185
2186
field ::= qldoc? annotations var_decl ";"
2186
2187
2187
- moduleExpr ::= simpleId arguments? | moduleExpr "::" simpleId arguments?
2188
+ moduleExpr ::= modulename arguments? | moduleExpr "::" modulename arguments?
2188
2189
2189
- moduleSignatureExpr ::= (moduleExpr "::")? upperId arguments?
2190
+ moduleSignatureExpr ::= (moduleExpr "::")? moduleSignatureName arguments?
2190
2191
2191
2192
signatureExpr : (moduleExpr "::")? simpleId ("/" Integer | arguments)?;
2192
2193
@@ -2313,6 +2314,8 @@ The complete grammar for QL is as follows:
2313
2314
2314
2315
modulename ::= simpleId
2315
2316
2317
+ moduleSignatureName ::= upperId
2318
+
2316
2319
classname ::= upperId
2317
2320
2318
2321
dbasetype ::= atLowerId
@@ -2321,6 +2324,8 @@ The complete grammar for QL is as follows:
2321
2324
2322
2325
predicateName ::= lowerId
2323
2326
2327
+ parameterName ::= simpleId
2328
+
2324
2329
varname ::= lowerId
2325
2330
2326
2331
literalId ::= lowerId | atLowerId | "any" | "none"
0 commit comments