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

Inconsistencies and Holes in with Grammar documentation #1626

Open
Forthoney opened this issue Nov 19, 2023 · 4 comments
Open

Inconsistencies and Holes in with Grammar documentation #1626

Forthoney opened this issue Nov 19, 2023 · 4 comments
Assignees

Comments

@Forthoney
Copy link
Contributor

Forthoney commented Nov 19, 2023

I found three issues with the syntax documentation

  1. proc is inconsistent
    In the "Types" section, proc's grammar is laid out as
    image
    But in the "Method Types" section, proc's grammar is laid out as
    image
    I believe the bottom one is correct, so we should change the first one to be accurate

  2. record-name, members are undefined
    As the header states, record-name and members are used several times but not defined in the document.

  3. inconsistency in representing repetition
    The document sometimes uses "etc." in the beginning and "..." towards the end to represent repeating 1 or more times. This is confusing from the reader. Also, there may be a typo that stems from this inconsistent use. For example, method-name's definition uses no quotes ... when I believe the intention is to say "..."

@Forthoney Forthoney changed the title Inconsistency in Proc syntax Inconsistencies and Holes in with Grammar documentation Nov 19, 2023
@soutaro
Copy link
Member

soutaro commented Nov 20, 2023

@Forthoney

Thank you for reporting the issue.

Yeah, the proc syntax is duplicated and the second one is the correct. Will fix if. 🙏

About record-name and members, the syntax in the doc is not complete. We may add the definition of them...

The meaning of ... is not very clear. It usually means zero or one repetition. One in the method-name is a typo. Will fix it.

@soutaro soutaro self-assigned this Nov 20, 2023
@Forthoney
Copy link
Contributor Author

Thank you @soutaro for the quick response! Would it be possible for you to provide a draft of the definition of record-name and members sometime soon (meaning before an official pull request is made)? I am currently building a tree-sitter parser for RBS and hope to use this information to finish building the grammar.js file

@ksss
Copy link
Collaborator

ksss commented Nov 20, 2023

@Forthoney
[FYI] A tree-sitter parser for RBS already exists.
https://github.com/joker1007/tree-sitter-rbs

@Forthoney
Copy link
Contributor Author

@Forthoney [FYI] A tree-sitter parser for RBS already exists. https://github.com/joker1007/tree-sitter-rbs

Wow thanks for letting me know! I was not aware of its existence. I may contact the owner to notify them of this issue and perhaps collaborate with them to use the canonical definition of record-name and members once it is provided by the RBS team.

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

No branches or pull requests

3 participants