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

missing names in the grammar #353

Closed
OmarTawfik opened this issue Mar 9, 2023 · 0 comments · Fixed by #518
Closed

missing names in the grammar #353

OmarTawfik opened this issue Mar 9, 2023 · 0 comments · Fixed by #518
Assignees

Comments

@OmarTawfik
Copy link
Contributor

OmarTawfik commented Mar 9, 2023

Unnamed nodes in the grammar don't produce their own TokenKind or RuleKind. And they are absorbed into the parent node. We should go over the grammar, make sure unit tests cover each version, variant, and branch of each production, and check the generated CST shape.

@github-project-automation github-project-automation bot moved this to ⏲ Todo in Slang - 2023 H1 Mar 9, 2023
@OmarTawfik OmarTawfik added this to the 2️⃣ Beta Preview milestone Mar 9, 2023
@OmarTawfik OmarTawfik changed the title Remove any automatically generated names in grammar missing names in the grammar May 3, 2023
OmarTawfik added a commit that referenced this issue May 19, 2023
Allows us to:

- de-duplicate large operators across different versions
- add names to operators, doing in #353

note: some of the additional nodes (like `ConditionalOperator`) will be inlined in #323

closes #374
OmarTawfik added a commit that referenced this issue May 22, 2023
Allows us to:

- de-duplicate large operators across different versions
- add names to operators, doing in #353

note: some of the additional nodes (like `ConditionalOperator`) will be inlined in #323

closes #374
OmarTawfik added a commit that referenced this issue May 23, 2023
Allows us to:

- de-duplicate large operators across different versions
- add names to operators, doing in #353

note: some of the additional nodes (like `ConditionalOperator`) will be inlined in #323

closes #374
OmarTawfik added a commit that referenced this issue May 23, 2023
Allows us to:

- de-duplicate large operators across different versions
- add names to operators, doing in #353

note: some of the additional nodes (like `ConditionalOperator`) will be inlined in #323

closes #374
OmarTawfik added a commit that referenced this issue May 24, 2023
Allows us to:

- de-duplicate large operators across different versions
- add names to operators, doing in #353

note: some of the additional nodes (like `ConditionalOperator`) will be inlined in #323

closes #374
OmarTawfik added a commit that referenced this issue May 24, 2023
Allows us to:

- de-duplicate large operators across different versions
- add names to operators, doing in #353

note: some of the additional nodes (like `ConditionalOperator`) will be
inlined in #323

closes #374
OmarTawfik added a commit to OmarTawfik-forks/slang that referenced this issue Jun 10, 2023
github-merge-queue bot pushed a commit that referenced this issue Jul 7, 2023
Adds validation to make sure that:

- Productions cannot reference itself, except operators.
- Required productions cannot be inlined.
- Parsers cannot reference inlined scanners.
- Scanners can only reference inlined scanners.
- Parser names should be unique, except operator definitions, and
parsers defined in different versions.
- Prevent useless nesting of parsers if they don't change the output.
- make sure keywords are always referenced as productions instead of
terminals everywhere in grammar, to guarantee that the correct version
checks run on them.

Closes #353
@github-project-automation github-project-automation bot moved this from ⏲ Todo to ✅ Done in Slang - 2023 H1 Jul 7, 2023
@OmarTawfik OmarTawfik added this to the 1️⃣ Alpha Preview milestone Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants