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

Clarify the exact syntax of a text symbol ID #71

Open
zslayton opened this issue Sep 28, 2021 · 0 comments
Open

Clarify the exact syntax of a text symbol ID #71

zslayton opened this issue Sep 28, 2021 · 0 comments

Comments

@zslayton
Copy link
Contributor

zslayton commented Sep 28, 2021

Here's the spec's description of text symbol identifiers:

Symbol Identifier: an identifier that starts with $ (dollar sign) followed by one or more digits. These identifiers directly represent the symbol’s integer symbol ID, not the symbol’s text. This form is not typically visible to users, but they should be aware of the reserved notation so they don’t attempt to use it for other purposes.

While examples of text symbol IDs can be found throughout the spec, it is ultimately unclear whether symbol IDs can:

  1. Have multiple leading zeros. "One or more digits" seems to allow IDs like $09 and $00007. Other Ion integer syntax elements (e.g. Ion integers and decimals) don't allow this.
  2. Have underscores. "One or more digits" seems to disallow IDs like $1_024 and $999_999_999. Other Ion integer syntax elements allow this.

ion-java's current behavior allows leading zeros, but treats SIDs with underscores as thought they were (non-symbol) identifiers instead. We should add an ion-test case to verify that all of our implementations have the same behavior and then clarify it in the spec.

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

1 participant