justinfagnani / route

A client + server routing library for Dart
BSD 3-Clause "New" or "Revised" License
114 stars 40 forks source link

Consider rejecting ambiguous patterns #3

Closed justinfagnani closed 11 years ago

justinfagnani commented 11 years ago

Two consecutive groups with no literal separating them can create an ambiguous pattern where parse() and reverse() do not agree. This is not always the case though, such as when the groups match disjoint character classes like [0-9] and [a-z].

Should we reject adjacent groups, or is it author beware? It's worth noting that many other routing packages that don't use regexes require separators between parameters.

justinfagnani commented 11 years ago

Adjacent top-level groups are rejected now.