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

Clean up documentation #500

Merged
merged 14 commits into from
Jan 18, 2023
Merged

Conversation

gibson042
Copy link
Contributor

  • Fix spelling of "separated"/"separating"
  • Remove duplicate lines
  • Use correct case for documenting attributes
  • Fix gaps and errors in attribute documentation
  • Remove erroneous mention of content constraints in emu-nt
  • Clean up descriptions
  • Add more structure to emu-alg documentation
  • Clean up effects propagation documentation
  • Enable effects propagation in documentation
  • Clean up documentation examples

The most convenient way to review is probably commit-by-commit with whitespace changes suppressed.

@gibson042 gibson042 requested a review from bakkot January 10, 2023 18:56
Comment on lines +57 to +58
<tr><td>`--mark-effects`</td><td>`markEffects`</td><td>Propagate and render <a href="#effects">effects</a> like "user code".</td></tr>
<tr><td>`--multipage`</td><td></td><td>Emit a distinct page for each top-level clause.</td></tr>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not clear on the difference between "Build options" vs. "Document options", but it does seem strange for markEffects to not be in the same category as toc.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not entirely clear on the difference either, but I agree markEffects probably ought to be under "document options".

Comment on lines +774 to +775
<!-- what does it even mean for a LHS to be optional??? -->
<p><b>optional:</b> If present, the LHS is marked as optional.</p>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this attribute should just be removed, but maybe there's a case I'm just not getting for

<emu-production>
  <emu-nt optional="">LHS</emu-nt> <emu-geq>:</emu-geq>
  <emu-rhs></emu-rhs></emu-production>

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I have no idea what that's for.

Also, I'm not sure it makes sense to support writing emu-production (etc) manually; the happy path is using grammarkdown notation. Possibly these should not be in the documentation at all. (They'll still be implicitly supported because grammarkdown emits these nodes, but we don't need to tell people about them, I think.)

Comment on lines +778 to +782
<p><b>type:</b> Optional: Type of production. If absent, the production is considered syntactic.</p>
<ul>
<li>"lexical": The production is part of a lexical grammar, and should render with the LHS and RHS separated by two colons “<b>::</b>”.</li>
<li>"regexp": Deprecated because the ECMAScript regular expression grammar is considered to be lexical. Productions with this type render with the LHS and RHS separated by three colons “<b>:::</b>”.</li>
</ul>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't like having default values that are not theirselves part of the enumeration... should we just add support for e.g. type="syntactic"?

Copy link
Contributor

Choose a reason for hiding this comment

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

I understand that preference, but I prefer to have only one way of writing anything, when possible, so I would prefer to avoid adding an alias here.

Copy link
Contributor

@bakkot bakkot left a comment

Choose a reason for hiding this comment

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

This is great, thank you!

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

Successfully merging this pull request may close these issues.

2 participants