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

ISO 8601 grammar uses incorrect separating punctuation #2190

Closed
gibson042 opened this issue May 10, 2022 · 1 comment · Fixed by #2757
Closed

ISO 8601 grammar uses incorrect separating punctuation #2190

gibson042 opened this issue May 10, 2022 · 1 comment · Fixed by #2757
Assignees
Labels
editorial iso8601-grammar ISO 8061 grammar spec-text Specification text involved
Milestone

Comments

@gibson042
Copy link
Collaborator

gibson042 commented May 10, 2022

The ISO 8601 grammar currently separates nonterminals from their productions with :, but that is only appropriate for the ECMAScript syntactic grammar (which has as its terminal symbols "ECMAScript tokens defined by the lexical grammar"). Grammars which have Unicode code points as their terminal symbols use either :: (Lexical and RegExp grammars, which "share some productions") or ::: (Numeric String grammar and URI grammar, both of which incorporate nonterminals from the lexical grammar).

I'm not sure what the distinction between :: vs. ::: is intended to represent, but absent guidance from @tc39/ecma262-editors I have a gut feeling that ::: is slightly more appropriate because both the URI and ISO 8601 grammars relate to external specifications.

@ptomato ptomato added spec-text Specification text involved editorial labels May 10, 2022
@ptomato
Copy link
Collaborator

ptomato commented May 10, 2022

I asked and @bakkot answered:

::: is for the grammar used for parsing strings to numbers in like +'10', I mean, not when parsing actual number literals. It's never used when actually parsing source text.
: is for translating tokens to parse nodes, :: is for translating code points to tokens (or regexes, I guess)

Based on that, I'd guess ::: is appropriate for the ISO 8601 grammar.

@ptomato ptomato added the iso8601-grammar ISO 8061 grammar label Aug 11, 2022
@ptomato ptomato added this to the Stage 4 milestone Dec 8, 2022
@ptomato ptomato self-assigned this Jan 19, 2024
ptomato added a commit that referenced this issue Jan 20, 2024
The ISO 8601 grammar should use ::: as it parses strings, not source text.
(: is for parsing tokens into parse nodes, and :: is for parsing code
points into tokens.)

Closes: #2190
Ms2ger pushed a commit that referenced this issue Jan 22, 2024
The ISO 8601 grammar should use ::: as it parses strings, not source text.
(: is for parsing tokens into parse nodes, and :: is for parsing code
points into tokens.)

Closes: #2190
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial iso8601-grammar ISO 8061 grammar spec-text Specification text involved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants