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

Update section 2 with several additions for review #52

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

Conversation

gklimowicz
Copy link
Member

  • Renumber spec lists a bit to get unique numbers and allow for insert additional specifications a bit more easily.

  • Collapse original section 2 "Formal specifications" into its main "Lexical specifications" to include lines, whitespace, etc.

  • Add Patrick Fasano comments on multiple whitespace characters (but be explicit about it being in non-character-constant contexts).

  • Remove the over-specified list of tokens. This is more appropriate for a syntax paper. Introduce tokens enough to allow us to use them in illustrative syntax. (We can remove the explicitness about the tokens ID, WHOLE_NUMBER, REAL_NUMBER, CHARACTER_STRING, and UNRECOGNIZED_TOKEN if we like.)

- Renumber spec lists a bit to get unique numbers and allow for insert
  additional specifications a bit more easily.

- Collapse original section 2 "Formal specifications" into its
  main "Lexical specifications" to include lines, whitespace, etc.

- Add Patrick Fasano comments on multiple whitespace characters
  (but be explicit about it being in non-character-constant contexts).

- Remove the over-specified list of tokens. This is more appropriate
  for a syntax paper. Introduce tokens enough to allow us to use
  them in illustrative syntax. (We can remove the explicitness about
  the tokens ID, WHOLE_NUMBER, REAL_NUMBER, CHARACTER_STRING, and
  UNRECOGNIZED_TOKEN if we like.)
@bonachea bonachea marked this pull request as ready for review March 31, 2025 19:31
Copy link
Collaborator

@bonachea bonachea left a comment

Choose a reason for hiding this comment

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

Thanks for the continuing work on this!

I added several comments that I'd like to see resolved in the near-term.

A few of my comments (those regarding existing text) are somewhat orthogonal to this PR, and those could potentially be moved to the issue tracker if you'd rather handle them outside the scope of this PR.

Comment on lines 179 to 180
to03. Without naming them all explicitly, they appear in the illustrative
syntax in subsequent sections.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unclear what "them" and "they" refer to here.

I think we generally want each rule to stand-alone grammatically, and possibly refer explicitly to other rules when necessary.

gklimowicz and others added 6 commits March 31, 2025 13:29
Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
We want to avoid using the term "execution" when referring to the translation and evaluation the preprocessor performs.

Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
Copy link
Collaborator

@bonachea bonachea left a comment

Choose a reason for hiding this comment

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

Thanks for the updates, a number of comment threads requesting changes remain open.

- Add the term "C 2023" to the C standard working draft reference
  at the beginning. The WD calls it C 2023, and that's the term we
  use in this document. (It wasn't officially published until 2024.)

- Move "to05" about whitespace in directive "names" to the section
  about whitespace (ws02), and explicitly reference that whitespace
  may precede or follow the '#' character.

- Allow a more expansive view of the tokens accepted in object
  and function-like macros. (I didn't go so far as to say "anything
  goes that's not a newline" yet.)
@gklimowicz gklimowicz requested a review from bonachea April 3, 2025 05:01
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.

5 participants