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

[re.grammar] Improve grammar typesetting. #3193

Merged
merged 1 commit into from Oct 6, 2019

Conversation

Eelis
Copy link
Contributor

@Eelis Eelis commented Aug 22, 2019

Currently, the regular expression grammar rules in [re.grammar] are formatted with crude codeblocks:

image

In the ECMA standard itself, rules are typeset like this:

image

So as an experiment, I tried mimicking that typesetting. Result:

image

Personally, I think it looks nicer than the crude codeblocks, and matching the upstream ECMAScript re grammar typesetting more closely is a nice bonus. What do you think? :)

(Incidentally, this also benefits cxxdraft-htmlgen, because it reduces the amount of non-C++ code in codeblocks.)

Copy link
Member

@jensmaurer jensmaurer left a comment

Choose a reason for hiding this comment

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

I'm not a fan of having different representations of grammar in the C++ standard to start with, but consistency with the upstream ECMA stuff is probably more important here than local consistency within the C++ wording draft.
So, this is a net improvement.

@zygoloid
Copy link
Member

zygoloid commented Oct 6, 2019

Yes, as this is effectively a patch applied on top of another standard, following that standard's conventions here seems best.

@zygoloid zygoloid merged commit 27eda37 into cplusplus:master Oct 6, 2019
@Eelis Eelis deleted the regrammar branch October 6, 2019 09:43
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