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

[lex] Replace 'could' and 'might' #4366

Merged
merged 1 commit into from Nov 13, 2020
Merged

Conversation

jensmaurer
Copy link
Member

as directed by ISO/CS.

Partially addresses #4319

source/lex.tex Outdated
Comment on lines 404 to 405
\tcode{0xe}, \tcode{+}, and \tcode{foo} can produce a valid expression (for example,
if \tcode{foo} were a macro defined as \tcode{1}). Similarly, the
Copy link
Contributor

Choose a reason for hiding this comment

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

If we keep "can" here, then I think the parenthetical needs to say "is", not "were".

Alternatively, could we say "would be able to produce"?

Copy link
Member

Choose a reason for hiding this comment

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

I'm happy with either. I'm a little worried that ISO will decide to declare "would" as verboten next (the upcoming revised Directives disallow use of any verbal forms not explicitly permitted, which would disallow "would"). But we can face that if and when it happens.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed to "is"

We need to be able to talk about hypotheticals in proper English phrasing, that includes "could" and "were" and "would" and "might". Everything else is just stupid.
(I agree with some of the -> can changes we have been doing; they seem to be clear improvements occasionally.)

source/lex.tex Outdated
@@ -362,7 +362,7 @@

\item Otherwise,
the next preprocessing token is the longest sequence of
characters that could constitute a preprocessing token, even if that
characters that would constitute a preprocessing token, even if that
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 sure "would" works here. Second options? @zygoloid?

Copy link
Member Author

Choose a reason for hiding this comment

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

We have a bunch of max-munch rules that all follow the same pattern.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, then maybe this is fine as is (likewise below).

Copy link
Member

Choose a reason for hiding this comment

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

What I've been suggesting in other PRs is:
"longest sequence of characters that matches the syntax of a preprocessing-token"
... which seems more precise than our prior wording in the various tentative parsing areas, and distinguishes between matching the syntax of X and actually forming a valid X, without getting into hypotheticals.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

source/lex.tex Outdated Show resolved Hide resolved
as directed by ISO/CS.
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.

None yet

3 participants