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

Merge v6 standard updates into the v7 branch #535

Merged
merged 263 commits into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
263 commits
Select commit Hold shift + click to select a range
7052c0a
Add issue and PR links
BillWagner Nov 30, 2020
4081842
Merge pull request #60 from ECMA-TC49-TG2/v6-pr-list
RexJaeschke Dec 4, 2020
9d7601f
Word Converter: Use exit code of 1 on any error
jskeet Dec 16, 2020
00f8f33
Add GitHub action for the Word Converter
jskeet Dec 16, 2020
5e82c7a
Allow manual triggering
jskeet Dec 16, 2020
823ba06
Merge pull request #1 from ECMA-TC49-TG2/feature-zero-init
RexJaeschke Dec 17, 2020
f8026d4
remove await restriction
BillWagner Oct 23, 2020
c58a5e4
Fix links to appendix C in the README
jskeet Jan 14, 2021
a04ec87
Fix formatting of code items in foreach statements
jskeet Jan 14, 2021
23431f6
update licenses (#201)
BillWagner Jan 14, 2021
c2d718c
Update namespaces.md
RexJaeschke Jan 16, 2021
b27cfab
Update classes.md
RexJaeschke Jan 16, 2021
e7c2b7a
Update statements.md
RexJaeschke Jan 16, 2021
b1a874e
Refactor antlr tool (#207)
BillWagner Jan 28, 2021
c72355d
Update basic-concepts.md
RexJaeschke Jan 15, 2021
e26b503
Update types.md
RexJaeschke Jan 15, 2021
5a810cd
Update statements.md
RexJaeschke Jan 15, 2021
dbbf22a
Update namespaces.md
RexJaeschke Jan 15, 2021
b36bf9b
Update attributes.md
RexJaeschke Jan 15, 2021
e341b37
Update delegates.md
RexJaeschke Jan 15, 2021
b457ebc
Update enums.md
RexJaeschke Jan 15, 2021
483cd65
Update interfaces.md
RexJaeschke Jan 15, 2021
a969a78
Update structs.md
RexJaeschke Jan 15, 2021
aa43992
Update expressions.md
RexJaeschke Jan 16, 2021
d8bb14f
Update classes.md
RexJaeschke Jan 16, 2021
2d3b0f7
Update expressions.md
RexJaeschke Jan 16, 2021
fb9dd67
Update variables.md
RexJaeschke Jan 16, 2021
7781d65
Update lexical-structure.md
RexJaeschke Jan 14, 2021
7e5f218
Update lexical-structure.md
RexJaeschke Jan 14, 2021
00bd3a9
Update lexical-structure.md
RexJaeschke Jan 14, 2021
91b93a2
Update lexical-structure.md
RexJaeschke Jan 14, 2021
27dee9c
Update lexical-structure.md
RexJaeschke Jan 14, 2021
aed0fbe
Update types.md
RexJaeschke Jan 14, 2021
c58d238
Initial README for the tools directory (#84)
jskeet Feb 11, 2021
cea83ca
Remove section 12.3.7.2 (invariance of the meaning of names in a block)
jskeet Feb 11, 2021
50c9ace
Update lexical-structure.md
RexJaeschke Feb 11, 2021
4d4d699
Update documentation-comments.md
RexJaeschke Feb 11, 2021
46e15f3
Update documentation-comments.md
RexJaeschke Feb 17, 2021
fc0712b
Update statements.md
RexJaeschke Feb 11, 2021
015488e
Add section flow validator - dry run version (#226)
BillWagner Feb 18, 2021
c7de398
Build GitHub action to create PR for updating grammar and sections (#…
BillWagner Feb 24, 2021
8d4fba3
[create-pull-request] automated change
BillWagner Feb 24, 2021
64eeacd
Apply suggestions from code review
RexJaeschke Feb 26, 2021
859a4a8
Update namespaces.md (#205)
RexJaeschke Feb 26, 2021
9f30f45
Update classes.md
RexJaeschke Feb 5, 2021
e136332
Update expressions.md
RexJaeschke Feb 5, 2021
8027332
Update structs.md
RexJaeschke Feb 5, 2021
0019624
Update interfaces.md
RexJaeschke Feb 5, 2021
767e8c3
improved overload resolution
BillWagner Oct 23, 2020
7f72bed
Resolve "element type" term conflict (#222)
RexJaeschke Mar 13, 2021
3002c4d
Use different antlr validator (#242)
BillWagner Mar 17, 2021
342ee37
Update classes.md (#243)
RexJaeschke Mar 18, 2021
8576a64
Update expressions.md (#237)
RexJaeschke Mar 18, 2021
707c6b8
Update delegates.md (#235)
RexJaeschke Mar 18, 2021
5ad3c4c
Update interfaces.md (#234)
RexJaeschke Mar 18, 2021
15c2570
Add assets (#246)
BillWagner Mar 24, 2021
67a9afa
fix link to standard document (#247)
BillWagner Mar 25, 2021
6865736
Add link to working group on ECMA (#248)
BillWagner Mar 31, 2021
1d6805f
nameof expressions alternative (#250)
jskeet Apr 7, 2021
5f73b59
Allow (null) as a LHS of the null-coalescing operator
jskeet Apr 7, 2021
d60381f
Resolve ANTLR warnings by defining named lexer tokens (#225)
RexJaeschke Apr 8, 2021
20081c8
Create admin file "guidelines-for-spec-writing-and-formatting.md" (#43)
RexJaeschke Apr 8, 2021
daf6a20
Fix errors in StandardAnchorTags tool (#255)
BillWagner Apr 8, 2021
a0dce01
Create markdown-links-verifier.yaml (#249)
Youssef1313 Apr 8, 2021
5835a68
[create-pull-request] automated change (#256)
github-actions[bot] Apr 8, 2021
1a9e962
Fix anchor links for top-level annex references
jskeet Apr 9, 2021
f30ded1
Result of running the renumbering tool
jskeet Apr 9, 2021
0cd4ecb
Grammar validation (#311)
BillWagner May 4, 2021
d27b477
Resolve numerous ANTLR issues (#261)
RexJaeschke May 5, 2021
ae29286
Remove unnecessary and inaccurate sentence from simple name resolution
jskeet Apr 27, 2021
89a6dcf
Remove the guarantee that an implementation runs finalizers on exit. …
BillWagner May 5, 2021
a977b20
[create-pull-request] automated change
BillWagner May 5, 2021
4216150
C# 6.0 feature: expression bodied members (#4)
BillWagner May 13, 2021
76ce06a
[create-pull-request] automated change (#314)
github-actions[bot] May 13, 2021
b7052e7
Remove warning for unreachable throw, empty, or { statement. (#312)
gafter May 13, 2021
b2b17c6
Consolidate unsafe-code grammar (#233)
RexJaeschke May 13, 2021
5451848
[create-pull-request] automated change (#315)
github-actions[bot] May 13, 2021
ed1b445
'on' was missing from Contextual_keywords, as were all the '|'s (#317)
Nigel-Ecma May 14, 2021
5550b29
[create-pull-request] automated change (#319)
github-actions[bot] May 24, 2021
c3fc2be
Fix editorial, formatting, example nits (#325)
RexJaeschke May 25, 2021
f6b9838
Rename Contribute.md to CONTRIBUTING.md (#257)
Youssef1313 Jun 10, 2021
6e177b6
Update links verifier (#326)
Youssef1313 Jun 10, 2021
7285c2b
change language identifier (#330)
BillWagner Jun 10, 2021
74b4a8c
[create-pull-request] automated change (#331)
github-actions[bot] Jun 10, 2021
883eeec
Allow \u escape sequences in Antlr tokens
jskeet Jun 11, 2021
e767348
Allow function calls in the ANTLR grammar
jskeet Jun 11, 2021
30b08a1
Remove unused method
jskeet Jun 11, 2021
11e34a4
Rex word converter nits (#103)
RexJaeschke Jun 15, 2021
91551f4
Fix bad link references (#335)
RexJaeschke Jun 16, 2021
8446e99
Section renumbering tool fixes (#336)
BillWagner Jun 16, 2021
331aae4
[create-pull-request] automated change (#338)
github-actions[bot] Jun 17, 2021
7a7ea8c
Parse (and format) ANTLR fragment productions in the Word converter
jskeet Jun 24, 2021
c280b6f
C# 6.0 feature: add specification for readonly auto properties (#11)
BillWagner Jun 30, 2021
93e2e7a
[create-pull-request] automated change (#347)
github-actions[bot] Jun 30, 2021
8f9b9ca
Update basic-concepts.md
Jun 30, 2021
dd74dd0
Fix accidental code-font of "long" in text (#348)
jskeet Jun 30, 2021
ef4f60c
Catch up to June 30 meeting (#350)
BillWagner Jul 2, 2021
6489755
Remove the language option (#349)
BillWagner Jul 2, 2021
01dbaa4
generate the TOC in the standard folder (#352)
BillWagner Jul 8, 2021
b5bb6e5
Typo fixes
jskeet Jul 9, 2021
678bd73
Ignore README.md in the input to the Word converter
jskeet Jul 9, 2021
222e888
Update expressions.md (#231)
RexJaeschke Jul 29, 2021
07b9626
C# 6.0 feature: Add library dependencies for C# 6.0 (#5)
BillWagner Jul 29, 2021
a842605
ANTLR-isation of the lexical and pre-processor grammars (#342)
Nigel-Ecma Jul 31, 2021
d3c1f26
[create-pull-request] automated change (#357)
github-actions[bot] Jul 31, 2021
cea1284
C# 6.0 Feature: using static (#9)
BillWagner Jul 31, 2021
8de0a70
[create-pull-request] automated change (#359)
github-actions[bot] Jul 31, 2021
3d5d61e
Fix an ANTLR syntax issue (#362)
BillWagner Aug 4, 2021
873b78e
Change production name separators "-" to "_" (#360)
RexJaeschke Aug 5, 2021
f7ad17b
Mark using static as completed (#365)
BillWagner Aug 31, 2021
6cf62b9
Add missing semicolon (#371)
BillWagner Sep 11, 2021
440ea17
Change in-line Note(s) to stand-alone Notes (#344)
RexJaeschke Sep 11, 2021
d4c7457
Update CONTRIBUTING.md
xtqqczze Sep 3, 2021
866d1be
ANTLR-isation of parse/syntactic grammar (#351)
Nigel-Ecma Sep 27, 2021
f21fcde
[create-pull-request] automated change (#378)
github-actions[bot] Sep 27, 2021
f2e03be
Provide guidance about creating issues
jskeet Oct 5, 2021
db437dd
Add link to the feature tracker
jskeet Oct 6, 2021
a31a9a4
Remove duplicate text and fix table format (#376)
RexJaeschke Oct 7, 2021
dd90903
Feature: An alternative approach to handling "null conditional" ops (…
Nigel-Ecma Oct 20, 2021
834049a
[create-pull-request] automated change (#382)
github-actions[bot] Oct 20, 2021
6e09c40
Empty params arrays are implementation-defined; see issue #200 (#377)
ericlippert Oct 20, 2021
64a39bf
C# 6.0 feature: Exception Filters (#2)
BillWagner Oct 21, 2021
96bab24
[create-pull-request] automated change (#384)
github-actions[bot] Oct 21, 2021
1161ecf
fix missing curly brace
bernd5 Nov 8, 2021
ddd3fa6
fix join sample (sample ignored rule "A query expression with a join …
bernd5 Nov 10, 2021
594b16c
fix typo (#391)
BillWagner Nov 10, 2021
6dce1ba
Avoid warnings with "dotnet run -p" under .NET 6
jskeet Nov 15, 2021
3203b5e
tools: Change the format of ANTLR rules in the Word document
jskeet Nov 16, 2021
24ecc93
tools: Remove block comments (notably the copyright in the intro)
jskeet Nov 16, 2021
2c698b7
Convert all star-prefixed lists into dash-prefixed lists
jskeet Nov 16, 2021
b1a32cc
tools: Convert subscripts/superscripts in inline code elements
jskeet Nov 16, 2021
c71d2af
tools: Separate consecutive notes/paragraphs
jskeet Nov 16, 2021
91ed87e
tools: Indent top-level notes and examples
jskeet Nov 16, 2021
bc1be9d
tools: Handle notes and examples in lists
jskeet Nov 16, 2021
38f4513
Antlr verification (#392)
BillWagner Nov 17, 2021
40ce26d
Update v6-feature-tracker.md
jskeet Nov 17, 2021
4fdd393
Update expressions.md
RexJaeschke Nov 19, 2021
1608b81
Update namespaces.md
RexJaeschke Nov 19, 2021
1d4e6ba
Interpolated strings (#390)
Nigel-Ecma Nov 22, 2021
0b9ad50
run automated tools (#405)
BillWagner Nov 22, 2021
1fdc01e
Fix missing/extraneous blank lines in grammar
jskeet Nov 24, 2021
f16479e
Add create permissions for this action (#409)
BillWagner Dec 2, 2021
9bd34b4
[create-pull-request] automated change
BillWagner Dec 2, 2021
c7261b7
Update section 11.7.3 to be more accurate and specific about expressi…
jskeet Dec 15, 2021
ddd60fa
Move attribute definitions to Annex C
RexJaeschke Sep 11, 2021
7ec1549
Fix GH367
xtqqczze Sep 7, 2021
ca6d3af
Fixed formatting for documentation comments
svick Aug 11, 2021
0c0cbd1
[create-pull-request] automated change (#413)
github-actions[bot] Dec 15, 2021
175ce90
C# 6.0 feature: collection (index) initializers, and extension add me…
BillWagner Dec 15, 2021
e40a240
[create-pull-request] automated change (#414)
github-actions[bot] Dec 15, 2021
657c4a9
Replace nested bullets with prose (#402)
BillWagner Dec 15, 2021
5ca0a40
[create-pull-request] automated change (#416)
github-actions[bot] Dec 15, 2021
a40cda9
update all tools to .NET 6 (#417)
BillWagner Jan 6, 2022
4df425a
Fix formatting typos
jskeet Jan 7, 2022
d88068b
Update tracker with 2021-12-15 meeting changes (#415)
RexJaeschke Jan 7, 2022
6468f8b
tools: Handle format strings tables in Word converter
jskeet Jan 11, 2022
6a687f2
tools: Unescape backslashes in Markdown text
jskeet Jan 11, 2022
18cb8a1
Group types alphabetically inside consolidated namespaces
RexJaeschke Jan 4, 2022
bb3ae6f
Fix delegate subtraction semantics
RexJaeschke Nov 19, 2021
a579acb
Address Jon's review comments
RexJaeschke Dec 23, 2021
f1b048f
Improve formatting of Annex C
jskeet Jan 11, 2022
89f99c9
Replace tabs with spaces, or remove them entirely
jskeet Jan 12, 2022
c5be76c
parenthesize many links (#427)
BillWagner Jan 17, 2022
855f430
Update for V6 (#429)
RexJaeschke Jan 19, 2022
f5f4986
Clarify that object initializer can have multiple indexer targets
jskeet Jan 19, 2022
e31d868
Fix editorial and formatting nits (#428)
RexJaeschke Jan 20, 2022
75956c8
[create-pull-request] automated change (#439)
github-actions[bot] Jan 20, 2022
84cee9f
Ensure section renumbering tool handles removing clauses. (#444)
BillWagner Jan 21, 2022
e59815b
Move/delete all the contents of "4. Acronyms and abbreviations" (#443)
RexJaeschke Jan 21, 2022
a10f875
[create-pull-request] automated change (#445)
github-actions[bot] Jan 21, 2022
f87b032
Remove acronyms & abb. (#446)
BillWagner Jan 21, 2022
153c7dd
[create-pull-request] automated change (#447)
github-actions[bot] Jan 21, 2022
ef152a7
Update interfaces.md
Nigel-Ecma Feb 3, 2022
ee5107b
Remove unnecessary heading (#454)
BillWagner Feb 9, 2022
a4bf87d
Update removed header (#455)
BillWagner Feb 9, 2022
f443150
[create-pull-request] automated change (#456)
github-actions[bot] Feb 9, 2022
0c76ac4
Fix inconsistency around the effective return type of a method (#458)
jskeet Feb 18, 2022
f26406a
Change `E` to `e` (#457)
BillWagner Feb 22, 2022
043f22b
fix typo (#459)
BillWagner Feb 22, 2022
75ffd87
[create-pull-request] automated change (#460)
github-actions[bot] Feb 22, 2022
d732878
Clarify enum_base specification
jskeet Jan 13, 2022
20692b1
update FP ref, drop 10646 (#463)
RexJaeschke Feb 24, 2022
d90f4c9
Update V6 tracker with 2022-02-23 meeting changes (#462)
RexJaeschke Feb 24, 2022
da08ba2
accessor term usage cleanup (#466)
RexJaeschke Feb 25, 2022
beed809
Format accessor names (#465)
RexJaeschke Feb 25, 2022
e067d93
Finalizers aren't required (#467)
BillWagner Feb 25, 2022
9e7b384
[create-pull-request] automated change (#468)
github-actions[bot] Feb 25, 2022
8224eda
Reformatting examples in sections 6 and 7
jskeet Mar 2, 2022
8e098be
Reformatting of examples in section 8, 9 and 10
jskeet Mar 3, 2022
770f26d
format annex D (#470)
BillWagner Mar 3, 2022
ee85562
format code (#474)
BillWagner Mar 7, 2022
aa87760
Update unsafe-code.md (#476)
adegeo Mar 7, 2022
7d4f915
Update structs.md (#477)
RexJaeschke Mar 8, 2022
3dc7723
fix code formatting (#479)
BillWagner Mar 8, 2022
3a411eb
Improve named parameter wording (#478)
RexJaeschke Mar 8, 2022
f43d511
Improved wording re nested generic interfaces and delegates (#480)
RexJaeschke Mar 9, 2022
577e5db
initial test project (#481)
BillWagner Mar 9, 2022
d2787c3
code formatting (#483)
BillWagner Mar 9, 2022
8d56af1
Reformat sections 12 and 13 (statements and namespaces)
jskeet Mar 10, 2022
631c441
Reformat section 11 (expressions) (#485)
jskeet Mar 10, 2022
a1a5c35
Reformat section 14 (classes)
jskeet Mar 10, 2022
f6231fa
Add missing backtick that causes bad formatting
Youssef1313 Mar 13, 2022
4c9074d
Move "new" modifier to after access modifier (#491)
jskeet Mar 14, 2022
2151c20
More string interpolation
jskeet Mar 14, 2022
54f6485
Unescape pipe escaping for table cells
jskeet Mar 14, 2022
df59966
First steps to a test framework
jskeet Mar 14, 2022
49e44d8
markdig (used by the smarten tool) has a bug, when a line starts with…
Nigel-Ecma Mar 16, 2022
7dfdbf6
Remove the static nature of the diagnostic reporter
jskeet Mar 15, 2022
16a0188
Add warning for long lines during Word conversion
jskeet Mar 15, 2022
cf88458
Remove all ANTLR parsing from the Word converter tool
jskeet Mar 15, 2022
a7d601d
Fix tests by removing some global state
jskeet Mar 15, 2022
b05cddd
Simplify test XML by removing namespaces
jskeet Mar 15, 2022
6cd9512
Fix long lines in code blocks (above 95 characters)
jskeet Mar 16, 2022
d7d5660
[create-pull-request] automated change
jskeet Mar 16, 2022
cd1749f
Run smarten on PR merge (#496)
BillWagner Mar 16, 2022
f293bb8
Improve text around extern aliases
jskeet Feb 24, 2022
53e081b
The file standard-library.md contains a large amount of HTML text whi…
Nigel-Ecma Mar 10, 2022
a40b509
[create-pull-request] automated change (#504)
github-actions[bot] Mar 17, 2022
3724d12
Fix formatting nits
RexJaeschke Mar 12, 2022
8f89c72
Remove ellipsis from anchors (#514)
BillWagner Mar 17, 2022
e2cbba8
Fix tests by performing conversion in constructor
jskeet Mar 16, 2022
f2fdbb0
Fix note/example (and possibly other) Word conversion issues
jskeet Mar 17, 2022
c0b4cbb
Word converter: Rewrite list blocks to handle embedded code blocks
jskeet Mar 16, 2022
b66cddd
Fix table in note for operator precedence
jskeet Mar 17, 2022
a8ab68e
Validate that lists are preceded by a blank line
jskeet Mar 17, 2022
700a9b3
Perform Markdown reading/parsing synchronously
jskeet Mar 17, 2022
9c758db
Fix broken lists
jskeet Mar 17, 2022
4eb5d21
Fix broken lists in notes
jskeet Mar 17, 2022
d7644ed
Allow custom blocks (tables) to be used in lists
jskeet Mar 18, 2022
9e6615d
Move tables for arithmetic operations properly inside the tables
jskeet Mar 18, 2022
f553637
Indent lists in notes
jskeet Mar 18, 2022
ec93b5e
Note that an enum can be a generic type
jskeet Mar 18, 2022
d594526
Fix formatting issues around code
jskeet Mar 18, 2022
21b8817
Rex fix formatting nits (#403)
RexJaeschke Mar 18, 2022
a8543c9
Add missing space in general-description.md which also prevented (#523)
Nigel-Ecma Mar 18, 2022
6c56e17
Handle anchors correctly (#520)
Youssef1313 Mar 18, 2022
295afe3
Add a manual workflow for smarten, (#521)
BillWagner Mar 19, 2022
30a22fd
configure markdown lint (#522)
BillWagner Mar 21, 2022
f167bfb
Remove last vestiges of "antlr" language for code blocks
jskeet Mar 21, 2022
3d0bc19
Squash markdown lint warnings. (#526)
BillWagner Mar 21, 2022
dc0e253
Address markdown lint warnings. (#527)
BillWagner Mar 23, 2022
c62449b
Use the latest smarten (#524)
BillWagner Mar 24, 2022
14cf54f
More markdown lint fixes (#528)
BillWagner Mar 24, 2022
7c6320e
[create-pull-request] automated change (#519)
github-actions[bot] Mar 24, 2022
a1e3aa4
Better betterness (#484)
BillWagner Mar 24, 2022
b6412f4
Automated Section renumber and grammar extraction (#529)
github-actions[bot] Mar 24, 2022
9b81805
Markdown lint fixes (#530)
BillWagner Mar 25, 2022
cf5a3d9
Markdownlint final fixes (#532)
BillWagner Mar 28, 2022
dce002f
Format endnote and endexample markers (#534)
BillWagner Mar 29, 2022
f2b4eed
merge draft v6 into draft v7
BillWagner Mar 31, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
Binary file not shown.
Binary file not shown.
178 changes: 178 additions & 0 deletions .github/workflows/dependencies/ReplaceAndAdd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
# Replacements & Additions

A “replacement & additions” file can be passed to `BuildGrammar`’s `--modification-file`/`-m`
option and contains replacement and additional rules to be added to: verify/test a grammar,
explore/test new language features, etc. It is a markdown (`.md`) file which follows the same
conventions as those used for the Standard.

The file is processed by `BuildGrammar` similarly to other markdown files; clauses are
noted and text in ```` ```ANTLR ... ``` ```` code blocks is “parsed” (being generous here);
as ANTLR rules, mode commands, and comments (and nothing else, don’t go trying to set options
or other stuff); and added to the corresponding section in the produced grammar (`.g4`) file.

The rules add to, or replace, existing rules in the corresponding clause; new rules are added
to the end of the clause’s rule list, replacements occur in-place. Further in the replacement
case the previous rule is kept as a comment, and this happens regardless of the previous rules
clause i.e. a replacement can move a rule to a different clause.

A rule is only a replacement if it changes the rule’s definition or clause.
Rules with are neither additions or replacements are ignored.

> *Note:* This means that a
replacement & additions file can actually be a complete Standard section markdown file
and only the changed rules will be extracted to update the grammar. So while working, say,
on a PR if the original Standard’s section files are passed to `BuildGrammar` as input files,
the section files changed by the PR are passed as modification files, then the resultant grammar will
reflect the PR’s changes with the old rules as comments.

> **Important:** section numbers in replacement & additions files are not maintained by
the automatic section numbering tooling, they **must** be maintained manually.

---

# Verification-Only Replacements & Additions

This set of replacements and additions is the bare minimum required to allow the grammar to verify and run, though
it may not produce the desired parse (that requires at least the use of modes and/or
lexical predicates).

This set can be used as a basic check that the grammar is a correct ANTLR grammar.

---

## Top Level Rule

The Standard’s *compilation_unit* as is will allow garbage at the end of a file, this
rule has an EOF requirement to ensure the whole of the input must be a correct program.

> *Note: The section number makes this the first rule in the grammar, not required but it
has to go somewhere…*

### 0.0.0 Top Level Rule

```ANTLR
// [ADDED] Rule added as the start point
prog: compilation_unit EOF;
```
---

## Discarding Whitespace

The following changes in §7.3.2, §7.3.3 and §7.3.4, add `-> skip` to the “whitespace”
token rules so that are not passed to the parser. This behaviour is implicit in the
Standard.

### 7.3.2 Line terminators

```ANTLR
// [SKIP]
New_Line
: ( New_Line_Character
| '\u000D\u000A' // carriage return, line feed
) -> skip
;
```

### 7.3.3 Comments

```ANTLR
// [SKIP]
Comment
: ( Single_Line_Comment
| Delimited_Comment
) -> skip
;
```

### 7.3.4 White space

```ANTLR
// [SKIP]
Whitespace
: ( [\p{Zs}] // any character with Unicode class Zs
| '\u0009' // horizontal tab
| '\u000B' // vertical tab
| '\u000C' // form feed
) -> skip
;

```

---

## Pre-processing directives

This change causes all pre-processor directives to be discarded, they don’t need to be
processed to validate the grammar (processing them would exercise the *implementation*
of the pre-processor, which is not part of the Standard).

### 7.5.1 General

```ANTLR
// [CHANGE] Discard pre-processor directives
PP_Directive
: (PP_Start PP_Kind PP_New_Line) -> skip
;
```

---

## Mutual Left Recursion Removal

All but one mutual left recursive (MLR) group has been removed from the grammar (and we should
strive not to introduce any new ones).

This change resolves the one remaining MLR group by inlining some of the non-terminal
alternatives in *primary_no_array_creation_expression*.

Non-terminals that are inlined are commented out and the inlined body is indented.

This change has not been made to the Standard itself as it makes *primary_no_array_creation_expression*
“uglier” and would obfuscate somewhat the description in the Standard.

As MLR is not supported by ANTLR without this change the grammar would be rejected.

### 12.7.1 General

```ANTLR
// [CHANGE] This removes a mutual left-recursion group which we have (currently?)
// [CHANGE] decided to leave in the Standard. Without this change the grammar will fail.
primary_no_array_creation_expression
: literal
| simple_name
| parenthesized_expression
// | member_access
| primary_no_array_creation_expression '.' identifier type_argument_list?
| array_creation_expression '.' identifier type_argument_list?
| predefined_type '.' identifier type_argument_list?
| qualified_alias_member '.' identifier type_argument_list?
// | invocation_expression
| primary_no_array_creation_expression '(' argument_list? ')'
| array_creation_expression '(' argument_list? ')'
// | element_access and pointer_element_access (unsafe code support)
| primary_no_array_creation_expression '[' argument_list ']'
| this_access
| base_access
// | post_increment_expression
| primary_no_array_creation_expression '++'
| array_creation_expression '++'
// | post_decrement_expression
| primary_no_array_creation_expression '--'
| array_creation_expression '--'
| object_creation_expression
| delegate_creation_expression
| anonymous_object_creation_expression
| typeof_expression
| sizeof_expression
| checked_expression
| unchecked_expression
| default_value_expression
| nameof_expression
| anonymous_method_expression
// | pointer_member_access // unsafe code support
| primary_no_array_creation_expression '->' identifier type_argument_list?
| array_creation_expression '->' identifier type_argument_list?
// | pointer_element_access // unsafe code support
// covered by element_access replacement above
;
```
43 changes: 43 additions & 0 deletions .github/workflows/grammar-validator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: ANTLR Grammar validator

# Triggers the workflow on pull request events that update the branch
on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
inputs:
reason:
description: 'The reason for running the workflow'
required: true
default: 'Manual run'

jobs:
grammar-validator:
runs-on: ubuntu-18.04
env:
DOTNET_NOLOGO: true

steps:
- name: Check out our repo
uses: actions/checkout@v2

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Set up JDK 15
uses: actions/setup-java@v1
with:
java-version: 15.0

# Install build grammar global tool
- name: Install BuildGrammar tool
run: |
dotnet tool install --version 1.0.0-alpha.1 --global --add-source ./.github/workflows/dependencies/ EcmaTC49.BuildGrammar


- name: run validate
run: |
cd tools
./validate-grammar.sh
14 changes: 14 additions & 0 deletions .github/workflows/markdown-links-verifier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Markdown links verifier
on: pull_request

jobs:
validate_links:
name: Markdown links verifier
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v1

- name: Validate links
uses: Youssef1313/markdown-links-verifier@v0.1.3
17 changes: 17 additions & 0 deletions .github/workflows/markdownlint-problem-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "markdownlint",
"pattern": [
{
"regexp": "^([^:]*):(\\d+):?(\\d+)?\\s([\\w-\\/]*)\\s(.*)$",
"file": 1,
"line": 2,
"column": 3,
"code": 4,
"message": 5
}
]
}
]
}
38 changes: 38 additions & 0 deletions .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Markdownlint

on:
push:
branches:
- draft-v6
paths:
- "standard/*.md"
- ".markdownlint.json"
pull_request:
paths:
- "standard/*.md"
- ".markdownlint.json"
workflow_dispatch:
inputs:
reason:
description: 'The reason for running the workflow'
required: true
default: 'Manual run'

jobs:
lint:

runs-on: ubuntu-latest
permissions:
statuses: write

steps:
- uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 #@v2
- name: Use Node.js
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d #@v1
with:
node-version: 12.x
- name: Run Markdownlint
run: |
echo "::add-matcher::.github/workflows/markdownlint-problem-matcher.json"
npm i -g markdownlint-cli
markdownlint "standard/*.md"
32 changes: 32 additions & 0 deletions .github/workflows/renumber-sections.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Renumber standard TOC

# Triggers the workflow on pull request events that update the branch
on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
inputs:
reason:
description: 'The reason for running the workflow'
required: true
default: 'Manual run'

jobs:
renumber-sections:
runs-on: ubuntu-18.04
env:
DOTNET_NOLOGO: true

steps:
- name: Check out our repo
uses: actions/checkout@v2

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Run section renumbering dry run
run: |
cd tools
./run-section-renumber.sh --dryrun
Loading