rbs icon indicating copy to clipboard operation
rbs copied to clipboard

Inconsistencies and Holes in with Grammar documentation

Open Forthoney opened this issue 2 years ago • 4 comments

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 avatar Nov 19 '23 05:11 Forthoney

@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 avatar Nov 20 '23 00:11 soutaro

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

Forthoney avatar Nov 20 '23 13:11 Forthoney

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

ksss avatar Nov 20 '23 14:11 ksss

@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.

Forthoney avatar Nov 20 '23 15:11 Forthoney