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

The first sentence in [lex.ext]/1, is it really necessary? #4021

Closed
jabelloc opened this issue Jun 3, 2020 · 1 comment
Closed

The first sentence in [lex.ext]/1, is it really necessary? #4021

jabelloc opened this issue Jun 3, 2020 · 1 comment

Comments

@jabelloc
Copy link

jabelloc commented Jun 3, 2020

First sentence in [lex.ext]/1:

If a token matches both user-defined-literal and another literal kind, it is treated as the latter.

I don't think this is necessary as the non-terminal user-defined-literal is already the last item in the definition of the literal grammar production.

Thus, I think this paragraph could be simplified as follows:

  1. The syntactic non-terminal preceding the ud-suffix in a user-defined-literal is taken to be the longest sequence of characters that could match that non-terminal. [ Example: 123_­km is a user-defined-literal, but 12LL is an integer-literal. — end example ]
@jensmaurer
Copy link
Member

There is no implied ordering in the presentation of grammar options, so we do need the disambiguation in the first sentence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants