Overview
| Artifact ID: | 44a578c336a495618c85f656efdd7389c141b48d |
|---|---|
| Ticket: | 1080042fffffffffffffffffffffffffffffffff
\Y can be quantified as (\Y) |
| User & Date: | tgl on 2015-10-21 16:27:25 |
Changes
- icomment:
> I don't understand why adding the parens converts an RE from > something invalid into something valid. This is pretty key actually: I suspect Henry Spencer may never have considered this sort of situation, because he explicitly disallows quantification of bare constraints in the re_syntax.n man page. It says in so many words "A constraint may not be followed by a quantifier.", and this is also implicit in the careful distinctions it draws between atoms (which match some amount of text) and constraints (which don't). However, any legal RE can be enclosed in parentheses, making it an atom, which allows it to be quantified. I think his rule against quantifying bare constraints is sensible: a constraint either matches or doesn't, there is no point in applying it more than once. So another way we might possibly have addressed this is to disallow quantification of subexpressions that don't contain at least one non-constraint. But I'm not quite convinced that that wouldn't break some useful cases, and it probably wouldn't be trivial to implement either.
- login: "tgl"
- mimetype: "text/plain"