Commit 0573e53
Alexis Hunt
Expand docs on Macros By Example.
The primary motivation here was to increase clarity and fully address the
scoping and naming details. The inclusion of RFC 550's formal specification is
to move it to the reference where it can be updated. I made several changes,
motivated by accommodating `?` and new fragment specifiers, but there are some
other things which need highlighting so that they can be double-checked for
correctness.
* Permit the empty string to follow on in the first invariant; this is a
technical oversight in the definition I believe.
* Added a requirement that repetitions obey the follow rules; this was an
oversight in the original RFC and currently planned for fix.
* Rewrote the definition of FIRST for complex NTs to be more clear.
* Added a case to LAST for `?` repetitions
* Removed the last example of LAST, because it is wrong.
* Rearranged the definition of FOLLOW to be more clear
* Added Shl to FOLLOW(ty) and FOLLOW(path), as documented in the Reference
already.
* Added missing follow sets for newer fragment specifiers.
The scoping text is probably not completely accurate, but it's certainly much
better than what was there before (i.e. basically nothing).1 parent dafc0ba commit 0573e53
File tree
5 files changed
+779
-123
lines changed- src
5 files changed
+779
-123
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
179 | | - | |
180 | 178 | | |
181 | 179 | | |
182 | 180 | | |
| |||
0 commit comments