ISO-8601 dates are very close to Rebol dates, but just different enough to make it a pain.
; ISO-8601
2021-09-15T12:20:53-04:00
; Rebol
15-Sep-2021/12:20:53-04:00
Are Rebol dates more readable? Yes. Are they so much better as to make it worthwhile to buck the standard?
Are they in conflict with generalized PATH! representation? ![]()
Nevermind, This Post Is About Something Else
Let's say I just want to capture the YEAR, the MONTH, and the DAY out of an ISO-8601 date.
parse isodate [
year: between <here> "-"
month: between <here> "-"
day: between <here> "T"
...
]
Despite having BETWEEN, it's laborious. (Historical Rebol needs copy to "-" followed by a SKIP, even more convoluted, and worse if you need to skip more than one series item).
It needs a shorthand. We have TAG! at our disposal, still:
parse isodate [year: <*> "-" month: <*> "-" day: <*> "T" ...]
And it could be plain *:
parse isodate [year: * "-" month: * "-" day: * "T" ...]
But I kind of find myself wishing for another lexical type that means "capture" that has the word "in it". I'd thought about this as being the meaning of @xxx before the current interpretation, and also $xxx:
parse isodate [$year "-" $month "-" $day "T" ...]
But almost certainly, $ is going to be binding-related in the default combinator set.
It Feels Weak To Not Have An Answer For This
Other parsing systems will always seem like they have an edge if there isn't a shorthand for this "capture until the next rule".
But it may be that the default combinators are just too saturated and general-purpose to sacrifice any WORD!-based syntax for such a capture. It might have to be another parameterized parse variation.