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

Added ebnf.md file #1987

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Added ebnf.md file #1987

wants to merge 3 commits into from

Conversation

Arpita-Jaiswal
Copy link
Contributor

No description provided.

<item> ::= <comment> | <section>


<module_comment> ::= (<single_module_comment> <new_line>)* <single_module_comment> (<new_line> | <eof>)
Copy link
Contributor

@amitu amitu Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<module_comment> ::= (<single_module_comment> <new_line>)* <single_module_comment> (<new_line> | <eof>)
<module_comment> ::= (<single_module_comment> <new_line>)* (<single_module_comment> <eof>)?

Would this be same / simpler?

Would this work?

Suggested change
<module_comment> ::= (<single_module_comment> <new_line>)* <single_module_comment> (<new_line> | <eof>)
<module_comment> ::= (<single_module_comment> (<new_line> | <eof>))*



<module_comment> ::= (<single_module_comment> <new_line>)* <single_module_comment> (<new_line> | <eof>)
<single_module_comment> ::= <doc_comment_marker> <opt_whitespace> <sentence>? <opt_whitespace>
Copy link
Contributor

@amitu amitu Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<single_module_comment> ::= <doc_comment_marker> <opt_whitespace> <sentence>? <opt_whitespace>
<single_module_comment> ::= <doc_comment_marker> <space>* <sentence>? <space>*

Should we have opt_whitespace?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we include the <newline> | <eof> here only? And rename this to <module_comment_line>?




<start_marker> ::= "--"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rename this to section_start_marker. Should we include the space here itself as that is required part of our syntax we just discussed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I think the grammar would be easier to read if we do not define names for things that are ever used once.

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

Successfully merging this pull request may close these issues.

2 participants