diff --git a/spec.bs b/spec.bs index 72e5aa5..9ba20ac 100644 --- a/spec.bs +++ b/spec.bs @@ -1298,15 +1298,16 @@ To generate a regular expression and name list from a given [= 1. Else if |part|'s [=part/type=] is "`full-wildcard`", then set |regexp value| to [=full wildcard regexp value=]. 1. If |part|'s [=part/prefix=] is the empty string and |part|'s [=part/suffix=] is the empty string:
-

If there is no [=part/prefix=] or [=part/suffix=] then generation depends on the modifier. If there is no modifier, it uses the following simple form: -

`()` -

If there is a modifier, however, we will use the more complex form: +

If there is no [=part/prefix=] or [=part/suffix=] then generation depends on the modifier. If there is no modifier or just the optional modifier, it uses the following simple form: +

`()` +

If there is a repeating modifier, however, we will use the more complex form:

`((?:))`

- 1. If |part|'s [=part/modifier=] is "`none`", then: + 1. If |part|'s [=part/modifier=] is "`none`" or "`optional`", then: 1. Append "`(`" to the end of |result|. 1. Append |regexp value| to the end of |result|. 1. Append "`)`" to the end of |result|. + 1. Append the result of running [=convert a modifier to a string=] given |part|'s [=part/modifier=] to the end of |result|. 1. Else: 1. Append "`((?:`" to the end of |result|. 1. Append |regexp value| to the end of |result|.