Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: Inline single-use grammar nonterminals #2600

Merged
merged 1 commit into from
Jun 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 25 additions & 51 deletions spec/abstractops.html
Original file line number Diff line number Diff line change
Expand Up @@ -978,15 +978,11 @@ <h1>ISO 8601 grammar</h1>
U+2212

UnpaddedHour :
DecimalDigit
`1` DecimalDigit
`20`
`21`
`22`
`23`
Hour[~Padded]

Hour :
`0` DecimalDigit
Hour[Padded] :
[~Padded] DecimalDigit
[+Padded] `0` DecimalDigit
`1` DecimalDigit
`20`
`21`
Expand Down Expand Up @@ -1042,16 +1038,10 @@ <h1>ISO 8601 grammar</h1>
AnnotationCriticalFlag :
`!`

DateFourDigitYear :
DateYear :
DecimalDigit DecimalDigit DecimalDigit DecimalDigit

DateExtendedYear :
Sign DecimalDigit DecimalDigit DecimalDigit DecimalDigit DecimalDigit DecimalDigit

DateYear :
DateFourDigitYear
DateExtendedYear

DateMonth :
`0` NonZeroDigit
`10`
Expand All @@ -1071,11 +1061,9 @@ <h1>ISO 8601 grammar</h1>
DateSpecYearMonth :
DateYear `-`? DateMonth

TwoDashes :
`--`

DateSpecMonthDay :
TwoDashes? DateMonth `-`? DateDay
`--` DateMonth `-`? DateDay
DateMonth `-`? DateDay
Comment on lines -1074 to +1066
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note #1800; but I think this is still in line with that.


ValidMonthDay :
DateMonth `-`? `0` NonZeroDigit
Expand All @@ -1089,7 +1077,7 @@ <h1>ISO 8601 grammar</h1>
DateYear DateMonth DateDay

TimeHour :
Hour
Hour[+Padded]

TimeMinute :
MinuteSecond
Expand Down Expand Up @@ -1117,22 +1105,18 @@ <h1>ISO 8601 grammar</h1>
UTCOffset
UTCDesignator

TimeZoneUTCOffsetName :
Sign Hour
Sign Hour `:` MinuteSecond
Sign Hour MinuteSecond
Sign Hour `:` MinuteSecond `:` MinuteSecond Fraction?
Sign Hour MinuteSecond MinuteSecond Fraction?
TimeZoneUTCOffsetName[Extended] :
Sign Hour[+Padded]
Sign Hour[+Padded] TimeSeparator[?Extended] MinuteSecond
Sign Hour[+Padded] TimeSeparator[?Extended] MinuteSecond TimeSeparator[?Extended] MinuteSecond Fraction?

TZLeadingChar :
Alpha
`.`
`_`

TZChar[Legacy] :
Alpha
`.`
`-`
TZLeadingChar
`_`
[+Legacy] `+`
[+Legacy] DecimalDigit
Expand All @@ -1158,17 +1142,15 @@ <h1>ISO 8601 grammar</h1>
TimeZoneIANANameComponent[?Legacy]
TimeZoneIANANameComponent[?Legacy] `/` TimeZoneIANANameTail[?Legacy]

TimeZoneIANALegacyName :
TimeZoneIANANameTail[+Legacy] [&gt; but only if `etc/gmt` |ASCIISign| |UnpaddedHour| matches the ASCII-lowercase of the sequence of code points matched by (|TimeZoneIANANameTail|)]
TimeZoneIANANameTail[+Legacy] [&gt; but only if the sequence of code points matched by |TimeZoneIANANameTail| is an ASCII-case-insensitive match for an element of « *"Etc/GMT0"*, *"GMT0"*, *"GMT-0"*, *"GMT+0"*, *"EST5EDT"*, *"CST6CDT"*, *"MST7MDT"*, *"PST8PDT"* »]

TimeZoneIANAName :
TimeZoneIANANameTail[~Legacy]
TimeZoneIANALegacyName
TimeZoneIANANameTail[+Legacy] [&gt; but only if `etc/gmt` |ASCIISign| |UnpaddedHour| matches the ASCII-lowercase of the sequence of code points matched by (|TimeZoneIANANameTail|)]
TimeZoneIANANameTail[+Legacy] [&gt; but only if the sequence of code points matched by |TimeZoneIANANameTail| is an ASCII-case-insensitive match for an element of « *"Etc/GMT0"*, *"GMT0"*, *"GMT-0"*, *"GMT+0"*, *"EST5EDT"*, *"CST6CDT"*, *"MST7MDT"*, *"PST8PDT"* »]

TimeZoneIdentifier :
TimeZoneIANAName
TimeZoneUTCOffsetName
TimeZoneUTCOffsetName[+Extended]
TimeZoneUTCOffsetName[~Extended]

TimeZoneAnnotation :
`[` AnnotationCriticalFlag? TimeZoneIdentifier `]`
Expand All @@ -1182,25 +1164,17 @@ <h1>ISO 8601 grammar</h1>
DecimalDigit
`-`

AValChar :
Alpha
DecimalDigit

AnnotationKeyTail :
AKeyChar AnnotationKeyTail?

AnnotationKey :
AKeyLeadingChar AnnotationKeyTail?
AKeyLeadingChar
AnnotationKey AKeyChar

AnnotationValueComponent :
AValChar AnnotationValueComponent?

AnnotationValueTail :
AnnotationValueComponent
AnnotationValueComponent `-` AnnotationValueTail
Alpha AnnotationValueComponent?
DecimalDigit AnnotationValueComponent?

AnnotationValue :
AnnotationValueTail
AnnotationValueComponent
AnnotationValueComponent `-` AnnotationValue

Annotation :
`[` AnnotationCriticalFlag? AnnotationKey `=` AnnotationValue `]`
Expand Down Expand Up @@ -1338,12 +1312,12 @@ <h1>ISO 8601 grammar</h1>
<emu-clause id="sec-temporal-iso8601grammar-early-errors">
<h1>Early errors</h1>
<emu-grammar>
DateExtendedYear :
DateYear :
Sign DecimalDigit DecimalDigit DecimalDigit DecimalDigit DecimalDigit DecimalDigit
</emu-grammar>
<ul>
<li>
It is a Syntax Error if |DateExtendedYear| is *"-000000"* or *"−000000"* (U+2212 MINUS SIGN followed by `000000`).
It is a Syntax Error if |DateYear| is *"-000000"* or *"−000000"* (U+2212 MINUS SIGN followed by `000000`).
</li>
</ul>
</emu-clause>
Expand Down